From d6ad9f47322d7fb959f5ef1b06a38624547033d9 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Tue, 9 Jan 2018 23:30:21 -0800 Subject: [PATCH] iris: a bit of depth still need to allocate separate stencil --- src/gallium/drivers/iris/iris_context.h | 1 + src/gallium/drivers/iris/iris_state.c | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/src/gallium/drivers/iris/iris_context.h b/src/gallium/drivers/iris/iris_context.h index 5a6ee906ab7..1af18e4bf30 100644 --- a/src/gallium/drivers/iris/iris_context.h +++ b/src/gallium/drivers/iris/iris_context.h @@ -68,6 +68,7 @@ struct iris_context { struct iris_depth_stencil_alpha_state *cso_zsa; struct iris_vertex_element_state *cso_vertex_elements; struct iris_viewport_state *cso_vp; + struct iris_depth_state *cso_depth; struct pipe_blend_color blend_color; struct pipe_poly_stipple poly_stipple; struct pipe_scissor_state scissors[IRIS_MAX_VIEWPORTS]; diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index 0147c1c78ce..79eaa699670 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -992,6 +992,13 @@ iris_set_viewport_states(struct pipe_context *ctx, ice->state.dirty |= IRIS_DIRTY_SF_CL_VIEWPORT; } +struct iris_depth_state +{ + uint32_t depth_buffer[GENX(3DSTATE_DEPTH_BUFFER_length)]; + uint32_t hier_depth_buffer[GENX(3DSTATE_HIER_DEPTH_BUFFER_length)]; + uint32_t stencil_buffer[GENX(3DSTATE_STENCIL_BUFFER_length)]; +}; + static void iris_set_framebuffer_state(struct pipe_context *ctx, const struct pipe_framebuffer_state *state) @@ -1018,6 +1025,11 @@ iris_set_framebuffer_state(struct pipe_context *ctx, pipe_surface_reference(&cso->zsbuf, state->zsbuf); + struct isl_depth_stencil_hiz_emit_info info = { + .mocs = MOCS_WB, + }; + + // XXX: depth buffers } static void -- 2.30.2