summaryrefslogtreecommitdiffstats
path: root/src/compiler/spirv
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2016-07-13 11:35:29 -0700
committerJason Ekstrand <jason.ekstrand@intel.com>2016-07-13 11:35:29 -0700
commit49476576ddd5c743b852bb2c1ad75ebfe3e1c72d (patch)
treec934475edb6f1fb803c86c33143b196e625f5622 /src/compiler/spirv
parent1eed753ee8725baf41790d30f94bc3567653c28c (diff)
downloadexternal_mesa3d-49476576ddd5c743b852bb2c1ad75ebfe3e1c72d.zip
external_mesa3d-49476576ddd5c743b852bb2c1ad75ebfe3e1c72d.tar.gz
external_mesa3d-49476576ddd5c743b852bb2c1ad75ebfe3e1c72d.tar.bz2
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 <jason@jlekstrand.net> Cc: "12.0" <mesa-stable@lists.freedesktop.org>
Diffstat (limited to 'src/compiler/spirv')
-rw-r--r--src/compiler/spirv/vtn_variables.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c
index fe2494b..8b112b0 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;