iris: a bit of depth
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 10 Jan 2018 07:30:21 +0000 (23:30 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Feb 2019 18:26:04 +0000 (10:26 -0800)
still need to allocate separate stencil

src/gallium/drivers/iris/iris_context.h
src/gallium/drivers/iris/iris_state.c

index 5a6ee906ab717c4b9cb80ea3d8f6c59050d0c733..1af18e4bf3035693dfef93d59ad96bec68fc5158 100644 (file)
@@ -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];
index 0147c1c78ce0069b10661d2ed892d05aeb57961d..79eaa699670cee1741cdbd0be7068149e4cdbbe3 100644 (file)
@@ -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