summaryrefslogtreecommitdiffstats
path: root/src/compiler/spirv
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-06-29 10:33:29 -0700
committerJason Ekstrand <[email protected]>2017-07-05 15:26:53 -0700
commit00c47e111ccda3d3b506140ebc7b46929a9d0b71 (patch)
tree9600f3de64ffc4957bda75a2ce5b3423430e6dfc /src/compiler/spirv
parent415e198d4815db2eb6f55e5fc817357fcf8532a4 (diff)
nir/spirv: Use the correct stride for non-32-bit vectors
Reviewed-by: Connor Abbott <[email protected]>
Diffstat (limited to 'src/compiler/spirv')
-rw-r--r--src/compiler/spirv/spirv_to_nir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c
index 18e37341ef7..7a98843db77 100644
--- a/src/compiler/spirv/spirv_to_nir.c
+++ b/src/compiler/spirv/spirv_to_nir.c
@@ -744,7 +744,7 @@ vtn_handle_type(struct vtn_builder *b, SpvOp opcode,
* is always 4 bytes. This will have to change if we want to start
* supporting doubles or half-floats.
*/
- val->type->stride = 4;
+ val->type->stride = glsl_get_bit_size(base->type) / 8;
val->type->array_element = base;
break;
}