Mesa (master): i965/gen4: Simplify depth/stencil invalidate check
Topi Pohjolainen
tpohjola at kemper.freedesktop.org
Sun Jun 18 09:03:35 UTC 2017
Module: Mesa
Branch: master
Commit: cd0804c359175c9b0ee1a8aa64e94a5ac7876bb8
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=cd0804c359175c9b0ee1a8aa64e94a5ac7876bb8
Author: Topi Pohjolainen <topi.pohjolainen at intel.com>
Date: Fri May 19 11:04:54 2017 +0300
i965/gen4: Simplify depth/stencil invalidate check
There is no separate stencil on gen < 6.
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
---
src/mesa/drivers/dri/i965/brw_misc_state.c | 16 +++-------------
1 file changed, 3 insertions(+), 13 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_misc_state.c b/src/mesa/drivers/dri/i965/brw_misc_state.c
index 9318822380..df26cd7403 100644
--- a/src/mesa/drivers/dri/i965/brw_misc_state.c
+++ b/src/mesa/drivers/dri/i965/brw_misc_state.c
@@ -231,21 +231,11 @@ brw_workaround_depthstencil_alignment(struct brw_context *brw,
return;
/* Check if depth buffer is in depth/stencil format. If so, then it's only
- * safe to invalidate it if we're also clearing stencil, and both depth_irb
- * and stencil_irb point to the same miptree.
- *
- * Note: it's not sufficient to check for the case where
- * _mesa_get_format_base_format(depth_mt->format) == GL_DEPTH_STENCIL,
- * because this fails to catch depth/stencil buffers on hardware that uses
- * separate stencil. To catch that case, we check whether
- * depth_mt->stencil_mt is non-NULL.
+ * safe to invalidate it if we're also clearing stencil.
*/
if (depth_irb && invalidate_depth &&
- (_mesa_get_format_base_format(depth_mt->format) == GL_DEPTH_STENCIL ||
- depth_mt->stencil_mt)) {
- invalidate_depth = invalidate_stencil && depth_irb && stencil_irb
- && depth_irb->mt == stencil_irb->mt;
- }
+ _mesa_get_format_base_format(depth_mt->format) == GL_DEPTH_STENCIL)
+ invalidate_depth = invalidate_stencil && stencil_irb;
uint32_t tile_mask_x, tile_mask_y;
brw_get_depthstencil_tile_masks(depth_mt,
More information about the mesa-commit
mailing list