anv/cmd_buffer: Mask stencil reference values

This commit is contained in:
Jason Ekstrand
2016-03-04 12:22:32 -08:00
parent d61dcec64d
commit f374765ce6
2 changed files with 6 additions and 6 deletions

View File

@@ -561,8 +561,8 @@ genX(cmd_buffer_flush_state)(struct anv_cmd_buffer *cmd_buffer)
.BlendConstantColorGreen = cmd_buffer->state.dynamic.blend_constants[1], .BlendConstantColorGreen = cmd_buffer->state.dynamic.blend_constants[1],
.BlendConstantColorBlue = cmd_buffer->state.dynamic.blend_constants[2], .BlendConstantColorBlue = cmd_buffer->state.dynamic.blend_constants[2],
.BlendConstantColorAlpha = cmd_buffer->state.dynamic.blend_constants[3], .BlendConstantColorAlpha = cmd_buffer->state.dynamic.blend_constants[3],
.StencilReferenceValue = d->stencil_reference.front, .StencilReferenceValue = d->stencil_reference.front & 0xff,
.BackFaceStencilReferenceValue = d->stencil_reference.back, .BackFaceStencilReferenceValue = d->stencil_reference.back & 0xff,
}; };
GENX(COLOR_CALC_STATE_pack)(NULL, cc_state.map, &cc); GENX(COLOR_CALC_STATE_pack)(NULL, cc_state.map, &cc);
if (!cmd_buffer->device->info.has_llc) if (!cmd_buffer->device->info.has_llc)

View File

@@ -361,8 +361,8 @@ genX(cmd_buffer_flush_state)(struct anv_cmd_buffer *cmd_buffer)
.BlendConstantColorGreen = cmd_buffer->state.dynamic.blend_constants[1], .BlendConstantColorGreen = cmd_buffer->state.dynamic.blend_constants[1],
.BlendConstantColorBlue = cmd_buffer->state.dynamic.blend_constants[2], .BlendConstantColorBlue = cmd_buffer->state.dynamic.blend_constants[2],
.BlendConstantColorAlpha = cmd_buffer->state.dynamic.blend_constants[3], .BlendConstantColorAlpha = cmd_buffer->state.dynamic.blend_constants[3],
.StencilReferenceValue = d->stencil_reference.front, .StencilReferenceValue = d->stencil_reference.front & 0xff,
.BackFaceStencilReferenceValue = d->stencil_reference.back, .BackFaceStencilReferenceValue = d->stencil_reference.back & 0xff,
}; };
GENX(COLOR_CALC_STATE_pack)(NULL, cc_state.map, &cc); GENX(COLOR_CALC_STATE_pack)(NULL, cc_state.map, &cc);
@@ -437,8 +437,8 @@ genX(cmd_buffer_flush_state)(struct anv_cmd_buffer *cmd_buffer)
.BackfaceStencilTestMask = d->stencil_compare_mask.back & 0xff, .BackfaceStencilTestMask = d->stencil_compare_mask.back & 0xff,
.BackfaceStencilWriteMask = d->stencil_write_mask.back & 0xff, .BackfaceStencilWriteMask = d->stencil_write_mask.back & 0xff,
.StencilReferenceValue = d->stencil_reference.front, .StencilReferenceValue = d->stencil_reference.front & 0xff,
.BackfaceStencilReferenceValue = d->stencil_reference.back .BackfaceStencilReferenceValue = d->stencil_reference.back & 0xff,
}; };
GEN9_3DSTATE_WM_DEPTH_STENCIL_pack(NULL, dwords, &wm_depth_stencil); GEN9_3DSTATE_WM_DEPTH_STENCIL_pack(NULL, dwords, &wm_depth_stencil);