Changeset 81211 in vbox for trunk/src/VBox/Devices/Graphics/shaderlib/shader.c
- Timestamp:
- Oct 10, 2019 12:17:52 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/shaderlib/shader.c
r79670 r81211 335 335 } 336 336 337 static voidshader_record_register_usage(IWineD3DBaseShaderImpl *shader, struct shader_reg_maps *reg_maps,337 static HRESULT shader_record_register_usage(IWineD3DBaseShaderImpl *shader, struct shader_reg_maps *reg_maps, 338 338 const struct wined3d_shader_register *reg, enum wined3d_shader_type shader_type) 339 339 { … … 365 365 else 366 366 { 367 ((IWineD3DPixelShaderImpl *)shader)->input_reg_used[reg->idx] = TRUE; 367 unsigned int reg_idx = reg->idx; 368 369 if (reg_idx >= MAX_REG_INPUT) 370 { 371 ERR("Invalid input register index %d.\n", reg_idx); 372 return E_INVALIDARG; 373 } 374 375 ((IWineD3DPixelShaderImpl *)shader)->input_reg_used[reg_idx] = TRUE; 368 376 } 369 377 } … … 421 429 break; 422 430 } 431 432 return S_OK; 423 433 } 424 434 … … 660 670 struct wined3d_shader_src_param dst_rel_addr; 661 671 struct wined3d_shader_dst_param dst_param; 672 HRESULT hr; 662 673 663 674 fe->shader_read_dst_param(fe_data, &ptr, &dst_param, &dst_rel_addr); 664 675 665 shader_record_register_usage(shader, reg_maps, &dst_param.reg, shader_version.type); 676 hr = shader_record_register_usage(shader, reg_maps, &dst_param.reg, shader_version.type); 677 if (FAILED(hr)) 678 { 679 ERR("shader_record_register_usage failed.\n"); 680 return hr; 681 } 666 682 667 683 /* WINED3DSPR_TEXCRDOUT is the same as WINED3DSPR_OUTPUT. _OUTPUT can be > MAX_REG_TEXCRD and
Note:
See TracChangeset
for help on using the changeset viewer.