ReactOS 0.4.17-dev-934-g091855f
state.c File Reference
#include "d3d11_private.h"
Include dependency graph for state.c:

Go to the source code of this file.

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (d3d11)
 
static HRESULT STDMETHODCALLTYPE d3d11_blend_state_QueryInterface (ID3D11BlendState1 *iface, REFIID riid, void **object)
 
static ULONG STDMETHODCALLTYPE d3d11_blend_state_AddRef (ID3D11BlendState1 *iface)
 
static ULONG STDMETHODCALLTYPE d3d11_blend_state_Release (ID3D11BlendState1 *iface)
 
static void STDMETHODCALLTYPE d3d11_blend_state_GetDevice (ID3D11BlendState1 *iface, ID3D11Device **device)
 
static HRESULT STDMETHODCALLTYPE d3d11_blend_state_GetPrivateData (ID3D11BlendState1 *iface, REFGUID guid, UINT *data_size, void *data)
 
static HRESULT STDMETHODCALLTYPE d3d11_blend_state_SetPrivateData (ID3D11BlendState1 *iface, REFGUID guid, UINT data_size, const void *data)
 
static HRESULT STDMETHODCALLTYPE d3d11_blend_state_SetPrivateDataInterface (ID3D11BlendState1 *iface, REFGUID guid, const IUnknown *data)
 
static void STDMETHODCALLTYPE d3d11_blend_state_GetDesc (ID3D11BlendState1 *iface, D3D11_BLEND_DESC *desc)
 
static void STDMETHODCALLTYPE d3d11_blend_state_GetDesc1 (ID3D11BlendState1 *iface, D3D11_BLEND_DESC1 *desc)
 
static struct d3d_blend_state * impl_from_ID3D10BlendState (ID3D10BlendState1 *iface)
 
static HRESULT STDMETHODCALLTYPE d3d10_blend_state_QueryInterface (ID3D10BlendState1 *iface, REFIID riid, void **object)
 
static ULONG STDMETHODCALLTYPE d3d10_blend_state_AddRef (ID3D10BlendState1 *iface)
 
static ULONG STDMETHODCALLTYPE d3d10_blend_state_Release (ID3D10BlendState1 *iface)
 
static void STDMETHODCALLTYPE d3d10_blend_state_GetDevice (ID3D10BlendState1 *iface, ID3D10Device **device)
 
static HRESULT STDMETHODCALLTYPE d3d10_blend_state_GetPrivateData (ID3D10BlendState1 *iface, REFGUID guid, UINT *data_size, void *data)
 
static HRESULT STDMETHODCALLTYPE d3d10_blend_state_SetPrivateData (ID3D10BlendState1 *iface, REFGUID guid, UINT data_size, const void *data)
 
static HRESULT STDMETHODCALLTYPE d3d10_blend_state_SetPrivateDataInterface (ID3D10BlendState1 *iface, REFGUID guid, const IUnknown *data)
 
static D3D10_BLEND d3d10_blend_from_d3d11 (D3D11_BLEND factor)
 
static D3D10_BLEND_OP d3d10_blend_op_from_d3d11 (D3D11_BLEND_OP op)
 
static void STDMETHODCALLTYPE d3d10_blend_state_GetDesc (ID3D10BlendState1 *iface, D3D10_BLEND_DESC *desc)
 
static void STDMETHODCALLTYPE d3d10_blend_state_GetDesc1 (ID3D10BlendState1 *iface, D3D10_BLEND_DESC1 *desc)
 
static void STDMETHODCALLTYPE d3d_blend_state_wined3d_object_destroyed (void *parent)
 
static enum wined3d_blend wined3d_blend_from_d3d11 (D3D11_BLEND factor)
 
static enum wined3d_blend_op wined3d_blend_op_from_d3d11 (D3D11_BLEND_OP op)
 
HRESULT d3d_blend_state_create (struct d3d_device *device, const D3D11_BLEND_DESC1 *desc, struct d3d_blend_state **state)
 
struct d3d_blend_state * unsafe_impl_from_ID3D11BlendState (ID3D11BlendState *iface)
 
struct d3d_blend_state * unsafe_impl_from_ID3D10BlendState (ID3D10BlendState *iface)
 
static HRESULT STDMETHODCALLTYPE d3d11_depthstencil_state_QueryInterface (ID3D11DepthStencilState *iface, REFIID riid, void **object)
 
static ULONG STDMETHODCALLTYPE d3d11_depthstencil_state_AddRef (ID3D11DepthStencilState *iface)
 
static ULONG STDMETHODCALLTYPE d3d11_depthstencil_state_Release (ID3D11DepthStencilState *iface)
 
static void STDMETHODCALLTYPE d3d11_depthstencil_state_GetDevice (ID3D11DepthStencilState *iface, ID3D11Device **device)
 
static HRESULT STDMETHODCALLTYPE d3d11_depthstencil_state_GetPrivateData (ID3D11DepthStencilState *iface, REFGUID guid, UINT *data_size, void *data)
 
static HRESULT STDMETHODCALLTYPE d3d11_depthstencil_state_SetPrivateData (ID3D11DepthStencilState *iface, REFGUID guid, UINT data_size, const void *data)
 
static HRESULT STDMETHODCALLTYPE d3d11_depthstencil_state_SetPrivateDataInterface (ID3D11DepthStencilState *iface, REFGUID guid, const IUnknown *data)
 
static void STDMETHODCALLTYPE d3d11_depthstencil_state_GetDesc (ID3D11DepthStencilState *iface, D3D11_DEPTH_STENCIL_DESC *desc)
 
static struct d3d_depthstencil_state * impl_from_ID3D10DepthStencilState (ID3D10DepthStencilState *iface)
 
static HRESULT STDMETHODCALLTYPE d3d10_depthstencil_state_QueryInterface (ID3D10DepthStencilState *iface, REFIID riid, void **object)
 
static ULONG STDMETHODCALLTYPE d3d10_depthstencil_state_AddRef (ID3D10DepthStencilState *iface)
 
static ULONG STDMETHODCALLTYPE d3d10_depthstencil_state_Release (ID3D10DepthStencilState *iface)
 
static void STDMETHODCALLTYPE d3d10_depthstencil_state_GetDevice (ID3D10DepthStencilState *iface, ID3D10Device **device)
 
static HRESULT STDMETHODCALLTYPE d3d10_depthstencil_state_GetPrivateData (ID3D10DepthStencilState *iface, REFGUID guid, UINT *data_size, void *data)
 
static HRESULT STDMETHODCALLTYPE d3d10_depthstencil_state_SetPrivateData (ID3D10DepthStencilState *iface, REFGUID guid, UINT data_size, const void *data)
 
static HRESULT STDMETHODCALLTYPE d3d10_depthstencil_state_SetPrivateDataInterface (ID3D10DepthStencilState *iface, REFGUID guid, const IUnknown *data)
 
static void STDMETHODCALLTYPE d3d10_depthstencil_state_GetDesc (ID3D10DepthStencilState *iface, D3D10_DEPTH_STENCIL_DESC *desc)
 
static void STDMETHODCALLTYPE d3d_depthstencil_state_wined3d_object_destroyed (void *parent)
 
static enum wined3d_cmp_func wined3d_cmp_func_from_d3d11 (D3D11_COMPARISON_FUNC func)
 
static enum wined3d_stencil_op wined3d_stencil_op_from_d3d11 (D3D11_STENCIL_OP stencil_op)
 
HRESULT d3d_depthstencil_state_create (struct d3d_device *device, const D3D11_DEPTH_STENCIL_DESC *desc, struct d3d_depthstencil_state **state)
 
struct d3d_depthstencil_state * unsafe_impl_from_ID3D11DepthStencilState (ID3D11DepthStencilState *iface)
 
struct d3d_depthstencil_state * unsafe_impl_from_ID3D10DepthStencilState (ID3D10DepthStencilState *iface)
 
static struct d3d_rasterizer_state * impl_from_ID3D11RasterizerState1 (ID3D11RasterizerState1 *iface)
 
static HRESULT STDMETHODCALLTYPE d3d11_rasterizer_state_QueryInterface (ID3D11RasterizerState1 *iface, REFIID riid, void **object)
 
static ULONG STDMETHODCALLTYPE d3d11_rasterizer_state_AddRef (ID3D11RasterizerState1 *iface)
 
static ULONG STDMETHODCALLTYPE d3d11_rasterizer_state_Release (ID3D11RasterizerState1 *iface)
 
static void STDMETHODCALLTYPE d3d11_rasterizer_state_GetDevice (ID3D11RasterizerState1 *iface, ID3D11Device **device)
 
static HRESULT STDMETHODCALLTYPE d3d11_rasterizer_state_GetPrivateData (ID3D11RasterizerState1 *iface, REFGUID guid, UINT *data_size, void *data)
 
static HRESULT STDMETHODCALLTYPE d3d11_rasterizer_state_SetPrivateData (ID3D11RasterizerState1 *iface, REFGUID guid, UINT data_size, const void *data)
 
static HRESULT STDMETHODCALLTYPE d3d11_rasterizer_state_SetPrivateDataInterface (ID3D11RasterizerState1 *iface, REFGUID guid, const IUnknown *data)
 
static void STDMETHODCALLTYPE d3d11_rasterizer_state_GetDesc (ID3D11RasterizerState1 *iface, D3D11_RASTERIZER_DESC *desc)
 
static void STDMETHODCALLTYPE d3d11_rasterizer_state_GetDesc1 (ID3D11RasterizerState1 *iface, D3D11_RASTERIZER_DESC1 *desc)
 
static struct d3d_rasterizer_state * impl_from_ID3D10RasterizerState (ID3D10RasterizerState *iface)
 
static HRESULT STDMETHODCALLTYPE d3d10_rasterizer_state_QueryInterface (ID3D10RasterizerState *iface, REFIID riid, void **object)
 
static ULONG STDMETHODCALLTYPE d3d10_rasterizer_state_AddRef (ID3D10RasterizerState *iface)
 
static ULONG STDMETHODCALLTYPE d3d10_rasterizer_state_Release (ID3D10RasterizerState *iface)
 
static void STDMETHODCALLTYPE d3d10_rasterizer_state_GetDevice (ID3D10RasterizerState *iface, ID3D10Device **device)
 
static HRESULT STDMETHODCALLTYPE d3d10_rasterizer_state_GetPrivateData (ID3D10RasterizerState *iface, REFGUID guid, UINT *data_size, void *data)
 
static HRESULT STDMETHODCALLTYPE d3d10_rasterizer_state_SetPrivateData (ID3D10RasterizerState *iface, REFGUID guid, UINT data_size, const void *data)
 
static HRESULT STDMETHODCALLTYPE d3d10_rasterizer_state_SetPrivateDataInterface (ID3D10RasterizerState *iface, REFGUID guid, const IUnknown *data)
 
static void STDMETHODCALLTYPE d3d10_rasterizer_state_GetDesc (ID3D10RasterizerState *iface, D3D10_RASTERIZER_DESC *desc)
 
static void STDMETHODCALLTYPE d3d_rasterizer_state_wined3d_object_destroyed (void *parent)
 
static enum wined3d_fill_mode wined3d_fill_mode_from_d3d11 (D3D11_FILL_MODE mode)
 
static enum wined3d_cull wined3d_cull_from_d3d11 (D3D11_CULL_MODE mode)
 
static HRESULT d3d_rasterizer_state_init (struct d3d_rasterizer_state *state, struct d3d_device *device, const D3D11_RASTERIZER_DESC1 *desc)
 
HRESULT d3d_rasterizer_state_create (struct d3d_device *device, const D3D11_RASTERIZER_DESC1 *desc, struct d3d_rasterizer_state **state)
 
struct d3d_rasterizer_state * unsafe_impl_from_ID3D11RasterizerState (ID3D11RasterizerState *iface)
 
struct d3d_rasterizer_state * unsafe_impl_from_ID3D10RasterizerState (ID3D10RasterizerState *iface)
 
static struct d3d_sampler_state * impl_from_ID3D11SamplerState (ID3D11SamplerState *iface)
 
static HRESULT STDMETHODCALLTYPE d3d11_sampler_state_QueryInterface (ID3D11SamplerState *iface, REFIID riid, void **object)
 
static ULONG STDMETHODCALLTYPE d3d11_sampler_state_AddRef (ID3D11SamplerState *iface)
 
static ULONG STDMETHODCALLTYPE d3d11_sampler_state_Release (ID3D11SamplerState *iface)
 
static void STDMETHODCALLTYPE d3d11_sampler_state_GetDevice (ID3D11SamplerState *iface, ID3D11Device **device)
 
static HRESULT STDMETHODCALLTYPE d3d11_sampler_state_GetPrivateData (ID3D11SamplerState *iface, REFGUID guid, UINT *data_size, void *data)
 
static HRESULT STDMETHODCALLTYPE d3d11_sampler_state_SetPrivateData (ID3D11SamplerState *iface, REFGUID guid, UINT data_size, const void *data)
 
static HRESULT STDMETHODCALLTYPE d3d11_sampler_state_SetPrivateDataInterface (ID3D11SamplerState *iface, REFGUID guid, const IUnknown *data)
 
static void STDMETHODCALLTYPE d3d11_sampler_state_GetDesc (ID3D11SamplerState *iface, D3D11_SAMPLER_DESC *desc)
 
static struct d3d_sampler_state * impl_from_ID3D10SamplerState (ID3D10SamplerState *iface)
 
static HRESULT STDMETHODCALLTYPE d3d10_sampler_state_QueryInterface (ID3D10SamplerState *iface, REFIID riid, void **object)
 
static ULONG STDMETHODCALLTYPE d3d10_sampler_state_AddRef (ID3D10SamplerState *iface)
 
static ULONG STDMETHODCALLTYPE d3d10_sampler_state_Release (ID3D10SamplerState *iface)
 
static void STDMETHODCALLTYPE d3d10_sampler_state_GetDevice (ID3D10SamplerState *iface, ID3D10Device **device)
 
static HRESULT STDMETHODCALLTYPE d3d10_sampler_state_GetPrivateData (ID3D10SamplerState *iface, REFGUID guid, UINT *data_size, void *data)
 
static HRESULT STDMETHODCALLTYPE d3d10_sampler_state_SetPrivateData (ID3D10SamplerState *iface, REFGUID guid, UINT data_size, const void *data)
 
static HRESULT STDMETHODCALLTYPE d3d10_sampler_state_SetPrivateDataInterface (ID3D10SamplerState *iface, REFGUID guid, const IUnknown *data)
 
