iris: Stop advertising MSAA storage images by mistake
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 22 Jul 2019 23:18:40 +0000 (16:18 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 23 Jul 2019 00:30:13 +0000 (17:30 -0700)
st_extensions.c sets const->MaxImageSamples (GL_MAX_IMAGE_SAMPLES) by
looping over [16, 15, .. 1x] MSAA modes, and RGBA/BGRA/ARGB/ABGR 8888
color formats, calling pipe->is_format_supported() for each, with
the usage set to PIPE_BIND_SHADER_IMAGE.  If any are supported, it
selects that number of samples.

We were checking if sample_count <= 1, which meant that we were getting
a value of 1x MSAA, rather than the expected 0x (feature doesn't exist).

But, only on Icelake because Gen11 adds support for typed read messages
for R8G8B8A8_UNORM.  The lack of typed read messages for these formats
was tricking the check on Gen9 to say no correctly.  This caused some
Icelake conformance failures, because we don't implement this feature.

Just check for sample_count == 0 instead.

src/gallium/drivers/iris/iris_formats.c

index d3c9239793a905c58c9ae3c213b58c67c28fb4aa..d5358e43fe162a754de6142b275fb567a13c16bd 100644 (file)
@@ -468,7 +468,7 @@ iris_is_format_supported(struct pipe_screen *pscreen,
       /* Dataport doesn't support compression, and we can't resolve an MCS
        * compressed surface.  (Buffer images may have sample count of 0.)
        */
-      supported &= sample_count <= 1;
+      supported &= sample_count == 0;
 
       /* TODO: allow formats that only support untyped reads? */
       supported &= isl_format_supports_typed_reads(devinfo, format) &&