Changeset 106100 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Sep 19, 2024 8:56:04 PM (7 months ago)
- svn:sync-xref-src-repo-rev:
- 164876
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-dx-dx11.cpp
r105704 r106100 6666 6666 DXDEVICE *pDXDevice = dxDeviceGet(pThisCC->svga.p3dState); 6667 6667 pDXDevice->pImmediateContext->OMSetRenderTargetsAndUnorderedAccessViews(0, NULL, NULL, 0, 0, NULL, NULL); 6668 for (unsigned i = 0; i < SVGA3D_DX11_1_MAX_UAVIEWS; ++i) 6668 uint32_t const cMaxUAViews = pDXDevice->FeatureLevel >= D3D_FEATURE_LEVEL_11_1 6669 ? SVGA3D_DX11_1_MAX_UAVIEWS 6670 : SVGA3D_MAX_UAVIEWS; 6671 for (uint32_t i = 0; i < cMaxUAViews; ++i) 6669 6672 { 6670 6673 ID3D11UnorderedAccessView *pNullUA = 0; … … 6726 6729 */ 6727 6730 6728 for (uint32_t idxUA = 0; idxUA < SVGA3D_DX11_1_MAX_UAVIEWS; ++idxUA)6731 for (uint32_t idxUA = 0; idxUA < cMaxUAViews; ++idxUA) 6729 6732 { 6730 6733 SVGA3dUAViewId const viewId = pDXContext->svgaDXContext.csuaViewIds[idxUA]; … … 6784 6787 } 6785 6788 6786 for (uint32_t idxUA = 0; idxUA < SVGA3D_DX11_1_MAX_UAVIEWS; ++idxUA)6789 for (uint32_t idxUA = 0; idxUA < cMaxUAViews; ++idxUA) 6787 6790 { 6788 6791 SVGA3dUAViewId const viewId = pDXContext->svgaDXContext.uaViewIds[idxUA]; … … 7507 7510 ID3D11UnorderedAccessView *apUnorderedAccessViews[SVGA3D_DX11_1_MAX_UAVIEWS]; 7508 7511 UINT aUAVInitialCounts[SVGA3D_DX11_1_MAX_UAVIEWS]; 7509 for (uint32_t idxUA = 0; idxUA < SVGA3D_DX11_1_MAX_UAVIEWS; ++idxUA) 7512 uint32_t const cMaxUAViews = pDevice->FeatureLevel >= D3D_FEATURE_LEVEL_11_1 7513 ? SVGA3D_DX11_1_MAX_UAVIEWS 7514 : SVGA3D_MAX_UAVIEWS; 7515 for (uint32_t idxUA = 0; idxUA < cMaxUAViews; ++idxUA) 7510 7516 { 7511 7517 apUnorderedAccessViews[idxUA] = NULL; … … 9935 9941 ID3D11UnorderedAccessView *papUnorderedAccessView[SVGA3D_DX11_1_MAX_UAVIEWS]; 9936 9942 UINT aUAVInitialCounts[SVGA3D_DX11_1_MAX_UAVIEWS]; 9937 for (uint32_t i = 0; i < SVGA3D_DX11_1_MAX_UAVIEWS; ++i) 9943 uint32_t const cMaxUAViews = pDevice->FeatureLevel >= D3D_FEATURE_LEVEL_11_1 9944 ? SVGA3D_DX11_1_MAX_UAVIEWS 9945 : SVGA3D_MAX_UAVIEWS; 9946 for (uint32_t i = 0; i < cMaxUAViews; ++i) 9938 9947 { 9939 9948 papUnorderedAccessView[i] = NULL; … … 9954 9963 } 9955 9964 9956 dxCSUnorderedAccessViewSet(pDevice, 0, SVGA3D_DX11_1_MAX_UAVIEWS, papUnorderedAccessView, aUAVInitialCounts);9965 dxCSUnorderedAccessViewSet(pDevice, 0, cMaxUAViews, papUnorderedAccessView, aUAVInitialCounts); 9957 9966 return VINF_SUCCESS; 9958 9967 }
Note:
See TracChangeset
for help on using the changeset viewer.