From f9c5176ad8f0fed79930bdeb9c6895eb5a09c548 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20D=C3=B6singer?= Date: Wed, 27 Sep 2023 22:43:50 +0300 Subject: [PATCH] wined3d: Reference the push constant buffers. --- dlls/wined3d/cs.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index 3cfce72ae94..50d89615dd3 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -1056,6 +1056,11 @@ static void reference_graphics_pipeline_resources(struct wined3d_device_context if (state->fb.render_targets[i]) wined3d_device_context_reference_resource(context, state->fb.render_targets[i]->resource); } + for (i = 0; i < WINED3D_PUSH_CONSTANTS_COUNT; ++i) + { + if (context->device->push_constants[i]) + wined3d_device_context_reference_resource(context, &context->device->push_constants[i]->resource); + } if (state->fb.depth_stencil) wined3d_device_context_reference_resource(context, state->fb.depth_stencil->resource); reference_shader_resources(context, ~(1u << WINED3D_SHADER_TYPE_COMPUTE));