Module: Mesa
Branch: staging/21.3
Commit: 54fbd9cdb5024a76440e636ace5023ef34b6fbd9
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=54fbd9cdb5024a76440e636ace5023ef34b6fbd9

Author: Emma Anholt <[email protected]>
Date:   Mon Dec 20 15:15:38 2021 -0800

i915g: Turn off FP16 in the vertex shaders.

This ended up being turned on in gallivm, but since we use nir_to_tgsi on
the VS and TGSI doesn't have FP16, we can't let that happen.

Fixes: f814a2449e2c ("llvmpipe: enable FP16 and update CL + traces piglit 
results.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14403>
(cherry picked from commit b9e8936bfb5e1ddce73140928342ab34f6a81bd9)

---

 .pick_status.json                      | 2 +-
 src/gallium/drivers/i915/i915_screen.c | 9 ++++++---
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 53d69045230..ceea7253d0b 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -427,7 +427,7 @@
         "description": "i915g: Turn off FP16 in the vertex shaders.",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "f814a2449e2c08a811a54fdada7e256945e68953"
     },
diff --git a/src/gallium/drivers/i915/i915_screen.c 
b/src/gallium/drivers/i915/i915_screen.c
index e08c6d056a9..98ae6ca54fb 100644
--- a/src/gallium/drivers/i915/i915_screen.c
+++ b/src/gallium/drivers/i915/i915_screen.c
@@ -283,7 +283,13 @@ i915_get_shader_param(struct pipe_screen *screen, enum 
pipe_shader_type shader,
        */
       return 0;
 
+   /* i915 can't do these, and even if gallivm NIR can we call nir_to_tgsi
+    * manually and TGSI can't.
+    */
    case PIPE_SHADER_CAP_INT16:
+   case PIPE_SHADER_CAP_FP16:
+   case PIPE_SHADER_CAP_FP16_DERIVATIVES:
+   case PIPE_SHADER_CAP_FP16_CONST_BUFFERS:
       return 0;
 
    case PIPE_SHADER_CAP_INDIRECT_TEMP_ADDR:
@@ -343,9 +349,6 @@ i915_get_shader_param(struct pipe_screen *screen, enum 
pipe_shader_type shader,
       case PIPE_SHADER_CAP_SUBROUTINES:
          return 0;
       case PIPE_SHADER_CAP_INT64_ATOMICS:
-      case PIPE_SHADER_CAP_FP16:
-      case PIPE_SHADER_CAP_FP16_DERIVATIVES:
-      case PIPE_SHADER_CAP_FP16_CONST_BUFFERS:
       case PIPE_SHADER_CAP_INT16:
       case PIPE_SHADER_CAP_GLSL_16BIT_CONSTS:
          return 0;

Reply via email to