Changeset 102632 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Dec 18, 2023 12:07:05 PM (13 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-dx.cpp
r102627 r102632 109 109 * because they are applied by the backend before each Draw call. 110 110 */ 111 #define DX_STATE_VS 0x00000001112 #define DX_STATE_PS 0x00000002113 111 #define DX_STATE_SAMPLERS 0x00000004 114 112 #define DX_STATE_INPUTLAYOUT 0x00000008 … … 120 118 #define DX_STATE_SCISSORRECTS 0x00000800 121 119 #define DX_STATE_RASTERIZERSTATE 0x00001000 122 #define DX_STATE_RENDERTARGETS 0x00002000123 #define DX_STATE_GS 0x00004000124 120 uint32_t u32TrackedState = 0 125 | DX_STATE_VS126 | DX_STATE_PS127 121 | DX_STATE_SAMPLERS 128 122 | DX_STATE_INPUTLAYOUT … … 134 128 | DX_STATE_SCISSORRECTS 135 129 | DX_STATE_RASTERIZERSTATE 136 | DX_STATE_RENDERTARGETS137 | DX_STATE_GS138 130 ; 139 131 140 132 LogFunc(("cid = %d, state = 0x%08X\n", cid, u32TrackedState)); 141 142 if (u32TrackedState & DX_STATE_VS)143 {144 u32TrackedState &= ~DX_STATE_VS;145 146 SVGA3dShaderType const shaderType = SVGA3D_SHADERTYPE_VS;147 148 uint32_t const idxShaderState = shaderType - SVGA3D_SHADERTYPE_MIN;149 SVGA3dShaderId shaderId = pDXContext->svgaDXContext.shaderState[idxShaderState].shaderId;150 151 rc = pSvgaR3State->pFuncsDX->pfnDXSetShader(pThisCC, pDXContext, shaderId, shaderType);152 AssertRC(rc);153 }154 155 156 if (u32TrackedState & DX_STATE_PS)157 {158 u32TrackedState &= ~DX_STATE_PS;159 160 SVGA3dShaderType const shaderType = SVGA3D_SHADERTYPE_PS;161 162 uint32_t const idxShaderState = shaderType - SVGA3D_SHADERTYPE_MIN;163 SVGA3dShaderId shaderId = pDXContext->svgaDXContext.shaderState[idxShaderState].shaderId;164 165 rc = pSvgaR3State->pFuncsDX->pfnDXSetShader(pThisCC, pDXContext, shaderId, shaderType);166 AssertRC(rc);167 }168 169 170 if (u32TrackedState & DX_STATE_GS)171 {172 u32TrackedState &= ~DX_STATE_GS;173 174 SVGA3dShaderType const shaderType = SVGA3D_SHADERTYPE_GS;175 176 uint32_t const idxShaderState = shaderType - SVGA3D_SHADERTYPE_MIN;177 SVGA3dShaderId shaderId = pDXContext->svgaDXContext.shaderState[idxShaderState].shaderId;178 179 rc = pSvgaR3State->pFuncsDX->pfnDXSetShader(pThisCC, pDXContext, shaderId, shaderType);180 AssertRC(rc);181 }182 183 133 184 134 if (u32TrackedState & DX_STATE_SAMPLERS) … … 300 250 301 251 rc = pSvgaR3State->pFuncsDX->pfnDXSetRasterizerState(pThisCC, pDXContext, rasterizerId); 302 AssertRC(rc);303 }304 305 306 if (u32TrackedState & DX_STATE_RENDERTARGETS)307 {308 u32TrackedState &= ~DX_STATE_RENDERTARGETS;309 310 SVGA3dDepthStencilViewId const depthStencilViewId = (SVGA3dDepthStencilViewId)pDXContext->svgaDXContext.renderState.depthStencilViewId;311 uint32_t const cRenderTargetViewId = SVGA3D_MAX_SIMULTANEOUS_RENDER_TARGETS;312 SVGA3dRenderTargetViewId const *paRenderTargetViewId = (SVGA3dRenderTargetViewId *)&pDXContext->svgaDXContext.renderState.renderTargetViewIds[0];313 314 rc = pSvgaR3State->pFuncsDX->pfnDXSetRenderTargets(pThisCC, pDXContext, depthStencilViewId, cRenderTargetViewId, paRenderTargetViewId);315 252 AssertRC(rc); 316 253 }
Note:
See TracChangeset
for help on using the changeset viewer.