From 2f1c7fae9e476fe3914749b33964bc66a9f48f92 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Mon, 22 Jul 2019 16:18:40 -0700 Subject: [PATCH] iris: Stop advertising MSAA storage images by mistake 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/iris/iris_formats.c b/src/gallium/drivers/iris/iris_formats.c index d3c9239793a..d5358e43fe1 100644 --- a/src/gallium/drivers/iris/iris_formats.c +++ b/src/gallium/drivers/iris/iris_formats.c @@ -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) && -- 2.30.2