Commit fbcce678 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

d3d10core: Implement d3d10_device_RSSetState().

parent ec9db0a1
...@@ -44,6 +44,8 @@ ...@@ -44,6 +44,8 @@
#define TAG_OSGN MAKE_TAG('O', 'S', 'G', 'N') #define TAG_OSGN MAKE_TAG('O', 'S', 'G', 'N')
#define TAG_SHDR MAKE_TAG('S', 'H', 'D', 'R') #define TAG_SHDR MAKE_TAG('S', 'H', 'D', 'R')
struct d3d10_device;
struct d3d10_shader_info struct d3d10_shader_info
{ {
const DWORD *shader_code; const DWORD *shader_code;
...@@ -68,21 +70,6 @@ void skip_dword_unknown(const char **ptr, unsigned int count) DECLSPEC_HIDDEN; ...@@ -68,21 +70,6 @@ void skip_dword_unknown(const char **ptr, unsigned int count) DECLSPEC_HIDDEN;
HRESULT parse_dxbc(const char *data, SIZE_T data_size, HRESULT parse_dxbc(const char *data, SIZE_T data_size,
HRESULT (*chunk_handler)(const char *data, DWORD data_size, DWORD tag, void *ctx), void *ctx) DECLSPEC_HIDDEN; HRESULT (*chunk_handler)(const char *data, DWORD data_size, DWORD tag, void *ctx), void *ctx) DECLSPEC_HIDDEN;
/* IDirect3D10Device */
struct d3d10_device
{
IUnknown IUnknown_inner;
ID3D10Device ID3D10Device_iface;
IWineDXGIDeviceParent IWineDXGIDeviceParent_iface;
IUnknown *outer_unk;
LONG refcount;
struct wined3d_device_parent device_parent;
struct wined3d_device *wined3d_device;
};
void d3d10_device_init(struct d3d10_device *device, void *outer_unknown) DECLSPEC_HIDDEN;
/* ID3D10Texture2D */ /* ID3D10Texture2D */
struct d3d10_texture2d struct d3d10_texture2d
{ {
...@@ -248,6 +235,7 @@ struct d3d10_rasterizer_state ...@@ -248,6 +235,7 @@ struct d3d10_rasterizer_state
}; };
HRESULT d3d10_rasterizer_state_init(struct d3d10_rasterizer_state *state) DECLSPEC_HIDDEN; HRESULT d3d10_rasterizer_state_init(struct d3d10_rasterizer_state *state) DECLSPEC_HIDDEN;
struct d3d10_rasterizer_state *unsafe_impl_from_ID3D10RasterizerState(ID3D10RasterizerState *iface) DECLSPEC_HIDDEN;
/* ID3D10SamplerState */ /* ID3D10SamplerState */
struct d3d10_sampler_state struct d3d10_sampler_state
...@@ -267,6 +255,23 @@ struct d3d10_query ...@@ -267,6 +255,23 @@ struct d3d10_query
HRESULT d3d10_query_init(struct d3d10_query *query) DECLSPEC_HIDDEN; HRESULT d3d10_query_init(struct d3d10_query *query) DECLSPEC_HIDDEN;
/* IDirect3D10Device */
struct d3d10_device
{
IUnknown IUnknown_inner;
ID3D10Device ID3D10Device_iface;
IWineDXGIDeviceParent IWineDXGIDeviceParent_iface;
IUnknown *outer_unk;
LONG refcount;
struct wined3d_device_parent device_parent;
struct wined3d_device *wined3d_device;
struct d3d10_rasterizer_state *rasterizer_state;
};
void d3d10_device_init(struct d3d10_device *device, void *outer_unknown) DECLSPEC_HIDDEN;
/* Layered device */ /* Layered device */
enum dxgi_device_layer_id enum dxgi_device_layer_id
{ {
......
...@@ -342,7 +342,11 @@ static void STDMETHODCALLTYPE d3d10_device_DrawAuto(ID3D10Device *iface) ...@@ -342,7 +342,11 @@ static void STDMETHODCALLTYPE d3d10_device_DrawAuto(ID3D10Device *iface)
static void STDMETHODCALLTYPE d3d10_device_RSSetState(ID3D10Device *iface, ID3D10RasterizerState *rasterizer_state) static void STDMETHODCALLTYPE d3d10_device_RSSetState(ID3D10Device *iface, ID3D10RasterizerState *rasterizer_state)
{ {
FIXME("iface %p, rasterizer_state %p stub!\n", iface, rasterizer_state); struct d3d10_device *device = impl_from_ID3D10Device(iface);
TRACE("iface %p, rasterizer_state %p.\n", iface, rasterizer_state);
device->rasterizer_state = unsafe_impl_from_ID3D10RasterizerState(rasterizer_state);
} }
static void STDMETHODCALLTYPE d3d10_device_RSSetViewports(ID3D10Device *iface, static void STDMETHODCALLTYPE d3d10_device_RSSetViewports(ID3D10Device *iface,
......
...@@ -372,6 +372,15 @@ HRESULT d3d10_rasterizer_state_init(struct d3d10_rasterizer_state *state) ...@@ -372,6 +372,15 @@ HRESULT d3d10_rasterizer_state_init(struct d3d10_rasterizer_state *state)
return S_OK; return S_OK;
} }
struct d3d10_rasterizer_state *unsafe_impl_from_ID3D10RasterizerState(ID3D10RasterizerState *iface)
{
if (!iface)
return NULL;
assert(iface->lpVtbl == &d3d10_rasterizer_state_vtbl);
return impl_from_ID3D10RasterizerState(iface);
}
static inline struct d3d10_sampler_state *impl_from_ID3D10SamplerState(ID3D10SamplerState *iface) static inline struct d3d10_sampler_state *impl_from_ID3D10SamplerState(ID3D10SamplerState *iface)
{ {
return CONTAINING_RECORD(iface, struct d3d10_sampler_state, ID3D10SamplerState_iface); return CONTAINING_RECORD(iface, struct d3d10_sampler_state, ID3D10SamplerState_iface);
......
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