glsl/linker: specify proper direction in location aliasing error
The check for location aliasing was always asuming output variables
but this validation is also called for input variables.
Fixes: e2abb75b0e
("glsl/linker: validate explicit locations for SSO programs")
Cc: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
This commit is contained in:
@@ -481,9 +481,10 @@ check_location_aliasing(struct explicit_location_info explicit_locations[][4],
|
|||||||
/* Component aliasing is not alloed */
|
/* Component aliasing is not alloed */
|
||||||
if (comp >= component && comp < last_comp) {
|
if (comp >= component && comp < last_comp) {
|
||||||
linker_error(prog,
|
linker_error(prog,
|
||||||
"%s shader has multiple outputs explicitly "
|
"%s shader has multiple %sputs explicitly "
|
||||||
"assigned to location %d and component %d\n",
|
"assigned to location %d and component %d\n",
|
||||||
_mesa_shader_stage_to_string(stage),
|
_mesa_shader_stage_to_string(stage),
|
||||||
|
var->data.mode == ir_var_shader_in ? "in" : "out",
|
||||||
location, comp);
|
location, comp);
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
@@ -502,10 +503,12 @@ check_location_aliasing(struct explicit_location_info explicit_locations[][4],
|
|||||||
|
|
||||||
if (info->interpolation != interpolation) {
|
if (info->interpolation != interpolation) {
|
||||||
linker_error(prog,
|
linker_error(prog,
|
||||||
"%s shader has multiple outputs at explicit "
|
"%s shader has multiple %sputs at explicit "
|
||||||
"location %u with different interpolation "
|
"location %u with different interpolation "
|
||||||
"settings\n",
|
"settings\n",
|
||||||
_mesa_shader_stage_to_string(stage), location);
|
_mesa_shader_stage_to_string(stage),
|
||||||
|
var->data.mode == ir_var_shader_in ?
|
||||||
|
"in" : "out", location);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -513,9 +516,11 @@ check_location_aliasing(struct explicit_location_info explicit_locations[][4],
|
|||||||
info->sample != sample ||
|
info->sample != sample ||
|
||||||
info->patch != patch) {
|
info->patch != patch) {
|
||||||
linker_error(prog,
|
linker_error(prog,
|
||||||
"%s shader has multiple outputs at explicit "
|
"%s shader has multiple %sputs at explicit "
|
||||||
"location %u with different aux storage\n",
|
"location %u with different aux storage\n",
|
||||||
_mesa_shader_stage_to_string(stage), location);
|
_mesa_shader_stage_to_string(stage),
|
||||||
|
var->data.mode == ir_var_shader_in ?
|
||||||
|
"in" : "out", location);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user