[Mesa-dev] [PATCH mesa 3/4] nv30: Do not export msaa capabable visuals on nv3x

Hans de Goede hdegoede at redhat.com
Thu Sep 3 04:25:08 PDT 2015


On nv3x we will likely end up using the cpu to do color resolving for msaa
blits. Disable msaa on these cards so that we do not end up using the cpu.

Signed-off-by: Hans de Goede <hdegoede at redhat.com>
---
 src/gallium/drivers/nouveau/nv30/nv30_screen.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/nouveau/nv30/nv30_screen.c b/src/gallium/drivers/nouveau/nv30/nv30_screen.c
index 7aad26b..69acc38 100644
--- a/src/gallium/drivers/nouveau/nv30/nv30_screen.c
+++ b/src/gallium/drivers/nouveau/nv30/nv30_screen.c
@@ -319,8 +319,16 @@ nv30_screen_is_format_supported(struct pipe_screen *pscreen,
                                 unsigned sample_count,
                                 unsigned bindings)
 {
-   if (sample_count > 4)
-      return false;
+   struct nv30_screen *screen = nv30_screen(pscreen);
+
+   if (screen->eng3d->oclass >= NV40_3D_CLASS) {
+      if (sample_count > 4)
+         return false;
+   } else {
+      if (sample_count > 0)
+         return false;
+   }
+
    if (!(0x00000017 & (1 << sample_count)))
       return false;
 
-- 
2.4.3



More information about the mesa-dev mailing list