mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 00:00:11 +01:00
spirv: fix printf generation
Not having the uses_printf will drop the printf info in serialization.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
(cherry picked from commit 67faf6dfbd)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
This commit is contained in:
parent
e1eaedbd99
commit
45bd0be006
2 changed files with 3 additions and 2 deletions
|
|
@ -2404,7 +2404,7 @@
|
|||
"description": "spirv: fix printf generation",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -827,6 +827,7 @@ vtn_handle_debug_printf(struct vtn_builder *b, SpvOp ext_opcode,
|
|||
|
||||
struct vtn_value *format = vtn_value(b, w[5], vtn_value_type_string);
|
||||
|
||||
b->shader->info.uses_printf = true;
|
||||
b->shader->printf_info_count++;
|
||||
b->shader->printf_info = reralloc(b->shader,
|
||||
b->shader->printf_info,
|
||||
|
|
@ -844,7 +845,7 @@ vtn_handle_debug_printf(struct vtn_builder *b, SpvOp ext_opcode,
|
|||
.string_size = strlen(format->str) + 1,
|
||||
};
|
||||
|
||||
uint32_t info_index = b->shader->printf_info_count - 1;
|
||||
uint32_t info_index = b->shader->printf_info_count;
|
||||
|
||||
if (argc) {
|
||||
glsl_struct_field *fields = calloc(argc, sizeof(glsl_struct_field));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue