iris: Fix imageBuffer and PBO download.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 1 May 2019 18:16:13 +0000 (11:16 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 1 May 2019 21:37:46 +0000 (14:37 -0700)
Recently we added checks to try and deny multisampled shader images.
Unfortunately, this messed up imageBuffers, which have sample_count = 0,
which are also used in PBO download, causing us hit CPU map fallbacks.

Fixes: b15f5cfd20c iris: Do not advertise multisampled image load/store.
Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
src/gallium/drivers/iris/iris_formats.c

index 1c32f1a6aa1f9e8872ff8766ad252eff51189217..87bbcbd4069d6e5e8a3dc59637468bf1c3836cdd 100644 (file)
@@ -455,9 +455,9 @@ iris_is_format_supported(struct pipe_screen *pscreen,
 
    if (usage & PIPE_BIND_SHADER_IMAGE) {
       /* Dataport doesn't support compression, and we can't resolve an MCS
-       * compressed surface.
+       * compressed surface.  (Buffer images may have sample count of 0.)
        */
-      supported &= sample_count == 1;
+      supported &= sample_count <= 1;
 
       // XXX: allow untyped reads
       supported &= isl_format_supports_typed_reads(devinfo, format) &&