nir/spirv: Use the correct stride for non-32-bit vectors

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
This commit is contained in:
Jason Ekstrand 2017-06-29 10:33:29 -07:00 committed by Jason Ekstrand
parent 415e198d48
commit 00c47e111c
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}