VirtualBox

Changeset 102713 in vbox for trunk/src/VBox/Devices/Graphics


Ignore:
Timestamp:
Dec 27, 2023 12:27:48 PM (11 months ago)
Author:
vboxsync
Message:

Devices/Graphics: update shader resource decl only if the information is available.

File:
1 edited

Legend:

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

    r102617 r102713  
    29532953
    29542954        VGPU10OpcodeToken0 *pOpcode = (VGPU10OpcodeToken0 *)&paToken[0];
    2955         pOpcode->resourceDimension = resourceDimension;
     2955        if (resourceDimension != VGPU10_RESOURCE_DIMENSION_UNKNOWN)
     2956            pOpcode->resourceDimension = resourceDimension;
    29562957        // paToken[1] unmodified
    29572958        // paToken[2] unmodified
    29582959        VGPU10ResourceReturnTypeToken *pReturnTypeToken = (VGPU10ResourceReturnTypeToken *)&paToken[3];
    2959         pReturnTypeToken->component0 = (uint8_t)resourceReturnType;
    2960         pReturnTypeToken->component1 = (uint8_t)resourceReturnType;
    2961         pReturnTypeToken->component2 = (uint8_t)resourceReturnType;
    2962         pReturnTypeToken->component3 = (uint8_t)resourceReturnType;
     2960        if ((uint8_t)resourceReturnType != 0)
     2961        {
     2962            pReturnTypeToken->component0 = (uint8_t)resourceReturnType;
     2963            pReturnTypeToken->component1 = (uint8_t)resourceReturnType;
     2964            pReturnTypeToken->component2 = (uint8_t)resourceReturnType;
     2965            pReturnTypeToken->component3 = (uint8_t)resourceReturnType;
     2966        }
    29632967    }
    29642968
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