Module: Mesa Branch: master Commit: 751682434ecb0489df3945f88e565079ecbe9f31 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=751682434ecb0489df3945f88e565079ecbe9f31
Author: Jordan Justen <jordan.l.jus...@intel.com> Date: Sat Jun 11 16:41:18 2016 -0700 i965/gen7: Use R8_UINT stencil copy when sampling the stencil texture v2: * Check gen <= 7, rather than gen == 7. (Ian) Signed-off-by: Jordan Justen <jordan.l.jus...@intel.com> Reviewed-by: Ian Romanick <ian.d.roman...@intel.com> --- src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c index 023b1ff..bfd973b 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c @@ -499,8 +499,16 @@ brw_update_texture_surface(struct gl_context *ctx, } if (obj->StencilSampling && firstImage->_BaseFormat == GL_DEPTH_STENCIL) { - assert(brw->gen >= 8); - mt = mt->stencil_mt; + if (brw->gen <= 7) { + assert(mt->r8stencil_mt && !mt->stencil_mt->r8stencil_needs_update); + mt = mt->r8stencil_mt; + } else { + mt = mt->stencil_mt; + } + format = BRW_SURFACEFORMAT_R8_UINT; + } else if (brw->gen <= 7 && mt->format == MESA_FORMAT_S_UINT8) { + assert(mt->r8stencil_mt && !mt->r8stencil_needs_update); + mt = mt->r8stencil_mt; format = BRW_SURFACEFORMAT_R8_UINT; } _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-commit