diff --git a/.pick_status.json b/.pick_status.json index 33ec66db139..f186809c580 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -9202,7 +9202,7 @@ "description": "glsl: don't duplicate state vars as uniforms in the NIR linker", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": "664e4a610dc8c0f2adc50de645a07cf4e2b622fd" }, diff --git a/src/compiler/glsl/gl_nir_link_uniforms.c b/src/compiler/glsl/gl_nir_link_uniforms.c index c8d32bdf338..00005c20126 100644 --- a/src/compiler/glsl/gl_nir_link_uniforms.c +++ b/src/compiler/glsl/gl_nir_link_uniforms.c @@ -530,6 +530,12 @@ add_parameter(struct gl_uniform_storage *uniform, const struct glsl_type *type, struct nir_link_uniforms_state *state) { + /* Builtin uniforms are backed by PROGRAM_STATE_VAR, so don't add them as + * uniforms. + */ + if (uniform->builtin) + return; + if (!state->params || uniform->is_shader_storage || (glsl_contains_opaque(type) && !state->current_var->data.bindless)) return;