glsl: Fix location bias for patch variables.
We need to subtract VARYING_SLOT_PATCH0, not VARYING_SLOT_VAR0. Since "patch" only applies to inputs and outputs, we can just handle this once outside the switch statement, rather than replicating the check twice and complicating the earlier conditions. Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
This commit is contained in:
parent
1556f16e46
commit
398428f406
|
@ -3866,6 +3866,9 @@ add_interface_variables(struct gl_shader_program *shProg,
|
|||
continue;
|
||||
};
|
||||
|
||||
if (var->data.patch)
|
||||
loc_bias = int(VARYING_SLOT_PATCH0);
|
||||
|
||||
/* Skip packed varyings, packed varyings are handled separately
|
||||
* by add_packed_varyings.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue