summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlejandro Piñeiro <[email protected]>2019-03-07 16:57:10 +0100
committerAlejandro Piñeiro <[email protected]>2019-03-08 15:00:50 +0100
commit686b7b1d48fea0ff62bdb177f9696316a02d2b07 (patch)
tree79e80559d25bdb3f1a24d6134002c7ecaea94509 /src
parentde31fb2f4f75b253e7d9e4617da6c1d04ae18df9 (diff)
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 <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/compiler/glsl/gl_nir_link_xfb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/glsl/gl_nir_link_xfb.c b/src/compiler/glsl/gl_nir_link_xfb.c
index 587d65bfb37..7623492ba96 100644
--- a/src/compiler/glsl/gl_nir_link_xfb.c
+++ b/src/compiler/glsl/gl_nir_link_xfb.c
@@ -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;
}