[Mesa-dev] [PATCH 8/9] i965/surface_state: Use the ASTC shadow_mt if present
Nanley Chery
nanleychery at gmail.com
Wed Sep 26 23:31:10 UTC 2018
When sampling from an ASTC texture in a shader, make sure to use the
miptree which has had the gen9 void-extent workaround applied to it.
---
src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 3 +++
1 file changed, 3 insertions(+)
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 e214fae140b..cad0f7faba1 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
@@ -573,6 +573,9 @@ static void brw_update_texture_surface(struct gl_context *ctx,
assert(mt->shadow_mt && !mt->shadow_needs_update);
mt = mt->shadow_mt;
format = ISL_FORMAT_R8_UINT;
+ } else if (intel_miptree_has_astc_shadow(mt)) {
+ assert(!mt->shadow_needs_update);
+ mt = mt->shadow_mt;
}
const int surf_index = surf_offset - &brw->wm.base.surf_offset[0];
--
2.19.0
More information about the mesa-dev
mailing list