Module: Mesa
Branch: master
Commit: 3d5f61a262b78de9a800872553955314995e42fd
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=3d5f61a262b78de9a800872553955314995e42fd

Author: Samuel Pitoiset <samuel.pitoi...@gmail.com>
Date:   Sun Feb 14 00:32:34 2016 +0100

nvc0: enable compute support on GK110:GM200 with an envvar

Without this NVF0_COMPUTE environment variable, compute support is
initialized by default and this is not what we want for now because
it might break 3D. It will be enabled by default once we are sure it
won't break anything.

Please note that compute support on GM200+ is not enabled yet because
it needs to be double-checked.

Signed-off-by: Samuel Pitoiset <samuel.pitoi...@gmail.com>
Reviewed-by: Ilia Mirkin <imir...@alum.mit.edu>

---

 src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c 
b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
index 9413d35..e1fe02f 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
@@ -197,6 +197,8 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum 
pipe_cap param)
    case PIPE_CAP_SEAMLESS_CUBE_MAP_PER_TEXTURE:
       return (class_3d >= NVE4_3D_CLASS) ? 1 : 0;
    case PIPE_CAP_COMPUTE:
+      if (debug_get_bool_option("NVF0_COMPUTE", false))
+         return 1;
       return (class_3d <= NVE4_3D_CLASS) ? 1 : 0;
    case PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER:
       return nouveau_screen(pscreen)->vram_domain & NOUVEAU_BO_VRAM ? 1 : 0;
@@ -263,8 +265,9 @@ nvc0_screen_get_shader_param(struct pipe_screen *pscreen, 
unsigned shader,
          return 0;
       break;
    case PIPE_SHADER_COMPUTE:
-      if (class_3d > NVE4_3D_CLASS)
-         return 0;
+      if (!debug_get_bool_option("NVF0_COMPUTE", false))
+         if (class_3d > NVE4_3D_CLASS)
+            return 0;
       break;
    default:
       return 0;
@@ -603,6 +606,8 @@ nvc0_screen_init_compute(struct nvc0_screen *screen)
    case 0xf0:
    case 0x100:
    case 0x110:
+      if (debug_get_bool_option("NVF0_COMPUTE", false))
+         return nve4_screen_compute_setup(screen, screen->base.pushbuf);
    case 0x120:
       return 0;
    default:

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to