Mesa (master): r600: clear compressed flags in image state on unbind.

Dave Airlie airlied at kemper.freedesktop.org
Tue Dec 19 05:38:22 UTC 2017


Module: Mesa
Branch: master
Commit: a1e18e87c775f16f4d66d3bd7de286bfee19fb3a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a1e18e87c775f16f4d66d3bd7de286bfee19fb3a

Author: Dave Airlie <airlied at redhat.com>
Date:   Tue Dec 19 05:36:53 2017 +0000

r600: clear compressed flags in image state on unbind.

If we aren't binding an image, clear the compressed flags.

This fixes a segfault seen with an apitrace.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104331
Signed-off-by: Dave Airlie <airlied at redhat.com>

---

 src/gallium/drivers/r600/evergreen_state.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c
index f64d615003..0da665f634 100644
--- a/src/gallium/drivers/r600/evergreen_state.c
+++ b/src/gallium/drivers/r600/evergreen_state.c
@@ -4071,6 +4071,8 @@ static void evergreen_set_shader_images(struct pipe_context *ctx,
 		if (!images || !images[idx].resource) {
 			pipe_resource_reference((struct pipe_resource **)&rview->base.resource, NULL);
 			istate->enabled_mask &= ~(1 << i);
+			istate->compressed_colortex_mask &= ~(1 << i);
+			istate->compressed_depthtex_mask &= ~(1 << i);
 			continue;
 		}
 




More information about the mesa-commit mailing list