d3d11: Rename d3d10_rasterizer_state to d3d_rasterizer_state.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
This commit is contained in:
parent
dc54d70207
commit
84efabb6c3
|
@ -307,7 +307,7 @@ struct d3d10_depthstencil_state *unsafe_impl_from_ID3D10DepthStencilState(
|
||||||
ID3D10DepthStencilState *iface) DECLSPEC_HIDDEN;
|
ID3D10DepthStencilState *iface) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
/* ID3D10RasterizerState */
|
/* ID3D10RasterizerState */
|
||||||
struct d3d10_rasterizer_state
|
struct d3d_rasterizer_state
|
||||||
{
|
{
|
||||||
ID3D10RasterizerState ID3D10RasterizerState_iface;
|
ID3D10RasterizerState ID3D10RasterizerState_iface;
|
||||||
LONG refcount;
|
LONG refcount;
|
||||||
|
@ -318,9 +318,9 @@ struct d3d10_rasterizer_state
|
||||||
ID3D10Device1 *device;
|
ID3D10Device1 *device;
|
||||||
};
|
};
|
||||||
|
|
||||||
HRESULT d3d10_rasterizer_state_init(struct d3d10_rasterizer_state *state, struct d3d_device *device,
|
HRESULT d3d_rasterizer_state_init(struct d3d_rasterizer_state *state, struct d3d_device *device,
|
||||||
const D3D10_RASTERIZER_DESC *desc) DECLSPEC_HIDDEN;
|
const D3D10_RASTERIZER_DESC *desc) DECLSPEC_HIDDEN;
|
||||||
struct d3d10_rasterizer_state *unsafe_impl_from_ID3D10RasterizerState(ID3D10RasterizerState *iface) DECLSPEC_HIDDEN;
|
struct d3d_rasterizer_state *unsafe_impl_from_ID3D10RasterizerState(ID3D10RasterizerState *iface) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
/* ID3D10SamplerState */
|
/* ID3D10SamplerState */
|
||||||
struct d3d10_sampler_state
|
struct d3d10_sampler_state
|
||||||
|
@ -378,7 +378,7 @@ struct d3d_device
|
||||||
float blend_factor[4];
|
float blend_factor[4];
|
||||||
struct d3d10_depthstencil_state *depth_stencil_state;
|
struct d3d10_depthstencil_state *depth_stencil_state;
|
||||||
UINT stencil_ref;
|
UINT stencil_ref;
|
||||||
struct d3d10_rasterizer_state *rasterizer_state;
|
struct d3d_rasterizer_state *rasterizer_state;
|
||||||
};
|
};
|
||||||
|
|
||||||
static inline struct d3d_device *impl_from_ID3D10Device(ID3D10Device1 *iface)
|
static inline struct d3d_device *impl_from_ID3D10Device(ID3D10Device1 *iface)
|
||||||
|
|
|
@ -2439,7 +2439,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateRasterizerState(ID3D10Device
|
||||||
const D3D10_RASTERIZER_DESC *desc, ID3D10RasterizerState **rasterizer_state)
|
const D3D10_RASTERIZER_DESC *desc, ID3D10RasterizerState **rasterizer_state)
|
||||||
{
|
{
|
||||||
struct d3d_device *device = impl_from_ID3D10Device(iface);
|
struct d3d_device *device = impl_from_ID3D10Device(iface);
|
||||||
struct d3d10_rasterizer_state *object;
|
struct d3d_rasterizer_state *object;
|
||||||
struct wine_rb_entry *entry;
|
struct wine_rb_entry *entry;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
|
@ -2451,7 +2451,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateRasterizerState(ID3D10Device
|
||||||
wined3d_mutex_lock();
|
wined3d_mutex_lock();
|
||||||
if ((entry = wine_rb_get(&device->rasterizer_states, desc)))
|
if ((entry = wine_rb_get(&device->rasterizer_states, desc)))
|
||||||
{
|
{
|
||||||
object = WINE_RB_ENTRY_VALUE(entry, struct d3d10_rasterizer_state, entry);
|
object = WINE_RB_ENTRY_VALUE(entry, struct d3d_rasterizer_state, entry);
|
||||||
|
|
||||||
TRACE("Returning existing rasterizer state %p.\n", object);
|
TRACE("Returning existing rasterizer state %p.\n", object);
|
||||||
*rasterizer_state = &object->ID3D10RasterizerState_iface;
|
*rasterizer_state = &object->ID3D10RasterizerState_iface;
|
||||||
|
@ -2466,7 +2466,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateRasterizerState(ID3D10Device
|
||||||
if (!object)
|
if (!object)
|
||||||
return E_OUTOFMEMORY;
|
return E_OUTOFMEMORY;
|
||||||
|
|
||||||
if (FAILED(hr = d3d10_rasterizer_state_init(object, device, desc)))
|
if (FAILED(hr = d3d_rasterizer_state_init(object, device, desc)))
|
||||||
{
|
{
|
||||||
WARN("Failed to initialize rasterizer state, hr %#x.\n", hr);
|
WARN("Failed to initialize rasterizer state, hr %#x.\n", hr);
|
||||||
HeapFree(GetProcessHeap(), 0, object);
|
HeapFree(GetProcessHeap(), 0, object);
|
||||||
|
@ -3102,20 +3102,20 @@ static const struct wine_rb_functions d3d10_depthstencil_state_rb_ops =
|
||||||
d3d10_depthstencil_state_compare,
|
d3d10_depthstencil_state_compare,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int d3d10_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)
|
||||||
{
|
{
|
||||||
const D3D10_RASTERIZER_DESC *ka = key;
|
const D3D10_RASTERIZER_DESC *ka = key;
|
||||||
const D3D10_RASTERIZER_DESC *kb = &WINE_RB_ENTRY_VALUE(entry, const struct d3d10_rasterizer_state, entry)->desc;
|
const D3D10_RASTERIZER_DESC *kb = &WINE_RB_ENTRY_VALUE(entry, const struct d3d_rasterizer_state, entry)->desc;
|
||||||
|
|
||||||
return memcmp(ka, kb, sizeof(*ka));
|
return memcmp(ka, kb, sizeof(*ka));
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct wine_rb_functions d3d10_rasterizer_state_rb_ops =
|
static const struct wine_rb_functions d3d_rasterizer_state_rb_ops =
|
||||||
{
|
{
|
||||||
d3d10_rb_alloc,
|
d3d10_rb_alloc,
|
||||||
d3d10_rb_realloc,
|
d3d10_rb_realloc,
|
||||||
d3d10_rb_free,
|
d3d10_rb_free,
|
||||||
d3d10_rasterizer_state_compare,
|
d3d_rasterizer_state_compare,
|
||||||
};
|
};
|
||||||
|
|
||||||
HRESULT d3d10_device_init(struct d3d_device *device, void *outer_unknown)
|
HRESULT d3d10_device_init(struct d3d_device *device, void *outer_unknown)
|
||||||
|
@ -3147,7 +3147,7 @@ HRESULT d3d10_device_init(struct d3d_device *device, void *outer_unknown)
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wine_rb_init(&device->rasterizer_states, &d3d10_rasterizer_state_rb_ops) == -1)
|
if (wine_rb_init(&device->rasterizer_states, &d3d_rasterizer_state_rb_ops) == -1)
|
||||||
{
|
{
|
||||||
WARN("Failed to initialize rasterizer state rbtree.\n");
|
WARN("Failed to initialize rasterizer state rbtree.\n");
|
||||||
wine_rb_destroy(&device->depthstencil_states, NULL, NULL);
|
wine_rb_destroy(&device->depthstencil_states, NULL, NULL);
|
||||||
|
|
|
@ -354,9 +354,9 @@ struct d3d10_depthstencil_state *unsafe_impl_from_ID3D10DepthStencilState(ID3D10
|
||||||
return impl_from_ID3D10DepthStencilState(iface);
|
return impl_from_ID3D10DepthStencilState(iface);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline struct d3d10_rasterizer_state *impl_from_ID3D10RasterizerState(ID3D10RasterizerState *iface)
|
static inline struct d3d_rasterizer_state *impl_from_ID3D10RasterizerState(ID3D10RasterizerState *iface)
|
||||||
{
|
{
|
||||||
return CONTAINING_RECORD(iface, struct d3d10_rasterizer_state, ID3D10RasterizerState_iface);
|
return CONTAINING_RECORD(iface, struct d3d_rasterizer_state, ID3D10RasterizerState_iface);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* IUnknown methods */
|
/* IUnknown methods */
|
||||||
|
@ -383,7 +383,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_rasterizer_state_QueryInterface(ID3D10Ras
|
||||||
|
|
||||||
static ULONG STDMETHODCALLTYPE d3d10_rasterizer_state_AddRef(ID3D10RasterizerState *iface)
|
static ULONG STDMETHODCALLTYPE d3d10_rasterizer_state_AddRef(ID3D10RasterizerState *iface)
|
||||||
{
|
{
|
||||||
struct d3d10_rasterizer_state *This = impl_from_ID3D10RasterizerState(iface);
|
struct d3d_rasterizer_state *This = impl_from_ID3D10RasterizerState(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);
|
||||||
|
@ -393,7 +393,7 @@ static ULONG STDMETHODCALLTYPE d3d10_rasterizer_state_AddRef(ID3D10RasterizerSta
|
||||||
|
|
||||||
static ULONG STDMETHODCALLTYPE d3d10_rasterizer_state_Release(ID3D10RasterizerState *iface)
|
static ULONG STDMETHODCALLTYPE d3d10_rasterizer_state_Release(ID3D10RasterizerState *iface)
|
||||||
{
|
{
|
||||||
struct d3d10_rasterizer_state *state = impl_from_ID3D10RasterizerState(iface);
|
struct d3d_rasterizer_state *state = impl_from_ID3D10RasterizerState(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);
|
||||||
|
@ -416,7 +416,7 @@ static ULONG STDMETHODCALLTYPE d3d10_rasterizer_state_Release(ID3D10RasterizerSt
|
||||||
|
|
||||||
static void STDMETHODCALLTYPE d3d10_rasterizer_state_GetDevice(ID3D10RasterizerState *iface, ID3D10Device **device)
|
static void STDMETHODCALLTYPE d3d10_rasterizer_state_GetDevice(ID3D10RasterizerState *iface, ID3D10Device **device)
|
||||||
{
|
{
|
||||||
struct d3d10_rasterizer_state *state = impl_from_ID3D10RasterizerState(iface);
|
struct d3d_rasterizer_state *state = impl_from_ID3D10RasterizerState(iface);
|
||||||
|
|
||||||
TRACE("iface %p, device %p.\n", iface, device);
|
TRACE("iface %p, device %p.\n", iface, device);
|
||||||
|
|
||||||
|
@ -427,7 +427,7 @@ static void STDMETHODCALLTYPE d3d10_rasterizer_state_GetDevice(ID3D10RasterizerS
|
||||||
static HRESULT STDMETHODCALLTYPE d3d10_rasterizer_state_GetPrivateData(ID3D10RasterizerState *iface,
|
static HRESULT STDMETHODCALLTYPE d3d10_rasterizer_state_GetPrivateData(ID3D10RasterizerState *iface,
|
||||||
REFGUID guid, UINT *data_size, void *data)
|
REFGUID guid, UINT *data_size, void *data)
|
||||||
{
|
{
|
||||||
struct d3d10_rasterizer_state *state = impl_from_ID3D10RasterizerState(iface);
|
struct d3d_rasterizer_state *state = impl_from_ID3D10RasterizerState(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);
|
||||||
|
@ -438,7 +438,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_rasterizer_state_GetPrivateData(ID3D10Ras
|
||||||
static HRESULT STDMETHODCALLTYPE d3d10_rasterizer_state_SetPrivateData(ID3D10RasterizerState *iface,
|
static HRESULT STDMETHODCALLTYPE d3d10_rasterizer_state_SetPrivateData(ID3D10RasterizerState *iface,
|
||||||
REFGUID guid, UINT data_size, const void *data)
|
REFGUID guid, UINT data_size, const void *data)
|
||||||
{
|
{
|
||||||
struct d3d10_rasterizer_state *state = impl_from_ID3D10RasterizerState(iface);
|
struct d3d_rasterizer_state *state = impl_from_ID3D10RasterizerState(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);
|
||||||
|
@ -449,7 +449,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_rasterizer_state_SetPrivateData(ID3D10Ras
|
||||||
static HRESULT STDMETHODCALLTYPE d3d10_rasterizer_state_SetPrivateDataInterface(ID3D10RasterizerState *iface,
|
static HRESULT STDMETHODCALLTYPE d3d10_rasterizer_state_SetPrivateDataInterface(ID3D10RasterizerState *iface,
|
||||||
REFGUID guid, const IUnknown *data)
|
REFGUID guid, const IUnknown *data)
|
||||||
{
|
{
|
||||||
struct d3d10_rasterizer_state *state = impl_from_ID3D10RasterizerState(iface);
|
struct d3d_rasterizer_state *state = impl_from_ID3D10RasterizerState(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);
|
||||||
|
|
||||||
|
@ -461,7 +461,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_rasterizer_state_SetPrivateDataInterface(
|
||||||
static void STDMETHODCALLTYPE d3d10_rasterizer_state_GetDesc(ID3D10RasterizerState *iface,
|
static void STDMETHODCALLTYPE d3d10_rasterizer_state_GetDesc(ID3D10RasterizerState *iface,
|
||||||
D3D10_RASTERIZER_DESC *desc)
|
D3D10_RASTERIZER_DESC *desc)
|
||||||
{
|
{
|
||||||
struct d3d10_rasterizer_state *state = impl_from_ID3D10RasterizerState(iface);
|
struct d3d_rasterizer_state *state = impl_from_ID3D10RasterizerState(iface);
|
||||||
|
|
||||||
TRACE("iface %p, desc %p.\n", iface, desc);
|
TRACE("iface %p, desc %p.\n", iface, desc);
|
||||||
|
|
||||||
|
@ -483,7 +483,7 @@ static const struct ID3D10RasterizerStateVtbl d3d10_rasterizer_state_vtbl =
|
||||||
d3d10_rasterizer_state_GetDesc,
|
d3d10_rasterizer_state_GetDesc,
|
||||||
};
|
};
|
||||||
|
|
||||||
HRESULT d3d10_rasterizer_state_init(struct d3d10_rasterizer_state *state, struct d3d_device *device,
|
HRESULT d3d_rasterizer_state_init(struct d3d_rasterizer_state *state, struct d3d_device *device,
|
||||||
const D3D10_RASTERIZER_DESC *desc)
|
const D3D10_RASTERIZER_DESC *desc)
|
||||||
{
|
{
|
||||||
state->ID3D10RasterizerState_iface.lpVtbl = &d3d10_rasterizer_state_vtbl;
|
state->ID3D10RasterizerState_iface.lpVtbl = &d3d10_rasterizer_state_vtbl;
|
||||||
|
@ -507,7 +507,7 @@ HRESULT d3d10_rasterizer_state_init(struct d3d10_rasterizer_state *state, struct
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct d3d10_rasterizer_state *unsafe_impl_from_ID3D10RasterizerState(ID3D10RasterizerState *iface)
|
struct d3d_rasterizer_state *unsafe_impl_from_ID3D10RasterizerState(ID3D10RasterizerState *iface)
|
||||||
{
|
{
|
||||||
if (!iface)
|
if (!iface)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Reference in New Issue