Updated vkd3d-latest patchset

This commit is contained in:
Alistair Leslie-Hughes
2025-06-11 07:54:27 +10:00
parent a9be5cf2b0
commit cc517dd949
7 changed files with 2198 additions and 5 deletions

View File

@@ -1,4 +1,4 @@
From 40128154c0cefe020a9f8a6cf5da908339df493b Mon Sep 17 00:00:00 2001
From 38ded2c6b1b3b587e3a23cd2190230e6acd86120 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Mon, 26 May 2025 07:03:34 +1000
Subject: [PATCH] Updated vkd3d to c4c7f10d99daa5d3efc036d74d5e09b6f1342407.

View File

@@ -1,4 +1,4 @@
From 4b9f58f4f2577c30a1fa3b949217bcf5e525598f Mon Sep 17 00:00:00 2001
From ba99d7169b0bea213655531ac66e714ca60a81f6 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Wed, 28 May 2025 07:14:59 +1000
Subject: [PATCH] Updated vkd3d to 87ec2d98973432531d7d9d08dfc837376f91844c.

View File

@@ -1,4 +1,4 @@
From 5a866e3b406c57d7b78417110cb3685035fa4b15 Mon Sep 17 00:00:00 2001
From 5b1f9a771641044d8cc5ed6ab8560f220ebd5b9e Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Tue, 3 Jun 2025 07:40:14 +1000
Subject: [PATCH] Updated vkd3d to 2b257caea94fce2a5ef58dd303de9d73563b9126.

View File

@@ -1,4 +1,4 @@
From 6a86ff50e62add7c2739b6508518b5556dcd2289 Mon Sep 17 00:00:00 2001
From 27ace4a398f2f56c420c3889f5874f17c6381790 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Thu, 5 Jun 2025 07:25:40 +1000
Subject: [PATCH] Updated vkd3d to f1b36edc076117970b5a6d05a924b6c4248e082f.

View File

@@ -1,4 +1,4 @@
From 981c6b22b1d959588c16002c6176d72615c23cb0 Mon Sep 17 00:00:00 2001
From 18df694d072cb411ab6187218cdc6d3e2c21d44b Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Fri, 6 Jun 2025 07:10:30 +1000
Subject: [PATCH] Updated vkd3d to d65be3d0c5698a1b0df7c39ec0eaa485a8bd35de.

View File

