wined3d: Remove duplicate assignment of NULL to map_ptr in wined3d_buffer_map.
sebastian at fds-team.de
Thu Feb 16 21:43:39 CST 2017
Signed-off-by: Sebastian Lackner <sebastian at fds-team.de>
The same assignment is also a couple of lines above.
BTW: Is someone currently working on wined3d_buffer_map? To me it looks like
there are multiple issues related to location handling in there.
* For mappings without !(flags & WINED3D_MAP_READONLY), shouldn't the code invalidate
the sysmem location, to force a download when it is required later?
* In the "Falling back to doublebuffered operation." case with
!(flags & WINED3D_MAP_READONLY) the buffer location is never invalidated, which
means no upload will happen. For testing purposes, this can be triggered by
replacing the if conditions and running d3d9 visual tests. Adding something like:
buffer->locations &= ~WINED3D_LOCATION_BUFFER; fixes it (using a function would
add the modified range twice).
dlls/wined3d/buffer.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
index b647dfbe46e..91ab130f2ed 100644
@@ -1107,7 +1107,6 @@ static HRESULT wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UI
buffer->flags |= WINED3D_BUFFER_PIN_SYSMEM;
TRACE("New pointer is %p.\n", buffer->resource.heap_memory);
- buffer->map_ptr = NULL;
More information about the wine-patches