diff options
author | Kristian Høgsberg Kristensen <[email protected]> | 2016-01-21 10:43:32 -0800 |
---|---|---|
committer | Kristian Høgsberg Kristensen <[email protected]> | 2016-01-21 11:10:11 -0800 |
commit | c5490d027731a1379c099cae6c1fb63ab30cea7c (patch) | |
tree | 5b06159f72bed289bab6fc7ea0d6abca87e35284 /src/glsl/nir | |
parent | 83c86e09a8d7610022eae49731ac1ed03ee4f67b (diff) |
vk: Fix indirect push constants
This currently sets the base and size of all push constants to the
entire push constant block. The idea is that we'll use the base and size
to eventually optimize the amount we actually push, but for now we don't
do that.
Diffstat (limited to 'src/glsl/nir')
-rw-r--r-- | src/glsl/nir/spirv/spirv_to_nir.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/glsl/nir/spirv/spirv_to_nir.c b/src/glsl/nir/spirv/spirv_to_nir.c index d0211221e17..74ad6518b9c 100644 --- a/src/glsl/nir/spirv/spirv_to_nir.c +++ b/src/glsl/nir/spirv/spirv_to_nir.c @@ -1515,6 +1515,14 @@ _vtn_load_store_tail(struct vtn_builder *b, nir_intrinsic_op op, bool load, instr->src[src++] = nir_src_for_ssa((*inout)->def); } + /* We set the base and size for push constant load to the entire push + * constant block for now. + */ + if (op == nir_intrinsic_load_push_constant) { + instr->const_index[0] = 0; + instr->const_index[1] = 128; + } + if (index) instr->src[src++] = nir_src_for_ssa(index); |