@@ -0,0 +1,138 @@
From 60ca99ec5f6b94c4128614cfdcae8cc4a0b9a9ee Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Tue, 10 Jun 2025 07:48:09 +1000
Subject: [PATCH] Updated vkd3d to 8da518f2cd4021ef8d642bbb8050881d7ff490c1.
---
libs/vkd3d/libs/vkd3d-shader/msl.c | 45 +++++++++++++++++++++++++++++-
1 file changed, 44 insertions(+), 1 deletion(-)
diff --git a/libs/vkd3d/libs/vkd3d-shader/msl.c b/libs/vkd3d/libs/vkd3d-shader/msl.c
index 62981811ee4..b3e251eff28 100644
--- a/libs/vkd3d/libs/vkd3d-shader/msl.c
+++ b/libs/vkd3d/libs/vkd3d-shader/msl.c
@@ -382,6 +382,19 @@ static enum msl_data_type msl_print_register_name(struct vkd3d_string_buffer *bu
return MSL_DATA_UNION;
}
+ case VKD3DSPR_IDXTEMP:
+ vkd3d_string_buffer_printf(buffer, "x%u", reg->idx[0].offset);
+ msl_print_subscript(buffer, gen, reg->idx[1].rel_addr, reg->idx[1].offset);
+ return MSL_DATA_UNION;
+
+ case VKD3DSPR_SAMPLEMASK:
+ if (gen->program->shader_version.type != VKD3D_SHADER_TYPE_PIXEL)
+ msl_compiler_error(gen, VKD3D_SHADER_ERROR_MSL_INTERNAL,
+ "Internal compiler error: Unhandled sample coverage mask in shader type #%x.",
+ gen->program->shader_version.type);
+ vkd3d_string_buffer_printf(buffer, "o_mask");
+ return MSL_DATA_FLOAT;
+
default:
msl_compiler_error(gen, VKD3D_SHADER_ERROR_MSL_INTERNAL,
"Internal compiler error: Unhandled register type %#x.", reg->type);
@@ -901,6 +914,14 @@ static void msl_ret(struct msl_generator *gen, const struct vkd3d_shader_instruc
vkd3d_string_buffer_printf(gen->buffer, "return;\n");
}
+static void msl_dcl_indexable_temp(struct msl_generator *gen, const struct vkd3d_shader_instruction *ins)
+{
+ msl_print_indent(gen->buffer, gen->indent);
+ vkd3d_string_buffer_printf(gen->buffer, "vkd3d_vec4 x%u[%u];\n",
+ ins->declaration.indexable_temp.register_idx,
+ ins->declaration.indexable_temp.register_size);
+}
+
static void msl_handle_instruction(struct msl_generator *gen, const struct vkd3d_shader_instruction *ins)
{
gen->location = ins->location;
@@ -908,11 +929,15 @@ static void msl_handle_instruction(struct msl_generator *gen, const struct vkd3d
switch (ins->opcode)
{
case VKD3DSIH_ADD:
+ case VKD3DSIH_IADD:
msl_binop(gen, ins, "+");
break;
case VKD3DSIH_AND:
msl_binop(gen, ins, "&");
break;
+ case VKD3DSIH_DCL_INDEXABLE_TEMP:
+ msl_dcl_indexable_temp(gen, ins);
+ break;
case VKD3DSIH_NOP:
break;
case VKD3DSIH_DIV:
@@ -933,6 +958,7 @@ static void msl_handle_instruction(struct msl_generator *gen, const struct vkd3d
case VKD3DSIH_ENDIF:
msl_end_block(gen);
break;
+ case VKD3DSIH_EQO:
case VKD3DSIH_IEQ:
msl_relop(gen, ins, "==");
break;
@@ -949,6 +975,7 @@ static void msl_handle_instruction(struct msl_generator *gen, const struct vkd3d
msl_cast(gen, ins, "uint");
break;
case VKD3DSIH_GEO:
+ case VKD3DSIH_IGE:
msl_relop(gen, ins, ">=");
break;
case VKD3DSIH_IF:
@@ -1276,6 +1303,12 @@ static void msl_generate_output_struct_declarations(struct msl_generator *gen)
vkd3d_string_buffer_printf(buffer, "float shader_out_depth [[depth(any)]];\n");
}
+ if (bitmap_is_set(gen->program->io_dcls, VKD3DSPR_SAMPLEMASK))
+ {
+ msl_print_indent(gen->buffer, 1);
+ vkd3d_string_buffer_printf(buffer, "uint shader_out_mask [[sample_mask]];\n");
+ }
+
vkd3d_string_buffer_printf(buffer, "};\n\n");
}
@@ -1371,6 +1404,9 @@ static void msl_generate_entrypoint_epilogue(struct msl_generator *gen)
}
vkd3d_string_buffer_printf(buffer, ";\n");
}
+
+ if (bitmap_is_set(gen->program->io_dcls, VKD3DSPR_SAMPLEMASK))
+ vkd3d_string_buffer_printf(gen->buffer, " output.shader_out_mask = as_type<uint>(o_mask);\n");
}
static void msl_generate_entrypoint(struct msl_generator *gen)
@@ -1414,6 +1450,9 @@ static void msl_generate_entrypoint(struct msl_generator *gen)
vkd3d_string_buffer_printf(gen->buffer, " vkd3d_vec4 %s_in[%u];\n", gen->prefix, 32);
vkd3d_string_buffer_printf(gen->buffer, " vkd3d_vec4 %s_out[%u];\n", gen->prefix, 32);
vkd3d_string_buffer_printf(gen->buffer, " vkd3d_%s_out output;\n", gen->prefix);
+ if (bitmap_is_set(gen->program->io_dcls, VKD3DSPR_SAMPLEMASK))
+ vkd3d_string_buffer_printf(gen->buffer, " float o_mask;\n");
+ vkd3d_string_buffer_printf(gen->buffer, "\n");
msl_generate_entrypoint_prologue(gen);
@@ -1422,9 +1461,11 @@ static void msl_generate_entrypoint(struct msl_generator *gen)
vkd3d_string_buffer_printf(gen->buffer, ", vertex_id");
if (bitmap_is_set(gen->program->io_dcls, VKD3DSPR_DEPTHOUT))
vkd3d_string_buffer_printf(gen->buffer, ", output.shader_out_depth");
+ if (bitmap_is_set(gen->program->io_dcls, VKD3DSPR_SAMPLEMASK))
+ vkd3d_string_buffer_printf(gen->buffer, ", o_mask");
if (gen->program->descriptors.descriptor_count)
vkd3d_string_buffer_printf(gen->buffer, ", descriptors");
- vkd3d_string_buffer_printf(gen->buffer, ");\n");
+ vkd3d_string_buffer_printf(gen->buffer, ");\n\n");
msl_generate_entrypoint_epilogue(gen);
@@ -1486,6 +1527,8 @@ static int msl_generator_generate(struct msl_generator *gen, struct vkd3d_shader
vkd3d_string_buffer_printf(gen->buffer, ", uint vertex_id");
if (bitmap_is_set(gen->program->io_dcls, VKD3DSPR_DEPTHOUT))
vkd3d_string_buffer_printf(gen->buffer, ", thread float &o_depth");
+ if (bitmap_is_set(gen->program->io_dcls, VKD3DSPR_SAMPLEMASK))
+ vkd3d_string_buffer_printf(gen->buffer, ", thread float &o_mask");
if (gen->program->descriptors.descriptor_count)
vkd3d_string_buffer_printf(gen->buffer, ", constant descriptor *descriptors");
vkd3d_string_buffer_printf(gen->buffer, ")\n{\n");
--
2.47.2