VirtualBox

Changeset 105575 in vbox for trunk/src/VBox/Additions


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

Devices/Graphics,WDDM: Implemented DEFINE_RASTERIZER_STATE_V2

Location:
trunk/src/VBox/Additions/WINNT/Graphics/Video
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/dx/VBoxDX.cpp

    r103574 r105575  
    11951195    uint8 lineStippleFactor     = 0; /** @todo */
    11961196    uint16 lineStipplePattern   = 0; /** @todo */
    1197     /** @todo uint32 forcedSampleCount = p->ForcedSampleCount; SVGA3dCmdDXDefineRasterizerState_v2 */
    1198 
    1199     vgpu10DefineRasterizerState(pDevice,
    1200                                 pRasterizerState->uRasterizerId,
    1201                                 fillMode,
    1202                                 cullMode,
    1203                                 frontCounterClockwise,
    1204                                 provokingVertexLast,
    1205                                 depthBias,
    1206                                 depthBiasClamp,
    1207                                 slopeScaledDepthBias,
    1208                                 depthClipEnable,
    1209                                 scissorEnable,
    1210                                 multisampleEnable,
    1211                                 antialiasedLineEnable,
    1212                                 lineWidth,
    1213                                 lineStippleEnable,
    1214                                 lineStippleFactor,
    1215                                 lineStipplePattern);
     1197    uint32 forcedSampleCount    = p->ForcedSampleCount;
     1198
     1199    if (pDevice->pAdapter->fVBoxCaps & VBSVGA3D_CAP_RASTERIZER_STATE_V2)
     1200    {
     1201        vgpu10DefineRasterizerState_v2(pDevice,
     1202                                       pRasterizerState->uRasterizerId,
     1203                                       fillMode,
     1204                                       cullMode,
     1205                                       frontCounterClockwise,
     1206                                       provokingVertexLast,
     1207                                       depthBias,
     1208                                       depthBiasClamp,
     1209                                       slopeScaledDepthBias,
     1210                                       depthClipEnable,
     1211                                       scissorEnable,
     1212                                       multisampleEnable,
     1213                                       antialiasedLineEnable,
     1214                                       lineWidth,
     1215                                       lineStippleEnable,
     1216                                       lineStippleFactor,
     1217                                       lineStipplePattern,
     1218                                       forcedSampleCount);
     1219    }
     1220    else
     1221    {
     1222        vgpu10DefineRasterizerState(pDevice,
     1223                                    pRasterizerState->uRasterizerId,
     1224                                    fillMode,
     1225                                    cullMode,
     1226                                    frontCounterClockwise,
     1227                                    provokingVertexLast,
     1228                                    depthBias,
     1229                                    depthBiasClamp,
     1230                                    slopeScaledDepthBias,
     1231                                    depthClipEnable,
     1232                                    scissorEnable,
     1233                                    multisampleEnable,
     1234                                    antialiasedLineEnable,
     1235                                    lineWidth,
     1236                                    lineStippleEnable,
     1237                                    lineStippleFactor,
     1238                                    lineStipplePattern);
     1239    }
    12161240}
    12171241
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/dx/VBoxDXCmd.cpp

    r105566 r105575  
    192192
    193193
     194int vgpu10DefineRasterizerState_v2(PVBOXDX_DEVICE pDevice,
     195                                   SVGA3dRasterizerStateId rasterizerId,
     196                                   uint8 fillMode,
     197                                   SVGA3dCullMode cullMode,
     198                                   uint8 frontCounterClockwise,
     199                                   uint8 provokingVertexLast,
     200                                   int32 depthBias,
     201                                   float depthBiasClamp,
     202                                   float slopeScaledDepthBias,
     203                                   uint8 depthClipEnable,
     204                                   uint8 scissorEnable,
     205                                   SVGA3dMultisampleRastEnable multisampleEnable,
     206                                   uint8 antialiasedLineEnable,
     207                                   float lineWidth,
     208                                   uint8 lineStippleEnable,
     209                                   uint8 lineStippleFactor,
     210                                   uint16 lineStipplePattern,
     211                                   uint32 forcedSampleCount)
     212{
     213    void *pvCmd = vboxDXCommandBufferReserve(pDevice, SVGA_3D_CMD_DX_DEFINE_RASTERIZER_STATE_V2,
     214                                             sizeof(SVGA3dCmdDXDefineRasterizerState_v2));
     215    if (!pvCmd)
     216        return VERR_NO_MEMORY;
     217
     218    SVGA3dCmdDXDefineRasterizerState_v2 *cmd = (SVGA3dCmdDXDefineRasterizerState_v2 *)pvCmd;
     219    SET_CMD_FIELD(rasterizerId);
     220    SET_CMD_FIELD(fillMode);
     221    SET_CMD_FIELD(cullMode);
     222    SET_CMD_FIELD(frontCounterClockwise);
     223    SET_CMD_FIELD(provokingVertexLast);
     224    SET_CMD_FIELD(depthBias);
     225    SET_CMD_FIELD(depthBiasClamp);
     226    SET_CMD_FIELD(slopeScaledDepthBias);
     227    SET_CMD_FIELD(depthClipEnable);
     228    SET_CMD_FIELD(scissorEnable);
     229    SET_CMD_FIELD(multisampleEnable);
     230    SET_CMD_FIELD(antialiasedLineEnable);
     231    SET_CMD_FIELD(lineWidth);
     232    SET_CMD_FIELD(lineStippleEnable);
     233    SET_CMD_FIELD(lineStippleFactor);
     234    SET_CMD_FIELD(lineStipplePattern);
     235    SET_CMD_FIELD(forcedSampleCount);
     236
     237    vboxDXCommandBufferCommit(pDevice);
     238    return VINF_SUCCESS;
     239}
     240
     241
    194242int vgpu10DestroyRasterizerState(PVBOXDX_DEVICE pDevice,
    195243                                 SVGA3dRasterizerStateId rasterizerId)
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/dx/VBoxDXCmd.h

    r102809 r105575  
    7676                                uint8 lineStippleFactor,
    7777                                uint16 lineStipplePattern);
     78int vgpu10DefineRasterizerState_v2(PVBOXDX_DEVICE pDevice,
     79                                   SVGA3dRasterizerStateId rasterizerId,
     80                                   uint8 fillMode,
     81                                   SVGA3dCullMode cullMode,
     82                                   uint8 frontCounterClockwise,
     83                                   uint8 provokingVertexLast,
     84                                   int32 depthBias,
     85                                   float depthBiasClamp,
     86                                   float slopeScaledDepthBias,
     87                                   uint8 depthClipEnable,
     88                                   uint8 scissorEnable,
     89                                   SVGA3dMultisampleRastEnable multisampleEnable,
     90                                   uint8 antialiasedLineEnable,
     91                                   float lineWidth,
     92                                   uint8 lineStippleEnable,
     93                                   uint8 lineStippleFactor,
     94                                   uint16 lineStipplePattern,
     95                                   uint32 forcedSampleCount);
    7896int vgpu10DestroyRasterizerState(PVBOXDX_DEVICE pDevice,
    7997                                 SVGA3dRasterizerStateId rasterizerId);
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/gallium/SvgaRender.cpp

    r102407 r105575  
    12361236{
    12371237    SVGA3dCmdDXDefineRasterizerState *pCmd = (SVGA3dCmdDXDefineRasterizerState *)&pHeader[1];
     1238    DEBUG_VERIFYCMD_RETURN();
     1239    return SvgaCOTNotifyId(pSvga, pSvgaContext, SVGA_COTABLE_RASTERIZERSTATE, pCmd->rasterizerId);
     1240}
     1241
     1242
     1243/* SVGA_3D_CMD_DX_DEFINE_RASTERIZER_STATE_V2 1288 */
     1244static NTSTATUS procCmdDXDefineRasterizerState_v2(PVBOXWDDM_EXT_VMSVGA pSvga, PVMSVGACONTEXT pSvgaContext, SVGA3dCmdHeader *pHeader)
     1245{
     1246    SVGA3dCmdDXDefineRasterizerState_v2 *pCmd = (SVGA3dCmdDXDefineRasterizerState_v2 *)&pHeader[1];
    12381247    DEBUG_VERIFYCMD_RETURN();
    12391248    return SvgaCOTNotifyId(pSvga, pSvgaContext, SVGA_COTABLE_RASTERIZERSTATE, pCmd->rasterizerId);
     
    21982207    { procCmdSurfaceStretchBltNonMSToMS },          // SVGA_3D_CMD_SURFACE_STRETCHBLT_NON_MS_TO_MS
    21992208    { procCmdDXBindShaderIface },                   // SVGA_3D_CMD_DX_BIND_SHADER_IFACE
     2209    { procCmdInvalid },                             // SVGA_3D_CMD_UPDATE_GB_SCREENTARGET_MOVE = 1278,
     2210    { procCmdInvalid },                             // 1279,
     2211    { procCmdInvalid },                             // 1280,
     2212    { procCmdInvalid },                             // SVGA_3D_CMD_DX_PRED_STAGING_COPY = 1281,
     2213    { procCmdInvalid },                             // SVGA_3D_CMD_DX_STAGING_COPY = 1282,
     2214    { procCmdInvalid },                             // SVGA_3D_CMD_DX_PRED_STAGING_COPY_REGION = 1283,
     2215    { procCmdInvalid },                             // SVGA_3D_CMD_DX_SET_VERTEX_BUFFERS_V2 = 1284,
     2216    { procCmdInvalid },                             // SVGA_3D_CMD_DX_SET_INDEX_BUFFER_V2 = 1285,
     2217    { procCmdInvalid },                             // SVGA_3D_CMD_DX_SET_VERTEX_BUFFERS_OFFSET_AND_SIZE = 1286,
     2218    { procCmdInvalid },                             // SVGA_3D_CMD_DX_SET_INDEX_BUFFER_OFFSET_AND_SIZE = 1287,
     2219    { procCmdDXDefineRasterizerState_v2 },          // SVGA_3D_CMD_DX_DEFINE_RASTERIZER_STATE_V2
     2220    { procCmdInvalid },                             // SVGA_3D_CMD_DX_PRED_STAGING_CONVERT_REGION = 1289,
     2221    { procCmdInvalid },                             // SVGA_3D_CMD_DX_PRED_STAGING_CONVERT = 1290,
     2222    { procCmdInvalid },                             // SVGA_3D_CMD_DX_STAGING_BUFFER_COPY = 1291,
     2223    { procCmdInvalid },                             // 1292,
     2224    { procCmdInvalid },                             // 1293,
     2225    { procCmdInvalid },                             // 1294,
     2226    { procCmdInvalid },                             // 1295,
     2227    { procCmdInvalid },                             // 1296,
     2228    { procCmdInvalid },                             // 1297,
     2229    { procCmdInvalid },                             // 1298,
     2230    { procCmdInvalid },                             // 1299,
     2231    { procCmdInvalid },                             // 1300,
     2232    { procCmdInvalid },                             // 1301,
     2233    { procCmdInvalid },                             // 1302,
    22002234
    22012235    /* VirtualBox commands */
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