[Mesa-dev] [PATCH 12/16] i965/gen7: Use R8_UINT stencil copy when sampling the stencil texture
Ian Romanick
idr at freedesktop.org
Thu Aug 25 00:40:42 UTC 2016
On 08/24/2016 04:55 PM, Jordan Justen wrote:
> Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
> ---
> src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 13 +++++++++++--
> 1 file changed, 11 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 2bafe91..28d0958 100644
> --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
> +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
> @@ -453,8 +453,17 @@ 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) {
Any reason to not do gen <= 7? With all this work in place, it ought to
be trivial for someone to enable this extension on older Gen.
> + assert(mt->r8stencil_mt && !mt->stencil_mt->r8stencil_needs_update);
> + mt = mt->r8stencil_mt;
> + } else {
> + assert(brw->gen >= 8);
> + mt = mt->stencil_mt;
> + }
> + format = BRW_SURFACEFORMAT_R8_UINT;
> + } else if (brw->gen == 7 && mt->format == MESA_FORMAT_S_UINT8) {
> + assert(!mt->r8stencil_needs_update);
> + mt = mt->r8stencil_mt;
> format = BRW_SURFACEFORMAT_R8_UINT;
> }
>
>
More information about the mesa-dev
mailing list