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

d3d11: Rename d3d10_depthstencil_state to d3d_depthstencil_state.

parent e348fefa
...@@ -292,7 +292,7 @@ HRESULT d3d10_blend_state_init(struct d3d10_blend_state *state, struct d3d_devic ...@@ -292,7 +292,7 @@ HRESULT d3d10_blend_state_init(struct d3d10_blend_state *state, struct d3d_devic
struct d3d10_blend_state *unsafe_impl_from_ID3D10BlendState(ID3D10BlendState *iface) DECLSPEC_HIDDEN; struct d3d10_blend_state *unsafe_impl_from_ID3D10BlendState(ID3D10BlendState *iface) DECLSPEC_HIDDEN;
/* ID3D10DepthStencilState */ /* ID3D10DepthStencilState */
struct d3d10_depthstencil_state struct d3d_depthstencil_state
{ {
ID3D10DepthStencilState ID3D10DepthStencilState_iface; ID3D10DepthStencilState ID3D10DepthStencilState_iface;
LONG refcount; LONG refcount;
...@@ -303,9 +303,9 @@ struct d3d10_depthstencil_state ...@@ -303,9 +303,9 @@ struct d3d10_depthstencil_state
ID3D10Device1 *device; ID3D10Device1 *device;
}; };
HRESULT d3d10_depthstencil_state_init(struct d3d10_depthstencil_state *state, struct d3d_device *device, HRESULT d3d_depthstencil_state_init(struct d3d_depthstencil_state *state, struct d3d_device *device,
const D3D10_DEPTH_STENCIL_DESC *desc) DECLSPEC_HIDDEN; const D3D10_DEPTH_STENCIL_DESC *desc) DECLSPEC_HIDDEN;
struct d3d10_depthstencil_state *unsafe_impl_from_ID3D10DepthStencilState( struct d3d_depthstencil_state *unsafe_impl_from_ID3D10DepthStencilState(
ID3D10DepthStencilState *iface) DECLSPEC_HIDDEN; ID3D10DepthStencilState *iface) DECLSPEC_HIDDEN;
/* ID3D11RasterizerState, ID3D10RasterizerState */ /* ID3D11RasterizerState, ID3D10RasterizerState */
...@@ -379,7 +379,7 @@ struct d3d_device ...@@ -379,7 +379,7 @@ struct d3d_device
struct d3d10_blend_state *blend_state; struct d3d10_blend_state *blend_state;
float blend_factor[4]; float blend_factor[4];
struct d3d10_depthstencil_state *depth_stencil_state; struct d3d_depthstencil_state *depth_stencil_state;
UINT stencil_ref; UINT stencil_ref;
struct d3d_rasterizer_state *rasterizer_state; struct d3d_rasterizer_state *rasterizer_state;
}; };
......
...@@ -2414,7 +2414,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateDepthStencilState(ID3D10Devi ...@@ -2414,7 +2414,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateDepthStencilState(ID3D10Devi
const D3D10_DEPTH_STENCIL_DESC *desc, ID3D10DepthStencilState **depth_stencil_state) const D3D10_DEPTH_STENCIL_DESC *desc, ID3D10DepthStencilState **depth_stencil_state)
{ {
struct d3d_device *device = impl_from_ID3D10Device(iface); struct d3d_device *device = impl_from_ID3D10Device(iface);
struct d3d10_depthstencil_state *object; struct d3d_depthstencil_state *object;
D3D10_DEPTH_STENCIL_DESC tmp_desc; D3D10_DEPTH_STENCIL_DESC tmp_desc;
struct wine_rb_entry *entry; struct wine_rb_entry *entry;
HRESULT hr; HRESULT hr;
...@@ -2439,7 +2439,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateDepthStencilState(ID3D10Devi ...@@ -2439,7 +2439,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateDepthStencilState(ID3D10Devi
wined3d_mutex_lock(); wined3d_mutex_lock();
if ((entry = wine_rb_get(&device->depthstencil_states, &tmp_desc))) if ((entry = wine_rb_get(&device->depthstencil_states, &tmp_desc)))
{ {
object = WINE_RB_ENTRY_VALUE(entry, struct d3d10_depthstencil_state, entry); object = WINE_RB_ENTRY_VALUE(entry, struct d3d_depthstencil_state, entry);
TRACE("Returning existing depthstencil state %p.\n", object); TRACE("Returning existing depthstencil state %p.\n", object);
*depth_stencil_state = &object->ID3D10DepthStencilState_iface; *depth_stencil_state = &object->ID3D10DepthStencilState_iface;
...@@ -2454,7 +2454,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateDepthStencilState(ID3D10Devi ...@@ -2454,7 +2454,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateDepthStencilState(ID3D10Devi
if (!object) if (!object)
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
if (FAILED(hr = d3d10_depthstencil_state_init(object, device, &tmp_desc))) if (FAILED(hr = d3d_depthstencil_state_init(object, device, &tmp_desc)))
{ {
WARN("Failed to initialize depthstencil state, hr %#x.\n", hr); WARN("Failed to initialize depthstencil state, hr %#x.\n", hr);
HeapFree(GetProcessHeap(), 0, object); HeapFree(GetProcessHeap(), 0, object);
...@@ -3092,21 +3092,21 @@ static const struct wine_rb_functions d3d10_blend_state_rb_ops = ...@@ -3092,21 +3092,21 @@ static const struct wine_rb_functions d3d10_blend_state_rb_ops =
d3d10_blend_state_compare, d3d10_blend_state_compare,
}; };
static int d3d10_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)
{ {
const D3D10_DEPTH_STENCIL_DESC *ka = key; const D3D10_DEPTH_STENCIL_DESC *ka = key;
const D3D10_DEPTH_STENCIL_DESC *kb = &WINE_RB_ENTRY_VALUE(entry, const D3D10_DEPTH_STENCIL_DESC *kb = &WINE_RB_ENTRY_VALUE(entry,
const struct d3d10_depthstencil_state, entry)->desc; const struct d3d_depthstencil_state, entry)->desc;
return memcmp(ka, kb, sizeof(*ka)); return memcmp(ka, kb, sizeof(*ka));
} }
static const struct wine_rb_functions d3d10_depthstencil_state_rb_ops = static const struct wine_rb_functions d3d_depthstencil_state_rb_ops =
{ {
d3d_rb_alloc, d3d_rb_alloc,
d3d_rb_realloc, d3d_rb_realloc,
d3d_rb_free, d3d_rb_free,
d3d10_depthstencil_state_compare, d3d_depthstencil_state_compare,
}; };
static int d3d_rasterizer_state_compare(const void *key, const struct wine_rb_entry *entry) static int d3d_rasterizer_state_compare(const void *key, const struct wine_rb_entry *entry)
...@@ -3147,7 +3147,7 @@ HRESULT d3d_device_init(struct d3d_device *device, void *outer_unknown) ...@@ -3147,7 +3147,7 @@ HRESULT d3d_device_init(struct d3d_device *device, void *outer_unknown)
device->blend_factor[2] = 1.0f; device->blend_factor[2] = 1.0f;
device->blend_factor[3] = 1.0f; device->blend_factor[3] = 1.0f;
if (wine_rb_init(&device->depthstencil_states, &d3d10_depthstencil_state_rb_ops) == -1) if (wine_rb_init(&device->depthstencil_states, &d3d_depthstencil_state_rb_ops) == -1)
{ {
WARN("Failed to initialize depthstencil state rbtree.\n"); WARN("Failed to initialize depthstencil state rbtree.\n");
wine_rb_destroy(&device->blend_states, NULL, NULL); wine_rb_destroy(&device->blend_states, NULL, NULL);
......
...@@ -192,9 +192,9 @@ struct d3d10_blend_state *unsafe_impl_from_ID3D10BlendState(ID3D10BlendState *if ...@@ -192,9 +192,9 @@ struct d3d10_blend_state *unsafe_impl_from_ID3D10BlendState(ID3D10BlendState *if
return impl_from_ID3D10BlendState(iface); return impl_from_ID3D10BlendState(iface);
} }
static inline struct d3d10_depthstencil_state *impl_from_ID3D10DepthStencilState(ID3D10DepthStencilState *iface) static inline struct d3d_depthstencil_state *impl_from_ID3D10DepthStencilState(ID3D10DepthStencilState *iface)
{ {
return CONTAINING_RECORD(iface, struct d3d10_depthstencil_state, ID3D10DepthStencilState_iface); return CONTAINING_RECORD(iface, struct d3d_depthstencil_state, ID3D10DepthStencilState_iface);
} }
/* IUnknown methods */ /* IUnknown methods */
...@@ -221,7 +221,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_depthstencil_state_QueryInterface(ID3D10D ...@@ -221,7 +221,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_depthstencil_state_QueryInterface(ID3D10D
static ULONG STDMETHODCALLTYPE d3d10_depthstencil_state_AddRef(ID3D10DepthStencilState *iface) static ULONG STDMETHODCALLTYPE d3d10_depthstencil_state_AddRef(ID3D10DepthStencilState *iface)
{ {
struct d3d10_depthstencil_state *This = impl_from_ID3D10DepthStencilState(iface); struct d3d_depthstencil_state *This = impl_from_ID3D10DepthStencilState(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);
...@@ -231,7 +231,7 @@ static ULONG STDMETHODCALLTYPE d3d10_depthstencil_state_AddRef(ID3D10DepthStenci ...@@ -231,7 +231,7 @@ static ULONG STDMETHODCALLTYPE d3d10_depthstencil_state_AddRef(ID3D10DepthStenci
static ULONG STDMETHODCALLTYPE d3d10_depthstencil_state_Release(ID3D10DepthStencilState *iface) static ULONG STDMETHODCALLTYPE d3d10_depthstencil_state_Release(ID3D10DepthStencilState *iface)
{ {
struct d3d10_depthstencil_state *state = impl_from_ID3D10DepthStencilState(iface); struct d3d_depthstencil_state *state = impl_from_ID3D10DepthStencilState(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);
...@@ -254,7 +254,7 @@ static ULONG STDMETHODCALLTYPE d3d10_depthstencil_state_Release(ID3D10DepthStenc ...@@ -254,7 +254,7 @@ static ULONG STDMETHODCALLTYPE d3d10_depthstencil_state_Release(ID3D10DepthStenc
static void STDMETHODCALLTYPE d3d10_depthstencil_state_GetDevice(ID3D10DepthStencilState *iface, ID3D10Device **device) static void STDMETHODCALLTYPE d3d10_depthstencil_state_GetDevice(ID3D10DepthStencilState *iface, ID3D10Device **device)
{ {
struct d3d10_depthstencil_state *state = impl_from_ID3D10DepthStencilState(iface); struct d3d_depthstencil_state *state = impl_from_ID3D10DepthStencilState(iface);
TRACE("iface %p, device %p.\n", iface, device); TRACE("iface %p, device %p.\n", iface, device);
...@@ -265,7 +265,7 @@ static void STDMETHODCALLTYPE d3d10_depthstencil_state_GetDevice(ID3D10DepthSten ...@@ -265,7 +265,7 @@ static void STDMETHODCALLTYPE d3d10_depthstencil_state_GetDevice(ID3D10DepthSten
static HRESULT STDMETHODCALLTYPE d3d10_depthstencil_state_GetPrivateData(ID3D10DepthStencilState *iface, static HRESULT STDMETHODCALLTYPE d3d10_depthstencil_state_GetPrivateData(ID3D10DepthStencilState *iface,
REFGUID guid, UINT *data_size, void *data) REFGUID guid, UINT *data_size, void *data)
{ {
struct d3d10_depthstencil_state *state = impl_from_ID3D10DepthStencilState(iface); struct d3d_depthstencil_state *state = impl_from_ID3D10DepthStencilState(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);
...@@ -276,7 +276,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_depthstencil_state_GetPrivateData(ID3D10D ...@@ -276,7 +276,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_depthstencil_state_GetPrivateData(ID3D10D
static HRESULT STDMETHODCALLTYPE d3d10_depthstencil_state_SetPrivateData(ID3D10DepthStencilState *iface, static HRESULT STDMETHODCALLTYPE d3d10_depthstencil_state_SetPrivateData(ID3D10DepthStencilState *iface,
REFGUID guid, UINT data_size, const void *data) REFGUID guid, UINT data_size, const void *data)
{ {
struct d3d10_depthstencil_state *state = impl_from_ID3D10DepthStencilState(iface); struct d3d_depthstencil_state *state = impl_from_ID3D10DepthStencilState(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);
...@@ -287,7 +287,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_depthstencil_state_SetPrivateData(ID3D10D ...@@ -287,7 +287,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_depthstencil_state_SetPrivateData(ID3D10D
static HRESULT STDMETHODCALLTYPE d3d10_depthstencil_state_SetPrivateDataInterface(ID3D10DepthStencilState *iface, static HRESULT STDMETHODCALLTYPE d3d10_depthstencil_state_SetPrivateDataInterface(ID3D10DepthStencilState *iface,
REFGUID guid, const IUnknown *data) REFGUID guid, const IUnknown *data)
{ {
struct d3d10_depthstencil_state *state = impl_from_ID3D10DepthStencilState(iface); struct d3d_depthstencil_state *state = impl_from_ID3D10DepthStencilState(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);
...@@ -299,7 +299,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_depthstencil_state_SetPrivateDataInterfac ...@@ -299,7 +299,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_depthstencil_state_SetPrivateDataInterfac
static void STDMETHODCALLTYPE d3d10_depthstencil_state_GetDesc(ID3D10DepthStencilState *iface, static void STDMETHODCALLTYPE d3d10_depthstencil_state_GetDesc(ID3D10DepthStencilState *iface,
D3D10_DEPTH_STENCIL_DESC *desc) D3D10_DEPTH_STENCIL_DESC *desc)
{ {
struct d3d10_depthstencil_state *state = impl_from_ID3D10DepthStencilState(iface); struct d3d_depthstencil_state *state = impl_from_ID3D10DepthStencilState(iface);
TRACE("iface %p, desc %p.\n", iface, desc); TRACE("iface %p, desc %p.\n", iface, desc);
...@@ -321,7 +321,7 @@ static const struct ID3D10DepthStencilStateVtbl d3d10_depthstencil_state_vtbl = ...@@ -321,7 +321,7 @@ static const struct ID3D10DepthStencilStateVtbl d3d10_depthstencil_state_vtbl =
d3d10_depthstencil_state_GetDesc, d3d10_depthstencil_state_GetDesc,
}; };
HRESULT d3d10_depthstencil_state_init(struct d3d10_depthstencil_state *state, struct d3d_device *device, HRESULT d3d_depthstencil_state_init(struct d3d_depthstencil_state *state, struct d3d_device *device,
const D3D10_DEPTH_STENCIL_DESC *desc) const D3D10_DEPTH_STENCIL_DESC *desc)
{ {
state->ID3D10DepthStencilState_iface.lpVtbl = &d3d10_depthstencil_state_vtbl; state->ID3D10DepthStencilState_iface.lpVtbl = &d3d10_depthstencil_state_vtbl;
...@@ -345,7 +345,7 @@ HRESULT d3d10_depthstencil_state_init(struct d3d10_depthstencil_state *state, st ...@@ -345,7 +345,7 @@ HRESULT d3d10_depthstencil_state_init(struct d3d10_depthstencil_state *state, st
return S_OK; return S_OK;
} }
struct d3d10_depthstencil_state *unsafe_impl_from_ID3D10DepthStencilState(ID3D10DepthStencilState *iface) struct d3d_depthstencil_state *unsafe_impl_from_ID3D10DepthStencilState(ID3D10DepthStencilState *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