From: Zebediah Figura zfigura@codeweavers.com
Not just those belonging to earlier completed command buffers.
completed_command_buffer_id names the most recent command buffer to be completed. In essence, this fixes an off-by-one error. --- dlls/wined3d/context_vk.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/dlls/wined3d/context_vk.c b/dlls/wined3d/context_vk.c index 769e5347cc5..1acb8a8d201 100644 --- a/dlls/wined3d/context_vk.c +++ b/dlls/wined3d/context_vk.c @@ -667,7 +667,7 @@ void wined3d_context_vk_destroy_vk_framebuffer(struct wined3d_context_vk *contex const struct wined3d_vk_info *vk_info = context_vk->vk_info; struct wined3d_retired_object_vk *o;
- if (context_vk->completed_command_buffer_id > command_buffer_id) + if (context_vk->completed_command_buffer_id >= command_buffer_id) { VK_CALL(vkDestroyFramebuffer(device_vk->vk_device, vk_framebuffer, NULL)); TRACE("Destroyed framebuffer 0x%s.\n", wine_dbgstr_longlong(vk_framebuffer)); @@ -708,7 +708,7 @@ static void wined3d_context_vk_reset_vk_descriptor_pool(struct wined3d_context_v { struct wined3d_retired_object_vk *o;
- if (context_vk->completed_command_buffer_id > command_buffer_id) + if (context_vk->completed_command_buffer_id >= command_buffer_id) { wined3d_context_vk_return_vk_descriptor_pool(context_vk, vk_descriptor_pool); TRACE("Reset descriptor pool 0x%s.\n", wine_dbgstr_longlong(vk_descriptor_pool)); @@ -733,7 +733,7 @@ void wined3d_context_vk_destroy_vk_memory(struct wined3d_context_vk *context_vk, const struct wined3d_vk_info *vk_info = context_vk->vk_info; struct wined3d_retired_object_vk *o;
- if (context_vk->completed_command_buffer_id > command_buffer_id) + if (context_vk->completed_command_buffer_id >= command_buffer_id) { VK_CALL(vkFreeMemory(device_vk->vk_device, vk_memory, NULL)); TRACE("Freed memory 0x%s.\n", wine_dbgstr_longlong(vk_memory)); @@ -756,7 +756,7 @@ void wined3d_context_vk_destroy_allocator_block(struct wined3d_context_vk *conte { struct wined3d_retired_object_vk *o;
- if (context_vk->completed_command_buffer_id > command_buffer_id) + if (context_vk->completed_command_buffer_id >= command_buffer_id) { wined3d_context_vk_free_memory(context_vk, block); TRACE("Freed block %p.\n", block); @@ -811,7 +811,7 @@ static void wined3d_context_vk_destroy_bo_slab_slice(struct wined3d_context_vk * { struct wined3d_retired_object_vk *o;
- if (context_vk->completed_command_buffer_id > command_buffer_id) + if (context_vk->completed_command_buffer_id >= command_buffer_id) { wined3d_bo_slab_vk_free_slice(slab, idx, context_vk); return; @@ -836,7 +836,7 @@ static void wined3d_context_vk_destroy_vk_buffer(struct wined3d_context_vk *cont const struct wined3d_vk_info *vk_info = context_vk->vk_info; struct wined3d_retired_object_vk *o;
- if (context_vk->completed_command_buffer_id > command_buffer_id) + if (context_vk->completed_command_buffer_id >= command_buffer_id) { VK_CALL(vkDestroyBuffer(device_vk->vk_device, vk_buffer, NULL)); TRACE("Destroyed buffer 0x%s.\n", wine_dbgstr_longlong(vk_buffer)); @@ -861,7 +861,7 @@ void wined3d_context_vk_destroy_vk_image(struct wined3d_context_vk *context_vk, const struct wined3d_vk_info *vk_info = context_vk->vk_info; struct wined3d_retired_object_vk *o;
- if (context_vk->completed_command_buffer_id > command_buffer_id) + if (context_vk->completed_command_buffer_id >= command_buffer_id) { VK_CALL(vkDestroyImage(device_vk->vk_device, vk_image, NULL)); TRACE("Destroyed image 0x%s.\n", wine_dbgstr_longlong(vk_image)); @@ -886,7 +886,7 @@ void wined3d_context_vk_destroy_vk_buffer_view(struct wined3d_context_vk *contex const struct wined3d_vk_info *vk_info = context_vk->vk_info; struct wined3d_retired_object_vk *o;
- if (context_vk->completed_command_buffer_id > command_buffer_id) + if (context_vk->completed_command_buffer_id >= command_buffer_id) { VK_CALL(vkDestroyBufferView(device_vk->vk_device, vk_view, NULL)); TRACE("Destroyed buffer view 0x%s.\n", wine_dbgstr_longlong(vk_view)); @@ -911,7 +911,7 @@ void wined3d_context_vk_destroy_vk_image_view(struct wined3d_context_vk *context const struct wined3d_vk_info *vk_info = context_vk->vk_info; struct wined3d_retired_object_vk *o;
- if (context_vk->completed_command_buffer_id > command_buffer_id) + if (context_vk->completed_command_buffer_id >= command_buffer_id) { VK_CALL(vkDestroyImageView(device_vk->vk_device, vk_view, NULL)); TRACE("Destroyed image view 0x%s.\n", wine_dbgstr_longlong(vk_view)); @@ -971,7 +971,7 @@ void wined3d_context_vk_destroy_vk_pipeline(struct wined3d_context_vk *context_v const struct wined3d_vk_info *vk_info = context_vk->vk_info; struct wined3d_retired_object_vk *o;
- if (context_vk->completed_command_buffer_id > command_buffer_id) + if (context_vk->completed_command_buffer_id >= command_buffer_id) { VK_CALL(vkDestroyPipeline(device_vk->vk_device, vk_pipeline, NULL)); TRACE("Destroyed pipeline 0x%s.\n", wine_dbgstr_longlong(vk_pipeline)); @@ -997,7 +997,7 @@ void wined3d_context_vk_destroy_vk_sampler(struct wined3d_context_vk *context_vk const struct wined3d_vk_info *vk_info = context_vk->vk_info; struct wined3d_retired_object_vk *o;
- if (context_vk->completed_command_buffer_id > command_buffer_id) + if (context_vk->completed_command_buffer_id >= command_buffer_id) { VK_CALL(vkDestroySampler(device_vk->vk_device, vk_sampler, NULL)); TRACE("Destroyed sampler 0x%s.\n", wine_dbgstr_longlong(vk_sampler)); @@ -1022,7 +1022,7 @@ void wined3d_context_vk_destroy_vk_event(struct wined3d_context_vk *context_vk, const struct wined3d_vk_info *vk_info = context_vk->vk_info; struct wined3d_retired_object_vk *o;
- if (context_vk->completed_command_buffer_id > command_buffer_id) + if (context_vk->completed_command_buffer_id >= command_buffer_id) { VK_CALL(vkDestroyEvent(device_vk->vk_device, vk_event, NULL)); TRACE("Destroyed event 0x%s.\n", wine_dbgstr_longlong(vk_event));
From: Zebediah Figura zfigura@codeweavers.com
Not just those belonging to earlier completed fences.
completed_fence_id names the most recent fence to be completed. In essence, this fixes an off-by-one error.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53217 --- dlls/d3d11/tests/d3d11.c | 3 +++ dlls/wined3d/context_gl.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index de548672c2b..50e91d5e7d4 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -34942,6 +34942,9 @@ START_TEST(d3d11)
print_adapter_info();
+ test_cube_maps(); + return; + queue_test(test_create_device); queue_for_each_feature_level(test_device_interfaces); queue_test(test_immediate_context); diff --git a/dlls/wined3d/context_gl.c b/dlls/wined3d/context_gl.c index 0217e12d903..5574997bf05 100644 --- a/dlls/wined3d/context_gl.c +++ b/dlls/wined3d/context_gl.c @@ -2726,7 +2726,7 @@ static void wined3d_context_gl_destroy_allocator_block(struct wined3d_context_gl struct wined3d_device_gl *device_gl = wined3d_device_gl(context_gl->c.device); struct wined3d_retired_block_gl *r;
- if (device_gl->completed_fence_id > fence_id) + if (device_gl->completed_fence_id >= fence_id) { wined3d_device_gl_free_memory(device_gl, block); TRACE("Freed block %p.\n", block);