diff --git a/.pick_status.json b/.pick_status.json index 1b951efa169..b6fe0c75b26 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -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 diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c index d186da00f2a..7150419759a 100644 --- a/src/compiler/spirv/spirv_to_nir.c +++ b/src/compiler/spirv/spirv_to_nir.c @@ -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));