anv: Use 4 instead of sizeof(gl_constant_value)
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 11 Dec 2015 02:55:14 +0000 (18:55 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Fri, 11 Dec 2015 02:55:16 +0000 (18:55 -0800)
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
src/vulkan/gen8_cmd_buffer.c

index 5a56bb53c5eedcab2127ce9d13b01ff47558cb79..8ade08ea746006e74075fe5cd22d43605b99d770 100644 (file)
@@ -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);
index 4e5db6767221ee8b41193417caca6f6120a9581c..8d17066ee6ffd8f4cbe64b7e354be4a087767151 100644 (file)
@@ -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;