diff options
author | Neil Roberts <[email protected]> | 2015-02-02 17:47:23 +0000 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2015-02-27 23:12:15 +0000 |
commit | 7c448551eb246c2f5eb836e372f131dd2dd147ba (patch) | |
tree | 735d99832677c09156096f5e2cf431d5e363e7f7 | |
parent | 3e54be2e8ad2918a3371f2a33b6c18271b46020b (diff) |
i965/skl: Implement WaDisable1DDepthStencil
Skylake+ doesn't support setting a depth buffer to a 1D surface but it
does allow pretending it's a 2D texture with a height of 1 instead.
This fixes the GL_DEPTH_COMPONENT_* tests of the copyteximage piglit
test (and also seems to avoid a subsequent GPU hang).
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89037
Reviewed-by: Kenneth Graunke <[email protected]>
(cherry picked from commit 5b29b2922afe2b8167a589fc2896a071fc85b693)
Nominated-by: Ian Romanick <[email protected]>
-rw-r--r-- | src/mesa/drivers/dri/i965/gen8_depth_state.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/gen8_depth_state.c b/src/mesa/drivers/dri/i965/gen8_depth_state.c index e428089dd2e..b4eb6e143a5 100644 --- a/src/mesa/drivers/dri/i965/gen8_depth_state.c +++ b/src/mesa/drivers/dri/i965/gen8_depth_state.c @@ -190,6 +190,18 @@ gen8_emit_depth_stencil_hiz(struct brw_context *brw, case GL_TEXTURE_3D: assert(mt); depth = MAX2(mt->logical_depth0, 1); + surftype = translate_tex_target(gl_target); + break; + case GL_TEXTURE_1D_ARRAY: + case GL_TEXTURE_1D: + if (brw->gen >= 9) { + /* WaDisable1DDepthStencil. Skylake+ doesn't support 1D depth + * textures but it does allow pretending it's a 2D texture + * instead. + */ + surftype = BRW_SURFACE_2D; + break; + } /* fallthrough */ default: surftype = translate_tex_target(gl_target); |