From 5265fbb789703b79ef83a32ed625b9b9fa118331 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Thu, 30 May 2024 13:59:36 +0200 Subject: [PATCH] vkd3d-shader/fx: Do not write shared buffers block when not compiling as a child effect. Signed-off-by: Nikolay Sivov --- libs/vkd3d-shader/fx.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libs/vkd3d-shader/fx.c b/libs/vkd3d-shader/fx.c index 57b4ac24..d8653dbf 100644 --- a/libs/vkd3d-shader/fx.c +++ b/libs/vkd3d-shader/fx.c @@ -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)