From 457f21aa91c27b04b921dd2d49c3db4365ac68cc Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Tue, 22 Jun 2021 05:20:23 +1000 Subject: [PATCH] crocus/gen8: add depth stencil state support Part-of: --- src/gallium/drivers/crocus/crocus_state.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/crocus/crocus_state.c b/src/gallium/drivers/crocus/crocus_state.c index 107e307..3cb226f 100644 --- a/src/gallium/drivers/crocus/crocus_state.c +++ b/src/gallium/drivers/crocus/crocus_state.c @@ -5698,7 +5698,9 @@ emit_push_constant_packets(struct crocus_context *ice, #endif -#if GFX_VER >= 6 +#if GFX_VER == 8 +typedef struct GENX(3DSTATE_WM_DEPTH_STENCIL) DEPTH_STENCIL_GENXML; +#elif GFX_VER >= 6 typedef struct GENX(DEPTH_STENCIL_STATE) DEPTH_STENCIL_GENXML; #else typedef struct GENX(COLOR_CALC_STATE) DEPTH_STENCIL_GENXML; @@ -7196,6 +7198,12 @@ crocus_upload_dirty_render_state(struct crocus_context *ice, #if GFX_VER >= 6 if (dirty & CROCUS_DIRTY_GEN6_WM_DEPTH_STENCIL) { + +#if GFX_VER >= 8 + crocus_emit_cmd(batch, GENX(3DSTATE_WM_DEPTH_STENCIL), wmds) { + set_depth_stencil_bits(ice, &wmds); + } +#else uint32_t ds_offset; void *ds_map = stream_state(batch, sizeof(uint32_t) * GENX(DEPTH_STENCIL_STATE_length), @@ -7214,6 +7222,7 @@ crocus_upload_dirty_render_state(struct crocus_context *ice, ptr.PointertoDEPTH_STENCIL_STATE = ds_offset; } #endif +#endif } if (dirty & CROCUS_DIRTY_GEN6_SCISSOR_RECT) { -- 2.7.4