VirtualBox

Ignore:
Timestamp:
Mar 15, 2022 8:47:10 AM (3 years ago)
Author:
vboxsync
Message:

Devices/Graphics: texture arrays: bugref:9830

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-dx-shader.cpp

    r94146 r94232  
    23652365}
    23662366
    2367 int DXShaderUpdateResourceTypes(DXShaderInfo const *pInfo, SVGA3dResourceType *paResourceType, uint32_t cResourceType)
     2367int DXShaderUpdateResourceTypes(DXShaderInfo const *pInfo, VGPU10_RESOURCE_DIMENSION *paResourceType, uint32_t cResourceType)
    23682368{
    23692369    for (uint32_t i = 0; i < pInfo->cDclResource; ++i)
    23702370    {
    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);
    23732373
    23742374        uint32_t const offToken = pInfo->aOffDclResource[i];
     
    23762376        uint32_t *paToken = (uint32_t *)((uintptr_t)pInfo->pvBytecode + offToken);
    23772377
    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 
    24092378        VGPU10OpcodeToken0 *pOpcode = (VGPU10OpcodeToken0 *)&paToken[0];
    2410         pOpcode->resourceDimension = resourceDimension;
     2379        pOpcode->resourceDimension = resourceType;
    24112380        // paToken[1] unmodified
    24122381        // paToken[2] unmodified
    2413         paToken[3] = returnType;
     2382        paToken[3] = 0x5555; /* float */;
    24142383    }
    24152384
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette