vkd3d-shader/fx: Do not write shared buffers block when not compiling as a child effect.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
Nikolay Sivov 2024-05-30 13:59:36 +02:00 committed by Alexandre Julliard
parent 727aacca18
commit 5265fbb789
Notes: Alexandre Julliard 2024-05-30 23:27:27 +02:00
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/897

View File

@ -1464,6 +1464,9 @@ static void write_buffers(struct fx_write_context *fx, bool shared)
{
struct hlsl_buffer *buffer;
if (shared && !fx->child_effect)
return;
LIST_FOR_EACH_ENTRY(buffer, &fx->ctx->buffers, struct hlsl_buffer, entry)
{
if (!buffer->size && !fx->include_empty_buffers)