mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
st_glsl_to_tgsi: only skip over slots of an input array that are present
When an application declares varying arrays but does not actually do any indirect indexing, some array indices may end up unused in the consuming shader, so the number of input slots that correspond to the array ends up less than the array_size. Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
041b330a32
commit
185b0c15ab
1 changed files with 5 additions and 1 deletions
|
|
@ -6058,7 +6058,11 @@ st_translate_program(
|
|||
inputSemanticName[i], inputSemanticIndex[i],
|
||||
interpMode[i], 0, interpLocation[i],
|
||||
array_id, array_size);
|
||||
i += array_size - 1;
|
||||
|
||||
GLuint base_attr = inputSlotToAttr[i];
|
||||
while (i + 1 < numInputs &&
|
||||
inputSlotToAttr[i + 1] < base_attr + array_size)
|
||||
++i;
|
||||
}
|
||||
else {
|
||||
t->inputs[i] = ureg_DECL_fs_input_cyl_centroid(ureg,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue