Module: wine
Branch: master
Commit: 3c847a20c13d8037c5b1c83e1a112d61a1aa2b55
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3c847a20c13d8037c5b1c83e1…
Author: Józef Kucia <jkucia(a)codeweavers.com>
Date: Thu Oct 20 12:50:52 2016 +0200
wined3d: Do not assume that WINED3D_LOCATION_SYSMEM is always valid for double buffered buffers.
We now have API that allows invalidating locations for buffers.
Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
dlls/wined3d/buffer.c | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
index 94b290f..4a4d367 100644
--- a/dlls/wined3d/buffer.c
+++ b/dlls/wined3d/buffer.c
@@ -975,13 +975,13 @@ void wined3d_buffer_load(struct wined3d_buffer *buffer, struct wined3d_context *
if (!buffer->conversion_map)
{
/* That means that there is nothing to fixup. Just upload from
- * buffer->resource.heap_memory directly into the vbo. Do not
+ * buffer->resource.heap_memory directly into the BO. Do not
* free the system memory copy because drawPrimitive may need it if
* the stride is 0, for instancing emulation, vertex blending
* emulation or shader emulation. */
TRACE("No conversion needed.\n");
- /* Nothing to do because we locked directly into the vbo */
+ /* Nothing to do because heap memory exists if the buffer is double buffer or has no BO at all. */
if (!(buffer->flags & WINED3D_BUFFER_DOUBLEBUFFER))
return;
@@ -1056,6 +1056,8 @@ struct wined3d_resource * CDECL wined3d_buffer_get_resource(struct wined3d_buffe
static HRESULT wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UINT size, BYTE **data, DWORD flags)
{
+ struct wined3d_device *device = buffer->resource.device;
+ struct wined3d_context *context;
LONG count;
BYTE *base;
@@ -1087,6 +1089,13 @@ static HRESULT wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UI
if (buffer->flags & WINED3D_BUFFER_DOUBLEBUFFER)
{
+ if (!(buffer->locations & WINED3D_LOCATION_SYSMEM))
+ {
+ context = context_acquire(device, NULL);
+ wined3d_buffer_load_location(buffer, context, WINED3D_LOCATION_SYSMEM);
+ context_release(context);
+ }
+
if (!(flags & WINED3D_MAP_READONLY))
wined3d_buffer_invalidate_range(buffer, WINED3D_LOCATION_BUFFER, dirty_offset, dirty_size);
}
@@ -1097,8 +1106,6 @@ static HRESULT wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UI
if (count == 1)
{
- struct wined3d_device *device = buffer->resource.device;
- struct wined3d_context *context;
const struct wined3d_gl_info *gl_info;
context = context_acquire(device, NULL);
@@ -1254,6 +1261,11 @@ HRESULT wined3d_buffer_copy(struct wined3d_buffer *dst_buffer, unsigned int dst_
dst_buffer_mem = dst_buffer->resource.heap_memory;
src_buffer_mem = src_buffer->resource.heap_memory;
+ if (dst_buffer_mem && (dst_offset || size != dst_buffer->resource.size))
+ wined3d_buffer_load_location(dst_buffer, context, WINED3D_LOCATION_SYSMEM);
+ if (src_buffer_mem)
+ wined3d_buffer_load_location(src_buffer, context, WINED3D_LOCATION_SYSMEM);
+
if (!dst_buffer_mem && !src_buffer_mem)
{
if (gl_info->supported[ARB_COPY_BUFFER])
Module: wine
Branch: master
Commit: 7b0c2cdbcd64cffa2f5c5a37f55799b114132b59
URL: http://source.winehq.org/git/wine.git/?a=commit;h=7b0c2cdbcd64cffa2f5c5a37f…
Author: Alexandre Julliard <julliard(a)winehq.org>
Date: Thu Oct 20 15:19:02 2016 -0700
rpcrt4: Remove noisy fixme.
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
dlls/rpcrt4/rpc_transport.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/dlls/rpcrt4/rpc_transport.c b/dlls/rpcrt4/rpc_transport.c
index 4ba17a0..67a0220 100644
--- a/dlls/rpcrt4/rpc_transport.c
+++ b/dlls/rpcrt4/rpc_transport.c
@@ -400,7 +400,6 @@ static RPC_STATUS rpcrt4_ncacn_np_handoff(RpcConnection *old_conn, RpcConnection
/* Store the local computer name as the NetworkAddr for ncacn_np as long as
* we don't support named pipes over the network. */
- FIXME("Using local computer name as NetworkAddr\n");
new_conn->NetworkAddr = HeapAlloc(GetProcessHeap(), 0, len);
if (!GetComputerNameA(new_conn->NetworkAddr, &len))
{