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
134 lines
5.5 KiB
Diff
134 lines
5.5 KiB
Diff
From 38b9415c7e850a1774d508232dd0e5e97e505eab Mon Sep 17 00:00:00 2001
|
|
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
|
Date: Sat, 23 Aug 2025 07:27:59 +1000
|
|
Subject: [PATCH] Updated vkd3d to d0098b0d5968d1969ec622b91fd360fd0aec2328.
|
|
|
|
---
|
|
libs/vkd3d/libs/vkd3d-shader/glsl.c | 9 +--------
|
|
libs/vkd3d/libs/vkd3d-shader/hlsl.l | 2 +-
|
|
libs/vkd3d/libs/vkd3d-shader/preproc.l | 12 ++----------
|
|
libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_main.c | 7 ++++++-
|
|
libs/vkd3d/libs/vkd3d/utils.c | 3 ++-
|
|
5 files changed, 12 insertions(+), 21 deletions(-)
|
|
|
|
diff --git a/libs/vkd3d/libs/vkd3d-shader/glsl.c b/libs/vkd3d/libs/vkd3d-shader/glsl.c
|
|
index 5988e7b3a30..acc30b998f6 100644
|
|
--- a/libs/vkd3d/libs/vkd3d-shader/glsl.c
|
|
+++ b/libs/vkd3d/libs/vkd3d-shader/glsl.c
|
|
@@ -2329,7 +2329,6 @@ static int vkd3d_glsl_generator_generate(struct vkd3d_glsl_generator *gen, struc
|
|
struct vkd3d_string_buffer *buffer = gen->buffer;
|
|
struct vkd3d_shader_instruction *ins;
|
|
struct vsir_program_iterator it;
|
|
- void *code;
|
|
|
|
MESSAGE("Generating a GLSL shader. This is unsupported; you get to keep all the pieces if it breaks.\n");
|
|
|
|
@@ -2358,13 +2357,7 @@ static int vkd3d_glsl_generator_generate(struct vkd3d_glsl_generator *gen, struc
|
|
if (gen->failed)
|
|
return VKD3D_ERROR_INVALID_SHADER;
|
|
|
|
- if ((code = vkd3d_malloc(buffer->buffer_size)))
|
|
- {
|
|
- memcpy(code, buffer->buffer, buffer->content_size);
|
|
- out->size = buffer->content_size;
|
|
- out->code = code;
|
|
- }
|
|
- else return VKD3D_ERROR_OUT_OF_MEMORY;
|
|
+ vkd3d_shader_code_from_string_buffer(out, buffer);
|
|
|
|
return VKD3D_OK;
|
|
}
|
|
diff --git a/libs/vkd3d/libs/vkd3d-shader/hlsl.l b/libs/vkd3d/libs/vkd3d-shader/hlsl.l
|
|
index 0cdebb8a657..da9f0d39136 100644
|
|
--- a/libs/vkd3d/libs/vkd3d-shader/hlsl.l
|
|
+++ b/libs/vkd3d/libs/vkd3d-shader/hlsl.l
|
|
@@ -346,7 +346,7 @@ while {return KW_WHILE; }
|
|
<pp>{ANY} {}
|
|
|
|
{ANY} {
|
|
- return yytext[0];
|
|
+ return (unsigned char)yytext[0];
|
|
}
|
|
|
|
%%
|
|
diff --git a/libs/vkd3d/libs/vkd3d-shader/preproc.l b/libs/vkd3d/libs/vkd3d-shader/preproc.l
|
|
index 5c56fba0229..f9b1d67ac36 100644
|
|
--- a/libs/vkd3d/libs/vkd3d-shader/preproc.l
|
|
+++ b/libs/vkd3d/libs/vkd3d-shader/preproc.l
|
|
@@ -824,7 +824,6 @@ int preproc_lexer_parse(const struct vkd3d_shader_compile_info *compile_info,
|
|
static const struct vkd3d_shader_preprocess_info default_preprocess_info = {0};
|
|
struct preproc_ctx ctx = {0};
|
|
char *source_name = NULL;
|
|
- void *output_code;
|
|
unsigned int i;
|
|
|
|
vkd3d_string_buffer_init(&ctx.buffer);
|
|
@@ -901,16 +900,9 @@ int preproc_lexer_parse(const struct vkd3d_shader_compile_info *compile_info,
|
|
return VKD3D_ERROR_INVALID_SHADER;
|
|
}
|
|
|
|
- if (!(output_code = vkd3d_malloc(ctx.buffer.content_size)))
|
|
- {
|
|
- vkd3d_string_buffer_cleanup(&ctx.buffer);
|
|
- return VKD3D_ERROR_OUT_OF_MEMORY;
|
|
- }
|
|
- memcpy(output_code, ctx.buffer.buffer, ctx.buffer.content_size);
|
|
- out->size = ctx.buffer.content_size;
|
|
- out->code = output_code;
|
|
vkd3d_string_buffer_trace(&ctx.buffer);
|
|
- vkd3d_string_buffer_cleanup(&ctx.buffer);
|
|
+
|
|
+ vkd3d_shader_code_from_string_buffer(out, &ctx.buffer);
|
|
return VKD3D_OK;
|
|
|
|
fail:
|
|
diff --git a/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_main.c b/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_main.c
|
|
index 75b7f9aa769..08450b4cf85 100644
|
|
--- a/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_main.c
|
|
+++ b/libs/vkd3d/libs/vkd3d-shader/vkd3d_shader_main.c
|
|
@@ -2266,6 +2266,7 @@ int vkd3d_shader_preprocess(const struct vkd3d_shader_compile_info *compile_info
|
|
struct vkd3d_shader_code *out, char **messages)
|
|
{
|
|
struct vkd3d_shader_message_context message_context;
|
|
+ struct shader_dump_data dump_data;
|
|
int ret;
|
|
|
|
TRACE("compile_info %p, out %p, messages %p.\n", compile_info, out, messages);
|
|
@@ -2278,7 +2279,11 @@ int vkd3d_shader_preprocess(const struct vkd3d_shader_compile_info *compile_info
|
|
|
|
vkd3d_shader_message_context_init(&message_context, compile_info->log_level);
|
|
|
|
- ret = preproc_lexer_parse(compile_info, out, &message_context);
|
|
+ fill_shader_dump_data(compile_info, &dump_data);
|
|
+ vkd3d_shader_dump_shader(&dump_data, compile_info->source.code, compile_info->source.size, SHADER_DUMP_TYPE_SOURCE);
|
|
+
|
|
+ if ((ret = preproc_lexer_parse(compile_info, out, &message_context)) >= 0)
|
|
+ vkd3d_shader_dump_shader(&dump_data, out->code, out->size, SHADER_DUMP_TYPE_PREPROC);
|
|
|
|
vkd3d_shader_message_context_trace_messages(&message_context);
|
|
if (!vkd3d_shader_message_context_copy_messages(&message_context, messages))
|
|
diff --git a/libs/vkd3d/libs/vkd3d/utils.c b/libs/vkd3d/libs/vkd3d/utils.c
|
|
index c2832a61f67..2d0510e5456 100644
|
|
--- a/libs/vkd3d/libs/vkd3d/utils.c
|
|
+++ b/libs/vkd3d/libs/vkd3d/utils.c
|
|
@@ -703,7 +703,7 @@ const char *debug_vk_extent_3d(VkExtent3D extent)
|
|
|
|
const char *debug_vk_queue_flags(VkQueueFlags flags)
|
|
{
|
|
- char buffer[191];
|
|
+ char buffer[222];
|
|
|
|
buffer[0] = '\0';
|
|
#define FLAG_TO_STR(f) if (flags & f) { strcat(buffer, " | "#f); flags &= ~f; }
|
|
@@ -716,6 +716,7 @@ const char *debug_vk_queue_flags(VkQueueFlags flags)
|
|
#define FLAG_TO_STR(f, n) if (flags & f) { strcat(buffer, " | "#n); flags &= ~f; }
|
|
FLAG_TO_STR(0x20, VK_QUEUE_VIDEO_DECODE_BIT_KHR)
|
|
FLAG_TO_STR(0x40, VK_QUEUE_VIDEO_ENCODE_BIT_KHR)
|
|
+ FLAG_TO_STR(0x100, VK_QUEUE_OPTICAL_FLOW_BIT_NV)
|
|
#undef FLAG_TO_STR
|
|
if (flags)
|
|
FIXME("Unrecognized flag(s) %#x.\n", flags);
|
|
--
|
|
2.51.0
|
|
|