radeon: Don't check DCC on pipe buffers
authorJan Vesely <jan.vesely@rutgers.edu>
Tue, 13 Sep 2016 00:47:37 +0000 (20:47 -0400)
committerJan Vesely <jan.vesely@rutgers.edu>
Tue, 13 Sep 2016 18:23:26 +0000 (14:23 -0400)
Fixes segfaults in EG compute since:
commit 21de3be8e62b2b093569a99550e6356ed2f106b4
radeonsi: fix texture format reinterpretation with DCC

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeon/r600_texture.c

index 41fd94b24379757c072d6847617e692f8d601f05..d3a498fb35d9c3841b5b9b473c57d35823e01aa2 100644 (file)
@@ -1788,9 +1788,10 @@ struct pipe_surface *r600_create_surface_custom(struct pipe_context *pipe,
        surface->base.u = templ->u;
        surface->level_info = &rtex->surface.level[templ->u.tex.level];
 
-       vi_dcc_disable_if_incompatible_format(rctx, texture,
-                                             templ->u.tex.level,
-                                             templ->format);
+       if (texture->target != PIPE_BUFFER)
+               vi_dcc_disable_if_incompatible_format(rctx, texture,
+                                                     templ->u.tex.level,
+                                                     templ->format);
 
        return &surface->base;
 }