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
Updated vkd3d-latest patchset
Squashed. Updated to vkd3d 1.17+
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,135 +0,0 @@
|
||||
From 4874b0a352c091813dc9372412ac76e976b5eb64 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Thu, 17 Jul 2025 07:20:27 +1000
|
||||
Subject: [PATCH] Updated vkd3d to ba545669cd09682960f5da17b9131780642daf8e.
|
||||
|
||||
---
|
||||
libs/vkd3d/libs/vkd3d-shader/ir.c | 46 +++++++++++++++++++
|
||||
.../libs/vkd3d-shader/vkd3d_shader_private.h | 1 +
|
||||
libs/vkd3d/libs/vkd3d/state.c | 20 ++------
|
||||
3 files changed, 51 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/libs/vkd3d/libs/vkd3d-shader/ir.c b/libs/vkd3d/libs/vkd3d-shader/ir.c
|
||||
index fe7e8c54dfb..b060ccbb2bc 100644
|
||||
--- a/libs/vkd3d/libs/vkd3d-shader/ir.c
|
||||
+++ b/libs/vkd3d/libs/vkd3d-shader/ir.c
|
||||
@@ -10479,6 +10479,7 @@ static void vsir_validate_descriptors(struct validation_context *ctx)
|
||||
for (i = 0; i < descriptors->descriptor_count; ++i)
|
||||
{
|
||||
const struct vkd3d_shader_descriptor_info1 *descriptor = &descriptors->descriptors[i];
|
||||
+ uint32_t flags_mask = 0, uav_flags_mask = 0;
|
||||
|
||||
if (descriptor->type >= VKD3D_SHADER_DESCRIPTOR_TYPE_COUNT)
|
||||
validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_DESCRIPTOR_TYPE,
|
||||
@@ -10507,6 +10508,43 @@ static void vsir_validate_descriptors(struct validation_context *ctx)
|
||||
validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_DESCRIPTOR_COUNT,
|
||||
"Descriptor %u has invalid descriptor count %u starting at index %u.",
|
||||
i, descriptor->count, descriptor->register_index);
|
||||
+
|
||||
+ switch (descriptor->type)
|
||||
+ {
|
||||
+ case VKD3D_SHADER_DESCRIPTOR_TYPE_SRV:
|
||||
+ flags_mask = VKD3D_SHADER_DESCRIPTOR_INFO_FLAG_RAW_BUFFER;
|
||||
+ break;
|
||||
+
|
||||
+ case VKD3D_SHADER_DESCRIPTOR_TYPE_UAV:
|
||||
+ flags_mask = VKD3D_SHADER_DESCRIPTOR_INFO_FLAG_UAV_COUNTER
|
||||
+ | VKD3D_SHADER_DESCRIPTOR_INFO_FLAG_UAV_READ
|
||||
+ | VKD3D_SHADER_DESCRIPTOR_INFO_FLAG_UAV_ATOMICS
|
||||
+ | VKD3D_SHADER_DESCRIPTOR_INFO_FLAG_RAW_BUFFER;
|
||||
+ uav_flags_mask = VKD3DSUF_GLOBALLY_COHERENT
|
||||
+ | VKD3DSUF_RASTERISER_ORDERED_VIEW
|
||||
+ | VKD3DSUF_ORDER_PRESERVING_COUNTER;
|
||||
+ break;
|
||||
+
|
||||
+ case VKD3D_SHADER_DESCRIPTOR_TYPE_CBV:
|
||||
+ break;
|
||||
+
|
||||
+ case VKD3D_SHADER_DESCRIPTOR_TYPE_SAMPLER:
|
||||
+ flags_mask = VKD3D_SHADER_DESCRIPTOR_INFO_FLAG_SAMPLER_COMPARISON_MODE;
|
||||
+ break;
|
||||
+
|
||||
+ case VKD3D_SHADER_DESCRIPTOR_TYPE_FORCE_32BIT:
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ if (descriptor->flags & ~flags_mask)
|
||||
+ validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_FLAGS,
|
||||
+ "Descriptor %u of type %#x has invalid flags %#x.",
|
||||
+ i, descriptor->type, descriptor->flags);
|
||||
+
|
||||
+ if (descriptor->uav_flags & ~uav_flags_mask)
|
||||
+ validator_error(ctx, VKD3D_SHADER_ERROR_VSIR_INVALID_FLAGS,
|
||||
+ "Descriptor %u of type %#x has invalid UAV flags %#x.",
|
||||
+ i, descriptor->type, descriptor->uav_flags);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11441,6 +11479,14 @@ static const struct vsir_validator_instruction_desc vsir_validator_instructions[
|
||||
[VSIR_OP_IEQ] = {1, 2, vsir_validate_integer_comparison_operation},
|
||||
[VSIR_OP_IGE] = {1, 2, vsir_validate_integer_comparison_operation},
|
||||
[VSIR_OP_ILT] = {1, 2, vsir_validate_integer_comparison_operation},
|
||||
+ [VSIR_OP_IMAD] = {1, 3, vsir_validate_integer_elementwise_operation},
|
||||
+ [VSIR_OP_IMAX] = {1, 2, vsir_validate_integer_elementwise_operation},
|
||||
+ [VSIR_OP_IMIN] = {1, 2, vsir_validate_integer_elementwise_operation},
|
||||
+ [VSIR_OP_INE] = {1, 2, vsir_validate_integer_comparison_operation},
|
||||
+ [VSIR_OP_INEG] = {1, 1, vsir_validate_integer_elementwise_operation},
|
||||
+ [VSIR_OP_IREM] = {1, 2, vsir_validate_integer_elementwise_operation},
|
||||
+ [VSIR_OP_ISHL] = {1, 2, vsir_validate_integer_elementwise_operation},
|
||||
+ [VSIR_OP_ISHR] = {1, 2, vsir_validate_integer_elementwise_operation},
|
||||
[VSIR_OP_DCL_GS_INSTANCES] = {0, 0, vsir_validate_dcl_gs_instances},
|
||||
[VSIR_OP_DCL_HS_MAX_TESSFACTOR] = {0, 0, vsir_validate_dcl_hs_max_tessfactor},
|
||||
[VSIR_OP_DCL_INDEX_RANGE] = {0, 0, vsir_validate_dcl_index_range},
|
||||
diff --git a/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_private.h b/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_private.h
|
||||
index 5d7fc6e1209..978af0a2d17 100644
|
||||
--- a/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_private.h
|
||||
+++ b/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_private.h
|
||||
@@ -265,6 +265,7 @@ enum vkd3d_shader_error
|
||||
VKD3D_SHADER_ERROR_VSIR_INVALID_DESCRIPTOR_TYPE = 9024,
|
||||
VKD3D_SHADER_ERROR_VSIR_INVALID_RESOURCE_TYPE = 9025,
|
||||
VKD3D_SHADER_ERROR_VSIR_INVALID_DESCRIPTOR_COUNT = 9026,
|
||||
+ VKD3D_SHADER_ERROR_VSIR_INVALID_FLAGS = 9027,
|
||||
|
||||
VKD3D_SHADER_WARNING_VSIR_DYNAMIC_DESCRIPTOR_ARRAY = 9300,
|
||||
|
||||
diff --git a/libs/vkd3d/libs/vkd3d/state.c b/libs/vkd3d/libs/vkd3d/state.c
|
||||
index 0a5bd1122e3..9e9811bf922 100644
|
||||
--- a/libs/vkd3d/libs/vkd3d/state.c
|
||||
+++ b/libs/vkd3d/libs/vkd3d/state.c
|
||||
@@ -3232,17 +3232,6 @@ static HRESULT d3d12_pipeline_state_init_graphics(struct d3d12_pipeline_state *s
|
||||
uint32_t mask;
|
||||
HRESULT hr;
|
||||
|
||||
- static const DWORD default_ps_code[] =
|
||||
- {
|
||||
-#if 0
|
||||
- ps_4_0
|
||||
- ret
|
||||
-#endif
|
||||
- 0x43425844, 0x19cbf606, 0x18f562b9, 0xdaeed4db, 0xc324aa46, 0x00000001, 0x00000060, 0x00000003,
|
||||
- 0x0000002c, 0x0000003c, 0x0000004c, 0x4e475349, 0x00000008, 0x00000000, 0x00000008, 0x4e47534f,
|
||||
- 0x00000008, 0x00000000, 0x00000008, 0x52444853, 0x0000000c, 0x00000040, 0x00000003, 0x0100003e,
|
||||
- };
|
||||
- static const D3D12_SHADER_BYTECODE default_ps = {default_ps_code, sizeof(default_ps_code)};
|
||||
static const struct
|
||||
{
|
||||
enum VkShaderStageFlagBits stage;
|
||||
@@ -3401,11 +3390,10 @@ static HRESULT d3d12_pipeline_state_init_graphics(struct d3d12_pipeline_state *s
|
||||
|
||||
if (!desc->ps.pShaderBytecode)
|
||||
{
|
||||
- if (FAILED(hr = create_shader_stage(device, &graphics->stages[graphics->stage_count],
|
||||
- VK_SHADER_STAGE_FRAGMENT_BIT, &default_ps, NULL)))
|
||||
- goto fail;
|
||||
-
|
||||
- ++graphics->stage_count;
|
||||
+ for (i = 0; i < rt_count; i++)
|
||||
+ {
|
||||
+ graphics->blend_attachments[i].colorWriteMask = 0;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.50.1
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,27 +0,0 @@
|
||||
From f6b63c8ce9c20192debbe97b2e9673e382842b89 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 25 Jul 2025 07:41:13 +1000
|
||||
Subject: [PATCH] Updated vkd3d to b3e367b099cb65d79c5b0044134a02e7e9c285a5.
|
||||
|
||||
---
|
||||
libs/vkd3d/libs/vkd3d-shader/tpf.c | 4 +---
|
||||
1 file changed, 1 insertion(+), 3 deletions(-)
|
||||
|
||||
diff --git a/libs/vkd3d/libs/vkd3d-shader/tpf.c b/libs/vkd3d/libs/vkd3d-shader/tpf.c
|
||||
index 2175298a0db..bdb2083e09a 100644
|
||||
--- a/libs/vkd3d/libs/vkd3d-shader/tpf.c
|
||||
+++ b/libs/vkd3d/libs/vkd3d-shader/tpf.c
|
||||
@@ -1434,9 +1434,7 @@ static void init_sm4_lookup_tables(struct vkd3d_sm4_lookup_tables *lookup)
|
||||
* i -> VSIR_DATA_I32
|
||||
* u -> VSIR_DATA_U32
|
||||
* O -> VSIR_DATA_OPAQUE
|
||||
- * R -> VKD3D_DATA_RESOURCE
|
||||
- * S -> VKD3D_DATA_SAMPLER
|
||||
- * U -> VKD3D_DATA_UAV
|
||||
+ * * -> VSIR_DATA_UNUSED
|
||||
*/
|
||||
static const struct vkd3d_sm4_opcode_info opcode_table[] =
|
||||
{
|
||||
--
|
||||
2.50.1
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,48 +0,0 @@
|
||||
From 31ab77ada15b692f5b37d8ddf15f65c375860def Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Thu, 31 Jul 2025 09:06:17 +1000
|
||||
Subject: [PATCH] Updated vkd3d to 75cb4336ec1a0455c347db05b22dc0fd76dd8b5f.
|
||||
|
||||
---
|
||||
libs/vkd3d/libs/vkd3d-shader/ir.c | 11 +++++++++--
|
||||
1 file changed, 9 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/libs/vkd3d/libs/vkd3d-shader/ir.c b/libs/vkd3d/libs/vkd3d-shader/ir.c
|
||||
index 1098e4d3950..4c324fef7cf 100644
|
||||
--- a/libs/vkd3d/libs/vkd3d-shader/ir.c
|
||||
+++ b/libs/vkd3d/libs/vkd3d-shader/ir.c
|
||||
@@ -444,7 +444,14 @@ bool vsir_program_init(struct vsir_program *program, const struct vkd3d_shader_c
|
||||
program->shader_version = *version;
|
||||
program->cf_type = cf_type;
|
||||
program->normalisation_level = normalisation_level;
|
||||
- return shader_instruction_array_init(&program->instructions, reserve);
|
||||
+ if (!shader_instruction_array_init(&program->instructions, reserve))
|
||||
+ {
|
||||
+ if (program->free_parameters)
|
||||
+ vkd3d_free((void *)program->parameters);
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ return true;
|
||||
}
|
||||
|
||||
void vsir_program_cleanup(struct vsir_program *program)
|
||||
@@ -8744,6 +8751,7 @@ static void temp_allocator_set_dst(struct temp_allocator *allocator,
|
||||
enum vkd3d_result vsir_allocate_temp_registers(struct vsir_program *program,
|
||||
struct vkd3d_shader_message_context *message_context)
|
||||
{
|
||||
+ const unsigned int prev_temp_count = program->temp_count;
|
||||
struct temp_allocator allocator = {0};
|
||||
struct temp_allocator_reg *regs;
|
||||
struct liveness_tracker tracker;
|
||||
@@ -8766,7 +8774,6 @@ enum vkd3d_result vsir_allocate_temp_registers(struct vsir_program *program,
|
||||
for (unsigned int i = 0; i < program->ssa_count; ++i)
|
||||
{
|
||||
const struct liveness_tracker_reg *liveness_reg = &tracker.ssa_regs[i];
|
||||
- const unsigned int prev_temp_count = program->temp_count;
|
||||
struct temp_allocator_reg *reg = &allocator.ssa_regs[i];
|
||||
|
||||
if (temp_allocator_allocate(&allocator, &tracker, reg, liveness_reg, prev_temp_count))
|
||||
--
|
||||
2.50.1
|
||||
|
@@ -1,150 +0,0 @@
|
||||
From 6d9b7b4891f5ed2c30b6d383fe289637bcc2c6d9 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 1 Aug 2025 07:18:27 +1000
|
||||
Subject: [PATCH] Updated vkd3d to bd3d0f3495f6375901df9ca899accf8bc7a45345.
|
||||
|
||||
---
|
||||
dlls/msado15/tests/msado15.c | 2 +-
|
||||
.../include/private/vkd3d_shader_utils.h | 4 ----
|
||||
libs/vkd3d/libs/vkd3d-shader/dxil.c | 1 +
|
||||
libs/vkd3d/libs/vkd3d-shader/ir.c | 5 +----
|
||||
libs/vkd3d/libs/vkd3d/command.c | 21 +++++++++++++------
|
||||
libs/vkd3d/libs/vkd3d/state.c | 4 ++--
|
||||
6 files changed, 20 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/dlls/msado15/tests/msado15.c b/dlls/msado15/tests/msado15.c
|
||||
index 03eaab92b39..3f4b55d2916 100644
|
||||
--- a/dlls/msado15/tests/msado15.c
|
||||
+++ b/dlls/msado15/tests/msado15.c
|
||||
@@ -2023,8 +2023,8 @@ START_TEST(msado15)
|
||||
setup_database();
|
||||
|
||||
test_Connection();
|
||||
- test_Connection_Open();
|
||||
test_ConnectionPoint();
|
||||
+ test_Connection_Open();
|
||||
test_ADORecordsetConstruction(FALSE);
|
||||
test_ADORecordsetConstruction(TRUE);
|
||||
test_Fields();
|
||||
diff --git a/libs/vkd3d/include/private/vkd3d_shader_utils.h b/libs/vkd3d/include/private/vkd3d_shader_utils.h
|
||||
index 00052a89988..465734dfbff 100644
|
||||
--- a/libs/vkd3d/include/private/vkd3d_shader_utils.h
|
||||
+++ b/libs/vkd3d/include/private/vkd3d_shader_utils.h
|
||||
@@ -21,10 +21,6 @@
|
||||
|
||||
#include "vkd3d_shader.h"
|
||||
|
||||
-#define TAG_DXIL VKD3D_MAKE_TAG('D', 'X', 'I', 'L')
|
||||
-#define TAG_SHDR VKD3D_MAKE_TAG('S', 'H', 'D', 'R')
|
||||
-#define TAG_SHEX VKD3D_MAKE_TAG('S', 'H', 'E', 'X')
|
||||
-
|
||||
static inline enum vkd3d_result vkd3d_shader_parse_dxbc_source_type(const struct vkd3d_shader_code *dxbc,
|
||||
enum vkd3d_shader_source_type *type, char **messages)
|
||||
{
|
||||
diff --git a/libs/vkd3d/libs/vkd3d-shader/dxil.c b/libs/vkd3d/libs/vkd3d-shader/dxil.c
|
||||
index 19e9f54edda..02e72b28908 100644
|
||||
--- a/libs/vkd3d/libs/vkd3d-shader/dxil.c
|
||||
+++ b/libs/vkd3d/libs/vkd3d-shader/dxil.c
|
||||
@@ -8905,6 +8905,7 @@ static const enum vkd3d_shader_sysval_semantic sysval_semantic_table[] =
|
||||
[SEMANTIC_KIND_INSTANCEID] = VKD3D_SHADER_SV_INSTANCE_ID,
|
||||
[SEMANTIC_KIND_POSITION] = VKD3D_SHADER_SV_POSITION,
|
||||
[SEMANTIC_KIND_RTARRAYINDEX] = VKD3D_SHADER_SV_RENDER_TARGET_ARRAY_INDEX,
|
||||
+ [SEMANTIC_KIND_VIEWPORTARRAYINDEX] = VKD3D_SHADER_SV_VIEWPORT_ARRAY_INDEX,
|
||||
[SEMANTIC_KIND_CLIPDISTANCE] = VKD3D_SHADER_SV_CLIP_DISTANCE,
|
||||
[SEMANTIC_KIND_CULLDISTANCE] = VKD3D_SHADER_SV_CULL_DISTANCE,
|
||||
[SEMANTIC_KIND_PRIMITIVEID] = VKD3D_SHADER_SV_PRIMITIVE_ID,
|
||||
diff --git a/libs/vkd3d/libs/vkd3d-shader/ir.c b/libs/vkd3d/libs/vkd3d-shader/ir.c
|
||||
index 4c324fef7cf..76eb62cfd6f 100644
|
||||
--- a/libs/vkd3d/libs/vkd3d-shader/ir.c
|
||||
+++ b/libs/vkd3d/libs/vkd3d-shader/ir.c
|
||||
@@ -1752,14 +1752,11 @@ static enum vkd3d_result vsir_program_ensure_ret(struct vsir_program *program,
|
||||
struct vkd3d_shader_instruction *ins;
|
||||
|
||||
ins = vsir_program_iterator_tail(&it);
|
||||
-
|
||||
if (ins && ins->opcode == VSIR_OP_RET)
|
||||
return VKD3D_OK;
|
||||
|
||||
- if (!vsir_program_iterator_insert_after(&it, 1))
|
||||
+ if (!(ins = vsir_program_append(program)))
|
||||
return VKD3D_ERROR_OUT_OF_MEMORY;
|
||||
-
|
||||
- ins = vsir_program_iterator_next(&it);
|
||||
vsir_instruction_init(ins, &no_loc, VSIR_OP_RET);
|
||||
|
||||
return VKD3D_OK;
|
||||
diff --git a/libs/vkd3d/libs/vkd3d/command.c b/libs/vkd3d/libs/vkd3d/command.c
|
||||
index e487ed0b9ad..074d8430585 100644
|
||||
--- a/libs/vkd3d/libs/vkd3d/command.c
|
||||
+++ b/libs/vkd3d/libs/vkd3d/command.c
|
||||
@@ -4221,13 +4221,21 @@ static void STDMETHODCALLTYPE d3d12_command_list_RSSetViewports(ID3D12GraphicsCo
|
||||
TRACE("iface %p, viewport_count %u, viewports %p.\n", iface, viewport_count, viewports);
|
||||
|
||||
if (viewport_count > ARRAY_SIZE(vk_viewports))
|
||||
- {
|
||||
FIXME("Viewport count %u > D3D12_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE.\n", viewport_count);
|
||||
- viewport_count = ARRAY_SIZE(vk_viewports);
|
||||
- }
|
||||
|
||||
- for (i = 0; i < viewport_count; ++i)
|
||||
+ for (i = 0; i < ARRAY_SIZE(vk_viewports); ++i)
|
||||
{
|
||||
+ if (i >= viewport_count)
|
||||
+ {
|
||||
+ vk_viewports[i].x = 0.0f;
|
||||
+ vk_viewports[i].y = 0.0f;
|
||||
+ vk_viewports[i].width = 1.0f;
|
||||
+ vk_viewports[i].height = 1.0f;
|
||||
+ vk_viewports[i].minDepth = 0.0f;
|
||||
+ vk_viewports[i].maxDepth = 0.0f;
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
vk_viewports[i].x = viewports[i].TopLeftX;
|
||||
vk_viewports[i].y = viewports[i].TopLeftY + viewports[i].Height;
|
||||
vk_viewports[i].width = viewports[i].Width;
|
||||
@@ -4245,7 +4253,7 @@ static void STDMETHODCALLTYPE d3d12_command_list_RSSetViewports(ID3D12GraphicsCo
|
||||
}
|
||||
|
||||
vk_procs = &list->device->vk_procs;
|
||||
- VK_CALL(vkCmdSetViewport(list->vk_command_buffer, 0, viewport_count, vk_viewports));
|
||||
+ VK_CALL(vkCmdSetViewport(list->vk_command_buffer, 0, ARRAY_SIZE(vk_viewports), vk_viewports));
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d12_command_list_RSSetScissorRects(ID3D12GraphicsCommandList6 *iface,
|
||||
@@ -4264,6 +4272,7 @@ static void STDMETHODCALLTYPE d3d12_command_list_RSSetScissorRects(ID3D12Graphic
|
||||
rect_count = ARRAY_SIZE(vk_rects);
|
||||
}
|
||||
|
||||
+ memset(vk_rects, 0, sizeof(vk_rects));
|
||||
for (i = 0; i < rect_count; ++i)
|
||||
{
|
||||
vk_rects[i].offset.x = rects[i].left;
|
||||
@@ -4273,7 +4282,7 @@ static void STDMETHODCALLTYPE d3d12_command_list_RSSetScissorRects(ID3D12Graphic
|
||||
}
|
||||
|
||||
vk_procs = &list->device->vk_procs;
|
||||
- VK_CALL(vkCmdSetScissor(list->vk_command_buffer, 0, rect_count, vk_rects));
|
||||
+ VK_CALL(vkCmdSetScissor(list->vk_command_buffer, 0, ARRAY_SIZE(vk_rects), vk_rects));
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d12_command_list_OMSetBlendFactor(ID3D12GraphicsCommandList6 *iface,
|
||||
diff --git a/libs/vkd3d/libs/vkd3d/state.c b/libs/vkd3d/libs/vkd3d/state.c
|
||||
index 9e9811bf922..413892789ba 100644
|
||||
--- a/libs/vkd3d/libs/vkd3d/state.c
|
||||
+++ b/libs/vkd3d/libs/vkd3d/state.c
|
||||
@@ -3971,9 +3971,9 @@ VkPipeline d3d12_pipeline_state_get_or_create_pipeline(struct d3d12_pipeline_sta
|
||||
.sType = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO,
|
||||
.pNext = NULL,
|
||||
.flags = 0,
|
||||
- .viewportCount = 1,
|
||||
+ .viewportCount = D3D12_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE,
|
||||
.pViewports = NULL,
|
||||
- .scissorCount = 1,
|
||||
+ .scissorCount = D3D12_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE,
|
||||
.pScissors = NULL,
|
||||
};
|
||||
static const VkDynamicState dynamic_states[] =
|
||||
--
|
||||
2.50.1
|
||||
|
@@ -1,193 +0,0 @@
|
||||
From 1031928bdeb67d2a9f6af25ec7948dca4b24bd10 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Tue, 5 Aug 2025 13:30:41 +1000
|
||||
Subject: [PATCH] Updated vkd3d to 721859005f3edfb3d52bc0f810d1da4fe2e5174b.
|
||||
|
||||
---
|
||||
libs/vkd3d/libs/vkd3d-shader/dxil.c | 6 ++--
|
||||
libs/vkd3d/libs/vkd3d-shader/hlsl_codegen.c | 34 ++++++-------------
|
||||
libs/vkd3d/libs/vkd3d-shader/ir.c | 7 ++--
|
||||
libs/vkd3d/libs/vkd3d-shader/msl.c | 3 ++
|
||||
.../libs/vkd3d-shader/vkd3d_shader_main.c | 3 ++
|
||||
5 files changed, 26 insertions(+), 27 deletions(-)
|
||||
|
||||
diff --git a/libs/vkd3d/libs/vkd3d-shader/dxil.c b/libs/vkd3d/libs/vkd3d-shader/dxil.c
|
||||
index 02e72b28908..c448e000cf9 100644
|
||||
--- a/libs/vkd3d/libs/vkd3d-shader/dxil.c
|
||||
+++ b/libs/vkd3d/libs/vkd3d-shader/dxil.c
|
||||
@@ -3969,6 +3969,7 @@ static bool resolve_forward_zero_initialiser(size_t index, struct sm6_parser *sm
|
||||
|
||||
static enum vkd3d_result sm6_parser_globals_init(struct sm6_parser *sm6)
|
||||
{
|
||||
+ struct vsir_program_iterator it = vsir_program_iterator(&sm6->p.program->instructions);
|
||||
size_t i, count, base_value_idx = sm6->value_count;
|
||||
const struct dxil_block *block = &sm6->root_block;
|
||||
struct vkd3d_shader_instruction *ins;
|
||||
@@ -4028,9 +4029,8 @@ static enum vkd3d_result sm6_parser_globals_init(struct sm6_parser *sm6)
|
||||
}
|
||||
|
||||
/* Resolve initialiser forward references. */
|
||||
- for (i = 0; i < sm6->p.program->instructions.count; ++i)
|
||||
+ for (ins = vsir_program_iterator_head(&it); ins; ins = vsir_program_iterator_next(&it))
|
||||
{
|
||||
- ins = &sm6->p.program->instructions.elements[i];
|
||||
if (ins->opcode == VSIR_OP_DCL_INDEXABLE_TEMP && ins->declaration.indexable_temp.initialiser)
|
||||
{
|
||||
ins->declaration.indexable_temp.initialiser = resolve_forward_initialiser(
|
||||
@@ -4098,6 +4098,8 @@ static enum vkd3d_shader_register_type register_type_from_dxil_semantic_kind(
|
||||
|
||||
switch (sysval_semantic)
|
||||
{
|
||||
+ case VKD3D_SHADER_SV_PRIMITIVE_ID:
|
||||
+ return VKD3DSPR_PRIMID;
|
||||
/* VSIR does not use an I/O register for SV_SampleIndex, but its
|
||||
* signature element has a register index of UINT_MAX and it is
|
||||
* convenient to return a valid register type here to handle it. */
|
||||
diff --git a/libs/vkd3d/libs/vkd3d-shader/hlsl_codegen.c b/libs/vkd3d/libs/vkd3d-shader/hlsl_codegen.c
|
||||
index 0b28aa6fe80..5a11547e7a1 100644
|
||||
--- a/libs/vkd3d/libs/vkd3d-shader/hlsl_codegen.c
|
||||
+++ b/libs/vkd3d/libs/vkd3d-shader/hlsl_codegen.c
|
||||
@@ -8282,7 +8282,6 @@ static uint32_t generate_vsir_get_src_swizzle(uint32_t src_writemask, uint32_t d
|
||||
static void sm1_generate_vsir_constant_defs(struct hlsl_ctx *ctx, struct vsir_program *program,
|
||||
struct hlsl_block *block)
|
||||
{
|
||||
- struct vkd3d_shader_instruction_array *instructions = &program->instructions;
|
||||
struct vkd3d_shader_dst_param *dst_param;
|
||||
struct vkd3d_shader_src_param *src_param;
|
||||
struct vkd3d_shader_instruction *ins;
|
||||
@@ -8292,19 +8291,17 @@ static void sm1_generate_vsir_constant_defs(struct hlsl_ctx *ctx, struct vsir_pr
|
||||
{
|
||||
const struct hlsl_constant_register *constant_reg = &ctx->constant_defs.regs[i];
|
||||
|
||||
- if (!shader_instruction_array_reserve(instructions, instructions->count + 1))
|
||||
+ if (!(ins = vsir_program_append(program)))
|
||||
{
|
||||
ctx->result = VKD3D_ERROR_OUT_OF_MEMORY;
|
||||
return;
|
||||
}
|
||||
-
|
||||
- ins = &instructions->elements[instructions->count];
|
||||
if (!vsir_instruction_init_with_params(program, ins, &constant_reg->loc, VSIR_OP_DEF, 1, 1))
|
||||
{
|
||||
+ vsir_instruction_init(ins, &constant_reg->loc, VSIR_OP_NOP);
|
||||
ctx->result = VKD3D_ERROR_OUT_OF_MEMORY;
|
||||
return;
|
||||
}
|
||||
- ++instructions->count;
|
||||
|
||||
dst_param = &ins->dst[0];
|
||||
vsir_register_init(&dst_param->reg, VKD3DSPR_CONST, VSIR_DATA_F32, 1);
|
||||
@@ -8328,7 +8325,6 @@ static void sm1_generate_vsir_constant_defs(struct hlsl_ctx *ctx, struct vsir_pr
|
||||
static void sm1_generate_vsir_sampler_dcls(struct hlsl_ctx *ctx,
|
||||
struct vsir_program *program, struct hlsl_block *block)
|
||||
{
|
||||
- struct vkd3d_shader_instruction_array *instructions = &program->instructions;
|
||||
enum vkd3d_shader_resource_type resource_type;
|
||||
struct vkd3d_shader_register_range *range;
|
||||
struct vkd3d_shader_dst_param *dst_param;
|
||||
@@ -8375,20 +8371,13 @@ static void sm1_generate_vsir_sampler_dcls(struct hlsl_ctx *ctx,
|
||||
break;
|
||||
}
|
||||
|
||||
- if (!shader_instruction_array_reserve(instructions, instructions->count + 1))
|
||||
- {
|
||||
- ctx->result = VKD3D_ERROR_OUT_OF_MEMORY;
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- ins = &instructions->elements[instructions->count];
|
||||
- if (!vsir_instruction_init_with_params(program, ins, &var->loc, VSIR_OP_DCL, 0, 0))
|
||||
+ if (!(ins = vsir_program_append(program)))
|
||||
{
|
||||
ctx->result = VKD3D_ERROR_OUT_OF_MEMORY;
|
||||
return;
|
||||
}
|
||||
- ++instructions->count;
|
||||
|
||||
+ vsir_instruction_init(ins, &var->loc, VSIR_OP_DCL);
|
||||
semantic = &ins->declaration.semantic;
|
||||
semantic->resource_type = resource_type;
|
||||
|
||||
@@ -8438,26 +8427,25 @@ static enum vkd3d_shader_register_type sm4_get_semantic_register_type(enum vkd3d
|
||||
return VKD3DSPR_INPUT;
|
||||
}
|
||||
|
||||
-static struct vkd3d_shader_instruction *generate_vsir_add_program_instruction(
|
||||
- struct hlsl_ctx *ctx, struct vsir_program *program,
|
||||
- const struct vkd3d_shader_location *loc, enum vkd3d_shader_opcode opcode,
|
||||
- unsigned int dst_count, unsigned int src_count)
|
||||
+static struct vkd3d_shader_instruction *generate_vsir_add_program_instruction(struct hlsl_ctx *ctx,
|
||||
+ struct vsir_program *program, const struct vkd3d_shader_location *loc,
|
||||
+ enum vkd3d_shader_opcode opcode, unsigned int dst_count, unsigned int src_count)
|
||||
{
|
||||
- struct vkd3d_shader_instruction_array *instructions = &program->instructions;
|
||||
struct vkd3d_shader_instruction *ins;
|
||||
|
||||
- if (!shader_instruction_array_reserve(instructions, instructions->count + 1))
|
||||
+ if (!(ins = vsir_program_append(program)))
|
||||
{
|
||||
ctx->result = VKD3D_ERROR_OUT_OF_MEMORY;
|
||||
return NULL;
|
||||
}
|
||||
- ins = &instructions->elements[instructions->count];
|
||||
+
|
||||
if (!vsir_instruction_init_with_params(program, ins, loc, opcode, dst_count, src_count))
|
||||
{
|
||||
+ vsir_instruction_init(ins, loc, VSIR_OP_NOP);
|
||||
ctx->result = VKD3D_ERROR_OUT_OF_MEMORY;
|
||||
return NULL;
|
||||
}
|
||||
- ++instructions->count;
|
||||
+
|
||||
return ins;
|
||||
}
|
||||
|
||||
diff --git a/libs/vkd3d/libs/vkd3d-shader/ir.c b/libs/vkd3d/libs/vkd3d-shader/ir.c
|
||||
index 76eb62cfd6f..9d93936ac9e 100644
|
||||
--- a/libs/vkd3d/libs/vkd3d-shader/ir.c
|
||||
+++ b/libs/vkd3d/libs/vkd3d-shader/ir.c
|
||||
@@ -12064,8 +12064,11 @@ enum vkd3d_result vsir_program_transform(struct vsir_program *program, uint64_t
|
||||
vsir_transform(&ctx, vsir_program_materialise_phi_ssas_to_temps);
|
||||
vsir_transform(&ctx, vsir_program_lower_switch_to_selection_ladder);
|
||||
vsir_transform(&ctx, vsir_program_structurize);
|
||||
- vsir_transform(&ctx, vsir_program_flatten_control_flow_constructs);
|
||||
- vsir_transform(&ctx, vsir_program_materialize_undominated_ssas_to_temps);
|
||||
+ if (compile_info->target_type != VKD3D_SHADER_TARGET_MSL)
|
||||
+ {
|
||||
+ vsir_transform(&ctx, vsir_program_flatten_control_flow_constructs);
|
||||
+ vsir_transform(&ctx, vsir_program_materialize_undominated_ssas_to_temps);
|
||||
+ }
|
||||
}
|
||||
else
|
||||
{
|
||||
diff --git a/libs/vkd3d/libs/vkd3d-shader/msl.c b/libs/vkd3d/libs/vkd3d-shader/msl.c
|
||||
index d07608bd26f..c6e048adb20 100644
|
||||
--- a/libs/vkd3d/libs/vkd3d-shader/msl.c
|
||||
+++ b/libs/vkd3d/libs/vkd3d-shader/msl.c
|
||||
@@ -2196,6 +2196,9 @@ int msl_compile(struct vsir_program *program, uint64_t config_flags,
|
||||
if ((ret = vsir_program_transform(program, config_flags, compile_info, message_context)) < 0)
|
||||
return ret;
|
||||
|
||||
+ if ((ret = vsir_allocate_temp_registers(program, message_context)) < 0)
|
||||
+ return ret;
|
||||
+
|
||||
VKD3D_ASSERT(program->normalisation_level == VSIR_NORMALISED_SM6);
|
||||
VKD3D_ASSERT(program->has_descriptor_info);
|
||||
|
||||
diff --git a/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_main.c b/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_main.c
|
||||
index 2b73771d0a6..891a33d326f 100644
|
||||
--- a/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_main.c
|
||||
+++ b/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_main.c
|
||||
@@ -2119,6 +2119,9 @@ const enum vkd3d_shader_target_type *vkd3d_shader_get_supported_target_types(
|
||||
VKD3D_SHADER_TARGET_SPIRV_TEXT,
|
||||
# endif
|
||||
VKD3D_SHADER_TARGET_D3D_ASM,
|
||||
+#ifdef VKD3D_SHADER_UNSUPPORTED_MSL
|
||||
+ VKD3D_SHADER_TARGET_MSL,
|
||||
+#endif
|
||||
};
|
||||
|
||||
static const enum vkd3d_shader_target_type fx_types[] =
|
||||
--
|
||||
2.50.1
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user