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: 1af8fe4ed5 ("gallium: add shader caps INT16 and FP16_DERIVATIVES")
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Tested-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10128>
This commit is contained in:
Erik Faye-Lund 2021-04-09 08:35:02 +02:00 committed by Marge Bot
parent 07a02a3390
commit 6a2ee3b17c
1 changed files with 6 additions and 0 deletions

View File

@ -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)) {