[pkg-wine-party] [SCM] Debian Wine packaging branch, wheezy, updated. wine-1.4-7-302-gb61b690
Alexandre Julliard
julliard at winehq.org
Sun Jun 17 20:04:02 UTC 2012
The following commit has been merged in the wheezy branch:
commit 8daecac4ee473df42bfd4e0f069ba5779130f3f1
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Wed Apr 25 21:24:22 2012 +0200
wined3d: Move the resource bind_count field up to wined3d_resource.
(cherry picked from commit de43de510ac9042970f16591b6a30e8f8c7bd43a)
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
index 495fe2f..e4f3668 100644
--- a/dlls/wined3d/buffer.c
+++ b/dlls/wined3d/buffer.c
@@ -767,7 +767,7 @@ void CDECL wined3d_buffer_preload(struct wined3d_buffer *buffer)
}
/* Reading the declaration makes only sense if the stateblock is finalized and the buffer bound to a stream */
- if (device->isInDraw && buffer->bind_count > 0)
+ if (device->isInDraw && buffer->resource.bind_count > 0)
{
decl_changed = buffer_find_decl(buffer);
buffer->flags |= WINED3D_BUFFER_HASDESC;
@@ -836,7 +836,7 @@ void CDECL wined3d_buffer_preload(struct wined3d_buffer *buffer)
FIXME("Too many full buffer conversions, stopping converting.\n");
buffer_unload(&buffer->resource);
buffer->flags &= ~WINED3D_BUFFER_CREATEBO;
- if (buffer->bind_count)
+ if (buffer->resource.bind_count)
device_invalidate_state(device, STATE_STREAMSRC);
return;
}
@@ -1063,7 +1063,7 @@ HRESULT CDECL wined3d_buffer_map(struct wined3d_buffer *buffer, UINT offset, UIN
TRACE("Dynamic buffer, dropping VBO\n");
buffer_unload(&buffer->resource);
buffer->flags &= ~WINED3D_BUFFER_CREATEBO;
- if (buffer->bind_count)
+ if (buffer->resource.bind_count)
device_invalidate_state(device, STATE_STREAMSRC);
}
else
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 8c99533..d14ba76 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -1706,12 +1706,12 @@ HRESULT CDECL wined3d_device_set_stream_source(struct wined3d_device *device, UI
if (buffer)
{
- InterlockedIncrement(&buffer->bind_count);
+ InterlockedIncrement(&buffer->resource.bind_count);
wined3d_buffer_incref(buffer);
}
if (prev_buffer)
{
- InterlockedDecrement(&prev_buffer->bind_count);
+ InterlockedDecrement(&prev_buffer->resource.bind_count);
wined3d_buffer_decref(prev_buffer);
}
@@ -2338,12 +2338,12 @@ HRESULT CDECL wined3d_device_set_index_buffer(struct wined3d_device *device,
device_invalidate_state(device, STATE_INDEXBUFFER);
if (buffer)
{
- InterlockedIncrement(&buffer->bind_count);
+ InterlockedIncrement(&buffer->resource.bind_count);
wined3d_buffer_incref(buffer);
}
if (prev_buffer)
{
- InterlockedDecrement(&prev_buffer->bind_count);
+ InterlockedDecrement(&prev_buffer->resource.bind_count);
wined3d_buffer_decref(prev_buffer);
}
}
@@ -3681,7 +3681,7 @@ HRESULT CDECL wined3d_device_set_texture(struct wined3d_device *device,
if (texture)
{
- LONG bind_count = InterlockedIncrement(&texture->bind_count);
+ LONG bind_count = InterlockedIncrement(&texture->resource.bind_count);
wined3d_texture_incref(texture);
@@ -3703,7 +3703,7 @@ HRESULT CDECL wined3d_device_set_texture(struct wined3d_device *device,
if (prev)
{
- LONG bind_count = InterlockedDecrement(&prev->bind_count);
+ LONG bind_count = InterlockedDecrement(&prev->resource.bind_count);
wined3d_texture_decref(prev);
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index cc7edb0..94589ae 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -502,7 +502,7 @@ DWORD CDECL wined3d_texture_set_lod(struct wined3d_texture *texture, DWORD lod)
texture->texture_rgb.states[WINED3DTEXSTA_MAXMIPLEVEL] = ~0U;
texture->texture_srgb.states[WINED3DTEXSTA_MAXMIPLEVEL] = ~0U;
- if (texture->bind_count)
+ if (texture->resource.bind_count)
device_invalidate_state(texture->resource.device, STATE_SAMPLER(texture->sampler));
}
@@ -1056,7 +1056,7 @@ static void texture3d_preload(struct wined3d_texture *texture, enum WINED3DSRGB
/* TODO: Use already acquired context when possible. */
context = context_acquire(device, NULL);
- if (texture->bind_count > 0)
+ if (texture->resource.bind_count > 0)
{
BOOL texture_srgb = texture->flags & WINED3D_TEXTURE_IS_SRGB;
BOOL sampler_srgb = texture_srgb_mode(texture, srgb);
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index cd9690c..899a0bec 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -1837,6 +1837,7 @@ struct wined3d_resource_ops
struct wined3d_resource
{
LONG ref;
+ LONG bind_count;
struct wined3d_device *device;
enum wined3d_resource_type type;
const struct wined3d_format *format;
@@ -1929,7 +1930,6 @@ struct wined3d_texture
float pow2_matrix[16];
UINT lod;
enum wined3d_texture_filter_type filter_type;
- LONG bind_count;
DWORD sampler;
DWORD flags;
const struct min_lookup *min_mip_lookup;
@@ -2408,7 +2408,6 @@ struct wined3d_buffer
GLenum buffer_object_usage;
GLenum buffer_type_hint;
UINT buffer_object_size;
- LONG bind_count;
DWORD flags;
LONG lock_count;
--
Debian Wine packaging
More information about the pkg-wine-party
mailing list