static void STDMETHODCALLTYPE d3d10_sampler_state_GetDesc (ID3D10SamplerState *iface, D3D10_SAMPLER_DESC *desc)
 
static void STDMETHODCALLTYPE d3d_sampler_wined3d_object_destroyed (void *parent)
 
static enum wined3d_texture_address wined3d_texture_address_from_d3d11 (enum D3D11_TEXTURE_ADDRESS_MODE t)
 
static enum wined3d_texture_filter_type wined3d_texture_filter_mip_from_d3d11 (enum D3D11_FILTER f)
 
static enum wined3d_texture_filter_type wined3d_texture_filter_mag_from_d3d11 (enum D3D11_FILTER f)
 
static enum wined3d_texture_filter_type wined3d_texture_filter_min_from_d3d11 (enum D3D11_FILTER f)
 
static BOOL wined3d_texture_compare_from_d3d11 (enum D3D11_FILTER f)
 
static HRESULT d3d_sampler_state_init (struct d3d_sampler_state *state, struct d3d_device *device, const D3D11_SAMPLER_DESC *desc)
 
HRESULT d3d_sampler_state_create (struct d3d_device *device, const D3D11_SAMPLER_DESC *desc, struct d3d_sampler_state **state)
 
struct d3d_sampler_state * unsafe_impl_from_ID3D11SamplerState (ID3D11SamplerState *iface)
 
struct d3d_sampler_state * unsafe_impl_from_ID3D10SamplerState (ID3D10SamplerState *iface)
 

Variables

static const struct ID3D11BlendState1Vtbl d3d11_blend_state_vtbl
 
static const struct ID3D10BlendState1Vtbl d3d10_blend_state_vtbl
 
static const struct wined3d_parent_ops d3d_blend_state_wined3d_parent_ops
 
static const struct ID3D11DepthStencilStateVtbl d3d11_depthstencil_state_vtbl
 
static const struct ID3D10DepthStencilStateVtbl d3d10_depthstencil_state_vtbl
 
static const struct wined3d_parent_ops d3d_depthstencil_state_wined3d_parent_ops
 
static const struct ID3D11RasterizerState1Vtbl d3d11_rasterizer_state_vtbl
 
static const struct ID3D10RasterizerStateVtbl d3d10_rasterizer_state_vtbl
 
static const struct wined3d_parent_ops d3d_rasterizer_state_wined3d_parent_ops
 
static const struct ID3D11SamplerStateVtbl d3d11_sampler_state_vtbl
 
static const struct ID3D10SamplerStateVtbl d3d10_sampler_state_vtbl
 
static const struct wined3d_parent_ops d3d_sampler_wined3d_parent_ops
 

Function Documentation

◆ d3d10_blend_from_d3d11()

static D3D10_BLEND d3d10_blend_from_d3d11 ( D3D11_BLEND  factor)
static

Definition at line 263 of file state.c.

264{
265 return (D3D10_BLEND)factor;
266}
D3D10_BLEND
Definition: d3d10.idl:260
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint factor
Definition: glfuncs.h:178

Referenced by d3d10_blend_state_GetDesc().

◆ d3d10_blend_op_from_d3d11()

static D3D10_BLEND_OP d3d10_blend_op_from_d3d11 ( D3D11_BLEND_OP  op)
static

Definition at line 268 of file state.c.

269{
270 return (D3D10_BLEND_OP)op;
271}
D3D10_BLEND_OP
Definition: d3d10.idl:280
UINT op
Definition: effect.c:235

Referenced by d3d10_blend_state_GetDesc().

◆ d3d10_blend_state_AddRef()

static ULONG STDMETHODCALLTYPE d3d10_blend_state_AddRef ( ID3D10BlendState1 *  iface)
static

Definition at line 200 of file state.c.

201{
203
204 TRACE("iface %p.\n", iface);
205
206 return d3d11_blend_state_AddRef(&state->ID3D11BlendState1_iface);
207}
static int state
Definition: maze.c:121
static ULONG STDMETHODCALLTYPE d3d11_blend_state_AddRef(ID3D11BlendState1 *iface)
Definition: state.c:58
static struct d3d_blend_state * impl_from_ID3D10BlendState(ID3D10BlendState1 *iface)
Definition: state.c:183
#define TRACE(s)
Definition: solgame.cpp:4

◆ d3d10_blend_state_GetDesc()

static void STDMETHODCALLTYPE d3d10_blend_state_GetDesc ( ID3D10BlendState1 *  iface,
D3D10_BLEND_DESC *  desc 
)
static

Definition at line 273 of file state.c.

274{
276 const D3D11_BLEND_DESC1 *d3d11_desc = &state->desc;
277 unsigned int i;
278
279 TRACE("iface %p, desc %p.\n", iface, desc);
280
281 desc->AlphaToCoverageEnable = d3d11_desc->AlphaToCoverageEnable;
282 desc->SrcBlend = d3d10_blend_from_d3d11(d3d11_desc->RenderTarget[0].SrcBlend);
283 desc->DestBlend = d3d10_blend_from_d3d11(d3d11_desc->RenderTarget[0].DestBlend);
284 desc->BlendOp = d3d10_blend_op_from_d3d11(d3d11_desc->RenderTarget[0].BlendOp);
285 desc->SrcBlendAlpha = d3d10_blend_from_d3d11(d3d11_desc->RenderTarget[0].SrcBlendAlpha);
286 desc->DestBlendAlpha = d3d10_blend_from_d3d11(d3d11_desc->RenderTarget[0].DestBlendAlpha);
287 desc->BlendOpAlpha = d3d10_blend_op_from_d3d11(d3d11_desc->RenderTarget[0].BlendOpAlpha);
289 {
290 desc->BlendEnable[i] = d3d11_desc->RenderTarget[i].BlendEnable;
291 desc->RenderTargetWriteMask[i] = d3d11_desc->RenderTarget[i].RenderTargetWriteMask;
292 }
293}
const unsigned int D3D10_SIMULTANEOUS_RENDER_TARGET_COUNT
Definition: d3d10.idl:203
static D3D10_BLEND d3d10_blend_from_d3d11(D3D11_BLEND factor)
Definition: state.c:263
static D3D10_BLEND_OP d3d10_blend_op_from_d3d11(D3D11_BLEND_OP op)
Definition: state.c:268
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
D3D11_SHADER_VARIABLE_DESC desc
Definition: reflection.c:1683
BOOL AlphaToCoverageEnable
Definition: d3d11_1.idl:96
D3D11_RENDER_TARGET_BLEND_DESC1 RenderTarget[D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT]
Definition: d3d11_1.idl:98

◆ d3d10_blend_state_GetDesc1()

static void STDMETHODCALLTYPE d3d10_blend_state_GetDesc1 ( ID3D10BlendState1 *  iface,
D3D10_BLEND_DESC1 *  desc 
)
static

Definition at line 295 of file state.c.

296{
298
299 TRACE("iface %p, desc %p.\n", iface, desc);
300
301 d3d11_blend_state_GetDesc(&state->ID3D11BlendState1_iface, (D3D11_BLEND_DESC *)desc);
302}
static void STDMETHODCALLTYPE d3d11_blend_state_GetDesc(ID3D11BlendState1 *iface, D3D11_BLEND_DESC *desc)
Definition: state.c:132

◆ d3d10_blend_state_GetDevice()

static void STDMETHODCALLTYPE d3d10_blend_state_GetDevice ( ID3D10BlendState1 *  iface,
ID3D10Device **  device 
)
static

Definition at line 220 of file state.c.

221{
223
224 TRACE("iface %p, device %p.\n", iface, device);
225
226 ID3D11Device2_QueryInterface(state->device, &IID_ID3D10Device, (void **)device);
227}
Definition: devices.h:37

◆ d3d10_blend_state_GetPrivateData()

static HRESULT STDMETHODCALLTYPE d3d10_blend_state_GetPrivateData ( ID3D10BlendState1 *  iface,
REFGUID  guid,
UINT *  data_size,
void *  data 
)
static

Definition at line 229 of file state.c.

231{
233
234 TRACE("iface %p, guid %s, data_size %p, data %p.\n",
235 iface, debugstr_guid(guid), data_size, data);
236
237 return d3d_get_private_data(&state->private_store, guid, data_size, data);
238}
HRESULT d3d_get_private_data(struct wined3d_private_store *store, REFGUID guid, UINT *data_size, void *data)
Definition: utils.c:803
GUID guid
Definition: version.c:147
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
#define debugstr_guid
Definition: kernel32.h:35

◆ d3d10_blend_state_QueryInterface()

static HRESULT STDMETHODCALLTYPE d3d10_blend_state_QueryInterface ( ID3D10BlendState1 *  iface,
REFIID  riid,
void **  object 
)
static

Definition at line 190 of file state.c.

192{
194
195 TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object);
196
197 return d3d11_blend_state_QueryInterface(&state->ID3D11BlendState1_iface, riid, object);
198}
static HRESULT STDMETHODCALLTYPE d3d11_blend_state_QueryInterface(ID3D11BlendState1 *iface, REFIID riid, void **object)
Definition: state.c:26
REFIID riid
Definition: atlbase.h:39

◆ d3d10_blend_state_Release()

static ULONG STDMETHODCALLTYPE d3d10_blend_state_Release ( ID3D10BlendState1 *  iface)
static

Definition at line 209 of file state.c.

210{
212
213 TRACE("iface %p.\n", iface);
214
215 return d3d11_blend_state_Release(&state->ID3D11BlendState1_iface);
216}
static ULONG STDMETHODCALLTYPE d3d11_blend_state_Release(ID3D11BlendState1 *iface)
Definition: state.c:74

◆ d3d10_blend_state_SetPrivateData()

static HRESULT STDMETHODCALLTYPE d3d10_blend_state_SetPrivateData ( ID3D10BlendState1 *  iface,
REFGUID  guid,
UINT  data_size,
const void *  data 
)
static

Definition at line 240 of file state.c.

242{
244
245 TRACE("iface %p, guid %s, data_size %u, data %p.\n",
246 iface, debugstr_guid(guid), data_size, data);
247
248 return d3d_set_private_data(&state->private_store, guid, data_size, data);
249}
HRESULT d3d_set_private_data(struct wined3d_private_store *store, REFGUID guid, UINT data_size, const void *data)
Definition: utils.c:841

◆ d3d10_blend_state_SetPrivateDataInterface()

static HRESULT STDMETHODCALLTYPE d3d10_blend_state_SetPrivateDataInterface ( ID3D10BlendState1 *  iface,
REFGUID  guid,
const IUnknown *  data 
)
static

Definition at line 251 of file state.c.

253{
255
256 TRACE("iface %p, guid %s, data %p.\n", iface, debugstr_guid(guid), data);
257
258 return d3d_set_private_data_interface(&state->private_store, guid, data);
259}
HRESULT d3d_set_private_data_interface(struct wined3d_private_store *store, REFGUID guid, const IUnknown *object)
Definition: utils.c:867

◆ d3d10_depthstencil_state_AddRef()

static ULONG STDMETHODCALLTYPE d3d10_depthstencil_state_AddRef ( ID3D10DepthStencilState *  iface)
static

Definition at line 638 of file state.c.

639{
641
642 TRACE("iface %p.\n", iface);
643
644 return d3d11_depthstencil_state_AddRef(&state->ID3D11DepthStencilState_iface);
645}
static struct d3d_depthstencil_state * impl_from_ID3D10DepthStencilState(ID3D10DepthStencilState *iface)
Definition: state.c:621
static ULONG STDMETHODCALLTYPE d3d11_depthstencil_state_AddRef(ID3D11DepthStencilState *iface)
Definition: state.c:519

◆ d3d10_depthstencil_state_GetDesc()

static void STDMETHODCALLTYPE d3d10_depthstencil_state_GetDesc ( ID3D10DepthStencilState *  iface,
D3D10_DEPTH_STENCIL_DESC *  desc 
)
static

Definition at line 701 of file state.c.

703{
705
706 TRACE("iface %p, desc %p.\n", iface, desc);
707
708 memcpy(desc, &state->desc, sizeof(*desc));
709}
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878

◆ d3d10_depthstencil_state_GetDevice()

static void STDMETHODCALLTYPE d3d10_depthstencil_state_GetDevice ( ID3D10DepthStencilState *  iface,
ID3D10Device **  device 
)
static

Definition at line 658 of file state.c.

659{
661
662 TRACE("iface %p, device %p.\n", iface, device);
663
664 ID3D11Device2_QueryInterface(state->device, &IID_ID3D10Device, (void **)device);
665}

◆ d3d10_depthstencil_state_GetPrivateData()

static HRESULT STDMETHODCALLTYPE d3d10_depthstencil_state_GetPrivateData ( ID3D10DepthStencilState *  iface,
REFGUID  guid,
UINT *  data_size,
void *  data 
)
static

Definition at line 667 of file state.c.

669{
671
672 TRACE("iface %p, guid %s, data_size %p, data %p.\n",
673 iface, debugstr_guid(guid), data_size, data);
674
675 return d3d_get_private_data(&state->private_store, guid, data_size, data);
676}

◆ d3d10_depthstencil_state_QueryInterface()

static HRESULT STDMETHODCALLTYPE d3d10_depthstencil_state_QueryInterface ( ID3D10DepthStencilState *  iface,
REFIID  riid,
void **  object 
)
static

Definition at line 628 of file state.c.

630{
632
633 TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object);
634
635 return d3d11_depthstencil_state_QueryInterface(&state->ID3D11DepthStencilState_iface, riid, object);
636}
static HRESULT STDMETHODCALLTYPE d3d11_depthstencil_state_QueryInterface(ID3D11DepthStencilState *iface, REFIID riid, void **object)
Definition: state.c:489

◆ d3d10_depthstencil_state_Release()

static ULONG STDMETHODCALLTYPE d3d10_depthstencil_state_Release ( ID3D10DepthStencilState *  iface)
static

Definition at line 647 of file state.c.

648{
650
651 TRACE("iface %p.\n", iface);
652
653 return d3d11_depthstencil_state_Release(&state->ID3D11DepthStencilState_iface);
654}
static ULONG STDMETHODCALLTYPE d3d11_depthstencil_state_Release(ID3D11DepthStencilState *iface)
Definition: state.c:535

◆ d3d10_depthstencil_state_SetPrivateData()

