From: Jason Ekstrand Date: Wed, 13 Jul 2016 18:35:29 +0000 (-0700) Subject: nir/spirv: Don't multiply the push constant block size by 4 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=49476576ddd5c743b852bb2c1ad75ebfe3e1c72d;p=mesa.git nir/spirv: Don't multiply the push constant block size by 4 I have no idea why we were multiplying by 4 before. The offsets we get from SPIR-V are in bytes and so is nir->num_uniforms so there's no need to do any adjustment whatsoever. Signed-off-by: Jason Ekstrand Cc: "12.0" --- diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c index fe2494ba3b3..8b112b016c6 100644 --- a/src/compiler/spirv/vtn_variables.c +++ b/src/compiler/spirv/vtn_variables.c @@ -1173,7 +1173,7 @@ vtn_handle_variables(struct vtn_builder *b, SpvOp opcode, case SpvStorageClassPushConstant: var->mode = vtn_variable_mode_push_constant; assert(b->shader->num_uniforms == 0); - b->shader->num_uniforms = vtn_type_block_size(var->type) * 4; + b->shader->num_uniforms = vtn_type_block_size(var->type); break; case SpvStorageClassInput: var->mode = vtn_variable_mode_input;