mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-24 12:48:13 +02:00
spirv: Fix debugPrintfEXT not working with multiple arguments
The struct field offsets weren't getting initialized. Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> CC: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41590>
This commit is contained in:
parent
b333c9bd71
commit
768f4782e3
1 changed files with 5 additions and 1 deletions
|
|
@ -844,6 +844,7 @@ vtn_handle_debug_printf(struct vtn_builder *b, SpvOp ext_opcode,
|
|||
|
||||
if (argc) {
|
||||
glsl_struct_field *fields = calloc(argc, sizeof(glsl_struct_field));
|
||||
int next_offset = 0;
|
||||
for (uint32_t i = 0; i < argc; i++) {
|
||||
struct vtn_ssa_value *arg = vtn_ssa_value(b, w[6 + i]);
|
||||
|
||||
|
|
@ -852,8 +853,11 @@ vtn_handle_debug_printf(struct vtn_builder *b, SpvOp ext_opcode,
|
|||
fields[i].type = glsl_vector_type(fields[i].type->base_type, arg->def->num_components);
|
||||
|
||||
fields[i].name = "";
|
||||
fields[i].offset = next_offset;
|
||||
|
||||
info->arg_sizes[i] = arg->def->bit_size / 8;
|
||||
int size = (int) arg->def->bit_size * arg->def->num_components / 8;
|
||||
info->arg_sizes[i] = size;
|
||||
next_offset += size;
|
||||
}
|
||||
|
||||
nir_variable *packed_args = nir_local_variable_create(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue