diff --git a/.pick_status.json b/.pick_status.json index 12523112662..e60e8dab072 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2317,7 +2317,7 @@ "description": "wgl: Fix depth/stencil image support when using zink kopper", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/src/gallium/frontends/wgl/stw_pixelformat.c b/src/gallium/frontends/wgl/stw_pixelformat.c index 73073e636e4..15b320b6a20 100644 --- a/src/gallium/frontends/wgl/stw_pixelformat.c +++ b/src/gallium/frontends/wgl/stw_pixelformat.c @@ -204,7 +204,8 @@ stw_pixelformat_add(struct stw_device *stw_dev, /* * since gallium frontend can allocate depth/stencil/accum buffers, we provide - * only color buffers here + * only color buffers here in the non-zink case, however in the zink case + * kopper requires that we allocate depth/stencil through the winsys */ pfi->stvis.buffer_mask = ST_ATTACHMENT_FRONT_LEFT_MASK; if (doublebuffer) @@ -213,6 +214,11 @@ stw_pixelformat_add(struct stw_device *stw_dev, pfi->stvis.color_format = color->format; pfi->stvis.depth_stencil_format = depth->format; +#ifdef GALLIUM_ZINK + if (stw_dev->zink && (depth->bits.depth > 0 || depth->bits.stencil > 0)) + pfi->stvis.buffer_mask |= ST_ATTACHMENT_DEPTH_STENCIL_MASK; +#endif + pfi->stvis.accum_format = (accum) ? PIPE_FORMAT_R16G16B16A16_SNORM : PIPE_FORMAT_NONE; diff --git a/src/gallium/frontends/wgl/stw_st.c b/src/gallium/frontends/wgl/stw_st.c index 9a8cde87df2..c5bb12205f4 100644 --- a/src/gallium/frontends/wgl/stw_st.c +++ b/src/gallium/frontends/wgl/stw_st.c @@ -227,6 +227,12 @@ stw_st_framebuffer_validate_locked(struct st_context *st, case ST_ATTACHMENT_DEPTH_STENCIL: format = stwfb->stvis.depth_stencil_format; bind = PIPE_BIND_DEPTH_STENCIL; + +#ifdef GALLIUM_ZINK + if (stw_dev->zink) + bind |= PIPE_BIND_DISPLAY_TARGET; +#endif + break; default: format = PIPE_FORMAT_NONE;