Signed-off-by: Isabella Bosia ibosia@codeweavers.com --- libs/vkd3d-shader/trace.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/libs/vkd3d-shader/trace.c b/libs/vkd3d-shader/trace.c index f4d735b..6412208 100644 --- a/libs/vkd3d-shader/trace.c +++ b/libs/vkd3d-shader/trace.c @@ -937,13 +937,23 @@ static void shader_dump_register(struct vkd3d_string_buffer *buffer, { if (offset != ~0u) { - shader_addline(buffer, "["); + bool printbrackets = reg->idx[0].rel_addr + || reg->type == VKD3DSPR_INCONTROLPOINT + || reg->type == VKD3DSPR_IMMCONSTBUFFER + || ((shader_version->type == VKD3D_SHADER_TYPE_GEOMETRY + || shader_version->type == VKD3D_SHADER_TYPE_HULL) + && reg->type == VKD3DSPR_INPUT); + + if (printbrackets) + shader_addline(buffer, "["); if (reg->idx[0].rel_addr) { shader_dump_src_param(buffer, reg->idx[0].rel_addr, shader_version); shader_addline(buffer, " + "); } - shader_addline(buffer, "%u]", offset); + shader_addline(buffer, "%u", offset); + if (printbrackets) + shader_addline(buffer, "]");
if (reg->idx[1].offset != ~0u) {