static HRESULT STDMETHODCALLTYPE d3d10_depthstencil_state_SetPrivateData ( ID3D10DepthStencilState *  iface,
REFGUID  guid,
UINT  data_size,
const void *  data 
)
static

Definition at line 678 of file state.c.

680{
682
683 TRACE("iface %p, guid %s, data_size %u, data %p.\n",
684 iface, debugstr_guid(guid), data_size, data);
685
686 return d3d_set_private_data(&state->private_store, guid, data_size, data);
687}

◆ d3d10_depthstencil_state_SetPrivateDataInterface()

static HRESULT STDMETHODCALLTYPE d3d10_depthstencil_state_SetPrivateDataInterface ( ID3D10DepthStencilState *  iface,
REFGUID  guid,
const IUnknown *  data 
)
static

Definition at line 689 of file state.c.

691{
693
694 TRACE("iface %p, guid %s, data %p.\n", iface, debugstr_guid(guid), data);
695
696 return d3d_set_private_data_interface(&state->private_store, guid, data);
697}

◆ d3d10_rasterizer_state_AddRef()

static ULONG STDMETHODCALLTYPE d3d10_rasterizer_state_AddRef ( ID3D10RasterizerState *  iface)
static

Definition at line 1056 of file state.c.

1057{
1059
1060 TRACE("iface %p.\n", iface);
1061
1062 return d3d11_rasterizer_state_AddRef(&state->ID3D11RasterizerState1_iface);
1063}
static struct d3d_rasterizer_state * impl_from_ID3D10RasterizerState(ID3D10RasterizerState *iface)
Definition: state.c:1039
static ULONG STDMETHODCALLTYPE d3d11_rasterizer_state_AddRef(ID3D11RasterizerState1 *iface)
Definition: state.c:926

◆ d3d10_rasterizer_state_GetDesc()

static void STDMETHODCALLTYPE d3d10_rasterizer_state_GetDesc ( ID3D10RasterizerState *  iface,
D3D10_RASTERIZER_DESC *  desc 
)
static

Definition at line 1119 of file state.c.

1121{
1123
1124 TRACE("iface %p, desc %p.\n", iface, desc);
1125
1126 memcpy(desc, &state->desc, sizeof(*desc));
1127}

◆ d3d10_rasterizer_state_GetDevice()

static void STDMETHODCALLTYPE d3d10_rasterizer_state_GetDevice ( ID3D10RasterizerState *  iface,
ID3D10Device **  device 
)
static

Definition at line 1076 of file state.c.

1077{
1079
1080 TRACE("iface %p, device %p.\n", iface, device);
1081
1082 ID3D11Device2_QueryInterface(state->device, &IID_ID3D10Device, (void **)device);
1083}

◆ d3d10_rasterizer_state_GetPrivateData()

static HRESULT STDMETHODCALLTYPE d3d10_rasterizer_state_GetPrivateData ( ID3D10RasterizerState *  iface,
REFGUID  guid,
UINT *  data_size,
void *  data 
)
static

Definition at line 1085 of file state.c.

1087{
1089
1090 TRACE("iface %p, guid %s, data_size %p, data %p.\n",
1091 iface, debugstr_guid(guid), data_size, data);
1092
1093 return d3d_get_private_data(&state->private_store, guid, data_size, data);
1094}

◆ d3d10_rasterizer_state_QueryInterface()

static HRESULT STDMETHODCALLTYPE d3d10_rasterizer_state_QueryInterface ( ID3D10RasterizerState *  iface,
REFIID  riid,
void **  object 
)
static

Definition at line 1046 of file state.c.

1048{
1050
1051 TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object);
1052
1053 return d3d11_rasterizer_state_QueryInterface(&state->ID3D11RasterizerState1_iface, riid, object);
1054}
static HRESULT STDMETHODCALLTYPE d3d11_rasterizer_state_QueryInterface(ID3D11RasterizerState1 *iface, REFIID riid, void **object)
Definition: state.c:895

◆ d3d10_rasterizer_state_Release()

static ULONG STDMETHODCALLTYPE d3d10_rasterizer_state_Release ( ID3D10RasterizerState *  iface)
static

Definition at line 1065 of file state.c.

1066{
1068
1069 TRACE("iface %p.\n", state);
1070
1071 return d3d11_rasterizer_state_Release(&state->ID3D11RasterizerState1_iface);
1072}
static ULONG STDMETHODCALLTYPE d3d11_rasterizer_state_Release(ID3D11RasterizerState1 *iface)
Definition: state.c:942

◆ d3d10_rasterizer_state_SetPrivateData()

static HRESULT STDMETHODCALLTYPE d3d10_rasterizer_state_SetPrivateData ( ID3D10RasterizerState *  iface,
REFGUID  guid,
UINT  data_size,
const void *  data 
)
static

Definition at line 1096 of file state.c.

1098{
1100
1101 TRACE("iface %p, guid %s, data_size %u, data %p.\n",
1102 iface, debugstr_guid(guid), data_size, data);
1103
1104 return d3d_set_private_data(&state->private_store, guid, data_size, data);
1105}

◆ d3d10_rasterizer_state_SetPrivateDataInterface()

static HRESULT STDMETHODCALLTYPE d3d10_rasterizer_state_SetPrivateDataInterface ( ID3D10RasterizerState *  iface,
REFGUID  guid,
const IUnknown *  data 
)
static

Definition at line 1107 of file state.c.

1109{
1111
1112 TRACE("iface %p, guid %s, data %p.\n", iface, debugstr_guid(guid), data);
1113
1114 return d3d_set_private_data_interface(&state->private_store, guid, data);
1115}

◆ d3d10_sampler_state_AddRef()

static ULONG STDMETHODCALLTYPE d3d10_sampler_state_AddRef ( ID3D10SamplerState *  iface)
static

Definition at line 1442 of file state.c.

1443{
1445
1446 TRACE("iface %p.\n", iface);
1447
1448 return d3d11_sampler_state_AddRef(&state->ID3D11SamplerState_iface);
1449}
static ULONG STDMETHODCALLTYPE d3d11_sampler_state_AddRef(ID3D11SamplerState *iface)
Definition: state.c:1324
static struct d3d_sampler_state * impl_from_ID3D10SamplerState(ID3D10SamplerState *iface)
Definition: state.c:1425

◆ d3d10_sampler_state_GetDesc()

static void STDMETHODCALLTYPE d3d10_sampler_state_GetDesc ( ID3D10SamplerState *  iface,
D3D10_SAMPLER_DESC *  desc 
)
static

Definition at line 1505 of file state.c.

1507{
1509
1510 TRACE("iface %p, desc %p.\n", iface, desc);
1511
1512 memcpy(desc, &state->desc, sizeof(*desc));
1513}

◆ d3d10_sampler_state_GetDevice()

static void STDMETHODCALLTYPE d3d10_sampler_state_GetDevice ( ID3D10SamplerState *  iface,
ID3D10Device **  device 
)
static

Definition at line 1462 of file state.c.

1463{
1465
1466 TRACE("iface %p, device %p.\n", iface, device);
1467
1468 ID3D11Device2_QueryInterface(state->device, &IID_ID3D10Device, (void **)device);
1469}

◆ d3d10_sampler_state_GetPrivateData()

static HRESULT STDMETHODCALLTYPE d3d10_sampler_state_GetPrivateData ( ID3D10SamplerState *  iface,
REFGUID  guid,
UINT *  data_size,
void *  data 
)
static

Definition at line 1471 of file state.c.

1473{
1475
1476 TRACE("iface %p, guid %s, data_size %p, data %p.\n",
1477 iface, debugstr_guid(guid), data_size, data);
1478
1479 return d3d_get_private_data(&state->private_store, guid, data_size, data);
1480}

◆ d3d10_sampler_state_QueryInterface()

static HRESULT STDMETHODCALLTYPE d3d10_sampler_state_QueryInterface ( ID3D10SamplerState *  iface,
REFIID  riid,
void **  object 
)
static

Definition at line 1432 of file state.c.

1434{
1436
1437 TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object);
1438
1439 return d3d11_sampler_state_QueryInterface(&state->ID3D11SamplerState_iface, riid, object);
1440}
static HRESULT STDMETHODCALLTYPE d3d11_sampler_state_QueryInterface(ID3D11SamplerState *iface, REFIID riid, void **object)
Definition: state.c:1294

◆ d3d10_sampler_state_Release()

static ULONG STDMETHODCALLTYPE d3d10_sampler_state_Release ( ID3D10SamplerState *  iface)
static

Definition at line 1451 of file state.c.

1452{
1454
1455 TRACE("iface %p.\n", iface);
1456
1457 return d3d11_sampler_state_Release(&state->ID3D11SamplerState_iface);
1458}
static ULONG STDMETHODCALLTYPE d3d11_sampler_state_Release(ID3D11SamplerState *iface)
Definition: state.c:1340

◆ d3d10_sampler_state_SetPrivateData()

static HRESULT STDMETHODCALLTYPE d3d10_sampler_state_SetPrivateData ( ID3D10SamplerState *  iface,
REFGUID  guid,
UINT  data_size,
const void *  data 
)
static

Definition at line 1482 of file state.c.

1484{
1486
1487 TRACE("iface %p, guid %s, data_size %u, data %p.\n",
1488 iface, debugstr_guid(guid), data_size, data);
1489
1490 return d3d_set_private_data(&state->private_store, guid, data_size, data);
1491}

◆ d3d10_sampler_state_SetPrivateDataInterface()

static HRESULT STDMETHODCALLTYPE d3d10_sampler_state_SetPrivateDataInterface ( ID3D10SamplerState *  iface,
REFGUID  guid,
const IUnknown *  data 
)
static

Definition at line 1493 of file state.c.

1495{
1497
1498 TRACE("iface %p, guid %s, data %p.\n", iface, debugstr_guid(guid), data);
1499
1500 return d3d_set_private_data_interface(&state->private_store, guid, data);
1501}

◆ d3d11_blend_state_AddRef()

static ULONG STDMETHODCALLTYPE d3d11_blend_state_AddRef ( ID3D11BlendState1 *  iface)
static

Definition at line 58 of file state.c.

59{
62
63 TRACE("%p increasing refcount to %lu.\n", state, refcount);
64
65 if (refcount == 1)
66 {
67 ID3D11Device2_AddRef(state->device);
68 wined3d_blend_state_incref(state->wined3d_state);
69 }
70
71 return refcount;
72}
#define InterlockedIncrement
Definition: armddk.h:53
static struct d3d_blend_state * impl_from_ID3D11BlendState1(ID3D11BlendState1 *iface)
ULONG CDECL wined3d_blend_state_incref(struct wined3d_blend_state *state)
Definition: device.c:268
uint32_t ULONG
Definition: typedefs.h:59

Referenced by d3d10_blend_state_AddRef().

◆ d3d11_blend_state_GetDesc()

static void STDMETHODCALLTYPE d3d11_blend_state_GetDesc ( ID3D11BlendState1 *  iface,
D3D11_BLEND_DESC *  desc 
)
static

Definition at line 132 of file state.c.

133{
135 const D3D11_BLEND_DESC1 *d3d11_desc = &state->desc;
136 unsigned int i;
137
138 TRACE("iface %p, desc %p.\n", iface, desc);
139
140 desc->AlphaToCoverageEnable = d3d11_desc->AlphaToCoverageEnable;
141 desc->IndependentBlendEnable = d3d11_desc->IndependentBlendEnable;
143 {
144 desc->RenderTarget[i].BlendEnable = d3d11_desc->RenderTarget[i].BlendEnable;
145 desc->RenderTarget[i].SrcBlend = d3d11_desc->RenderTarget[i].SrcBlend;
146 desc->RenderTarget[i].DestBlend = d3d11_desc->RenderTarget[i].DestBlend;
147 desc->RenderTarget[i].BlendOp = d3d11_desc->RenderTarget[i].BlendOp;
148 desc->RenderTarget[i].SrcBlendAlpha = d3d11_desc->RenderTarget[i].SrcBlendAlpha;
149 desc->RenderTarget[i].DestBlendAlpha = d3d11_desc->RenderTarget[i].DestBlendAlpha;
150 desc->RenderTarget[i].BlendOpAlpha = d3d11_desc->RenderTarget[i].BlendOpAlpha;
151 desc->RenderTarget[i].RenderTargetWriteMask = d3d11_desc->RenderTarget[i].RenderTargetWriteMask;
152 }
153}
const unsigned int D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT
Definition: d3d11.idl:172
BOOL IndependentBlendEnable
Definition: d3d11_1.idl:97

Referenced by d3d10_blend_state_GetDesc1().

◆ d3d11_blend_state_GetDesc1()

static void STDMETHODCALLTYPE d3d11_blend_state_GetDesc1 ( ID3D11BlendState1 *  iface,
D3D11_BLEND_DESC1 *  desc 
)
static

Definition at line 155 of file state.c.

156{
158
159 TRACE("iface %p, desc %p.\n", iface, desc);
160
161 *desc = state->desc;
162}

◆ d3d11_blend_state_GetDevice()

static void STDMETHODCALLTYPE d3d11_blend_state_GetDevice ( ID3D11BlendState1 *  iface,
ID3D11Device **  device 
)
static

Definition at line 91 of file state.c.

93{
95
96 TRACE("iface %p, device %p.\n", iface, device);
97
98 *device = (ID3D11Device *)state->device;
99 ID3D11Device_AddRef(*device);
100}

◆ d3d11_blend_state_GetPrivateData()

static HRESULT STDMETHODCALLTYPE d3d11_blend_state_GetPrivateData ( ID3D11BlendState1 *  iface,
REFGUID  guid,
UINT *  data_size,
void *  data 
)
static

Definition at line 102 of file state.c.

104{
106
107 TRACE("iface %p, guid %s, data_size %p, data %p.\n", iface, debugstr_guid(guid), data_size, data);
108
109 return d3d_get_private_data(&state->private_store, guid, data_size, data);
110}

◆ d3d11_blend_state_QueryInterface()

static HRESULT STDMETHODCALLTYPE d3d11_blend_state_QueryInterface ( ID3D11BlendState1 *  iface,
REFIID  riid,
void **  object 
)
static

Definition at line 26 of file state.c.

