diff options
author | Eric Anholt <[email protected]> | 2020-01-21 16:56:34 -0800 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-01-22 02:13:38 +0000 |
commit | 3abfde13be198449230e48c5f277e0b62a0e96c4 (patch) | |
tree | f323ba36d1455bce25ed3cd016a28cdd9ddda866 /src/freedreno/vulkan | |
parent | 5f791df0d004291cf10fb54efa3b784a2dfd3ee2 (diff) |
turnip: Add support for non-zero (still constant) UBO buffer indices.
This was actually all ready to go at this point, and just needed to
increment by the value.
Fixes dEQP-VK.binding_model.shader_access.primary_cmd_buf.uniform_buffer.*
Reviewed-by: Jonathan Marek <[email protected]>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3504>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3504>
Diffstat (limited to 'src/freedreno/vulkan')
-rw-r--r-- | src/freedreno/vulkan/tu_shader.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/freedreno/vulkan/tu_shader.c b/src/freedreno/vulkan/tu_shader.c index 67374ac22cc..323a244e81a 100644 --- a/src/freedreno/vulkan/tu_shader.c +++ b/src/freedreno/vulkan/tu_shader.c @@ -243,11 +243,12 @@ lower_vulkan_resource_index(nir_builder *b, nir_intrinsic_instr *instr, switch (nir_intrinsic_desc_type(instr)) { case VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER: case VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC: - if (!const_val || const_val->u32 != 0) - tu_finishme("non-zero vulkan_resource_index array index"); + if (!const_val) + tu_finishme("non-constant vulkan_resource_index array index"); /* skip index 0 which is used for push constants */ index = map_add(&shader->ubo_map, set, binding, 0, binding_layout->array_size) + 1; + index += const_val->u32; break; case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER: case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC: |