Commit 7b487c38 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

d3d11: Implement d3d11_immediate_context_SwapDeviceContextState() on top of…

d3d11: Implement d3d11_immediate_context_SwapDeviceContextState() on top of wined3d_device_set_state(). Based on a patch by Rémi Bernon. Signed-off-by: 's avatarHenri Verbeet <hverbeet@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 80e1eb87
...@@ -516,6 +516,12 @@ struct d3d_query *unsafe_impl_from_ID3D11Query(ID3D11Query *iface) DECLSPEC_HIDD ...@@ -516,6 +516,12 @@ struct d3d_query *unsafe_impl_from_ID3D11Query(ID3D11Query *iface) DECLSPEC_HIDD
struct d3d_query *unsafe_impl_from_ID3D10Query(ID3D10Query *iface) DECLSPEC_HIDDEN; struct d3d_query *unsafe_impl_from_ID3D10Query(ID3D10Query *iface) DECLSPEC_HIDDEN;
struct d3d_query *unsafe_impl_from_ID3D11Asynchronous(ID3D11Asynchronous *iface) DECLSPEC_HIDDEN; struct d3d_query *unsafe_impl_from_ID3D11Asynchronous(ID3D11Asynchronous *iface) DECLSPEC_HIDDEN;
struct d3d_device_context_state_entry
{
struct d3d_device *device;
struct wined3d_state *wined3d_state;
};
/* ID3DDeviceContextState */ /* ID3DDeviceContextState */
struct d3d_device_context_state struct d3d_device_context_state
{ {
...@@ -523,30 +529,12 @@ struct d3d_device_context_state ...@@ -523,30 +529,12 @@ struct d3d_device_context_state
LONG refcount, private_refcount; LONG refcount, private_refcount;
struct wined3d_private_store private_store; struct wined3d_private_store private_store;
struct
{
ID3D11VertexShader *shader;
ID3D11SamplerState *samplers[D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT];
ID3D11ShaderResourceView *srvs[D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT];
ID3D11Buffer *cbs[D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT];
} vs;
struct
{
ID3D11GeometryShader *shader;
ID3D11SamplerState *samplers[D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT];
ID3D11ShaderResourceView *srvs[D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT];
ID3D11Buffer *cbs[D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT];
} gs;
struct
{
ID3D11PixelShader *shader;
ID3D11SamplerState *samplers[D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT];
ID3D11ShaderResourceView *srvs[D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT];
ID3D11Buffer *cbs[D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT];
} ps;
GUID emulated_interface; GUID emulated_interface;
struct d3d_device_context_state_entry *entries;
SIZE_T entries_size;
SIZE_T entry_count;
struct wined3d_device *wined3d_device; struct wined3d_device *wined3d_device;
ID3D11Device2 *device; ID3D11Device2 *device;
}; };
...@@ -585,6 +573,10 @@ struct d3d_device ...@@ -585,6 +573,10 @@ struct d3d_device
struct wine_rb_tree depthstencil_states; struct wine_rb_tree depthstencil_states;
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 d3d_device_context_state **context_states;
SIZE_T context_states_size;
SIZE_T context_state_count;
}; };
static inline struct d3d_device *impl_from_ID3D11Device(ID3D11Device *iface) static inline struct d3d_device *impl_from_ID3D11Device(ID3D11Device *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