summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga
diff options
context:
space:
mode:
authorCharmaine Lee <[email protected]>2018-09-13 13:14:39 -0700
committerBrian Paul <[email protected]>2018-09-20 13:20:10 -0600
commit64731e7c5e4bdd23e6b3fd23d3611b3c766301c7 (patch)
tree1382c2475ef25c5945c601c61c33aac01b397024 /src/gallium/drivers/svga
parent7f4e6f4c9735e69d6c3b75cace3dd2ae1228dcff (diff)
svga: fix uninitialized fields in DefineDepthStencilView/DefineStreamOutput
This patch fixes uninitialized fields in DefineDepthStencilView and DefineStreamOutput commands that are not relevant in SM4 device. Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/drivers/svga')
-rw-r--r--src/gallium/drivers/svga/svga_cmd_vgpu10.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/drivers/svga/svga_cmd_vgpu10.c b/src/gallium/drivers/svga/svga_cmd_vgpu10.c
index c1e471e0f49..1ca050ecb7a 100644
--- a/src/gallium/drivers/svga/svga_cmd_vgpu10.c
+++ b/src/gallium/drivers/svga/svga_cmd_vgpu10.c
@@ -222,6 +222,7 @@ SVGA3D_vgpu10_SetViewports(struct svga_winsys_context *swc,
{
SVGA3D_CREATE_CMD_COUNT(SetViewports, SET_VIEWPORTS, SVGA3dViewport);
+ cmd->pad0 = 0;
memcpy(cmd + 1, viewports, count * sizeof(SVGA3dViewport));
swc->commit(swc);
@@ -508,6 +509,7 @@ SVGA3D_vgpu10_SetScissorRects(struct svga_winsys_context *swc,
if (!cmd)
return PIPE_ERROR_OUT_OF_MEMORY;
+ cmd->pad0 = 0;
memcpy(cmd + 1, rects, count * sizeof(SVGASignedRect));
swc->commit(swc);
@@ -602,6 +604,7 @@ SVGA3D_vgpu10_DrawAuto(struct svga_winsys_context *swc)
{
SVGA3D_CREATE_COMMAND(DrawAuto, DRAW_AUTO);
+ cmd->pad0 = 0;
swc->hints |= SVGA_HINT_FLAG_CAN_PRE_FLUSH;
swc->commit(swc);
swc->num_draw_commands++;
@@ -819,6 +822,9 @@ SVGA3D_vgpu10_DefineDepthStencilView(struct svga_winsys_context *swc,
cmd->mipSlice = desc->tex.mipSlice;
cmd->firstArraySlice = desc->tex.firstArraySlice;
cmd->arraySize = desc->tex.arraySize;
+ cmd->flags = 0;
+ cmd->pad0 = 0;
+ cmd->pad1 = 0;
surface_to_resourceid(swc, surface,
&cmd->sid,
@@ -1031,6 +1037,8 @@ SVGA3D_vgpu10_DefineSamplerState(struct svga_winsys_context *swc,
SVGA3D_COPY_BASIC_5(maxAnisotropy, comparisonFunc,
borderColor, minLOD,
maxLOD);
+ cmd->pad0 = 0;
+ cmd->pad1 = 0;
swc->commit(swc);
return PIPE_OK;
@@ -1124,6 +1132,7 @@ SVGA3D_vgpu10_DefineStreamOutput(struct svga_winsys_context *swc,
sizeof(SVGA3dStreamOutputDeclarationEntry)
* SVGA3D_MAX_STREAMOUT_DECLS);
+ cmd->rasterizedStream = 0;
swc->commit(swc);
return PIPE_OK;
}