iris: Support storage images that have matching typed formats for reads
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 22 Jul 2019 23:53:32 +0000 (16:53 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 23 Jul 2019 00:30:13 +0000 (17:30 -0700)
Even if we don't directly support typed reads on a format, we can often
translate them to a reasonable matching format.  Advertise those too.

src/gallium/drivers/iris/iris_formats.c

index d5358e43fe162a754de6142b275fb567a13c16bd..51f8a73d1fc877d338d8cf081b5ec27cb13592af 100644 (file)
@@ -470,9 +470,8 @@ iris_is_format_supported(struct pipe_screen *pscreen,
        */
       supported &= sample_count == 0;
 
-      /* TODO: allow formats that only support untyped reads? */
-      supported &= isl_format_supports_typed_reads(devinfo, format) &&
-                   isl_format_supports_typed_writes(devinfo, format);
+      supported &= isl_format_supports_typed_writes(devinfo, format);
+      supported &= isl_has_matching_typed_storage_image_format(devinfo, format);
    }
 
    if (usage & PIPE_BIND_SAMPLER_VIEW) {