Signed-off-by: Isabella Bosia ibosia@codeweavers.com --- libs/vkd3d-shader/trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libs/vkd3d-shader/trace.c b/libs/vkd3d-shader/trace.c index 3571de8..7553724 100644 --- a/libs/vkd3d-shader/trace.c +++ b/libs/vkd3d-shader/trace.c @@ -1330,7 +1330,7 @@ static void shader_dump_instruction(struct vkd3d_string_buffer *buffer, break;
case VKD3DSIH_DCL_INDEXABLE_TEMP: - shader_addline(buffer, "%s x[%u][%u], %u", shader_opcode_names[ins->handler_idx], + shader_addline(buffer, "%s x%u[%u], %u", shader_opcode_names[ins->handler_idx], ins->declaration.indexable_temp.register_idx, ins->declaration.indexable_temp.register_size, ins->declaration.indexable_temp.component_count);
Signed-off-by: Isabella Bosia ibosia@codeweavers.com --- libs/vkd3d-shader/trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libs/vkd3d-shader/trace.c b/libs/vkd3d-shader/trace.c index 7553724..f4d735b 100644 --- a/libs/vkd3d-shader/trace.c +++ b/libs/vkd3d-shader/trace.c @@ -1375,7 +1375,7 @@ static void shader_dump_instruction(struct vkd3d_string_buffer *buffer, break;
case VKD3DSIH_DCL_INTERFACE: - shader_addline(buffer, "%s fp[%u][%u][%u] = {...}", + shader_addline(buffer, "%s fp%u[%u][%u] = {...}", shader_opcode_names[ins->handler_idx], ins->declaration.fp.index, ins->declaration.fp.array_size, ins->declaration.fp.body_count); break;
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
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) {
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Isabella Bosia ibosia@codeweavers.com --- libs/vkd3d-shader/trace.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/libs/vkd3d-shader/trace.c b/libs/vkd3d-shader/trace.c index 6412208..7562e52 100644 --- a/libs/vkd3d-shader/trace.c +++ b/libs/vkd3d-shader/trace.c @@ -955,7 +955,11 @@ static void shader_dump_register(struct vkd3d_string_buffer *buffer, if (printbrackets) shader_addline(buffer, "]");
- if (reg->idx[1].offset != ~0u) + /* For CBs in sm < 5.1 we move the buffer offset from idx[1] to idx[2] + * to normalise it with 5.1. + * Here we should ignore it if it's a CB in sm < 5.1. */ + if (reg->idx[1].offset != ~0u && + (reg->type != VKD3DSPR_CONSTBUFFER || shader_ver_ge(shader_version, 5, 1))) { shader_addline(buffer, "["); if (reg->idx[1].rel_addr)
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Isabella Bosia ibosia@codeweavers.com --- libs/vkd3d-shader/trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libs/vkd3d-shader/trace.c b/libs/vkd3d-shader/trace.c index 7562e52..f32bdfa 100644 --- a/libs/vkd3d-shader/trace.c +++ b/libs/vkd3d-shader/trace.c @@ -994,7 +994,7 @@ static void shader_dump_dst_param(struct vkd3d_string_buffer *buffer,
shader_dump_register(buffer, ¶m->reg, shader_version);
- if (write_mask && write_mask != VKD3DSP_WRITEMASK_ALL) + if (write_mask) { static const char write_mask_chars[] = "xyzw";
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Isabella Bosia ibosia@codeweavers.com --- libs/vkd3d-shader/trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libs/vkd3d-shader/trace.c b/libs/vkd3d-shader/trace.c index f32bdfa..68a90fd 100644 --- a/libs/vkd3d-shader/trace.c +++ b/libs/vkd3d-shader/trace.c @@ -1051,7 +1051,7 @@ static void shader_dump_src_param(struct vkd3d_string_buffer *buffer, default: shader_addline(buffer, "_unknown_modifier(%#x)", src_modifier); }
- if (swizzle != VKD3D_SHADER_NO_SWIZZLE) + if (param->reg.type != VKD3DSPR_IMMCONST && param->reg.type != VKD3DSPR_SAMPLER) { static const char swizzle_chars[] = "xyzw"; DWORD swizzle_x = (swizzle >> VKD3D_SHADER_SWIZZLE_SHIFT(0)) & VKD3D_SHADER_SWIZZLE_MASK;
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com