Changeset 94232 in vbox for trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-dx-shader.cpp
- Timestamp:
- Mar 15, 2022 8:47:10 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-dx-shader.cpp
r94146 r94232 2365 2365 } 2366 2366 2367 int DXShaderUpdateResourceTypes(DXShaderInfo const *pInfo, SVGA3dResourceType*paResourceType, uint32_t cResourceType)2367 int DXShaderUpdateResourceTypes(DXShaderInfo const *pInfo, VGPU10_RESOURCE_DIMENSION *paResourceType, uint32_t cResourceType) 2368 2368 { 2369 2369 for (uint32_t i = 0; i < pInfo->cDclResource; ++i) 2370 2370 { 2371 SVGA3dResourceType const resourceType = i < cResourceType ? paResourceType[i] : SVGA3D_RESOURCE_TEXTURE2D;2372 AssertContinue(resourceType < SVGA3D_RESOURCE_TYPE_MAX);2371 VGPU10_RESOURCE_DIMENSION const resourceType = i < cResourceType ? paResourceType[i] : VGPU10_RESOURCE_DIMENSION_TEXTURE2D; 2372 AssertContinue(resourceType <= VGPU10_RESOURCE_DIMENSION_TEXTURECUBEARRAY); 2373 2373 2374 2374 uint32_t const offToken = pInfo->aOffDclResource[i]; … … 2376 2376 uint32_t *paToken = (uint32_t *)((uintptr_t)pInfo->pvBytecode + offToken); 2377 2377 2378 uint8_t resourceDimension;2379 uint32_t returnType;2380 switch (resourceType)2381 {2382 case SVGA3D_RESOURCE_BUFFER:2383 resourceDimension = VGPU10_RESOURCE_DIMENSION_BUFFER;2384 returnType = 0x5555; /* float */2385 break;2386 case SVGA3D_RESOURCE_TEXTURE1D:2387 resourceDimension = VGPU10_RESOURCE_DIMENSION_TEXTURE1D;2388 returnType = 0x5555; /* float */2389 break;2390 default:2391 case SVGA3D_RESOURCE_TEXTURE2D:2392 resourceDimension = VGPU10_RESOURCE_DIMENSION_TEXTURE2D;2393 returnType = 0x5555; /* float */2394 break;2395 case SVGA3D_RESOURCE_TEXTURE3D:2396 resourceDimension = VGPU10_RESOURCE_DIMENSION_TEXTURE3D;2397 returnType = 0x5555; /* float */2398 break;2399 case SVGA3D_RESOURCE_TEXTURECUBE:2400 resourceDimension = VGPU10_RESOURCE_DIMENSION_TEXTURECUBE;2401 returnType = 0x5555; /* float */2402 break;2403 case SVGA3D_RESOURCE_BUFFEREX:2404 resourceDimension = VGPU10_RESOURCE_DIMENSION_BUFFER;2405 returnType = 0x5555; /* float */2406 break;2407 }2408 2409 2378 VGPU10OpcodeToken0 *pOpcode = (VGPU10OpcodeToken0 *)&paToken[0]; 2410 pOpcode->resourceDimension = resource Dimension;2379 pOpcode->resourceDimension = resourceType; 2411 2380 // paToken[1] unmodified 2412 2381 // paToken[2] unmodified 2413 paToken[3] = returnType;2382 paToken[3] = 0x5555; /* float */; 2414 2383 } 2415 2384
Note:
See TracChangeset
for help on using the changeset viewer.