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
136 lines
6.6 KiB
Diff
136 lines
6.6 KiB
Diff
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
|
|
|