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

Author: Erik Faye-Lund <erik.faye-l...@collabora.com>
Date:   Fri Apr  9 08:35:02 2021 +0200

gallium/st: correct range for int16

This fixes the following dEQP tests:

- 
dEQP-GLES3.functional.shaders.operator.unary_operator.minus.lowp_uvec2_fragment
- 
dEQP-GLES3.functional.shaders.operator.unary_operator.minus.lowp_uvec4_fragment
- 
dEQP-GLES3.functional.shaders.operator.unary_operator.minus.mediump_uvec2_fragment
- 
dEQP-GLES3.functional.shaders.operator.unary_operator.minus.mediump_uvec4_fragment

Fixes: 1af8fe4ed52 ("gallium: add shader caps INT16 and FP16_DERIVATIVES")
Reviewed-by: Alyssa Rosenzweig <aly...@collabora.com>
Tested-by: Alyssa Rosenzweig <aly...@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10128>

---

 src/mesa/state_tracker/st_extensions.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/mesa/state_tracker/st_extensions.c 
b/src/mesa/state_tracker/st_extensions.c
index 0ec5d1be1f4..2481c2697e7 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -307,6 +307,12 @@ void st_init_limits(struct pipe_screen *screen,
          pc->LowInt.RangeMax = 30;
          pc->LowInt.Precision = 0;
          pc->MediumInt = pc->HighInt = pc->LowInt;
+
+         if (screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_INT16)) {
+            pc->LowInt.RangeMin = 15;
+            pc->LowInt.RangeMax = 14;
+            pc->MediumInt = pc->LowInt;
+         }
       }
 
       if (screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_FP16)) {

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

Reply via email to