28{
30
31 TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object);
32
33 if (IsEqualGUID(riid, &IID_ID3D11BlendState)
34 || IsEqualGUID(riid, &IID_ID3D11BlendState1)
35 || IsEqualGUID(riid, &IID_ID3D11DeviceChild)
37 {
38 ID3D11BlendState1_AddRef(iface);
39 *object = iface;
40 return S_OK;
41 }
42
43 if (IsEqualGUID(riid, &IID_ID3D10BlendState1)
44 || IsEqualGUID(riid, &IID_ID3D10BlendState)
45 || IsEqualGUID(riid, &IID_ID3D10DeviceChild))
46 {
47 ID3D10BlendState1_AddRef(&state->ID3D10BlendState1_iface);
48 *object = &state->ID3D10BlendState1_iface;
49 return S_OK;
50 }
51
52 WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid));
53
54 *object = NULL;
55 return E_NOINTERFACE;
56}
#define WARN(fmt,...)
Definition: precomp.h:61
const GUID IID_IUnknown
#define NULL
Definition: types.h:112
#define S_OK
Definition: intsafe.h:52
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define E_NOINTERFACE
Definition: winerror.h:3479

Referenced by d3d10_blend_state_QueryInterface().

◆ d3d11_blend_state_Release()

static ULONG STDMETHODCALLTYPE d3d11_blend_state_Release ( ID3D11BlendState1 *  iface)
static

Definition at line 74 of file state.c.

75{
78
79 TRACE("%p decreasing refcount to %lu.\n", state, refcount);
80
81 if (!refcount)
82 {
83 ID3D11Device2 *device = state->device;
84 wined3d_blend_state_decref(state->wined3d_state);
85 ID3D11Device2_Release(device);
86 }
87
88 return refcount;
89}
#define InterlockedDecrement
Definition: armddk.h:52
ULONG CDECL wined3d_blend_state_decref(struct wined3d_blend_state *state)
Definition: device.c:284

Referenced by d3d10_blend_state_Release().

◆ d3d11_blend_state_SetPrivateData()

static HRESULT STDMETHODCALLTYPE d3d11_blend_state_SetPrivateData ( ID3D11BlendState1 *  iface,
REFGUID  guid,
UINT  data_size,
const void *  data 
)
static

Definition at line 112 of file state.c.

114{
116
117 TRACE("iface %p, guid %s, data_size %u, data %p.\n", iface, debugstr_guid(guid), data_size, data);
118
119 return d3d_set_private_data(&state->private_store, guid, data_size, data);
120}

◆ d3d11_blend_state_SetPrivateDataInterface()

static HRESULT STDMETHODCALLTYPE d3d11_blend_state_SetPrivateDataInterface ( ID3D11BlendState1 *  iface,
REFGUID  guid,
const IUnknown *  data 
)
static

Definition at line 122 of file state.c.

124{
126
127 TRACE("iface %p, guid %s, data %p.\n", iface, debugstr_guid(guid), data);
128
129 return d3d_set_private_data_interface(&state->private_store, guid, data);
130}

◆ d3d11_depthstencil_state_AddRef()

static ULONG STDMETHODCALLTYPE d3d11_depthstencil_state_AddRef ( ID3D11DepthStencilState *  iface)
static

Definition at line 519 of file state.c.

520{
523
524 TRACE("%p increasing refcount to %lu.\n", state, refcount);
525
526 if (refcount == 1)
527 {
528 ID3D11Device2_AddRef(state->device);
530 }
531
532 return refcount;
533}
static struct d3d_depthstencil_state * impl_from_ID3D11DepthStencilState(ID3D11DepthStencilState *iface)
ULONG CDECL wined3d_depth_stencil_state_incref(struct wined3d_depth_stencil_state *state)
Definition: device.c:343

Referenced by d3d10_depthstencil_state_AddRef().

◆ d3d11_depthstencil_state_GetDesc()

static void STDMETHODCALLTYPE d3d11_depthstencil_state_GetDesc ( ID3D11DepthStencilState *  iface,
D3D11_DEPTH_STENCIL_DESC *  desc 
)
static

Definition at line 594 of file state.c.

596{
598
599 TRACE("iface %p, desc %p.\n", iface, desc);
600
601 *desc = state->desc;
602}

◆ d3d11_depthstencil_state_GetDevice()

static void STDMETHODCALLTYPE d3d11_depthstencil_state_GetDevice ( ID3D11DepthStencilState *  iface,
ID3D11Device **  device 
)
static

Definition at line 553 of file state.c.

555{
557
558 TRACE("iface %p, device %p.\n", iface, device);
559
560 *device = (ID3D11Device *)state->device;
561 ID3D11Device_AddRef(*device);
562}

◆ d3d11_depthstencil_state_GetPrivateData()

static HRESULT STDMETHODCALLTYPE d3d11_depthstencil_state_GetPrivateData ( ID3D11DepthStencilState *  iface,
REFGUID  guid,
UINT *  data_size,
void *  data 
)
static

Definition at line 564 of file state.c.

566{
568
569 TRACE("iface %p, guid %s, data_size %p, data %p.\n", iface, debugstr_guid(guid), data_size, data);
570
571 return d3d_get_private_data(&state->private_store, guid, data_size, data);
572}

◆ d3d11_depthstencil_state_QueryInterface()

static HRESULT STDMETHODCALLTYPE d3d11_depthstencil_state_QueryInterface ( ID3D11DepthStencilState *  iface,
REFIID  riid,
void **  object 
)
static

Definition at line 489 of file state.c.

491{
493
494 TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object);
495
496 if (IsEqualGUID(riid, &IID_ID3D11DepthStencilState)
497 || IsEqualGUID(riid, &IID_ID3D11DeviceChild)
499 {
500 ID3D11DepthStencilState_AddRef(iface);
501 *object = iface;
502 return S_OK;
503 }
504
505 if (IsEqualGUID(riid, &IID_ID3D10DepthStencilState)
506 || IsEqualGUID(riid, &IID_ID3D10DeviceChild))
507 {
508 ID3D10DepthStencilState_AddRef(&state->ID3D10DepthStencilState_iface);
509 *object = &state->ID3D10DepthStencilState_iface;
510 return S_OK;
511 }
512
513 WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid));
514
515 *object = NULL;
516 return E_NOINTERFACE;
517}

Referenced by d3d10_depthstencil_state_QueryInterface().

◆ d3d11_depthstencil_state_Release()

static ULONG STDMETHODCALLTYPE d3d11_depthstencil_state_Release ( ID3D11DepthStencilState *  iface)
static

Definition at line 535 of file state.c.

536{
539
540 TRACE("%p decreasing refcount to %lu.\n", state, refcount);
541
542 if (!refcount)
543 {
544 ID3D11Device2 *device = state->device;
545
547 ID3D11Device2_Release(device);
548 }
549
550 return refcount;
551}
ULONG CDECL wined3d_depth_stencil_state_decref(struct wined3d_depth_stencil_state *state)
Definition: device.c:359

Referenced by d3d10_depthstencil_state_Release().

◆ d3d11_depthstencil_state_SetPrivateData()

static HRESULT STDMETHODCALLTYPE d3d11_depthstencil_state_SetPrivateData ( ID3D11DepthStencilState *  iface,
REFGUID  guid,
UINT  data_size,
const void *  data 
)
static

Definition at line 574 of file state.c.

576{
578
579 TRACE("iface %p, guid %s, data_size %u, data %p.\n", iface, debugstr_guid(guid), data_size, data);
580
581 return d3d_set_private_data(&state->private_store, guid, data_size, data);
582}

◆ d3d11_depthstencil_state_SetPrivateDataInterface()

static HRESULT STDMETHODCALLTYPE d3d11_depthstencil_state_SetPrivateDataInterface ( ID3D11DepthStencilState *  iface,
REFGUID  guid,
const IUnknown *  data 
)
static

Definition at line 584 of file state.c.

586{
588
589 TRACE("iface %p, guid %s, data %p.\n", iface, debugstr_guid(guid), data);
590
591 return d3d_set_private_data_interface(&state->private_store, guid, data);
592}

◆ d3d11_rasterizer_state_AddRef()

static ULONG STDMETHODCALLTYPE d3d11_rasterizer_state_AddRef ( ID3D11RasterizerState1 *  iface)
static

Definition at line 926 of file state.c.

927{
930
931 TRACE("%p increasing refcount to %lu.\n", state, refcount);
932
933 if (refcount == 1)
934 {
935 ID3D11Device2_AddRef(state->device);
937 }
938
939 return refcount;
940}
static struct d3d_rasterizer_state * impl_from_ID3D11RasterizerState1(ID3D11RasterizerState1 *iface)
Definition: state.c:890
ULONG CDECL wined3d_rasterizer_state_incref(struct wined3d_rasterizer_state *state)
Definition: device.c:430

Referenced by d3d10_rasterizer_state_AddRef().

◆ d3d11_rasterizer_state_GetDesc()

static void STDMETHODCALLTYPE d3d11_rasterizer_state_GetDesc ( ID3D11RasterizerState1 *  iface,
D3D11_RASTERIZER_DESC *  desc 
)
static

Definition at line 1000 of file state.c.

1002{
1004
1005 TRACE("iface %p, desc %p.\n", iface, desc);
1006
1007 memcpy(desc, &state->desc, sizeof(*desc));
1008}

◆ d3d11_rasterizer_state_GetDesc1()

static void STDMETHODCALLTYPE d3d11_rasterizer_state_GetDesc1 ( ID3D11RasterizerState1 *  iface,
D3D11_RASTERIZER_DESC1 *  desc 
)
static

Definition at line 1010 of file state.c.

1012{
1014
1015 TRACE("iface %p, desc %p.\n", iface, desc);
1016
1017 *desc = state->desc;
1018}

◆ d3d11_rasterizer_state_GetDevice()

static void STDMETHODCALLTYPE d3d11_rasterizer_state_GetDevice ( ID3D11RasterizerState1 *  iface,
ID3D11Device **  device 
)
static

Definition at line 959 of file state.c.

961{
963
964 TRACE("iface %p, device %p.\n", iface, device);
965
966 *device = (ID3D11Device *)state->device;
967 ID3D11Device_AddRef(*device);
968}

◆ d3d11_rasterizer_state_GetPrivateData()

static HRESULT STDMETHODCALLTYPE d3d11_rasterizer_state_GetPrivateData ( ID3D11RasterizerState1 *  iface,
REFGUID  guid,
UINT *  data_size,
void *  data 
)
static

Definition at line 970 of file state.c.

972{
974
975 TRACE("iface %p, guid %s, data_size %p, data %p.\n", iface, debugstr_guid(guid), data_size, data);
976
977 return d3d_get_private_data(&state->private_store, guid, data_size, data);
978}

◆ d3d11_rasterizer_state_QueryInterface()

static HRESULT STDMETHODCALLTYPE d3d11_rasterizer_state_QueryInterface ( ID3D11RasterizerState1 *  iface,
REFIID  riid,
void **  object 
)
static

Definition at line 895 of file state.c.

897{
899
900 TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object);
901
902 if (IsEqualGUID(riid, &IID_ID3D11RasterizerState)
903 || IsEqualGUID(riid, &IID_ID3D11RasterizerState1)
904 || IsEqualGUID(riid, &IID_ID3D11DeviceChild)
906 {
907 ID3D11RasterizerState1_AddRef(iface);
908 *object = iface;
909 return S_OK;
910 }
911
912 if (IsEqualGUID(riid, &IID_ID3D10RasterizerState)
913 || IsEqualGUID(riid, &IID_ID3D10DeviceChild))
914 {
915 ID3D10RasterizerState_AddRef(&state->ID3D10RasterizerState_iface);
916 *object = &state->ID3D10RasterizerState_iface;
917 return S_OK;
918 }
919
920 WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid));
921
922 *object = NULL;
923 return E_NOINTERFACE;
924}

Referenced by d3d10_rasterizer_state_QueryInterface().

◆ d3d11_rasterizer_state_Release()

static ULONG STDMETHODCALLTYPE d3d11_rasterizer_state_Release ( ID3D11RasterizerState1 *  iface)
static

Definition at line 942 of file state.c.

943{
946
947 TRACE("%p decreasing refcount to %lu.\n", state, refcount);
948
949 if (!refcount)
950 {
951 ID3D11Device2 *device = state->device;
953 ID3D11Device2_Release(device);
954 }
955
956 return refcount;
957}
ULONG CDECL wined3d_rasterizer_state_decref(struct wined3d_rasterizer_state *state)
Definition: device.c:446

Referenced by d3d10_rasterizer_state_Release().

◆ d3d11_rasterizer_state_SetPrivateData()

static HRESULT STDMETHODCALLTYPE d3d11_rasterizer_state_SetPrivateData ( ID3D11RasterizerState1 *  iface,
REFGUID  guid,
UINT  data_size,
const void *  data 
)
static

Definition at line 980 of file state.c.

982{
984
985 TRACE("iface %p, guid %s, data_size %u, data %p.\n", iface, debugstr_guid(guid), data_size, data);
986
987 return d3d_set_private_data(&state->private_store, guid, data_size, data);
988}

◆ d3d11_rasterizer_state_SetPrivateDataInterface()

static HRESULT STDMETHODCALLTYPE d3d11_rasterizer_state_SetPrivateDataInterface ( ID3D11RasterizerState1 *  iface,
REFGUID  guid,
const IUnknown *  data 
)
static

Definition at line 990 of file state.c.

992{
994
995 TRACE("iface %p, guid %s, data %p.\n", iface, debugstr_guid(guid), data);
996
997 return d3d_set_private_data_interface(&state->private_store, guid, data);
998}

◆ d3d11_sampler_state_AddRef()

static ULONG STDMETHODCALLTYPE d3d11_sampler_state_AddRef ( ID3D11SamplerState *  iface)
static

Definition at line 1324 of file state.c.

1325{
1328
1329 TRACE("%p increasing refcount to %lu.\n", state, refcount);
1330
1331 if (refcount == 1)
1332 {
1333 ID3D11Device2_AddRef(state->device);
1334 wined3d_sampler_incref(state->wined3d_sampler);
1335 }
1336
1337 return refcount;
1338}
static struct d3d_sampler_state * impl_from_ID3D11SamplerState(ID3D11SamplerState *iface)
Definition: state.c:1289
ULONG CDECL wined3d_sampler_incref(struct wined3d_sampler *sampler)
Definition: sampler.c:26

Referenced by d3d10_sampler_state_AddRef().

◆ d3d11_sampler_state_GetDesc()

static void STDMETHODCALLTYPE d3d11_sampler_state_GetDesc ( ID3D11SamplerState *  iface,
D3D11_SAMPLER_DESC *  desc 
)
static

Definition at line 1398 of file state.c.

