mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 20:28:04 +02:00
nir/linker: fix ARRAY_SIZE query with xfb varyings
For a non-array varying, it is expecting ARRAY_SIZE as 1, instead of 0. Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
This commit is contained in:
parent
de31fb2f4f
commit
686b7b1d48
1 changed files with 2 additions and 1 deletions
|
|
@ -156,7 +156,8 @@ gl_nir_link_assign_xfb_resources(struct gl_context *ctx,
|
|||
varying->Name = NULL;
|
||||
varying->Type = glsl_get_gl_type(xfb_varying->type);
|
||||
varying->BufferIndex = buffer_index;
|
||||
varying->Size = glsl_get_length(xfb_varying->type);
|
||||
varying->Size = glsl_type_is_array(xfb_varying->type) ?
|
||||
glsl_get_length(xfb_varying->type) : 1;
|
||||
varying->Offset = xfb_varying->offset;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue