VirtualBox

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


Ignore:
Timestamp:
May 20, 2022 7:48:49 PM (3 years ago)
Author:
vboxsync
Message:

Devices/Graphics: shader parser: bugref:9830

File:
1 edited

Legend:

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

    r95032 r95051  
    20042004                && opcode.opcodeType == VGPU10_OPCODE_DCL_RESOURCE)
    20052005            {
    2006                 ASSERT_GUEST_STMT_BREAK(pInfo->cDclResource <= SVGA3D_DX_MAX_SRVIEWS,
    2007                                         rc = VERR_NOT_SUPPORTED);
    2008 
    2009                 pInfo->aOffDclResource[pInfo->cDclResource++] = offOpcode;
     2006                if (   opcode.cOperand == 1
     2007                    && opcode.aValOperand[0].indexDimension == VGPU10_OPERAND_INDEX_1D
     2008                    && opcode.aValOperand[0].aOperandIndex[0].indexRepresentation == VGPU10_OPERAND_INDEX_IMMEDIATE32)
     2009                {
     2010                    uint32_t const indexResource = opcode.aValOperand[0].aOperandIndex[0].iOperandImmediate;
     2011                    if (indexResource < SVGA3D_DX_MAX_SRVIEWS)
     2012                    {
     2013                        ASSERT_GUEST(pInfo->aOffDclResource[indexResource] == 0);
     2014                        pInfo->aOffDclResource[indexResource] = offOpcode;
     2015                        pInfo->cDclResource = RT_MAX(pInfo->cDclResource, indexResource + 1);
     2016                    }
     2017                    else
     2018                        ASSERT_GUEST_FAILED();
     2019                }
     2020                else
     2021                    ASSERT_GUEST_FAILED();
    20102022            }
    20112023
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