1400{
1402
1403 TRACE("iface %p, desc %p.\n", iface, desc);
1404
1405 *desc = state->desc;
1406}

◆ d3d11_sampler_state_GetDevice()

static void STDMETHODCALLTYPE d3d11_sampler_state_GetDevice ( ID3D11SamplerState *  iface,
ID3D11Device **  device 
)
static

Definition at line 1357 of file state.c.

1359{
1361
1362 TRACE("iface %p, device %p.\n", iface, device);
1363
1364 *device = (ID3D11Device *)state->device;
1365 ID3D11Device_AddRef(*device);
1366}

◆ d3d11_sampler_state_GetPrivateData()

static HRESULT STDMETHODCALLTYPE d3d11_sampler_state_GetPrivateData ( ID3D11SamplerState *  iface,
REFGUID  guid,
UINT *  data_size,
void *  data 
)
static

Definition at line 1368 of file state.c.

1370{
1372
1373 TRACE("iface %p, guid %s, data_size %p, data %p.\n", iface, debugstr_guid(guid), data_size, data);
1374
1375 return d3d_get_private_data(&state->private_store, guid, data_size, data);
1376}

◆ d3d11_sampler_state_QueryInterface()

static HRESULT STDMETHODCALLTYPE d3d11_sampler_state_QueryInterface ( ID3D11SamplerState *  iface,
REFIID  riid,
void **  object 
)
static

Definition at line 1294 of file state.c.

1296{
1298
1299 TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object);
1300
1301 if (IsEqualGUID(riid, &IID_ID3D11SamplerState)
1302 || IsEqualGUID(riid, &IID_ID3D11DeviceChild)
1304 {
1305 ID3D11SamplerState_AddRef(iface);
1306 *object = iface;
1307 return S_OK;
1308 }
1309
1310 if (IsEqualGUID(riid, &IID_ID3D10SamplerState)
1311 || IsEqualGUID(riid, &IID_ID3D10DeviceChild))
1312 {
1313 ID3D10SamplerState_AddRef(&state->ID3D10SamplerState_iface);
1314 *object = &state->ID3D10SamplerState_iface;
1315 return S_OK;
1316 }
1317
1318 WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid));
1319
1320 *object = NULL;
1321 return E_NOINTERFACE;
1322}

Referenced by d3d10_sampler_state_QueryInterface().

◆ d3d11_sampler_state_Release()

static ULONG STDMETHODCALLTYPE d3d11_sampler_state_Release ( ID3D11SamplerState *  iface)
static

Definition at line 1340 of file state.c.

1341{
1344
1345 TRACE("%p decreasing refcount to %lu.\n", state, refcount);
1346
1347 if (!refcount)
1348 {
1349 ID3D11Device2 *device = state->device;
1350 wined3d_sampler_decref(state->wined3d_sampler);
1351 ID3D11Device2_Release(device);
1352 }
1353
1354 return refcount;
1355}
ULONG CDECL wined3d_sampler_decref(struct wined3d_sampler *sampler)
Definition: sampler.c:35

Referenced by d3d10_sampler_state_Release().

◆ d3d11_sampler_state_SetPrivateData()

static HRESULT STDMETHODCALLTYPE d3d11_sampler_state_SetPrivateData ( ID3D11SamplerState *  iface,
REFGUID  guid,
UINT  data_size,
const void *  data 
)
static

Definition at line 1378 of file state.c.

1380{
1382
1383 TRACE("iface %p, guid %s, data_size %u, data %p.\n", iface, debugstr_guid(guid), data_size, data);
1384
1385 return d3d_set_private_data(&state->private_store, guid, data_size, data);
1386}

◆ d3d11_sampler_state_SetPrivateDataInterface()

static HRESULT STDMETHODCALLTYPE d3d11_sampler_state_SetPrivateDataInterface ( ID3D11SamplerState *  iface,
REFGUID  guid,
const IUnknown *  data 
)
static

Definition at line 1388 of file state.c.

1390{
1392
1393 TRACE("iface %p, guid %s, data %p.\n", iface, debugstr_guid(guid), data);
1394
1395 return d3d_set_private_data_interface(&state->private_store, guid, data);
1396}

◆ d3d_blend_state_create()

HRESULT d3d_blend_state_create ( struct d3d_device *  device,
const D3D11_BLEND_DESC1 *  desc,
struct d3d_blend_state **  state 
)

Definition at line 346 of file state.c.

348{
349 struct wined3d_blend_state_desc wined3d_desc;
350 struct d3d_blend_state *object;
351 struct wine_rb_entry *entry;
352 D3D11_BLEND_DESC1 tmp_desc;
353 unsigned int i, j;
354 HRESULT hr;
355
356 if (!desc)
357 return E_INVALIDARG;
358
359 /* D3D11_RENDER_TARGET_BLEND_DESC1 has a hole, which is a problem because we use
360 * D3D11_BLEND_DESC1 as a key in the rbtree. */
361 memset(&tmp_desc, 0, sizeof(tmp_desc));
362 tmp_desc.AlphaToCoverageEnable = desc->AlphaToCoverageEnable;
363 tmp_desc.IndependentBlendEnable = desc->IndependentBlendEnable;
365 {
366 j = desc->IndependentBlendEnable ? i : 0;
367 tmp_desc.RenderTarget[i].BlendEnable = desc->RenderTarget[j].BlendEnable;
368 if (tmp_desc.RenderTarget[i].BlendEnable)
369 {
370 tmp_desc.RenderTarget[i].SrcBlend = desc->RenderTarget[j].SrcBlend;
371 tmp_desc.RenderTarget[i].DestBlend = desc->RenderTarget[j].DestBlend;
372 tmp_desc.RenderTarget[i].BlendOp = desc->RenderTarget[j].BlendOp;
373 tmp_desc.RenderTarget[i].SrcBlendAlpha = desc->RenderTarget[j].SrcBlendAlpha;
374 tmp_desc.RenderTarget[i].DestBlendAlpha = desc->RenderTarget[j].DestBlendAlpha;
375 tmp_desc.RenderTarget[i].BlendOpAlpha = desc->RenderTarget[j].BlendOpAlpha;
376 }
377 else
378 {
385 }
386
387 tmp_desc.RenderTarget[i].LogicOpEnable = desc->RenderTarget[j].LogicOpEnable;
388 if (tmp_desc.RenderTarget[i].LogicOpEnable)
389 tmp_desc.RenderTarget[i].LogicOp = desc->RenderTarget[j].LogicOp;
390 else
392
393 tmp_desc.RenderTarget[i].RenderTargetWriteMask = desc->RenderTarget[j].RenderTargetWriteMask;
394 }
395
397 if ((entry = wine_rb_get(&device->blend_states, &tmp_desc)))
398 {
400
401 TRACE("Returning existing blend state %p.\n", object);
402 ID3D11BlendState1_AddRef(&object->ID3D11BlendState1_iface);
403 *state = object;
405
406 return S_OK;
407 }
408
409 if (!(object = calloc(1, sizeof(*object))))
410 {
412 return E_OUTOFMEMORY;
413 }
414
415 object->ID3D11BlendState1_iface.lpVtbl = &d3d11_blend_state_vtbl;
416 object->ID3D10BlendState1_iface.lpVtbl = &d3d10_blend_state_vtbl;
417 object->refcount = 1;
418 wined3d_private_store_init(&object->private_store);
419 object->desc = tmp_desc;
420
421 if (wine_rb_put(&device->blend_states, &tmp_desc, &object->entry) == -1)
422 {
423 ERR("Failed to insert blend state entry.\n");
424 wined3d_private_store_cleanup(&object->private_store);
425 free(object);
427 return E_FAIL;
428 }
429
430 wined3d_desc.alpha_to_coverage = desc->AlphaToCoverageEnable;
431 wined3d_desc.independent = desc->IndependentBlendEnable;
433 {
434 wined3d_desc.rt[i].enable = desc->RenderTarget[i].BlendEnable;
435 wined3d_desc.rt[i].src = wined3d_blend_from_d3d11(desc->RenderTarget[i].SrcBlend);
436 wined3d_desc.rt[i].dst = wined3d_blend_from_d3d11(desc->RenderTarget[i].DestBlend);
437 wined3d_desc.rt[i].op = wined3d_blend_op_from_d3d11(desc->RenderTarget[i].BlendOp);
438 wined3d_desc.rt[i].src_alpha = wined3d_blend_from_d3d11(desc->RenderTarget[i].SrcBlendAlpha);
439 wined3d_desc.rt[i].dst_alpha = wined3d_blend_from_d3d11(desc->RenderTarget[i].DestBlendAlpha);
440 wined3d_desc.rt[i].op_alpha = wined3d_blend_op_from_d3d11(desc->RenderTarget[i].BlendOpAlpha);
441 wined3d_desc.rt[i].writemask = desc->RenderTarget[i].RenderTargetWriteMask;
442 }
443
444 if (desc->RenderTarget[0].LogicOpEnable && desc->RenderTarget[0].LogicOp != D3D11_LOGIC_OP_NOOP)
445 FIXME("Ignoring logic op %#x.\n", desc->RenderTarget[0].LogicOp);
446
447 /* We cannot fail after creating a wined3d_blend_state object. It
448 * would lead to double free. */
449 if (FAILED(hr = wined3d_blend_state_create(device->wined3d_device, &wined3d_desc,
450 object, &d3d_blend_state_wined3d_parent_ops, &object->wined3d_state)))
451 {
452 WARN("Failed to create wined3d blend state, hr %#lx.\n", hr);
453 wined3d_private_store_cleanup(&object->private_store);
454 wine_rb_remove(&device->blend_states, &object->entry);
455 free(object);
457 return hr;
458 }
460
461 ID3D11Device2_AddRef(object->device = &device->ID3D11Device2_iface);
462
463 TRACE("Created blend state %p.\n", object);
464 *state = object;
465
466 return S_OK;
467}
#define FIXME(fmt,...)
Definition: precomp.h:53
#define ERR(fmt,...)
Definition: precomp.h:57
@ D3D11_BLEND_ONE
Definition: d3d11.idl:301
@ D3D11_BLEND_ZERO
Definition: d3d11.idl:300
@ D3D11_BLEND_OP_ADD
Definition: d3d11.idl:321
@ D3D11_LOGIC_OP_NOOP
Definition: d3d11_1.idl:31
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_INVALIDARG
Definition: ddrawi.h:101
#define E_FAIL
Definition: ddrawi.h:102
#define free
Definition: debug_ros.c:5
HRESULT hr
Definition: delayimp.cpp:582
static const struct ID3D11BlendState1Vtbl d3d11_blend_state_vtbl
Definition: state.c:164
static enum wined3d_blend_op wined3d_blend_op_from_d3d11(D3D11_BLEND_OP op)
Definition: state.c:341
static enum wined3d_blend wined3d_blend_from_d3d11(D3D11_BLEND factor)
Definition: state.c:336
static const struct wined3d_parent_ops d3d_blend_state_wined3d_parent_ops
Definition: state.c:331
static const struct ID3D10BlendState1Vtbl d3d10_blend_state_vtbl
Definition: state.c:304
HRESULT CDECL wined3d_blend_state_create(struct wined3d_device *device, const struct wined3d_blend_state_desc *desc, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_blend_state **state)
Definition: device.c:313
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
#define FAILED(hr)
Definition: intsafe.h:51
uint32_t entry
Definition: isohybrid.c:63
#define calloc
Definition: rosglue.h:14
#define wine_rb_entry
Definition: rbtree.h:404
#define WINE_RB_ENTRY_VALUE
Definition: rbtree.h:414
#define wine_rb_put
Definition: rbtree.h:410
#define wine_rb_get
Definition: rbtree.h:409
#define wine_rb_remove
Definition: rbtree.h:411
#define memset(x, y, z)
Definition: compat.h:39
static void wined3d_private_store_cleanup(struct wined3d_private_store *store)
Definition: wined3d.h:2636
static void wined3d_private_store_init(struct wined3d_private_store *store)
Definition: wined3d.h:2607
void WINAPI wined3d_mutex_unlock(void)
Definition: wined3d_main.c:544
void WINAPI wined3d_mutex_lock(void)
Definition: wined3d_main.c:539

Referenced by d3d11_device_CreateBlendState1().

◆ d3d_blend_state_wined3d_object_destroyed()

static void STDMETHODCALLTYPE d3d_blend_state_wined3d_object_destroyed ( void *  parent)
static

Definition at line 321 of file state.c.

322{
323 struct d3d_blend_state *state = parent;
325
326 wine_rb_remove(&device->blend_states, &state->entry);
327 wined3d_private_store_cleanup(&state->private_store);
328 free(parent);
329}
static struct d3d_device * impl_from_ID3D11Device2(ID3D11Device2 *iface)
r parent
Definition: btrfs.c:3010

◆ d3d_depthstencil_state_create()

HRESULT d3d_depthstencil_state_create ( struct d3d_device *  device,
const D3D11_DEPTH_STENCIL_DESC *  desc,
struct d3d_depthstencil_state **  state 
)

Definition at line 751 of file state.c.

