From 3893e11f4bb0b6a0088a778a0fbfd9d0e3558c80 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Thu, 10 Dec 2015 18:55:14 -0800 Subject: [PATCH] anv: Use 4 instead of sizeof(gl_constant_value) We no longer have access to gl_constant_value and, really, it's 4 because our uniform layout code works entirely in dwords. --- src/vulkan/anv_cmd_buffer.c | 2 +- src/vulkan/gen8_cmd_buffer.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vulkan/anv_cmd_buffer.c b/src/vulkan/anv_cmd_buffer.c index 5a56bb53c5e..8ade08ea746 100644 --- a/src/vulkan/anv_cmd_buffer.c +++ b/src/vulkan/anv_cmd_buffer.c @@ -930,7 +930,7 @@ anv_cmd_buffer_cs_push_constants(struct anv_cmd_buffer *cmd_buffer) const unsigned local_id_dwords = cs_prog_data->local_invocation_id_regs * 8; const unsigned push_constant_data_size = - (local_id_dwords + prog_data->nr_params) * sizeof(union gl_constant_value *); + (local_id_dwords + prog_data->nr_params) * 4; const unsigned reg_aligned_constant_size = ALIGN(push_constant_data_size, 32); const unsigned param_aligned_count = reg_aligned_constant_size / sizeof(uint32_t); diff --git a/src/vulkan/gen8_cmd_buffer.c b/src/vulkan/gen8_cmd_buffer.c index 4e5db676722..8d17066ee6f 100644 --- a/src/vulkan/gen8_cmd_buffer.c +++ b/src/vulkan/gen8_cmd_buffer.c @@ -521,7 +521,7 @@ flush_compute_descriptor_set(struct anv_cmd_buffer *cmd_buffer) unsigned local_id_dwords = cs_prog_data->local_invocation_id_regs * 8; unsigned push_constant_data_size = - (prog_data->nr_params + local_id_dwords) * sizeof(union gl_constant_value *); + (prog_data->nr_params + local_id_dwords) * 4; unsigned reg_aligned_constant_size = ALIGN(push_constant_data_size, 32); unsigned push_constant_regs = reg_aligned_constant_size / 32; -- 2.30.2