mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 13:00:09 +01:00
glsl: count attributes for vertex inputs properly.
This function deals with vertex inputs and fragment outputs, so we should count the attribute locations correctly for the vertex inputs. Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
14193e4643
commit
97eee90547
1 changed files with 1 additions and 1 deletions
|
|
@ -2466,7 +2466,7 @@ assign_attribute_or_color_locations(gl_shader_program *prog,
|
|||
return false;
|
||||
}
|
||||
|
||||
const unsigned slots = var->type->count_attribute_slots(false);
|
||||
const unsigned slots = var->type->count_attribute_slots(target_index == MESA_SHADER_VERTEX ? true : false);
|
||||
|
||||
/* If the variable is not a built-in and has a location statically
|
||||
* assigned in the shader (presumably via a layout qualifier), make sure
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue