You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
127 lines
6.0 KiB
Diff
127 lines
6.0 KiB
Diff
From 847e0c6da106b68aa30bf48575ad204f547b913a Mon Sep 17 00:00:00 2001
|
|
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
|
Date: Tue, 9 Sep 2025 12:15:35 +1000
|
|
Subject: [PATCH] Updated vkd3d to 6607b94ad7ce77907a912923f39e6371d23e339b.
|
|
|
|
---
|
|
libs/vkd3d/libs/vkd3d-shader/d3d_asm.c | 17 +++++++++++++++++
|
|
libs/vkd3d/libs/vkd3d-shader/dxil.c | 8 ++++++++
|
|
libs/vkd3d/libs/vkd3d-shader/hlsl_codegen.c | 3 +--
|
|
libs/vkd3d/libs/vkd3d-shader/msl.c | 6 ++++++
|
|
.../libs/vkd3d-shader/vkd3d_shader_private.h | 6 ++++--
|
|
5 files changed, 36 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/libs/vkd3d/libs/vkd3d-shader/d3d_asm.c b/libs/vkd3d/libs/vkd3d-shader/d3d_asm.c
|
|
index 897803ecb56..e2fb8b12998 100644
|
|
--- a/libs/vkd3d/libs/vkd3d-shader/d3d_asm.c
|
|
+++ b/libs/vkd3d/libs/vkd3d-shader/d3d_asm.c
|
|
@@ -957,6 +957,22 @@ static void shader_print_reg_type(struct vkd3d_d3d_asm_compiler *compiler,
|
|
vkd3d_string_buffer_printf(buffer, ">%s", suffix);
|
|
}
|
|
|
|
+static void shader_print_indexable_temp_data_type(struct vkd3d_d3d_asm_compiler *compiler,
|
|
+ const struct vkd3d_shader_indexable_temp *t)
|
|
+{
|
|
+ struct vkd3d_string_buffer *buffer = &compiler->buffer;
|
|
+
|
|
+ if (!(compiler->flags & VSIR_ASM_FLAG_DUMP_TYPES))
|
|
+ return;
|
|
+
|
|
+ if (t->component_count > 1)
|
|
+ vkd3d_string_buffer_printf(buffer, " <v%u:", t->component_count);
|
|
+ else
|
|
+ vkd3d_string_buffer_printf(buffer, " <s:");
|
|
+ shader_print_data_type(compiler, t->data_type);
|
|
+ vkd3d_string_buffer_printf(buffer, ">");
|
|
+}
|
|
+
|
|
static void shader_print_write_mask(struct vkd3d_d3d_asm_compiler *compiler,
|
|
const char *prefix, uint32_t mask, const char *suffix)
|
|
{
|
|
@@ -1511,6 +1527,7 @@ static void shader_dump_instruction(struct vkd3d_d3d_asm_compiler *compiler,
|
|
vkd3d_string_buffer_printf(buffer, " %sx%u%s", compiler->colours.reg,
|
|
ins->declaration.indexable_temp.register_idx, compiler->colours.reset);
|
|
shader_print_subscript(compiler, ins->declaration.indexable_temp.register_size, NULL);
|
|
+ shader_print_indexable_temp_data_type(compiler, &ins->declaration.indexable_temp);
|
|
shader_print_uint_literal(compiler, ", ", ins->declaration.indexable_temp.component_count, "");
|
|
if (ins->declaration.indexable_temp.alignment)
|
|
shader_print_uint_literal(compiler, ", align ", ins->declaration.indexable_temp.alignment, "");
|
|
diff --git a/libs/vkd3d/libs/vkd3d-shader/dxil.c b/libs/vkd3d/libs/vkd3d-shader/dxil.c
|
|
index 1678128da83..fb2cde4501a 100644
|
|
--- a/libs/vkd3d/libs/vkd3d-shader/dxil.c
|
|
+++ b/libs/vkd3d/libs/vkd3d-shader/dxil.c
|
|
@@ -3698,6 +3698,14 @@ static void sm6_parser_declare_indexable_temp(struct sm6_parser *sm6, const stru
|
|
{
|
|
enum vsir_data_type data_type = vsir_data_type_from_dxil(elem_type, sm6);
|
|
|
|
+ if (!(sm6->program->global_flags & VKD3DSGF_FORCE_NATIVE_LOW_PRECISION))
|
|
+ {
|
|
+ if (data_type == VSIR_DATA_F16)
|
|
+ data_type = VSIR_DATA_F32;
|
|
+ else if (data_type == VSIR_DATA_U16)
|
|
+ data_type = VSIR_DATA_U32;
|
|
+ }
|
|
+
|
|
if (ins)
|
|
vsir_instruction_init(ins, &sm6->p.location, VSIR_OP_DCL_INDEXABLE_TEMP);
|
|
else
|
|
diff --git a/libs/vkd3d/libs/vkd3d-shader/hlsl_codegen.c b/libs/vkd3d/libs/vkd3d-shader/hlsl_codegen.c
|
|
index 9a682a7550d..ee21207a855 100644
|
|
--- a/libs/vkd3d/libs/vkd3d-shader/hlsl_codegen.c
|
|
+++ b/libs/vkd3d/libs/vkd3d-shader/hlsl_codegen.c
|
|
@@ -8817,9 +8817,8 @@ static enum vsir_data_type vsir_data_type_from_hlsl_type(struct hlsl_ctx *ctx, c
|
|
case HLSL_TYPE_DOUBLE:
|
|
return VSIR_DATA_F64;
|
|
case HLSL_TYPE_FLOAT:
|
|
- return VSIR_DATA_F32;
|
|
case HLSL_TYPE_HALF:
|
|
- return VSIR_DATA_F16;
|
|
+ return VSIR_DATA_F32;
|
|
case HLSL_TYPE_INT:
|
|
return VSIR_DATA_I32;
|
|
case HLSL_TYPE_UINT:
|
|
diff --git a/libs/vkd3d/libs/vkd3d-shader/msl.c b/libs/vkd3d/libs/vkd3d-shader/msl.c
|
|
index fc8d482e08a..d9e22abdfc3 100644
|
|
--- a/libs/vkd3d/libs/vkd3d-shader/msl.c
|
|
+++ b/libs/vkd3d/libs/vkd3d-shader/msl.c
|
|
@@ -1414,6 +1414,12 @@ static void msl_ret(struct msl_generator *gen, const struct vkd3d_shader_instruc
|
|
static void msl_dcl_indexable_temp(struct msl_generator *gen, const struct vkd3d_shader_instruction *ins)
|
|
{
|
|
const char *type = ins->declaration.indexable_temp.component_count == 4 ? "vkd3d_vec4" : "vkd3d_scalar";
|
|
+
|
|
+ if (ins->declaration.indexable_temp.initialiser)
|
|
+ msl_compiler_error(gen, VKD3D_SHADER_ERROR_MSL_INTERNAL,
|
|
+ "Internal compiler error: Unhandled initialiser for indexable temporary %u.",
|
|
+ ins->declaration.indexable_temp.register_idx);
|
|
+
|
|
msl_print_indent(gen->buffer, gen->indent);
|
|
vkd3d_string_buffer_printf(gen->buffer, "%s x%u[%u];\n", type,
|
|
ins->declaration.indexable_temp.register_idx,
|
|
diff --git a/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_private.h b/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_private.h
|
|
index 9bf196b1fe2..ae88d97f461 100644
|
|
--- a/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_private.h
|
|
+++ b/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_private.h
|
|
@@ -1863,7 +1863,8 @@ static inline enum vkd3d_shader_component_type vkd3d_component_type_from_data_ty
|
|
{
|
|
case VSIR_DATA_BOOL:
|
|
return VKD3D_SHADER_COMPONENT_BOOL;
|
|
- case VSIR_DATA_F16: /* Minimum precision. TODO: native 16-bit */
|
|
+ case VSIR_DATA_F16:
|
|
+ return VKD3D_SHADER_COMPONENT_FLOAT16;
|
|
case VSIR_DATA_F32:
|
|
case VSIR_DATA_SNORM:
|
|
case VSIR_DATA_UNORM:
|
|
@@ -1872,7 +1873,8 @@ static inline enum vkd3d_shader_component_type vkd3d_component_type_from_data_ty
|
|
return VKD3D_SHADER_COMPONENT_DOUBLE;
|
|
case VSIR_DATA_I32:
|
|
return VKD3D_SHADER_COMPONENT_INT;
|
|
- case VSIR_DATA_U16: /* Minimum precision. TODO: native 16-bit */
|
|
+ case VSIR_DATA_U16:
|
|
+ return VKD3D_SHADER_COMPONENT_UINT16;
|
|
case VSIR_DATA_U32:
|
|
return VKD3D_SHADER_COMPONENT_UINT;
|
|
case VSIR_DATA_U64:
|
|
--
|
|
2.51.0
|
|
|