Module: wine
Branch: master
Commit: 0072830804e844de3b06bb25e3c4b68b7db52c98
URL: http://source.winehq.org/git/wine.git/?a=commit;h=0072830804e844de3b06bb25e…
Author: Henri Verbeet <hverbeet(a)codeweavers.com>
Date: Fri Aug 5 12:39:00 2016 +0200
wined3d: Invalidate STATE_STREAMSRC in buffer_unload() if needed.
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
dlls/wined3d/buffer.c | 18 ++++++++----------
dlls/wined3d/device.c | 3 ---
2 files changed, 8 insertions(+), 13 deletions(-)
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
index 9e0892e..d51d0e8 100644
--- a/dlls/wined3d/buffer.c
+++ b/dlls/wined3d/buffer.c
@@ -538,6 +538,14 @@ static void buffer_unload(struct wined3d_resource *resource)
buffer->stride = 0;
buffer->conversion_stride = 0;
buffer->flags &= ~WINED3D_BUFFER_HASDESC;
+
+ /* The stream source state handler might have read the memory of the
+ * vertex buffer already and got the memory in the vbo which is not
+ * valid any longer. Dirtify the stream source to force a reload. This
+ * happens only once per changed vertexbuffer and should occur rather
+ * rarely. */
+ if (resource->bind_count)
+ device_invalidate_state(device, STATE_STREAMSRC);
}
resource_unload(resource);
@@ -545,18 +553,8 @@ static void buffer_unload(struct wined3d_resource *resource)
static void wined3d_buffer_drop_bo(struct wined3d_buffer *buffer)
{
- struct wined3d_device *device = buffer->resource.device;
-
buffer->flags &= ~WINED3D_BUFFER_USE_BO;
buffer_unload(&buffer->resource);
-
- /* The stream source state handler might have read the memory of
- * the vertex buffer already and got the memory in the vbo which
- * is not valid any longer. Dirtify the stream source to force a
- * reload. This happens only once per changed vertexbuffer and
- * should occur rather rarely. */
- if (buffer->resource.bind_count)
- device_invalidate_state(device, STATE_STREAMSRC);
}
static void wined3d_buffer_destroy_object(void *object)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 1bafd5e..a633a2d 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -4547,9 +4547,6 @@ void CDECL wined3d_device_evict_managed_resources(struct wined3d_device *device)
resource->resource_ops->resource_unload(resource);
}
}
-
- /* Invalidate stream sources, the buffer(s) may have been evicted. */
- device_invalidate_state(device, STATE_STREAMSRC);
}
static void delete_opengl_contexts(struct wined3d_device *device, struct wined3d_swapchain *swapchain)
Module: wine
Branch: master
Commit: 9567813ec47d0601593a4ee367bad4c1c3256f07
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9567813ec47d0601593a4ee36…
Author: Nikolay Sivov <nsivov(a)codeweavers.com>
Date: Thu Aug 4 10:57:43 2016 +0300
dsound: Fix its vs it's typos.
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
dlls/dsound/sound3d.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/dsound/sound3d.c b/dlls/dsound/sound3d.c
index 840ab93..b416cdc 100644
--- a/dlls/dsound/sound3d.c
+++ b/dlls/dsound/sound3d.c
@@ -294,12 +294,12 @@ if(0)
dsb->ds3db_ds3db.vVelocity.z == dsb->device->ds3dl.vVelocity.z))
{
/* calculate length of ds3db_ds3db.vVelocity component which causes Doppler Effect
- NOTE: if buffer moves TOWARDS the listener, it's velocity component is NEGATIVE
- if buffer moves AWAY from listener, it's velocity component is POSITIVE */
+ NOTE: if buffer moves TOWARDS the listener, its velocity component is NEGATIVE
+ if buffer moves AWAY from listener, its velocity component is POSITIVE */
flBufferVel = ProjectVector(&dsb->ds3db_ds3db.vVelocity, &vDistance);
/* calculate length of ds3dl.vVelocity component which causes Doppler Effect
- NOTE: if listener moves TOWARDS the buffer, it's velocity component is POSITIVE
- if listener moves AWAY from buffer, it's velocity component is NEGATIVE */
+ NOTE: if listener moves TOWARDS the buffer, its velocity component is POSITIVE
+ if listener moves AWAY from buffer, its velocity component is NEGATIVE */
flListenerVel = ProjectVector(&dsb->device->ds3dl.vVelocity, &vDistance);
/* formula taken from Gianicoli D.: Physics, 4th edition: */
/* FIXME: replace dsb->freq with appropriate frequency ! */