Changeset 94928 in vbox for trunk/src/VBox/Devices
- Timestamp:
- May 9, 2022 6:56:53 AM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 151336
- Location:
- trunk/src/VBox/Devices/Graphics
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA-cmd.cpp
r94449 r94928 2917 2917 { 2918 2918 #ifdef VMSVGA3D_DX 2919 DEBUG_BREAKPOINT_TEST();2919 //DEBUG_BREAKPOINT_TEST(); 2920 2920 RT_NOREF(cbCmd); 2921 2921 return vmsvga3dDXDestroyBlendState(pThisCC, idDXContext, pCmd); … … 2945 2945 { 2946 2946 #ifdef VMSVGA3D_DX 2947 DEBUG_BREAKPOINT_TEST();2947 //DEBUG_BREAKPOINT_TEST(); 2948 2948 RT_NOREF(cbCmd); 2949 2949 return vmsvga3dDXDestroyDepthStencilState(pThisCC, idDXContext, pCmd); … … 2973 2973 { 2974 2974 #ifdef VMSVGA3D_DX 2975 DEBUG_BREAKPOINT_TEST();2975 //DEBUG_BREAKPOINT_TEST(); 2976 2976 RT_NOREF(cbCmd); 2977 2977 return vmsvga3dDXDestroyRasterizerState(pThisCC, idDXContext, pCmd); … … 3001 3001 { 3002 3002 #ifdef VMSVGA3D_DX 3003 DEBUG_BREAKPOINT_TEST();3003 //DEBUG_BREAKPOINT_TEST(); 3004 3004 RT_NOREF(cbCmd); 3005 3005 return vmsvga3dDXDestroySamplerState(pThisCC, idDXContext, pCmd); -
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-dx-shader.cpp
r94832 r94928 31 31 #include "DevVGA-SVGA3d-dx-shader.h" 32 32 33 #include <d3d11TokenizedProgramFormat.hpp> 33 34 34 35 /* … … 1515 1516 1516 1517 pOpcode->cOpcodeToken = opcode.instructionLength; 1518 uint32_t cOpcode = 1; /* Opcode token + extended opcode tokens. */ 1517 1519 if (opcode.extended) 1518 1520 { 1519 ASSERT_GUEST_RETURN(dxbcTokenReaderCanRead(r, 1), VERR_INVALID_PARAMETER);1520 1521 if ( pOpcode->opcodeType == VGPU10_OPCODE_DCL_FUNCTION_BODY 1521 1522 || pOpcode->opcodeType == VGPU10_OPCODE_DCL_FUNCTION_TABLE … … 1525 1526 { 1526 1527 /* "next DWORD contains ... the actual instruction length in DWORD since it may not fit into 7 bits" */ 1528 ASSERT_GUEST_RETURN(dxbcTokenReaderCanRead(r, 1), VERR_INVALID_PARAMETER); 1527 1529 pOpcode->cOpcodeToken = dxbcTokenReaderRead32(r); 1530 ++cOpcode; 1528 1531 } 1529 1532 else 1530 1533 { 1531 1534 VGPU10OpcodeToken1 opcode1; 1532 opcode1.value = dxbcTokenReaderRead32(r); 1533 ASSERT_GUEST(opcode1.opcodeType == VGPU10_EXTENDED_OPCODE_SAMPLE_CONTROLS); 1535 do 1536 { 1537 ASSERT_GUEST_RETURN(dxbcTokenReaderCanRead(r, 1), VERR_INVALID_PARAMETER); 1538 opcode1.value = dxbcTokenReaderRead32(r); 1539 ++cOpcode; 1540 ASSERT_GUEST( opcode1.opcodeType == VGPU10_EXTENDED_OPCODE_SAMPLE_CONTROLS 1541 || opcode1.opcodeType == D3D11_SB_EXTENDED_OPCODE_RESOURCE_DIM 1542 || opcode1.opcodeType == D3D11_SB_EXTENDED_OPCODE_RESOURCE_RETURN_TYPE); 1543 } while(opcode1.extended); 1534 1544 } 1535 1545 } 1536 1546 1537 1547 ASSERT_GUEST_RETURN(pOpcode->cOpcodeToken >= 1 && pOpcode->cOpcodeToken < 256, VERR_INVALID_PARAMETER); 1538 ASSERT_GUEST_RETURN(dxbcTokenReaderCanRead(r, pOpcode->cOpcodeToken - 1), VERR_INVALID_PARAMETER);1548 ASSERT_GUEST_RETURN(dxbcTokenReaderCanRead(r, pOpcode->cOpcodeToken - cOpcode), VERR_INVALID_PARAMETER); 1539 1549 1540 1550 #ifdef LOG_ENABLED … … 2424 2434 int DXShaderUpdateResourceTypes(DXShaderInfo const *pInfo, VGPU10_RESOURCE_DIMENSION *paResourceType, uint32_t cResourceType) 2425 2435 { 2436 if (pInfo->fGuestSignatures) 2437 return VINF_SUCCESS; 2438 2426 2439 for (uint32_t i = 0; i < pInfo->cDclResource; ++i) 2427 2440 { -
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-dx.cpp
r94833 r94928 902 902 SVGA3dBlendStateId const blendId = pCmd->blendId; 903 903 904 ASSERT_GUEST_RETURN( pDXContext->cot.paBlendState, VERR_INVALID_STATE);905 ASSERT_GUEST_RETURN(blendId < pDXContext->cot.cBlendState, VERR_INVALID_PARAMETER);904 ASSERT_GUEST_RETURN( blendId == SVGA3D_INVALID_ID 905 || blendId < pDXContext->cot.cBlendState, VERR_INVALID_PARAMETER); 906 906 RT_UNTRUSTED_VALIDATED_FENCE(); 907 907 … … 930 930 SVGA3dDepthStencilStateId const depthStencilId = pCmd->depthStencilId; 931 931 932 ASSERT_GUEST_RETURN( pDXContext->cot.paDepthStencil, VERR_INVALID_STATE);933 ASSERT_GUEST_RETURN(depthStencilId < pDXContext->cot.cDepthStencil, VERR_INVALID_PARAMETER);932 ASSERT_GUEST_RETURN( depthStencilId == SVGA3D_INVALID_ID 933 || depthStencilId < pDXContext->cot.cDepthStencil, VERR_INVALID_PARAMETER); 934 934 RT_UNTRUSTED_VALIDATED_FENCE(); 935 935 … … 954 954 AssertRCReturn(rc, rc); 955 955 956 ASSERT_GUEST_RETURN(rasterizerId < pDXContext->cot.cRasterizerState, VERR_INVALID_PARAMETER); 956 ASSERT_GUEST_RETURN( rasterizerId == SVGA3D_INVALID_ID 957 || rasterizerId < pDXContext->cot.cRasterizerState, VERR_INVALID_PARAMETER); 957 958 RT_UNTRUSTED_VALIDATED_FENCE(); 958 959
Note:
See TracChangeset
for help on using the changeset viewer.