Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/d3d9/buffer.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/d3d9/buffer.c b/dlls/d3d9/buffer.c index 7af652e7d1a..07bdfa9320e 100644 --- a/dlls/d3d9/buffer.c +++ b/dlls/d3d9/buffer.c @@ -191,14 +191,14 @@ static HRESULT WINAPI d3d9_vertexbuffer_Lock(IDirect3DVertexBuffer9 *iface, UINT struct d3d9_vertexbuffer *buffer = impl_from_IDirect3DVertexBuffer9(iface); struct wined3d_resource *wined3d_resource; struct wined3d_map_desc wined3d_map_desc; - struct wined3d_box wined3d_box = {0}; + struct wined3d_box wined3d_box; HRESULT hr;
TRACE("iface %p, offset %u, size %u, data %p, flags %#x.\n", iface, offset, size, data, flags);
- wined3d_box.left = offset; - wined3d_box.right = offset + size; + wined3d_box_set(&wined3d_box, offset, 0, offset + size, 1, 0, 1); + wined3d_mutex_lock(); wined3d_resource = wined3d_buffer_get_resource(buffer->wined3d_buffer); hr = wined3d_resource_map(wined3d_resource, 0, &wined3d_map_desc, &wined3d_box, @@ -527,14 +527,14 @@ static HRESULT WINAPI d3d9_indexbuffer_Lock(IDirect3DIndexBuffer9 *iface, struct d3d9_indexbuffer *buffer = impl_from_IDirect3DIndexBuffer9(iface); struct wined3d_resource *wined3d_resource; struct wined3d_map_desc wined3d_map_desc; - struct wined3d_box wined3d_box = {0}; + struct wined3d_box wined3d_box; HRESULT hr;
TRACE("iface %p, offset %u, size %u, data %p, flags %#x.\n", iface, offset, size, data, flags);
- wined3d_box.left = offset; - wined3d_box.right = offset + size; + wined3d_box_set(&wined3d_box, offset, 0, offset + size, 1, 0, 1); + wined3d_mutex_lock(); wined3d_resource = wined3d_buffer_get_resource(buffer->wined3d_buffer); hr = wined3d_resource_map(wined3d_resource, 0, &wined3d_map_desc, &wined3d_box,
On Fri, 24 Sept 2021 at 23:47, Zebediah Figura zfigura@codeweavers.com wrote:
Signed-off-by: Zebediah Figura zfigura@codeweavers.com
dlls/d3d9/buffer.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
So far we've mostly been taking the approach of ignoring box dimensions not applicable to the resource type. I think it's fine to switch to always requiring a completely valid box, but note that in that case the equivalent functions in e.g. d3d8 would also be affected.
On 9/27/21 13:07, Henri Verbeet wrote:
On Fri, 24 Sept 2021 at 23:47, Zebediah Figura zfigura@codeweavers.com wrote:
Signed-off-by: Zebediah Figura zfigura@codeweavers.com
dlls/d3d9/buffer.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
So far we've mostly been taking the approach of ignoring box dimensions not applicable to the resource type. I think it's fine to switch to always requiring a completely valid box, but note that in that case the equivalent functions in e.g. d3d8 would also be affected.
Mostly I was just trying to get rid of some warnings that were polluting the log; I didn't have any follow-ups planned. I guess those warnings are my fault, though (08c96a4888).
I could also change wined3d_device_context_map() to complain less, but I guess it's probably not worth dwelling on.