From: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- v2: Retain the trace...
dlls/wined3d/adapter_gl.c | 2 +- dlls/wined3d/device.c | 10 +++++----- dlls/wined3d/wined3d_private.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c index fc7a8964923..6cc2f0cd9a8 100644 --- a/dlls/wined3d/adapter_gl.c +++ b/dlls/wined3d/adapter_gl.c @@ -4577,7 +4577,7 @@ static void adapter_gl_uninit_3d(struct wined3d_device *device) TRACE("device %p.\n", device);
wined3d_device_destroy_default_samplers(device); - wined3d_cs_destroy_object(device->cs, wined3d_device_delete_opengl_contexts_cs, device); + wined3d_cs_destroy_object(device->cs, wined3d_device_gl_delete_opengl_contexts_cs, wined3d_device_gl(device)); wined3d_cs_finish(device->cs, WINED3D_CS_QUEUE_DEFAULT); }
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 067d54d58e3..93c738ad955 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -955,18 +955,18 @@ static void device_init_swapchain_state(struct wined3d_device *device, struct wi wined3d_device_context_set_depth_stencil_view(context, ds_enable ? device->auto_depth_stencil_view : NULL); }
-void wined3d_device_delete_opengl_contexts_cs(void *object) +void wined3d_device_gl_delete_opengl_contexts_cs(void *object) { + struct wined3d_device_gl *device_gl = object; struct wined3d_swapchain_gl *swapchain_gl; - struct wined3d_device *device = object; struct wined3d_context_gl *context_gl; - struct wined3d_device_gl *device_gl; struct wined3d_context *context; + struct wined3d_device *device; struct wined3d_shader *shader;
- TRACE("device %p.\n", device); + TRACE("device %p.\n", device_gl);
- device_gl = wined3d_device_gl(device); + device = &device_gl->d;
LIST_FOR_EACH_ENTRY(shader, &device->shaders, struct wined3d_shader, shader_list_entry) { diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index c8f24c41fd5..ecb5182eb13 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -3920,7 +3920,6 @@ BOOL device_context_add(struct wined3d_device *device, struct wined3d_context *c void device_context_remove(struct wined3d_device *device, struct wined3d_context *context) DECLSPEC_HIDDEN; void wined3d_device_create_default_samplers(struct wined3d_device *device, struct wined3d_context *context) DECLSPEC_HIDDEN; -void wined3d_device_delete_opengl_contexts_cs(void *object) DECLSPEC_HIDDEN; void wined3d_device_destroy_default_samplers(struct wined3d_device *device) DECLSPEC_HIDDEN; HRESULT wined3d_device_init(struct wined3d_device *device, struct wined3d *wined3d, unsigned int adapter_idx, enum wined3d_device_type device_type, HWND focus_window, unsigned int flags, @@ -3964,6 +3963,7 @@ static inline struct wined3d_device_gl *wined3d_device_gl(struct wined3d_device }
void wined3d_device_gl_create_primary_opengl_context_cs(void *object) DECLSPEC_HIDDEN; +void wined3d_device_gl_delete_opengl_contexts_cs(void *object) DECLSPEC_HIDDEN;
struct wined3d_null_resources_vk {
Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- v2: No changes.
dlls/wined3d/buffer.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-)
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c index 2539401bf43..c078ba7e634 100644 --- a/dlls/wined3d/buffer.c +++ b/dlls/wined3d/buffer.c @@ -1372,25 +1372,22 @@ static void wined3d_buffer_gl_unload_location(struct wined3d_buffer *buffer, static void wined3d_buffer_gl_upload_ranges(struct wined3d_buffer *buffer, struct wined3d_context *context, const void *data, unsigned int data_offset, unsigned int range_count, const struct wined3d_range *ranges) { - struct wined3d_context_gl *context_gl = wined3d_context_gl(context); - struct wined3d_bo_gl *bo_gl = wined3d_bo_gl(buffer->buffer_object); - struct wined3d_buffer_gl *buffer_gl = wined3d_buffer_gl(buffer); - const struct wined3d_gl_info *gl_info = context_gl->gl_info; - const struct wined3d_range *range; + struct wined3d_bo_address src, dst;
TRACE("buffer %p, context %p, data %p, data_offset %u, range_count %u, ranges %p.\n", buffer, context, data, data_offset, range_count, ranges);
- wined3d_buffer_gl_bind(buffer_gl, context_gl); + dst.buffer_object = buffer->buffer_object; + src.buffer_object = NULL;
while (range_count--) { - range = &ranges[range_count]; - GL_EXTCALL(glBufferSubData(bo_gl->binding, bo_gl->b.buffer_offset + range->offset, - range->size, (BYTE *)data + range->offset - data_offset)); + const struct wined3d_range *range = &ranges[range_count]; + + src.addr = (uint8_t *)data + range->offset - data_offset; + dst.addr = (void *)(uintptr_t)range->offset; + wined3d_context_copy_bo_address(context, &dst, &src, range->size); } - wined3d_context_gl_reference_bo(context_gl, bo_gl); - checkGLcall("buffer upload"); }
/* Context activation is done by the caller. */
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=103760
Your paranoid android.
=== debiant2 (build log) ===
error: patch failed: dlls/wined3d/wined3d_private.h:3920 Task: Patch failed to apply
=== debiant2 (build log) ===
error: patch failed: dlls/wined3d/wined3d_private.h:3920 Task: Patch failed to apply
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=103759
Your paranoid android.
=== debiant2 (build log) ===
error: patch failed: dlls/wined3d/wined3d_private.h:3920 Task: Patch failed to apply
=== debiant2 (build log) ===
error: patch failed: dlls/wined3d/wined3d_private.h:3920 Task: Patch failed to apply