VirtualBox

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


Ignore:
Timestamp:
Aug 2, 2024 12:53:54 PM (9 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
164247
Message:

Devices/Graphics,WDDM: Implemented DEFINE_RASTERIZER_STATE_V2

Location:
trunk/src/VBox/Devices/Graphics
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Graphics/DevVGA-SVGA-cmd.cpp

    r105182 r105575  
    297297        SVGA_CASE_ID2STR(SVGA_3D_CMD_SURFACE_STRETCHBLT_NON_MS_TO_MS);
    298298        SVGA_CASE_ID2STR(SVGA_3D_CMD_DX_BIND_SHADER_IFACE);
     299        SVGA_CASE_ID2STR(SVGA_3D_CMD_DX_DEFINE_RASTERIZER_STATE_V2);
    299300        SVGA_CASE_ID2STR(SVGA_3D_CMD_MAX);
    300301        SVGA_CASE_ID2STR(SVGA_3D_CMD_FUTURE_MAX);
     
    31223123    //DEBUG_BREAKPOINT_TEST();
    31233124    RT_NOREF(cbCmd);
     3125    SVGA3dCmdDXDefineRasterizerState_v2 cmd;
     3126    cmd.rasterizerId          = pCmd->rasterizerId;
     3127    cmd.fillMode              = pCmd->fillMode;
     3128    cmd.cullMode              = pCmd->cullMode;
     3129    cmd.frontCounterClockwise = pCmd->frontCounterClockwise;
     3130    cmd.provokingVertexLast   = pCmd->provokingVertexLast;
     3131    cmd.depthBias             = pCmd->depthBias;
     3132    cmd.depthBiasClamp        = pCmd->depthBiasClamp;
     3133    cmd.slopeScaledDepthBias  = pCmd->slopeScaledDepthBias;
     3134    cmd.depthClipEnable       = pCmd->depthClipEnable;
     3135    cmd.scissorEnable         = pCmd->scissorEnable;
     3136    cmd.multisampleEnable     = pCmd->multisampleEnable;
     3137    cmd.antialiasedLineEnable = pCmd->antialiasedLineEnable;
     3138    cmd.lineWidth             = pCmd->lineWidth;
     3139    cmd.lineStippleEnable     = pCmd->lineStippleEnable;
     3140    cmd.lineStippleFactor     = pCmd->lineStippleFactor;
     3141    cmd.lineStipplePattern    = pCmd->lineStipplePattern;
     3142    cmd.forcedSampleCount     = 0;
     3143    return vmsvga3dDXDefineRasterizerState(pThisCC, idDXContext, &cmd);
     3144#else
     3145    RT_NOREF(pThisCC, idDXContext, pCmd, cbCmd);
     3146    return VERR_NOT_SUPPORTED;
     3147#endif
     3148}
     3149
     3150
     3151/* SVGA_3D_CMD_DX_DEFINE_RASTERIZER_STATE_V2 1288 */
     3152static int vmsvga3dCmdDXDefineRasterizerState_v2(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDefineRasterizerState_v2 const *pCmd, uint32_t cbCmd)
     3153{
     3154#ifdef VMSVGA3D_DX
     3155    //DEBUG_BREAKPOINT_TEST();
     3156    RT_NOREF(cbCmd);
    31243157    return vmsvga3dDXDefineRasterizerState(pThisCC, idDXContext, pCmd);
    31253158#else
     
    68406873        VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd));
    68416874        rcParse = vmsvga3dCmdVBDXClearRenderTargetViewRegion(pThisCC, idDXContext, pCmd, cbCmd);
     6875        break;
     6876    }
     6877
     6878    case SVGA_3D_CMD_DX_DEFINE_RASTERIZER_STATE_V2:
     6879    {
     6880        SVGA3dCmdDXDefineRasterizerState_v2 *pCmd = (SVGA3dCmdDXDefineRasterizerState_v2 *)pvCmd;
     6881        VMSVGAFIFO_CHECK_3D_CMD_MIN_SIZE_BREAK(sizeof(*pCmd));
     6882        rcParse = vmsvga3dCmdDXDefineRasterizerState_v2(pThisCC, idDXContext, pCmd, cbCmd);
    68426883        break;
    68436884    }
  • trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-dx-dx11.cpp

    r105264 r105575  
    40574057        if (pState->pBackend->dxDevice.pVideoDevice)
    40584058            *pu32Val |= VBSVGA3D_CAP_VIDEO;
     4059        *pu32Val |= VBSVGA3D_CAP_RASTERIZER_STATE_V2;
    40594060        break;
    40604061
  • trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-dx.cpp

    r102808 r105575  
    17461746
    17471747
    1748 int vmsvga3dDXDefineRasterizerState(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDefineRasterizerState const *pCmd)
     1748int vmsvga3dDXDefineRasterizerState(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDefineRasterizerState_v2 const *pCmd)
    17491749{
    17501750    int rc;
     
    17801780    pEntry->lineStippleFactor     = pCmd->lineStippleFactor;
    17811781    pEntry->lineStipplePattern    = pCmd->lineStipplePattern;
    1782     pEntry->forcedSampleCount     = 0; /** @todo Not in pCmd. */
     1782    pEntry->forcedSampleCount     = pCmd->forcedSampleCount;
    17831783    RT_ZERO(pEntry->mustBeZero);
    17841784
  • trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d.h

    r102808 r105575  
    683683int vmsvga3dDXDefineDepthStencilState(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDefineDepthStencilState const *pCmd);
    684684int vmsvga3dDXDestroyDepthStencilState(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDestroyDepthStencilState const *pCmd);
    685 int vmsvga3dDXDefineRasterizerState(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDefineRasterizerState const *pCmd);
     685int vmsvga3dDXDefineRasterizerState(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDefineRasterizerState_v2 const *pCmd);
    686686int vmsvga3dDXDestroyRasterizerState(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDestroyRasterizerState const *pCmd);
    687687int vmsvga3dDXDefineSamplerState(PVGASTATECC pThisCC, uint32_t idDXContext, SVGA3dCmdDXDefineSamplerState const *pCmd);
  • trunk/src/VBox/Devices/Graphics/vmsvga_include/svga3d_cmd.h

    r102406 r105575  
    335335   SVGA_3D_CMD_DX_BIND_SHADER_IFACE                       = 1277,
    336336
    337    SVGA_3D_CMD_MAX                                        = 1278,
     337   SVGA_3D_CMD_DX_DEFINE_RASTERIZER_STATE_V2              = 1288,
     338
     339   SVGA_3D_CMD_MAX                                        = 1303,
    338340   SVGA_3D_CMD_FUTURE_MAX                                 = 3000
    339341
  • trunk/src/VBox/Devices/Graphics/vmsvga_include/svga3d_dx.h

    r96407 r105575  
    15791579/* SVGA_3D_CMD_DX_DEFINE_RASTERIZER_STATE */
    15801580
     1581typedef struct SVGA3dCmdDXDefineRasterizerState_v2 {
     1582    SVGA3dRasterizerStateId rasterizerId;
     1583
     1584    uint8 fillMode;
     1585    SVGA3dCullMode cullMode;
     1586    uint8 frontCounterClockwise;
     1587    uint8 provokingVertexLast;
     1588    int32 depthBias;
     1589    float depthBiasClamp;
     1590    float slopeScaledDepthBias;
     1591    uint8 depthClipEnable;
     1592    uint8 scissorEnable;
     1593    SVGA3dMultisampleRastEnable multisampleEnable;
     1594    uint8 antialiasedLineEnable;
     1595    float lineWidth;
     1596    uint8 lineStippleEnable;
     1597    uint8 lineStippleFactor;
     1598    uint16 lineStipplePattern;
     1599    uint32 forcedSampleCount;
     1600} SVGA3dCmdDXDefineRasterizerState_v2;
     1601
    15811602typedef
    15821603#include "vmware_pack_begin.h"
  • trunk/src/VBox/Devices/Graphics/vmsvga_include/vbsvga3d_dx.h

    r102504 r105575  
    3434/* Video decoding/processing and ClearView commands. */
    3535#define VBSVGA3D_CAP_VIDEO 0x00000002
     36/* The host supports SVGA_3D_CMD_DX_DEFINE_RASTERIZER_STATE_V2 command. */
     37#define VBSVGA3D_CAP_RASTERIZER_STATE_V2 0x00000004
    3638
    3739/* Arbitrary limits. Allows to use constant size structures.
Note: See TracChangeset for help on using the changeset viewer.

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