nv50,nvc0: Stop advertising TGSI by default
authorM Henning <drawoc@darkrefraction.com>
Sun, 2 Apr 2023 05:08:12 +0000 (01:08 -0400)
committerMarge Bot <emma+marge@anholt.net>
Tue, 25 Apr 2023 03:46:34 +0000 (03:46 +0000)
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22537>

src/gallium/drivers/nouveau/nv50/nv50_screen.c
src/gallium/drivers/nouveau/nvc0/nvc0_screen.c

index a0d682a..1fa34a8 100644 (file)
@@ -379,7 +379,10 @@ nv50_screen_get_shader_param(struct pipe_screen *pscreen,
    case PIPE_SHADER_CAP_PREFERRED_IR:
       return screen->prefer_nir ? PIPE_SHADER_IR_NIR : PIPE_SHADER_IR_TGSI;
    case PIPE_SHADER_CAP_SUPPORTED_IRS:
-      return (1 << PIPE_SHADER_IR_TGSI) | (1 << PIPE_SHADER_IR_NIR);
+      if (screen->prefer_nir)
+         return 1 << PIPE_SHADER_IR_NIR;
+      else
+         return (1 << PIPE_SHADER_IR_TGSI) | (1 << PIPE_SHADER_IR_NIR);
    case PIPE_SHADER_CAP_DROUND_SUPPORTED:
    case PIPE_SHADER_CAP_TGSI_ANY_INOUT_DECL_RANGE:
    case PIPE_SHADER_CAP_MAX_HW_ATOMIC_COUNTERS:
index 4df20f0..a5d8aa6 100644 (file)
@@ -399,8 +399,9 @@ nvc0_screen_get_shader_param(struct pipe_screen *pscreen,
    case PIPE_SHADER_CAP_PREFERRED_IR:
       return screen->prefer_nir ? PIPE_SHADER_IR_NIR : PIPE_SHADER_IR_TGSI;
    case PIPE_SHADER_CAP_SUPPORTED_IRS: {
-      uint32_t irs = 1 << PIPE_SHADER_IR_NIR |
-         ((class_3d >= GV100_3D_CLASS) ? 0 : 1 << PIPE_SHADER_IR_TGSI);
+      uint32_t irs = 1 << PIPE_SHADER_IR_NIR;
+      if (!screen->prefer_nir && class_3d < GV100_3D_CLASS)
+         irs |= 1 << PIPE_SHADER_IR_TGSI;
       if (screen->force_enable_cl)
          irs |= 1 << PIPE_SHADER_IR_NIR_SERIALIZED;
       return irs;