[PATCH 3/8] d3d11: Rename d3d10_sampler_state to d3d_sampler_state.

Józef Kucia jkucia at codeweavers.com
Tue Oct 13 02:13:31 CDT 2015


Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
---
 dlls/d3d11/d3d11_private.h |  6 +++---
 dlls/d3d11/device.c        | 28 ++++++++++++++--------------
 dlls/d3d11/state.c         | 22 +++++++++++-----------
 3 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/dlls/d3d11/d3d11_private.h b/dlls/d3d11/d3d11_private.h
index fd5c080..1be1702 100644
--- a/dlls/d3d11/d3d11_private.h
+++ b/dlls/d3d11/d3d11_private.h
@@ -328,7 +328,7 @@ HRESULT d3d_rasterizer_state_init(struct d3d_rasterizer_state *state, struct d3d
 struct d3d_rasterizer_state *unsafe_impl_from_ID3D10RasterizerState(ID3D10RasterizerState *iface) DECLSPEC_HIDDEN;
 
 /* ID3D10SamplerState */
-struct d3d10_sampler_state
+struct d3d_sampler_state
 {
     ID3D10SamplerState ID3D10SamplerState_iface;
     LONG refcount;
@@ -340,9 +340,9 @@ struct d3d10_sampler_state
     ID3D10Device1 *device;
 };
 
-HRESULT d3d10_sampler_state_init(struct d3d10_sampler_state *state, struct d3d_device *device,
+HRESULT d3d_sampler_state_init(struct d3d_sampler_state *state, struct d3d_device *device,
         const D3D10_SAMPLER_DESC *desc) DECLSPEC_HIDDEN;
-struct d3d10_sampler_state *unsafe_impl_from_ID3D10SamplerState(ID3D10SamplerState *iface) DECLSPEC_HIDDEN;
+struct d3d_sampler_state *unsafe_impl_from_ID3D10SamplerState(ID3D10SamplerState *iface) DECLSPEC_HIDDEN;
 
 /* ID3D10Query */
 struct d3d10_query
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
index 89b5d06..4358fb3a 100644
--- a/dlls/d3d11/device.c
+++ b/dlls/d3d11/device.c
@@ -1837,7 +1837,7 @@ static void STDMETHODCALLTYPE d3d10_device_PSSetSamplers(ID3D10Device1 *iface,
     wined3d_mutex_lock();
     for (i = 0; i < sampler_count; ++i)
     {
-        struct d3d10_sampler_state *sampler = unsafe_impl_from_ID3D10SamplerState(samplers[i]);
+        struct d3d_sampler_state *sampler = unsafe_impl_from_ID3D10SamplerState(samplers[i]);
 
         wined3d_device_set_ps_sampler(device->wined3d_device, start_slot + i,
                 sampler ? sampler->wined3d_sampler : NULL);
@@ -2066,7 +2066,7 @@ static void STDMETHODCALLTYPE d3d10_device_VSSetSamplers(ID3D10Device1 *iface,
     wined3d_mutex_lock();
     for (i = 0; i < sampler_count; ++i)
     {
-        struct d3d10_sampler_state *sampler = unsafe_impl_from_ID3D10SamplerState(samplers[i]);
+        struct d3d_sampler_state *sampler = unsafe_impl_from_ID3D10SamplerState(samplers[i]);
 
         wined3d_device_set_vs_sampler(device->wined3d_device, start_slot + i,
                 sampler ? sampler->wined3d_sampler : NULL);
@@ -2119,7 +2119,7 @@ static void STDMETHODCALLTYPE d3d10_device_GSSetSamplers(ID3D10Device1 *iface,
     wined3d_mutex_lock();
     for (i = 0; i < sampler_count; ++i)
     {
-        struct d3d10_sampler_state *sampler = unsafe_impl_from_ID3D10SamplerState(samplers[i]);
+        struct d3d_sampler_state *sampler = unsafe_impl_from_ID3D10SamplerState(samplers[i]);
 
         wined3d_device_set_gs_sampler(device->wined3d_device, start_slot + i,
                 sampler ? sampler->wined3d_sampler : NULL);
@@ -2541,7 +2541,7 @@ static void STDMETHODCALLTYPE d3d10_device_PSGetSamplers(ID3D10Device1 *iface,
     wined3d_mutex_lock();
     for (i = 0; i < sampler_count; ++i)
     {
-        struct d3d10_sampler_state *sampler_impl;
+        struct d3d_sampler_state *sampler_impl;
         struct wined3d_sampler *wined3d_sampler;
 
         if (!(wined3d_sampler = wined3d_device_get_ps_sampler(device->wined3d_device, start_slot + i)))
@@ -2790,7 +2790,7 @@ static void STDMETHODCALLTYPE d3d10_device_VSGetSamplers(ID3D10Device1 *iface,
     wined3d_mutex_lock();
     for (i = 0; i < sampler_count; ++i)
     {
-        struct d3d10_sampler_state *sampler_impl;
+        struct d3d_sampler_state *sampler_impl;
         struct wined3d_sampler *wined3d_sampler;
 
         if (!(wined3d_sampler = wined3d_device_get_vs_sampler(device->wined3d_device, start_slot + i)))
@@ -2869,7 +2869,7 @@ static void STDMETHODCALLTYPE d3d10_device_GSGetSamplers(ID3D10Device1 *iface,
     wined3d_mutex_lock();
     for (i = 0; i < sampler_count; ++i)
     {
-        struct d3d10_sampler_state *sampler_impl;
+        struct d3d_sampler_state *sampler_impl;
         struct wined3d_sampler *wined3d_sampler;
 
         if (!(wined3d_sampler = wined3d_device_get_gs_sampler(device->wined3d_device, start_slot + i)))
@@ -3540,7 +3540,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateSamplerState(ID3D10Device1 *
         const D3D10_SAMPLER_DESC *desc, ID3D10SamplerState **sampler_state)
 {
     struct d3d_device *device = impl_from_ID3D10Device(iface);
-    struct d3d10_sampler_state *object;
+    struct d3d_sampler_state *object;
     struct wine_rb_entry *entry;
     HRESULT hr;
 
@@ -3552,7 +3552,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateSamplerState(ID3D10Device1 *
     wined3d_mutex_lock();
     if ((entry = wine_rb_get(&device->sampler_states, desc)))
     {
-        object = WINE_RB_ENTRY_VALUE(entry, struct d3d10_sampler_state, entry);
+        object = WINE_RB_ENTRY_VALUE(entry, struct d3d_sampler_state, entry);
 
         TRACE("Returning existing sampler state %p.\n", object);
         *sampler_state = &object->ID3D10SamplerState_iface;
@@ -3567,7 +3567,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateSamplerState(ID3D10Device1 *
     if (!object)
         return E_OUTOFMEMORY;
 
-    if (FAILED(hr = d3d10_sampler_state_init(object, device, desc)))
+    if (FAILED(hr = d3d_sampler_state_init(object, device, desc)))
     {
         WARN("Failed to initialize sampler state, hr %#x.\n", hr);
         HeapFree(GetProcessHeap(), 0, object);
@@ -4110,20 +4110,20 @@ static void d3d_rb_free(void *ptr)
     HeapFree(GetProcessHeap(), 0, ptr);
 }
 
-static int d3d10_sampler_state_compare(const void *key, const struct wine_rb_entry *entry)
+static int d3d_sampler_state_compare(const void *key, const struct wine_rb_entry *entry)
 {
     const D3D10_SAMPLER_DESC *ka = key;
-    const D3D10_SAMPLER_DESC *kb = &WINE_RB_ENTRY_VALUE(entry, const struct d3d10_sampler_state, entry)->desc;
+    const D3D10_SAMPLER_DESC *kb = &WINE_RB_ENTRY_VALUE(entry, const struct d3d_sampler_state, entry)->desc;
 
     return memcmp(ka, kb, sizeof(*ka));
 }
 
-static const struct wine_rb_functions d3d10_sampler_state_rb_ops =
+static const struct wine_rb_functions d3d_sampler_state_rb_ops =
 {
     d3d_rb_alloc,
     d3d_rb_realloc,
     d3d_rb_free,
-    d3d10_sampler_state_compare,
+    d3d_sampler_state_compare,
 };
 
 static int d3d_blend_state_compare(const void *key, const struct wine_rb_entry *entry)
@@ -4219,7 +4219,7 @@ HRESULT d3d_device_init(struct d3d_device *device, void *outer_unknown)
         return E_FAIL;
     }
 
-    if (wine_rb_init(&device->sampler_states, &d3d10_sampler_state_rb_ops) == -1)
+    if (wine_rb_init(&device->sampler_states, &d3d_sampler_state_rb_ops) == -1)
     {
         WARN("Failed to initialize sampler state rbtree.\n");
         wine_rb_destroy(&device->rasterizer_states, NULL, NULL);
diff --git a/dlls/d3d11/state.c b/dlls/d3d11/state.c
index 8e3ef8e..3b52374 100644
--- a/dlls/d3d11/state.c
+++ b/dlls/d3d11/state.c
@@ -867,9 +867,9 @@ struct d3d_rasterizer_state *unsafe_impl_from_ID3D10RasterizerState(ID3D10Raster
     return impl_from_ID3D10RasterizerState(iface);
 }
 
-static inline struct d3d10_sampler_state *impl_from_ID3D10SamplerState(ID3D10SamplerState *iface)
+static inline struct d3d_sampler_state *impl_from_ID3D10SamplerState(ID3D10SamplerState *iface)
 {
-    return CONTAINING_RECORD(iface, struct d3d10_sampler_state, ID3D10SamplerState_iface);
+    return CONTAINING_RECORD(iface, struct d3d_sampler_state, ID3D10SamplerState_iface);
 }
 
 /* IUnknown methods */
@@ -896,7 +896,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_sampler_state_QueryInterface(ID3D10Sample
 
 static ULONG STDMETHODCALLTYPE d3d10_sampler_state_AddRef(ID3D10SamplerState *iface)
 {
-    struct d3d10_sampler_state *This = impl_from_ID3D10SamplerState(iface);
+    struct d3d_sampler_state *This = impl_from_ID3D10SamplerState(iface);
     ULONG refcount = InterlockedIncrement(&This->refcount);
 
     TRACE("%p increasing refcount to %u.\n", This, refcount);
@@ -906,7 +906,7 @@ static ULONG STDMETHODCALLTYPE d3d10_sampler_state_AddRef(ID3D10SamplerState *if
 
 static ULONG STDMETHODCALLTYPE d3d10_sampler_state_Release(ID3D10SamplerState *iface)
 {
-    struct d3d10_sampler_state *state = impl_from_ID3D10SamplerState(iface);
+    struct d3d_sampler_state *state = impl_from_ID3D10SamplerState(iface);
     ULONG refcount = InterlockedDecrement(&state->refcount);
 
     TRACE("%p decreasing refcount to %u.\n", state, refcount);
@@ -931,7 +931,7 @@ static ULONG STDMETHODCALLTYPE d3d10_sampler_state_Release(ID3D10SamplerState *i
 
 static void STDMETHODCALLTYPE d3d10_sampler_state_GetDevice(ID3D10SamplerState *iface, ID3D10Device **device)
 {
-    struct d3d10_sampler_state *state = impl_from_ID3D10SamplerState(iface);
+    struct d3d_sampler_state *state = impl_from_ID3D10SamplerState(iface);
 
     TRACE("iface %p, device %p.\n", iface, device);
 
@@ -942,7 +942,7 @@ static void STDMETHODCALLTYPE d3d10_sampler_state_GetDevice(ID3D10SamplerState *
 static HRESULT STDMETHODCALLTYPE d3d10_sampler_state_GetPrivateData(ID3D10SamplerState *iface,
         REFGUID guid, UINT *data_size, void *data)
 {
-    struct d3d10_sampler_state *state = impl_from_ID3D10SamplerState(iface);
+    struct d3d_sampler_state *state = impl_from_ID3D10SamplerState(iface);
 
     TRACE("iface %p, guid %s, data_size %p, data %p.\n",
             iface, debugstr_guid(guid), data_size, data);
@@ -953,7 +953,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_sampler_state_GetPrivateData(ID3D10Sample
 static HRESULT STDMETHODCALLTYPE d3d10_sampler_state_SetPrivateData(ID3D10SamplerState *iface,
         REFGUID guid, UINT data_size, const void *data)
 {
-    struct d3d10_sampler_state *state = impl_from_ID3D10SamplerState(iface);
+    struct d3d_sampler_state *state = impl_from_ID3D10SamplerState(iface);
 
     TRACE("iface %p, guid %s, data_size %u, data %p.\n",
             iface, debugstr_guid(guid), data_size, data);
@@ -964,7 +964,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_sampler_state_SetPrivateData(ID3D10Sample
 static HRESULT STDMETHODCALLTYPE d3d10_sampler_state_SetPrivateDataInterface(ID3D10SamplerState *iface,
         REFGUID guid, const IUnknown *data)
 {
-    struct d3d10_sampler_state *state = impl_from_ID3D10SamplerState(iface);
+    struct d3d_sampler_state *state = impl_from_ID3D10SamplerState(iface);
 
     TRACE("iface %p, guid %s, data %p.\n", iface, debugstr_guid(guid), data);
 
@@ -976,7 +976,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_sampler_state_SetPrivateDataInterface(ID3
 static void STDMETHODCALLTYPE d3d10_sampler_state_GetDesc(ID3D10SamplerState *iface,
         D3D10_SAMPLER_DESC *desc)
 {
-    struct d3d10_sampler_state *state = impl_from_ID3D10SamplerState(iface);
+    struct d3d_sampler_state *state = impl_from_ID3D10SamplerState(iface);
 
     TRACE("iface %p, desc %p.\n", iface, desc);
 
@@ -1034,7 +1034,7 @@ static enum wined3d_cmp_func wined3d_cmp_func_from_d3d10core(D3D10_COMPARISON_FU
     return (enum wined3d_cmp_func)f;
 }
 
-HRESULT d3d10_sampler_state_init(struct d3d10_sampler_state *state, struct d3d_device *device,
+HRESULT d3d_sampler_state_init(struct d3d_sampler_state *state, struct d3d_device *device,
         const D3D10_SAMPLER_DESC *desc)
 {
     struct wined3d_sampler_desc wined3d_desc;
@@ -1085,7 +1085,7 @@ HRESULT d3d10_sampler_state_init(struct d3d10_sampler_state *state, struct d3d_d
     return S_OK;
 }
 
-struct d3d10_sampler_state *unsafe_impl_from_ID3D10SamplerState(ID3D10SamplerState *iface)
+struct d3d_sampler_state *unsafe_impl_from_ID3D10SamplerState(ID3D10SamplerState *iface)
 {
     if (!iface)
         return NULL;
-- 
2.4.9




More information about the wine-patches mailing list