753{
754 struct wined3d_depth_stencil_state_desc wined3d_desc;
756 D3D11_DEPTH_STENCIL_DESC tmp_desc;
757 struct wine_rb_entry *entry;
758 HRESULT hr;
759
760 if (!desc)
761 return E_INVALIDARG;
762
763 /* D3D11_DEPTH_STENCIL_DESC has a hole, which is a problem because we use
764 * it as a key in the rbtree. */
765 memset(&tmp_desc, 0, sizeof(tmp_desc));
766 tmp_desc.DepthEnable = desc->DepthEnable;
767 if (desc->DepthEnable)
768 {
769 tmp_desc.DepthWriteMask = desc->DepthWriteMask;
770 tmp_desc.DepthFunc = desc->DepthFunc;
771 }
772 else
773 {
774 tmp_desc.DepthWriteMask = D3D11_DEPTH_WRITE_MASK_ALL;
775 tmp_desc.DepthFunc = D3D11_COMPARISON_LESS;
776 }
777 tmp_desc.StencilEnable = desc->StencilEnable;
778 if (desc->StencilEnable)
779 {
780 tmp_desc.StencilReadMask = desc->StencilReadMask;
781 tmp_desc.StencilWriteMask = desc->StencilWriteMask;
782 tmp_desc.FrontFace = desc->FrontFace;
783 tmp_desc.BackFace = desc->BackFace;
784 }
785 else
786 {
787 tmp_desc.StencilReadMask = D3D11_DEFAULT_STENCIL_READ_MASK;
788 tmp_desc.StencilWriteMask = D3D11_DEFAULT_STENCIL_WRITE_MASK;
789 tmp_desc.FrontFace.StencilFailOp = D3D11_STENCIL_OP_KEEP;
790 tmp_desc.FrontFace.StencilDepthFailOp = D3D11_STENCIL_OP_KEEP;
791 tmp_desc.FrontFace.StencilPassOp = D3D11_STENCIL_OP_KEEP;
792 tmp_desc.FrontFace.StencilFunc = D3D11_COMPARISON_ALWAYS;
793 tmp_desc.BackFace.StencilFailOp = D3D11_STENCIL_OP_KEEP;
794 tmp_desc.BackFace.StencilDepthFailOp = D3D11_STENCIL_OP_KEEP;
795 tmp_desc.BackFace.StencilPassOp = D3D11_STENCIL_OP_KEEP;
796 tmp_desc.BackFace.StencilFunc = D3D11_COMPARISON_ALWAYS;
797 }
798
800 if ((entry = wine_rb_get(&device->depthstencil_states, &tmp_desc)))
801 {
803
804 TRACE("Returning existing depthstencil state %p.\n", object);
805 ID3D11DepthStencilState_AddRef(&object->ID3D11DepthStencilState_iface);
806 *state = object;
808
809 return S_OK;
810 }
811
812 if (!(object = calloc(1, sizeof(*object))))
813 {
815 return E_OUTOFMEMORY;
816 }
817
818 object->ID3D11DepthStencilState_iface.lpVtbl = &d3d11_depthstencil_state_vtbl;
819 object->ID3D10DepthStencilState_iface.lpVtbl = &d3d10_depthstencil_state_vtbl;
820 object->refcount = 1;
821 wined3d_private_store_init(&object->private_store);
822 object->desc = tmp_desc;
823
824 if (wine_rb_put(&device->depthstencil_states, &tmp_desc, &object->entry) == -1)
825 {
826 ERR("Failed to insert depth/stencil state entry.\n");
827 wined3d_private_store_cleanup(&object->private_store);
828 free(object);
830 return E_FAIL;
831 }
832
833 wined3d_desc.depth = desc->DepthEnable;
834 wined3d_desc.depth_write = desc->DepthWriteMask;
835 wined3d_desc.depth_func = wined3d_cmp_func_from_d3d11(desc->DepthFunc);
836 wined3d_desc.stencil = desc->StencilEnable;
837 wined3d_desc.stencil_read_mask = desc->StencilReadMask;
838 wined3d_desc.stencil_write_mask = desc->StencilWriteMask;
839 wined3d_desc.front.fail_op = wined3d_stencil_op_from_d3d11(desc->FrontFace.StencilFailOp);
840 wined3d_desc.front.depth_fail_op = wined3d_stencil_op_from_d3d11(desc->FrontFace.StencilDepthFailOp);
841 wined3d_desc.front.pass_op = wined3d_stencil_op_from_d3d11(desc->FrontFace.StencilPassOp);
842 wined3d_desc.front.func = wined3d_cmp_func_from_d3d11(desc->FrontFace.StencilFunc);
843 wined3d_desc.back.fail_op = wined3d_stencil_op_from_d3d11(desc->BackFace.StencilFailOp);
844 wined3d_desc.back.depth_fail_op = wined3d_stencil_op_from_d3d11(desc->BackFace.StencilDepthFailOp);
845 wined3d_desc.back.pass_op = wined3d_stencil_op_from_d3d11(desc->BackFace.StencilPassOp);
846 wined3d_desc.back.func = wined3d_cmp_func_from_d3d11(desc->BackFace.StencilFunc);
847
848 /* We cannot fail after creating a wined3d_depth_stencil_state object. It
849 * would lead to double free. */
850 if (FAILED(hr = wined3d_depth_stencil_state_create(device->wined3d_device, &wined3d_desc,
851 object, &d3d_depthstencil_state_wined3d_parent_ops, &object->wined3d_state)))
852 {
853 WARN("Failed to create wined3d depth/stencil state, hr %#lx.\n", hr);
854 wined3d_private_store_cleanup(&object->private_store);
855 wine_rb_remove(&device->depthstencil_states, &object->entry);
856 free(object);
858 return hr;
859 }
861
862 ID3D11Device2_AddRef(object->device = &device->ID3D11Device2_iface);
863
864 TRACE("Created depth/stencil state %p.\n", object);
865 *state = object;
866
867 return S_OK;
868}
const UINT D3D11_DEFAULT_STENCIL_READ_MASK
Definition: d3d11.idl:146
@ D3D11_COMPARISON_ALWAYS
Definition: d3d11.idl:594
@ D3D11_COMPARISON_LESS
Definition: d3d11.idl:588
@ D3D11_DEPTH_WRITE_MASK_ALL
Definition: d3d11.idl:633
const UINT D3D11_DEFAULT_STENCIL_WRITE_MASK
Definition: d3d11.idl:148
static const struct ID3D10DepthStencilStateVtbl d3d10_depthstencil_state_vtbl
Definition: state.c:711
static const struct wined3d_parent_ops d3d_depthstencil_state_wined3d_parent_ops
Definition: state.c:736
static const struct ID3D11DepthStencilStateVtbl d3d11_depthstencil_state_vtbl
Definition: state.c:604
static enum wined3d_stencil_op wined3d_stencil_op_from_d3d11(D3D11_STENCIL_OP stencil_op)
Definition: state.c:746
static enum wined3d_cmp_func wined3d_cmp_func_from_d3d11(D3D11_COMPARISON_FUNC func)
Definition: state.c:741
HRESULT CDECL wined3d_depth_stencil_state_create(struct wined3d_device *device, const struct wined3d_depth_stencil_state_desc *desc, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_depth_stencil_state **state)
Definition: device.c:404

Referenced by d3d10_device_CreateDepthStencilState(), and d3d11_device_CreateDepthStencilState().

◆ d3d_depthstencil_state_wined3d_object_destroyed()

static void STDMETHODCALLTYPE d3d_depthstencil_state_wined3d_object_destroyed ( void *  parent)
static

Definition at line 726 of file state.c.

727{
730
731 wine_rb_remove(&device->depthstencil_states, &state->entry);
732 wined3d_private_store_cleanup(&state->private_store);
733 free(parent);
734}

◆ d3d_rasterizer_state_create()

HRESULT d3d_rasterizer_state_create ( struct d3d_device *  device,
const D3D11_RASTERIZER_DESC1 *  desc,
struct d3d_rasterizer_state **  state 
)

Definition at line 1228 of file state.c.

1230{
1232 struct wine_rb_entry *entry;
1233 HRESULT hr;
1234
1236 if ((entry = wine_rb_get(&device->rasterizer_states, desc)))
1237 {
1239
1240 TRACE("Returning existing rasterizer state %p.\n", object);
1241 ID3D11RasterizerState1_AddRef(&object->ID3D11RasterizerState1_iface);
1242 *state = object;
1244
1245 return S_OK;
1246 }
1247
1248 if (!(object = calloc(1, sizeof(*object))))
1249 {
1251 return E_OUTOFMEMORY;
1252 }
1253
1256 if (FAILED(hr))
1257 {
1258 WARN("Failed to initialise rasterizer state, hr %#lx.\n", hr);
1259 free(object);
1260 return hr;
1261 }
1262
1263 TRACE("Created rasterizer state %p.\n", object);
1264 *state = object;
1265
1266 return S_OK;
1267}
static HRESULT d3d_rasterizer_state_init(struct d3d_rasterizer_state *state, struct d3d_device *device, const D3D11_RASTERIZER_DESC1 *desc)
Definition: state.c:1169

Referenced by d3d10_device_CreateRasterizerState(), d3d11_device_CreateRasterizerState(), and d3d11_device_CreateRasterizerState1().

◆ d3d_rasterizer_state_init()

static HRESULT d3d_rasterizer_state_init ( struct d3d_rasterizer_state *  state,
struct d3d_device *  device,
const D3D11_RASTERIZER_DESC1 *  desc 
)
static

Definition at line 1169 of file state.c.

