mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
Remove wined3d-Revert_Buffer_Upload.
This was for https://bugs.winehq.org/show_bug.cgi?id=42410, fixed by https://source.winehq.org/git/wine.git/e97ed10d09a94cae9bd449f297813a0f0722a378.
This commit is contained in:
parent
909b4e25d6
commit
ddb9fa82ca
@ -446,7 +446,6 @@ patch_enable_all ()
|
||||
enable_wined3d_Indexed_Vertex_Blending="$1"
|
||||
enable_wined3d_Limit_Vram="$1"
|
||||
enable_wined3d_QUERY_Stubs="$1"
|
||||
enable_wined3d_Revert_Buffer_Upload="$1"
|
||||
enable_wined3d_Revert_Surface_Blt="$1"
|
||||
enable_wined3d_Silence_FIXMEs="$1"
|
||||
enable_wined3d_UAV_Counters="$1"
|
||||
@ -1598,9 +1597,6 @@ patch_enable ()
|
||||
wined3d-QUERY_Stubs)
|
||||
enable_wined3d_QUERY_Stubs="$2"
|
||||
;;
|
||||
wined3d-Revert_Buffer_Upload)
|
||||
enable_wined3d_Revert_Buffer_Upload="$2"
|
||||
;;
|
||||
wined3d-Revert_Surface_Blt)
|
||||
enable_wined3d_Revert_Surface_Blt="$2"
|
||||
;;
|
||||
@ -2221,9 +2217,6 @@ if test "$enable_wined3d_CSMT_Helper" -eq 1; then
|
||||
if test "$enable_wined3d_QUERY_Stubs" -gt 1; then
|
||||
abort "Patchset wined3d-QUERY_Stubs disabled, but wined3d-CSMT_Helper depends on that."
|
||||
fi
|
||||
if test "$enable_wined3d_Revert_Buffer_Upload" -gt 1; then
|
||||
abort "Patchset wined3d-Revert_Buffer_Upload disabled, but wined3d-CSMT_Helper depends on that."
|
||||
fi
|
||||
if test "$enable_wined3d_Silence_FIXMEs" -gt 1; then
|
||||
abort "Patchset wined3d-Silence_FIXMEs disabled, but wined3d-CSMT_Helper depends on that."
|
||||
fi
|
||||
@ -2241,7 +2234,6 @@ if test "$enable_wined3d_CSMT_Helper" -eq 1; then
|
||||
enable_wined3d_Dual_Source_Blending=1
|
||||
enable_wined3d_GenerateMips=1
|
||||
enable_wined3d_QUERY_Stubs=1
|
||||
enable_wined3d_Revert_Buffer_Upload=1
|
||||
enable_wined3d_Silence_FIXMEs=1
|
||||
enable_wined3d_UAV_Counters=1
|
||||
fi
|
||||
@ -9412,18 +9404,6 @@ if test "$enable_wined3d_QUERY_Stubs" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-Revert_Buffer_Upload
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/wined3d/buffer.c, dlls/wined3d/cs.c, dlls/wined3d/wined3d_private.h
|
||||
# |
|
||||
if test "$enable_wined3d_Revert_Buffer_Upload" -eq 1; then
|
||||
patch_apply wined3d-Revert_Buffer_Upload/0001-Revert-wined3d-Implement-wined3d_buffer_upload_data-.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Sebastian Lackner", "Revert \"wined3d: Implement wined3d_buffer_upload_data() on top of wined3d_buffer_upload_ranges().\".", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset wined3d-Silence_FIXMEs
|
||||
# |
|
||||
# | Modified files:
|
||||
@ -9460,7 +9440,7 @@ fi
|
||||
# | * wined3d-1DTextures, d3d11-Deferred_Context, d3d9-Tests, makedep-PARENTSPEC, ntdll-DllOverrides_WOW64, ntdll-
|
||||
# | Loader_Machine_Type, ntdll-DllRedirects, wined3d-Accounting, d3d11-Depth_Bias, wined3d-Copy_Resource_Typeless, wined3d-
|
||||
# | DXTn, wined3d-Core_Context, wined3d-Viewports, wined3d-Dual_Source_Blending, wined3d-GenerateMips, wined3d-QUERY_Stubs,
|
||||
# | wined3d-Revert_Buffer_Upload, wined3d-Silence_FIXMEs, wined3d-UAV_Counters
|
||||
# | wined3d-Silence_FIXMEs, wined3d-UAV_Counters
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * configure.ac, dlls/wined3d-csmt/Makefile.in, dlls/wined3d-csmt/version.rc
|
||||
@ -9639,7 +9619,7 @@ fi
|
||||
# | * wined3d-1DTextures, d3d11-Deferred_Context, d3d9-Tests, makedep-PARENTSPEC, ntdll-DllOverrides_WOW64, ntdll-
|
||||
# | Loader_Machine_Type, ntdll-DllRedirects, wined3d-Accounting, d3d11-Depth_Bias, wined3d-Copy_Resource_Typeless, wined3d-
|
||||
# | DXTn, wined3d-Core_Context, wined3d-Viewports, wined3d-Dual_Source_Blending, wined3d-GenerateMips, wined3d-QUERY_Stubs,
|
||||
# | wined3d-Revert_Buffer_Upload, wined3d-Silence_FIXMEs, wined3d-UAV_Counters, wined3d-CSMT_Helper
|
||||
# | wined3d-Silence_FIXMEs, wined3d-UAV_Counters, wined3d-CSMT_Helper
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#11674] Support for CSMT (command stream) to increase graphic performance
|
||||
|
@ -3,7 +3,6 @@ Depends: wined3d-DXTn
|
||||
Depends: wined3d-QUERY_Stubs
|
||||
Depends: wined3d-1DTextures
|
||||
Depends: wined3d-Silence_FIXMEs
|
||||
Depends: wined3d-Revert_Buffer_Upload
|
||||
Depends: wined3d-Copy_Resource_Typeless
|
||||
Depends: wined3d-UAV_Counters
|
||||
Depends: wined3d-Dual_Source_Blending
|
||||
|
@ -1,134 +0,0 @@
|
||||
From 213c4f62372760c1a3bdcd6f1c03bc9f1926c5be Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Wed, 8 Feb 2017 19:35:36 +0100
|
||||
Subject: Revert "wined3d: Implement wined3d_buffer_upload_data() on top of
|
||||
wined3d_buffer_upload_ranges()."
|
||||
|
||||
This reverts commit e2dbbec1af8ae2ea8813148d56e14c8c211ee334.
|
||||
---
|
||||
dlls/wined3d/buffer.c | 30 +++++++++++++++++++-----------
|
||||
dlls/wined3d/cs.c | 13 +++----------
|
||||
dlls/wined3d/wined3d_private.h | 2 +-
|
||||
3 files changed, 23 insertions(+), 22 deletions(-)
|
||||
|
||||
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
index e953e9ad215..d81387291f1 100644
|
||||
--- a/dlls/wined3d/buffer.c
|
||||
+++ b/dlls/wined3d/buffer.c
|
||||
@@ -532,7 +532,7 @@ ULONG CDECL wined3d_buffer_incref(struct wined3d_buffer *buffer)
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
static void wined3d_buffer_upload_ranges(struct wined3d_buffer *buffer, struct wined3d_context *context,
|
||||
- const void *data, unsigned int data_offset, unsigned int range_count, const struct wined3d_map_range *ranges)
|
||||
+ const void *data, unsigned int range_count, const struct wined3d_map_range *ranges)
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
const struct wined3d_map_range *range;
|
||||
@@ -543,7 +543,7 @@ static void wined3d_buffer_upload_ranges(struct wined3d_buffer *buffer, struct w
|
||||
{
|
||||
range = &ranges[range_count];
|
||||
GL_EXTCALL(glBufferSubData(buffer->buffer_type_hint,
|
||||
- range->offset, range->size, (BYTE *)data + range->offset - data_offset));
|
||||
+ range->offset, range->size, (BYTE *)data + range->offset));
|
||||
}
|
||||
checkGLcall("glBufferSubData");
|
||||
}
|
||||
@@ -599,7 +599,7 @@ static void buffer_conversion_upload(struct wined3d_buffer *buffer, struct wined
|
||||
}
|
||||
}
|
||||
|
||||
- wined3d_buffer_upload_ranges(buffer, context, data, 0, buffer->modified_areas, buffer->maps);
|
||||
+ wined3d_buffer_upload_ranges(buffer, context, data, buffer->modified_areas, buffer->maps);
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, data);
|
||||
}
|
||||
@@ -683,7 +683,7 @@ BOOL wined3d_buffer_load_location(struct wined3d_buffer *buffer,
|
||||
case WINED3D_LOCATION_BUFFER:
|
||||
if (!buffer->conversion_map)
|
||||
wined3d_buffer_upload_ranges(buffer, context, buffer->resource.heap_memory,
|
||||
- 0, buffer->modified_areas, buffer->maps);
|
||||
+ buffer->modified_areas, buffer->maps);
|
||||
else
|
||||
buffer_conversion_upload(buffer, context);
|
||||
break;
|
||||
@@ -1215,23 +1215,31 @@ void wined3d_buffer_copy(struct wined3d_buffer *dst_buffer, unsigned int dst_off
|
||||
wined3d_buffer_invalidate_range(dst_buffer, ~dst_location, dst_offset, size);
|
||||
}
|
||||
|
||||
-void wined3d_buffer_upload_data(struct wined3d_buffer *buffer, struct wined3d_context *context,
|
||||
+HRESULT wined3d_buffer_upload_data(struct wined3d_buffer *buffer,
|
||||
const struct wined3d_box *box, const void *data)
|
||||
{
|
||||
- struct wined3d_map_range range;
|
||||
+ UINT offset, size;
|
||||
+ HRESULT hr;
|
||||
+ BYTE *ptr;
|
||||
|
||||
if (box)
|
||||
{
|
||||
- range.offset = box->left;
|
||||
- range.size = box->right - box->left;
|
||||
+ offset = box->left;
|
||||
+ size = box->right - box->left;
|
||||
}
|
||||
else
|
||||
{
|
||||
- range.offset = 0;
|
||||
- range.size = buffer->resource.size;
|
||||
+ offset = 0;
|
||||
+ size = buffer->resource.size;
|
||||
}
|
||||
|
||||
- wined3d_buffer_upload_ranges(buffer, context, data, range.offset, 1, &range);
|
||||
+ if (FAILED(hr = wined3d_buffer_map(buffer, offset, size, &ptr, 0)))
|
||||
+ return hr;
|
||||
+
|
||||
+ memcpy(ptr, data, size);
|
||||
+
|
||||
+ wined3d_buffer_unmap(buffer);
|
||||
+ return WINED3D_OK;
|
||||
}
|
||||
|
||||
static ULONG buffer_resource_incref(struct wined3d_resource *resource)
|
||||
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
|
||||
index a76598ff4ca..f521475d3af 100644
|
||||
--- a/dlls/wined3d/cs.c
|
||||
+++ b/dlls/wined3d/cs.c
|
||||
@@ -2107,18 +2107,11 @@ static void wined3d_cs_exec_update_sub_resource(struct wined3d_cs *cs, const voi
|
||||
if (op->resource->type == WINED3D_RTYPE_BUFFER)
|
||||
{
|
||||
struct wined3d_buffer *buffer = buffer_from_resource(op->resource);
|
||||
+ HRESULT hr;
|
||||
|
||||
- context = context_acquire(op->resource->device, NULL, 0);
|
||||
- if (!wined3d_buffer_load_location(buffer, context, WINED3D_LOCATION_BUFFER))
|
||||
- {
|
||||
- ERR("Failed to load buffer location.\n");
|
||||
- context_release(context);
|
||||
- goto done;
|
||||
- }
|
||||
+ if (FAILED(hr = wined3d_buffer_upload_data(buffer, box, op->data.data)))
|
||||
+ WARN("Failed to update buffer data, hr %#x.\n", hr);
|
||||
|
||||
- wined3d_buffer_upload_data(buffer, context, box, op->data.data);
|
||||
- wined3d_buffer_invalidate_location(buffer, ~WINED3D_LOCATION_BUFFER);
|
||||
- context_release(context);
|
||||
goto done;
|
||||
}
|
||||
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index f8aeb629c92..371b8b367ac 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -3570,7 +3570,7 @@ BOOL wined3d_buffer_load_location(struct wined3d_buffer *buffer,
|
||||
BYTE *wined3d_buffer_load_sysmem(struct wined3d_buffer *buffer, struct wined3d_context *context) DECLSPEC_HIDDEN;
|
||||
void wined3d_buffer_copy(struct wined3d_buffer *dst_buffer, unsigned int dst_offset,
|
||||
struct wined3d_buffer *src_buffer, unsigned int src_offset, unsigned int size) DECLSPEC_HIDDEN;
|
||||
-void wined3d_buffer_upload_data(struct wined3d_buffer *buffer, struct wined3d_context *context,
|
||||
+HRESULT wined3d_buffer_upload_data(struct wined3d_buffer *buffer,
|
||||
const struct wined3d_box *box, const void *data) DECLSPEC_HIDDEN;
|
||||
|
||||
struct wined3d_rendertarget_view
|
||||
--
|
||||
2.13.1
|
||||
|
@ -1 +0,0 @@
|
||||
Fixes: Revert changes to wined3d_buffer_upload_data which cause broken rendering in some apps
|
Loading…
x
Reference in New Issue
Block a user