[Mesa-dev] [PATCH] svga: add more checking of sample_count in svga_is_format_supported()

Brian Paul brianp at vmware.com
Thu Jul 20 17:06:42 UTC 2017


We're not supporting 2x MSAA, for example.
---
 src/gallium/drivers/svga/svga_screen.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c
index 1ec91e5..0d8e59d 100644
--- a/src/gallium/drivers/svga/svga_screen.c
+++ b/src/gallium/drivers/svga/svga_screen.c
@@ -737,6 +737,14 @@ svga_is_format_supported( struct pipe_screen *screen,
       if ((ss->ms_samples & (1 << (sample_count - 1))) == 0) {
          return FALSE;
       }
+      if (sample_count != 4 &&
+          sample_count != 8 &&
+          sample_count != 16) {
+         /* Despite what the device supports, we don't support 2 samples,
+          * for example.  See the WGL state tracker code.
+          */
+         return FALSE;
+      }
    }
 
    svga_format = svga_translate_format(ss, format, bindings);
-- 
1.9.1



More information about the mesa-dev mailing list