diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_mipmap_tree.h | 12 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c index 5fe6e477436..d4f6c34c7e9 100644 --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c @@ -534,6 +534,7 @@ intel_miptree_create_layout(struct brw_context *brw, intel_miptree_release(&mt); return NULL; } + mt->stencil_mt->r8stencil_needs_update = true; /* Fix up the Z miptree format for how we're splitting out separate * stencil. Gen7 expects there to be no stencil bits in its depth buffer. @@ -997,6 +998,7 @@ intel_miptree_release(struct intel_mipmap_tree **mt) drm_intel_bo_unreference((*mt)->bo); intel_miptree_release(&(*mt)->stencil_mt); + intel_miptree_release(&(*mt)->r8stencil_mt); if ((*mt)->hiz_buf) { if ((*mt)->hiz_buf->mt) intel_miptree_release(&(*mt)->hiz_buf->mt); diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h index a49da8cb33c..44731261216 100644 --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.h +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.h @@ -615,6 +615,18 @@ struct intel_mipmap_tree struct intel_mipmap_tree *stencil_mt; /** + * \brief Stencil texturing miptree for sampling from a stencil texture + * + * Some hardware doesn't support sampling from the stencil texture as + * required by the GL_ARB_stencil_texturing extenion. To workaround this we + * blit the texture into a new texture that can be sampled. + * + * \see intel_update_r8stencil() + */ + struct intel_mipmap_tree *r8stencil_mt; + bool r8stencil_needs_update; + + /** * \brief MCS miptree. * * This miptree contains the "multisample control surface", which stores |