Commit c2a17185 authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

d3d11: Rename d3d10_blend_state to d3d_blend_state.

parent 7ee05780
...@@ -276,7 +276,7 @@ HRESULT shader_parse_signature(const char *data, DWORD data_size, struct wined3d ...@@ -276,7 +276,7 @@ HRESULT shader_parse_signature(const char *data, DWORD data_size, struct wined3d
void shader_free_signature(struct wined3d_shader_signature *s) DECLSPEC_HIDDEN; void shader_free_signature(struct wined3d_shader_signature *s) DECLSPEC_HIDDEN;
/* ID3D10BlendState */ /* ID3D10BlendState */
struct d3d10_blend_state struct d3d_blend_state
{ {
ID3D10BlendState ID3D10BlendState_iface; ID3D10BlendState ID3D10BlendState_iface;
LONG refcount; LONG refcount;
...@@ -287,9 +287,9 @@ struct d3d10_blend_state ...@@ -287,9 +287,9 @@ struct d3d10_blend_state
ID3D10Device1 *device; ID3D10Device1 *device;
}; };
HRESULT d3d10_blend_state_init(struct d3d10_blend_state *state, struct d3d_device *device, HRESULT d3d_blend_state_init(struct d3d_blend_state *state, struct d3d_device *device,
const D3D10_BLEND_DESC *desc) DECLSPEC_HIDDEN; const D3D10_BLEND_DESC *desc) DECLSPEC_HIDDEN;
struct d3d10_blend_state *unsafe_impl_from_ID3D10BlendState(ID3D10BlendState *iface) DECLSPEC_HIDDEN; struct d3d_blend_state *unsafe_impl_from_ID3D10BlendState(ID3D10BlendState *iface) DECLSPEC_HIDDEN;
/* ID3D11DepthStencilState, ID3D10DepthStencilState */ /* ID3D11DepthStencilState, ID3D10DepthStencilState */
struct d3d_depthstencil_state struct d3d_depthstencil_state
...@@ -378,7 +378,7 @@ struct d3d_device ...@@ -378,7 +378,7 @@ struct d3d_device
struct wine_rb_tree rasterizer_states; struct wine_rb_tree rasterizer_states;
struct wine_rb_tree sampler_states; struct wine_rb_tree sampler_states;
struct d3d10_blend_state *blend_state; struct d3d_blend_state *blend_state;
float blend_factor[4]; float blend_factor[4];
struct d3d_depthstencil_state *depth_stencil_state; struct d3d_depthstencil_state *depth_stencil_state;
UINT stencil_ref; UINT stencil_ref;
......
...@@ -2422,7 +2422,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateBlendState(ID3D10Device1 *if ...@@ -2422,7 +2422,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateBlendState(ID3D10Device1 *if
const D3D10_BLEND_DESC *desc, ID3D10BlendState **blend_state) const D3D10_BLEND_DESC *desc, ID3D10BlendState **blend_state)
{ {
struct d3d_device *device = impl_from_ID3D10Device(iface); struct d3d_device *device = impl_from_ID3D10Device(iface);
struct d3d10_blend_state *object; struct d3d_blend_state *object;
struct wine_rb_entry *entry; struct wine_rb_entry *entry;
HRESULT hr; HRESULT hr;
...@@ -2434,7 +2434,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateBlendState(ID3D10Device1 *if ...@@ -2434,7 +2434,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateBlendState(ID3D10Device1 *if
wined3d_mutex_lock(); wined3d_mutex_lock();
if ((entry = wine_rb_get(&device->blend_states, desc))) if ((entry = wine_rb_get(&device->blend_states, desc)))
{ {
object = WINE_RB_ENTRY_VALUE(entry, struct d3d10_blend_state, entry); object = WINE_RB_ENTRY_VALUE(entry, struct d3d_blend_state, entry);
TRACE("Returning existing blend state %p.\n", object); TRACE("Returning existing blend state %p.\n", object);
*blend_state = &object->ID3D10BlendState_iface; *blend_state = &object->ID3D10BlendState_iface;
...@@ -2449,7 +2449,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateBlendState(ID3D10Device1 *if ...@@ -2449,7 +2449,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateBlendState(ID3D10Device1 *if
if (!object) if (!object)
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
if (FAILED(hr = d3d10_blend_state_init(object, device, desc))) if (FAILED(hr = d3d_blend_state_init(object, device, desc)))
{ {
WARN("Failed to initialize blend state, hr %#x.\n", hr); WARN("Failed to initialize blend state, hr %#x.\n", hr);
HeapFree(GetProcessHeap(), 0, object); HeapFree(GetProcessHeap(), 0, object);
...@@ -3090,20 +3090,20 @@ static const struct wine_rb_functions d3d10_sampler_state_rb_ops = ...@@ -3090,20 +3090,20 @@ static const struct wine_rb_functions d3d10_sampler_state_rb_ops =
d3d10_sampler_state_compare, d3d10_sampler_state_compare,
}; };
static int d3d10_blend_state_compare(const void *key, const struct wine_rb_entry *entry) static int d3d_blend_state_compare(const void *key, const struct wine_rb_entry *entry)
{ {
const D3D10_BLEND_DESC *ka = key; const D3D10_BLEND_DESC *ka = key;
const D3D10_BLEND_DESC *kb = &WINE_RB_ENTRY_VALUE(entry, const struct d3d10_blend_state, entry)->desc; const D3D10_BLEND_DESC *kb = &WINE_RB_ENTRY_VALUE(entry, const struct d3d_blend_state, entry)->desc;
return memcmp(ka, kb, sizeof(*ka)); return memcmp(ka, kb, sizeof(*ka));
} }
static const struct wine_rb_functions d3d10_blend_state_rb_ops = static const struct wine_rb_functions d3d_blend_state_rb_ops =
{ {
d3d_rb_alloc, d3d_rb_alloc,
d3d_rb_realloc, d3d_rb_realloc,
d3d_rb_free, d3d_rb_free,
d3d10_blend_state_compare, d3d_blend_state_compare,
}; };
static int d3d_depthstencil_state_compare(const void *key, const struct wine_rb_entry *entry) static int d3d_depthstencil_state_compare(const void *key, const struct wine_rb_entry *entry)
...@@ -3151,7 +3151,7 @@ HRESULT d3d_device_init(struct d3d_device *device, void *outer_unknown) ...@@ -3151,7 +3151,7 @@ HRESULT d3d_device_init(struct d3d_device *device, void *outer_unknown)
/* COM aggregation always takes place */ /* COM aggregation always takes place */
device->outer_unk = outer_unknown; device->outer_unk = outer_unknown;
if (wine_rb_init(&device->blend_states, &d3d10_blend_state_rb_ops) == -1) if (wine_rb_init(&device->blend_states, &d3d_blend_state_rb_ops) == -1)
{ {
WARN("Failed to initialize blend state rbtree.\n"); WARN("Failed to initialize blend state rbtree.\n");
return E_FAIL; return E_FAIL;
......
...@@ -30,9 +30,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d11); ...@@ -30,9 +30,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d11);
#define D3D10_FILTER_ANISO_MASK 0x40 #define D3D10_FILTER_ANISO_MASK 0x40
#define D3D10_FILTER_COMPARE_MASK 0x80 #define D3D10_FILTER_COMPARE_MASK 0x80
static inline struct d3d10_blend_state *impl_from_ID3D10BlendState(ID3D10BlendState *iface) static inline struct d3d_blend_state *impl_from_ID3D10BlendState(ID3D10BlendState *iface)
{ {
return CONTAINING_RECORD(iface, struct d3d10_blend_state, ID3D10BlendState_iface); return CONTAINING_RECORD(iface, struct d3d_blend_state, ID3D10BlendState_iface);
} }
/* IUnknown methods */ /* IUnknown methods */
...@@ -59,7 +59,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_blend_state_QueryInterface(ID3D10BlendSta ...@@ -59,7 +59,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_blend_state_QueryInterface(ID3D10BlendSta
static ULONG STDMETHODCALLTYPE d3d10_blend_state_AddRef(ID3D10BlendState *iface) static ULONG STDMETHODCALLTYPE d3d10_blend_state_AddRef(ID3D10BlendState *iface)
{ {
struct d3d10_blend_state *This = impl_from_ID3D10BlendState(iface); struct d3d_blend_state *This = impl_from_ID3D10BlendState(iface);
ULONG refcount = InterlockedIncrement(&This->refcount); ULONG refcount = InterlockedIncrement(&This->refcount);
TRACE("%p increasing refcount to %u.\n", This, refcount); TRACE("%p increasing refcount to %u.\n", This, refcount);
...@@ -69,7 +69,7 @@ static ULONG STDMETHODCALLTYPE d3d10_blend_state_AddRef(ID3D10BlendState *iface) ...@@ -69,7 +69,7 @@ static ULONG STDMETHODCALLTYPE d3d10_blend_state_AddRef(ID3D10BlendState *iface)
static ULONG STDMETHODCALLTYPE d3d10_blend_state_Release(ID3D10BlendState *iface) static ULONG STDMETHODCALLTYPE d3d10_blend_state_Release(ID3D10BlendState *iface)
{ {
struct d3d10_blend_state *state = impl_from_ID3D10BlendState(iface); struct d3d_blend_state *state = impl_from_ID3D10BlendState(iface);
ULONG refcount = InterlockedDecrement(&state->refcount); ULONG refcount = InterlockedDecrement(&state->refcount);
TRACE("%p decreasing refcount to %u.\n", state, refcount); TRACE("%p decreasing refcount to %u.\n", state, refcount);
...@@ -92,7 +92,7 @@ static ULONG STDMETHODCALLTYPE d3d10_blend_state_Release(ID3D10BlendState *iface ...@@ -92,7 +92,7 @@ static ULONG STDMETHODCALLTYPE d3d10_blend_state_Release(ID3D10BlendState *iface
static void STDMETHODCALLTYPE d3d10_blend_state_GetDevice(ID3D10BlendState *iface, ID3D10Device **device) static void STDMETHODCALLTYPE d3d10_blend_state_GetDevice(ID3D10BlendState *iface, ID3D10Device **device)
{ {
struct d3d10_blend_state *state = impl_from_ID3D10BlendState(iface); struct d3d_blend_state *state = impl_from_ID3D10BlendState(iface);
TRACE("iface %p, device %p.\n", iface, device); TRACE("iface %p, device %p.\n", iface, device);
...@@ -103,7 +103,7 @@ static void STDMETHODCALLTYPE d3d10_blend_state_GetDevice(ID3D10BlendState *ifac ...@@ -103,7 +103,7 @@ static void STDMETHODCALLTYPE d3d10_blend_state_GetDevice(ID3D10BlendState *ifac
static HRESULT STDMETHODCALLTYPE d3d10_blend_state_GetPrivateData(ID3D10BlendState *iface, static HRESULT STDMETHODCALLTYPE d3d10_blend_state_GetPrivateData(ID3D10BlendState *iface,
REFGUID guid, UINT *data_size, void *data) REFGUID guid, UINT *data_size, void *data)
{ {
struct d3d10_blend_state *state = impl_from_ID3D10BlendState(iface); struct d3d_blend_state *state = impl_from_ID3D10BlendState(iface);
TRACE("iface %p, guid %s, data_size %p, data %p.\n", TRACE("iface %p, guid %s, data_size %p, data %p.\n",
iface, debugstr_guid(guid), data_size, data); iface, debugstr_guid(guid), data_size, data);
...@@ -114,7 +114,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_blend_state_GetPrivateData(ID3D10BlendSta ...@@ -114,7 +114,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_blend_state_GetPrivateData(ID3D10BlendSta
static HRESULT STDMETHODCALLTYPE d3d10_blend_state_SetPrivateData(ID3D10BlendState *iface, static HRESULT STDMETHODCALLTYPE d3d10_blend_state_SetPrivateData(ID3D10BlendState *iface,
REFGUID guid, UINT data_size, const void *data) REFGUID guid, UINT data_size, const void *data)
{ {
struct d3d10_blend_state *state = impl_from_ID3D10BlendState(iface); struct d3d_blend_state *state = impl_from_ID3D10BlendState(iface);
TRACE("iface %p, guid %s, data_size %u, data %p.\n", TRACE("iface %p, guid %s, data_size %u, data %p.\n",
iface, debugstr_guid(guid), data_size, data); iface, debugstr_guid(guid), data_size, data);
...@@ -125,7 +125,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_blend_state_SetPrivateData(ID3D10BlendSta ...@@ -125,7 +125,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_blend_state_SetPrivateData(ID3D10BlendSta
static HRESULT STDMETHODCALLTYPE d3d10_blend_state_SetPrivateDataInterface(ID3D10BlendState *iface, static HRESULT STDMETHODCALLTYPE d3d10_blend_state_SetPrivateDataInterface(ID3D10BlendState *iface,
REFGUID guid, const IUnknown *data) REFGUID guid, const IUnknown *data)
{ {
struct d3d10_blend_state *state = impl_from_ID3D10BlendState(iface); struct d3d_blend_state *state = impl_from_ID3D10BlendState(iface);
TRACE("iface %p, guid %s, data %p.\n", iface, debugstr_guid(guid), data); TRACE("iface %p, guid %s, data %p.\n", iface, debugstr_guid(guid), data);
...@@ -137,7 +137,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_blend_state_SetPrivateDataInterface(ID3D1 ...@@ -137,7 +137,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_blend_state_SetPrivateDataInterface(ID3D1
static void STDMETHODCALLTYPE d3d10_blend_state_GetDesc(ID3D10BlendState *iface, static void STDMETHODCALLTYPE d3d10_blend_state_GetDesc(ID3D10BlendState *iface,
D3D10_BLEND_DESC *desc) D3D10_BLEND_DESC *desc)
{ {
struct d3d10_blend_state *state = impl_from_ID3D10BlendState(iface); struct d3d_blend_state *state = impl_from_ID3D10BlendState(iface);
TRACE("iface %p, desc %p.\n", iface, desc); TRACE("iface %p, desc %p.\n", iface, desc);
...@@ -159,7 +159,7 @@ static const struct ID3D10BlendStateVtbl d3d10_blend_state_vtbl = ...@@ -159,7 +159,7 @@ static const struct ID3D10BlendStateVtbl d3d10_blend_state_vtbl =
d3d10_blend_state_GetDesc, d3d10_blend_state_GetDesc,
}; };
HRESULT d3d10_blend_state_init(struct d3d10_blend_state *state, struct d3d_device *device, HRESULT d3d_blend_state_init(struct d3d_blend_state *state, struct d3d_device *device,
const D3D10_BLEND_DESC *desc) const D3D10_BLEND_DESC *desc)
{ {
state->ID3D10BlendState_iface.lpVtbl = &d3d10_blend_state_vtbl; state->ID3D10BlendState_iface.lpVtbl = &d3d10_blend_state_vtbl;
...@@ -183,7 +183,7 @@ HRESULT d3d10_blend_state_init(struct d3d10_blend_state *state, struct d3d_devic ...@@ -183,7 +183,7 @@ HRESULT d3d10_blend_state_init(struct d3d10_blend_state *state, struct d3d_devic
return S_OK; return S_OK;
} }
struct d3d10_blend_state *unsafe_impl_from_ID3D10BlendState(ID3D10BlendState *iface) struct d3d_blend_state *unsafe_impl_from_ID3D10BlendState(ID3D10BlendState *iface)
{ {
if (!iface) if (!iface)
return NULL; return NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment