glsl/lower_precision: split out const lowering
Some hw can narrow 32b const/uniform to 16b on load.. and in particular lowering constants to 16b would break const->uniform lowering. Allow them to lower temps to 16b, while skipping consts. Initially it is set to the same value as LowerPrecisionTemporaries, to preserve the current behavior. Signed-off-by: Rob Clark <robdclark@chromium.org> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Eric Anholt <eric@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6189>
This commit is contained in:
@@ -348,6 +348,7 @@ void st_init_limits(struct pipe_screen *screen,
|
||||
screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_INT16);
|
||||
options->LowerPrecisionTemporaries =
|
||||
screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_GLSL_16BIT_TEMPS);
|
||||
options->LowerPrecisionConstants = options->LowerPrecisionTemporaries;
|
||||
}
|
||||
|
||||
c->MaxUserAssignableUniformLocations =
|
||||
|
Reference in New Issue
Block a user