1171{
1172 struct wined3d_rasterizer_state_desc wined3d_desc;
1173 HRESULT hr;
1174
1175 state->ID3D11RasterizerState1_iface.lpVtbl = &d3d11_rasterizer_state_vtbl;
1176 state->ID3D10RasterizerState_iface.lpVtbl = &d3d10_rasterizer_state_vtbl;
1177 state->refcount = 1;
1178 wined3d_private_store_init(&state->private_store);
1179 state->desc = *desc;
1180
1181 if (wine_rb_put(&device->rasterizer_states, desc, &state->entry) == -1)
1182 {
1183 ERR("Failed to insert rasterizer state entry.\n");
1184 wined3d_private_store_cleanup(&state->private_store);
1185 return E_FAIL;
1186 }
1187
1188 wined3d_desc.fill_mode = wined3d_fill_mode_from_d3d11(desc->FillMode);
1189 wined3d_desc.cull_mode = wined3d_cull_from_d3d11(desc->CullMode);
1190 wined3d_desc.front_ccw = desc->FrontCounterClockwise;
1191 wined3d_desc.depth_bias = desc->DepthBias;
1192 wined3d_desc.depth_bias_clamp = desc->DepthBiasClamp;
1193 wined3d_desc.scale_bias = desc->SlopeScaledDepthBias;
1194 wined3d_desc.depth_clip = desc->DepthClipEnable;
1195 wined3d_desc.scissor = desc->ScissorEnable;
1196 wined3d_desc.line_antialias = desc->AntialiasedLineEnable;
1197
1198 if (desc->MultisampleEnable)
1199 {
1200 static unsigned int once;
1201 if (!once++)
1202 FIXME("Ignoring MultisampleEnable %#x.\n", desc->MultisampleEnable);
1203 }
1204
1205 if (desc->ForcedSampleCount)
1206 {
1207 static unsigned int once;
1208 if (!once++)
1209 FIXME("Ignoring ForcedSampleCount %#x.\n", desc->ForcedSampleCount);
1210 }
1211
1212 /* We cannot fail after creating a wined3d_rasterizer_state object. It
1213 * would lead to double free. */
1214 if (FAILED(hr = wined3d_rasterizer_state_create(device->wined3d_device, &wined3d_desc,
1216 {
1217 WARN("Failed to create wined3d rasteriser state, hr %#lx.\n", hr);
1218 wined3d_private_store_cleanup(&state->private_store);
1219 wine_rb_remove(&device->rasterizer_states, &state->entry);
1220 return hr;
1221 }
1222
1223 ID3D11Device2_AddRef(state->device = &device->ID3D11Device2_iface);
1224
1225 return S_OK;
1226}
static enum wined3d_fill_mode wined3d_fill_mode_from_d3d11(D3D11_FILL_MODE mode)
Definition: state.c:1159
static const struct ID3D11RasterizerState1Vtbl d3d11_rasterizer_state_vtbl
Definition: state.c:1020
static const struct wined3d_parent_ops d3d_rasterizer_state_wined3d_parent_ops
Definition: state.c:1154
static const struct ID3D10RasterizerStateVtbl d3d10_rasterizer_state_vtbl
Definition: state.c:1129
static enum wined3d_cull wined3d_cull_from_d3d11(D3D11_CULL_MODE mode)
Definition: state.c:1164
HRESULT CDECL wined3d_rasterizer_state_create(struct wined3d_device *device, const struct wined3d_rasterizer_state_desc *desc, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_rasterizer_state **state)
Definition: device.c:470

Referenced by d3d_rasterizer_state_create().

◆ d3d_rasterizer_state_wined3d_object_destroyed()

static void STDMETHODCALLTYPE d3d_rasterizer_state_wined3d_object_destroyed ( void *  parent)
static

Definition at line 1144 of file state.c.

1145{
1148
1149 wine_rb_remove(&device->rasterizer_states, &state->entry);
1150 wined3d_private_store_cleanup(&state->private_store);
1151 free(parent);
1152}

◆ d3d_sampler_state_create()

HRESULT d3d_sampler_state_create ( struct d3d_device *  device,
const D3D11_SAMPLER_DESC *  desc,
struct d3d_sampler_state **  state 
)

Definition at line 1627 of file state.c.

1629{
1630 D3D11_SAMPLER_DESC normalized_desc;
1631 struct d3d_sampler_state *object;
1632 struct wine_rb_entry *entry;
1633 HRESULT hr;
1634
1635 if (!desc)
1636 return E_INVALIDARG;
1637
1638 normalized_desc = *desc;
1639 if (!D3D11_DECODE_IS_ANISOTROPIC_FILTER(normalized_desc.Filter))
1640 normalized_desc.MaxAnisotropy = 0;
1641 if (!D3D11_DECODE_IS_COMPARISON_FILTER(normalized_desc.Filter))
1642 normalized_desc.ComparisonFunc = D3D11_COMPARISON_NEVER;
1643 if (normalized_desc.AddressU != D3D11_TEXTURE_ADDRESS_BORDER
1644 && normalized_desc.AddressV != D3D11_TEXTURE_ADDRESS_BORDER
1645 && normalized_desc.AddressW != D3D11_TEXTURE_ADDRESS_BORDER)
1646 memset(&normalized_desc.BorderColor, 0, sizeof(normalized_desc.BorderColor));
1647
1649 if ((entry = wine_rb_get(&device->sampler_states, &normalized_desc)))
1650 {
1652
1653 TRACE("Returning existing sampler state %p.\n", object);
1654 ID3D11SamplerState_AddRef(&object->ID3D11SamplerState_iface);
1655 *state = object;
1657
1658 return S_OK;
1659 }
1660
1661 if (!(object = calloc(1, sizeof(*object))))
1662 {
1664 return E_OUTOFMEMORY;
1665 }
1666
1667 hr = d3d_sampler_state_init(object, device, &normalized_desc);
1669 if (FAILED(hr))
1670 {
1671 WARN("Failed to initialise sampler state, hr %#lx.\n", hr);
1672 free(object);
1673 return hr;
1674 }
1675
1676 TRACE("Created sampler state %p.\n", object);
1677 *state = object;
1678
1679 return S_OK;
1680}
@ D3D11_COMPARISON_NEVER
Definition: d3d11.idl:587
static HRESULT d3d_sampler_state_init(struct d3d_sampler_state *state, struct d3d_device *device, const D3D11_SAMPLER_DESC *desc)
Definition: state.c:1576

Referenced by d3d10_device_CreateSamplerState(), and d3d11_device_CreateSamplerState().

◆ d3d_sampler_state_init()

static HRESULT d3d_sampler_state_init ( struct d3d_sampler_state *  state,
struct d3d_device *  device,
const D3D11_SAMPLER_DESC *  desc 
)
static

Definition at line 1576 of file state.c.

1578{
1579 struct wined3d_sampler_desc wined3d_desc;
1580 HRESULT hr;
1581
1582 state->ID3D11SamplerState_iface.lpVtbl = &d3d11_sampler_state_vtbl;
1583 state->ID3D10SamplerState_iface.lpVtbl = &d3d10_sampler_state_vtbl;
1584 state->refcount = 1;
1585 wined3d_private_store_init(&state->private_store);
1586 state->desc = *desc;
1587
1588 wined3d_desc.address_u = wined3d_texture_address_from_d3d11(desc->AddressU);
1589 wined3d_desc.address_v = wined3d_texture_address_from_d3d11(desc->AddressV);
1590 wined3d_desc.address_w = wined3d_texture_address_from_d3d11(desc->AddressW);
1591 memcpy(wined3d_desc.border_color, desc->BorderColor, sizeof(wined3d_desc.border_color));
1592 wined3d_desc.mag_filter = wined3d_texture_filter_mag_from_d3d11(desc->Filter);
1593 wined3d_desc.min_filter = wined3d_texture_filter_min_from_d3d11(desc->Filter);
1594 wined3d_desc.mip_filter = wined3d_texture_filter_mip_from_d3d11(desc->Filter);
1595 wined3d_desc.lod_bias = desc->MipLODBias;
1596 wined3d_desc.min_lod = desc->MinLOD;
1597 wined3d_desc.max_lod = max(desc->MinLOD, desc->MaxLOD);
1598 wined3d_desc.mip_base_level = 0;
1599 wined3d_desc.max_anisotropy = D3D11_DECODE_IS_ANISOTROPIC_FILTER(desc->Filter) ? desc->MaxAnisotropy : 1;
1600 wined3d_desc.compare = wined3d_texture_compare_from_d3d11(desc->Filter);
1601 wined3d_desc.comparison_func = wined3d_cmp_func_from_d3d11(desc->ComparisonFunc);
1602 wined3d_desc.srgb_decode = TRUE;
1603
1604 if (wine_rb_put(&device->sampler_states, desc, &state->entry) == -1)
1605 {
1606 ERR("Failed to insert sampler state entry.\n");
1607 wined3d_private_store_cleanup(&state->private_store);
1608 return E_FAIL;
1609 }
1610
1611 /* We cannot fail after creating a wined3d_sampler object. It would lead to
1612 * double free. */
1613 if (FAILED(hr = wined3d_sampler_create(device->wined3d_device, &wined3d_desc,
1614 state, &d3d_sampler_wined3d_parent_ops, &state->wined3d_sampler)))
1615 {
1616 WARN("Failed to create wined3d sampler, hr %#lx.\n", hr);
1617 wined3d_private_store_cleanup(&state->private_store);
1618 wine_rb_remove(&device->sampler_states, &state->entry);
1619 return hr;
1620 }
1621
1622 ID3D11Device2_AddRef(state->device = &device->ID3D11Device2_iface);
1623
1624 return S_OK;
1625}
#define TRUE
Definition: types.h:120
static const struct ID3D10SamplerStateVtbl d3d10_sampler_state_vtbl
Definition: state.c:1515
static enum wined3d_texture_filter_type wined3d_texture_filter_mip_from_d3d11(enum D3D11_FILTER f)
Definition: state.c:1550
static enum wined3d_texture_filter_type wined3d_texture_filter_min_from_d3d11(enum D3D11_FILTER f)
Definition: state.c:1564
static BOOL wined3d_texture_compare_from_d3d11(enum D3D11_FILTER f)
Definition: state.c:1571
static const struct wined3d_parent_ops d3d_sampler_wined3d_parent_ops
Definition: state.c:1540
static const struct ID3D11SamplerStateVtbl d3d11_sampler_state_vtbl
Definition: state.c:1408
static enum wined3d_texture_address wined3d_texture_address_from_d3d11(enum D3D11_TEXTURE_ADDRESS_MODE t)
Definition: state.c:1545
static enum wined3d_texture_filter_type wined3d_texture_filter_mag_from_d3d11(enum D3D11_FILTER f)
Definition: state.c:1557
HRESULT CDECL wined3d_sampler_create(struct wined3d_device *device, const struct wined3d_sampler_desc *desc, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_sampler **sampler)
Definition: sampler.c:287
#define max(a, b)
Definition: svc.c:63

Referenced by d3d_sampler_state_create().

◆ d3d_sampler_wined3d_object_destroyed()

static void STDMETHODCALLTYPE d3d_sampler_wined3d_object_destroyed ( void *  parent)
static

Definition at line 1530 of file state.c.

1531{
1532 struct d3d_sampler_state *state = parent;
1534
1535 wine_rb_remove(&device->sampler_states, &state->entry);
1536 wined3d_private_store_cleanup(&state->private_store);
1537 free(parent);
1538}

◆ impl_from_ID3D10BlendState()

static struct d3d_blend_state * impl_from_ID3D10BlendState ( ID3D10BlendState1 *  iface)
inlinestatic

◆ impl_from_ID3D10DepthStencilState()

◆ impl_from_ID3D10RasterizerState()

◆ impl_from_ID3D10SamplerState()

◆ impl_from_ID3D11RasterizerState1()

◆ impl_from_ID3D11SamplerState()

◆ unsafe_impl_from_ID3D10BlendState()

struct d3d_blend_state * unsafe_impl_from_ID3D10BlendState ( ID3D10BlendState *  iface)

Definition at line 478 of file state.c.

479{
480 if (!iface)
481 return NULL;
482 assert(iface->lpVtbl == (ID3D10BlendStateVtbl *)&d3d10_blend_state_vtbl);
483
484 return impl_from_ID3D10BlendState((ID3D10BlendState1 *)iface);
485}
#define assert(_expr)
Definition: assert.h:32

Referenced by d3d10_device_OMSetBlendState().

◆ unsafe_impl_from_ID3D10DepthStencilState()

struct d3d_depthstencil_state * unsafe_impl_from_ID3D10DepthStencilState ( ID3D10DepthStencilState *  iface)

Definition at line 879 of file state.c.

880{
881 if (!iface)
882 return NULL;
883 assert(iface->lpVtbl == &d3d10_depthstencil_state_vtbl);
884
886}

Referenced by d3d10_device_OMSetDepthStencilState().

◆ unsafe_impl_from_ID3D10RasterizerState()

struct d3d_rasterizer_state * unsafe_impl_from_ID3D10RasterizerState ( ID3D10RasterizerState *  iface)

Definition at line 1278 of file state.c.

1279{
1280 if (!iface)
1281 return NULL;
1282 assert(iface->lpVtbl == &d3d10_rasterizer_state_vtbl);
1283
1284 return impl_from_ID3D10RasterizerState(iface);
1285}

Referenced by d3d10_device_RSSetState().

◆ unsafe_impl_from_ID3D10SamplerState()

struct d3d_sampler_state * unsafe_impl_from_ID3D10SamplerState ( ID3D10SamplerState *  iface)

Definition at line 1691 of file state.c.

1692{
1693 if (!iface)
1694 return NULL;
1695 assert(iface->lpVtbl == &d3d10_sampler_state_vtbl);
1696
1697 return impl_from_ID3D10SamplerState(iface);
1698}

Referenced by d3d10_device_set_samplers().

◆ unsafe_impl_from_ID3D11BlendState()

struct d3d_blend_state * unsafe_impl_from_ID3D11BlendState ( ID3D11BlendState *  iface)

Definition at line 469 of file state.c.

470{
471 if (!iface)
472 return NULL;
473 assert(iface->lpVtbl == (ID3D11BlendStateVtbl *)&d3d11_blend_state_vtbl);
474
476}

Referenced by d3d11_device_context_OMSetBlendState().

◆ unsafe_impl_from_ID3D11DepthStencilState()

struct d3d_depthstencil_state * unsafe_impl_from_ID3D11DepthStencilState ( ID3D11DepthStencilState *  iface)

Definition at line 870 of file state.c.

871{
872 if (!iface)
873 return NULL;
874 assert(iface->lpVtbl == &d3d11_depthstencil_state_vtbl);
875
877}

Referenced by d3d11_device_context_OMSetDepthStencilState().

◆ unsafe_impl_from_ID3D11RasterizerState()

struct d3d_rasterizer_state * unsafe_impl_from_ID3D11RasterizerState ( ID3D11RasterizerState *  iface)

Definition at line 1269 of file state.c.

1270{
1271 if (!iface)
1272 return NULL;
1273 assert(iface->lpVtbl == (ID3D11RasterizerStateVtbl *)&d3d11_rasterizer_state_vtbl);
1274
1276}

Referenced by d3d11_device_context_RSSetState().

◆ unsafe_impl_from_ID3D11SamplerState()

struct d3d_sampler_state * unsafe_impl_from_ID3D11SamplerState ( ID3D11SamplerState *  iface)

Definition at line 1682 of file state.c.

1683{
1684 if (!iface)
1685 return NULL;
1686 assert(iface->lpVtbl == &d3d11_sampler_state_vtbl);
1687
1688 return impl_from_ID3D11SamplerState(iface);
1689}

Referenced by d3d11_device_context_set_samplers().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( d3d11  )

◆ wined3d_blend_from_d3d11()

static enum wined3d_blend wined3d_blend_from_d3d11 ( D3D11_BLEND  factor)
static

Definition at line 336 of file state.c.

337{
338 return (enum wined3d_blend)factor;
339}
wined3d_blend
Definition: wined3d.h:418

Referenced by d3d_blend_state_create().

◆ wined3d_blend_op_from_d3d11()

static enum wined3d_blend_op wined3d_blend_op_from_d3d11 ( D3D11_BLEND_OP  op)
static

Definition at line 341 of file state.c.

342{
343 return (enum wined3d_blend_op)op;
344}
wined3d_blend_op
Definition: wined3d.h:441

Referenced by d3d_blend_state_create().

◆ wined3d_cmp_func_from_d3d11()

static enum wined3d_cmp_func wined3d_cmp_func_from_d3d11 ( D3D11_COMPARISON_FUNC  func)
static

Definition at line 741 of file state.c.

742{
743 return (enum wined3d_cmp_func)func;
744}
GLenum func
Definition: glext.h:6028
wined3d_cmp_func
Definition: wined3d.h:460

Referenced by d3d_depthstencil_state_create(), and d3d_sampler_state_init().

◆ wined3d_cull_from_d3d11()

static enum wined3d_cull wined3d_cull_from_d3d11 ( D3D11_CULL_MODE  mode)
static

Definition at line 1164 of file state.c.

1165{
1166 return (enum wined3d_cull)mode;
1167}
GLenum mode
Definition: glext.h:6217
wined3d_cull
Definition: wined3d.h:501

Referenced by d3d_rasterizer_state_init().

◆ wined3d_fill_mode_from_d3d11()

static enum wined3d_fill_mode wined3d_fill_mode_from_d3d11 ( D3D11_FILL_MODE  mode)
static

Definition at line 1159 of file state.c.

1160{
1161 return (enum wined3d_fill_mode)mode;
1162}
wined3d_fill_mode
Definition: wined3d.h:494

Referenced by d3d_rasterizer_state_init().

◆ wined3d_stencil_op_from_d3d11()

static enum wined3d_stencil_op wined3d_stencil_op_from_d3d11 ( D3D11_STENCIL_OP  stencil_op)
static

Definition at line 746 of file state.c.

747{
748 return (enum wined3d_stencil_op)stencil_op;
749}
wined3d_stencil_op
Definition: wined3d.h:508

Referenced by d3d_depthstencil_state_create().

◆ wined3d_texture_address_from_d3d11()

static enum wined3d_texture_address wined3d_texture_address_from_d3d11 ( enum D3D11_TEXTURE_ADDRESS_MODE  t)
static

Definition at line 1545 of file state.c.

1546{
1547 return (enum wined3d_texture_address)t;
1548}
GLdouble GLdouble t
Definition: gl.h:2047
wined3d_texture_address
Definition: wined3d.h:657

Referenced by d3d_sampler_state_init().

◆ wined3d_texture_compare_from_d3d11()

static BOOL wined3d_texture_compare_from_d3d11 ( enum D3D11_FILTER  f)
static

Definition at line 1571 of file state.c.

1572{
1573 return D3D11_DECODE_IS_COMPARISON_FILTER(f);
1574}
GLfloat f
Definition: glext.h:7540

Referenced by d3d_sampler_state_init().

◆ wined3d_texture_filter_mag_from_d3d11()

static enum wined3d_texture_filter_type wined3d_texture_filter_mag_from_d3d11 ( enum D3D11_FILTER  f)
static

Definition at line 1557 of file state.c.

1558{
1559 if (D3D11_DECODE_MAG_FILTER(f) == D3D11_FILTER_TYPE_LINEAR)
1560 return WINED3D_TEXF_LINEAR;
1561 return WINED3D_TEXF_POINT;
1562}
@ D3D11_FILTER_TYPE_LINEAR
Definition: d3d11.idl:855
@ WINED3D_TEXF_POINT
Definition: wined3d.h:706
@ WINED3D_TEXF_LINEAR
Definition: wined3d.h:707

Referenced by d3d_sampler_state_init().

◆ wined3d_texture_filter_min_from_d3d11()

static enum wined3d_texture_filter_type wined3d_texture_filter_min_from_d3d11 ( enum D3D11_FILTER  f)
static

Definition at line 1564 of file state.c.

1565{
1566 if (D3D11_DECODE_MIN_FILTER(f) == D3D11_FILTER_TYPE_LINEAR)
1567 return WINED3D_TEXF_LINEAR;
1568 return WINED3D_TEXF_POINT;
1569}

Referenced by d3d_sampler_state_init().

◆ wined3d_texture_filter_mip_from_d3d11()

static enum wined3d_texture_filter_type wined3d_texture_filter_mip_from_d3d11 ( enum D3D11_FILTER  f)
static

Definition at line 1550 of file state.c.

1551{
1552 if (D3D11_DECODE_MIP_FILTER(f) == D3D11_FILTER_TYPE_LINEAR)
1553 return WINED3D_TEXF_LINEAR;
1554 return WINED3D_TEXF_POINT;
1555}

Referenced by d3d_sampler_state_init().

Variable Documentation

◆ d3d10_blend_state_vtbl

const struct ID3D10BlendState1Vtbl d3d10_blend_state_vtbl
static
Initial value:
=
{
}
static HRESULT STDMETHODCALLTYPE d3d10_blend_state_GetPrivateData(ID3D10BlendState1 *iface, REFGUID guid, UINT *data_size, void *data)
Definition: state.c:229
static ULONG STDMETHODCALLTYPE d3d10_blend_state_AddRef(ID3D10BlendState1 *iface)
Definition: state.c:200
static void STDMETHODCALLTYPE d3d10_blend_state_GetDevice(ID3D10BlendState1 *iface, ID3D10Device **device)
Definition: state.c:220
static HRESULT STDMETHODCALLTYPE d3d10_blend_state_QueryInterface(ID3D10BlendState1 *iface, REFIID riid, void **object)
Definition: state.c:190
static HRESULT STDMETHODCALLTYPE d3d10_blend_state_SetPrivateDataInterface(ID3D10BlendState1 *iface, REFGUID guid, const IUnknown *data)
Definition: state.c:251
static void STDMETHODCALLTYPE d3d10_blend_state_GetDesc1(ID3D10BlendState1 *iface, D3D10_BLEND_DESC1 *desc)
Definition: state.c:295
static void STDMETHODCALLTYPE d3d10_blend_state_GetDesc(ID3D10BlendState1 *iface, D3D10_BLEND_DESC *desc)
Definition: state.c:273
static HRESULT STDMETHODCALLTYPE d3d10_blend_state_SetPrivateData(ID3D10BlendState1 *iface, REFGUID guid, UINT data_size, const void *data)
Definition: state.c:240
static ULONG STDMETHODCALLTYPE d3d10_blend_state_Release(ID3D10BlendState1 *iface)
Definition: state.c:209

Definition at line 304 of file state.c.

Referenced by d3d_blend_state_create(), and unsafe_impl_from_ID3D10BlendState().

◆ d3d10_depthstencil_state_vtbl

const struct ID3D10DepthStencilStateVtbl d3d10_depthstencil_state_vtbl
static
Initial value:
=
{
}
static ULONG STDMETHODCALLTYPE d3d10_depthstencil_state_Release(ID3D10DepthStencilState *iface)
Definition: state.c:647
static HRESULT STDMETHODCALLTYPE d3d10_depthstencil_state_SetPrivateDataInterface(ID3D10DepthStencilState *iface, REFGUID guid, const IUnknown *data)
Definition: state.c:689
static HRESULT STDMETHODCALLTYPE d3d10_depthstencil_state_GetPrivateData(ID3D10DepthStencilState *iface, REFGUID guid, UINT *data_size, void *data)
Definition: state.c:667
static ULONG STDMETHODCALLTYPE d3d10_depthstencil_state_AddRef(ID3D10DepthStencilState *iface)
Definition: state.c:638
static HRESULT STDMETHODCALLTYPE d3d10_depthstencil_state_SetPrivateData(ID3D10DepthStencilState *iface, REFGUID guid, UINT data_size, const void *data)
Definition: state.c:678
static void STDMETHODCALLTYPE d3d10_depthstencil_state_GetDesc(ID3D10DepthStencilState *iface, D3D10_DEPTH_STENCIL_DESC *desc)
Definition: state.c:701
static HRESULT STDMETHODCALLTYPE d3d10_depthstencil_state_QueryInterface(ID3D10DepthStencilState *iface, REFIID riid, void **object)
Definition: state.c:628
static void STDMETHODCALLTYPE d3d10_depthstencil_state_GetDevice(ID3D10DepthStencilState *iface, ID3D10Device **device)
Definition: state.c:658

Definition at line 711 of file state.c.

Referenced by d3d_depthstencil_state_create(), and unsafe_impl_from_ID3D10DepthStencilState().

◆ d3d10_rasterizer_state_vtbl

const struct ID3D10RasterizerStateVtbl d3d10_rasterizer_state_vtbl
static
Initial value:
=
{
}
static HRESULT STDMETHODCALLTYPE d3d10_rasterizer_state_GetPrivateData(ID3D10RasterizerState *iface, REFGUID guid, UINT *data_size, void *data)
Definition: state.c:1085
static HRESULT STDMETHODCALLTYPE d3d10_rasterizer_state_SetPrivateData(ID3D10RasterizerState *iface, REFGUID guid, UINT data_size, const void *data)
Definition: state.c:1096
static ULONG STDMETHODCALLTYPE d3d10_rasterizer_state_Release(ID3D10RasterizerState *iface)
Definition: state.c:1065
static HRESULT STDMETHODCALLTYPE d3d10_rasterizer_state_SetPrivateDataInterface(ID3D10RasterizerState *iface, REFGUID guid, const IUnknown *data)
Definition: state.c:1107
static void STDMETHODCALLTYPE d3d10_rasterizer_state_GetDevice(ID3D10RasterizerState *iface, ID3D10Device **device)
Definition: state.c:1076
static ULONG STDMETHODCALLTYPE d3d10_rasterizer_state_AddRef(ID3D10RasterizerState *iface)
Definition: state.c:1056
static void STDMETHODCALLTYPE d3d10_rasterizer_state_GetDesc(ID3D10RasterizerState *iface, D3D10_RASTERIZER_DESC *desc)
Definition: state.c:1119
static HRESULT STDMETHODCALLTYPE d3d10_rasterizer_state_QueryInterface(ID3D10RasterizerState *iface, REFIID riid, void **object)
Definition: state.c:1046

Definition at line 1129 of file state.c.

Referenced by d3d_rasterizer_state_init(), and unsafe_impl_from_ID3D10RasterizerState().

◆ d3d10_sampler_state_vtbl

const struct ID3D10SamplerStateVtbl d3d10_sampler_state_vtbl
static
Initial value:
=
{
}
static HRESULT STDMETHODCALLTYPE d3d10_sampler_state_QueryInterface(ID3D10SamplerState *iface, REFIID riid, void **object)
Definition: state.c:1432
static HRESULT STDMETHODCALLTYPE d3d10_sampler_state_SetPrivateDataInterface(ID3D10SamplerState *iface, REFGUID guid, const IUnknown *data)
Definition: state.c:1493
static void STDMETHODCALLTYPE d3d10_sampler_state_GetDesc(ID3D10SamplerState *iface, D3D10_SAMPLER_DESC *desc)
Definition: state.c:1505
static ULONG STDMETHODCALLTYPE d3d10_sampler_state_Release(ID3D10SamplerState *iface)
Definition: state.c:1451
static HRESULT STDMETHODCALLTYPE d3d10_sampler_state_SetPrivateData(ID3D10SamplerState *iface, REFGUID guid, UINT data_size, const void *data)
Definition: state.c:1482
static HRESULT STDMETHODCALLTYPE d3d10_sampler_state_GetPrivateData(ID3D10SamplerState *iface, REFGUID guid, UINT *data_size, void *data)
Definition: state.c:1471
static void STDMETHODCALLTYPE d3d10_sampler_state_GetDevice(ID3D10SamplerState *iface, ID3D10Device **device)
Definition: state.c:1462
static ULONG STDMETHODCALLTYPE d3d10_sampler_state_AddRef(ID3D10SamplerState *iface)
Definition: state.c:1442

Definition at line 1515 of file state.c.

Referenced by d3d_sampler_state_init(), and unsafe_impl_from_ID3D10SamplerState().

◆ d3d11_blend_state_vtbl

const struct ID3D11BlendState1Vtbl d3d11_blend_state_vtbl
static
Initial value:
=
{
}
static void STDMETHODCALLTYPE d3d11_blend_state_GetDesc1(ID3D11BlendState1 *iface, D3D11_BLEND_DESC1 *desc)
Definition: state.c:155
static void STDMETHODCALLTYPE d3d11_blend_state_GetDevice(ID3D11BlendState1 *iface, ID3D11Device **device)
Definition: state.c:91
static HRESULT STDMETHODCALLTYPE d3d11_blend_state_GetPrivateData(ID3D11BlendState1 *iface, REFGUID guid, UINT *data_size, void *data)
Definition: state.c:102
static HRESULT STDMETHODCALLTYPE d3d11_blend_state_SetPrivateDataInterface(ID3D11BlendState1 *iface, REFGUID guid, const IUnknown *data)
Definition: state.c:122
static HRESULT STDMETHODCALLTYPE d3d11_blend_state_SetPrivateData(ID3D11BlendState1 *iface, REFGUID guid, UINT data_size, const void *data)
Definition: state.c:112

Definition at line 164 of file state.c.

Referenced by d3d_blend_state_create(), and unsafe_impl_from_ID3D11BlendState().

◆ d3d11_depthstencil_state_vtbl

const struct ID3D11DepthStencilStateVtbl d3d11_depthstencil_state_vtbl
static
Initial value:
=
{
}
static void STDMETHODCALLTYPE d3d11_depthstencil_state_GetDesc(ID3D11DepthStencilState *iface, D3D11_DEPTH_STENCIL_DESC *desc)
Definition: state.c:594
static HRESULT STDMETHODCALLTYPE d3d11_depthstencil_state_SetPrivateDataInterface(ID3D11DepthStencilState *iface, REFGUID guid, const IUnknown *data)
Definition: state.c:584
static void STDMETHODCALLTYPE d3d11_depthstencil_state_GetDevice(ID3D11DepthStencilState *iface, ID3D11Device **device)
Definition: state.c:553
static HRESULT STDMETHODCALLTYPE d3d11_depthstencil_state_SetPrivateData(ID3D11DepthStencilState *iface, REFGUID guid, UINT data_size, const void *data)
Definition: state.c:574
static HRESULT STDMETHODCALLTYPE d3d11_depthstencil_state_GetPrivateData(ID3D11DepthStencilState *iface, REFGUID guid, UINT *data_size, void *data)
Definition: state.c:564

Definition at line 604 of file state.c.

Referenced by d3d_depthstencil_state_create(), and unsafe_impl_from_ID3D11DepthStencilState().

◆ d3d11_rasterizer_state_vtbl

const struct ID3D11RasterizerState1Vtbl d3d11_rasterizer_state_vtbl
static
Initial value:
=
{
}
static HRESULT STDMETHODCALLTYPE d3d11_rasterizer_state_SetPrivateData(ID3D11RasterizerState1 *iface, REFGUID guid, UINT data_size, const void *data)
Definition: state.c:980
static HRESULT STDMETHODCALLTYPE d3d11_rasterizer_state_GetPrivateData(ID3D11RasterizerState1 *iface, REFGUID guid, UINT *data_size, void *data)
Definition: state.c:970
static HRESULT STDMETHODCALLTYPE d3d11_rasterizer_state_SetPrivateDataInterface(ID3D11RasterizerState1 *iface, REFGUID guid, const IUnknown *data)
Definition: state.c:990
static void STDMETHODCALLTYPE d3d11_rasterizer_state_GetDesc1(ID3D11RasterizerState1 *iface, D3D11_RASTERIZER_DESC1 *desc)
Definition: state.c:1010
static void STDMETHODCALLTYPE d3d11_rasterizer_state_GetDesc(ID3D11RasterizerState1 *iface, D3D11_RASTERIZER_DESC *desc)
Definition: state.c:1000
static void STDMETHODCALLTYPE d3d11_rasterizer_state_GetDevice(ID3D11RasterizerState1 *iface, ID3D11Device **device)
Definition: state.c:959

Definition at line 1020 of file state.c.

Referenced by d3d_rasterizer_state_init(), and unsafe_impl_from_ID3D11RasterizerState().

◆ d3d11_sampler_state_vtbl

const struct ID3D11SamplerStateVtbl d3d11_sampler_state_vtbl
static
Initial value:
=
{
}
static HRESULT STDMETHODCALLTYPE d3d11_sampler_state_GetPrivateData(ID3D11SamplerState *iface, REFGUID guid, UINT *data_size, void *data)
Definition: state.c:1368
static void STDMETHODCALLTYPE d3d11_sampler_state_GetDevice(ID3D11SamplerState *iface, ID3D11Device **device)
Definition: state.c:1357
static void STDMETHODCALLTYPE d3d11_sampler_state_GetDesc(ID3D11SamplerState *iface, D3D11_SAMPLER_DESC *desc)
Definition: state.c:1398
static HRESULT STDMETHODCALLTYPE d3d11_sampler_state_SetPrivateData(ID3D11SamplerState *iface, REFGUID guid, UINT data_size, const void *data)
Definition: state.c:1378
static HRESULT STDMETHODCALLTYPE d3d11_sampler_state_SetPrivateDataInterface(ID3D11SamplerState *iface, REFGUID guid, const IUnknown *data)
Definition: state.c:1388

Definition at line 1408 of file state.c.

Referenced by d3d_sampler_state_init(), and unsafe_impl_from_ID3D11SamplerState().

◆ d3d_blend_state_wined3d_parent_ops

const struct wined3d_parent_ops d3d_blend_state_wined3d_parent_ops
static
Initial value:
=
{
}
static void STDMETHODCALLTYPE d3d_blend_state_wined3d_object_destroyed(void *parent)
Definition: state.c:321

Definition at line 331 of file state.c.

Referenced by d3d_blend_state_create().

◆ d3d_depthstencil_state_wined3d_parent_ops

const struct wined3d_parent_ops d3d_depthstencil_state_wined3d_parent_ops
static
Initial value:
=
{
}
static void STDMETHODCALLTYPE d3d_depthstencil_state_wined3d_object_destroyed(void *parent)
Definition: state.c:726

Definition at line 736 of file state.c.

Referenced by d3d_depthstencil_state_create().

◆ d3d_rasterizer_state_wined3d_parent_ops

const struct wined3d_parent_ops d3d_rasterizer_state_wined3d_parent_ops
static
Initial value:
=
{
}
static void STDMETHODCALLTYPE d3d_rasterizer_state_wined3d_object_destroyed(void *parent)
Definition: state.c:1144

Definition at line 1154 of file state.c.

Referenced by d3d_rasterizer_state_init().

◆ d3d_sampler_wined3d_parent_ops

const struct wined3d_parent_ops d3d_sampler_wined3d_parent_ops
static
Initial value:
=
{
}
static void STDMETHODCALLTYPE d3d_sampler_wined3d_object_destroyed(void *parent)
Definition: state.c:1530

Definition at line 1540 of file state.c.

Referenced by d3d_sampler_state_init().