radeonsi/gfx9: update can_sample_z/s flags
authorMarek Olšák <marek.olsak@amd.com>
Thu, 27 Oct 2016 18:45:15 +0000 (20:45 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Thu, 30 Mar 2017 12:44:33 +0000 (14:44 +0200)
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeon/r600_texture.c

index 129b3f422b7abcd31385d83a3d079b1b67a88a09..1838de4f4d44cd48f00dbf8080e0eee30f2fa603 100644 (file)
@@ -1131,8 +1131,13 @@ r600_texture_create_object(struct pipe_screen *screen,
                if (base->flags & (R600_RESOURCE_FLAG_TRANSFER |
                                   R600_RESOURCE_FLAG_FLUSHED_DEPTH) ||
                    rscreen->chip_class >= EVERGREEN) {
-                       rtex->can_sample_z = !rtex->surface.u.legacy.depth_adjusted;
-                       rtex->can_sample_s = !rtex->surface.u.legacy.stencil_adjusted;
+                       if (rscreen->chip_class >= GFX9) {
+                               rtex->can_sample_z = true;
+                               rtex->can_sample_s = true;
+                       } else {
+                               rtex->can_sample_z = !rtex->surface.u.legacy.depth_adjusted;
+                               rtex->can_sample_s = !rtex->surface.u.legacy.stencil_adjusted;
+                       }
                } else {
                        if (rtex->resource.b.b.nr_samples <= 1 &&
                            (rtex->resource.b.b.format == PIPE_FORMAT_Z16_UNORM ||