mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
glsl: don't lower to mediump for desktop OpenGL
Desktop OpenGL ignores all precision qualifiers. Also, the lowering pass doesn't work if precision qualifiers are not set, which is only possible with desktop OpenGL, causing random behavior. Reviewed-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6073>
This commit is contained in:
parent
01e0085637
commit
282a1e6288
1 changed files with 2 additions and 1 deletions
|
|
@ -2249,7 +2249,8 @@ _mesa_glsl_compile_shader(struct gl_context *ctx, struct gl_shader *shader,
|
|||
&ctx->Const.ShaderCompilerOptions[shader->Stage];
|
||||
|
||||
if (!state->error && !shader->ir->is_empty()) {
|
||||
if (options->LowerPrecisionFloat16 || options->LowerPrecisionInt16)
|
||||
if (state->es_shader &&
|
||||
(options->LowerPrecisionFloat16 || options->LowerPrecisionInt16))
|
||||
lower_precision(options, shader->ir);
|
||||
lower_builtins(shader->ir);
|
||||
assign_subroutine_indexes(state);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue