ReactOS 0.4.17-dev-966-gf06eace
wined3d.h File Reference
#include <stdbool.h>
#include <stdint.h>
#include "wine/list.h"
Include dependency graph for wined3d.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  wined3d_query_data_timestamp_disjoint
 
struct  wined3d_query_data_so_statistics
 
struct  wined3d_query_data_pipeline_statistics
 
struct  wined3d_display_mode
 
struct  wined3d_color
 
struct  wined3d_vec3
 
struct  wined3d_vec4
 
struct  wined3d_dvec4
 
struct  wined3d_ivec4
 
struct  wined3d_uvec4
 
struct  wined3d_matrix
 
struct  wined3d_light
 
struct  wined3d_material
 
struct  wined3d_viewport
 
struct  wined3d_gamma_ramp
 
struct  wined3d_line_pattern
 
struct  wined3d_rect_patch_info
 
struct  wined3d_tri_patch_info
 
struct  wined3d_adapter_identifier
 
struct  wined3d_video_memory_info
 
struct  wined3d_swapchain_desc
 
struct  wined3d_resource_desc
 
struct  wined3d_sub_resource_desc
 
struct  wined3d_clip_status
 
struct  wined3d_vertex_element
 
struct  wined3d_device_creation_parameters
 
struct  wined3d_raster_status
 
struct  wined3d_map_desc
 
struct  wined3d_sub_resource_data
 
struct  wined3d_box
 
struct  wined3d_vertex_shader_caps
 
struct  wined3d_pixel_shader_caps
 
struct  wined3d_ddraw_caps
 
struct  wined3d_caps
 
struct  wined3d_color_key
 
struct  wined3d_blt_fx
 
struct  wined3d_buffer_desc
 
struct  wined3d_blend_state_desc
 
struct  wined3d_blend_state_desc::wined3d_rendertarget_blend_state_desc
 
struct  wined3d_stencil_op_desc
 
struct  wined3d_depth_stencil_state_desc
 
struct  wined3d_rasterizer_state_desc
 
struct  wined3d_sampler_desc
 
struct  wined3d_shader_desc
 
struct  wined3d_stream_output_element
 
struct  wined3d_stream_output_desc
 
struct  wined3d_view_desc
 
struct  wined3d_output_desc
 
struct  wined3d_stream_state
 
struct  wined3d_stateblock_state
 
struct  wined3d_stream_output
 
struct  wined3d_constant_buffer_state
 
struct  wined3d_parent_ops
 
struct  wined3d_device_parent
 
struct  wined3d_device_parent_ops
 
struct  wined3d_swapchain_state_parent
 
struct  wined3d_swapchain_state_parent_ops
 
struct  wined3d_private_store
 
struct  wined3d_private_data
 
struct  wined3d_streaming_buffer
 

Macros

#define WINED3D_OK   S_OK
 
#define _FACWINED3D   0x876
 
#define MAKE_WINED3DSTATUS(code)   MAKE_HRESULT(0, _FACWINED3D, code)
 
#define WINED3DOK_NOMIPGEN   MAKE_WINED3DSTATUS(2159)
 
#define MAKE_WINED3DHRESULT(code)   MAKE_HRESULT(1, _FACWINED3D, code)
 
#define WINED3DERR_CONFLICTINGRENDERSTATE   MAKE_WINED3DHRESULT(2081)
 
#define WINED3DERR_UNSUPPORTEDTEXTUREFILTER   MAKE_WINED3DHRESULT(2082)
 
#define WINED3DERR_NOTAVAILABLE   MAKE_WINED3DHRESULT(2154)
 
#define WINED3DERR_OUTOFVIDEOMEMORY   MAKE_WINED3DHRESULT(380)
 
#define WINED3DERR_INVALIDCALL   MAKE_WINED3DHRESULT(2156)
 
#define WINEDDERR_NOTAOVERLAYSURFACE   MAKE_WINED3DHRESULT(580)
 
#define WINEDDERR_NOTLOCKED   MAKE_WINED3DHRESULT(584)
 
#define WINEDDERR_SURFACEBUSY   MAKE_WINED3DHRESULT(430)
 
#define WINEDDERR_INVALIDRECT   MAKE_WINED3DHRESULT(150)
 
#define WINEDDERR_OVERLAYNOTVISIBLE   MAKE_WINED3DHRESULT(577)
 
#define WINED3D_RESOURCE_ACCESS_GPU   0x1u
 
#define WINED3D_RESOURCE_ACCESS_CPU   0x2u
 
#define WINED3D_RESOURCE_ACCESS_MAP_R   0x4u
 
#define WINED3D_RESOURCE_ACCESS_MAP_W   0x8u
 
#define WINEMAKEFOURCC(ch0, ch1, ch2, ch3)
 
#define WINEHIGHEST_RENDER_STATE   WINED3D_RS_BLENDOPALPHA
 
#define WINED3D_HIGHEST_SAMPLER_STATE   WINED3D_SAMP_DMAP_OFFSET
 
#define WINED3D_HIGHEST_TEXTURE_STATE   WINED3D_TSS_CONSTANT
 
#define WINED3D_TS_WORLD_MATRIX(index)   (enum wined3d_transform_state)(index + 256)
 
#define WINED3D_HIGHEST_TRANSFORM_STATE   WINED3D_TS_WORLD_MATRIX(255) /* Highest value in wined3d_transform_state. */
 
#define WINED3DISSUE_BEGIN   (1u << 1)
 
#define WINED3DISSUE_END   (1u << 0)
 
#define WINED3DGETDATA_FLUSH   (1u << 0)
 
#define WINED3DCOLORWRITEENABLE_RED   (1u << 0)
 
#define WINED3DCOLORWRITEENABLE_GREEN   (1u << 1)
 
#define WINED3DCOLORWRITEENABLE_BLUE   (1u << 2)
 
#define WINED3DCOLORWRITEENABLE_ALPHA   (1u << 3)
 
#define WINED3DADAPTER_DEFAULT   0
 
#define WINED3DENUM_WHQL_LEVEL   2
 
#define WINED3DTSS_TCI_PASSTHRU   0x00000
 
#define WINED3DTSS_TCI_CAMERASPACENORMAL   0x10000
 
#define WINED3DTSS_TCI_CAMERASPACEPOSITION   0x20000
 
#define WINED3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR   0x30000
 
#define WINED3DTSS_TCI_SPHEREMAP   0x40000
 
#define WINED3DTA_SELECTMASK   0x0000000f
 
#define WINED3DTA_DIFFUSE   0x00000000
 
#define WINED3DTA_CURRENT   0x00000001
 
#define WINED3DTA_TEXTURE   0x00000002
 
#define WINED3DTA_TFACTOR   0x00000003
 
#define WINED3DTA_SPECULAR   0x00000004
 
#define WINED3DTA_TEMP   0x00000005
 
#define WINED3DTA_CONSTANT   0x00000006
 
#define WINED3DTA_COMPLEMENT   0x00000010
 
#define WINED3DTA_ALPHAREPLICATE   0x00000020
 
#define WINED3D_SWAPCHAIN_LOCKABLE_BACKBUFFER   0x00000001u
 
#define WINED3D_SWAPCHAIN_DISCARD_DEPTHSTENCIL   0x00000002u
 
#define WINED3D_SWAPCHAIN_DEVICECLIP   0x00000004u
 
#define WINED3D_SWAPCHAIN_VIDEO   0x00000010u
 
#define WINED3D_SWAPCHAIN_NOAUTOROTATE   0x00000020u
 
#define WINED3D_SWAPCHAIN_UNPRUNEDMODE   0x00000040u
 
#define WINED3D_SWAPCHAIN_ALLOW_MODE_SWITCH   0x00001000u
 
#define WINED3D_SWAPCHAIN_USE_CLOSEST_MATCHING_MODE   0x00002000u
 
#define WINED3D_SWAPCHAIN_RESTORE_WINDOW_RECT   0x00004000u
 
#define WINED3D_SWAPCHAIN_GDI_COMPATIBLE   0x00008000u
 
#define WINED3D_SWAPCHAIN_IMPLICIT   0x00010000u
 
#define WINED3D_SWAPCHAIN_REGISTER_STATE   0x00020000u
 
#define WINED3D_SWAPCHAIN_NO_WINDOW_CHANGES   0x00040000u
 
#define WINED3D_SWAPCHAIN_RESTORE_WINDOW_STATE   0x00080000u
 
#define WINED3D_SWAPCHAIN_REGISTER_TOPMOST_TIMER   0x00100000u
 
#define WINED3DDP_MAXTEXCOORD   8
 
#define WINED3D_BIND_VERTEX_BUFFER   0x00000001
 
#define WINED3D_BIND_INDEX_BUFFER   0x00000002
 
#define WINED3D_BIND_CONSTANT_BUFFER   0x00000004
 
#define WINED3D_BIND_SHADER_RESOURCE   0x00000008
 
#define WINED3D_BIND_STREAM_OUTPUT   0x00000010
 
#define WINED3D_BIND_RENDER_TARGET   0x00000020
 
#define WINED3D_BIND_DEPTH_STENCIL   0x00000040
 
#define WINED3D_BIND_UNORDERED_ACCESS   0x00000080
 
#define WINED3D_BIND_INDIRECT_BUFFER   0x00000100
 
#define WINED3DUSAGE_SOFTWAREPROCESSING   0x00000010
 
#define WINED3DUSAGE_DONOTCLIP   0x00000020
 
#define WINED3DUSAGE_POINTS   0x00000040
 
#define WINED3DUSAGE_RTPATCHES   0x00000080
 
#define WINED3DUSAGE_NPATCHES   0x00000100
 
#define WINED3DUSAGE_DYNAMIC   0x00000200
 
#define WINED3DUSAGE_RESTRICTED_CONTENT   0x00000800
 
#define WINED3DUSAGE_RESTRICT_SHARED_RESOURCE_DRIVER   0x00001000
 
#define WINED3DUSAGE_RESTRICT_SHARED_RESOURCE   0x00002000
 
#define WINED3DUSAGE_DMAP   0x00004000
 
#define WINED3DUSAGE_TEXTAPI   0x10000000
 
#define WINED3DUSAGE_MASK   0x10007bf0
 
#define WINED3DUSAGE_SCRATCH   0x00400000
 
#define WINED3DUSAGE_CS   0x00800000
 
#define WINED3DUSAGE_LEGACY_CUBEMAP   0x01000000
 
#define WINED3DUSAGE_OWNDC   0x02000000
 
#define WINED3DUSAGE_STATICDECL   0x04000000
 
#define WINED3DUSAGE_OVERLAY   0x08000000
 
#define WINED3DUSAGE_MANAGED   0x20000000
 
#define WINED3DUSAGE_VIDMEM_ACCOUNTING   0x40000000
 
#define WINED3DUSAGE_QUERY_GENMIPMAP   0x00000400
 
#define WINED3DUSAGE_QUERY_LEGACYBUMPMAP   0x00008000
 
#define WINED3DUSAGE_QUERY_FILTER   0x00020000
 
#define WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING   0x00080000
 
#define WINED3DUSAGE_QUERY_SRGBREAD   0x00010000
 
#define WINED3DUSAGE_QUERY_SRGBWRITE   0x00040000
 
#define WINED3DUSAGE_QUERY_VERTEXTEXTURE   0x00100000
 
#define WINED3DUSAGE_QUERY_WRAPANDMIP   0x00200000
 
#define WINED3DUSAGE_QUERY_MASK   0x003f8400
 
#define WINED3D_MAP_NOSYSLOCK   0x00000800
 
#define WINED3D_MAP_NOOVERWRITE   0x00001000
 
#define WINED3D_MAP_DISCARD   0x00002000
 
#define WINED3D_MAP_DONOTWAIT   0x00004000
 
#define WINED3D_MAP_NO_DIRTY_UPDATE   0x00008000
 
#define WINED3D_MAP_WRITE   0x40000000
 
#define WINED3D_MAP_READ   0x80000000
 
#define WINED3DPRESENT_RATE_DEFAULT   0x00000000
 
#define WINED3DCLIPPLANE0   (1u << 0)
 
#define WINED3DCLIPPLANE1   (1u << 1)
 
#define WINED3DCLIPPLANE2   (1u << 2)
 
#define WINED3DCLIPPLANE3   (1u << 3)
 
#define WINED3DCLIPPLANE4   (1u << 4)
 
#define WINED3DCLIPPLANE5   (1u << 5)
 
#define WINED3DFVF_RESERVED0   0x0001
 
#define WINED3DFVF_POSITION_MASK   0x400e
 
#define WINED3DFVF_XYZ   0x0002
 
#define WINED3DFVF_XYZRHW   0x0004
 
#define WINED3DFVF_XYZB1   0x0006
 
#define WINED3DFVF_XYZB2   0x0008
 
#define WINED3DFVF_XYZB3   0x000a
 
#define WINED3DFVF_XYZB4   0x000c
 
#define WINED3DFVF_XYZB5   0x000e
 
#define WINED3DFVF_XYZW   0x4002
 
#define WINED3DFVF_NORMAL   0x0010
 
#define WINED3DFVF_PSIZE   0x0020
 
#define WINED3DFVF_DIFFUSE   0x0040
 
#define WINED3DFVF_SPECULAR   0x0080
 
#define WINED3DFVF_TEXCOUNT_MASK   0x0f00
 
#define WINED3DFVF_TEXCOUNT_SHIFT   8
 
#define WINED3DFVF_TEX0   0x0000
 
#define WINED3DFVF_TEX1   0x0100
 
#define WINED3DFVF_TEX2   0x0200
 
#define WINED3DFVF_TEX3   0x0300
 
#define WINED3DFVF_TEX4   0x0400
 
#define WINED3DFVF_TEX5   0x0500
 
#define WINED3DFVF_TEX6   0x0600
 
#define WINED3DFVF_TEX7   0x0700
 
#define WINED3DFVF_TEX8   0x0800
 
#define WINED3DFVF_LASTBETA_UBYTE4   0x1000
 
#define WINED3DFVF_LASTBETA_D3DCOLOR   0x8000
 
#define WINED3DFVF_RESERVED2   0x6000
 
#define WINED3DFVF_TEXTUREFORMAT1   3u
 
#define WINED3DFVF_TEXTUREFORMAT2   0u
 
#define WINED3DFVF_TEXTUREFORMAT3   1u
 
#define WINED3DFVF_TEXTUREFORMAT4   2u
 
#define WINED3DFVF_TEXCOORDSIZE1(idx)   (WINED3DFVF_TEXTUREFORMAT1 << (idx * 2 + 16))
 
#define WINED3DFVF_TEXCOORDSIZE2(idx)   (WINED3DFVF_TEXTUREFORMAT2 << (idx * 2 + 16))
 
#define WINED3DFVF_TEXCOORDSIZE3(idx)   (WINED3DFVF_TEXTUREFORMAT3 << (idx * 2 + 16))
 
#define WINED3DFVF_TEXCOORDSIZE4(idx)   (WINED3DFVF_TEXTUREFORMAT4 << (idx * 2 + 16))
 
#define WINED3DCLEAR_TARGET   0x00000001
 
#define WINED3DCLEAR_ZBUFFER   0x00000002
 
#define WINED3DCLEAR_STENCIL   0x00000004
 
#define WINED3DCLEAR_SYNCHRONOUS   0x80000000
 
#define WINED3DSTREAMSOURCE_INDEXEDDATA   (1u << 30)
 
#define WINED3DSTREAMSOURCE_INSTANCEDATA   (2u << 30)
 
#define WINED3DSPD_IUNKNOWN   0x00000001
 
#define WINED3DCREATE_FPU_PRESERVE   0x00000002
 
#define WINED3DCREATE_PUREDEVICE   0x00000010
 
#define WINED3DCREATE_SOFTWARE_VERTEXPROCESSING   0x00000020
 
#define WINED3DCREATE_HARDWARE_VERTEXPROCESSING   0x00000040
 
#define WINED3DCREATE_MIXED_VERTEXPROCESSING   0x00000080
 
#define WINED3DCREATE_DISABLE_DRIVER_MANAGEMENT   0x00000100
 
#define WINED3DCREATE_ADAPTERGROUP_DEVICE   0x00000200
 
#define WINED3DCREATE_DISABLE_DRIVER_MANAGEMENT_EX   0x00000400
 
#define WINED3DCREATE_NOWINDOWCHANGES   0x00000800
 
#define WINED3DCREATE_DISABLE_PSGP_THREADING   0x00002000
 
#define WINED3DCREATE_ENABLE_PRESENTSTATS   0x00004000
 
#define WINED3DCREATE_DISABLE_PRINTSCREEN   0x00008000
 
#define WINED3DCREATE_SCREENSAVER   0x10000000
 
#define WINED3DDMAPSAMPLER   0x100
 
#define WINED3D_VERTEX_SAMPLER_OFFSET   WINED3D_MAX_FRAGMENT_SAMPLERS
 
#define WINED3DCAPS3_ALPHA_FULLSCREEN_FLIP_OR_DISCARD   0x00000020
 
#define WINED3DCAPS3_LINEAR_TO_SRGB_PRESENTATION   0x00000080
 
#define WINED3DCAPS3_COPY_TO_VIDMEM   0x00000100
 
#define WINED3DCAPS3_COPY_TO_SYSTEMMEM   0x00000200
 
#define WINED3DCAPS3_RESERVED   0x8000001f
 
#define WINED3DDEVCAPS2_STREAMOFFSET   0x00000001
 
#define WINED3DDEVCAPS2_DMAPNPATCH   0x00000002
 
#define WINED3DDEVCAPS2_ADAPTIVETESSRTPATCH   0x00000004
 
#define WINED3DDEVCAPS2_ADAPTIVETESSNPATCH   0x00000008
 
#define WINED3DDEVCAPS2_CAN_STRETCHRECT_FROM_TEXTURES   0x00000010
 
#define WINED3DDEVCAPS2_PRESAMPLEDDMAPNPATCH   0x00000020
 
#define WINED3DDEVCAPS2_VERTEXELEMENTSCANSHARESTREAMOFFSET   0x00000040
 
#define WINED3DDTCAPS_UBYTE4   0x00000001
 
#define WINED3DDTCAPS_UBYTE4N   0x00000002
 
#define WINED3DDTCAPS_SHORT2N   0x00000004
 
#define WINED3DDTCAPS_SHORT4N   0x00000008
 
#define WINED3DDTCAPS_USHORT2N   0x00000010
 
#define WINED3DDTCAPS_USHORT4N   0x00000020
 
#define WINED3DDTCAPS_UDEC3   0x00000040
 
#define WINED3DDTCAPS_DEC3N   0x00000080
 
#define WINED3DDTCAPS_FLOAT16_2   0x00000100
 
#define WINED3DDTCAPS_FLOAT16_4   0x00000200
 
#define WINED3DFVFCAPS_TEXCOORDCOUNTMASK   0x0000ffff
 
#define WINED3DFVFCAPS_DONOTSTRIPELEMENTS   0x00080000
 
#define WINED3DFVFCAPS_PSIZE   0x00100000
 
#define WINED3DLINECAPS_TEXTURE   0x00000001
 
#define WINED3DLINECAPS_ZTEST   0x00000002
 
#define WINED3DLINECAPS_BLEND   0x00000004
 
#define WINED3DLINECAPS_ALPHACMP   0x00000008
 
#define WINED3DLINECAPS_FOG   0x00000010
 
#define WINED3DLINECAPS_ANTIALIAS   0x00000020
 
#define WINED3DMAX30SHADERINSTRUCTIONS   32768
 
#define WINED3DMIN30SHADERINSTRUCTIONS   512
 
#define WINED3DPBLENDCAPS_ZERO   0x00000001
 
#define WINED3DPBLENDCAPS_ONE   0x00000002
 
#define WINED3DPBLENDCAPS_SRCCOLOR   0x00000004
 
#define WINED3DPBLENDCAPS_INVSRCCOLOR   0x00000008
 
#define WINED3DPBLENDCAPS_SRCALPHA   0x00000010
 
#define WINED3DPBLENDCAPS_INVSRCALPHA   0x00000020
 
#define WINED3DPBLENDCAPS_DESTALPHA   0x00000040
 
#define WINED3DPBLENDCAPS_INVDESTALPHA   0x00000080
 
#define WINED3DPBLENDCAPS_DESTCOLOR   0x00000100
 
#define WINED3DPBLENDCAPS_INVDESTCOLOR   0x00000200
 
#define WINED3DPBLENDCAPS_SRCALPHASAT   0x00000400
 
#define WINED3DPBLENDCAPS_BOTHSRCALPHA   0x00000800
 
#define WINED3DPBLENDCAPS_BOTHINVSRCALPHA   0x00001000
 
#define WINED3DPBLENDCAPS_BLENDFACTOR   0x00002000
 
#define WINED3DPCMPCAPS_NEVER   0x00000001
 
#define WINED3DPCMPCAPS_LESS   0x00000002
 
#define WINED3DPCMPCAPS_EQUAL   0x00000004
 
#define WINED3DPCMPCAPS_LESSEQUAL   0x00000008
 
#define WINED3DPCMPCAPS_GREATER   0x00000010
 
#define WINED3DPCMPCAPS_NOTEQUAL   0x00000020
 
#define WINED3DPCMPCAPS_GREATEREQUAL   0x00000040
 
#define WINED3DPCMPCAPS_ALWAYS   0x00000080
 
#define WINED3DPMISCCAPS_MASKZ   0x00000002
 
#define WINED3DPMISCCAPS_LINEPATTERNREP   0x00000004
 
#define WINED3DPMISCCAPS_CULLNONE   0x00000010
 
#define WINED3DPMISCCAPS_CULLCW   0x00000020
 
#define WINED3DPMISCCAPS_CULLCCW   0x00000040
 
#define WINED3DPMISCCAPS_COLORWRITEENABLE   0x00000080
 
#define WINED3DPMISCCAPS_CLIPPLANESCALEDPOINTS   0x00000100
 
#define WINED3DPMISCCAPS_CLIPTLVERTS   0x00000200
 
#define WINED3DPMISCCAPS_TSSARGTEMP   0x00000400
 
#define WINED3DPMISCCAPS_BLENDOP   0x00000800
 
#define WINED3DPMISCCAPS_NULLREFERENCE   0x00001000
 
#define WINED3DPMISCCAPS_INDEPENDENTWRITEMASKS   0x00004000
 
#define WINED3DPMISCCAPS_PERSTAGECONSTANT   0x00008000
 
#define WINED3DPMISCCAPS_FOGANDSPECULARALPHA   0x00010000
 
#define WINED3DPMISCCAPS_SEPARATEALPHABLEND   0x00020000
 
#define WINED3DPMISCCAPS_MRTINDEPENDENTBITDEPTHS   0x00040000
 
#define WINED3DPMISCCAPS_MRTPOSTPIXELSHADERBLENDING   0x00080000
 
#define WINED3DPMISCCAPS_FOGVERTEXCLAMPED   0x00100000
 
#define WINED3DPMISCCAPS_POSTBLENDSRGBCONVERT   0x00200000
 
#define WINED3DPS20_MAX_DYNAMICFLOWCONTROLDEPTH   24
 
#define WINED3DPS20_MIN_DYNAMICFLOWCONTROLDEPTH   0
 
#define WINED3DPS20_MAX_NUMTEMPS   32
 
#define WINED3DPS20_MIN_NUMTEMPS   12
 
#define WINED3DPS20_MAX_STATICFLOWCONTROLDEPTH   4
 
#define WINED3DPS20_MIN_STATICFLOWCONTROLDEPTH   0
 
#define WINED3DPS20_MAX_NUMINSTRUCTIONSLOTS   512
 
#define WINED3DPS20_MIN_NUMINSTRUCTIONSLOTS   96
 
#define WINED3DPS20CAPS_ARBITRARYSWIZZLE   0x00000001
 
#define WINED3DPS20CAPS_GRADIENTINSTRUCTIONS   0x00000002
 
#define WINED3DPS20CAPS_PREDICATION   0x00000004
 
#define WINED3DPS20CAPS_NODEPENDENTREADLIMIT   0x00000008
 
#define WINED3DPS20CAPS_NOTEXINSTRUCTIONLIMIT   0x00000010
 
#define WINED3DPTADDRESSCAPS_WRAP   0x00000001
 
#define WINED3DPTADDRESSCAPS_MIRROR   0x00000002
 
#define WINED3DPTADDRESSCAPS_CLAMP   0x00000004
 
#define WINED3DPTADDRESSCAPS_BORDER   0x00000008
 
#define WINED3DPTADDRESSCAPS_INDEPENDENTUV   0x00000010
 
#define WINED3DPTADDRESSCAPS_MIRRORONCE   0x00000020
 
#define WINED3DSTENCILCAPS_KEEP   0x00000001
 
#define WINED3DSTENCILCAPS_ZERO   0x00000002
 
#define WINED3DSTENCILCAPS_REPLACE   0x00000004
 
#define WINED3DSTENCILCAPS_INCRSAT   0x00000008
 
#define WINED3DSTENCILCAPS_DECRSAT   0x00000010
 
#define WINED3DSTENCILCAPS_INVERT   0x00000020
 
#define WINED3DSTENCILCAPS_INCR   0x00000040
 
#define WINED3DSTENCILCAPS_DECR   0x00000080
 
#define WINED3DSTENCILCAPS_TWOSIDED   0x00000100
 
#define WINED3DTEXOPCAPS_DISABLE   0x00000001
 
#define WINED3DTEXOPCAPS_SELECTARG1   0x00000002
 
#define WINED3DTEXOPCAPS_SELECTARG2   0x00000004
 
#define WINED3DTEXOPCAPS_MODULATE   0x00000008
 
#define WINED3DTEXOPCAPS_MODULATE2X   0x00000010
 
#define WINED3DTEXOPCAPS_MODULATE4X   0x00000020
 
#define WINED3DTEXOPCAPS_ADD   0x00000040
 
#define WINED3DTEXOPCAPS_ADDSIGNED   0x00000080
 
#define WINED3DTEXOPCAPS_ADDSIGNED2X   0x00000100
 
#define WINED3DTEXOPCAPS_SUBTRACT   0x00000200
 
#define WINED3DTEXOPCAPS_ADDSMOOTH   0x00000400
 
#define WINED3DTEXOPCAPS_BLENDDIFFUSEALPHA   0x00000800
 
#define WINED3DTEXOPCAPS_BLENDTEXTUREALPHA   0x00001000
 
#define WINED3DTEXOPCAPS_BLENDFACTORALPHA   0x00002000
 
#define WINED3DTEXOPCAPS_BLENDTEXTUREALPHAPM   0x00004000
 
#define WINED3DTEXOPCAPS_BLENDCURRENTALPHA   0x00008000
 
#define WINED3DTEXOPCAPS_PREMODULATE   0x00010000
 
#define WINED3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR   0x00020000
 
#define WINED3DTEXOPCAPS_MODULATECOLOR_ADDALPHA   0x00040000
 
#define WINED3DTEXOPCAPS_MODULATEINVALPHA_ADDCOLOR   0x00080000
 
#define WINED3DTEXOPCAPS_MODULATEINVCOLOR_ADDALPHA   0x00100000
 
#define WINED3DTEXOPCAPS_BUMPENVMAP   0x00200000
 
#define WINED3DTEXOPCAPS_BUMPENVMAPLUMINANCE   0x00400000
 
#define WINED3DTEXOPCAPS_DOTPRODUCT3   0x00800000
 
#define WINED3DTEXOPCAPS_MULTIPLYADD   0x01000000
 
#define WINED3DTEXOPCAPS_LERP   0x02000000
 
#define WINED3DVS20_MAX_DYNAMICFLOWCONTROLDEPTH   24
 
#define WINED3DVS20_MIN_DYNAMICFLOWCONTROLDEPTH   0
 
#define WINED3DVS20_MAX_NUMTEMPS   32
 
#define WINED3DVS20_MIN_NUMTEMPS   12
 
#define WINED3DVS20_MAX_STATICFLOWCONTROLDEPTH   4
 
#define WINED3DVS20_MIN_STATICFLOWCONTROLDEPTH   1
 
#define WINED3DVS20CAPS_PREDICATION   0x00000001
 
#define WINED3DCAPS2_NO2DDURING3DSCENE   0x00000002
 
#define WINED3DCAPS2_FULLSCREENGAMMA   0x00020000
 
#define WINED3DCAPS2_CANRENDERWINDOWED   0x00080000
 
#define WINED3DCAPS2_CANCALIBRATEGAMMA   0x00100000
 
#define WINED3DCAPS2_RESERVED   0x02000000
 
#define WINED3DCAPS2_CANMANAGERESOURCE   0x10000000
 
#define WINED3DCAPS2_DYNAMICTEXTURES   0x20000000
 
#define WINED3DCAPS2_CANGENMIPMAP   0x40000000
 
#define WINED3DPRASTERCAPS_DITHER   0x00000001
 
#define WINED3DPRASTERCAPS_ROP2   0x00000002
 
#define WINED3DPRASTERCAPS_XOR   0x00000004
 
#define WINED3DPRASTERCAPS_PAT   0x00000008
 
#define WINED3DPRASTERCAPS_ZTEST   0x00000010
 
#define WINED3DPRASTERCAPS_SUBPIXEL   0x00000020
 
#define WINED3DPRASTERCAPS_SUBPIXELX   0x00000040
 
#define WINED3DPRASTERCAPS_FOGVERTEX   0x00000080
 
#define WINED3DPRASTERCAPS_FOGTABLE   0x00000100
 
#define WINED3DPRASTERCAPS_STIPPLE   0x00000200
 
#define WINED3DPRASTERCAPS_ANTIALIASSORTDEPENDENT   0x00000400
 
#define WINED3DPRASTERCAPS_ANTIALIASSORTINDEPENDENT   0x00000800
 
#define WINED3DPRASTERCAPS_MIPMAPLODBIAS   0x00002000
 
#define WINED3DPRASTERCAPS_ZBUFFERLESSHSR   0x00008000
 
#define WINED3DPRASTERCAPS_FOGRANGE   0x00010000
 
#define WINED3DPRASTERCAPS_ANISOTROPY   0x00020000
 
#define WINED3DPRASTERCAPS_WBUFFER   0x00040000
 
#define WINED3DPRASTERCAPS_TRANSLUCENTSORTINDEPENDENT   0x00080000
 
#define WINED3DPRASTERCAPS_WFOG   0x00100000
 
#define WINED3DPRASTERCAPS_ZFOG   0x00200000
 
#define WINED3DPRASTERCAPS_COLORPERSPECTIVE   0x00400000
 
#define WINED3DPRASTERCAPS_SCISSORTEST   0x01000000
 
#define WINED3DPRASTERCAPS_SLOPESCALEDEPTHBIAS   0x02000000
 
#define WINED3DPRASTERCAPS_DEPTHBIAS   0x04000000
 
#define WINED3DPRASTERCAPS_MULTISAMPLE_TOGGLE   0x08000000
 
#define WINED3DPSHADECAPS_COLORFLATMONO   0x00000001
 
#define WINED3DPSHADECAPS_COLORFLATRGB   0x00000002
 
#define WINED3DPSHADECAPS_COLORGOURAUDMONO   0x00000004
 
#define WINED3DPSHADECAPS_COLORGOURAUDRGB   0x00000008
 
#define WINED3DPSHADECAPS_COLORPHONGMONO   0x00000010
 
#define WINED3DPSHADECAPS_COLORPHONGRGB   0x00000020
 
#define WINED3DPSHADECAPS_SPECULARFLATMONO   0x00000040
 
#define WINED3DPSHADECAPS_SPECULARFLATRGB   0x00000080
 
#define WINED3DPSHADECAPS_SPECULARGOURAUDMONO   0x00000100
 
#define WINED3DPSHADECAPS_SPECULARGOURAUDRGB   0x00000200
 
#define WINED3DPSHADECAPS_SPECULARPHONGMONO   0x00000400
 
#define WINED3DPSHADECAPS_SPECULARPHONGRGB   0x00000800
 
#define WINED3DPSHADECAPS_ALPHAFLATBLEND   0x00001000
 
#define WINED3DPSHADECAPS_ALPHAFLATSTIPPLED   0x00002000
 
#define WINED3DPSHADECAPS_ALPHAGOURAUDBLEND   0x00004000
 
#define WINED3DPSHADECAPS_ALPHAGOURAUDSTIPPLED   0x00008000
 
#define WINED3DPSHADECAPS_ALPHAPHONGBLEND   0x00010000
 
#define WINED3DPSHADECAPS_ALPHAPHONGSTIPPLED   0x00020000
 
#define WINED3DPSHADECAPS_FOGFLAT   0x00040000
 
#define WINED3DPSHADECAPS_FOGGOURAUD   0x00080000
 
#define WINED3DPSHADECAPS_FOGPHONG   0x00100000
 
#define WINED3DPTEXTURECAPS_PERSPECTIVE   0x00000001
 
#define WINED3DPTEXTURECAPS_POW2   0x00000002
 
#define WINED3DPTEXTURECAPS_ALPHA   0x00000004
 
#define WINED3DPTEXTURECAPS_TRANSPARENCY   0x00000008
 
#define WINED3DPTEXTURECAPS_BORDER   0x00000010
 
#define WINED3DPTEXTURECAPS_SQUAREONLY   0x00000020
 
#define WINED3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE   0x00000040
 
#define WINED3DPTEXTURECAPS_ALPHAPALETTE   0x00000080
 
#define WINED3DPTEXTURECAPS_NONPOW2CONDITIONAL   0x00000100
 
#define WINED3DPTEXTURECAPS_PROJECTED   0x00000400
 
#define WINED3DPTEXTURECAPS_CUBEMAP   0x00000800
 
#define WINED3DPTEXTURECAPS_COLORKEYBLEND   0x00001000
 
#define WINED3DPTEXTURECAPS_VOLUMEMAP   0x00002000
 
#define WINED3DPTEXTURECAPS_MIPMAP   0x00004000
 
#define WINED3DPTEXTURECAPS_MIPVOLUMEMAP   0x00008000
 
#define WINED3DPTEXTURECAPS_MIPCUBEMAP   0x00010000
 
#define WINED3DPTEXTURECAPS_CUBEMAP_POW2   0x00020000
 
#define WINED3DPTEXTURECAPS_VOLUMEMAP_POW2   0x00040000
 
#define WINED3DPTEXTURECAPS_NOPROJECTEDBUMPENV   0x00200000
 
#define WINED3DPTFILTERCAPS_NEAREST   0x00000001
 
#define WINED3DPTFILTERCAPS_LINEAR   0x00000002
 
#define WINED3DPTFILTERCAPS_MIPNEAREST   0x00000004
 
#define WINED3DPTFILTERCAPS_MIPLINEAR   0x00000008
 
#define WINED3DPTFILTERCAPS_LINEARMIPNEAREST   0x00000010
 
#define WINED3DPTFILTERCAPS_LINEARMIPLINEAR   0x00000020
 
#define WINED3DPTFILTERCAPS_MINFPOINT   0x00000100
 
#define WINED3DPTFILTERCAPS_MINFLINEAR   0x00000200
 
#define WINED3DPTFILTERCAPS_MINFANISOTROPIC   0x00000400
 
#define WINED3DPTFILTERCAPS_MIPFPOINT   0x00010000
 
#define WINED3DPTFILTERCAPS_MIPFLINEAR   0x00020000
 
#define WINED3DPTFILTERCAPS_MAGFPOINT   0x01000000
 
#define WINED3DPTFILTERCAPS_MAGFLINEAR   0x02000000
 
#define WINED3DPTFILTERCAPS_MAGFANISOTROPIC   0x04000000
 
#define WINED3DPTFILTERCAPS_MAGFPYRAMIDALQUAD   0x08000000
 
#define WINED3DPTFILTERCAPS_MAGFGAUSSIANQUAD   0x10000000
 
#define WINED3DVTXPCAPS_TEXGEN   0x00000001
 
#define WINED3DVTXPCAPS_MATERIALSOURCE7   0x00000002
 
#define WINED3DVTXPCAPS_VERTEXFOG   0x00000004
 
#define WINED3DVTXPCAPS_DIRECTIONALLIGHTS   0x00000008
 
#define WINED3DVTXPCAPS_POSITIONALLIGHTS   0x00000010
 
#define WINED3DVTXPCAPS_LOCALVIEWER   0x00000020
 
#define WINED3DVTXPCAPS_TWEENING   0x00000040
 
#define WINED3DVTXPCAPS_TEXGEN_SPHEREMAP   0x00000100
 
#define WINED3DVTXPCAPS_NO_TEXGEN_NONLOCALVIEWER   0x00000200
 
#define WINED3DCURSORCAPS_COLOR   0x00000001
 
#define WINED3DCURSORCAPS_LOWRES   0x00000002
 
#define WINED3DDEVCAPS_FLOATTLVERTEX   0x00000001
 
#define WINED3DDEVCAPS_SORTINCREASINGZ   0x00000002
 
#define WINED3DDEVCAPS_SORTDECREASINGZ   0X00000004
 
#define WINED3DDEVCAPS_SORTEXACT   0x00000008
 
#define WINED3DDEVCAPS_EXECUTESYSTEMMEMORY   0x00000010
 
#define WINED3DDEVCAPS_EXECUTEVIDEOMEMORY   0x00000020
 
#define WINED3DDEVCAPS_TLVERTEXSYSTEMMEMORY   0x00000040
 
#define WINED3DDEVCAPS_TLVERTEXVIDEOMEMORY   0x00000080
 
#define WINED3DDEVCAPS_TEXTURESYSTEMMEMORY   0x00000100
 
#define WINED3DDEVCAPS_TEXTUREVIDEOMEMORY   0x00000200
 
#define WINED3DDEVCAPS_DRAWPRIMTLVERTEX   0x00000400
 
#define WINED3DDEVCAPS_CANRENDERAFTERFLIP   0x00000800
 
#define WINED3DDEVCAPS_TEXTURENONLOCALVIDMEM   0x00001000
 
#define WINED3DDEVCAPS_DRAWPRIMITIVES2   0x00002000
 
#define WINED3DDEVCAPS_SEPARATETEXTUREMEMORIES   0x00004000
 
#define WINED3DDEVCAPS_DRAWPRIMITIVES2EX   0x00008000
 
#define WINED3DDEVCAPS_HWTRANSFORMANDLIGHT   0x00010000
 
#define WINED3DDEVCAPS_CANBLTSYSTONONLOCAL   0x00020000
 
#define WINED3DDEVCAPS_HWRASTERIZATION   0x00080000
 
#define WINED3DDEVCAPS_PUREDEVICE   0x00100000
 
#define WINED3DDEVCAPS_QUINTICRTPATCHES   0x00200000
 
#define WINED3DDEVCAPS_RTPATCHES   0x00400000
 
#define WINED3DDEVCAPS_RTPATCHHANDLEZERO   0x00800000
 
#define WINED3DDEVCAPS_NPATCHES   0x01000000
 
#define WINED3D_LEGACY_DEPTH_BIAS   0x00000001
 
#define WINED3D_NO3D   0x00000002
 
#define WINED3D_PRESENT_CONVERSION   0x00000008
 
#define WINED3D_RESTORE_MODE_ON_ACTIVATE   0x00000010
 
#define WINED3D_FOCUS_MESSAGES   0x00000020
 
#define WINED3D_HANDLE_RESTORE   0x00000040
 
#define WINED3D_PIXEL_CENTER_INTEGER   0x00000080
 
#define WINED3D_LEGACY_FFP_LIGHTING   0x00000100
 
#define WINED3D_SRGB_READ_WRITE_CONTROL   0x00000200
 
#define WINED3D_LEGACY_UNBOUND_RESOURCE_COLOR   0x00000400
 
#define WINED3D_NO_PRIMITIVE_RESTART   0x00000800
 
#define WINED3D_LEGACY_CUBEMAP_FILTERING   0x00001000
 
#define WINED3D_NORMALIZED_DEPTH_BIAS   0x00002000
 
#define WINED3D_NO_DRAW_INDIRECT   0x00004000
 
#define WINED3D_RESZ_CODE   0x7fa05000
 
#define WINED3D_CKEY_DST_BLT   0x00000002
 
#define WINED3D_CKEY_DST_OVERLAY   0x00000004
 
#define WINED3D_CKEY_SRC_BLT   0x00000008
 
#define WINED3D_CKEY_SRC_OVERLAY   0x00000010
 
#define WINEDDBLTFX_ARITHSTRETCHY   0x00000001
 
#define WINEDDBLTFX_MIRRORLEFTRIGHT   0x00000002
 
#define WINEDDBLTFX_MIRRORUPDOWN   0x00000004
 
#define WINEDDBLTFX_NOTEARING   0x00000008
 
#define WINEDDBLTFX_ROTATE180   0x00000010
 
#define WINEDDBLTFX_ROTATE270   0x00000020
 
#define WINEDDBLTFX_ROTATE90   0x00000040
 
#define WINEDDBLTFX_ZBUFFERRANGE   0x00000080
 
#define WINEDDBLTFX_ZBUFFERBASEDEST   0x00000100
 
#define WINED3D_BLT_FX   0x00000800
 
#define WINED3D_BLT_DST_CKEY   0x00002000
 
#define WINED3D_BLT_DST_CKEY_OVERRIDE   0x00004000
 
#define WINED3D_BLT_SRC_CKEY   0x00008000
 
#define WINED3D_BLT_SRC_CKEY_OVERRIDE   0x00010000
 
#define WINED3D_BLT_WAIT   0x01000000
 
#define WINED3D_BLT_DO_NOT_WAIT   0x08000000
 
#define WINED3D_BLT_RAW   0x20000000
 
#define WINED3D_BLT_SYNCHRONOUS   0x40000000
 
#define WINED3D_BLT_ALPHA_TEST   0x80000000
 
#define WINED3D_BLT_MASK   0x0901e800
 
#define WINEDDGBS_CANBLT   0x00000001
 
#define WINEDDGBS_ISBLTDONE   0x00000002
 
#define WINEDDGFS_CANFLIP   0x00000001
 
#define WINEDDGFS_ISFLIPDONE   0x00000002
 
#define WINEDDFLIP_WAIT   0x00000001
 
#define WINEDDFLIP_EVEN   0x00000002 /* only valid for overlay */
 
#define WINEDDFLIP_ODD   0x00000004 /* only valid for overlay */
 
#define WINEDDFLIP_NOVSYNC   0x00000008
 
#define WINEDDFLIP_STEREO   0x00000010
 
#define WINEDDFLIP_DONOTWAIT   0x00000020
 
#define WINEDDFLIP_INTERVAL2   0x02000000
 
#define WINEDDFLIP_INTERVAL3   0x03000000
 
#define WINEDDFLIP_INTERVAL4   0x04000000
 
#define WINEDDOVER_ALPHADEST   0x00000001
 
#define WINEDDOVER_ALPHADESTCONSTOVERRIDE   0x00000002
 
#define WINEDDOVER_ALPHADESTNEG   0x00000004
 
#define WINEDDOVER_ALPHADESTSURFACEOVERRIDE   0x00000008
 
#define WINEDDOVER_ALPHAEDGEBLEND   0x00000010
 
#define WINEDDOVER_ALPHASRC   0x00000020
 
#define WINEDDOVER_ALPHASRCCONSTOVERRIDE   0x00000040
 
#define WINEDDOVER_ALPHASRCNEG   0x00000080
 
#define WINEDDOVER_ALPHASRCSURFACEOVERRIDE   0x00000100
 
#define WINEDDOVER_HIDE   0x00000200
 
#define WINEDDOVER_KEYDEST   0x00000400
 
#define WINEDDOVER_KEYDESTOVERRIDE   0x00000800
 
#define WINEDDOVER_KEYSRC   0x00001000
 
#define WINEDDOVER_KEYSRCOVERRIDE   0x00002000
 
#define WINEDDOVER_SHOW   0x00004000
 
#define WINEDDOVER_ADDDIRTYRECT   0x00008000
 
#define WINEDDOVER_REFRESHDIRTYRECTS   0x00010000
 
#define WINEDDOVER_REFRESHALL   0x00020000
 
#define WINEDDOVER_DDFX   0x00080000
 
#define WINEDDOVER_AUTOFLIP   0x00100000
 
#define WINEDDOVER_BOB   0x00200000
 
#define WINEDDOVER_OVERRIDEBOBWEAVE   0x00400000
 
#define WINEDDOVER_INTERLEAVED   0x00800000
 
#define WINEDDSCAPS_RESERVED1   0x00000001
 
#define WINEDDSCAPS_ALPHA   0x00000002
 
#define WINEDDSCAPS_BACKBUFFER   0x00000004
 
#define WINEDDSCAPS_COMPLEX   0x00000008
 
#define WINEDDSCAPS_FLIP   0x00000010
 
#define WINEDDSCAPS_FRONTBUFFER   0x00000020
 
#define WINEDDSCAPS_OFFSCREENPLAIN   0x00000040
 
#define WINEDDSCAPS_OVERLAY   0x00000080
 
#define WINEDDSCAPS_PALETTE   0x00000100
 
#define WINEDDSCAPS_PRIMARYSURFACE   0x00000200
 
#define WINEDDSCAPS_PRIMARYSURFACELEFT   0x00000400
 
#define WINEDDSCAPS_SYSTEMMEMORY   0x00000800
 
#define WINEDDSCAPS_TEXTURE   0x00001000
 
#define WINEDDSCAPS_3DDEVICE   0x00002000
 
#define WINEDDSCAPS_VIDEOMEMORY   0x00004000
 
#define WINEDDSCAPS_VISIBLE   0x00008000
 
#define WINEDDSCAPS_WRITEONLY   0x00010000
 
#define WINEDDSCAPS_ZBUFFER   0x00020000
 
#define WINEDDSCAPS_OWNDC   0x00040000
 
#define WINEDDSCAPS_LIVEVIDEO   0x00080000
 
#define WINEDDSCAPS_HWCODEC   0x00100000
 
#define WINEDDSCAPS_MODEX   0x00200000
 
#define WINEDDSCAPS_MIPMAP   0x00400000
 
#define WINEDDSCAPS_RESERVED2   0x00800000
 
#define WINEDDSCAPS_ALLOCONLOAD   0x04000000
 
#define WINEDDSCAPS_VIDEOPORT   0x08000000
 
#define WINEDDSCAPS_LOCALVIDMEM   0x10000000
 
#define WINEDDSCAPS_NONLOCALVIDMEM   0x20000000
 
#define WINEDDSCAPS_STANDARDVGAMODE   0x40000000
 
#define WINEDDSCAPS_OPTIMIZED   0x80000000
 
#define WINEDDCKEYCAPS_DESTBLT   0x00000001
 
#define WINEDDCKEYCAPS_DESTBLTCLRSPACE   0x00000002
 
#define WINEDDCKEYCAPS_DESTBLTCLRSPACEYUV   0x00000004
 
#define WINEDDCKEYCAPS_DESTBLTYUV   0x00000008
 
#define WINEDDCKEYCAPS_DESTOVERLAY   0x00000010
 
#define WINEDDCKEYCAPS_DESTOVERLAYCLRSPACE   0x00000020
 
#define WINEDDCKEYCAPS_DESTOVERLAYCLRSPACEYUV   0x00000040
 
#define WINEDDCKEYCAPS_DESTOVERLAYONEACTIVE   0x00000080
 
#define WINEDDCKEYCAPS_DESTOVERLAYYUV   0x00000100
 
#define WINEDDCKEYCAPS_SRCBLT   0x00000200
 
#define WINEDDCKEYCAPS_SRCBLTCLRSPACE   0x00000400
 
#define WINEDDCKEYCAPS_SRCBLTCLRSPACEYUV   0x00000800
 
#define WINEDDCKEYCAPS_SRCBLTYUV   0x00001000
 
#define WINEDDCKEYCAPS_SRCOVERLAY   0x00002000
 
#define WINEDDCKEYCAPS_SRCOVERLAYCLRSPACE   0x00004000
 
#define WINEDDCKEYCAPS_SRCOVERLAYCLRSPACEYUV   0x00008000
 
#define WINEDDCKEYCAPS_SRCOVERLAYONEACTIVE   0x00010000
 
#define WINEDDCKEYCAPS_SRCOVERLAYYUV   0x00020000
 
#define WINEDDCKEYCAPS_NOCOSTOVERLAY   0x00040000
 
#define WINEDDFXCAPS_BLTALPHA   0x00000001
 
#define WINEDDFXCAPS_OVERLAYALPHA   0x00000004
 
#define WINEDDFXCAPS_BLTARITHSTRETCHYN   0x00000010
 
#define WINEDDFXCAPS_BLTARITHSTRETCHY   0x00000020
 
#define WINEDDFXCAPS_BLTMIRRORLEFTRIGHT   0x00000040
 
#define WINEDDFXCAPS_BLTMIRRORUPDOWN   0x00000080
 
#define WINEDDFXCAPS_BLTROTATION   0x00000100
 
#define WINEDDFXCAPS_BLTROTATION90   0x00000200
 
#define WINEDDFXCAPS_BLTSHRINKX   0x00000400
 
#define WINEDDFXCAPS_BLTSHRINKXN   0x00000800
 
#define WINEDDFXCAPS_BLTSHRINKY   0x00001000
 
#define WINEDDFXCAPS_BLTSHRINKYN   0x00002000
 
#define WINEDDFXCAPS_BLTSTRETCHX   0x00004000
 
#define WINEDDFXCAPS_BLTSTRETCHXN   0x00008000
 
#define WINEDDFXCAPS_BLTSTRETCHY   0x00010000
 
#define WINEDDFXCAPS_BLTSTRETCHYN   0x00020000
 
#define WINEDDFXCAPS_OVERLAYARITHSTRETCHY   0x00040000
 
#define WINEDDFXCAPS_OVERLAYARITHSTRETCHYN   0x00000008
 
#define WINEDDFXCAPS_OVERLAYSHRINKX   0x00080000
 
#define WINEDDFXCAPS_OVERLAYSHRINKXN   0x00100000
 
#define WINEDDFXCAPS_OVERLAYSHRINKY   0x00200000
 
#define WINEDDFXCAPS_OVERLAYSHRINKYN   0x00400000
 
#define WINEDDFXCAPS_OVERLAYSTRETCHX   0x00800000
 
#define WINEDDFXCAPS_OVERLAYSTRETCHXN   0x01000000
 
#define WINEDDFXCAPS_OVERLAYSTRETCHY   0x02000000
 
#define WINEDDFXCAPS_OVERLAYSTRETCHYN   0x04000000
 
#define WINEDDFXCAPS_OVERLAYMIRRORLEFTRIGHT   0x08000000
 
#define WINEDDFXCAPS_OVERLAYMIRRORUPDOWN   0x10000000
 
#define WINEDDCAPS_3D   0x00000001
 
#define WINEDDCAPS_ALIGNBOUNDARYDEST   0x00000002
 
#define WINEDDCAPS_ALIGNSIZEDEST   0x00000004
 
#define WINEDDCAPS_ALIGNBOUNDARYSRC   0x00000008
 
#define WINEDDCAPS_ALIGNSIZESRC   0x00000010
 
#define WINEDDCAPS_ALIGNSTRIDE   0x00000020
 
#define WINEDDCAPS_BLT   0x00000040
 
#define WINEDDCAPS_BLTQUEUE   0x00000080
 
#define WINEDDCAPS_BLTFOURCC   0x00000100
 
#define WINEDDCAPS_BLTSTRETCH   0x00000200
 
#define WINEDDCAPS_GDI   0x00000400
 
#define WINEDDCAPS_OVERLAY   0x00000800
 
#define WINEDDCAPS_OVERLAYCANTCLIP   0x00001000
 
#define WINEDDCAPS_OVERLAYFOURCC   0x00002000
 
#define WINEDDCAPS_OVERLAYSTRETCH   0x00004000
 
#define WINEDDCAPS_PALETTE   0x00008000
 
#define WINEDDCAPS_PALETTEVSYNC   0x00010000
 
#define WINEDDCAPS_READSCANLINE   0x00020000
 
#define WINEDDCAPS_STEREOVIEW   0x00040000
 
#define WINEDDCAPS_VBI   0x00080000
 
#define WINEDDCAPS_ZBLTS   0x00100000
 
#define WINEDDCAPS_ZOVERLAYS   0x00200000
 
#define WINEDDCAPS_COLORKEY   0x00400000
 
#define WINEDDCAPS_ALPHA   0x00800000
 
#define WINEDDCAPS_COLORKEYHWASSIST   0x01000000
 
#define WINEDDCAPS_NOHARDWARE   0x02000000
 
#define WINEDDCAPS_BLTCOLORFILL   0x04000000
 
#define WINEDDCAPS_BANKSWITCHED   0x08000000
 
#define WINEDDCAPS_BLTDEPTHFILL   0x10000000
 
#define WINEDDCAPS_CANCLIP   0x20000000
 
#define WINEDDCAPS_CANCLIPSTRETCHED   0x40000000
 
#define WINEDDCAPS_CANBLTSYSMEM   0x80000000
 
#define WINEDDCAPS2_CERTIFIED   0x00000001
 
#define WINEDDCAPS2_NO2DDURING3DSCENE   0x00000002
 
#define WINEDDCAPS2_VIDEOPORT   0x00000004
 
#define WINEDDCAPS2_AUTOFLIPOVERLAY   0x00000008
 
#define WINEDDCAPS2_CANBOBINTERLEAVED   0x00000010
 
#define WINEDDCAPS2_CANBOBNONINTERLEAVED   0x00000020
 
#define WINEDDCAPS2_COLORCONTROLOVERLAY   0x00000040
 
#define WINEDDCAPS2_COLORCONTROLPRIMARY   0x00000080
 
#define WINEDDCAPS2_CANDROPZ16BIT   0x00000100
 
#define WINEDDCAPS2_NONLOCALVIDMEM   0x00000200
 
#define WINEDDCAPS2_NONLOCALVIDMEMCAPS   0x00000400
 
#define WINEDDCAPS2_NOPAGELOCKREQUIRED   0x00000800
 
#define WINEDDCAPS2_WIDESURFACES   0x00001000
 
#define WINEDDCAPS2_CANFLIPODDEVEN   0x00002000
 
#define WINEDDCAPS2_CANBOBHARDWARE   0x00004000
 
#define WINEDDCAPS2_COPYFOURCC   0x00008000
 
#define WINEDDCAPS2_PRIMARYGAMMA   0x00020000
 
#define WINEDDCAPS2_CANRENDERWINDOWED   0x00080000
 
#define WINEDDCAPS2_CANCALIBRATEGAMMA   0x00100000
 
#define WINEDDCAPS2_FLIPINTERVAL   0x00200000
 
#define WINEDDCAPS2_FLIPNOVSYNC   0x00400000
 
#define WINEDDCAPS2_CANMANAGETEXTURE   0x00800000
 
#define WINEDDCAPS2_TEXMANINNONLOCALVIDMEM   0x01000000
 
#define WINEDDCAPS2_STEREO   0x02000000
 
#define WINEDDCAPS2_SYSTONONLOCAL_AS_SYSTOLOCAL   0x04000000
 
#define WINED3D_PALETTE_8BIT_ENTRIES   0x00000001
 
#define WINED3D_PALETTE_ALLOW_256   0x00000002
 
#define WINED3D_PALETTE_ALPHA   0x00000004
 
#define WINED3D_TEXTURE_CREATE_DISCARD   0x00000002
 
#define WINED3D_TEXTURE_CREATE_GET_DC_LENIENT   0x00000004
 
#define WINED3D_TEXTURE_CREATE_GET_DC   0x00000008
 
#define WINED3D_TEXTURE_CREATE_GENERATE_MIPMAPS   0x00000010
 
#define WINED3D_TEXTURE_CREATE_RECORD_DIRTY_REGIONS   0x00000020
 
#define WINED3D_STANDARD_MULTISAMPLE_PATTERN   0xffffffff
 
#define WINED3D_APPEND_ALIGNED_ELEMENT   0xffffffff
 
#define WINED3D_OUTPUT_SLOT_SEMANTIC   0xffffffff
 
#define WINED3D_OUTPUT_SLOT_UNUSED   0xfffffffe
 
#define WINED3D_MAX_STREAM_OUTPUT_BUFFERS   4
 
#define WINED3D_NO_RASTERIZER_STREAM   0xffffffff
 
#define WINED3D_VIEW_BUFFER_RAW   0x00000001
 
#define WINED3D_VIEW_BUFFER_APPEND   0x00000002
 
#define WINED3D_VIEW_BUFFER_COUNTER   0x00000004
 
#define WINED3D_VIEW_TEXTURE_CUBE   0x00000008
 
#define WINED3D_VIEW_TEXTURE_ARRAY   0x00000010
 
#define WINED3D_VIEW_READ_ONLY_DEPTH   0x00000020
 
#define WINED3D_VIEW_READ_ONLY_STENCIL   0x00000040
 
#define WINED3D_VIEW_FORWARD_REFERENCE   0x00000080
 
#define WINED3D_MAX_VIEWPORTS   16
 
#define WINED3D_REGISTER_WINDOW_NO_WINDOW_CHANGES   0x00000001u
 
#define WINED3D_REGISTER_WINDOW_NO_ALT_ENTER   0x00000002u
 
#define WINED3D_REGISTER_WINDOW_NO_PRINT_SCREEN   0x00000004u
 
#define WINED3D_MAX_STREAMS   16
 
#define WINED3D_MAX_FFP_TEXTURES   8
 
#define WINED3D_MAX_FRAGMENT_SAMPLERS   16
 
#define WINED3D_MAX_VERTEX_SAMPLERS   4
 
#define WINED3D_MAX_COMBINED_SAMPLERS   (WINED3D_MAX_FRAGMENT_SAMPLERS + WINED3D_MAX_VERTEX_SAMPLERS)
 
#define WINED3D_MAX_CLIP_DISTANCES   8
 
#define WINED3D_MAX_CONSTS_B   16
 
#define WINED3D_MAX_CONSTS_I   16
 
#define WINED3D_MAX_VS_CONSTS_F   256
 
#define WINED3D_MAX_PS_CONSTS_F   224
 
#define WINED3D_MAX_RENDER_TARGETS   8
 
#define WINED3D_MAX_CONSTANT_BUFFER_SIZE   4096
 

Typedefs

typedef HRESULT(CDECL * wined3d_device_reset_cb) (struct wined3d_resource *resource)
 

Enumerations

enum  wined3d_renderer { WINED3D_RENDERER_AUTO , WINED3D_RENDERER_VULKAN , WINED3D_RENDERER_OPENGL , WINED3D_RENDERER_NO3D }
 
enum  wined3d_light_type {
  WINED3D_LIGHT_POINT = 1 , WINED3D_LIGHT_SPOT = 2 , WINED3D_LIGHT_DIRECTIONAL = 3 , WINED3D_LIGHT_PARALLELPOINT = 4 ,
  WINED3D_LIGHT_GLSPOT = 5
}
 
enum  wined3d_primitive_type {
  WINED3D_PT_UNDEFINED = 0 , WINED3D_PT_POINTLIST = 1 , WINED3D_PT_LINELIST = 2 , WINED3D_PT_LINESTRIP = 3 ,
  WINED3D_PT_TRIANGLELIST = 4 , WINED3D_PT_TRIANGLESTRIP = 5 , WINED3D_PT_TRIANGLEFAN = 6 , WINED3D_PT_LINELIST_ADJ = 10 ,
  WINED3D_PT_LINESTRIP_ADJ = 11 , WINED3D_PT_TRIANGLELIST_ADJ = 12 , WINED3D_PT_TRIANGLESTRIP_ADJ = 13 , WINED3D_PT_PATCH = 14
}
 
enum  wined3d_device_type { WINED3D_DEVICE_TYPE_HAL = 1 , WINED3D_DEVICE_TYPE_REF = 2 , WINED3D_DEVICE_TYPE_SW = 3 , WINED3D_DEVICE_TYPE_NULLREF = 4 }
 
enum  wined3d_feature_level {
  WINED3D_FEATURE_LEVEL_NONE = 0x0000 , WINED3D_FEATURE_LEVEL_5 = 0x5000 , WINED3D_FEATURE_LEVEL_6 = 0x6000 , WINED3D_FEATURE_LEVEL_7 = 0x7000 ,
  WINED3D_FEATURE_LEVEL_8 = 0x8000 , WINED3D_FEATURE_LEVEL_9_1 = 0x9100 , WINED3D_FEATURE_LEVEL_9_2 = 0x9200 , WINED3D_FEATURE_LEVEL_9_3 = 0x9300 ,
  WINED3D_FEATURE_LEVEL_10 = 0xa000 , WINED3D_FEATURE_LEVEL_10_1 = 0xa100 , WINED3D_FEATURE_LEVEL_11 = 0xb000 , WINED3D_FEATURE_LEVEL_11_1 = 0xb100
}
 
enum  wined3d_degree_type { WINED3D_DEGREE_LINEAR = 1 , WINED3D_DEGREE_QUADRATIC = 2 , WINED3D_DEGREE_CUBIC = 3 , WINED3D_DEGREE_QUINTIC = 5 }
 
enum  wined3d_format_id {
  WINED3DFMT_UNKNOWN , WINED3DFMT_B8G8R8_UNORM , WINED3DFMT_B5G5R5X1_UNORM , WINED3DFMT_B4G4R4A4_UNORM ,
  WINED3DFMT_B2G3R3_UNORM , WINED3DFMT_B2G3R3A8_UNORM , WINED3DFMT_B4G4R4X4_UNORM , WINED3DFMT_R8G8B8X8_UNORM ,
  WINED3DFMT_B10G10R10A2_UNORM , WINED3DFMT_P8_UINT_A8_UNORM , WINED3DFMT_P8_UINT , WINED3DFMT_L8_UNORM ,
  WINED3DFMT_L8A8_UNORM , WINED3DFMT_L4A4_UNORM , WINED3DFMT_R5G5_SNORM_L6_UNORM , WINED3DFMT_R8G8_SNORM_L8X8_UNORM ,
  WINED3DFMT_R10G11B11_SNORM , WINED3DFMT_R10G10B10X2_TYPELESS , WINED3DFMT_R10G10B10X2_UINT , WINED3DFMT_R10G10B10X2_SNORM ,
  WINED3DFMT_R10G10B10_SNORM_A2_UNORM , WINED3DFMT_D16_LOCKABLE , WINED3DFMT_D32_UNORM , WINED3DFMT_S1_UINT_D15_UNORM ,
  WINED3DFMT_X8D24_UNORM , WINED3DFMT_S4X4_UINT_D24_UNORM , WINED3DFMT_L16_UNORM , WINED3DFMT_S8_UINT_D24_FLOAT ,
  WINED3DFMT_R8G8_SNORM_Cx , WINED3DFMT_R32G32B32A32_TYPELESS , WINED3DFMT_R32G32B32A32_FLOAT , WINED3DFMT_R32G32B32A32_UINT ,
  WINED3DFMT_R32G32B32A32_SINT , WINED3DFMT_R32G32B32_TYPELESS , WINED3DFMT_R32G32B32_FLOAT , WINED3DFMT_R32G32B32_UINT ,
  WINED3DFMT_R32G32B32_SINT , WINED3DFMT_R16G16B16A16_TYPELESS , WINED3DFMT_R16G16B16A16_FLOAT , WINED3DFMT_R16G16B16A16_UNORM ,
  WINED3DFMT_R16G16B16A16_UINT , WINED3DFMT_R16G16B16A16_SNORM , WINED3DFMT_R16G16B16A16_SINT , WINED3DFMT_R32G32_TYPELESS ,
  WINED3DFMT_R32G32_FLOAT , WINED3DFMT_R32G32_UINT , WINED3DFMT_R32G32_SINT , WINED3DFMT_R32G8X24_TYPELESS ,
  WINED3DFMT_D32_FLOAT_S8X24_UINT , WINED3DFMT_R32_FLOAT_X8X24_TYPELESS , WINED3DFMT_X32_TYPELESS_G8X24_UINT , WINED3DFMT_R10G10B10A2_TYPELESS ,
  WINED3DFMT_R10G10B10A2_UNORM , WINED3DFMT_R10G10B10A2_UINT , WINED3DFMT_R10G10B10A2_SNORM , WINED3DFMT_R10G10B10_XR_BIAS_A2_UNORM ,
  WINED3DFMT_R11G11B10_FLOAT , WINED3DFMT_R8G8B8A8_TYPELESS , WINED3DFMT_R8G8B8A8_UNORM , WINED3DFMT_R8G8B8A8_UNORM_SRGB ,
  WINED3DFMT_R8G8B8A8_UINT , WINED3DFMT_R8G8B8A8_SNORM , WINED3DFMT_R8G8B8A8_SINT , WINED3DFMT_R16G16_TYPELESS ,
  WINED3DFMT_R16G16_FLOAT , WINED3DFMT_R16G16_UNORM , WINED3DFMT_R16G16_UINT , WINED3DFMT_R16G16_SNORM ,
  WINED3DFMT_R16G16_SINT , WINED3DFMT_R32_TYPELESS , WINED3DFMT_D32_FLOAT , WINED3DFMT_R32_FLOAT ,
  WINED3DFMT_R32_UINT , WINED3DFMT_R32_SINT , WINED3DFMT_R24G8_TYPELESS , WINED3DFMT_D24_UNORM_S8_UINT ,
  WINED3DFMT_R24_UNORM_X8_TYPELESS , WINED3DFMT_X24_TYPELESS_G8_UINT , WINED3DFMT_R8G8_TYPELESS , WINED3DFMT_R8G8_UNORM ,
  WINED3DFMT_R8G8_UINT , WINED3DFMT_R8G8_SNORM , WINED3DFMT_R8G8_SINT , WINED3DFMT_R16_TYPELESS ,
  WINED3DFMT_R16_FLOAT , WINED3DFMT_D16_UNORM , WINED3DFMT_R16_UNORM , WINED3DFMT_R16_UINT ,
  WINED3DFMT_R16_SNORM , WINED3DFMT_R16_SINT , WINED3DFMT_R8_TYPELESS , WINED3DFMT_R8_UNORM ,
  WINED3DFMT_R8_UINT , WINED3DFMT_R8_SNORM , WINED3DFMT_R8_SINT , WINED3DFMT_A8_UNORM ,
  WINED3DFMT_R1_UNORM , WINED3DFMT_R9G9B9E5_SHAREDEXP , WINED3DFMT_R8G8_B8G8_UNORM , WINED3DFMT_G8R8_G8B8_UNORM ,
  WINED3DFMT_BC1_TYPELESS , WINED3DFMT_BC1_UNORM , WINED3DFMT_BC1_UNORM_SRGB , WINED3DFMT_BC2_TYPELESS ,
  WINED3DFMT_BC2_UNORM , WINED3DFMT_BC2_UNORM_SRGB , WINED3DFMT_BC3_TYPELESS , WINED3DFMT_BC3_UNORM ,
  WINED3DFMT_BC3_UNORM_SRGB , WINED3DFMT_BC4_TYPELESS , WINED3DFMT_BC4_UNORM , WINED3DFMT_BC4_SNORM ,
  WINED3DFMT_BC5_TYPELESS , WINED3DFMT_BC5_UNORM , WINED3DFMT_BC5_SNORM , WINED3DFMT_B5G6R5_UNORM ,
  WINED3DFMT_B5G5R5A1_UNORM , WINED3DFMT_B8G8R8A8_UNORM , WINED3DFMT_B8G8R8X8_UNORM , WINED3DFMT_B8G8R8A8_TYPELESS ,
  WINED3DFMT_B8G8R8A8_UNORM_SRGB , WINED3DFMT_B8G8R8X8_TYPELESS , WINED3DFMT_B8G8R8X8_UNORM_SRGB , WINED3DFMT_BC6H_TYPELESS ,
  WINED3DFMT_BC6H_UF16 , WINED3DFMT_BC6H_SF16 , WINED3DFMT_BC7_TYPELESS , WINED3DFMT_BC7_UNORM ,
  WINED3DFMT_BC7_UNORM_SRGB , WINED3DFMT_UYVY = WINEMAKEFOURCC('U','Y','V','Y') , WINED3DFMT_YUY2 = WINEMAKEFOURCC('Y','U','Y','2') , WINED3DFMT_YV12 = WINEMAKEFOURCC('Y','V','1','2') ,
  WINED3DFMT_DXT1 = WINEMAKEFOURCC('D','X','T','1') , WINED3DFMT_DXT2 = WINEMAKEFOURCC('D','X','T','2') , WINED3DFMT_DXT3 = WINEMAKEFOURCC('D','X','T','3') , WINED3DFMT_DXT4 = WINEMAKEFOURCC('D','X','T','4') ,
  WINED3DFMT_DXT5 = WINEMAKEFOURCC('D','X','T','5') , WINED3DFMT_MULTI2_ARGB8 = WINEMAKEFOURCC('M','E','T','1') , WINED3DFMT_G8R8_G8B8 = WINEMAKEFOURCC('G','R','G','B') , WINED3DFMT_R8G8_B8G8 = WINEMAKEFOURCC('R','G','B','G') ,
  WINED3DFMT_ATI1N = WINEMAKEFOURCC('A','T','I','1') , WINED3DFMT_ATI2N = WINEMAKEFOURCC('A','T','I','2') , WINED3DFMT_INST = WINEMAKEFOURCC('I','N','S','T') , WINED3DFMT_NVDB = WINEMAKEFOURCC('N','V','D','B') ,
  WINED3DFMT_NVHU = WINEMAKEFOURCC('N','V','H','U') , WINED3DFMT_NVHS = WINEMAKEFOURCC('N','V','H','S') , WINED3DFMT_INTZ = WINEMAKEFOURCC('I','N','T','Z') , WINED3DFMT_RESZ = WINEMAKEFOURCC('R','E','S','Z') ,
  WINED3DFMT_NULL = WINEMAKEFOURCC('N','U','L','L') , WINED3DFMT_R16 = WINEMAKEFOURCC(' ','R','1','6') , WINED3DFMT_AL16 = WINEMAKEFOURCC('A','L','1','6') , WINED3DFMT_NV12 = WINEMAKEFOURCC('N','V','1','2') ,
  WINED3DFMT_DF16 = WINEMAKEFOURCC('D','F','1','6') , WINED3DFMT_DF24 = WINEMAKEFOURCC('D','F','2','4') , WINED3DFMT_ATOC = WINEMAKEFOURCC('A','T','O','C') , WINED3DFMT_FORCE_DWORD = 0xffffffff
}
 
enum  wined3d_render_state {
  WINED3D_RS_ANTIALIAS = 2 , WINED3D_RS_TEXTUREPERSPECTIVE = 4 , WINED3D_RS_WRAPU = 5 , WINED3D_RS_WRAPV = 6 ,
  WINED3D_RS_ZENABLE = 7 , WINED3D_RS_FILLMODE = 8 , WINED3D_RS_SHADEMODE = 9 , WINED3D_RS_LINEPATTERN = 10 ,
  WINED3D_RS_MONOENABLE = 11 , WINED3D_RS_ROP2 = 12 , WINED3D_RS_PLANEMASK = 13 , WINED3D_RS_ZWRITEENABLE = 14 ,
  WINED3D_RS_ALPHATESTENABLE = 15 , WINED3D_RS_LASTPIXEL = 16 , WINED3D_RS_SRCBLEND = 19 , WINED3D_RS_DESTBLEND = 20 ,
  WINED3D_RS_CULLMODE = 22 , WINED3D_RS_ZFUNC = 23 , WINED3D_RS_ALPHAREF = 24 , WINED3D_RS_ALPHAFUNC = 25 ,
  WINED3D_RS_DITHERENABLE = 26 , WINED3D_RS_ALPHABLENDENABLE = 27 , WINED3D_RS_FOGENABLE = 28 , WINED3D_RS_SPECULARENABLE = 29 ,
  WINED3D_RS_ZVISIBLE = 30 , WINED3D_RS_SUBPIXEL = 31 , WINED3D_RS_SUBPIXELX = 32 , WINED3D_RS_STIPPLEDALPHA = 33 ,
  WINED3D_RS_FOGCOLOR = 34 , WINED3D_RS_FOGTABLEMODE = 35 , WINED3D_RS_FOGSTART = 36 , WINED3D_RS_FOGEND = 37 ,
  WINED3D_RS_FOGDENSITY = 38 , WINED3D_RS_STIPPLEENABLE = 39 , WINED3D_RS_COLORKEYENABLE = 41 , WINED3D_RS_MIPMAPLODBIAS = 46 ,
  WINED3D_RS_RANGEFOGENABLE = 48 , WINED3D_RS_ANISOTROPY = 49 , WINED3D_RS_FLUSHBATCH = 50 , WINED3D_RS_TRANSLUCENTSORTINDEPENDENT = 51 ,
  WINED3D_RS_STENCILENABLE = 52 , WINED3D_RS_STENCILFAIL = 53 , WINED3D_RS_STENCILZFAIL = 54 , WINED3D_RS_STENCILPASS = 55 ,
  WINED3D_RS_STENCILFUNC = 56 , WINED3D_RS_STENCILREF = 57 , WINED3D_RS_STENCILMASK = 58 , WINED3D_RS_STENCILWRITEMASK = 59 ,
  WINED3D_RS_TEXTUREFACTOR = 60 , WINED3D_RS_WRAP0 = 128 , WINED3D_RS_WRAP1 = 129 , WINED3D_RS_WRAP2 = 130 ,
  WINED3D_RS_WRAP3 = 131 , WINED3D_RS_WRAP4 = 132 , WINED3D_RS_WRAP5 = 133 , WINED3D_RS_WRAP6 = 134 ,
  WINED3D_RS_WRAP7 = 135 , WINED3D_RS_CLIPPING = 136 , WINED3D_RS_LIGHTING = 137 , WINED3D_RS_EXTENTS = 138 ,
  WINED3D_RS_AMBIENT = 139 , WINED3D_RS_FOGVERTEXMODE = 140 , WINED3D_RS_COLORVERTEX = 141 , WINED3D_RS_LOCALVIEWER = 142 ,
  WINED3D_RS_NORMALIZENORMALS = 143 , WINED3D_RS_COLORKEYBLENDENABLE = 144 , WINED3D_RS_DIFFUSEMATERIALSOURCE = 145 , WINED3D_RS_SPECULARMATERIALSOURCE = 146 ,
  WINED3D_RS_AMBIENTMATERIALSOURCE = 147 , WINED3D_RS_EMISSIVEMATERIALSOURCE = 148 , WINED3D_RS_VERTEXBLEND = 151 , WINED3D_RS_CLIPPLANEENABLE = 152 ,
  WINED3D_RS_SOFTWAREVERTEXPROCESSING = 153 , WINED3D_RS_POINTSIZE = 154 , WINED3D_RS_POINTSIZE_MIN = 155 , WINED3D_RS_POINTSPRITEENABLE = 156 ,
  WINED3D_RS_POINTSCALEENABLE = 157 , WINED3D_RS_POINTSCALE_A = 158 , WINED3D_RS_POINTSCALE_B = 159 , WINED3D_RS_POINTSCALE_C = 160 ,
  WINED3D_RS_MULTISAMPLEANTIALIAS = 161 , WINED3D_RS_MULTISAMPLEMASK = 162 , WINED3D_RS_PATCHEDGESTYLE = 163 , WINED3D_RS_PATCHSEGMENTS = 164 ,
  WINED3D_RS_DEBUGMONITORTOKEN = 165 , WINED3D_RS_POINTSIZE_MAX = 166 , WINED3D_RS_INDEXEDVERTEXBLENDENABLE = 167 , WINED3D_RS_COLORWRITEENABLE = 168 ,
  WINED3D_RS_TWEENFACTOR = 170 , WINED3D_RS_BLENDOP = 171 , WINED3D_RS_POSITIONDEGREE = 172 , WINED3D_RS_NORMALDEGREE = 173 ,
  WINED3D_RS_SCISSORTESTENABLE = 174 , WINED3D_RS_SLOPESCALEDEPTHBIAS = 175 , WINED3D_RS_ANTIALIASEDLINEENABLE = 176 , WINED3D_RS_MINTESSELLATIONLEVEL = 178 ,
  WINED3D_RS_MAXTESSELLATIONLEVEL = 179 , WINED3D_RS_ADAPTIVETESS_X = 180 , WINED3D_RS_ADAPTIVETESS_Y = 181 , WINED3D_RS_ADAPTIVETESS_Z = 182 ,
  WINED3D_RS_ADAPTIVETESS_W = 183 , WINED3D_RS_ENABLEADAPTIVETESSELLATION = 184 , WINED3D_RS_TWOSIDEDSTENCILMODE = 185 , WINED3D_RS_BACK_STENCILFAIL = 186 ,
  WINED3D_RS_BACK_STENCILZFAIL = 187 , WINED3D_RS_BACK_STENCILPASS = 188 , WINED3D_RS_BACK_STENCILFUNC = 189 , WINED3D_RS_COLORWRITEENABLE1 = 190 ,
  WINED3D_RS_COLORWRITEENABLE2 = 191 , WINED3D_RS_COLORWRITEENABLE3 = 192 , WINED3D_RS_BLENDFACTOR = 193 , WINED3D_RS_SRGBWRITEENABLE = 194 ,
  WINED3D_RS_DEPTHBIAS = 195 , WINED3D_RS_WRAP8 = 198 , WINED3D_RS_WRAP9 = 199 , WINED3D_RS_WRAP10 = 200 ,
  WINED3D_RS_WRAP11 = 201 , WINED3D_RS_WRAP12 = 202 , WINED3D_RS_WRAP13 = 203 , WINED3D_RS_WRAP14 = 204 ,
  WINED3D_RS_WRAP15 = 205 , WINED3D_RS_SEPARATEALPHABLENDENABLE = 206 , WINED3D_RS_SRCBLENDALPHA = 207 , WINED3D_RS_DESTBLENDALPHA = 208 ,
  WINED3D_RS_BLENDOPALPHA = 209
}
 
enum  wined3d_blend {
  WINED3D_BLEND_ZERO = 1 , WINED3D_BLEND_ONE = 2 , WINED3D_BLEND_SRCCOLOR = 3 , WINED3D_BLEND_INVSRCCOLOR = 4 ,
  WINED3D_BLEND_SRCALPHA = 5 , WINED3D_BLEND_INVSRCALPHA = 6 , WINED3D_BLEND_DESTALPHA = 7 , WINED3D_BLEND_INVDESTALPHA = 8 ,
  WINED3D_BLEND_DESTCOLOR = 9 , WINED3D_BLEND_INVDESTCOLOR = 10 , WINED3D_BLEND_SRCALPHASAT = 11 , WINED3D_BLEND_BOTHSRCALPHA = 12 ,
  WINED3D_BLEND_BOTHINVSRCALPHA = 13 , WINED3D_BLEND_BLENDFACTOR = 14 , WINED3D_BLEND_INVBLENDFACTOR = 15 , WINED3D_BLEND_SRC1COLOR = 16 ,
  WINED3D_BLEND_INVSRC1COLOR = 17 , WINED3D_BLEND_SRC1ALPHA = 18 , WINED3D_BLEND_INVSRC1ALPHA = 19
}
 
enum  wined3d_blend_op {
  WINED3D_BLEND_OP_ADD = 1 , WINED3D_BLEND_OP_SUBTRACT = 2 , WINED3D_BLEND_OP_REVSUBTRACT = 3 , WINED3D_BLEND_OP_MIN = 4 ,
  WINED3D_BLEND_OP_MAX = 5
}
 
enum  wined3d_vertex_blend_flags {
  WINED3D_VBF_DISABLE = 0 , WINED3D_VBF_1WEIGHTS = 1 , WINED3D_VBF_2WEIGHTS = 2 , WINED3D_VBF_3WEIGHTS = 3 ,
  WINED3D_VBF_TWEENING = 255 , WINED3D_VBF_0WEIGHTS = 256
}
 
enum  wined3d_cmp_func {
  WINED3D_CMP_NEVER = 1 , WINED3D_CMP_LESS = 2 , WINED3D_CMP_EQUAL = 3 , WINED3D_CMP_LESSEQUAL = 4 ,
  WINED3D_CMP_GREATER = 5 , WINED3D_CMP_NOTEQUAL = 6 , WINED3D_CMP_GREATEREQUAL = 7 , WINED3D_CMP_ALWAYS = 8
}
 
enum  wined3d_depth_buffer_type { WINED3D_ZB_FALSE = 0 , WINED3D_ZB_TRUE = 1 , WINED3D_ZB_USEW = 2 }
 
enum  wined3d_fog_mode { WINED3D_FOG_NONE = 0 , WINED3D_FOG_EXP = 1 , WINED3D_FOG_EXP2 = 2 , WINED3D_FOG_LINEAR = 3 }
 
enum  wined3d_shade_mode { WINED3D_SHADE_FLAT = 1 , WINED3D_SHADE_GOURAUD = 2 , WINED3D_SHADE_PHONG = 3 }
 
enum  wined3d_fill_mode { WINED3D_FILL_POINT = 1 , WINED3D_FILL_WIREFRAME = 2 , WINED3D_FILL_SOLID = 3 }
 
enum  wined3d_cull { WINED3D_CULL_NONE = 1 , WINED3D_CULL_FRONT = 2 , WINED3D_CULL_BACK = 3 }
 
enum  wined3d_stencil_op {
  WINED3D_STENCIL_OP_KEEP = 1 , WINED3D_STENCIL_OP_ZERO = 2 , WINED3D_STENCIL_OP_REPLACE = 3 , WINED3D_STENCIL_OP_INCR_SAT = 4 ,
  WINED3D_STENCIL_OP_DECR_SAT = 5 , WINED3D_STENCIL_OP_INVERT = 6 , WINED3D_STENCIL_OP_INCR = 7 , WINED3D_STENCIL_OP_DECR = 8
}
 
enum  wined3d_material_color_source { WINED3D_MCS_MATERIAL = 0 , WINED3D_MCS_COLOR1 = 1 , WINED3D_MCS_COLOR2 = 2 }
 
enum  wined3d_patch_edge_style { WINED3D_PATCH_EDGE_DISCRETE = 0 , WINED3D_PATCH_EDGE_CONTINUOUS = 1 }
 
enum  wined3d_swap_effect {
  WINED3D_SWAP_EFFECT_DISCARD , WINED3D_SWAP_EFFECT_SEQUENTIAL , WINED3D_SWAP_EFFECT_FLIP_DISCARD , WINED3D_SWAP_EFFECT_FLIP_SEQUENTIAL ,
  WINED3D_SWAP_EFFECT_COPY , WINED3D_SWAP_EFFECT_COPY_VSYNC , WINED3D_SWAP_EFFECT_OVERLAY
}
 
enum  wined3d_swap_interval {
  WINED3D_SWAP_INTERVAL_IMMEDIATE = 0 , WINED3D_SWAP_INTERVAL_ONE = 1 , WINED3D_SWAP_INTERVAL_TWO = 2 , WINED3D_SWAP_INTERVAL_THREE = 3 ,
  WINED3D_SWAP_INTERVAL_FOUR = 4 , WINED3D_SWAP_INTERVAL_DEFAULT = ~0u
}
 
enum  wined3d_sampler_state {
  WINED3D_SAMP_ADDRESS_U = 1 , WINED3D_SAMP_ADDRESS_V = 2 , WINED3D_SAMP_ADDRESS_W = 3 , WINED3D_SAMP_BORDER_COLOR = 4 ,
  WINED3D_SAMP_MAG_FILTER = 5 , WINED3D_SAMP_MIN_FILTER = 6 , WINED3D_SAMP_MIP_FILTER = 7 , WINED3D_SAMP_MIPMAP_LOD_BIAS = 8 ,
  WINED3D_SAMP_MAX_MIP_LEVEL = 9 , WINED3D_SAMP_MAX_ANISOTROPY = 10 , WINED3D_SAMP_SRGB_TEXTURE = 11 , WINED3D_SAMP_ELEMENT_INDEX = 12 ,
  WINED3D_SAMP_DMAP_OFFSET = 13
}
 
enum  wined3d_multisample_type {
  WINED3D_MULTISAMPLE_NONE = 0 , WINED3D_MULTISAMPLE_NON_MASKABLE = 1 , WINED3D_MULTISAMPLE_2_SAMPLES = 2 , WINED3D_MULTISAMPLE_3_SAMPLES = 3 ,
  WINED3D_MULTISAMPLE_4_SAMPLES = 4 , WINED3D_MULTISAMPLE_5_SAMPLES = 5 , WINED3D_MULTISAMPLE_6_SAMPLES = 6 , WINED3D_MULTISAMPLE_7_SAMPLES = 7 ,
  WINED3D_MULTISAMPLE_8_SAMPLES = 8 , WINED3D_MULTISAMPLE_9_SAMPLES = 9 , WINED3D_MULTISAMPLE_10_SAMPLES = 10 , WINED3D_MULTISAMPLE_11_SAMPLES = 11 ,
  WINED3D_MULTISAMPLE_12_SAMPLES = 12 , WINED3D_MULTISAMPLE_13_SAMPLES = 13 , WINED3D_MULTISAMPLE_14_SAMPLES = 14 , WINED3D_MULTISAMPLE_15_SAMPLES = 15 ,
  WINED3D_MULTISAMPLE_16_SAMPLES = 16
}
 
enum  wined3d_texture_stage_state {
  WINED3D_TSS_COLOR_OP = 0 , WINED3D_TSS_COLOR_ARG1 = 1 , WINED3D_TSS_COLOR_ARG2 = 2 , WINED3D_TSS_ALPHA_OP = 3 ,
  WINED3D_TSS_ALPHA_ARG1 = 4 , WINED3D_TSS_ALPHA_ARG2 = 5 , WINED3D_TSS_BUMPENV_MAT00 = 6 , WINED3D_TSS_BUMPENV_MAT01 = 7 ,
  WINED3D_TSS_BUMPENV_MAT10 = 8 , WINED3D_TSS_BUMPENV_MAT11 = 9 , WINED3D_TSS_TEXCOORD_INDEX = 10 , WINED3D_TSS_BUMPENV_LSCALE = 11 ,
  WINED3D_TSS_BUMPENV_LOFFSET = 12 , WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS = 13 , WINED3D_TSS_COLOR_ARG0 = 14 , WINED3D_TSS_ALPHA_ARG0 = 15 ,
  WINED3D_TSS_RESULT_ARG = 16 , WINED3D_TSS_CONSTANT = 17 , WINED3D_TSS_INVALID = ~0u
}
 
enum  wined3d_texture_transform_flags {
  WINED3D_TTFF_DISABLE = 0 , WINED3D_TTFF_COUNT1 = 1 , WINED3D_TTFF_COUNT2 = 2 , WINED3D_TTFF_COUNT3 = 3 ,
  WINED3D_TTFF_COUNT4 = 4 , WINED3D_TTFF_PROJECTED = 256
}
 
enum  wined3d_texture_op {
  WINED3D_TOP_DISABLE = 1 , WINED3D_TOP_SELECT_ARG1 = 2 , WINED3D_TOP_SELECT_ARG2 = 3 , WINED3D_TOP_MODULATE = 4 ,
  WINED3D_TOP_MODULATE_2X = 5 , WINED3D_TOP_MODULATE_4X = 6 , WINED3D_TOP_ADD = 7 , WINED3D_TOP_ADD_SIGNED = 8 ,
  WINED3D_TOP_ADD_SIGNED_2X = 9 , WINED3D_TOP_SUBTRACT = 10 , WINED3D_TOP_ADD_SMOOTH = 11 , WINED3D_TOP_BLEND_DIFFUSE_ALPHA = 12 ,
  WINED3D_TOP_BLEND_TEXTURE_ALPHA = 13 , WINED3D_TOP_BLEND_FACTOR_ALPHA = 14 , WINED3D_TOP_BLEND_TEXTURE_ALPHA_PM = 15 , WINED3D_TOP_BLEND_CURRENT_ALPHA = 16 ,
  WINED3D_TOP_PREMODULATE = 17 , WINED3D_TOP_MODULATE_ALPHA_ADD_COLOR = 18 , WINED3D_TOP_MODULATE_COLOR_ADD_ALPHA = 19 , WINED3D_TOP_MODULATE_INVALPHA_ADD_COLOR = 20 ,
  WINED3D_TOP_MODULATE_INVCOLOR_ADD_ALPHA = 21 , WINED3D_TOP_BUMPENVMAP = 22 , WINED3D_TOP_BUMPENVMAP_LUMINANCE = 23 , WINED3D_TOP_DOTPRODUCT3 = 24 ,
  WINED3D_TOP_MULTIPLY_ADD = 25 , WINED3D_TOP_LERP = 26
}
 
enum  wined3d_texture_address {
  WINED3D_TADDRESS_WRAP = 1 , WINED3D_TADDRESS_MIRROR = 2 , WINED3D_TADDRESS_CLAMP = 3 , WINED3D_TADDRESS_BORDER = 4 ,
  WINED3D_TADDRESS_MIRROR_ONCE = 5
}
 
enum  wined3d_transform_state {
  WINED3D_TS_VIEW = 2 , WINED3D_TS_PROJECTION = 3 , WINED3D_TS_TEXTURE0 = 16 , WINED3D_TS_TEXTURE1 = 17 ,
  WINED3D_TS_TEXTURE2 = 18 , WINED3D_TS_TEXTURE3 = 19 , WINED3D_TS_TEXTURE4 = 20 , WINED3D_TS_TEXTURE5 = 21 ,
  WINED3D_TS_TEXTURE6 = 22 , WINED3D_TS_TEXTURE7 = 23 , WINED3D_TS_WORLD = 256 , WINED3D_TS_WORLD1 = 257 ,
  WINED3D_TS_WORLD2 = 258 , WINED3D_TS_WORLD3 = 259
}
 
enum  wined3d_basis_type { WINED3D_BASIS_BEZIER = 0 , WINED3D_BASIS_BSPLINE = 1 , WINED3D_BASIS_INTERPOLATE = 2 }
 
enum  wined3d_cubemap_face {
  WINED3D_CUBEMAP_FACE_POSITIVE_X = 0 , WINED3D_CUBEMAP_FACE_NEGATIVE_X = 1 , WINED3D_CUBEMAP_FACE_POSITIVE_Y = 2 , WINED3D_CUBEMAP_FACE_NEGATIVE_Y = 3 ,
  WINED3D_CUBEMAP_FACE_POSITIVE_Z = 4 , WINED3D_CUBEMAP_FACE_NEGATIVE_Z = 5
}
 
enum  wined3d_texture_filter_type {
  WINED3D_TEXF_NONE = 0 , WINED3D_TEXF_POINT = 1 , WINED3D_TEXF_LINEAR = 2 , WINED3D_TEXF_ANISOTROPIC = 3 ,
  WINED3D_TEXF_FLAT_CUBIC = 4 , WINED3D_TEXF_GAUSSIAN_CUBIC = 5 , WINED3D_TEXF_PYRAMIDAL_QUAD = 6 , WINED3D_TEXF_GAUSSIAN_QUAD = 7
}
 
enum  wined3d_resource_type {
  WINED3D_RTYPE_NONE = 0 , WINED3D_RTYPE_BUFFER = 1 , WINED3D_RTYPE_TEXTURE_1D = 2 , WINED3D_RTYPE_TEXTURE_2D = 3 ,
  WINED3D_RTYPE_TEXTURE_3D = 4
}
 
enum  wined3d_query_type {
  WINED3D_QUERY_TYPE_VCACHE = 4 , WINED3D_QUERY_TYPE_RESOURCE_MANAGER = 5 , WINED3D_QUERY_TYPE_VERTEX_STATS = 6 , WINED3D_QUERY_TYPE_EVENT = 8 ,
  WINED3D_QUERY_TYPE_OCCLUSION = 9 , WINED3D_QUERY_TYPE_TIMESTAMP = 10 , WINED3D_QUERY_TYPE_TIMESTAMP_DISJOINT = 11 , WINED3D_QUERY_TYPE_TIMESTAMP_FREQ = 12 ,
  WINED3D_QUERY_TYPE_PIPELINE_TIMINGS = 13 , WINED3D_QUERY_TYPE_INTERFACE_TIMINGS = 14 , WINED3D_QUERY_TYPE_VERTEX_TIMINGS = 15 , WINED3D_QUERY_TYPE_PIXEL_TIMINGS = 16 ,
  WINED3D_QUERY_TYPE_BANDWIDTH_TIMINGS = 17 , WINED3D_QUERY_TYPE_CACHE_UTILIZATION = 18 , WINED3D_QUERY_TYPE_MEMORY_PRESSURE = 19 , WINED3D_QUERY_TYPE_PIPELINE_STATISTICS = 20 ,
  WINED3D_QUERY_TYPE_SO_STATISTICS = 21 , WINED3D_QUERY_TYPE_SO_OVERFLOW = 22 , WINED3D_QUERY_TYPE_SO_STATISTICS_STREAM0 = 23 , WINED3D_QUERY_TYPE_SO_STATISTICS_STREAM1 = 24 ,
  WINED3D_QUERY_TYPE_SO_STATISTICS_STREAM2 = 25 , WINED3D_QUERY_TYPE_SO_STATISTICS_STREAM3 = 26 , WINED3D_QUERY_TYPE_SO_OVERFLOW_STREAM0 = 27 , WINED3D_QUERY_TYPE_SO_OVERFLOW_STREAM1 = 28 ,
  WINED3D_QUERY_TYPE_SO_OVERFLOW_STREAM2 = 29 , WINED3D_QUERY_TYPE_SO_OVERFLOW_STREAM3 = 30
}
 
enum  wined3d_stateblock_type {
  WINED3D_SBT_ALL = 1 , WINED3D_SBT_PIXEL_STATE = 2 , WINED3D_SBT_VERTEX_STATE = 3 , WINED3D_SBT_RECORDED = 4 ,
  WINED3D_SBT_PRIMARY = 5
}
 
enum  wined3d_decl_method {
  WINED3D_DECL_METHOD_DEFAULT = 0 , WINED3D_DECL_METHOD_PARTIAL_U = 1 , WINED3D_DECL_METHOD_PARTIAL_V = 2 , WINED3D_DECL_METHOD_CROSS_UV = 3 ,
  WINED3D_DECL_METHOD_UV = 4 , WINED3D_DECL_METHOD_LOOKUP = 5 , WINED3D_DECL_METHOD_LOOKUP_PRESAMPLED = 6
}
 
enum  wined3d_decl_usage {
  WINED3D_DECL_USAGE_POSITION = 0 , WINED3D_DECL_USAGE_BLEND_WEIGHT = 1 , WINED3D_DECL_USAGE_BLEND_INDICES = 2 , WINED3D_DECL_USAGE_NORMAL = 3 ,
  WINED3D_DECL_USAGE_PSIZE = 4 , WINED3D_DECL_USAGE_TEXCOORD = 5 , WINED3D_DECL_USAGE_TANGENT = 6 , WINED3D_DECL_USAGE_BINORMAL = 7 ,
  WINED3D_DECL_USAGE_TESS_FACTOR = 8 , WINED3D_DECL_USAGE_POSITIONT = 9 , WINED3D_DECL_USAGE_COLOR = 10 , WINED3D_DECL_USAGE_FOG = 11 ,
  WINED3D_DECL_USAGE_DEPTH = 12 , WINED3D_DECL_USAGE_SAMPLE = 13
}
 
enum  wined3d_scanline_ordering { WINED3D_SCANLINE_ORDERING_UNKNOWN = 0 , WINED3D_SCANLINE_ORDERING_PROGRESSIVE = 1 , WINED3D_SCANLINE_ORDERING_INTERLACED = 2 }
 
enum  wined3d_display_rotation {
  WINED3D_DISPLAY_ROTATION_UNSPECIFIED = 0 , WINED3D_DISPLAY_ROTATION_0 = 1 , WINED3D_DISPLAY_ROTATION_90 = 2 , WINED3D_DISPLAY_ROTATION_180 = 3 ,
  WINED3D_DISPLAY_ROTATION_270 = 4
}
 
enum  wined3d_shader_type {
  WINED3D_SHADER_TYPE_PIXEL , WINED3D_SHADER_TYPE_VERTEX , WINED3D_SHADER_TYPE_GEOMETRY , WINED3D_SHADER_TYPE_HULL ,
  WINED3D_SHADER_TYPE_DOMAIN , WINED3D_SHADER_TYPE_GRAPHICS_COUNT , WINED3D_SHADER_TYPE_COMPUTE = WINED3D_SHADER_TYPE_GRAPHICS_COUNT , WINED3D_SHADER_TYPE_COUNT ,
  WINED3D_SHADER_TYPE_INVALID = WINED3D_SHADER_TYPE_COUNT
}
 
enum  wined3d_pipeline { WINED3D_PIPELINE_GRAPHICS , WINED3D_PIPELINE_COMPUTE , WINED3D_PIPELINE_COUNT }
 
enum  wined3d_memory_segment_group { WINED3D_MEMORY_SEGMENT_GROUP_LOCAL = 0 , WINED3D_MEMORY_SEGMENT_GROUP_NON_LOCAL = 1 }
 
enum  wined3d_input_classification { WINED3D_INPUT_PER_VERTEX_DATA , WINED3D_INPUT_PER_INSTANCE_DATA }
 

Functions

void __stdcall wined3d_mutex_lock (void)
 
void __stdcall wined3d_mutex_unlock (void)
 
unsigned int __cdecl wined3d_calculate_format_pitch (const struct wined3d_adapter *adapter, enum wined3d_format_id format_id, unsigned int width)
 
HRESULT __cdecl wined3d_check_depth_stencil_match (const struct wined3d_adapter *adapter, enum wined3d_device_type device_type, enum wined3d_format_id adapter_format_id, enum wined3d_format_id render_target_format_id, enum wined3d_format_id depth_stencil_format_id)
 
HRESULT __cdecl wined3d_check_device_format (const struct wined3d *wined3d, const struct wined3d_adapter *adapter, enum wined3d_device_type device_type, enum wined3d_format_id adapter_format_id, uint32_t usage, unsigned int bind_flags, enum wined3d_resource_type resource_type, enum wined3d_format_id check_format_id)
 
HRESULT __cdecl wined3d_check_device_format_conversion (const struct wined3d_output *output, enum wined3d_device_type device_type, enum wined3d_format_id source_format_id, enum wined3d_format_id target_format_id)
 
HRESULT __cdecl wined3d_check_device_multisample_type (const struct wined3d_adapter *adapter, enum wined3d_device_type device_type, enum wined3d_format_id surface_format_id, BOOL windowed, enum wined3d_multisample_type multisample_type, unsigned int *quality_levels)
 
HRESULT __cdecl wined3d_check_device_type (const struct wined3d *wined3d, struct wined3d_output *output, enum wined3d_device_type device_type, enum wined3d_format_id display_format_id, enum wined3d_format_id backbuffer_format_id, BOOL windowed)
 
struct wined3d *__cdecl wined3d_create (uint32_t flags)
 
ULONG __cdecl wined3d_decref (struct wined3d *wined3d)
 
struct wined3d_adapter *__cdecl wined3d_get_adapter (const struct wined3d *wined3d, unsigned int idx)
 
UINT __cdecl wined3d_get_adapter_count (const struct wined3d *wined3d)
 
HRESULT __cdecl wined3d_get_device_caps (const struct wined3d_adapter *adapter, enum wined3d_device_type device_type, struct wined3d_caps *caps)
 
enum wined3d_renderer __cdecl wined3d_get_renderer (void)
 
ULONG __cdecl wined3d_incref (struct wined3d *wined3d)
 
HRESULT __cdecl wined3d_register_software_device (struct wined3d *wined3d, void *init_function)
 
BOOL __cdecl wined3d_register_window (struct wined3d *wined3d, HWND window, struct wined3d_device *device, unsigned int flags)
 
HRESULT __cdecl wined3d_restore_display_modes (struct wined3d *wined3d)
 
void __cdecl wined3d_unregister_windows (struct wined3d *wined3d)
 
HRESULT __cdecl wined3d_adapter_get_identifier (const struct wined3d_adapter *adapter, uint32_t flags, struct wined3d_adapter_identifier *identifier)
 
struct wined3d_output *__cdecl wined3d_adapter_get_output (const struct wined3d_adapter *adapter, unsigned int idx)
 
unsigned int __cdecl wined3d_adapter_get_output_count (const struct wined3d_adapter *adapter)
 
HRESULT __cdecl wined3d_adapter_get_video_memory_info (const struct wined3d_adapter *adapter, unsigned int node_idx, enum wined3d_memory_segment_group group, struct wined3d_video_memory_info *info)
 
HRESULT __cdecl wined3d_adapter_register_budget_change_notification (const struct wined3d_adapter *adapter, HANDLE event, DWORD *cookie)
 
HRESULT __cdecl wined3d_adapter_unregister_budget_change_notification (DWORD cookie)
 
HRESULT __cdecl wined3d_buffer_create (struct wined3d_device *device, const struct wined3d_buffer_desc *desc, const struct wined3d_sub_resource_data *data, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_buffer **buffer)
 
ULONG __cdecl wined3d_buffer_decref (struct wined3d_buffer *buffer)
 
void *__cdecl wined3d_buffer_get_parent (const struct wined3d_buffer *buffer)
 
struct wined3d_resource *__cdecl wined3d_buffer_get_resource (struct wined3d_buffer *buffer)
 
ULONG __cdecl wined3d_buffer_incref (struct wined3d_buffer *buffer)
 
ULONG __cdecl wined3d_command_list_decref (struct wined3d_command_list *list)
 
ULONG __cdecl wined3d_command_list_incref (struct wined3d_command_list *list)
 
HRESULT __cdecl wined3d_deferred_context_create (struct wined3d_device *device, struct wined3d_device_context **context)
 
void __cdecl wined3d_deferred_context_destroy (struct wined3d_device_context *context)
 
HRESULT __cdecl wined3d_deferred_context_record_command_list (struct wined3d_device_context *context, bool restore, struct wined3d_command_list **list)
 
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)
 
ULONG __cdecl wined3d_depth_stencil_state_decref (struct wined3d_depth_stencil_state *state)
 
void *__cdecl wined3d_depth_stencil_state_get_parent (const struct wined3d_depth_stencil_state *state)
 
ULONG __cdecl wined3d_depth_stencil_state_incref (struct wined3d_depth_stencil_state *state)
 
HRESULT __cdecl wined3d_device_acquire_focus_window (struct wined3d_device *device, HWND window)
 
void __cdecl wined3d_device_apply_stateblock (struct wined3d_device *device, struct wined3d_stateblock *stateblock)
 
void __cdecl wined3d_stateblock_primary_dirtify_all_states (struct wined3d_device *device, struct wined3d_stateblock *stateblock)
 
HRESULT __cdecl wined3d_device_begin_scene (struct wined3d_device *device)
 
HRESULT __cdecl wined3d_device_clear (struct wined3d_device *device, unsigned int rect_count, const RECT *rects, uint32_t flags, const struct wined3d_color *color, float z, unsigned int stencil)
 
HRESULT __cdecl wined3d_device_create (struct wined3d *wined3d, struct wined3d_adapter *adapter, enum wined3d_device_type device_type, HWND focus_window, unsigned int behaviour_flags, BYTE surface_alignment, const enum wined3d_feature_level *feature_levels, unsigned int feature_level_count, struct wined3d_device_parent *device_parent, struct wined3d_device **device)
 
ULONG __cdecl wined3d_device_decref (struct wined3d_device *device)
 
HRESULT __cdecl wined3d_device_end_scene (struct wined3d_device *device)
 
void __cdecl wined3d_device_evict_managed_resources (struct wined3d_device *device)
 
UINT __cdecl wined3d_device_get_available_texture_mem (const struct wined3d_device *device)
 
HRESULT __cdecl wined3d_device_get_clip_status (const struct wined3d_device *device, struct wined3d_clip_status *clip_status)
 
void __cdecl wined3d_device_get_creation_parameters (const struct wined3d_device *device, struct wined3d_device_creation_parameters *creation_parameters)
 
HRESULT __cdecl wined3d_device_get_device_caps (const struct wined3d_device *device, struct wined3d_caps *caps)
 
HRESULT __cdecl wined3d_device_get_display_mode (const struct wined3d_device *device, UINT swapchain_idx, struct wined3d_display_mode *mode, enum wined3d_display_rotation *rotation)
 
void __cdecl wined3d_device_get_gamma_ramp (const struct wined3d_device *device, UINT swapchain_idx, struct wined3d_gamma_ramp *ramp)
 
struct wined3d_device_context *__cdecl wined3d_device_get_immediate_context (struct wined3d_device *device)
 
unsigned int __cdecl wined3d_device_get_max_frame_latency (const struct wined3d_device *device)
 
float __cdecl wined3d_device_get_npatch_mode (const struct wined3d_device *device)
 
HRESULT __cdecl wined3d_device_get_raster_status (const struct wined3d_device *device, UINT swapchain_idx, struct wined3d_raster_status *raster_status)
 
BOOL __cdecl wined3d_device_get_software_vertex_processing (const struct wined3d_device *device)
 
struct wined3d_state *__cdecl wined3d_device_get_state (struct wined3d_device *device)
 
struct wined3d_swapchain *__cdecl wined3d_device_get_swapchain (const struct wined3d_device *device, UINT swapchain_idx)
 
UINT __cdecl wined3d_device_get_swapchain_count (const struct wined3d_device *device)
 
struct wined3d *__cdecl wined3d_device_get_wined3d (const struct wined3d_device *device)
 
ULONG __cdecl wined3d_device_incref (struct wined3d_device *device)
 
HRESULT __cdecl wined3d_device_process_vertices (struct wined3d_device *device, struct wined3d_stateblock *stateblock, UINT src_start_idx, UINT dst_idx, UINT vertex_count, struct wined3d_buffer *dst_buffer, const struct wined3d_vertex_declaration *declaration, uint32_t flags, uint32_t dst_fvf)
 
void __cdecl wined3d_device_release_focus_window (struct wined3d_device *device)
 
HRESULT __cdecl wined3d_device_reset (struct wined3d_device *device, const struct wined3d_swapchain_desc *swapchain_desc, const struct wined3d_display_mode *mode, wined3d_device_reset_cb callback, BOOL reset_state)
 
HRESULT __cdecl wined3d_device_set_clip_status (struct wined3d_device *device, const struct wined3d_clip_status *clip_status)
 
void __cdecl wined3d_device_set_cursor_position (struct wined3d_device *device, int x_screen_space, int y_screen_space, uint32_t flags)
 
HRESULT __cdecl wined3d_device_set_cursor_properties (struct wined3d_device *device, UINT x_hotspot, UINT y_hotspot, struct wined3d_texture *texture, unsigned int sub_resource_idx)
 
HRESULT __cdecl wined3d_device_set_dialog_box_mode (struct wined3d_device *device, BOOL enable_dialogs)
 
void __cdecl wined3d_device_set_gamma_ramp (const struct wined3d_device *device, UINT swapchain_idx, uint32_t flags, const struct wined3d_gamma_ramp *ramp)
 
void __cdecl wined3d_device_set_max_frame_latency (struct wined3d_device *device, unsigned int max_frame_latency)
 
void __cdecl wined3d_device_set_multithreaded (struct wined3d_device *device)
 
HRESULT __cdecl wined3d_device_set_npatch_mode (struct wined3d_device *device, float segments)
 
void __cdecl wined3d_device_set_software_vertex_processing (struct wined3d_device *device, BOOL software)
 
BOOL __cdecl wined3d_device_show_cursor (struct wined3d_device *device, BOOL show)
 
HRESULT __cdecl wined3d_device_update_texture (struct wined3d_device *device, struct wined3d_texture *src_texture, struct wined3d_texture *dst_texture)
 
HRESULT __cdecl wined3d_device_validate_device (const struct wined3d_device *device, const struct wined3d_stateblock_state *state, DWORD *num_passes)
 
HRESULT __cdecl wined3d_device_context_blt (struct wined3d_device_context *context, struct wined3d_texture *dst_texture, unsigned int dst_sub_resource_idx, const RECT *dst_rect, struct wined3d_texture *src_texture, unsigned int src_sub_resource_idx, const RECT *src_rect, unsigned int flags, const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter)
 
HRESULT __cdecl wined3d_device_context_clear_sysmem_texture (struct wined3d_device_context *context, struct wined3d_texture *texture, unsigned int sub_resource_idx, const RECT *rect, unsigned int flags, const struct wined3d_color *color)
 
HRESULT __cdecl wined3d_device_context_clear_rendertarget_view (struct wined3d_device_context *context, struct wined3d_rendertarget_view *view, const RECT *rect, unsigned int flags, const struct wined3d_color *color, float depth, unsigned int stencil)
 
void __cdecl wined3d_device_context_clear_uav_float (struct wined3d_device_context *context, struct wined3d_unordered_access_view *view, const struct wined3d_vec4 *clear_value)
 
void __cdecl wined3d_device_context_clear_uav_uint (struct wined3d_device_context *context, struct wined3d_unordered_access_view *view, const struct wined3d_uvec4 *clear_value)
 
void __cdecl wined3d_device_context_copy_resource (struct wined3d_device_context *context, struct wined3d_resource *dst_resource, struct wined3d_resource *src_resource)
 
HRESULT __cdecl wined3d_device_context_copy_sub_resource_region (struct wined3d_device_context *context, struct wined3d_resource *dst_resource, unsigned int dst_sub_resource_idx, unsigned int dst_x, unsigned int dst_y, unsigned int dst_z, struct wined3d_resource *src_resource, unsigned int src_sub_resource_idx, const struct wined3d_box *src_box, unsigned int flags)
 
void __cdecl wined3d_device_context_copy_uav_counter (struct wined3d_device_context *context, struct wined3d_buffer *dst_buffer, unsigned int offset, struct wined3d_unordered_access_view *uav)
 
void __cdecl wined3d_device_context_dispatch (struct wined3d_device_context *context, unsigned int group_count_x, unsigned int group_count_y, unsigned int group_count_z)
 
void __cdecl wined3d_device_context_dispatch_indirect (struct wined3d_device_context *context, struct wined3d_buffer *buffer, unsigned int offset)
 
void __cdecl wined3d_device_context_draw (struct wined3d_device_context *context, unsigned int start_vertex, unsigned int vertex_count, unsigned int start_instance, unsigned int instance_count)
 
void __cdecl wined3d_device_context_draw_indexed (struct wined3d_device_context *context, int base_vertex_index, unsigned int start_index, unsigned int index_count, unsigned int start_instance, unsigned int instance_count)
 
void __cdecl wined3d_device_context_draw_indirect (struct wined3d_device_context *context, struct wined3d_buffer *buffer, unsigned int offset, bool indexed)
 
void __cdecl wined3d_device_context_execute_command_list (struct wined3d_device_context *context, struct wined3d_command_list *list, bool restore_state)
 
void __cdecl wined3d_device_context_flush (struct wined3d_device_context *context)
 
void __cdecl wined3d_device_context_flush_mapped_buffer (struct wined3d_device_context *context, struct wined3d_buffer *buffer)
 
void __cdecl wined3d_device_context_generate_mipmaps (struct wined3d_device_context *context, struct wined3d_shader_resource_view *view)
 
struct wined3d_blend_state *__cdecl wined3d_device_context_get_blend_state (const struct wined3d_device_context *context, struct wined3d_color *blend_factor, unsigned int *sample_mask)
 
void __cdecl wined3d_device_context_get_constant_buffer (const struct wined3d_device_context *context, enum wined3d_shader_type shader_type, unsigned int idx, struct wined3d_constant_buffer_state *state)
 
struct wined3d_depth_stencil_state *__cdecl wined3d_device_context_get_depth_stencil_state (const struct wined3d_device_context *context, unsigned int *stencil_ref)
 
struct wined3d_rendertarget_view *__cdecl wined3d_device_context_get_depth_stencil_view (const struct wined3d_device_context *context)
 
struct wined3d_buffer *__cdecl wined3d_device_context_get_index_buffer (const struct wined3d_device_context *context, enum wined3d_format_id *format, unsigned int *offset)
 
struct wined3d_query *__cdecl wined3d_device_context_get_predication (struct wined3d_device_context *context, BOOL *value)
 
void __cdecl wined3d_device_context_get_primitive_type (const struct wined3d_device_context *context, enum wined3d_primitive_type *primitive_topology, unsigned int *patch_vertex_count)
 
struct wined3d_rasterizer_state *__cdecl wined3d_device_context_get_rasterizer_state (struct wined3d_device_context *context)
 
struct wined3d_rendertarget_view *__cdecl wined3d_device_context_get_rendertarget_view (const struct wined3d_device_context *context, unsigned int view_idx)
 
struct wined3d_sampler *__cdecl wined3d_device_context_get_sampler (const struct wined3d_device_context *context, enum wined3d_shader_type shader_type, unsigned int idx)
 
void __cdecl wined3d_device_context_get_scissor_rects (const struct wined3d_device_context *context, unsigned int *rect_count, RECT *rects)
 
struct wined3d_shader *__cdecl wined3d_device_context_get_shader (const struct wined3d_device_context *context, enum wined3d_shader_type type)
 
struct wined3d_shader_resource_view *__cdecl wined3d_device_context_get_shader_resource_view (const struct wined3d_device_context *context, enum wined3d_shader_type shader_type, unsigned int idx)
 
struct wined3d_buffer *__cdecl wined3d_device_context_get_stream_output (struct wined3d_device_context *context, unsigned int idx, unsigned int *offset)
 
HRESULT __cdecl wined3d_device_context_get_stream_source (const struct wined3d_device_context *context, unsigned int stream_idx, struct wined3d_buffer **buffer, unsigned int *offset, unsigned int *stride)
 
struct wined3d_unordered_access_view *__cdecl wined3d_device_context_get_unordered_access_view (const struct wined3d_device_context *context, enum wined3d_pipeline pipeline, unsigned int idx)
 
struct wined3d_vertex_declaration *__cdecl wined3d_device_context_get_vertex_declaration (const struct wined3d_device_context *device)
 
void __cdecl wined3d_device_context_get_viewports (const struct wined3d_device_context *context, unsigned int *viewport_count, struct wined3d_viewport *viewports)
 
void __cdecl wined3d_device_context_issue_query (struct wined3d_device_context *context, struct wined3d_query *query, unsigned int flags)
 
HRESULT __cdecl wined3d_device_context_map (struct wined3d_device_context *context, struct wined3d_resource *resource, unsigned int sub_resource_idx, struct wined3d_map_desc *map_desc, const struct wined3d_box *box, unsigned int flags)
 
void __cdecl wined3d_device_context_reset_state (struct wined3d_device_context *context)
 
void __cdecl wined3d_device_context_resolve_sub_resource (struct wined3d_device_context *context, struct wined3d_resource *dst_resource, unsigned int dst_sub_resource_idx, struct wined3d_resource *src_resource, unsigned int src_sub_resource_idx, enum wined3d_format_id format_id)
 
void __cdecl wined3d_device_context_set_blend_state (struct wined3d_device_context *context, struct wined3d_blend_state *state, const struct wined3d_color *blend_factor, unsigned int sample_mask)
 
void __cdecl wined3d_device_context_set_constant_buffers (struct wined3d_device_context *context, enum wined3d_shader_type type, unsigned int start_idx, unsigned int count, const struct wined3d_constant_buffer_state *buffers)
 
void __cdecl wined3d_device_context_set_depth_stencil_state (struct wined3d_device_context *context, struct wined3d_depth_stencil_state *depth_stencil_state, unsigned int stencil_ref)
 
HRESULT __cdecl wined3d_device_context_set_depth_stencil_view (struct wined3d_device_context *context, struct wined3d_rendertarget_view *view)
 
void __cdecl wined3d_device_context_set_index_buffer (struct wined3d_device_context *context, struct wined3d_buffer *buffer, enum wined3d_format_id format_id, unsigned int offset)
 
void __cdecl wined3d_device_context_set_predication (struct wined3d_device_context *context, struct wined3d_query *predicate, BOOL value)
 
void __cdecl wined3d_device_context_set_primitive_type (struct wined3d_device_context *context, enum wined3d_primitive_type primitive_topology, unsigned int patch_vertex_count)
 
void __cdecl wined3d_device_context_set_rasterizer_state (struct wined3d_device_context *context, struct wined3d_rasterizer_state *rasterizer_state)
 
HRESULT __cdecl wined3d_device_context_set_rendertarget_views (struct wined3d_device_context *context, unsigned int start_idx, unsigned int count, struct wined3d_rendertarget_view *const *views, BOOL set_viewport)
 
void __cdecl wined3d_device_context_set_samplers (struct wined3d_device_context *context, enum wined3d_shader_type type, unsigned int start_idx, unsigned int count, struct wined3d_sampler *const *samplers)
 
void __cdecl wined3d_device_context_set_scissor_rects (struct wined3d_device_context *context, unsigned int rect_count, const RECT *rects)
 
void __cdecl wined3d_device_context_set_shader (struct wined3d_device_context *context, enum wined3d_shader_type type, struct wined3d_shader *shader)
 
void __cdecl wined3d_device_context_set_shader_resource_views (struct wined3d_device_context *context, enum wined3d_shader_type type, unsigned int start_idx, unsigned int count, struct wined3d_shader_resource_view *const *views)
 
void __cdecl wined3d_device_context_set_state (struct wined3d_device_context *context, struct wined3d_state *state)
 
void __cdecl wined3d_device_context_set_stream_outputs (struct wined3d_device_context *context, const struct wined3d_stream_output outputs[WINED3D_MAX_STREAM_OUTPUT_BUFFERS])
 
HRESULT __cdecl wined3d_device_context_set_stream_sources (struct wined3d_device_context *context, unsigned int start_idx, unsigned int count, const struct wined3d_stream_state *streams)
 
void __cdecl wined3d_device_context_set_unordered_access_views (struct wined3d_device_context *context, enum wined3d_pipeline pipeline, unsigned int start_idx, unsigned int count, struct wined3d_unordered_access_view *const *uavs, const unsigned int *initial_counts)
 
void __cdecl wined3d_device_context_set_render_targets_and_unordered_access_views (struct wined3d_device_context *context, unsigned int rtv_count, struct wined3d_rendertarget_view *const *render_target_views, struct wined3d_rendertarget_view *depth_stencil_view, UINT uav_count, struct wined3d_unordered_access_view *const *unordered_access_views, const unsigned int *initial_counts)
 
void __cdecl wined3d_device_context_set_vertex_declaration (struct wined3d_device_context *context, struct wined3d_vertex_declaration *declaration)
 
void __cdecl wined3d_device_context_set_viewports (struct wined3d_device_context *context, unsigned int viewport_count, const struct wined3d_viewport *viewports)
 
HRESULT __cdecl wined3d_device_context_unmap (struct wined3d_device_context *context, struct wined3d_resource *resource, unsigned int sub_resource_idx)
 
void __cdecl wined3d_device_context_update_sub_resource (struct wined3d_device_context *context, struct wined3d_resource *resource, unsigned int sub_resource_idx, const struct wined3d_box *box, const void *data, unsigned int row_pitch, unsigned int depth_pitch, unsigned int flags)
 
HRESULT __cdecl wined3d_output_find_closest_matching_mode (struct wined3d_output *output, struct wined3d_display_mode *mode)
 
struct wined3d_adapter *__cdecl wined3d_output_get_adapter (const struct wined3d_output *output)
 
HRESULT __cdecl wined3d_output_get_desc (const struct wined3d_output *output, struct wined3d_output_desc *desc)
 
HRESULT __cdecl wined3d_output_get_display_mode (const struct wined3d_output *output, struct wined3d_display_mode *mode, enum wined3d_display_rotation *rotation)
 
HRESULT __cdecl wined3d_output_get_mode (struct wined3d_output *output, enum wined3d_format_id format_id, enum wined3d_scanline_ordering scanline_ordering, unsigned int mode_idx, struct wined3d_display_mode *mode, bool cached)
 
unsigned int __cdecl wined3d_output_get_mode_count (struct wined3d_output *output, enum wined3d_format_id format_id, enum wined3d_scanline_ordering scanline_ordering, bool cached)
 
HRESULT __cdecl wined3d_output_get_raster_status (const struct wined3d_output *output, struct wined3d_raster_status *raster_status)
 
void __cdecl wined3d_output_release_ownership (const struct wined3d_output *output)
 
HRESULT __cdecl wined3d_output_set_display_mode (struct wined3d_output *output, const struct wined3d_display_mode *mode)
 
HRESULT __cdecl wined3d_output_set_gamma_ramp (struct wined3d_output *output, const struct wined3d_gamma_ramp *ramp)
 
HRESULT __cdecl wined3d_output_take_ownership (const struct wined3d_output *output, BOOL exclusive)
 
HRESULT __cdecl wined3d_palette_create (struct wined3d_device *device, uint32_t flags, unsigned int entry_count, const PALETTEENTRY *entries, struct wined3d_palette **palette)
 
ULONG __cdecl wined3d_palette_decref (struct wined3d_palette *palette)
 
HRESULT __cdecl wined3d_palette_get_entries (const struct wined3d_palette *palette, uint32_t flags, unsigned int start, unsigned int count, PALETTEENTRY *entries)
 
void __cdecl wined3d_palette_apply_to_dc (const struct wined3d_palette *palette, HDC dc)
 
ULONG __cdecl wined3d_palette_incref (struct wined3d_palette *palette)
 
HRESULT __cdecl wined3d_palette_set_entries (struct wined3d_palette *palette, uint32_t flags, unsigned int start, unsigned int count, const PALETTEENTRY *entries)
 
HRESULT __cdecl wined3d_query_create (struct wined3d_device *device, enum wined3d_query_type type, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_query **query)
 
ULONG __cdecl wined3d_query_decref (struct wined3d_query *query)
 
HRESULT __cdecl wined3d_query_get_data (struct wined3d_query *query, void *data, UINT data_size, uint32_t flags)
 
UINT __cdecl wined3d_query_get_data_size (const struct wined3d_query *query)
 
void *__cdecl wined3d_query_get_parent (const struct wined3d_query *query)
 
enum wined3d_query_type __cdecl wined3d_query_get_type (const struct wined3d_query *query)
 
ULONG __cdecl wined3d_query_incref (struct wined3d_query *query)
 
HRESULT __cdecl wined3d_query_issue (struct wined3d_query *query, uint32_t flags)
 
static void wined3d_private_store_init (struct wined3d_private_store *store)
 
static struct wined3d_private_data * wined3d_private_store_get_private_data (const struct wined3d_private_store *store, const GUID *tag)
 
static void wined3d_private_store_free_private_data (struct wined3d_private_store *store, struct wined3d_private_data *entry)
 
static void wined3d_private_store_cleanup (struct wined3d_private_store *store)
 
static HRESULT wined3d_private_store_set_private_data (struct wined3d_private_store *store, const GUID *guid, const void *data, DWORD data_size, uint32_t flags)
 
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)
 
ULONG __cdecl wined3d_blend_state_decref (struct wined3d_blend_state *state)
 
void *__cdecl wined3d_blend_state_get_parent (const struct wined3d_blend_state *state)
 
ULONG __cdecl wined3d_blend_state_incref (struct wined3d_blend_state *state)
 
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)
 
ULONG __cdecl wined3d_rasterizer_state_decref (struct wined3d_rasterizer_state *state)
 
void *__cdecl wined3d_rasterizer_state_get_parent (const struct wined3d_rasterizer_state *state)
 
ULONG __cdecl wined3d_rasterizer_state_incref (struct wined3d_rasterizer_state *state)
 
void __cdecl wined3d_resource_get_desc (const struct wined3d_resource *resource, struct wined3d_resource_desc *desc)
 
void *__cdecl wined3d_resource_get_parent (const struct wined3d_resource *resource)
 
unsigned int __cdecl wined3d_resource_get_priority (const struct wined3d_resource *resource)
 
HRESULT __cdecl wined3d_resource_map (struct wined3d_resource *resource, unsigned int sub_resource_idx, struct wined3d_map_desc *map_desc, const struct wined3d_box *box, uint32_t flags)
 
void __cdecl wined3d_resource_preload (struct wined3d_resource *resource)
 
void __cdecl wined3d_resource_set_parent (struct wined3d_resource *resource, void *parent, const struct wined3d_parent_ops *parent_ops)
 
unsigned int __cdecl wined3d_resource_set_priority (struct wined3d_resource *resource, unsigned int priority)
 
HRESULT __cdecl wined3d_resource_unmap (struct wined3d_resource *resource, unsigned int sub_resource_idx)
 
HRESULT __cdecl wined3d_rendertarget_view_create (const struct wined3d_view_desc *desc, struct wined3d_resource *resource, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_rendertarget_view **view)
 
HRESULT __cdecl wined3d_rendertarget_view_create_from_sub_resource (struct wined3d_texture *texture, unsigned int sub_resource_idx, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_rendertarget_view **view)
 
ULONG __cdecl wined3d_rendertarget_view_decref (struct wined3d_rendertarget_view *view)
 
void *__cdecl wined3d_rendertarget_view_get_parent (const struct wined3d_rendertarget_view *view)
 
struct wined3d_resource *__cdecl wined3d_rendertarget_view_get_resource (const struct wined3d_rendertarget_view *view)
 
void *__cdecl wined3d_rendertarget_view_get_sub_resource_parent (const struct wined3d_rendertarget_view *view)
 
ULONG __cdecl wined3d_rendertarget_view_incref (struct wined3d_rendertarget_view *view)
 
void __cdecl wined3d_rendertarget_view_set_parent (struct wined3d_rendertarget_view *view, void *parent, const struct wined3d_parent_ops *parent_ops)
 
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)
 
ULONG __cdecl wined3d_sampler_decref (struct wined3d_sampler *sampler)
 
void *__cdecl wined3d_sampler_get_parent (const struct wined3d_sampler *sampler)
 
ULONG __cdecl wined3d_sampler_incref (struct wined3d_sampler *sampler)
 
HRESULT __cdecl wined3d_shader_create_cs (struct wined3d_device *device, const struct wined3d_shader_desc *desc, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_shader **shader)
 
HRESULT __cdecl wined3d_shader_create_ds (struct wined3d_device *device, const struct wined3d_shader_desc *desc, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_shader **shader)
 
HRESULT __cdecl wined3d_shader_create_gs (struct wined3d_device *device, const struct wined3d_shader_desc *desc, const struct wined3d_stream_output_desc *so_desc, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_shader **shader)
 
HRESULT __cdecl wined3d_shader_create_hs (struct wined3d_device *device, const struct wined3d_shader_desc *desc, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_shader **shader)
 
HRESULT __cdecl wined3d_shader_create_ps (struct wined3d_device *device, const struct wined3d_shader_desc *desc, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_shader **shader)
 
HRESULT __cdecl wined3d_shader_create_vs (struct wined3d_device *device, const struct wined3d_shader_desc *desc, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_shader **shader)
 
ULONG __cdecl wined3d_shader_decref (struct wined3d_shader *shader)
 
HRESULT __cdecl wined3d_shader_get_byte_code (const struct wined3d_shader *shader, void *byte_code, UINT *byte_code_size)
 
void *__cdecl wined3d_shader_get_parent (const struct wined3d_shader *shader)
 
ULONG __cdecl wined3d_shader_incref (struct wined3d_shader *shader)
 
HRESULT __cdecl wined3d_shader_set_local_constants_float (struct wined3d_shader *shader, UINT start_idx, const float *src_data, UINT vector4f_count)
 
HRESULT __cdecl wined3d_shader_resource_view_create (const struct wined3d_view_desc *desc, struct wined3d_resource *resource, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_shader_resource_view **view)
 
ULONG __cdecl wined3d_shader_resource_view_decref (struct wined3d_shader_resource_view *view)
 
void *__cdecl wined3d_shader_resource_view_get_parent (const struct wined3d_shader_resource_view *view)
 
ULONG __cdecl wined3d_shader_resource_view_incref (struct wined3d_shader_resource_view *view)
 
HRESULT __cdecl wined3d_state_create (struct wined3d_device *device, const enum wined3d_feature_level *levels, unsigned int level_count, struct wined3d_state **state)
 
void __cdecl wined3d_state_destroy (struct wined3d_state *state)
 
enum wined3d_feature_level __cdecl wined3d_state_get_feature_level (const struct wined3d_state *state)
 
void __cdecl wined3d_stateblock_apply (const struct wined3d_stateblock *stateblock, struct wined3d_stateblock *device_state)
 
void __cdecl wined3d_stateblock_apply_clear_state (struct wined3d_stateblock *stateblock, struct wined3d_device *device)
 
void __cdecl wined3d_stateblock_capture (struct wined3d_stateblock *stateblock, const struct wined3d_stateblock *device_state)
 
HRESULT __cdecl wined3d_stateblock_create (struct wined3d_device *device, const struct wined3d_stateblock *device_state, enum wined3d_stateblock_type type, struct wined3d_stateblock **stateblock)
 
ULONG __cdecl wined3d_stateblock_decref (struct wined3d_stateblock *stateblock)
 
void __cdecl wined3d_stateblock_depth_buffer_changed (struct wined3d_stateblock *stateblock)
 
HRESULT __cdecl wined3d_stateblock_get_light (const struct wined3d_stateblock *stateblock, UINT light_idx, struct wined3d_light *light, BOOL *enabled)
 
HRESULT __cdecl wined3d_stateblock_get_ps_consts_b (struct wined3d_stateblock *stateblock, unsigned int start_idx, unsigned int count, BOOL *constants)
 
HRESULT __cdecl wined3d_stateblock_get_ps_consts_f (struct wined3d_stateblock *stateblock, unsigned int start_idx, unsigned int count, struct wined3d_vec4 *constants)
 
HRESULT __cdecl wined3d_stateblock_get_ps_consts_i (struct wined3d_stateblock *stateblock, unsigned int start_idx, unsigned int count, struct wined3d_ivec4 *constants)
 
const struct wined3d_stateblock_state *__cdecl wined3d_stateblock_get_state (const struct wined3d_stateblock *stateblock)
 
HRESULT __cdecl wined3d_stateblock_get_vs_consts_b (struct wined3d_stateblock *stateblock, unsigned int start_idx, unsigned int count, BOOL *constants)
 
HRESULT __cdecl wined3d_stateblock_get_vs_consts_f (struct wined3d_stateblock *stateblock, unsigned int start_idx, unsigned int count, struct wined3d_vec4 *constants)
 
HRESULT __cdecl wined3d_stateblock_get_vs_consts_i (struct wined3d_stateblock *stateblock, unsigned int start_idx, unsigned int count, struct wined3d_ivec4 *constants)
 
ULONG __cdecl wined3d_stateblock_incref (struct wined3d_stateblock *stateblock)
 
void __cdecl wined3d_stateblock_init_contained_states (struct wined3d_stateblock *stateblock)
 
void __cdecl wined3d_stateblock_multiply_transform (struct wined3d_stateblock *stateblock, enum wined3d_transform_state state, const struct wined3d_matrix *matrix)
 
void __cdecl wined3d_stateblock_reset (struct wined3d_stateblock *stateblock)
 
void __cdecl wined3d_stateblock_set_base_vertex_index (struct wined3d_stateblock *stateblock, INT base_index)
 
HRESULT __cdecl wined3d_stateblock_set_clip_plane (struct wined3d_stateblock *stateblock, UINT plane_idx, const struct wined3d_vec4 *plane)
 
void __cdecl wined3d_stateblock_set_index_buffer (struct wined3d_stateblock *stateblock, struct wined3d_buffer *index_buffer, enum wined3d_format_id format_id)
 
HRESULT __cdecl wined3d_stateblock_set_light (struct wined3d_stateblock *stateblock, UINT light_idx, const struct wined3d_light *light)
 
HRESULT __cdecl wined3d_stateblock_set_light_enable (struct wined3d_stateblock *stateblock, UINT light_idx, BOOL enable)
 
void __cdecl wined3d_stateblock_set_material (struct wined3d_stateblock *stateblock, const struct wined3d_material *material)
 
void __cdecl wined3d_stateblock_set_pixel_shader (struct wined3d_stateblock *stateblock, struct wined3d_shader *shader)
 
HRESULT __cdecl wined3d_stateblock_set_ps_consts_b (struct wined3d_stateblock *stateblock, unsigned int start_idx, unsigned int count, const BOOL *constants)
 
HRESULT __cdecl wined3d_stateblock_set_ps_consts_f (struct wined3d_stateblock *stateblock, unsigned int start_idx, unsigned int count, const struct wined3d_vec4 *constants)
 
HRESULT __cdecl wined3d_stateblock_set_ps_consts_i (struct wined3d_stateblock *stateblock, unsigned int start_idx, unsigned int count, const struct wined3d_ivec4 *constants)
 
void __cdecl wined3d_stateblock_set_render_state (struct wined3d_stateblock *stateblock, enum wined3d_render_state state, unsigned int value)
 
void __cdecl wined3d_stateblock_set_sampler_state (struct wined3d_stateblock *stateblock, UINT sampler_idx, enum wined3d_sampler_state state, unsigned int value)
 
void __cdecl wined3d_stateblock_set_scissor_rect (struct wined3d_stateblock *stateblock, const RECT *rect)
 
HRESULT __cdecl wined3d_stateblock_set_stream_source (struct wined3d_stateblock *stateblock, UINT stream_idx, struct wined3d_buffer *buffer, UINT offset, UINT stride)
 
HRESULT __cdecl wined3d_stateblock_set_stream_source_freq (struct wined3d_stateblock *stateblock, UINT stream_idx, UINT divider)
 
void __cdecl wined3d_stateblock_set_texture (struct wined3d_stateblock *stateblock, UINT stage, struct wined3d_texture *texture)
 
unsigned int __cdecl wined3d_stateblock_set_texture_lod (struct wined3d_stateblock *stateblock, struct wined3d_texture *texture, unsigned int lod)
 
void __cdecl wined3d_stateblock_set_texture_stage_state (struct wined3d_stateblock *stateblock, UINT stage, enum wined3d_texture_stage_state state, unsigned int value)
 
void __cdecl wined3d_stateblock_set_transform (struct wined3d_stateblock *stateblock, enum wined3d_transform_state state, const struct wined3d_matrix *matrix)
 
void __cdecl wined3d_stateblock_set_vertex_declaration (struct wined3d_stateblock *stateblock, struct wined3d_vertex_declaration *declaration)
 
void __cdecl wined3d_stateblock_set_vertex_shader (struct wined3d_stateblock *stateblock, struct wined3d_shader *shader)
 
void __cdecl wined3d_stateblock_set_viewport (struct wined3d_stateblock *stateblock, const struct wined3d_viewport *viewport)
 
HRESULT __cdecl wined3d_stateblock_set_vs_consts_b (struct wined3d_stateblock *stateblock, unsigned int start_idx, unsigned int count, const BOOL *constants)
 
HRESULT __cdecl wined3d_stateblock_set_vs_consts_f (struct wined3d_stateblock *stateblock, unsigned int start_idx, unsigned int count, const struct wined3d_vec4 *constants)
 
HRESULT __cdecl wined3d_stateblock_set_vs_consts_i (struct wined3d_stateblock *stateblock, unsigned int start_idx, unsigned int count, const struct wined3d_ivec4 *constants)
 
HRESULT __cdecl wined3d_streaming_buffer_map (struct wined3d_device *device, struct wined3d_streaming_buffer *buffer, unsigned int size, unsigned int stride, unsigned int *ret_pos, void **ret_data)
 
void __cdecl wined3d_streaming_buffer_unmap (struct wined3d_streaming_buffer *buffer)
 
HRESULT __cdecl wined3d_streaming_buffer_upload (struct wined3d_device *device, struct wined3d_streaming_buffer *buffer, const void *data, unsigned int size, unsigned int stride, unsigned int *pos)
 
HRESULT __cdecl wined3d_swapchain_create (struct wined3d_device *device, const struct wined3d_swapchain_desc *desc, struct wined3d_swapchain_state_parent *state_parent, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_swapchain **swapchain)
 
ULONG __cdecl wined3d_swapchain_decref (struct wined3d_swapchain *swapchain)
 
struct wined3d_texture *__cdecl wined3d_swapchain_get_back_buffer (const struct wined3d_swapchain *swapchain, UINT backbuffer_idx)
 
struct wined3d_device *__cdecl wined3d_swapchain_get_device (const struct wined3d_swapchain *swapchain)
 
HRESULT __cdecl wined3d_swapchain_get_display_mode (const struct wined3d_swapchain *swapchain, struct wined3d_display_mode *mode, enum wined3d_display_rotation *rotation)
 
struct wined3d_texture *__cdecl wined3d_swapchain_get_front_buffer (const struct wined3d_swapchain *swapchain)
 
HRESULT __cdecl wined3d_swapchain_get_front_buffer_data (const struct wined3d_swapchain *swapchain, struct wined3d_texture *dst_texture, unsigned int sub_resource_idx)
 
HRESULT __cdecl wined3d_swapchain_get_gamma_ramp (const struct wined3d_swapchain *swapchain, struct wined3d_gamma_ramp *ramp)
 
void *__cdecl wined3d_swapchain_get_parent (const struct wined3d_swapchain *swapchain)
 
void __cdecl wined3d_swapchain_get_desc (const struct wined3d_swapchain *swapchain, struct wined3d_swapchain_desc *desc)
 
HRESULT __cdecl wined3d_swapchain_get_raster_status (const struct wined3d_swapchain *swapchain, struct wined3d_raster_status *raster_status)
 
struct wined3d_swapchain_state *__cdecl wined3d_swapchain_get_state (struct wined3d_swapchain *swapchain)
 
ULONG __cdecl wined3d_swapchain_incref (struct wined3d_swapchain *swapchain)
 
HRESULT __cdecl wined3d_swapchain_present (struct wined3d_swapchain *swapchain, const RECT *src_rect, const RECT *dst_rect, HWND dst_window_override, unsigned int swap_interval, uint32_t flags)
 
HRESULT __cdecl wined3d_swapchain_resize_buffers (struct wined3d_swapchain *swapchain, unsigned int buffer_count, unsigned int width, unsigned int height, enum wined3d_format_id format_id, enum wined3d_multisample_type multisample_type, unsigned int multisample_quality)
 
HRESULT __cdecl wined3d_swapchain_set_gamma_ramp (const struct wined3d_swapchain *swapchain, uint32_t flags, const struct wined3d_gamma_ramp *ramp)
 
void __cdecl wined3d_swapchain_set_palette (struct wined3d_swapchain *swapchain, struct wined3d_palette *palette)
 
void __cdecl wined3d_swapchain_set_window (struct wined3d_swapchain *swapchain, HWND window)
 
HRESULT __cdecl wined3d_swapchain_state_create (const struct wined3d_swapchain_desc *desc, HWND window, struct wined3d *wined3d, struct wined3d_swapchain_state_parent *state_parent, struct wined3d_swapchain_state **state)
 
void __cdecl wined3d_swapchain_state_destroy (struct wined3d_swapchain_state *state)
 
void __cdecl wined3d_swapchain_state_get_size (const struct wined3d_swapchain_state *state, unsigned int *width, unsigned int *height)
 
BOOL __cdecl wined3d_swapchain_state_is_windowed (const struct wined3d_swapchain_state *state)
 
HRESULT __cdecl wined3d_swapchain_state_resize_target (struct wined3d_swapchain_state *state, const struct wined3d_display_mode *mode)
 
HRESULT __cdecl wined3d_swapchain_state_set_fullscreen (struct wined3d_swapchain_state *state, const struct wined3d_swapchain_desc *desc, const struct wined3d_display_mode *mode)
 
struct wined3d_shader_resource_view *__cdecl wined3d_texture_acquire_identity_srv (struct wined3d_texture *texture)
 
HRESULT __cdecl wined3d_texture_add_dirty_region (struct wined3d_texture *texture, UINT layer, const struct wined3d_box *dirty_region)
 
HRESULT __cdecl wined3d_texture_create (struct wined3d_device *device, const struct wined3d_resource_desc *desc, UINT layer_count, unsigned int level_count, uint32_t flags, const struct wined3d_sub_resource_data *data, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_texture **texture)
 
struct wined3d_texture *__cdecl wined3d_texture_from_resource (struct wined3d_resource *resource)
 
ULONG __cdecl wined3d_texture_decref (struct wined3d_texture *texture)
 
HRESULT __cdecl wined3d_texture_get_dc (struct wined3d_texture *texture, unsigned int sub_resource_idx, HDC *dc)
 
unsigned int __cdecl wined3d_texture_get_level_count (const struct wined3d_texture *texture)
 
unsigned int __cdecl wined3d_texture_get_lod (const struct wined3d_texture *texture)
 
unsigned int __cdecl wined3d_texture_set_lod (struct wined3d_texture *texture, unsigned int lod)
 
void __cdecl wined3d_stateblock_texture_changed (struct wined3d_stateblock *stateblock, const struct wined3d_texture *texture)
 
HRESULT __cdecl wined3d_texture_get_overlay_position (const struct wined3d_texture *texture, unsigned int sub_resource_idx, LONG *x, LONG *y)
 
void *__cdecl wined3d_texture_get_parent (const struct wined3d_texture *texture)
 
void __cdecl wined3d_texture_get_pitch (const struct wined3d_texture *texture, unsigned int level, unsigned int *row_pitch, unsigned int *slice_pitch)
 
struct wined3d_resource *__cdecl wined3d_texture_get_resource (struct wined3d_texture *texture)
 
HRESULT __cdecl wined3d_texture_get_sub_resource_desc (const struct wined3d_texture *texture, unsigned int sub_resource_idx, struct wined3d_sub_resource_desc *desc)
 
void *__cdecl wined3d_texture_get_sub_resource_parent (struct wined3d_texture *texture, unsigned int sub_resource_idx)
 
struct wined3d_swapchain *__cdecl wined3d_texture_get_swapchain (struct wined3d_texture *texture)
 
ULONG __cdecl wined3d_texture_incref (struct wined3d_texture *texture)
 
HRESULT __cdecl wined3d_texture_release_dc (struct wined3d_texture *texture, unsigned int sub_resource_idx, HDC dc)
 
HRESULT __cdecl wined3d_texture_set_color_key (struct wined3d_texture *texture, uint32_t flags, const struct wined3d_color_key *color_key)
 
HRESULT __cdecl wined3d_texture_set_overlay_position (struct wined3d_texture *texture, unsigned int sub_resource_idx, LONG x, LONG y)
 
void __cdecl wined3d_texture_set_sub_resource_parent (struct wined3d_texture *texture, unsigned int sub_resource_idx, void *parent, const struct wined3d_parent_ops *parent_ops)
 
HRESULT __cdecl wined3d_texture_update_desc (struct wined3d_texture *texture, unsigned int sub_resource_idx, void *mem, unsigned int pitch)
 
HRESULT __cdecl wined3d_texture_update_overlay (struct wined3d_texture *texture, unsigned int sub_resource_idx, const RECT *src_rect, struct wined3d_texture *dst_texture, unsigned int dst_sub_resource_idx, const RECT *dst_rect, uint32_t flags)
 
HRESULT __cdecl wined3d_unordered_access_view_create (const struct wined3d_view_desc *desc, struct wined3d_resource *resource, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_unordered_access_view **view)
 
ULONG __cdecl wined3d_unordered_access_view_decref (struct wined3d_unordered_access_view *view)
 
void *__cdecl wined3d_unordered_access_view_get_parent (const struct wined3d_unordered_access_view *view)
 
ULONG __cdecl wined3d_unordered_access_view_incref (struct wined3d_unordered_access_view *view)
 
HRESULT __cdecl wined3d_vertex_declaration_create (struct wined3d_device *device, const struct wined3d_vertex_element *elements, UINT element_count, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_vertex_declaration **declaration)
 
HRESULT __cdecl wined3d_vertex_declaration_create_from_fvf (struct wined3d_device *device, uint32_t fvf, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_vertex_declaration **declaration)
 
ULONG __cdecl wined3d_vertex_declaration_decref (struct wined3d_vertex_declaration *declaration)
 
void *__cdecl wined3d_vertex_declaration_get_parent (const struct wined3d_vertex_declaration *declaration)
 
ULONG __cdecl wined3d_vertex_declaration_incref (struct wined3d_vertex_declaration *declaration)
 
static void wined3d_streaming_buffer_init (struct wined3d_streaming_buffer *buffer, unsigned int bind_flags)
 
static void wined3d_streaming_buffer_cleanup (struct wined3d_streaming_buffer *buffer)
 
static unsigned int wined3d_log2i (unsigned int x)
 
static int wined3d_bit_scan (unsigned int *x)
 
static bool wined3d_bound_range (unsigned int start, unsigned int count, unsigned int limit)
 
static void wined3d_box_set (struct wined3d_box *box, unsigned int left, unsigned int top, unsigned int right, unsigned int bottom, unsigned int front, unsigned int back)
 

Macro Definition Documentation

◆ _FACWINED3D

#define _FACWINED3D   0x876

Definition at line 35 of file wined3d.h.

◆ MAKE_WINED3DHRESULT

#define MAKE_WINED3DHRESULT (   code)    MAKE_HRESULT(1, _FACWINED3D, code)

Definition at line 39 of file wined3d.h.

◆ MAKE_WINED3DSTATUS

#define MAKE_WINED3DSTATUS (   code)    MAKE_HRESULT(0, _FACWINED3D, code)

Definition at line 36 of file wined3d.h.

◆ WINED3D_APPEND_ALIGNED_ELEMENT

#define WINED3D_APPEND_ALIGNED_ELEMENT   0xffffffff

Definition at line 1571 of file wined3d.h.

◆ WINED3D_BIND_CONSTANT_BUFFER

#define WINED3D_BIND_CONSTANT_BUFFER   0x00000004

Definition at line 911 of file wined3d.h.

◆ WINED3D_BIND_DEPTH_STENCIL

#define WINED3D_BIND_DEPTH_STENCIL   0x00000040

Definition at line 915 of file wined3d.h.

◆ WINED3D_BIND_INDEX_BUFFER

#define WINED3D_BIND_INDEX_BUFFER   0x00000002

Definition at line 910 of file wined3d.h.

◆ WINED3D_BIND_INDIRECT_BUFFER

#define WINED3D_BIND_INDIRECT_BUFFER   0x00000100

Definition at line 917 of file wined3d.h.

◆ WINED3D_BIND_RENDER_TARGET

#define WINED3D_BIND_RENDER_TARGET   0x00000020

Definition at line 914 of file wined3d.h.

◆ WINED3D_BIND_SHADER_RESOURCE

#define WINED3D_BIND_SHADER_RESOURCE   0x00000008

Definition at line 912 of file wined3d.h.

◆ WINED3D_BIND_STREAM_OUTPUT

#define WINED3D_BIND_STREAM_OUTPUT   0x00000010

Definition at line 913 of file wined3d.h.

◆ WINED3D_BIND_UNORDERED_ACCESS

#define WINED3D_BIND_UNORDERED_ACCESS   0x00000080

Definition at line 916 of file wined3d.h.

◆ WINED3D_BIND_VERTEX_BUFFER

#define WINED3D_BIND_VERTEX_BUFFER   0x00000001

Definition at line 909 of file wined3d.h.

◆ WINED3D_BLT_ALPHA_TEST

#define WINED3D_BLT_ALPHA_TEST   0x80000000

Definition at line 1373 of file wined3d.h.

◆ WINED3D_BLT_DO_NOT_WAIT

#define WINED3D_BLT_DO_NOT_WAIT   0x08000000

Definition at line 1370 of file wined3d.h.

◆ WINED3D_BLT_DST_CKEY

#define WINED3D_BLT_DST_CKEY   0x00002000

Definition at line 1365 of file wined3d.h.

◆ WINED3D_BLT_DST_CKEY_OVERRIDE

#define WINED3D_BLT_DST_CKEY_OVERRIDE   0x00004000

Definition at line 1366 of file wined3d.h.

◆ WINED3D_BLT_FX

#define WINED3D_BLT_FX   0x00000800

Definition at line 1364 of file wined3d.h.

◆ WINED3D_BLT_MASK

#define WINED3D_BLT_MASK   0x0901e800

Definition at line 1374 of file wined3d.h.

◆ WINED3D_BLT_RAW

#define WINED3D_BLT_RAW   0x20000000

Definition at line 1371 of file wined3d.h.

◆ WINED3D_BLT_SRC_CKEY

#define WINED3D_BLT_SRC_CKEY   0x00008000

Definition at line 1367 of file wined3d.h.

◆ WINED3D_BLT_SRC_CKEY_OVERRIDE

#define WINED3D_BLT_SRC_CKEY_OVERRIDE   0x00010000

Definition at line 1368 of file wined3d.h.

◆ WINED3D_BLT_SYNCHRONOUS

#define WINED3D_BLT_SYNCHRONOUS   0x40000000

Definition at line 1372 of file wined3d.h.

◆ WINED3D_BLT_WAIT

#define WINED3D_BLT_WAIT   0x01000000

Definition at line 1369 of file wined3d.h.

◆ WINED3D_CKEY_DST_BLT

#define WINED3D_CKEY_DST_BLT   0x00000002

Definition at line 1339 of file wined3d.h.

◆ WINED3D_CKEY_DST_OVERLAY

#define WINED3D_CKEY_DST_OVERLAY   0x00000004

Definition at line 1340 of file wined3d.h.

◆ WINED3D_CKEY_SRC_BLT

#define WINED3D_CKEY_SRC_BLT   0x00000008

Definition at line 1341 of file wined3d.h.

◆ WINED3D_CKEY_SRC_OVERLAY

#define WINED3D_CKEY_SRC_OVERLAY   0x00000010

Definition at line 1342 of file wined3d.h.

◆ WINED3D_FOCUS_MESSAGES

#define WINED3D_FOCUS_MESSAGES   0x00000020

Definition at line 1326 of file wined3d.h.

◆ WINED3D_HANDLE_RESTORE

#define WINED3D_HANDLE_RESTORE   0x00000040

Definition at line 1327 of file wined3d.h.

◆ WINED3D_HIGHEST_SAMPLER_STATE

#define WINED3D_HIGHEST_SAMPLER_STATE   WINED3D_SAMP_DMAP_OFFSET

Definition at line 569 of file wined3d.h.

◆ WINED3D_HIGHEST_TEXTURE_STATE

#define WINED3D_HIGHEST_TEXTURE_STATE   WINED3D_TSS_CONSTANT

Definition at line 614 of file wined3d.h.

◆ WINED3D_HIGHEST_TRANSFORM_STATE

#define WINED3D_HIGHEST_TRANSFORM_STATE   WINED3D_TS_WORLD_MATRIX(255) /* Highest value in wined3d_transform_state. */

Definition at line 684 of file wined3d.h.

◆ WINED3D_LEGACY_CUBEMAP_FILTERING

#define WINED3D_LEGACY_CUBEMAP_FILTERING   0x00001000

Definition at line 1333 of file wined3d.h.

◆ WINED3D_LEGACY_DEPTH_BIAS

#define WINED3D_LEGACY_DEPTH_BIAS   0x00000001

Definition at line 1322 of file wined3d.h.

◆ WINED3D_LEGACY_FFP_LIGHTING

#define WINED3D_LEGACY_FFP_LIGHTING   0x00000100

Definition at line 1329 of file wined3d.h.

◆ WINED3D_LEGACY_UNBOUND_RESOURCE_COLOR

#define WINED3D_LEGACY_UNBOUND_RESOURCE_COLOR   0x00000400

Definition at line 1331 of file wined3d.h.

◆ WINED3D_MAP_DISCARD

#define WINED3D_MAP_DISCARD   0x00002000

Definition at line 953 of file wined3d.h.

◆ WINED3D_MAP_DONOTWAIT

#define WINED3D_MAP_DONOTWAIT   0x00004000

Definition at line 954 of file wined3d.h.

◆ WINED3D_MAP_NO_DIRTY_UPDATE

#define WINED3D_MAP_NO_DIRTY_UPDATE   0x00008000

Definition at line 955 of file wined3d.h.

◆ WINED3D_MAP_NOOVERWRITE

#define WINED3D_MAP_NOOVERWRITE   0x00001000

Definition at line 952 of file wined3d.h.

◆ WINED3D_MAP_NOSYSLOCK

#define WINED3D_MAP_NOSYSLOCK   0x00000800

Definition at line 951 of file wined3d.h.

◆ WINED3D_MAP_READ

#define WINED3D_MAP_READ   0x80000000

Definition at line 957 of file wined3d.h.

◆ WINED3D_MAP_WRITE

#define WINED3D_MAP_WRITE   0x40000000

Definition at line 956 of file wined3d.h.

◆ WINED3D_MAX_CLIP_DISTANCES

#define WINED3D_MAX_CLIP_DISTANCES   8

Definition at line 1601 of file wined3d.h.

◆ WINED3D_MAX_COMBINED_SAMPLERS

#define WINED3D_MAX_COMBINED_SAMPLERS   (WINED3D_MAX_FRAGMENT_SAMPLERS + WINED3D_MAX_VERTEX_SAMPLERS)

Definition at line 1600 of file wined3d.h.

◆ WINED3D_MAX_CONSTANT_BUFFER_SIZE

#define WINED3D_MAX_CONSTANT_BUFFER_SIZE   4096

Definition at line 1607 of file wined3d.h.

◆ WINED3D_MAX_CONSTS_B

#define WINED3D_MAX_CONSTS_B   16

Definition at line 1602 of file wined3d.h.

◆ WINED3D_MAX_CONSTS_I

#define WINED3D_MAX_CONSTS_I   16

Definition at line 1603 of file wined3d.h.

◆ WINED3D_MAX_FFP_TEXTURES

#define WINED3D_MAX_FFP_TEXTURES   8

Definition at line 1597 of file wined3d.h.

◆ WINED3D_MAX_FRAGMENT_SAMPLERS

#define WINED3D_MAX_FRAGMENT_SAMPLERS   16

Definition at line 1598 of file wined3d.h.

◆ WINED3D_MAX_PS_CONSTS_F

#define WINED3D_MAX_PS_CONSTS_F   224

Definition at line 1605 of file wined3d.h.

◆ WINED3D_MAX_RENDER_TARGETS

#define WINED3D_MAX_RENDER_TARGETS   8

Definition at line 1606 of file wined3d.h.

◆ WINED3D_MAX_STREAM_OUTPUT_BUFFERS

#define WINED3D_MAX_STREAM_OUTPUT_BUFFERS   4

Definition at line 1576 of file wined3d.h.

◆ WINED3D_MAX_STREAMS

#define WINED3D_MAX_STREAMS   16

Definition at line 1596 of file wined3d.h.

◆ WINED3D_MAX_VERTEX_SAMPLERS

#define WINED3D_MAX_VERTEX_SAMPLERS   4

Definition at line 1599 of file wined3d.h.

◆ WINED3D_MAX_VIEWPORTS

#define WINED3D_MAX_VIEWPORTS   16

Definition at line 1590 of file wined3d.h.

◆ WINED3D_MAX_VS_CONSTS_F

#define WINED3D_MAX_VS_CONSTS_F   256

Definition at line 1604 of file wined3d.h.

◆ WINED3D_NO3D

#define WINED3D_NO3D   0x00000002

Definition at line 1323 of file wined3d.h.

◆ WINED3D_NO_DRAW_INDIRECT

#define WINED3D_NO_DRAW_INDIRECT   0x00004000

Definition at line 1335 of file wined3d.h.

◆ WINED3D_NO_PRIMITIVE_RESTART

#define WINED3D_NO_PRIMITIVE_RESTART   0x00000800

Definition at line 1332 of file wined3d.h.

◆ WINED3D_NO_RASTERIZER_STREAM

#define WINED3D_NO_RASTERIZER_STREAM   0xffffffff

Definition at line 1577 of file wined3d.h.

◆ WINED3D_NORMALIZED_DEPTH_BIAS

#define WINED3D_NORMALIZED_DEPTH_BIAS   0x00002000

Definition at line 1334 of file wined3d.h.

◆ WINED3D_OK

#define WINED3D_OK   S_OK

Definition at line 33 of file wined3d.h.

◆ WINED3D_OUTPUT_SLOT_SEMANTIC

#define WINED3D_OUTPUT_SLOT_SEMANTIC   0xffffffff

Definition at line 1573 of file wined3d.h.

◆ WINED3D_OUTPUT_SLOT_UNUSED

#define WINED3D_OUTPUT_SLOT_UNUSED   0xfffffffe

Definition at line 1574 of file wined3d.h.

◆ WINED3D_PALETTE_8BIT_ENTRIES

#define WINED3D_PALETTE_8BIT_ENTRIES   0x00000001

Definition at line 1559 of file wined3d.h.

◆ WINED3D_PALETTE_ALLOW_256

#define WINED3D_PALETTE_ALLOW_256   0x00000002

Definition at line 1560 of file wined3d.h.

◆ WINED3D_PALETTE_ALPHA

#define WINED3D_PALETTE_ALPHA   0x00000004

Definition at line 1561 of file wined3d.h.

◆ WINED3D_PIXEL_CENTER_INTEGER

#define WINED3D_PIXEL_CENTER_INTEGER   0x00000080

Definition at line 1328 of file wined3d.h.

◆ WINED3D_PRESENT_CONVERSION

#define WINED3D_PRESENT_CONVERSION   0x00000008

Definition at line 1324 of file wined3d.h.

◆ WINED3D_REGISTER_WINDOW_NO_ALT_ENTER

#define WINED3D_REGISTER_WINDOW_NO_ALT_ENTER   0x00000002u

Definition at line 1593 of file wined3d.h.

◆ WINED3D_REGISTER_WINDOW_NO_PRINT_SCREEN

#define WINED3D_REGISTER_WINDOW_NO_PRINT_SCREEN   0x00000004u

Definition at line 1594 of file wined3d.h.

◆ WINED3D_REGISTER_WINDOW_NO_WINDOW_CHANGES

#define WINED3D_REGISTER_WINDOW_NO_WINDOW_CHANGES   0x00000001u

Definition at line 1592 of file wined3d.h.

◆ WINED3D_RESOURCE_ACCESS_CPU

#define WINED3D_RESOURCE_ACCESS_CPU   0x2u

Definition at line 52 of file wined3d.h.

◆ WINED3D_RESOURCE_ACCESS_GPU

#define WINED3D_RESOURCE_ACCESS_GPU   0x1u

Definition at line 51 of file wined3d.h.

◆ WINED3D_RESOURCE_ACCESS_MAP_R

#define WINED3D_RESOURCE_ACCESS_MAP_R   0x4u

Definition at line 53 of file wined3d.h.

◆ WINED3D_RESOURCE_ACCESS_MAP_W

#define WINED3D_RESOURCE_ACCESS_MAP_W   0x8u

Definition at line 54 of file wined3d.h.

◆ WINED3D_RESTORE_MODE_ON_ACTIVATE

#define WINED3D_RESTORE_MODE_ON_ACTIVATE   0x00000010

Definition at line 1325 of file wined3d.h.

◆ WINED3D_RESZ_CODE

#define WINED3D_RESZ_CODE   0x7fa05000

Definition at line 1337 of file wined3d.h.

◆ WINED3D_SRGB_READ_WRITE_CONTROL

#define WINED3D_SRGB_READ_WRITE_CONTROL   0x00000200

Definition at line 1330 of file wined3d.h.

◆ WINED3D_STANDARD_MULTISAMPLE_PATTERN

#define WINED3D_STANDARD_MULTISAMPLE_PATTERN   0xffffffff

Definition at line 1569 of file wined3d.h.

◆ WINED3D_SWAPCHAIN_ALLOW_MODE_SWITCH

#define WINED3D_SWAPCHAIN_ALLOW_MODE_SWITCH   0x00001000u

Definition at line 897 of file wined3d.h.

◆ WINED3D_SWAPCHAIN_DEVICECLIP

#define WINED3D_SWAPCHAIN_DEVICECLIP   0x00000004u

Definition at line 893 of file wined3d.h.

◆ WINED3D_SWAPCHAIN_DISCARD_DEPTHSTENCIL

#define WINED3D_SWAPCHAIN_DISCARD_DEPTHSTENCIL   0x00000002u

Definition at line 892 of file wined3d.h.

◆ WINED3D_SWAPCHAIN_GDI_COMPATIBLE

#define WINED3D_SWAPCHAIN_GDI_COMPATIBLE   0x00008000u

Definition at line 900 of file wined3d.h.

◆ WINED3D_SWAPCHAIN_IMPLICIT

#define WINED3D_SWAPCHAIN_IMPLICIT   0x00010000u

Definition at line 901 of file wined3d.h.

◆ WINED3D_SWAPCHAIN_LOCKABLE_BACKBUFFER

#define WINED3D_SWAPCHAIN_LOCKABLE_BACKBUFFER   0x00000001u

Definition at line 891 of file wined3d.h.

◆ WINED3D_SWAPCHAIN_NO_WINDOW_CHANGES

#define WINED3D_SWAPCHAIN_NO_WINDOW_CHANGES   0x00040000u

Definition at line 903 of file wined3d.h.

◆ WINED3D_SWAPCHAIN_NOAUTOROTATE

#define WINED3D_SWAPCHAIN_NOAUTOROTATE   0x00000020u

Definition at line 895 of file wined3d.h.

◆ WINED3D_SWAPCHAIN_REGISTER_STATE

#define WINED3D_SWAPCHAIN_REGISTER_STATE   0x00020000u

Definition at line 902 of file wined3d.h.

◆ WINED3D_SWAPCHAIN_REGISTER_TOPMOST_TIMER

#define WINED3D_SWAPCHAIN_REGISTER_TOPMOST_TIMER   0x00100000u

Definition at line 905 of file wined3d.h.

◆ WINED3D_SWAPCHAIN_RESTORE_WINDOW_RECT

#define WINED3D_SWAPCHAIN_RESTORE_WINDOW_RECT   0x00004000u

Definition at line 899 of file wined3d.h.

◆ WINED3D_SWAPCHAIN_RESTORE_WINDOW_STATE

#define WINED3D_SWAPCHAIN_RESTORE_WINDOW_STATE   0x00080000u

Definition at line 904 of file wined3d.h.

◆ WINED3D_SWAPCHAIN_UNPRUNEDMODE

#define WINED3D_SWAPCHAIN_UNPRUNEDMODE   0x00000040u

Definition at line 896 of file wined3d.h.

◆ WINED3D_SWAPCHAIN_USE_CLOSEST_MATCHING_MODE

#define WINED3D_SWAPCHAIN_USE_CLOSEST_MATCHING_MODE   0x00002000u

Definition at line 898 of file wined3d.h.

◆ WINED3D_SWAPCHAIN_VIDEO

#define WINED3D_SWAPCHAIN_VIDEO   0x00000010u

Definition at line 894 of file wined3d.h.

◆ WINED3D_TEXTURE_CREATE_DISCARD

#define WINED3D_TEXTURE_CREATE_DISCARD   0x00000002

Definition at line 1563 of file wined3d.h.

◆ WINED3D_TEXTURE_CREATE_GENERATE_MIPMAPS

#define WINED3D_TEXTURE_CREATE_GENERATE_MIPMAPS   0x00000010

Definition at line 1566 of file wined3d.h.

◆ WINED3D_TEXTURE_CREATE_GET_DC

#define WINED3D_TEXTURE_CREATE_GET_DC   0x00000008

Definition at line 1565 of file wined3d.h.

◆ WINED3D_TEXTURE_CREATE_GET_DC_LENIENT

#define WINED3D_TEXTURE_CREATE_GET_DC_LENIENT   0x00000004

Definition at line 1564 of file wined3d.h.

◆ WINED3D_TEXTURE_CREATE_RECORD_DIRTY_REGIONS

#define WINED3D_TEXTURE_CREATE_RECORD_DIRTY_REGIONS   0x00000020

Definition at line 1567 of file wined3d.h.

◆ WINED3D_TS_WORLD_MATRIX

#define WINED3D_TS_WORLD_MATRIX (   index)    (enum wined3d_transform_state)(index + 256)

Definition at line 683 of file wined3d.h.

◆ WINED3D_VERTEX_SAMPLER_OFFSET

#define WINED3D_VERTEX_SAMPLER_OFFSET   WINED3D_MAX_FRAGMENT_SAMPLERS

Definition at line 1037 of file wined3d.h.

◆ WINED3D_VIEW_BUFFER_APPEND

#define WINED3D_VIEW_BUFFER_APPEND   0x00000002

Definition at line 1580 of file wined3d.h.

◆ WINED3D_VIEW_BUFFER_COUNTER

#define WINED3D_VIEW_BUFFER_COUNTER   0x00000004

Definition at line 1581 of file wined3d.h.

◆ WINED3D_VIEW_BUFFER_RAW

#define WINED3D_VIEW_BUFFER_RAW   0x00000001

Definition at line 1579 of file wined3d.h.

◆ WINED3D_VIEW_FORWARD_REFERENCE

#define WINED3D_VIEW_FORWARD_REFERENCE   0x00000080

Definition at line 1588 of file wined3d.h.

◆ WINED3D_VIEW_READ_ONLY_DEPTH

#define WINED3D_VIEW_READ_ONLY_DEPTH   0x00000020

Definition at line 1584 of file wined3d.h.

◆ WINED3D_VIEW_READ_ONLY_STENCIL

#define WINED3D_VIEW_READ_ONLY_STENCIL   0x00000040

Definition at line 1585 of file wined3d.h.

◆ WINED3D_VIEW_TEXTURE_ARRAY

#define WINED3D_VIEW_TEXTURE_ARRAY   0x00000010

Definition at line 1583 of file wined3d.h.

◆ WINED3D_VIEW_TEXTURE_CUBE

#define WINED3D_VIEW_TEXTURE_CUBE   0x00000008

Definition at line 1582 of file wined3d.h.

◆ WINED3DADAPTER_DEFAULT

#define WINED3DADAPTER_DEFAULT   0

Definition at line 871 of file wined3d.h.

◆ WINED3DCAPS2_CANCALIBRATEGAMMA

#define WINED3DCAPS2_CANCALIBRATEGAMMA   0x00100000

Definition at line 1193 of file wined3d.h.

◆ WINED3DCAPS2_CANGENMIPMAP

#define WINED3DCAPS2_CANGENMIPMAP   0x40000000

Definition at line 1197 of file wined3d.h.

◆ WINED3DCAPS2_CANMANAGERESOURCE

#define WINED3DCAPS2_CANMANAGERESOURCE   0x10000000

Definition at line 1195 of file wined3d.h.

◆ WINED3DCAPS2_CANRENDERWINDOWED

#define WINED3DCAPS2_CANRENDERWINDOWED   0x00080000

Definition at line 1192 of file wined3d.h.

◆ WINED3DCAPS2_DYNAMICTEXTURES

#define WINED3DCAPS2_DYNAMICTEXTURES   0x20000000

Definition at line 1196 of file wined3d.h.

◆ WINED3DCAPS2_FULLSCREENGAMMA

#define WINED3DCAPS2_FULLSCREENGAMMA   0x00020000

Definition at line 1191 of file wined3d.h.

◆ WINED3DCAPS2_NO2DDURING3DSCENE

#define WINED3DCAPS2_NO2DDURING3DSCENE   0x00000002

Definition at line 1190 of file wined3d.h.

◆ WINED3DCAPS2_RESERVED

#define WINED3DCAPS2_RESERVED   0x02000000

Definition at line 1194 of file wined3d.h.

◆ WINED3DCAPS3_ALPHA_FULLSCREEN_FLIP_OR_DISCARD

#define WINED3DCAPS3_ALPHA_FULLSCREEN_FLIP_OR_DISCARD   0x00000020

Definition at line 1039 of file wined3d.h.

◆ WINED3DCAPS3_COPY_TO_SYSTEMMEM

#define WINED3DCAPS3_COPY_TO_SYSTEMMEM   0x00000200

Definition at line 1042 of file wined3d.h.

◆ WINED3DCAPS3_COPY_TO_VIDMEM

#define WINED3DCAPS3_COPY_TO_VIDMEM   0x00000100

Definition at line 1041 of file wined3d.h.

◆ WINED3DCAPS3_LINEAR_TO_SRGB_PRESENTATION

#define WINED3DCAPS3_LINEAR_TO_SRGB_PRESENTATION   0x00000080

Definition at line 1040 of file wined3d.h.

◆ WINED3DCAPS3_RESERVED

#define WINED3DCAPS3_RESERVED   0x8000001f

Definition at line 1043 of file wined3d.h.

◆ WINED3DCLEAR_STENCIL

#define WINED3DCLEAR_STENCIL   0x00000004

Definition at line 1010 of file wined3d.h.

◆ WINED3DCLEAR_SYNCHRONOUS

#define WINED3DCLEAR_SYNCHRONOUS   0x80000000

Definition at line 1011 of file wined3d.h.

◆ WINED3DCLEAR_TARGET

#define WINED3DCLEAR_TARGET   0x00000001

Definition at line 1008 of file wined3d.h.

◆ WINED3DCLEAR_ZBUFFER

#define WINED3DCLEAR_ZBUFFER   0x00000002

Definition at line 1009 of file wined3d.h.

◆ WINED3DCLIPPLANE0

#define WINED3DCLIPPLANE0   (1u << 0)

Definition at line 961 of file wined3d.h.

◆ WINED3DCLIPPLANE1

#define WINED3DCLIPPLANE1   (1u << 1)

Definition at line 962 of file wined3d.h.

◆ WINED3DCLIPPLANE2

#define WINED3DCLIPPLANE2   (1u << 2)

Definition at line 963 of file wined3d.h.

◆ WINED3DCLIPPLANE3

#define WINED3DCLIPPLANE3   (1u << 3)

Definition at line 964 of file wined3d.h.

◆ WINED3DCLIPPLANE4

#define WINED3DCLIPPLANE4   (1u << 4)

Definition at line 965 of file wined3d.h.

◆ WINED3DCLIPPLANE5

#define WINED3DCLIPPLANE5   (1u << 5)

Definition at line 966 of file wined3d.h.

◆ WINED3DCOLORWRITEENABLE_ALPHA

#define WINED3DCOLORWRITEENABLE_ALPHA   (1u << 3)

Definition at line 869 of file wined3d.h.

◆ WINED3DCOLORWRITEENABLE_BLUE

#define WINED3DCOLORWRITEENABLE_BLUE   (1u << 2)

Definition at line 868 of file wined3d.h.

◆ WINED3DCOLORWRITEENABLE_GREEN

#define WINED3DCOLORWRITEENABLE_GREEN   (1u << 1)

Definition at line 867 of file wined3d.h.

◆ WINED3DCOLORWRITEENABLE_RED

#define WINED3DCOLORWRITEENABLE_RED   (1u << 0)

Definition at line 866 of file wined3d.h.

◆ WINED3DCREATE_ADAPTERGROUP_DEVICE

#define WINED3DCREATE_ADAPTERGROUP_DEVICE   0x00000200

Definition at line 1027 of file wined3d.h.

◆ WINED3DCREATE_DISABLE_DRIVER_MANAGEMENT

#define WINED3DCREATE_DISABLE_DRIVER_MANAGEMENT   0x00000100

Definition at line 1026 of file wined3d.h.

◆ WINED3DCREATE_DISABLE_DRIVER_MANAGEMENT_EX

#define WINED3DCREATE_DISABLE_DRIVER_MANAGEMENT_EX   0x00000400

Definition at line 1028 of file wined3d.h.

◆ WINED3DCREATE_DISABLE_PRINTSCREEN

#define WINED3DCREATE_DISABLE_PRINTSCREEN   0x00008000

Definition at line 1032 of file wined3d.h.

◆ WINED3DCREATE_DISABLE_PSGP_THREADING

#define WINED3DCREATE_DISABLE_PSGP_THREADING   0x00002000

Definition at line 1030 of file wined3d.h.

◆ WINED3DCREATE_ENABLE_PRESENTSTATS

#define WINED3DCREATE_ENABLE_PRESENTSTATS   0x00004000

Definition at line 1031 of file wined3d.h.

◆ WINED3DCREATE_FPU_PRESERVE

#define WINED3DCREATE_FPU_PRESERVE   0x00000002

Definition at line 1021 of file wined3d.h.

◆ WINED3DCREATE_HARDWARE_VERTEXPROCESSING

#define WINED3DCREATE_HARDWARE_VERTEXPROCESSING   0x00000040

Definition at line 1024 of file wined3d.h.

◆ WINED3DCREATE_MIXED_VERTEXPROCESSING

#define WINED3DCREATE_MIXED_VERTEXPROCESSING   0x00000080

Definition at line 1025 of file wined3d.h.

◆ WINED3DCREATE_NOWINDOWCHANGES

#define WINED3DCREATE_NOWINDOWCHANGES   0x00000800

Definition at line 1029 of file wined3d.h.

◆ WINED3DCREATE_PUREDEVICE

#define WINED3DCREATE_PUREDEVICE   0x00000010

Definition at line 1022 of file wined3d.h.

◆ WINED3DCREATE_SCREENSAVER

#define WINED3DCREATE_SCREENSAVER   0x10000000

Definition at line 1033 of file wined3d.h.

◆ WINED3DCREATE_SOFTWARE_VERTEXPROCESSING

#define WINED3DCREATE_SOFTWARE_VERTEXPROCESSING   0x00000020

Definition at line 1023 of file wined3d.h.

◆ WINED3DCURSORCAPS_COLOR

#define WINED3DCURSORCAPS_COLOR   0x00000001

Definition at line 1294 of file wined3d.h.

◆ WINED3DCURSORCAPS_LOWRES

#define WINED3DCURSORCAPS_LOWRES   0x00000002

Definition at line 1295 of file wined3d.h.

◆ WINED3DDEVCAPS2_ADAPTIVETESSNPATCH

#define WINED3DDEVCAPS2_ADAPTIVETESSNPATCH   0x00000008

Definition at line 1048 of file wined3d.h.

◆ WINED3DDEVCAPS2_ADAPTIVETESSRTPATCH

#define WINED3DDEVCAPS2_ADAPTIVETESSRTPATCH   0x00000004

Definition at line 1047 of file wined3d.h.

◆ WINED3DDEVCAPS2_CAN_STRETCHRECT_FROM_TEXTURES

#define WINED3DDEVCAPS2_CAN_STRETCHRECT_FROM_TEXTURES   0x00000010

Definition at line 1049 of file wined3d.h.

◆ WINED3DDEVCAPS2_DMAPNPATCH

#define WINED3DDEVCAPS2_DMAPNPATCH   0x00000002

Definition at line 1046 of file wined3d.h.

◆ WINED3DDEVCAPS2_PRESAMPLEDDMAPNPATCH

#define WINED3DDEVCAPS2_PRESAMPLEDDMAPNPATCH   0x00000020

Definition at line 1050 of file wined3d.h.

◆ WINED3DDEVCAPS2_STREAMOFFSET

#define WINED3DDEVCAPS2_STREAMOFFSET   0x00000001

Definition at line 1045 of file wined3d.h.

◆ WINED3DDEVCAPS2_VERTEXELEMENTSCANSHARESTREAMOFFSET

#define WINED3DDEVCAPS2_VERTEXELEMENTSCANSHARESTREAMOFFSET   0x00000040

Definition at line 1051 of file wined3d.h.

◆ WINED3DDEVCAPS_CANBLTSYSTONONLOCAL

#define WINED3DDEVCAPS_CANBLTSYSTONONLOCAL   0x00020000

Definition at line 1314 of file wined3d.h.

◆ WINED3DDEVCAPS_CANRENDERAFTERFLIP

#define WINED3DDEVCAPS_CANRENDERAFTERFLIP   0x00000800

Definition at line 1308 of file wined3d.h.

◆ WINED3DDEVCAPS_DRAWPRIMITIVES2

#define WINED3DDEVCAPS_DRAWPRIMITIVES2   0x00002000

Definition at line 1310 of file wined3d.h.

◆ WINED3DDEVCAPS_DRAWPRIMITIVES2EX

#define WINED3DDEVCAPS_DRAWPRIMITIVES2EX   0x00008000

Definition at line 1312 of file wined3d.h.

◆ WINED3DDEVCAPS_DRAWPRIMTLVERTEX

#define WINED3DDEVCAPS_DRAWPRIMTLVERTEX   0x00000400

Definition at line 1307 of file wined3d.h.

◆ WINED3DDEVCAPS_EXECUTESYSTEMMEMORY

#define WINED3DDEVCAPS_EXECUTESYSTEMMEMORY   0x00000010

Definition at line 1301 of file wined3d.h.

◆ WINED3DDEVCAPS_EXECUTEVIDEOMEMORY

#define WINED3DDEVCAPS_EXECUTEVIDEOMEMORY   0x00000020

Definition at line 1302 of file wined3d.h.

◆ WINED3DDEVCAPS_FLOATTLVERTEX

#define WINED3DDEVCAPS_FLOATTLVERTEX   0x00000001

Definition at line 1297 of file wined3d.h.

◆ WINED3DDEVCAPS_HWRASTERIZATION

#define WINED3DDEVCAPS_HWRASTERIZATION   0x00080000

Definition at line 1315 of file wined3d.h.

◆ WINED3DDEVCAPS_HWTRANSFORMANDLIGHT

#define WINED3DDEVCAPS_HWTRANSFORMANDLIGHT   0x00010000

Definition at line 1313 of file wined3d.h.

◆ WINED3DDEVCAPS_NPATCHES

#define WINED3DDEVCAPS_NPATCHES   0x01000000

Definition at line 1320 of file wined3d.h.

◆ WINED3DDEVCAPS_PUREDEVICE

#define WINED3DDEVCAPS_PUREDEVICE   0x00100000

Definition at line 1316 of file wined3d.h.

◆ WINED3DDEVCAPS_QUINTICRTPATCHES

#define WINED3DDEVCAPS_QUINTICRTPATCHES   0x00200000

Definition at line 1317 of file wined3d.h.

◆ WINED3DDEVCAPS_RTPATCHES

#define WINED3DDEVCAPS_RTPATCHES   0x00400000

Definition at line 1318 of file wined3d.h.

◆ WINED3DDEVCAPS_RTPATCHHANDLEZERO

#define WINED3DDEVCAPS_RTPATCHHANDLEZERO   0x00800000

Definition at line 1319 of file wined3d.h.

◆ WINED3DDEVCAPS_SEPARATETEXTUREMEMORIES

#define WINED3DDEVCAPS_SEPARATETEXTUREMEMORIES   0x00004000

Definition at line 1311 of file wined3d.h.

◆ WINED3DDEVCAPS_SORTDECREASINGZ

#define WINED3DDEVCAPS_SORTDECREASINGZ   0X00000004

Definition at line 1299 of file wined3d.h.

◆ WINED3DDEVCAPS_SORTEXACT

#define WINED3DDEVCAPS_SORTEXACT   0x00000008

Definition at line 1300 of file wined3d.h.

◆ WINED3DDEVCAPS_SORTINCREASINGZ

#define WINED3DDEVCAPS_SORTINCREASINGZ   0x00000002

Definition at line 1298 of file wined3d.h.

◆ WINED3DDEVCAPS_TEXTURENONLOCALVIDMEM

#define WINED3DDEVCAPS_TEXTURENONLOCALVIDMEM   0x00001000

Definition at line 1309 of file wined3d.h.

◆ WINED3DDEVCAPS_TEXTURESYSTEMMEMORY

#define WINED3DDEVCAPS_TEXTURESYSTEMMEMORY   0x00000100

Definition at line 1305 of file wined3d.h.

◆ WINED3DDEVCAPS_TEXTUREVIDEOMEMORY

#define WINED3DDEVCAPS_TEXTUREVIDEOMEMORY   0x00000200

Definition at line 1306 of file wined3d.h.

◆ WINED3DDEVCAPS_TLVERTEXSYSTEMMEMORY

#define WINED3DDEVCAPS_TLVERTEXSYSTEMMEMORY   0x00000040

Definition at line 1303 of file wined3d.h.

◆ WINED3DDEVCAPS_TLVERTEXVIDEOMEMORY

#define WINED3DDEVCAPS_TLVERTEXVIDEOMEMORY   0x00000080

Definition at line 1304 of file wined3d.h.

◆ WINED3DDMAPSAMPLER

#define WINED3DDMAPSAMPLER   0x100

Definition at line 1036 of file wined3d.h.

◆ WINED3DDP_MAXTEXCOORD

#define WINED3DDP_MAXTEXCOORD   8

Definition at line 907 of file wined3d.h.

◆ WINED3DDTCAPS_DEC3N

#define WINED3DDTCAPS_DEC3N   0x00000080

Definition at line 1060 of file wined3d.h.

◆ WINED3DDTCAPS_FLOAT16_2

#define WINED3DDTCAPS_FLOAT16_2   0x00000100

Definition at line 1061 of file wined3d.h.

◆ WINED3DDTCAPS_FLOAT16_4

#define WINED3DDTCAPS_FLOAT16_4   0x00000200

Definition at line 1062 of file wined3d.h.

◆ WINED3DDTCAPS_SHORT2N

#define WINED3DDTCAPS_SHORT2N   0x00000004

Definition at line 1055 of file wined3d.h.

◆ WINED3DDTCAPS_SHORT4N

#define WINED3DDTCAPS_SHORT4N   0x00000008

Definition at line 1056 of file wined3d.h.

◆ WINED3DDTCAPS_UBYTE4

#define WINED3DDTCAPS_UBYTE4   0x00000001

Definition at line 1053 of file wined3d.h.

◆ WINED3DDTCAPS_UBYTE4N

#define WINED3DDTCAPS_UBYTE4N   0x00000002

Definition at line 1054 of file wined3d.h.

◆ WINED3DDTCAPS_UDEC3

#define WINED3DDTCAPS_UDEC3   0x00000040

Definition at line 1059 of file wined3d.h.

◆ WINED3DDTCAPS_USHORT2N

#define WINED3DDTCAPS_USHORT2N   0x00000010

Definition at line 1057 of file wined3d.h.

◆ WINED3DDTCAPS_USHORT4N

#define WINED3DDTCAPS_USHORT4N   0x00000020

Definition at line 1058 of file wined3d.h.

◆ WINED3DENUM_WHQL_LEVEL

#define WINED3DENUM_WHQL_LEVEL   2

Definition at line 872 of file wined3d.h.

◆ WINED3DERR_CONFLICTINGRENDERSTATE

#define WINED3DERR_CONFLICTINGRENDERSTATE   MAKE_WINED3DHRESULT(2081)

Definition at line 40 of file wined3d.h.

◆ WINED3DERR_INVALIDCALL

#define WINED3DERR_INVALIDCALL   MAKE_WINED3DHRESULT(2156)

Definition at line 44 of file wined3d.h.

◆ WINED3DERR_NOTAVAILABLE

#define WINED3DERR_NOTAVAILABLE   MAKE_WINED3DHRESULT(2154)

Definition at line 42 of file wined3d.h.

◆ WINED3DERR_OUTOFVIDEOMEMORY

#define WINED3DERR_OUTOFVIDEOMEMORY   MAKE_WINED3DHRESULT(380)

Definition at line 43 of file wined3d.h.

◆ WINED3DERR_UNSUPPORTEDTEXTUREFILTER

#define WINED3DERR_UNSUPPORTEDTEXTUREFILTER   MAKE_WINED3DHRESULT(2082)

Definition at line 41 of file wined3d.h.

◆ WINED3DFVF_DIFFUSE

#define WINED3DFVF_DIFFUSE   0x0040

Definition at line 981 of file wined3d.h.

◆ WINED3DFVF_LASTBETA_D3DCOLOR

#define WINED3DFVF_LASTBETA_D3DCOLOR   0x8000

Definition at line 995 of file wined3d.h.

◆ WINED3DFVF_LASTBETA_UBYTE4

#define WINED3DFVF_LASTBETA_UBYTE4   0x1000

Definition at line 994 of file wined3d.h.

◆ WINED3DFVF_NORMAL

#define WINED3DFVF_NORMAL   0x0010

Definition at line 979 of file wined3d.h.

◆ WINED3DFVF_POSITION_MASK

#define WINED3DFVF_POSITION_MASK   0x400e

Definition at line 970 of file wined3d.h.

◆ WINED3DFVF_PSIZE

#define WINED3DFVF_PSIZE   0x0020

Definition at line 980 of file wined3d.h.

◆ WINED3DFVF_RESERVED0

#define WINED3DFVF_RESERVED0   0x0001

Definition at line 969 of file wined3d.h.

◆ WINED3DFVF_RESERVED2

#define WINED3DFVF_RESERVED2   0x6000

Definition at line 996 of file wined3d.h.

◆ WINED3DFVF_SPECULAR

#define WINED3DFVF_SPECULAR   0x0080

Definition at line 982 of file wined3d.h.

◆ WINED3DFVF_TEX0

#define WINED3DFVF_TEX0   0x0000

Definition at line 985 of file wined3d.h.

◆ WINED3DFVF_TEX1

#define WINED3DFVF_TEX1   0x0100

Definition at line 986 of file wined3d.h.

◆ WINED3DFVF_TEX2

#define WINED3DFVF_TEX2   0x0200

Definition at line 987 of file wined3d.h.

◆ WINED3DFVF_TEX3

#define WINED3DFVF_TEX3   0x0300

Definition at line 988 of file wined3d.h.

◆ WINED3DFVF_TEX4

#define WINED3DFVF_TEX4   0x0400

Definition at line 989 of file wined3d.h.

◆ WINED3DFVF_TEX5

#define WINED3DFVF_TEX5   0x0500

Definition at line 990 of file wined3d.h.

◆ WINED3DFVF_TEX6

#define WINED3DFVF_TEX6   0x0600

Definition at line 991 of file wined3d.h.

◆ WINED3DFVF_TEX7

#define WINED3DFVF_TEX7   0x0700

Definition at line 992 of file wined3d.h.

◆ WINED3DFVF_TEX8

#define WINED3DFVF_TEX8   0x0800

Definition at line 993 of file wined3d.h.

◆ WINED3DFVF_TEXCOORDSIZE1

#define WINED3DFVF_TEXCOORDSIZE1 (   idx)    (WINED3DFVF_TEXTUREFORMAT1 << (idx * 2 + 16))

Definition at line 1002 of file wined3d.h.

◆ WINED3DFVF_TEXCOORDSIZE2

#define WINED3DFVF_TEXCOORDSIZE2 (   idx)    (WINED3DFVF_TEXTUREFORMAT2 << (idx * 2 + 16))

Definition at line 1003 of file wined3d.h.

◆ WINED3DFVF_TEXCOORDSIZE3

#define WINED3DFVF_TEXCOORDSIZE3 (   idx)    (WINED3DFVF_TEXTUREFORMAT3 << (idx * 2 + 16))

Definition at line 1004 of file wined3d.h.

◆ WINED3DFVF_TEXCOORDSIZE4

#define WINED3DFVF_TEXCOORDSIZE4 (   idx)    (WINED3DFVF_TEXTUREFORMAT4 << (idx * 2 + 16))

Definition at line 1005 of file wined3d.h.

◆ WINED3DFVF_TEXCOUNT_MASK

#define WINED3DFVF_TEXCOUNT_MASK   0x0f00

Definition at line 983 of file wined3d.h.

◆ WINED3DFVF_TEXCOUNT_SHIFT

#define WINED3DFVF_TEXCOUNT_SHIFT   8

Definition at line 984 of file wined3d.h.

◆ WINED3DFVF_TEXTUREFORMAT1

#define WINED3DFVF_TEXTUREFORMAT1   3u

Definition at line 998 of file wined3d.h.

◆ WINED3DFVF_TEXTUREFORMAT2

#define WINED3DFVF_TEXTUREFORMAT2   0u

Definition at line 999 of file wined3d.h.

◆ WINED3DFVF_TEXTUREFORMAT3

#define WINED3DFVF_TEXTUREFORMAT3   1u

Definition at line 1000 of file wined3d.h.

◆ WINED3DFVF_TEXTUREFORMAT4

#define WINED3DFVF_TEXTUREFORMAT4   2u

Definition at line 1001 of file wined3d.h.

◆ WINED3DFVF_XYZ

#define WINED3DFVF_XYZ   0x0002

Definition at line 971 of file wined3d.h.

◆ WINED3DFVF_XYZB1

#define WINED3DFVF_XYZB1   0x0006

Definition at line 973 of file wined3d.h.

◆ WINED3DFVF_XYZB2

#define WINED3DFVF_XYZB2   0x0008

Definition at line 974 of file wined3d.h.

◆ WINED3DFVF_XYZB3

#define WINED3DFVF_XYZB3   0x000a

Definition at line 975 of file wined3d.h.

◆ WINED3DFVF_XYZB4

#define WINED3DFVF_XYZB4   0x000c

Definition at line 976 of file wined3d.h.

◆ WINED3DFVF_XYZB5

#define WINED3DFVF_XYZB5   0x000e

Definition at line 977 of file wined3d.h.

◆ WINED3DFVF_XYZRHW

#define WINED3DFVF_XYZRHW   0x0004

Definition at line 972 of file wined3d.h.

◆ WINED3DFVF_XYZW

#define WINED3DFVF_XYZW   0x4002

Definition at line 978 of file wined3d.h.

◆ WINED3DFVFCAPS_DONOTSTRIPELEMENTS

#define WINED3DFVFCAPS_DONOTSTRIPELEMENTS   0x00080000

Definition at line 1065 of file wined3d.h.

◆ WINED3DFVFCAPS_PSIZE

#define WINED3DFVFCAPS_PSIZE   0x00100000

Definition at line 1066 of file wined3d.h.

◆ WINED3DFVFCAPS_TEXCOORDCOUNTMASK

#define WINED3DFVFCAPS_TEXCOORDCOUNTMASK   0x0000ffff

Definition at line 1064 of file wined3d.h.

◆ WINED3DGETDATA_FLUSH

#define WINED3DGETDATA_FLUSH   (1u << 0)

Definition at line 783 of file wined3d.h.

◆ WINED3DISSUE_BEGIN

#define WINED3DISSUE_BEGIN   (1u << 1)

Definition at line 781 of file wined3d.h.

◆ WINED3DISSUE_END

#define WINED3DISSUE_END   (1u << 0)

Definition at line 782 of file wined3d.h.

◆ WINED3DLINECAPS_ALPHACMP

#define WINED3DLINECAPS_ALPHACMP   0x00000008

Definition at line 1071 of file wined3d.h.

◆ WINED3DLINECAPS_ANTIALIAS

#define WINED3DLINECAPS_ANTIALIAS   0x00000020

Definition at line 1073 of file wined3d.h.

◆ WINED3DLINECAPS_BLEND

#define WINED3DLINECAPS_BLEND   0x00000004

Definition at line 1070 of file wined3d.h.

◆ WINED3DLINECAPS_FOG

#define WINED3DLINECAPS_FOG   0x00000010

Definition at line 1072 of file wined3d.h.

◆ WINED3DLINECAPS_TEXTURE

#define WINED3DLINECAPS_TEXTURE   0x00000001

Definition at line 1068 of file wined3d.h.

◆ WINED3DLINECAPS_ZTEST

#define WINED3DLINECAPS_ZTEST   0x00000002

Definition at line 1069 of file wined3d.h.

◆ WINED3DMAX30SHADERINSTRUCTIONS

#define WINED3DMAX30SHADERINSTRUCTIONS   32768

Definition at line 1075 of file wined3d.h.

◆ WINED3DMIN30SHADERINSTRUCTIONS

#define WINED3DMIN30SHADERINSTRUCTIONS   512

Definition at line 1076 of file wined3d.h.

◆ WINED3DOK_NOMIPGEN

#define WINED3DOK_NOMIPGEN   MAKE_WINED3DSTATUS(2159)

Definition at line 37 of file wined3d.h.

◆ WINED3DPBLENDCAPS_BLENDFACTOR

#define WINED3DPBLENDCAPS_BLENDFACTOR   0x00002000

Definition at line 1091 of file wined3d.h.

◆ WINED3DPBLENDCAPS_BOTHINVSRCALPHA

#define WINED3DPBLENDCAPS_BOTHINVSRCALPHA   0x00001000

Definition at line 1090 of file wined3d.h.

◆ WINED3DPBLENDCAPS_BOTHSRCALPHA

#define WINED3DPBLENDCAPS_BOTHSRCALPHA   0x00000800

Definition at line 1089 of file wined3d.h.

◆ WINED3DPBLENDCAPS_DESTALPHA

#define WINED3DPBLENDCAPS_DESTALPHA   0x00000040

Definition at line 1084 of file wined3d.h.

◆ WINED3DPBLENDCAPS_DESTCOLOR

#define WINED3DPBLENDCAPS_DESTCOLOR   0x00000100

Definition at line 1086 of file wined3d.h.

◆ WINED3DPBLENDCAPS_INVDESTALPHA

#define WINED3DPBLENDCAPS_INVDESTALPHA   0x00000080

Definition at line 1085 of file wined3d.h.

◆ WINED3DPBLENDCAPS_INVDESTCOLOR

#define WINED3DPBLENDCAPS_INVDESTCOLOR   0x00000200

Definition at line 1087 of file wined3d.h.

◆ WINED3DPBLENDCAPS_INVSRCALPHA

#define WINED3DPBLENDCAPS_INVSRCALPHA   0x00000020

Definition at line 1083 of file wined3d.h.

◆ WINED3DPBLENDCAPS_INVSRCCOLOR

#define WINED3DPBLENDCAPS_INVSRCCOLOR   0x00000008

Definition at line 1081 of file wined3d.h.

◆ WINED3DPBLENDCAPS_ONE

#define WINED3DPBLENDCAPS_ONE   0x00000002

Definition at line 1079 of file wined3d.h.

◆ WINED3DPBLENDCAPS_SRCALPHA

#define WINED3DPBLENDCAPS_SRCALPHA   0x00000010

Definition at line 1082 of file wined3d.h.

◆ WINED3DPBLENDCAPS_SRCALPHASAT

#define WINED3DPBLENDCAPS_SRCALPHASAT   0x00000400

Definition at line 1088 of file wined3d.h.

◆ WINED3DPBLENDCAPS_SRCCOLOR

#define WINED3DPBLENDCAPS_SRCCOLOR   0x00000004

Definition at line 1080 of file wined3d.h.

◆ WINED3DPBLENDCAPS_ZERO

#define WINED3DPBLENDCAPS_ZERO   0x00000001

Definition at line 1078 of file wined3d.h.

◆ WINED3DPCMPCAPS_ALWAYS

#define WINED3DPCMPCAPS_ALWAYS   0x00000080

Definition at line 1100 of file wined3d.h.

◆ WINED3DPCMPCAPS_EQUAL

#define WINED3DPCMPCAPS_EQUAL   0x00000004

Definition at line 1095 of file wined3d.h.

◆ WINED3DPCMPCAPS_GREATER

#define WINED3DPCMPCAPS_GREATER   0x00000010

Definition at line 1097 of file wined3d.h.

◆ WINED3DPCMPCAPS_GREATEREQUAL

#define WINED3DPCMPCAPS_GREATEREQUAL   0x00000040

Definition at line 1099 of file wined3d.h.

◆ WINED3DPCMPCAPS_LESS

#define WINED3DPCMPCAPS_LESS   0x00000002

Definition at line 1094 of file wined3d.h.

◆ WINED3DPCMPCAPS_LESSEQUAL

#define WINED3DPCMPCAPS_LESSEQUAL   0x00000008

Definition at line 1096 of file wined3d.h.

◆ WINED3DPCMPCAPS_NEVER

#define WINED3DPCMPCAPS_NEVER   0x00000001

Definition at line 1093 of file wined3d.h.

◆ WINED3DPCMPCAPS_NOTEQUAL

#define WINED3DPCMPCAPS_NOTEQUAL   0x00000020

Definition at line 1098 of file wined3d.h.

◆ WINED3DPMISCCAPS_BLENDOP

#define WINED3DPMISCCAPS_BLENDOP   0x00000800

Definition at line 1111 of file wined3d.h.

◆ WINED3DPMISCCAPS_CLIPPLANESCALEDPOINTS

#define WINED3DPMISCCAPS_CLIPPLANESCALEDPOINTS   0x00000100

Definition at line 1108 of file wined3d.h.

◆ WINED3DPMISCCAPS_CLIPTLVERTS

#define WINED3DPMISCCAPS_CLIPTLVERTS   0x00000200

Definition at line 1109 of file wined3d.h.

◆ WINED3DPMISCCAPS_COLORWRITEENABLE

#define WINED3DPMISCCAPS_COLORWRITEENABLE   0x00000080

Definition at line 1107 of file wined3d.h.

◆ WINED3DPMISCCAPS_CULLCCW

#define WINED3DPMISCCAPS_CULLCCW   0x00000040

Definition at line 1106 of file wined3d.h.

◆ WINED3DPMISCCAPS_CULLCW

#define WINED3DPMISCCAPS_CULLCW   0x00000020

Definition at line 1105 of file wined3d.h.

◆ WINED3DPMISCCAPS_CULLNONE

#define WINED3DPMISCCAPS_CULLNONE   0x00000010

Definition at line 1104 of file wined3d.h.

◆ WINED3DPMISCCAPS_FOGANDSPECULARALPHA

#define WINED3DPMISCCAPS_FOGANDSPECULARALPHA   0x00010000

Definition at line 1115 of file wined3d.h.

◆ WINED3DPMISCCAPS_FOGVERTEXCLAMPED

#define WINED3DPMISCCAPS_FOGVERTEXCLAMPED   0x00100000

Definition at line 1119 of file wined3d.h.

◆ WINED3DPMISCCAPS_INDEPENDENTWRITEMASKS

#define WINED3DPMISCCAPS_INDEPENDENTWRITEMASKS   0x00004000

Definition at line 1113 of file wined3d.h.

◆ WINED3DPMISCCAPS_LINEPATTERNREP

#define WINED3DPMISCCAPS_LINEPATTERNREP   0x00000004

Definition at line 1103 of file wined3d.h.

◆ WINED3DPMISCCAPS_MASKZ

#define WINED3DPMISCCAPS_MASKZ   0x00000002

Definition at line 1102 of file wined3d.h.

◆ WINED3DPMISCCAPS_MRTINDEPENDENTBITDEPTHS

#define WINED3DPMISCCAPS_MRTINDEPENDENTBITDEPTHS   0x00040000

Definition at line 1117 of file wined3d.h.

◆ WINED3DPMISCCAPS_MRTPOSTPIXELSHADERBLENDING

#define WINED3DPMISCCAPS_MRTPOSTPIXELSHADERBLENDING   0x00080000

Definition at line 1118 of file wined3d.h.

◆ WINED3DPMISCCAPS_NULLREFERENCE

#define WINED3DPMISCCAPS_NULLREFERENCE   0x00001000

Definition at line 1112 of file wined3d.h.

◆ WINED3DPMISCCAPS_PERSTAGECONSTANT

#define WINED3DPMISCCAPS_PERSTAGECONSTANT   0x00008000

Definition at line 1114 of file wined3d.h.

◆ WINED3DPMISCCAPS_POSTBLENDSRGBCONVERT

#define WINED3DPMISCCAPS_POSTBLENDSRGBCONVERT   0x00200000

Definition at line 1120 of file wined3d.h.

◆ WINED3DPMISCCAPS_SEPARATEALPHABLEND

#define WINED3DPMISCCAPS_SEPARATEALPHABLEND   0x00020000

Definition at line 1116 of file wined3d.h.

◆ WINED3DPMISCCAPS_TSSARGTEMP

#define WINED3DPMISCCAPS_TSSARGTEMP   0x00000400

Definition at line 1110 of file wined3d.h.

◆ WINED3DPRASTERCAPS_ANISOTROPY

#define WINED3DPRASTERCAPS_ANISOTROPY   0x00020000

Definition at line 1214 of file wined3d.h.

◆ WINED3DPRASTERCAPS_ANTIALIASSORTDEPENDENT

#define WINED3DPRASTERCAPS_ANTIALIASSORTDEPENDENT   0x00000400

Definition at line 1209 of file wined3d.h.

◆ WINED3DPRASTERCAPS_ANTIALIASSORTINDEPENDENT

#define WINED3DPRASTERCAPS_ANTIALIASSORTINDEPENDENT   0x00000800

Definition at line 1210 of file wined3d.h.

◆ WINED3DPRASTERCAPS_COLORPERSPECTIVE

#define WINED3DPRASTERCAPS_COLORPERSPECTIVE   0x00400000

Definition at line 1219 of file wined3d.h.

◆ WINED3DPRASTERCAPS_DEPTHBIAS

#define WINED3DPRASTERCAPS_DEPTHBIAS   0x04000000

Definition at line 1222 of file wined3d.h.

◆ WINED3DPRASTERCAPS_DITHER

#define WINED3DPRASTERCAPS_DITHER   0x00000001

Definition at line 1199 of file wined3d.h.

◆ WINED3DPRASTERCAPS_FOGRANGE

#define WINED3DPRASTERCAPS_FOGRANGE   0x00010000

Definition at line 1213 of file wined3d.h.

◆ WINED3DPRASTERCAPS_FOGTABLE

#define WINED3DPRASTERCAPS_FOGTABLE   0x00000100

Definition at line 1207 of file wined3d.h.

◆ WINED3DPRASTERCAPS_FOGVERTEX

#define WINED3DPRASTERCAPS_FOGVERTEX   0x00000080

Definition at line 1206 of file wined3d.h.

◆ WINED3DPRASTERCAPS_MIPMAPLODBIAS

#define WINED3DPRASTERCAPS_MIPMAPLODBIAS   0x00002000

Definition at line 1211 of file wined3d.h.

◆ WINED3DPRASTERCAPS_MULTISAMPLE_TOGGLE

#define WINED3DPRASTERCAPS_MULTISAMPLE_TOGGLE   0x08000000

Definition at line 1223 of file wined3d.h.

◆ WINED3DPRASTERCAPS_PAT

#define WINED3DPRASTERCAPS_PAT   0x00000008

Definition at line 1202 of file wined3d.h.

◆ WINED3DPRASTERCAPS_ROP2

#define WINED3DPRASTERCAPS_ROP2   0x00000002

Definition at line 1200 of file wined3d.h.

◆ WINED3DPRASTERCAPS_SCISSORTEST

#define WINED3DPRASTERCAPS_SCISSORTEST   0x01000000

Definition at line 1220 of file wined3d.h.

◆ WINED3DPRASTERCAPS_SLOPESCALEDEPTHBIAS

#define WINED3DPRASTERCAPS_SLOPESCALEDEPTHBIAS   0x02000000

Definition at line 1221 of file wined3d.h.

◆ WINED3DPRASTERCAPS_STIPPLE

#define WINED3DPRASTERCAPS_STIPPLE   0x00000200

Definition at line 1208 of file wined3d.h.

◆ WINED3DPRASTERCAPS_SUBPIXEL

#define WINED3DPRASTERCAPS_SUBPIXEL   0x00000020

Definition at line 1204 of file wined3d.h.

◆ WINED3DPRASTERCAPS_SUBPIXELX

#define WINED3DPRASTERCAPS_SUBPIXELX   0x00000040

Definition at line 1205 of file wined3d.h.

◆ WINED3DPRASTERCAPS_TRANSLUCENTSORTINDEPENDENT

#define WINED3DPRASTERCAPS_TRANSLUCENTSORTINDEPENDENT   0x00080000

Definition at line 1216 of file wined3d.h.

◆ WINED3DPRASTERCAPS_WBUFFER

#define WINED3DPRASTERCAPS_WBUFFER   0x00040000

Definition at line 1215 of file wined3d.h.

◆ WINED3DPRASTERCAPS_WFOG

#define WINED3DPRASTERCAPS_WFOG   0x00100000

Definition at line 1217 of file wined3d.h.

◆ WINED3DPRASTERCAPS_XOR

#define WINED3DPRASTERCAPS_XOR   0x00000004

Definition at line 1201 of file wined3d.h.

◆ WINED3DPRASTERCAPS_ZBUFFERLESSHSR

#define WINED3DPRASTERCAPS_ZBUFFERLESSHSR   0x00008000

Definition at line 1212 of file wined3d.h.

◆ WINED3DPRASTERCAPS_ZFOG

#define WINED3DPRASTERCAPS_ZFOG   0x00200000

Definition at line 1218 of file wined3d.h.

◆ WINED3DPRASTERCAPS_ZTEST

#define WINED3DPRASTERCAPS_ZTEST   0x00000010

Definition at line 1203 of file wined3d.h.

◆ WINED3DPRESENT_RATE_DEFAULT

#define WINED3DPRESENT_RATE_DEFAULT   0x00000000

Definition at line 959 of file wined3d.h.

◆ WINED3DPS20_MAX_DYNAMICFLOWCONTROLDEPTH

#define WINED3DPS20_MAX_DYNAMICFLOWCONTROLDEPTH   24

Definition at line 1122 of file wined3d.h.

◆ WINED3DPS20_MAX_NUMINSTRUCTIONSLOTS

#define WINED3DPS20_MAX_NUMINSTRUCTIONSLOTS   512

Definition at line 1128 of file wined3d.h.

◆ WINED3DPS20_MAX_NUMTEMPS

#define WINED3DPS20_MAX_NUMTEMPS   32

Definition at line 1124 of file wined3d.h.

◆ WINED3DPS20_MAX_STATICFLOWCONTROLDEPTH

#define WINED3DPS20_MAX_STATICFLOWCONTROLDEPTH   4

Definition at line 1126 of file wined3d.h.

◆ WINED3DPS20_MIN_DYNAMICFLOWCONTROLDEPTH

#define WINED3DPS20_MIN_DYNAMICFLOWCONTROLDEPTH   0

Definition at line 1123 of file wined3d.h.

◆ WINED3DPS20_MIN_NUMINSTRUCTIONSLOTS

#define WINED3DPS20_MIN_NUMINSTRUCTIONSLOTS   96

Definition at line 1129 of file wined3d.h.

◆ WINED3DPS20_MIN_NUMTEMPS

#define WINED3DPS20_MIN_NUMTEMPS   12

Definition at line 1125 of file wined3d.h.

◆ WINED3DPS20_MIN_STATICFLOWCONTROLDEPTH

#define WINED3DPS20_MIN_STATICFLOWCONTROLDEPTH   0

Definition at line 1127 of file wined3d.h.

◆ WINED3DPS20CAPS_ARBITRARYSWIZZLE

#define WINED3DPS20CAPS_ARBITRARYSWIZZLE   0x00000001

Definition at line 1131 of file wined3d.h.

◆ WINED3DPS20CAPS_GRADIENTINSTRUCTIONS

#define WINED3DPS20CAPS_GRADIENTINSTRUCTIONS   0x00000002

Definition at line 1132 of file wined3d.h.

◆ WINED3DPS20CAPS_NODEPENDENTREADLIMIT

#define WINED3DPS20CAPS_NODEPENDENTREADLIMIT   0x00000008

Definition at line 1134 of file wined3d.h.

◆ WINED3DPS20CAPS_NOTEXINSTRUCTIONLIMIT

#define WINED3DPS20CAPS_NOTEXINSTRUCTIONLIMIT   0x00000010

Definition at line 1135 of file wined3d.h.

◆ WINED3DPS20CAPS_PREDICATION

#define WINED3DPS20CAPS_PREDICATION   0x00000004

Definition at line 1133 of file wined3d.h.

◆ WINED3DPSHADECAPS_ALPHAFLATBLEND

#define WINED3DPSHADECAPS_ALPHAFLATBLEND   0x00001000

Definition at line 1237 of file wined3d.h.

◆ WINED3DPSHADECAPS_ALPHAFLATSTIPPLED

#define WINED3DPSHADECAPS_ALPHAFLATSTIPPLED   0x00002000

Definition at line 1238 of file wined3d.h.

◆ WINED3DPSHADECAPS_ALPHAGOURAUDBLEND

#define WINED3DPSHADECAPS_ALPHAGOURAUDBLEND   0x00004000

Definition at line 1239 of file wined3d.h.

◆ WINED3DPSHADECAPS_ALPHAGOURAUDSTIPPLED

#define WINED3DPSHADECAPS_ALPHAGOURAUDSTIPPLED   0x00008000

Definition at line 1240 of file wined3d.h.

◆ WINED3DPSHADECAPS_ALPHAPHONGBLEND

#define WINED3DPSHADECAPS_ALPHAPHONGBLEND   0x00010000

Definition at line 1241 of file wined3d.h.

◆ WINED3DPSHADECAPS_ALPHAPHONGSTIPPLED

#define WINED3DPSHADECAPS_ALPHAPHONGSTIPPLED   0x00020000

Definition at line 1242 of file wined3d.h.

◆ WINED3DPSHADECAPS_COLORFLATMONO

#define WINED3DPSHADECAPS_COLORFLATMONO   0x00000001

Definition at line 1225 of file wined3d.h.

◆ WINED3DPSHADECAPS_COLORFLATRGB

#define WINED3DPSHADECAPS_COLORFLATRGB   0x00000002

Definition at line 1226 of file wined3d.h.

◆ WINED3DPSHADECAPS_COLORGOURAUDMONO

#define WINED3DPSHADECAPS_COLORGOURAUDMONO   0x00000004

Definition at line 1227 of file wined3d.h.

◆ WINED3DPSHADECAPS_COLORGOURAUDRGB

#define WINED3DPSHADECAPS_COLORGOURAUDRGB   0x00000008

Definition at line 1228 of file wined3d.h.

◆ WINED3DPSHADECAPS_COLORPHONGMONO

#define WINED3DPSHADECAPS_COLORPHONGMONO   0x00000010

Definition at line 1229 of file wined3d.h.

◆ WINED3DPSHADECAPS_COLORPHONGRGB

#define WINED3DPSHADECAPS_COLORPHONGRGB   0x00000020

Definition at line 1230 of file wined3d.h.

◆ WINED3DPSHADECAPS_FOGFLAT

#define WINED3DPSHADECAPS_FOGFLAT   0x00040000

Definition at line 1243 of file wined3d.h.

◆ WINED3DPSHADECAPS_FOGGOURAUD

#define WINED3DPSHADECAPS_FOGGOURAUD   0x00080000

Definition at line 1244 of file wined3d.h.

◆ WINED3DPSHADECAPS_FOGPHONG

#define WINED3DPSHADECAPS_FOGPHONG   0x00100000

Definition at line 1245 of file wined3d.h.

◆ WINED3DPSHADECAPS_SPECULARFLATMONO

#define WINED3DPSHADECAPS_SPECULARFLATMONO   0x00000040

Definition at line 1231 of file wined3d.h.

◆ WINED3DPSHADECAPS_SPECULARFLATRGB

#define WINED3DPSHADECAPS_SPECULARFLATRGB   0x00000080

Definition at line 1232 of file wined3d.h.

◆ WINED3DPSHADECAPS_SPECULARGOURAUDMONO

#define WINED3DPSHADECAPS_SPECULARGOURAUDMONO   0x00000100

Definition at line 1233 of file wined3d.h.

◆ WINED3DPSHADECAPS_SPECULARGOURAUDRGB

#define WINED3DPSHADECAPS_SPECULARGOURAUDRGB   0x00000200

Definition at line 1234 of file wined3d.h.

◆ WINED3DPSHADECAPS_SPECULARPHONGMONO

#define WINED3DPSHADECAPS_SPECULARPHONGMONO   0x00000400

Definition at line 1235 of file wined3d.h.

◆ WINED3DPSHADECAPS_SPECULARPHONGRGB

#define WINED3DPSHADECAPS_SPECULARPHONGRGB   0x00000800

Definition at line 1236 of file wined3d.h.

◆ WINED3DPTADDRESSCAPS_BORDER

#define WINED3DPTADDRESSCAPS_BORDER   0x00000008

Definition at line 1140 of file wined3d.h.

◆ WINED3DPTADDRESSCAPS_CLAMP

#define WINED3DPTADDRESSCAPS_CLAMP   0x00000004

Definition at line 1139 of file wined3d.h.

◆ WINED3DPTADDRESSCAPS_INDEPENDENTUV

#define WINED3DPTADDRESSCAPS_INDEPENDENTUV   0x00000010

Definition at line 1141 of file wined3d.h.

◆ WINED3DPTADDRESSCAPS_MIRROR

#define WINED3DPTADDRESSCAPS_MIRROR   0x00000002

Definition at line 1138 of file wined3d.h.

◆ WINED3DPTADDRESSCAPS_MIRRORONCE

#define WINED3DPTADDRESSCAPS_MIRRORONCE   0x00000020

Definition at line 1142 of file wined3d.h.

◆ WINED3DPTADDRESSCAPS_WRAP

#define WINED3DPTADDRESSCAPS_WRAP   0x00000001

Definition at line 1137 of file wined3d.h.

◆ WINED3DPTEXTURECAPS_ALPHA

#define WINED3DPTEXTURECAPS_ALPHA   0x00000004

Definition at line 1249 of file wined3d.h.

◆ WINED3DPTEXTURECAPS_ALPHAPALETTE

#define WINED3DPTEXTURECAPS_ALPHAPALETTE   0x00000080

Definition at line 1254 of file wined3d.h.

◆ WINED3DPTEXTURECAPS_BORDER

#define WINED3DPTEXTURECAPS_BORDER   0x00000010

Definition at line 1251 of file wined3d.h.

◆ WINED3DPTEXTURECAPS_COLORKEYBLEND

#define WINED3DPTEXTURECAPS_COLORKEYBLEND   0x00001000

Definition at line 1258 of file wined3d.h.

◆ WINED3DPTEXTURECAPS_CUBEMAP

#define WINED3DPTEXTURECAPS_CUBEMAP   0x00000800

Definition at line 1257 of file wined3d.h.

◆ WINED3DPTEXTURECAPS_CUBEMAP_POW2

#define WINED3DPTEXTURECAPS_CUBEMAP_POW2   0x00020000

Definition at line 1263 of file wined3d.h.

◆ WINED3DPTEXTURECAPS_MIPCUBEMAP

#define WINED3DPTEXTURECAPS_MIPCUBEMAP   0x00010000

Definition at line 1262 of file wined3d.h.

◆ WINED3DPTEXTURECAPS_MIPMAP

#define WINED3DPTEXTURECAPS_MIPMAP   0x00004000

Definition at line 1260 of file wined3d.h.

◆ WINED3DPTEXTURECAPS_MIPVOLUMEMAP

#define WINED3DPTEXTURECAPS_MIPVOLUMEMAP   0x00008000

Definition at line 1261 of file wined3d.h.

◆ WINED3DPTEXTURECAPS_NONPOW2CONDITIONAL

#define WINED3DPTEXTURECAPS_NONPOW2CONDITIONAL   0x00000100

Definition at line 1255 of file wined3d.h.

◆ WINED3DPTEXTURECAPS_NOPROJECTEDBUMPENV

#define WINED3DPTEXTURECAPS_NOPROJECTEDBUMPENV   0x00200000

Definition at line 1265 of file wined3d.h.

◆ WINED3DPTEXTURECAPS_PERSPECTIVE

#define WINED3DPTEXTURECAPS_PERSPECTIVE   0x00000001

Definition at line 1247 of file wined3d.h.

◆ WINED3DPTEXTURECAPS_POW2

#define WINED3DPTEXTURECAPS_POW2   0x00000002

Definition at line 1248 of file wined3d.h.

◆ WINED3DPTEXTURECAPS_PROJECTED

#define WINED3DPTEXTURECAPS_PROJECTED   0x00000400

Definition at line 1256 of file wined3d.h.

◆ WINED3DPTEXTURECAPS_SQUAREONLY

#define WINED3DPTEXTURECAPS_SQUAREONLY   0x00000020

Definition at line 1252 of file wined3d.h.

◆ WINED3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE

#define WINED3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE   0x00000040

Definition at line 1253 of file wined3d.h.

◆ WINED3DPTEXTURECAPS_TRANSPARENCY

#define WINED3DPTEXTURECAPS_TRANSPARENCY   0x00000008

Definition at line 1250 of file wined3d.h.

◆ WINED3DPTEXTURECAPS_VOLUMEMAP

#define WINED3DPTEXTURECAPS_VOLUMEMAP   0x00002000

Definition at line 1259 of file wined3d.h.

◆ WINED3DPTEXTURECAPS_VOLUMEMAP_POW2

#define WINED3DPTEXTURECAPS_VOLUMEMAP_POW2   0x00040000

Definition at line 1264 of file wined3d.h.

◆ WINED3DPTFILTERCAPS_LINEAR

#define WINED3DPTFILTERCAPS_LINEAR   0x00000002

Definition at line 1268 of file wined3d.h.

◆ WINED3DPTFILTERCAPS_LINEARMIPLINEAR

#define WINED3DPTFILTERCAPS_LINEARMIPLINEAR   0x00000020

Definition at line 1272 of file wined3d.h.

◆ WINED3DPTFILTERCAPS_LINEARMIPNEAREST

#define WINED3DPTFILTERCAPS_LINEARMIPNEAREST   0x00000010

Definition at line 1271 of file wined3d.h.

◆ WINED3DPTFILTERCAPS_MAGFANISOTROPIC

#define WINED3DPTFILTERCAPS_MAGFANISOTROPIC   0x04000000

Definition at line 1280 of file wined3d.h.

◆ WINED3DPTFILTERCAPS_MAGFGAUSSIANQUAD

#define WINED3DPTFILTERCAPS_MAGFGAUSSIANQUAD   0x10000000

Definition at line 1282 of file wined3d.h.

◆ WINED3DPTFILTERCAPS_MAGFLINEAR

#define WINED3DPTFILTERCAPS_MAGFLINEAR   0x02000000

Definition at line 1279 of file wined3d.h.

◆ WINED3DPTFILTERCAPS_MAGFPOINT

#define WINED3DPTFILTERCAPS_MAGFPOINT   0x01000000

Definition at line 1278 of file wined3d.h.

◆ WINED3DPTFILTERCAPS_MAGFPYRAMIDALQUAD

#define WINED3DPTFILTERCAPS_MAGFPYRAMIDALQUAD   0x08000000

Definition at line 1281 of file wined3d.h.

◆ WINED3DPTFILTERCAPS_MINFANISOTROPIC

#define WINED3DPTFILTERCAPS_MINFANISOTROPIC   0x00000400

Definition at line 1275 of file wined3d.h.

◆ WINED3DPTFILTERCAPS_MINFLINEAR

#define WINED3DPTFILTERCAPS_MINFLINEAR   0x00000200

Definition at line 1274 of file wined3d.h.

◆ WINED3DPTFILTERCAPS_MINFPOINT

#define WINED3DPTFILTERCAPS_MINFPOINT   0x00000100

Definition at line 1273 of file wined3d.h.

◆ WINED3DPTFILTERCAPS_MIPFLINEAR

#define WINED3DPTFILTERCAPS_MIPFLINEAR   0x00020000

Definition at line 1277 of file wined3d.h.

◆ WINED3DPTFILTERCAPS_MIPFPOINT

#define WINED3DPTFILTERCAPS_MIPFPOINT   0x00010000

Definition at line 1276 of file wined3d.h.

◆ WINED3DPTFILTERCAPS_MIPLINEAR

#define WINED3DPTFILTERCAPS_MIPLINEAR   0x00000008

Definition at line 1270 of file wined3d.h.

◆ WINED3DPTFILTERCAPS_MIPNEAREST

#define WINED3DPTFILTERCAPS_MIPNEAREST   0x00000004

Definition at line 1269 of file wined3d.h.

◆ WINED3DPTFILTERCAPS_NEAREST

#define WINED3DPTFILTERCAPS_NEAREST   0x00000001

Definition at line 1267 of file wined3d.h.

◆ WINED3DSPD_IUNKNOWN

#define WINED3DSPD_IUNKNOWN   0x00000001

Definition at line 1018 of file wined3d.h.

◆ WINED3DSTENCILCAPS_DECR

#define WINED3DSTENCILCAPS_DECR   0x00000080

Definition at line 1151 of file wined3d.h.

◆ WINED3DSTENCILCAPS_DECRSAT

#define WINED3DSTENCILCAPS_DECRSAT   0x00000010

Definition at line 1148 of file wined3d.h.

◆ WINED3DSTENCILCAPS_INCR

#define WINED3DSTENCILCAPS_INCR   0x00000040

Definition at line 1150 of file wined3d.h.

◆ WINED3DSTENCILCAPS_INCRSAT

#define WINED3DSTENCILCAPS_INCRSAT   0x00000008

Definition at line 1147 of file wined3d.h.

◆ WINED3DSTENCILCAPS_INVERT

#define WINED3DSTENCILCAPS_INVERT   0x00000020

Definition at line 1149 of file wined3d.h.

◆ WINED3DSTENCILCAPS_KEEP

#define WINED3DSTENCILCAPS_KEEP   0x00000001

Definition at line 1144 of file wined3d.h.

◆ WINED3DSTENCILCAPS_REPLACE

#define WINED3DSTENCILCAPS_REPLACE   0x00000004

Definition at line 1146 of file wined3d.h.

◆ WINED3DSTENCILCAPS_TWOSIDED

#define WINED3DSTENCILCAPS_TWOSIDED   0x00000100

Definition at line 1152 of file wined3d.h.

◆ WINED3DSTENCILCAPS_ZERO

#define WINED3DSTENCILCAPS_ZERO   0x00000002

Definition at line 1145 of file wined3d.h.

◆ WINED3DSTREAMSOURCE_INDEXEDDATA

#define WINED3DSTREAMSOURCE_INDEXEDDATA   (1u << 30)

Definition at line 1014 of file wined3d.h.

◆ WINED3DSTREAMSOURCE_INSTANCEDATA

#define WINED3DSTREAMSOURCE_INSTANCEDATA   (2u << 30)

Definition at line 1015 of file wined3d.h.

◆ WINED3DTA_ALPHAREPLICATE

#define WINED3DTA_ALPHAREPLICATE   0x00000020

Definition at line 889 of file wined3d.h.

◆ WINED3DTA_COMPLEMENT

#define WINED3DTA_COMPLEMENT   0x00000010

Definition at line 888 of file wined3d.h.

◆ WINED3DTA_CONSTANT

#define WINED3DTA_CONSTANT   0x00000006

Definition at line 887 of file wined3d.h.

◆ WINED3DTA_CURRENT

#define WINED3DTA_CURRENT   0x00000001

Definition at line 882 of file wined3d.h.

◆ WINED3DTA_DIFFUSE

#define WINED3DTA_DIFFUSE   0x00000000

Definition at line 881 of file wined3d.h.

◆ WINED3DTA_SELECTMASK

#define WINED3DTA_SELECTMASK   0x0000000f

Definition at line 880 of file wined3d.h.

◆ WINED3DTA_SPECULAR

#define WINED3DTA_SPECULAR   0x00000004

Definition at line 885 of file wined3d.h.

◆ WINED3DTA_TEMP

#define WINED3DTA_TEMP   0x00000005

Definition at line 886 of file wined3d.h.

◆ WINED3DTA_TEXTURE

#define WINED3DTA_TEXTURE   0x00000002

Definition at line 883 of file wined3d.h.

◆ WINED3DTA_TFACTOR

#define WINED3DTA_TFACTOR   0x00000003

Definition at line 884 of file wined3d.h.

◆ WINED3DTEXOPCAPS_ADD

#define WINED3DTEXOPCAPS_ADD   0x00000040

Definition at line 1160 of file wined3d.h.

◆ WINED3DTEXOPCAPS_ADDSIGNED

#define WINED3DTEXOPCAPS_ADDSIGNED   0x00000080

Definition at line 1161 of file wined3d.h.

◆ WINED3DTEXOPCAPS_ADDSIGNED2X

#define WINED3DTEXOPCAPS_ADDSIGNED2X   0x00000100

Definition at line 1162 of file wined3d.h.

◆ WINED3DTEXOPCAPS_ADDSMOOTH

#define WINED3DTEXOPCAPS_ADDSMOOTH   0x00000400

Definition at line 1164 of file wined3d.h.

◆ WINED3DTEXOPCAPS_BLENDCURRENTALPHA

#define WINED3DTEXOPCAPS_BLENDCURRENTALPHA   0x00008000

Definition at line 1169 of file wined3d.h.

◆ WINED3DTEXOPCAPS_BLENDDIFFUSEALPHA

#define WINED3DTEXOPCAPS_BLENDDIFFUSEALPHA   0x00000800

Definition at line 1165 of file wined3d.h.

◆ WINED3DTEXOPCAPS_BLENDFACTORALPHA

#define WINED3DTEXOPCAPS_BLENDFACTORALPHA   0x00002000

Definition at line 1167 of file wined3d.h.

◆ WINED3DTEXOPCAPS_BLENDTEXTUREALPHA

#define WINED3DTEXOPCAPS_BLENDTEXTUREALPHA   0x00001000

Definition at line 1166 of file wined3d.h.

◆ WINED3DTEXOPCAPS_BLENDTEXTUREALPHAPM

#define WINED3DTEXOPCAPS_BLENDTEXTUREALPHAPM   0x00004000

Definition at line 1168 of file wined3d.h.

◆ WINED3DTEXOPCAPS_BUMPENVMAP

#define WINED3DTEXOPCAPS_BUMPENVMAP   0x00200000

Definition at line 1175 of file wined3d.h.

◆ WINED3DTEXOPCAPS_BUMPENVMAPLUMINANCE

#define WINED3DTEXOPCAPS_BUMPENVMAPLUMINANCE   0x00400000

Definition at line 1176 of file wined3d.h.

◆ WINED3DTEXOPCAPS_DISABLE

#define WINED3DTEXOPCAPS_DISABLE   0x00000001

Definition at line 1154 of file wined3d.h.

◆ WINED3DTEXOPCAPS_DOTPRODUCT3

#define WINED3DTEXOPCAPS_DOTPRODUCT3   0x00800000

Definition at line 1177 of file wined3d.h.

◆ WINED3DTEXOPCAPS_LERP

#define WINED3DTEXOPCAPS_LERP   0x02000000

Definition at line 1179 of file wined3d.h.

◆ WINED3DTEXOPCAPS_MODULATE

#define WINED3DTEXOPCAPS_MODULATE   0x00000008

Definition at line 1157 of file wined3d.h.

◆ WINED3DTEXOPCAPS_MODULATE2X

#define WINED3DTEXOPCAPS_MODULATE2X   0x00000010

Definition at line 1158 of file wined3d.h.

◆ WINED3DTEXOPCAPS_MODULATE4X

#define WINED3DTEXOPCAPS_MODULATE4X   0x00000020

Definition at line 1159 of file wined3d.h.

◆ WINED3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR

#define WINED3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR   0x00020000

Definition at line 1171 of file wined3d.h.

◆ WINED3DTEXOPCAPS_MODULATECOLOR_ADDALPHA

#define WINED3DTEXOPCAPS_MODULATECOLOR_ADDALPHA   0x00040000

Definition at line 1172 of file wined3d.h.

◆ WINED3DTEXOPCAPS_MODULATEINVALPHA_ADDCOLOR

#define WINED3DTEXOPCAPS_MODULATEINVALPHA_ADDCOLOR   0x00080000

Definition at line 1173 of file wined3d.h.

◆ WINED3DTEXOPCAPS_MODULATEINVCOLOR_ADDALPHA

#define WINED3DTEXOPCAPS_MODULATEINVCOLOR_ADDALPHA   0x00100000

Definition at line 1174 of file wined3d.h.

◆ WINED3DTEXOPCAPS_MULTIPLYADD

#define WINED3DTEXOPCAPS_MULTIPLYADD   0x01000000

Definition at line 1178 of file wined3d.h.

◆ WINED3DTEXOPCAPS_PREMODULATE

#define WINED3DTEXOPCAPS_PREMODULATE   0x00010000

Definition at line 1170 of file wined3d.h.

◆ WINED3DTEXOPCAPS_SELECTARG1

#define WINED3DTEXOPCAPS_SELECTARG1   0x00000002

Definition at line 1155 of file wined3d.h.

◆ WINED3DTEXOPCAPS_SELECTARG2

#define WINED3DTEXOPCAPS_SELECTARG2   0x00000004

Definition at line 1156 of file wined3d.h.

◆ WINED3DTEXOPCAPS_SUBTRACT

#define WINED3DTEXOPCAPS_SUBTRACT   0x00000200

Definition at line 1163 of file wined3d.h.

◆ WINED3DTSS_TCI_CAMERASPACENORMAL

#define WINED3DTSS_TCI_CAMERASPACENORMAL   0x10000

Definition at line 875 of file wined3d.h.

◆ WINED3DTSS_TCI_CAMERASPACEPOSITION

#define WINED3DTSS_TCI_CAMERASPACEPOSITION   0x20000

Definition at line 876 of file wined3d.h.

◆ WINED3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR

#define WINED3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR   0x30000

Definition at line 877 of file wined3d.h.

◆ WINED3DTSS_TCI_PASSTHRU

#define WINED3DTSS_TCI_PASSTHRU   0x00000

Definition at line 874 of file wined3d.h.

◆ WINED3DTSS_TCI_SPHEREMAP

#define WINED3DTSS_TCI_SPHEREMAP   0x40000

Definition at line 878 of file wined3d.h.

◆ WINED3DUSAGE_CS

#define WINED3DUSAGE_CS   0x00800000

Definition at line 933 of file wined3d.h.

◆ WINED3DUSAGE_DMAP

#define WINED3DUSAGE_DMAP   0x00004000

Definition at line 928 of file wined3d.h.

◆ WINED3DUSAGE_DONOTCLIP

#define WINED3DUSAGE_DONOTCLIP   0x00000020

Definition at line 920 of file wined3d.h.

◆ WINED3DUSAGE_DYNAMIC

#define WINED3DUSAGE_DYNAMIC   0x00000200

Definition at line 924 of file wined3d.h.

◆ WINED3DUSAGE_LEGACY_CUBEMAP

#define WINED3DUSAGE_LEGACY_CUBEMAP   0x01000000

Definition at line 934 of file wined3d.h.

◆ WINED3DUSAGE_MANAGED

#define WINED3DUSAGE_MANAGED   0x20000000

Definition at line 938 of file wined3d.h.

◆ WINED3DUSAGE_MASK

#define WINED3DUSAGE_MASK   0x10007bf0

Definition at line 930 of file wined3d.h.

◆ WINED3DUSAGE_NPATCHES

#define WINED3DUSAGE_NPATCHES   0x00000100

Definition at line 923 of file wined3d.h.

◆ WINED3DUSAGE_OVERLAY

#define WINED3DUSAGE_OVERLAY   0x08000000

Definition at line 937 of file wined3d.h.

◆ WINED3DUSAGE_OWNDC

#define WINED3DUSAGE_OWNDC   0x02000000

Definition at line 935 of file wined3d.h.

◆ WINED3DUSAGE_POINTS

#define WINED3DUSAGE_POINTS   0x00000040

Definition at line 921 of file wined3d.h.

◆ WINED3DUSAGE_QUERY_FILTER

#define WINED3DUSAGE_QUERY_FILTER   0x00020000

Definition at line 943 of file wined3d.h.

◆ WINED3DUSAGE_QUERY_GENMIPMAP

#define WINED3DUSAGE_QUERY_GENMIPMAP   0x00000400

Definition at line 941 of file wined3d.h.

◆ WINED3DUSAGE_QUERY_LEGACYBUMPMAP

#define WINED3DUSAGE_QUERY_LEGACYBUMPMAP   0x00008000

Definition at line 942 of file wined3d.h.

◆ WINED3DUSAGE_QUERY_MASK

#define WINED3DUSAGE_QUERY_MASK   0x003f8400

Definition at line 949 of file wined3d.h.

◆ WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING

#define WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING   0x00080000

Definition at line 944 of file wined3d.h.

◆ WINED3DUSAGE_QUERY_SRGBREAD

#define WINED3DUSAGE_QUERY_SRGBREAD   0x00010000

Definition at line 945 of file wined3d.h.

◆ WINED3DUSAGE_QUERY_SRGBWRITE

#define WINED3DUSAGE_QUERY_SRGBWRITE   0x00040000

Definition at line 946 of file wined3d.h.

◆ WINED3DUSAGE_QUERY_VERTEXTEXTURE

#define WINED3DUSAGE_QUERY_VERTEXTEXTURE   0x00100000

Definition at line 947 of file wined3d.h.

◆ WINED3DUSAGE_QUERY_WRAPANDMIP

#define WINED3DUSAGE_QUERY_WRAPANDMIP   0x00200000

Definition at line 948 of file wined3d.h.

◆ WINED3DUSAGE_RESTRICT_SHARED_RESOURCE

#define WINED3DUSAGE_RESTRICT_SHARED_RESOURCE   0x00002000

Definition at line 927 of file wined3d.h.

◆ WINED3DUSAGE_RESTRICT_SHARED_RESOURCE_DRIVER

#define WINED3DUSAGE_RESTRICT_SHARED_RESOURCE_DRIVER   0x00001000

Definition at line 926 of file wined3d.h.

◆ WINED3DUSAGE_RESTRICTED_CONTENT

#define WINED3DUSAGE_RESTRICTED_CONTENT   0x00000800

Definition at line 925 of file wined3d.h.

◆ WINED3DUSAGE_RTPATCHES

#define WINED3DUSAGE_RTPATCHES   0x00000080

Definition at line 922 of file wined3d.h.

◆ WINED3DUSAGE_SCRATCH

#define WINED3DUSAGE_SCRATCH   0x00400000

Definition at line 932 of file wined3d.h.

◆ WINED3DUSAGE_SOFTWAREPROCESSING

#define WINED3DUSAGE_SOFTWAREPROCESSING   0x00000010

Definition at line 919 of file wined3d.h.

◆ WINED3DUSAGE_STATICDECL

#define WINED3DUSAGE_STATICDECL   0x04000000

Definition at line 936 of file wined3d.h.

◆ WINED3DUSAGE_TEXTAPI

#define WINED3DUSAGE_TEXTAPI   0x10000000

Definition at line 929 of file wined3d.h.

◆ WINED3DUSAGE_VIDMEM_ACCOUNTING

#define WINED3DUSAGE_VIDMEM_ACCOUNTING   0x40000000

Definition at line 939 of file wined3d.h.

◆ WINED3DVS20_MAX_DYNAMICFLOWCONTROLDEPTH

#define WINED3DVS20_MAX_DYNAMICFLOWCONTROLDEPTH   24

Definition at line 1181 of file wined3d.h.

◆ WINED3DVS20_MAX_NUMTEMPS

#define WINED3DVS20_MAX_NUMTEMPS   32

Definition at line 1183 of file wined3d.h.

◆ WINED3DVS20_MAX_STATICFLOWCONTROLDEPTH

#define WINED3DVS20_MAX_STATICFLOWCONTROLDEPTH   4

Definition at line 1185 of file wined3d.h.

◆ WINED3DVS20_MIN_DYNAMICFLOWCONTROLDEPTH

#define WINED3DVS20_MIN_DYNAMICFLOWCONTROLDEPTH   0

Definition at line 1182 of file wined3d.h.

◆ WINED3DVS20_MIN_NUMTEMPS

#define WINED3DVS20_MIN_NUMTEMPS   12

Definition at line 1184 of file wined3d.h.

◆ WINED3DVS20_MIN_STATICFLOWCONTROLDEPTH

#define WINED3DVS20_MIN_STATICFLOWCONTROLDEPTH   1

Definition at line 1186 of file wined3d.h.

◆ WINED3DVS20CAPS_PREDICATION

#define WINED3DVS20CAPS_PREDICATION   0x00000001

Definition at line 1188 of file wined3d.h.

◆ WINED3DVTXPCAPS_DIRECTIONALLIGHTS

#define WINED3DVTXPCAPS_DIRECTIONALLIGHTS   0x00000008

Definition at line 1287 of file wined3d.h.

◆ WINED3DVTXPCAPS_LOCALVIEWER

#define WINED3DVTXPCAPS_LOCALVIEWER   0x00000020

Definition at line 1289 of file wined3d.h.

◆ WINED3DVTXPCAPS_MATERIALSOURCE7

#define WINED3DVTXPCAPS_MATERIALSOURCE7   0x00000002

Definition at line 1285 of file wined3d.h.

◆ WINED3DVTXPCAPS_NO_TEXGEN_NONLOCALVIEWER

#define WINED3DVTXPCAPS_NO_TEXGEN_NONLOCALVIEWER   0x00000200

Definition at line 1292 of file wined3d.h.

◆ WINED3DVTXPCAPS_POSITIONALLIGHTS

#define WINED3DVTXPCAPS_POSITIONALLIGHTS   0x00000010

Definition at line 1288 of file wined3d.h.

◆ WINED3DVTXPCAPS_TEXGEN

#define WINED3DVTXPCAPS_TEXGEN   0x00000001

Definition at line 1284 of file wined3d.h.

◆ WINED3DVTXPCAPS_TEXGEN_SPHEREMAP

#define WINED3DVTXPCAPS_TEXGEN_SPHEREMAP   0x00000100

Definition at line 1291 of file wined3d.h.

◆ WINED3DVTXPCAPS_TWEENING

#define WINED3DVTXPCAPS_TWEENING   0x00000040

Definition at line 1290 of file wined3d.h.

◆ WINED3DVTXPCAPS_VERTEXFOG

#define WINED3DVTXPCAPS_VERTEXFOG   0x00000004

Definition at line 1286 of file wined3d.h.

◆ WINEDDBLTFX_ARITHSTRETCHY

#define WINEDDBLTFX_ARITHSTRETCHY   0x00000001

Definition at line 1346 of file wined3d.h.

◆ WINEDDBLTFX_MIRRORLEFTRIGHT

#define WINEDDBLTFX_MIRRORLEFTRIGHT   0x00000002

Definition at line 1348 of file wined3d.h.

◆ WINEDDBLTFX_MIRRORUPDOWN

#define WINEDDBLTFX_MIRRORUPDOWN   0x00000004

Definition at line 1350 of file wined3d.h.

◆ WINEDDBLTFX_NOTEARING

#define WINEDDBLTFX_NOTEARING   0x00000008

Definition at line 1352 of file wined3d.h.

◆ WINEDDBLTFX_ROTATE180

#define WINEDDBLTFX_ROTATE180   0x00000010

Definition at line 1354 of file wined3d.h.

◆ WINEDDBLTFX_ROTATE270

#define WINEDDBLTFX_ROTATE270   0x00000020

Definition at line 1356 of file wined3d.h.

◆ WINEDDBLTFX_ROTATE90

#define WINEDDBLTFX_ROTATE90   0x00000040

Definition at line 1358 of file wined3d.h.

◆ WINEDDBLTFX_ZBUFFERBASEDEST

#define WINEDDBLTFX_ZBUFFERBASEDEST   0x00000100

Definition at line 1362 of file wined3d.h.

◆ WINEDDBLTFX_ZBUFFERRANGE

#define WINEDDBLTFX_ZBUFFERRANGE   0x00000080

Definition at line 1360 of file wined3d.h.

◆ WINEDDCAPS2_AUTOFLIPOVERLAY

#define WINEDDCAPS2_AUTOFLIPOVERLAY   0x00000008

Definition at line 1536 of file wined3d.h.

◆ WINEDDCAPS2_CANBOBHARDWARE

#define WINEDDCAPS2_CANBOBHARDWARE   0x00004000

Definition at line 1547 of file wined3d.h.

◆ WINEDDCAPS2_CANBOBINTERLEAVED

#define WINEDDCAPS2_CANBOBINTERLEAVED   0x00000010

Definition at line 1537 of file wined3d.h.

◆ WINEDDCAPS2_CANBOBNONINTERLEAVED

#define WINEDDCAPS2_CANBOBNONINTERLEAVED   0x00000020

Definition at line 1538 of file wined3d.h.

◆ WINEDDCAPS2_CANCALIBRATEGAMMA

#define WINEDDCAPS2_CANCALIBRATEGAMMA   0x00100000

Definition at line 1551 of file wined3d.h.

◆ WINEDDCAPS2_CANDROPZ16BIT

#define WINEDDCAPS2_CANDROPZ16BIT   0x00000100

Definition at line 1541 of file wined3d.h.

◆ WINEDDCAPS2_CANFLIPODDEVEN

#define WINEDDCAPS2_CANFLIPODDEVEN   0x00002000

Definition at line 1546 of file wined3d.h.

◆ WINEDDCAPS2_CANMANAGETEXTURE

#define WINEDDCAPS2_CANMANAGETEXTURE   0x00800000

Definition at line 1554 of file wined3d.h.

◆ WINEDDCAPS2_CANRENDERWINDOWED

#define WINEDDCAPS2_CANRENDERWINDOWED   0x00080000

Definition at line 1550 of file wined3d.h.

◆ WINEDDCAPS2_CERTIFIED

#define WINEDDCAPS2_CERTIFIED   0x00000001

Definition at line 1533 of file wined3d.h.

◆ WINEDDCAPS2_COLORCONTROLOVERLAY

#define WINEDDCAPS2_COLORCONTROLOVERLAY   0x00000040

Definition at line 1539 of file wined3d.h.

◆ WINEDDCAPS2_COLORCONTROLPRIMARY

#define WINEDDCAPS2_COLORCONTROLPRIMARY   0x00000080

Definition at line 1540 of file wined3d.h.

◆ WINEDDCAPS2_COPYFOURCC

#define WINEDDCAPS2_COPYFOURCC   0x00008000

Definition at line 1548 of file wined3d.h.

◆ WINEDDCAPS2_FLIPINTERVAL

#define WINEDDCAPS2_FLIPINTERVAL   0x00200000

Definition at line 1552 of file wined3d.h.

◆ WINEDDCAPS2_FLIPNOVSYNC

#define WINEDDCAPS2_FLIPNOVSYNC   0x00400000

Definition at line 1553 of file wined3d.h.

◆ WINEDDCAPS2_NO2DDURING3DSCENE

#define WINEDDCAPS2_NO2DDURING3DSCENE   0x00000002

Definition at line 1534 of file wined3d.h.

◆ WINEDDCAPS2_NONLOCALVIDMEM

#define WINEDDCAPS2_NONLOCALVIDMEM   0x00000200

Definition at line 1542 of file wined3d.h.

◆ WINEDDCAPS2_NONLOCALVIDMEMCAPS

#define WINEDDCAPS2_NONLOCALVIDMEMCAPS   0x00000400

Definition at line 1543 of file wined3d.h.

◆ WINEDDCAPS2_NOPAGELOCKREQUIRED

#define WINEDDCAPS2_NOPAGELOCKREQUIRED   0x00000800

Definition at line 1544 of file wined3d.h.

◆ WINEDDCAPS2_PRIMARYGAMMA

#define WINEDDCAPS2_PRIMARYGAMMA   0x00020000

Definition at line 1549 of file wined3d.h.

◆ WINEDDCAPS2_STEREO

#define WINEDDCAPS2_STEREO   0x02000000

Definition at line 1556 of file wined3d.h.

◆ WINEDDCAPS2_SYSTONONLOCAL_AS_SYSTOLOCAL

#define WINEDDCAPS2_SYSTONONLOCAL_AS_SYSTOLOCAL   0x04000000

Definition at line 1557 of file wined3d.h.

◆ WINEDDCAPS2_TEXMANINNONLOCALVIDMEM

#define WINEDDCAPS2_TEXMANINNONLOCALVIDMEM   0x01000000

Definition at line 1555 of file wined3d.h.

◆ WINEDDCAPS2_VIDEOPORT

#define WINEDDCAPS2_VIDEOPORT   0x00000004

Definition at line 1535 of file wined3d.h.

◆ WINEDDCAPS2_WIDESURFACES

#define WINEDDCAPS2_WIDESURFACES   0x00001000

Definition at line 1545 of file wined3d.h.

◆ WINEDDCAPS_3D

#define WINEDDCAPS_3D   0x00000001

Definition at line 1500 of file wined3d.h.

◆ WINEDDCAPS_ALIGNBOUNDARYDEST

#define WINEDDCAPS_ALIGNBOUNDARYDEST   0x00000002

Definition at line 1501 of file wined3d.h.

◆ WINEDDCAPS_ALIGNBOUNDARYSRC

#define WINEDDCAPS_ALIGNBOUNDARYSRC   0x00000008

Definition at line 1503 of file wined3d.h.

◆ WINEDDCAPS_ALIGNSIZEDEST

#define WINEDDCAPS_ALIGNSIZEDEST   0x00000004

Definition at line 1502 of file wined3d.h.

◆ WINEDDCAPS_ALIGNSIZESRC

#define WINEDDCAPS_ALIGNSIZESRC   0x00000010

Definition at line 1504 of file wined3d.h.

◆ WINEDDCAPS_ALIGNSTRIDE

#define WINEDDCAPS_ALIGNSTRIDE   0x00000020

Definition at line 1505 of file wined3d.h.

◆ WINEDDCAPS_ALPHA

#define WINEDDCAPS_ALPHA   0x00800000

Definition at line 1523 of file wined3d.h.

◆ WINEDDCAPS_BANKSWITCHED

#define WINEDDCAPS_BANKSWITCHED   0x08000000

Definition at line 1527 of file wined3d.h.

◆ WINEDDCAPS_BLT

#define WINEDDCAPS_BLT   0x00000040

Definition at line 1506 of file wined3d.h.

◆ WINEDDCAPS_BLTCOLORFILL

#define WINEDDCAPS_BLTCOLORFILL   0x04000000

Definition at line 1526 of file wined3d.h.

◆ WINEDDCAPS_BLTDEPTHFILL

#define WINEDDCAPS_BLTDEPTHFILL   0x10000000

Definition at line 1528 of file wined3d.h.

◆ WINEDDCAPS_BLTFOURCC

#define WINEDDCAPS_BLTFOURCC   0x00000100

Definition at line 1508 of file wined3d.h.

◆ WINEDDCAPS_BLTQUEUE

#define WINEDDCAPS_BLTQUEUE   0x00000080

Definition at line 1507 of file wined3d.h.

◆ WINEDDCAPS_BLTSTRETCH

#define WINEDDCAPS_BLTSTRETCH   0x00000200

Definition at line 1509 of file wined3d.h.

◆ WINEDDCAPS_CANBLTSYSMEM

#define WINEDDCAPS_CANBLTSYSMEM   0x80000000

Definition at line 1531 of file wined3d.h.

◆ WINEDDCAPS_CANCLIP

#define WINEDDCAPS_CANCLIP   0x20000000

Definition at line 1529 of file wined3d.h.

◆ WINEDDCAPS_CANCLIPSTRETCHED

#define WINEDDCAPS_CANCLIPSTRETCHED   0x40000000

Definition at line 1530 of file wined3d.h.

◆ WINEDDCAPS_COLORKEY

#define WINEDDCAPS_COLORKEY   0x00400000

Definition at line 1522 of file wined3d.h.

◆ WINEDDCAPS_COLORKEYHWASSIST

#define WINEDDCAPS_COLORKEYHWASSIST   0x01000000

Definition at line 1524 of file wined3d.h.

◆ WINEDDCAPS_GDI

#define WINEDDCAPS_GDI   0x00000400

Definition at line 1510 of file wined3d.h.

◆ WINEDDCAPS_NOHARDWARE

#define WINEDDCAPS_NOHARDWARE   0x02000000

Definition at line 1525 of file wined3d.h.

◆ WINEDDCAPS_OVERLAY

#define WINEDDCAPS_OVERLAY   0x00000800

Definition at line 1511 of file wined3d.h.

◆ WINEDDCAPS_OVERLAYCANTCLIP

#define WINEDDCAPS_OVERLAYCANTCLIP   0x00001000

Definition at line 1512 of file wined3d.h.

◆ WINEDDCAPS_OVERLAYFOURCC

#define WINEDDCAPS_OVERLAYFOURCC   0x00002000

Definition at line 1513 of file wined3d.h.

◆ WINEDDCAPS_OVERLAYSTRETCH

#define WINEDDCAPS_OVERLAYSTRETCH   0x00004000

Definition at line 1514 of file wined3d.h.

◆ WINEDDCAPS_PALETTE

#define WINEDDCAPS_PALETTE   0x00008000

Definition at line 1515 of file wined3d.h.

◆ WINEDDCAPS_PALETTEVSYNC

#define WINEDDCAPS_PALETTEVSYNC   0x00010000

Definition at line 1516 of file wined3d.h.

◆ WINEDDCAPS_READSCANLINE

#define WINEDDCAPS_READSCANLINE   0x00020000

Definition at line 1517 of file wined3d.h.

◆ WINEDDCAPS_STEREOVIEW

#define WINEDDCAPS_STEREOVIEW   0x00040000

Definition at line 1518 of file wined3d.h.

◆ WINEDDCAPS_VBI

#define WINEDDCAPS_VBI   0x00080000

Definition at line 1519 of file wined3d.h.

◆ WINEDDCAPS_ZBLTS

#define WINEDDCAPS_ZBLTS   0x00100000

Definition at line 1520 of file wined3d.h.

◆ WINEDDCAPS_ZOVERLAYS

#define WINEDDCAPS_ZOVERLAYS   0x00200000

Definition at line 1521 of file wined3d.h.

◆ WINEDDCKEYCAPS_DESTBLT

#define WINEDDCKEYCAPS_DESTBLT   0x00000001

Definition at line 1451 of file wined3d.h.

◆ WINEDDCKEYCAPS_DESTBLTCLRSPACE

#define WINEDDCKEYCAPS_DESTBLTCLRSPACE   0x00000002

Definition at line 1452 of file wined3d.h.

◆ WINEDDCKEYCAPS_DESTBLTCLRSPACEYUV

#define WINEDDCKEYCAPS_DESTBLTCLRSPACEYUV   0x00000004

Definition at line 1453 of file wined3d.h.

◆ WINEDDCKEYCAPS_DESTBLTYUV

#define WINEDDCKEYCAPS_DESTBLTYUV   0x00000008

Definition at line 1454 of file wined3d.h.

◆ WINEDDCKEYCAPS_DESTOVERLAY

#define WINEDDCKEYCAPS_DESTOVERLAY   0x00000010

Definition at line 1455 of file wined3d.h.

◆ WINEDDCKEYCAPS_DESTOVERLAYCLRSPACE

#define WINEDDCKEYCAPS_DESTOVERLAYCLRSPACE   0x00000020

Definition at line 1456 of file wined3d.h.

◆ WINEDDCKEYCAPS_DESTOVERLAYCLRSPACEYUV

#define WINEDDCKEYCAPS_DESTOVERLAYCLRSPACEYUV   0x00000040

Definition at line 1457 of file wined3d.h.

◆ WINEDDCKEYCAPS_DESTOVERLAYONEACTIVE

#define WINEDDCKEYCAPS_DESTOVERLAYONEACTIVE   0x00000080

Definition at line 1458 of file wined3d.h.

◆ WINEDDCKEYCAPS_DESTOVERLAYYUV

#define WINEDDCKEYCAPS_DESTOVERLAYYUV   0x00000100

Definition at line 1459 of file wined3d.h.

◆ WINEDDCKEYCAPS_NOCOSTOVERLAY

#define WINEDDCKEYCAPS_NOCOSTOVERLAY   0x00040000

Definition at line 1469 of file wined3d.h.

◆ WINEDDCKEYCAPS_SRCBLT

#define WINEDDCKEYCAPS_SRCBLT   0x00000200

Definition at line 1460 of file wined3d.h.

◆ WINEDDCKEYCAPS_SRCBLTCLRSPACE

#define WINEDDCKEYCAPS_SRCBLTCLRSPACE   0x00000400

Definition at line 1461 of file wined3d.h.

◆ WINEDDCKEYCAPS_SRCBLTCLRSPACEYUV

#define WINEDDCKEYCAPS_SRCBLTCLRSPACEYUV   0x00000800

Definition at line 1462 of file wined3d.h.

◆ WINEDDCKEYCAPS_SRCBLTYUV

#define WINEDDCKEYCAPS_SRCBLTYUV   0x00001000

Definition at line 1463 of file wined3d.h.

◆ WINEDDCKEYCAPS_SRCOVERLAY

#define WINEDDCKEYCAPS_SRCOVERLAY   0x00002000

Definition at line 1464 of file wined3d.h.

◆ WINEDDCKEYCAPS_SRCOVERLAYCLRSPACE

#define WINEDDCKEYCAPS_SRCOVERLAYCLRSPACE   0x00004000

Definition at line 1465 of file wined3d.h.

◆ WINEDDCKEYCAPS_SRCOVERLAYCLRSPACEYUV

#define WINEDDCKEYCAPS_SRCOVERLAYCLRSPACEYUV   0x00008000

Definition at line 1466 of file wined3d.h.

◆ WINEDDCKEYCAPS_SRCOVERLAYONEACTIVE

#define WINEDDCKEYCAPS_SRCOVERLAYONEACTIVE   0x00010000

Definition at line 1467 of file wined3d.h.

◆ WINEDDCKEYCAPS_SRCOVERLAYYUV

#define WINEDDCKEYCAPS_SRCOVERLAYYUV   0x00020000

Definition at line 1468 of file wined3d.h.

◆ WINEDDERR_INVALIDRECT

#define WINEDDERR_INVALIDRECT   MAKE_WINED3DHRESULT(150)

Definition at line 48 of file wined3d.h.

◆ WINEDDERR_NOTAOVERLAYSURFACE

#define WINEDDERR_NOTAOVERLAYSURFACE   MAKE_WINED3DHRESULT(580)

Definition at line 45 of file wined3d.h.

◆ WINEDDERR_NOTLOCKED

#define WINEDDERR_NOTLOCKED   MAKE_WINED3DHRESULT(584)

Definition at line 46 of file wined3d.h.

◆ WINEDDERR_OVERLAYNOTVISIBLE

#define WINEDDERR_OVERLAYNOTVISIBLE   MAKE_WINED3DHRESULT(577)

Definition at line 49 of file wined3d.h.

◆ WINEDDERR_SURFACEBUSY

#define WINEDDERR_SURFACEBUSY   MAKE_WINED3DHRESULT(430)

Definition at line 47 of file wined3d.h.

◆ WINEDDFLIP_DONOTWAIT

#define WINEDDFLIP_DONOTWAIT   0x00000020

Definition at line 1390 of file wined3d.h.

◆ WINEDDFLIP_EVEN

#define WINEDDFLIP_EVEN   0x00000002 /* only valid for overlay */

Definition at line 1386 of file wined3d.h.

◆ WINEDDFLIP_INTERVAL2

#define WINEDDFLIP_INTERVAL2   0x02000000

Definition at line 1391 of file wined3d.h.

◆ WINEDDFLIP_INTERVAL3

#define WINEDDFLIP_INTERVAL3   0x03000000

Definition at line 1392 of file wined3d.h.

◆ WINEDDFLIP_INTERVAL4

#define WINEDDFLIP_INTERVAL4   0x04000000

Definition at line 1393 of file wined3d.h.

◆ WINEDDFLIP_NOVSYNC

#define WINEDDFLIP_NOVSYNC   0x00000008

Definition at line 1388 of file wined3d.h.

◆ WINEDDFLIP_ODD

#define WINEDDFLIP_ODD   0x00000004 /* only valid for overlay */

Definition at line 1387 of file wined3d.h.

◆ WINEDDFLIP_STEREO

#define WINEDDFLIP_STEREO   0x00000010

Definition at line 1389 of file wined3d.h.

◆ WINEDDFLIP_WAIT

#define WINEDDFLIP_WAIT   0x00000001

Definition at line 1385 of file wined3d.h.

◆ WINEDDFXCAPS_BLTALPHA

#define WINEDDFXCAPS_BLTALPHA   0x00000001

Definition at line 1471 of file wined3d.h.

◆ WINEDDFXCAPS_BLTARITHSTRETCHY

#define WINEDDFXCAPS_BLTARITHSTRETCHY   0x00000020

Definition at line 1474 of file wined3d.h.

◆ WINEDDFXCAPS_BLTARITHSTRETCHYN

#define WINEDDFXCAPS_BLTARITHSTRETCHYN   0x00000010

Definition at line 1473 of file wined3d.h.

◆ WINEDDFXCAPS_BLTMIRRORLEFTRIGHT

#define WINEDDFXCAPS_BLTMIRRORLEFTRIGHT   0x00000040

Definition at line 1475 of file wined3d.h.

◆ WINEDDFXCAPS_BLTMIRRORUPDOWN

#define WINEDDFXCAPS_BLTMIRRORUPDOWN   0x00000080

Definition at line 1476 of file wined3d.h.

◆ WINEDDFXCAPS_BLTROTATION

#define WINEDDFXCAPS_BLTROTATION   0x00000100

Definition at line 1477 of file wined3d.h.

◆ WINEDDFXCAPS_BLTROTATION90

#define WINEDDFXCAPS_BLTROTATION90   0x00000200

Definition at line 1478 of file wined3d.h.

◆ WINEDDFXCAPS_BLTSHRINKX

#define WINEDDFXCAPS_BLTSHRINKX   0x00000400

Definition at line 1479 of file wined3d.h.

◆ WINEDDFXCAPS_BLTSHRINKXN

#define WINEDDFXCAPS_BLTSHRINKXN   0x00000800

Definition at line 1480 of file wined3d.h.

◆ WINEDDFXCAPS_BLTSHRINKY

#define WINEDDFXCAPS_BLTSHRINKY   0x00001000

Definition at line 1481 of file wined3d.h.

◆ WINEDDFXCAPS_BLTSHRINKYN

#define WINEDDFXCAPS_BLTSHRINKYN   0x00002000

Definition at line 1482 of file wined3d.h.

◆ WINEDDFXCAPS_BLTSTRETCHX

#define WINEDDFXCAPS_BLTSTRETCHX   0x00004000

Definition at line 1483 of file wined3d.h.

◆ WINEDDFXCAPS_BLTSTRETCHXN

#define WINEDDFXCAPS_BLTSTRETCHXN   0x00008000

Definition at line 1484 of file wined3d.h.

◆ WINEDDFXCAPS_BLTSTRETCHY

#define WINEDDFXCAPS_BLTSTRETCHY   0x00010000

Definition at line 1485 of file wined3d.h.

◆ WINEDDFXCAPS_BLTSTRETCHYN

#define WINEDDFXCAPS_BLTSTRETCHYN   0x00020000

Definition at line 1486 of file wined3d.h.

◆ WINEDDFXCAPS_OVERLAYALPHA

#define WINEDDFXCAPS_OVERLAYALPHA   0x00000004

Definition at line 1472 of file wined3d.h.

◆ WINEDDFXCAPS_OVERLAYARITHSTRETCHY

#define WINEDDFXCAPS_OVERLAYARITHSTRETCHY   0x00040000

Definition at line 1487 of file wined3d.h.

◆ WINEDDFXCAPS_OVERLAYARITHSTRETCHYN

#define WINEDDFXCAPS_OVERLAYARITHSTRETCHYN   0x00000008

Definition at line 1488 of file wined3d.h.

◆ WINEDDFXCAPS_OVERLAYMIRRORLEFTRIGHT

#define WINEDDFXCAPS_OVERLAYMIRRORLEFTRIGHT   0x08000000

Definition at line 1497 of file wined3d.h.

◆ WINEDDFXCAPS_OVERLAYMIRRORUPDOWN

#define WINEDDFXCAPS_OVERLAYMIRRORUPDOWN   0x10000000

Definition at line 1498 of file wined3d.h.

◆ WINEDDFXCAPS_OVERLAYSHRINKX

#define WINEDDFXCAPS_OVERLAYSHRINKX   0x00080000

Definition at line 1489 of file wined3d.h.

◆ WINEDDFXCAPS_OVERLAYSHRINKXN

#define WINEDDFXCAPS_OVERLAYSHRINKXN   0x00100000

Definition at line 1490 of file wined3d.h.

◆ WINEDDFXCAPS_OVERLAYSHRINKY

#define WINEDDFXCAPS_OVERLAYSHRINKY   0x00200000

Definition at line 1491 of file wined3d.h.

◆ WINEDDFXCAPS_OVERLAYSHRINKYN

#define WINEDDFXCAPS_OVERLAYSHRINKYN   0x00400000

Definition at line 1492 of file wined3d.h.

◆ WINEDDFXCAPS_OVERLAYSTRETCHX

#define WINEDDFXCAPS_OVERLAYSTRETCHX   0x00800000

Definition at line 1493 of file wined3d.h.

◆ WINEDDFXCAPS_OVERLAYSTRETCHXN

#define WINEDDFXCAPS_OVERLAYSTRETCHXN   0x01000000

Definition at line 1494 of file wined3d.h.

◆ WINEDDFXCAPS_OVERLAYSTRETCHY

#define WINEDDFXCAPS_OVERLAYSTRETCHY   0x02000000

Definition at line 1495 of file wined3d.h.

◆ WINEDDFXCAPS_OVERLAYSTRETCHYN

#define WINEDDFXCAPS_OVERLAYSTRETCHYN   0x04000000

Definition at line 1496 of file wined3d.h.

◆ WINEDDGBS_CANBLT

#define WINEDDGBS_CANBLT   0x00000001

Definition at line 1377 of file wined3d.h.

◆ WINEDDGBS_ISBLTDONE

#define WINEDDGBS_ISBLTDONE   0x00000002

Definition at line 1378 of file wined3d.h.

◆ WINEDDGFS_CANFLIP

#define WINEDDGFS_CANFLIP   0x00000001

Definition at line 1381 of file wined3d.h.

◆ WINEDDGFS_ISFLIPDONE

#define WINEDDGFS_ISFLIPDONE   0x00000002

Definition at line 1382 of file wined3d.h.

◆ WINEDDOVER_ADDDIRTYRECT

#define WINEDDOVER_ADDDIRTYRECT   0x00008000

Definition at line 1410 of file wined3d.h.

◆ WINEDDOVER_ALPHADEST

#define WINEDDOVER_ALPHADEST   0x00000001

Definition at line 1395 of file wined3d.h.

◆ WINEDDOVER_ALPHADESTCONSTOVERRIDE

#define WINEDDOVER_ALPHADESTCONSTOVERRIDE   0x00000002

Definition at line 1396 of file wined3d.h.

◆ WINEDDOVER_ALPHADESTNEG

#define WINEDDOVER_ALPHADESTNEG   0x00000004

Definition at line 1397 of file wined3d.h.

◆ WINEDDOVER_ALPHADESTSURFACEOVERRIDE

#define WINEDDOVER_ALPHADESTSURFACEOVERRIDE   0x00000008

Definition at line 1398 of file wined3d.h.

◆ WINEDDOVER_ALPHAEDGEBLEND

#define WINEDDOVER_ALPHAEDGEBLEND   0x00000010

Definition at line 1399 of file wined3d.h.

◆ WINEDDOVER_ALPHASRC

#define WINEDDOVER_ALPHASRC   0x00000020

Definition at line 1400 of file wined3d.h.

◆ WINEDDOVER_ALPHASRCCONSTOVERRIDE

#define WINEDDOVER_ALPHASRCCONSTOVERRIDE   0x00000040

Definition at line 1401 of file wined3d.h.

◆ WINEDDOVER_ALPHASRCNEG

#define WINEDDOVER_ALPHASRCNEG   0x00000080

Definition at line 1402 of file wined3d.h.

◆ WINEDDOVER_ALPHASRCSURFACEOVERRIDE

#define WINEDDOVER_ALPHASRCSURFACEOVERRIDE   0x00000100

Definition at line 1403 of file wined3d.h.

◆ WINEDDOVER_AUTOFLIP

#define WINEDDOVER_AUTOFLIP   0x00100000

Definition at line 1414 of file wined3d.h.

◆ WINEDDOVER_BOB

#define WINEDDOVER_BOB   0x00200000

Definition at line 1415 of file wined3d.h.

◆ WINEDDOVER_DDFX

#define WINEDDOVER_DDFX   0x00080000

Definition at line 1413 of file wined3d.h.

◆ WINEDDOVER_HIDE

#define WINEDDOVER_HIDE   0x00000200

Definition at line 1404 of file wined3d.h.

◆ WINEDDOVER_INTERLEAVED

#define WINEDDOVER_INTERLEAVED   0x00800000

Definition at line 1417 of file wined3d.h.

◆ WINEDDOVER_KEYDEST

#define WINEDDOVER_KEYDEST   0x00000400

Definition at line 1405 of file wined3d.h.

◆ WINEDDOVER_KEYDESTOVERRIDE

#define WINEDDOVER_KEYDESTOVERRIDE   0x00000800

Definition at line 1406 of file wined3d.h.

◆ WINEDDOVER_KEYSRC

#define WINEDDOVER_KEYSRC   0x00001000

Definition at line 1407 of file wined3d.h.

◆ WINEDDOVER_KEYSRCOVERRIDE

#define WINEDDOVER_KEYSRCOVERRIDE   0x00002000

Definition at line 1408 of file wined3d.h.

◆ WINEDDOVER_OVERRIDEBOBWEAVE

#define WINEDDOVER_OVERRIDEBOBWEAVE   0x00400000

Definition at line 1416 of file wined3d.h.

◆ WINEDDOVER_REFRESHALL

#define WINEDDOVER_REFRESHALL   0x00020000

Definition at line 1412 of file wined3d.h.

◆ WINEDDOVER_REFRESHDIRTYRECTS

#define WINEDDOVER_REFRESHDIRTYRECTS   0x00010000

Definition at line 1411 of file wined3d.h.

◆ WINEDDOVER_SHOW

#define WINEDDOVER_SHOW   0x00004000

Definition at line 1409 of file wined3d.h.

◆ WINEDDSCAPS_3DDEVICE

#define WINEDDSCAPS_3DDEVICE   0x00002000

Definition at line 1433 of file wined3d.h.

◆ WINEDDSCAPS_ALLOCONLOAD

#define WINEDDSCAPS_ALLOCONLOAD   0x04000000

Definition at line 1444 of file wined3d.h.

◆ WINEDDSCAPS_ALPHA

#define WINEDDSCAPS_ALPHA   0x00000002

Definition at line 1421 of file wined3d.h.

◆ WINEDDSCAPS_BACKBUFFER

#define WINEDDSCAPS_BACKBUFFER   0x00000004

Definition at line 1422 of file wined3d.h.

◆ WINEDDSCAPS_COMPLEX

#define WINEDDSCAPS_COMPLEX   0x00000008

Definition at line 1423 of file wined3d.h.

◆ WINEDDSCAPS_FLIP

#define WINEDDSCAPS_FLIP   0x00000010

Definition at line 1424 of file wined3d.h.

◆ WINEDDSCAPS_FRONTBUFFER

#define WINEDDSCAPS_FRONTBUFFER   0x00000020

Definition at line 1425 of file wined3d.h.

◆ WINEDDSCAPS_HWCODEC

#define WINEDDSCAPS_HWCODEC   0x00100000

Definition at line 1440 of file wined3d.h.

◆ WINEDDSCAPS_LIVEVIDEO

#define WINEDDSCAPS_LIVEVIDEO   0x00080000

Definition at line 1439 of file wined3d.h.

◆ WINEDDSCAPS_LOCALVIDMEM

#define WINEDDSCAPS_LOCALVIDMEM   0x10000000

Definition at line 1446 of file wined3d.h.

◆ WINEDDSCAPS_MIPMAP

#define WINEDDSCAPS_MIPMAP   0x00400000

Definition at line 1442 of file wined3d.h.

◆ WINEDDSCAPS_MODEX

#define WINEDDSCAPS_MODEX   0x00200000

Definition at line 1441 of file wined3d.h.

◆ WINEDDSCAPS_NONLOCALVIDMEM

#define WINEDDSCAPS_NONLOCALVIDMEM   0x20000000

Definition at line 1447 of file wined3d.h.

◆ WINEDDSCAPS_OFFSCREENPLAIN

#define WINEDDSCAPS_OFFSCREENPLAIN   0x00000040

Definition at line 1426 of file wined3d.h.

◆ WINEDDSCAPS_OPTIMIZED

#define WINEDDSCAPS_OPTIMIZED   0x80000000

Definition at line 1449 of file wined3d.h.

◆ WINEDDSCAPS_OVERLAY

#define WINEDDSCAPS_OVERLAY   0x00000080

Definition at line 1427 of file wined3d.h.

◆ WINEDDSCAPS_OWNDC

#define WINEDDSCAPS_OWNDC   0x00040000

Definition at line 1438 of file wined3d.h.

◆ WINEDDSCAPS_PALETTE

#define WINEDDSCAPS_PALETTE   0x00000100

Definition at line 1428 of file wined3d.h.

◆ WINEDDSCAPS_PRIMARYSURFACE

#define WINEDDSCAPS_PRIMARYSURFACE   0x00000200

Definition at line 1429 of file wined3d.h.

◆ WINEDDSCAPS_PRIMARYSURFACELEFT

#define WINEDDSCAPS_PRIMARYSURFACELEFT   0x00000400

Definition at line 1430 of file wined3d.h.

◆ WINEDDSCAPS_RESERVED1

#define WINEDDSCAPS_RESERVED1   0x00000001

Definition at line 1420 of file wined3d.h.

◆ WINEDDSCAPS_RESERVED2

#define WINEDDSCAPS_RESERVED2   0x00800000

Definition at line 1443 of file wined3d.h.

◆ WINEDDSCAPS_STANDARDVGAMODE

#define WINEDDSCAPS_STANDARDVGAMODE   0x40000000

Definition at line 1448 of file wined3d.h.

◆ WINEDDSCAPS_SYSTEMMEMORY

#define WINEDDSCAPS_SYSTEMMEMORY   0x00000800

Definition at line 1431 of file wined3d.h.

◆ WINEDDSCAPS_TEXTURE

#define WINEDDSCAPS_TEXTURE   0x00001000

Definition at line 1432 of file wined3d.h.

◆ WINEDDSCAPS_VIDEOMEMORY

#define WINEDDSCAPS_VIDEOMEMORY   0x00004000

Definition at line 1434 of file wined3d.h.

◆ WINEDDSCAPS_VIDEOPORT

#define WINEDDSCAPS_VIDEOPORT   0x08000000

Definition at line 1445 of file wined3d.h.

◆ WINEDDSCAPS_VISIBLE

#define WINEDDSCAPS_VISIBLE   0x00008000

Definition at line 1435 of file wined3d.h.

◆ WINEDDSCAPS_WRITEONLY

#define WINEDDSCAPS_WRITEONLY   0x00010000

Definition at line 1436 of file wined3d.h.

◆ WINEDDSCAPS_ZBUFFER

#define WINEDDSCAPS_ZBUFFER   0x00020000

Definition at line 1437 of file wined3d.h.

◆ WINEHIGHEST_RENDER_STATE

#define WINEHIGHEST_RENDER_STATE   WINED3D_RS_BLENDOPALPHA

Definition at line 415 of file wined3d.h.

◆ WINEMAKEFOURCC

#define WINEMAKEFOURCC (   ch0,
  ch1,
  ch2,
  ch3 
)
Value:
((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \
((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24))
unsigned long DWORD
Definition: ntddk_ex.h:95
#define DWORD
Definition: nt_native.h:44
unsigned char BYTE
Definition: xxhash.c:193

Definition at line 121 of file wined3d.h.

Typedef Documentation

◆ wined3d_device_reset_cb

typedef HRESULT(CDECL * wined3d_device_reset_cb) (struct wined3d_resource *resource)

Definition at line 2289 of file wined3d.h.

Enumeration Type Documentation

◆ wined3d_basis_type

Enumerator
WINED3D_BASIS_BEZIER 
WINED3D_BASIS_BSPLINE 
WINED3D_BASIS_INTERPOLATE 

Definition at line 686 of file wined3d.h.

687{
691};
@ WINED3D_BASIS_INTERPOLATE
Definition: wined3d.h:690
@ WINED3D_BASIS_BSPLINE
Definition: wined3d.h:689
@ WINED3D_BASIS_BEZIER
Definition: wined3d.h:688

◆ wined3d_blend

Enumerator
WINED3D_BLEND_ZERO 
WINED3D_BLEND_ONE 
WINED3D_BLEND_SRCCOLOR 
WINED3D_BLEND_INVSRCCOLOR 
WINED3D_BLEND_SRCALPHA 
WINED3D_BLEND_INVSRCALPHA 
WINED3D_BLEND_DESTALPHA 
WINED3D_BLEND_INVDESTALPHA 
WINED3D_BLEND_DESTCOLOR 
WINED3D_BLEND_INVDESTCOLOR 
WINED3D_BLEND_SRCALPHASAT 
WINED3D_BLEND_BOTHSRCALPHA 
WINED3D_BLEND_BOTHINVSRCALPHA 
WINED3D_BLEND_BLENDFACTOR 
WINED3D_BLEND_INVBLENDFACTOR 
WINED3D_BLEND_SRC1COLOR 
WINED3D_BLEND_INVSRC1COLOR 
WINED3D_BLEND_SRC1ALPHA 
WINED3D_BLEND_INVSRC1ALPHA 

Definition at line 417 of file wined3d.h.

418{
438};
@ WINED3D_BLEND_ONE
Definition: wined3d.h:420
@ WINED3D_BLEND_INVDESTCOLOR
Definition: wined3d.h:428
@ WINED3D_BLEND_DESTCOLOR
Definition: wined3d.h:427
@ WINED3D_BLEND_INVSRCALPHA
Definition: wined3d.h:424
@ WINED3D_BLEND_INVSRCCOLOR
Definition: wined3d.h:422
@ WINED3D_BLEND_INVDESTALPHA
Definition: wined3d.h:426
@ WINED3D_BLEND_INVBLENDFACTOR
Definition: wined3d.h:433
@ WINED3D_BLEND_INVSRC1COLOR
Definition: wined3d.h:435
@ WINED3D_BLEND_SRC1ALPHA
Definition: wined3d.h:436
@ WINED3D_BLEND_ZERO
Definition: wined3d.h:419
@ WINED3D_BLEND_SRC1COLOR
Definition: wined3d.h:434
@ WINED3D_BLEND_BOTHINVSRCALPHA
Definition: wined3d.h:431
@ WINED3D_BLEND_BOTHSRCALPHA
Definition: wined3d.h:430
@ WINED3D_BLEND_SRCALPHA
Definition: wined3d.h:423
@ WINED3D_BLEND_SRCALPHASAT
Definition: wined3d.h:429
@ WINED3D_BLEND_BLENDFACTOR
Definition: wined3d.h:432
@ WINED3D_BLEND_INVSRC1ALPHA
Definition: wined3d.h:437
@ WINED3D_BLEND_SRCCOLOR
Definition: wined3d.h:421
@ WINED3D_BLEND_DESTALPHA
Definition: wined3d.h:425

◆ wined3d_blend_op

Enumerator
WINED3D_BLEND_OP_ADD 
WINED3D_BLEND_OP_SUBTRACT 
WINED3D_BLEND_OP_REVSUBTRACT 
WINED3D_BLEND_OP_MIN 
WINED3D_BLEND_OP_MAX 

Definition at line 440 of file wined3d.h.

441{
447};
@ WINED3D_BLEND_OP_ADD
Definition: wined3d.h:442
@ WINED3D_BLEND_OP_MIN
Definition: wined3d.h:445
@ WINED3D_BLEND_OP_MAX
Definition: wined3d.h:446
@ WINED3D_BLEND_OP_SUBTRACT
Definition: wined3d.h:443
@ WINED3D_BLEND_OP_REVSUBTRACT
Definition: wined3d.h:444

◆ wined3d_cmp_func

Enumerator
WINED3D_CMP_NEVER 
WINED3D_CMP_LESS 
WINED3D_CMP_EQUAL 
WINED3D_CMP_LESSEQUAL 
WINED3D_CMP_GREATER 
WINED3D_CMP_NOTEQUAL 
WINED3D_CMP_GREATEREQUAL 
WINED3D_CMP_ALWAYS 

Definition at line 459 of file wined3d.h.

460{
469};
@ WINED3D_CMP_ALWAYS
Definition: wined3d.h:468
@ WINED3D_CMP_GREATER
Definition: wined3d.h:465
@ WINED3D_CMP_LESSEQUAL
Definition: wined3d.h:464
@ WINED3D_CMP_NOTEQUAL
Definition: wined3d.h:466
@ WINED3D_CMP_LESS
Definition: wined3d.h:462
@ WINED3D_CMP_EQUAL
Definition: wined3d.h:463
@ WINED3D_CMP_GREATEREQUAL
Definition: wined3d.h:467
@ WINED3D_CMP_NEVER
Definition: wined3d.h:461

◆ wined3d_cubemap_face

Enumerator
WINED3D_CUBEMAP_FACE_POSITIVE_X 
WINED3D_CUBEMAP_FACE_NEGATIVE_X 
WINED3D_CUBEMAP_FACE_POSITIVE_Y 
WINED3D_CUBEMAP_FACE_NEGATIVE_Y 
WINED3D_CUBEMAP_FACE_POSITIVE_Z 
WINED3D_CUBEMAP_FACE_NEGATIVE_Z 

Definition at line 693 of file wined3d.h.

694{
701};
@ WINED3D_CUBEMAP_FACE_NEGATIVE_Z
Definition: wined3d.h:700
@ WINED3D_CUBEMAP_FACE_NEGATIVE_X
Definition: wined3d.h:696
@ WINED3D_CUBEMAP_FACE_POSITIVE_Z
Definition: wined3d.h:699
@ WINED3D_CUBEMAP_FACE_POSITIVE_X
Definition: wined3d.h:695
@ WINED3D_CUBEMAP_FACE_NEGATIVE_Y
Definition: wined3d.h:698
@ WINED3D_CUBEMAP_FACE_POSITIVE_Y
Definition: wined3d.h:697

◆ wined3d_cull

Enumerator
WINED3D_CULL_NONE 
WINED3D_CULL_FRONT 
WINED3D_CULL_BACK 

Definition at line 500 of file wined3d.h.

501{
505};
@ WINED3D_CULL_NONE
Definition: wined3d.h:502
@ WINED3D_CULL_FRONT
Definition: wined3d.h:503
@ WINED3D_CULL_BACK
Definition: wined3d.h:504

◆ wined3d_decl_method

Enumerator
WINED3D_DECL_METHOD_DEFAULT 
WINED3D_DECL_METHOD_PARTIAL_U 
WINED3D_DECL_METHOD_PARTIAL_V 
WINED3D_DECL_METHOD_CROSS_UV 
WINED3D_DECL_METHOD_UV 
WINED3D_DECL_METHOD_LOOKUP 
WINED3D_DECL_METHOD_LOOKUP_PRESAMPLED 

Definition at line 794 of file wined3d.h.

795{
803};
@ WINED3D_DECL_METHOD_LOOKUP
Definition: wined3d.h:801
@ WINED3D_DECL_METHOD_LOOKUP_PRESAMPLED
Definition: wined3d.h:802
@ WINED3D_DECL_METHOD_PARTIAL_V
Definition: wined3d.h:798
@ WINED3D_DECL_METHOD_CROSS_UV
Definition: wined3d.h:799
@ WINED3D_DECL_METHOD_UV
Definition: wined3d.h:800
@ WINED3D_DECL_METHOD_PARTIAL_U
Definition: wined3d.h:797
@ WINED3D_DECL_METHOD_DEFAULT
Definition: wined3d.h:796

◆ wined3d_decl_usage

Enumerator
WINED3D_DECL_USAGE_POSITION 
WINED3D_DECL_USAGE_BLEND_WEIGHT 
WINED3D_DECL_USAGE_BLEND_INDICES 
WINED3D_DECL_USAGE_NORMAL 
WINED3D_DECL_USAGE_PSIZE 
WINED3D_DECL_USAGE_TEXCOORD 
WINED3D_DECL_USAGE_TANGENT 
WINED3D_DECL_USAGE_BINORMAL 
WINED3D_DECL_USAGE_TESS_FACTOR 
WINED3D_DECL_USAGE_POSITIONT 
WINED3D_DECL_USAGE_COLOR 
WINED3D_DECL_USAGE_FOG 
WINED3D_DECL_USAGE_DEPTH 
WINED3D_DECL_USAGE_SAMPLE 

Definition at line 805 of file wined3d.h.

806{
821};
@ WINED3D_DECL_USAGE_DEPTH
Definition: wined3d.h:819
@ WINED3D_DECL_USAGE_BLEND_INDICES
Definition: wined3d.h:809
@ WINED3D_DECL_USAGE_TESS_FACTOR
Definition: wined3d.h:815
@ WINED3D_DECL_USAGE_NORMAL
Definition: wined3d.h:810
@ WINED3D_DECL_USAGE_PSIZE
Definition: wined3d.h:811
@ WINED3D_DECL_USAGE_BLEND_WEIGHT
Definition: wined3d.h:808
@ WINED3D_DECL_USAGE_SAMPLE
Definition: wined3d.h:820
@ WINED3D_DECL_USAGE_POSITION
Definition: wined3d.h:807
@ WINED3D_DECL_USAGE_BINORMAL
Definition: wined3d.h:814
@ WINED3D_DECL_USAGE_COLOR
Definition: wined3d.h:817
@ WINED3D_DECL_USAGE_POSITIONT
Definition: wined3d.h:816
@ WINED3D_DECL_USAGE_TEXCOORD
Definition: wined3d.h:812
@ WINED3D_DECL_USAGE_TANGENT
Definition: wined3d.h:813
@ WINED3D_DECL_USAGE_FOG
Definition: wined3d.h:818

◆ wined3d_degree_type

Enumerator
WINED3D_DEGREE_LINEAR 
WINED3D_DEGREE_QUADRATIC 
WINED3D_DEGREE_CUBIC 
WINED3D_DEGREE_QUINTIC 

Definition at line 113 of file wined3d.h.

114{
119};
@ WINED3D_DEGREE_LINEAR
Definition: wined3d.h:115
@ WINED3D_DEGREE_QUINTIC
Definition: wined3d.h:118
@ WINED3D_DEGREE_CUBIC
Definition: wined3d.h:117
@ WINED3D_DEGREE_QUADRATIC
Definition: wined3d.h:116

◆ wined3d_depth_buffer_type

Enumerator
WINED3D_ZB_FALSE 
WINED3D_ZB_TRUE 
WINED3D_ZB_USEW 

Definition at line 471 of file wined3d.h.

472{
474 WINED3D_ZB_TRUE = 1,
475 WINED3D_ZB_USEW = 2,
476};
@ WINED3D_ZB_TRUE
Definition: wined3d.h:474
@ WINED3D_ZB_USEW
Definition: wined3d.h:475
@ WINED3D_ZB_FALSE
Definition: wined3d.h:473

◆ wined3d_device_type

Enumerator
WINED3D_DEVICE_TYPE_HAL 
WINED3D_DEVICE_TYPE_REF 
WINED3D_DEVICE_TYPE_SW 
WINED3D_DEVICE_TYPE_NULLREF 

Definition at line 89 of file wined3d.h.

90{
95};
@ WINED3D_DEVICE_TYPE_NULLREF
Definition: wined3d.h:94
@ WINED3D_DEVICE_TYPE_SW
Definition: wined3d.h:93
@ WINED3D_DEVICE_TYPE_HAL
Definition: wined3d.h:91
@ WINED3D_DEVICE_TYPE_REF
Definition: wined3d.h:92

◆ wined3d_display_rotation

Enumerator
WINED3D_DISPLAY_ROTATION_UNSPECIFIED 
WINED3D_DISPLAY_ROTATION_0 
WINED3D_DISPLAY_ROTATION_90 
WINED3D_DISPLAY_ROTATION_180 
WINED3D_DISPLAY_ROTATION_270 

Definition at line 830 of file wined3d.h.

831{
837};
@ WINED3D_DISPLAY_ROTATION_270
Definition: wined3d.h:836
@ WINED3D_DISPLAY_ROTATION_0
Definition: wined3d.h:833
@ WINED3D_DISPLAY_ROTATION_180
Definition: wined3d.h:835
@ WINED3D_DISPLAY_ROTATION_UNSPECIFIED
Definition: wined3d.h:832
@ WINED3D_DISPLAY_ROTATION_90
Definition: wined3d.h:834

◆ wined3d_feature_level

Enumerator
WINED3D_FEATURE_LEVEL_NONE 
WINED3D_FEATURE_LEVEL_5 
WINED3D_FEATURE_LEVEL_6 
WINED3D_FEATURE_LEVEL_7 
WINED3D_FEATURE_LEVEL_8 
WINED3D_FEATURE_LEVEL_9_1 
WINED3D_FEATURE_LEVEL_9_2 
WINED3D_FEATURE_LEVEL_9_3 
WINED3D_FEATURE_LEVEL_10 
WINED3D_FEATURE_LEVEL_10_1 
WINED3D_FEATURE_LEVEL_11 
WINED3D_FEATURE_LEVEL_11_1 

Definition at line 97 of file wined3d.h.

98{
111};
@ WINED3D_FEATURE_LEVEL_11
Definition: wined3d.h:109
@ WINED3D_FEATURE_LEVEL_10_1
Definition: wined3d.h:108
@ WINED3D_FEATURE_LEVEL_8
Definition: wined3d.h:103
@ WINED3D_FEATURE_LEVEL_7
Definition: wined3d.h:102
@ WINED3D_FEATURE_LEVEL_6
Definition: wined3d.h:101
@ WINED3D_FEATURE_LEVEL_9_3
Definition: wined3d.h:106
@ WINED3D_FEATURE_LEVEL_10
Definition: wined3d.h:107
@ WINED3D_FEATURE_LEVEL_NONE
Definition: wined3d.h:99
@ WINED3D_FEATURE_LEVEL_11_1
Definition: wined3d.h:110
@ WINED3D_FEATURE_LEVEL_5
Definition: wined3d.h:100
@ WINED3D_FEATURE_LEVEL_9_1
Definition: wined3d.h:104
@ WINED3D_FEATURE_LEVEL_9_2
Definition: wined3d.h:105

◆ wined3d_fill_mode

Enumerator
WINED3D_FILL_POINT 
WINED3D_FILL_WIREFRAME 
WINED3D_FILL_SOLID 

Definition at line 493 of file wined3d.h.

494{
498};
@ WINED3D_FILL_SOLID
Definition: wined3d.h:497
@ WINED3D_FILL_WIREFRAME
Definition: wined3d.h:496
@ WINED3D_FILL_POINT
Definition: wined3d.h:495

◆ wined3d_fog_mode

Enumerator
WINED3D_FOG_NONE 
WINED3D_FOG_EXP 
WINED3D_FOG_EXP2 
WINED3D_FOG_LINEAR 

Definition at line 478 of file wined3d.h.

479{
481 WINED3D_FOG_EXP = 1,
484};
@ WINED3D_FOG_LINEAR
Definition: wined3d.h:483
@ WINED3D_FOG_EXP
Definition: wined3d.h:481
@ WINED3D_FOG_NONE
Definition: wined3d.h:480
@ WINED3D_FOG_EXP2
Definition: wined3d.h:482

◆ wined3d_format_id

Enumerator
WINED3DFMT_UNKNOWN 
WINED3DFMT_B8G8R8_UNORM 
WINED3DFMT_B5G5R5X1_UNORM 
WINED3DFMT_B4G4R4A4_UNORM 
WINED3DFMT_B2G3R3_UNORM 
WINED3DFMT_B2G3R3A8_UNORM 
WINED3DFMT_B4G4R4X4_UNORM 
WINED3DFMT_R8G8B8X8_UNORM 
WINED3DFMT_B10G10R10A2_UNORM 
WINED3DFMT_P8_UINT_A8_UNORM 
WINED3DFMT_P8_UINT 
WINED3DFMT_L8_UNORM 
WINED3DFMT_L8A8_UNORM 
WINED3DFMT_L4A4_UNORM 
WINED3DFMT_R5G5_SNORM_L6_UNORM 
WINED3DFMT_R8G8_SNORM_L8X8_UNORM 
WINED3DFMT_R10G11B11_SNORM 
WINED3DFMT_R10G10B10X2_TYPELESS 
WINED3DFMT_R10G10B10X2_UINT 
WINED3DFMT_R10G10B10X2_SNORM 
WINED3DFMT_R10G10B10_SNORM_A2_UNORM 
WINED3DFMT_D16_LOCKABLE 
WINED3DFMT_D32_UNORM 
WINED3DFMT_S1_UINT_D15_UNORM 
WINED3DFMT_X8D24_UNORM 
WINED3DFMT_S4X4_UINT_D24_UNORM 
WINED3DFMT_L16_UNORM 
WINED3DFMT_S8_UINT_D24_FLOAT 
WINED3DFMT_R8G8_SNORM_Cx 
WINED3DFMT_R32G32B32A32_TYPELESS 
WINED3DFMT_R32G32B32A32_FLOAT 
WINED3DFMT_R32G32B32A32_UINT 
WINED3DFMT_R32G32B32A32_SINT 
WINED3DFMT_R32G32B32_TYPELESS 
WINED3DFMT_R32G32B32_FLOAT 
WINED3DFMT_R32G32B32_UINT 
WINED3DFMT_R32G32B32_SINT 
WINED3DFMT_R16G16B16A16_TYPELESS 
WINED3DFMT_R16G16B16A16_FLOAT 
WINED3DFMT_R16G16B16A16_UNORM 
WINED3DFMT_R16G16B16A16_UINT 
WINED3DFMT_R16G16B16A16_SNORM 
WINED3DFMT_R16G16B16A16_SINT 
WINED3DFMT_R32G32_TYPELESS 
WINED3DFMT_R32G32_FLOAT 
WINED3DFMT_R32G32_UINT 
WINED3DFMT_R32G32_SINT 
WINED3DFMT_R32G8X24_TYPELESS 
WINED3DFMT_D32_FLOAT_S8X24_UINT 
WINED3DFMT_R32_FLOAT_X8X24_TYPELESS 
WINED3DFMT_X32_TYPELESS_G8X24_UINT 
WINED3DFMT_R10G10B10A2_TYPELESS 
WINED3DFMT_R10G10B10A2_UNORM 
WINED3DFMT_R10G10B10A2_UINT 
WINED3DFMT_R10G10B10A2_SNORM 
WINED3DFMT_R10G10B10_XR_BIAS_A2_UNORM 
WINED3DFMT_R11G11B10_FLOAT 
WINED3DFMT_R8G8B8A8_TYPELESS 
WINED3DFMT_R8G8B8A8_UNORM 
WINED3DFMT_R8G8B8A8_UNORM_SRGB 
WINED3DFMT_R8G8B8A8_UINT 
WINED3DFMT_R8G8B8A8_SNORM 
WINED3DFMT_R8G8B8A8_SINT 
WINED3DFMT_R16G16_TYPELESS 
WINED3DFMT_R16G16_FLOAT 
WINED3DFMT_R16G16_UNORM 
WINED3DFMT_R16G16_UINT 
WINED3DFMT_R16G16_SNORM 
WINED3DFMT_R16G16_SINT 
WINED3DFMT_R32_TYPELESS 
WINED3DFMT_D32_FLOAT 
WINED3DFMT_R32_FLOAT 
WINED3DFMT_R32_UINT 
WINED3DFMT_R32_SINT 
WINED3DFMT_R24G8_TYPELESS 
WINED3DFMT_D24_UNORM_S8_UINT 
WINED3DFMT_R24_UNORM_X8_TYPELESS 
WINED3DFMT_X24_TYPELESS_G8_UINT 
WINED3DFMT_R8G8_TYPELESS 
WINED3DFMT_R8G8_UNORM 
WINED3DFMT_R8G8_UINT 
WINED3DFMT_R8G8_SNORM 
WINED3DFMT_R8G8_SINT 
WINED3DFMT_R16_TYPELESS 
WINED3DFMT_R16_FLOAT 
WINED3DFMT_D16_UNORM 
WINED3DFMT_R16_UNORM 
WINED3DFMT_R16_UINT 
WINED3DFMT_R16_SNORM 
WINED3DFMT_R16_SINT 
WINED3DFMT_R8_TYPELESS 
WINED3DFMT_R8_UNORM 
WINED3DFMT_R8_UINT 
WINED3DFMT_R8_SNORM 
WINED3DFMT_R8_SINT 
WINED3DFMT_A8_UNORM 
WINED3DFMT_R1_UNORM 
WINED3DFMT_R9G9B9E5_SHAREDEXP 
WINED3DFMT_R8G8_B8G8_UNORM 
WINED3DFMT_G8R8_G8B8_UNORM 
WINED3DFMT_BC1_TYPELESS 
WINED3DFMT_BC1_UNORM 
WINED3DFMT_BC1_UNORM_SRGB 
WINED3DFMT_BC2_TYPELESS 
WINED3DFMT_BC2_UNORM 
WINED3DFMT_BC2_UNORM_SRGB 
WINED3DFMT_BC3_TYPELESS 
WINED3DFMT_BC3_UNORM 
WINED3DFMT_BC3_UNORM_SRGB 
WINED3DFMT_BC4_TYPELESS 
WINED3DFMT_BC4_UNORM 
WINED3DFMT_BC4_SNORM 
WINED3DFMT_BC5_TYPELESS 
WINED3DFMT_BC5_UNORM 
WINED3DFMT_BC5_SNORM 
WINED3DFMT_B5G6R5_UNORM 
WINED3DFMT_B5G5R5A1_UNORM 
WINED3DFMT_B8G8R8A8_UNORM 
WINED3DFMT_B8G8R8X8_UNORM 
WINED3DFMT_B8G8R8A8_TYPELESS 
WINED3DFMT_B8G8R8A8_UNORM_SRGB 
WINED3DFMT_B8G8R8X8_TYPELESS 
WINED3DFMT_B8G8R8X8_UNORM_SRGB 
WINED3DFMT_BC6H_TYPELESS 
WINED3DFMT_BC6H_UF16 
WINED3DFMT_BC6H_SF16 
WINED3DFMT_BC7_TYPELESS 
WINED3DFMT_BC7_UNORM 
WINED3DFMT_BC7_UNORM_SRGB 
WINED3DFMT_UYVY 
WINED3DFMT_YUY2 
WINED3DFMT_YV12 
WINED3DFMT_DXT1 
WINED3DFMT_DXT2 
WINED3DFMT_DXT3 
WINED3DFMT_DXT4 
WINED3DFMT_DXT5 
WINED3DFMT_MULTI2_ARGB8 
WINED3DFMT_G8R8_G8B8 
WINED3DFMT_R8G8_B8G8 
WINED3DFMT_ATI1N 
WINED3DFMT_ATI2N 
WINED3DFMT_INST 
WINED3DFMT_NVDB 
WINED3DFMT_NVHU 
WINED3DFMT_NVHS 
WINED3DFMT_INTZ 
WINED3DFMT_RESZ 
WINED3DFMT_NULL 
WINED3DFMT_R16 
WINED3DFMT_AL16 
WINED3DFMT_NV12 
WINED3DFMT_DF16 
WINED3DFMT_DF24 
WINED3DFMT_ATOC 
WINED3DFMT_FORCE_DWORD 

Definition at line 125 of file wined3d.h.

126{
256 /* FOURCC formats. */
257 WINED3DFMT_UYVY = WINEMAKEFOURCC('U','Y','V','Y'),
258 WINED3DFMT_YUY2 = WINEMAKEFOURCC('Y','U','Y','2'),
259 WINED3DFMT_YV12 = WINEMAKEFOURCC('Y','V','1','2'),
260 WINED3DFMT_DXT1 = WINEMAKEFOURCC('D','X','T','1'),
261 WINED3DFMT_DXT2 = WINEMAKEFOURCC('D','X','T','2'),
262 WINED3DFMT_DXT3 = WINEMAKEFOURCC('D','X','T','3'),
263 WINED3DFMT_DXT4 = WINEMAKEFOURCC('D','X','T','4'),
264 WINED3DFMT_DXT5 = WINEMAKEFOURCC('D','X','T','5'),
265 WINED3DFMT_MULTI2_ARGB8 = WINEMAKEFOURCC('M','E','T','1'),
266 WINED3DFMT_G8R8_G8B8 = WINEMAKEFOURCC('G','R','G','B'),
267 WINED3DFMT_R8G8_B8G8 = WINEMAKEFOURCC('R','G','B','G'),
268 WINED3DFMT_ATI1N = WINEMAKEFOURCC('A','T','I','1'),
269 WINED3DFMT_ATI2N = WINEMAKEFOURCC('A','T','I','2'),
270 WINED3DFMT_INST = WINEMAKEFOURCC('I','N','S','T'),
271 WINED3DFMT_NVDB = WINEMAKEFOURCC('N','V','D','B'),
272 WINED3DFMT_NVHU = WINEMAKEFOURCC('N','V','H','U'),
273 WINED3DFMT_NVHS = WINEMAKEFOURCC('N','V','H','S'),
274 WINED3DFMT_INTZ = WINEMAKEFOURCC('I','N','T','Z'),
275 WINED3DFMT_RESZ = WINEMAKEFOURCC('R','E','S','Z'),
276 WINED3DFMT_NULL = WINEMAKEFOURCC('N','U','L','L'),
277 WINED3DFMT_R16 = WINEMAKEFOURCC(' ','R','1','6'),
278 WINED3DFMT_AL16 = WINEMAKEFOURCC('A','L','1','6'),
279 WINED3DFMT_NV12 = WINEMAKEFOURCC('N','V','1','2'),
280 WINED3DFMT_DF16 = WINEMAKEFOURCC('D','F','1','6'),
281 WINED3DFMT_DF24 = WINEMAKEFOURCC('D','F','2','4'),
282 WINED3DFMT_ATOC = WINEMAKEFOURCC('A','T','O','C'),
283
284 WINED3DFMT_FORCE_DWORD = 0xffffffff
285};
#define WINEMAKEFOURCC(ch0, ch1, ch2, ch3)
Definition: wined3d.h:121
@ WINED3DFMT_R32G32B32_TYPELESS
Definition: wined3d.h:160
@ WINED3DFMT_RESZ
Definition: wined3d.h:275
@ WINED3DFMT_R8_TYPELESS
Definition: wined3d.h:217
@ WINED3DFMT_B2G3R3_UNORM
Definition: wined3d.h:131
@ WINED3DFMT_BC5_UNORM
Definition: wined3d.h:240
@ WINED3DFMT_R32G32B32_SINT
Definition: wined3d.h:163
@ WINED3DFMT_DF16
Definition: wined3d.h:280
@ WINED3DFMT_R8G8_UNORM
Definition: wined3d.h:206
@ WINED3DFMT_BC7_TYPELESS
Definition: wined3d.h:253
@ WINED3DFMT_BC7_UNORM_SRGB
Definition: wined3d.h:255
@ WINED3DFMT_R32G32_SINT
Definition: wined3d.h:173
@ WINED3DFMT_X24_TYPELESS_G8_UINT
Definition: wined3d.h:204
@ WINED3DFMT_BC2_UNORM_SRGB
Definition: wined3d.h:232
@ WINED3DFMT_FORCE_DWORD
Definition: wined3d.h:284
@ WINED3DFMT_INTZ
Definition: wined3d.h:274
@ WINED3DFMT_B4G4R4A4_UNORM
Definition: wined3d.h:130
@ WINED3DFMT_R16G16_UINT
Definition: wined3d.h:193
@ WINED3DFMT_R16G16_UNORM
Definition: wined3d.h:192
@ WINED3DFMT_R8G8_TYPELESS
Definition: wined3d.h:205
@ WINED3DFMT_R10G10B10X2_UINT
Definition: wined3d.h:145
@ WINED3DFMT_X8D24_UNORM
Definition: wined3d.h:151
@ WINED3DFMT_BC5_SNORM
Definition: wined3d.h:241
@ WINED3DFMT_R32_SINT
Definition: wined3d.h:200
@ WINED3DFMT_DXT2
Definition: wined3d.h:261
@ WINED3DFMT_D32_FLOAT
Definition: wined3d.h:197
@ WINED3DFMT_R10G10B10A2_UNORM
Definition: wined3d.h:179
@ WINED3DFMT_R8_UINT
Definition: wined3d.h:219
@ WINED3DFMT_R8G8_SNORM_Cx
Definition: wined3d.h:155
@ WINED3DFMT_R32G32_FLOAT
Definition: wined3d.h:171
@ WINED3DFMT_R16G16_SNORM
Definition: wined3d.h:194
@ WINED3DFMT_B8G8R8A8_UNORM
Definition: wined3d.h:244
@ WINED3DFMT_R16_UNORM
Definition: wined3d.h:213
@ WINED3DFMT_R24G8_TYPELESS
Definition: wined3d.h:201
@ WINED3DFMT_R10G10B10A2_TYPELESS
Definition: wined3d.h:178
@ WINED3DFMT_R32G32_UINT
Definition: wined3d.h:172
@ WINED3DFMT_R32G32B32_UINT
Definition: wined3d.h:162
@ WINED3DFMT_BC4_TYPELESS
Definition: wined3d.h:236
@ WINED3DFMT_ATI1N
Definition: wined3d.h:268
@ WINED3DFMT_BC2_UNORM
Definition: wined3d.h:231
@ WINED3DFMT_R8_UNORM
Definition: wined3d.h:218
@ WINED3DFMT_R8G8B8A8_SNORM
Definition: wined3d.h:188
@ WINED3DFMT_NV12
Definition: wined3d.h:279
@ WINED3DFMT_S8_UINT_D24_FLOAT
Definition: wined3d.h:154
@ WINED3DFMT_R10G10B10_XR_BIAS_A2_UNORM
Definition: wined3d.h:182
@ WINED3DFMT_NULL
Definition: wined3d.h:276
@ WINED3DFMT_R16_TYPELESS
Definition: wined3d.h:210
@ WINED3DFMT_R16G16B16A16_SINT
Definition: wined3d.h:169
@ WINED3DFMT_D16_LOCKABLE
Definition: wined3d.h:148
@ WINED3DFMT_R10G11B11_SNORM
Definition: wined3d.h:143
@ WINED3DFMT_S1_UINT_D15_UNORM
Definition: wined3d.h:150
@ WINED3DFMT_R16_SINT
Definition: wined3d.h:216
@ WINED3DFMT_B2G3R3A8_UNORM
Definition: wined3d.h:132
@ WINED3DFMT_R8G8_B8G8_UNORM
Definition: wined3d.h:225
@ WINED3DFMT_L8A8_UNORM
Definition: wined3d.h:139
@ WINED3DFMT_R32G32B32_FLOAT
Definition: wined3d.h:161
@ WINED3DFMT_L4A4_UNORM
Definition: wined3d.h:140
@ WINED3DFMT_B8G8R8X8_UNORM
Definition: wined3d.h:245
@ WINED3DFMT_R32_FLOAT_X8X24_TYPELESS
Definition: wined3d.h:176
@ WINED3DFMT_R8G8B8X8_UNORM
Definition: wined3d.h:134
@ WINED3DFMT_BC1_UNORM_SRGB
Definition: wined3d.h:229
@ WINED3DFMT_B5G5R5X1_UNORM
Definition: wined3d.h:129
@ WINED3DFMT_B10G10R10A2_UNORM
Definition: wined3d.h:135
@ WINED3DFMT_R16G16B16A16_FLOAT
Definition: wined3d.h:165
@ WINED3DFMT_D16_UNORM
Definition: wined3d.h:212
@ WINED3DFMT_L8_UNORM
Definition: wined3d.h:138
@ WINED3DFMT_NVHS
Definition: wined3d.h:273
@ WINED3DFMT_R8G8_SNORM
Definition: wined3d.h:208
@ WINED3DFMT_UNKNOWN
Definition: wined3d.h:127
@ WINED3DFMT_R5G5_SNORM_L6_UNORM
Definition: wined3d.h:141
@ WINED3DFMT_R8G8B8A8_TYPELESS
Definition: wined3d.h:184
@ WINED3DFMT_R8G8_UINT
Definition: wined3d.h:207
@ WINED3DFMT_BC7_UNORM
Definition: wined3d.h:254
@ WINED3DFMT_B8G8R8_UNORM
Definition: wined3d.h:128
@ WINED3DFMT_INST
Definition: wined3d.h:270
@ WINED3DFMT_DXT1
Definition: wined3d.h:260
@ WINED3DFMT_R8G8B8A8_UNORM_SRGB
Definition: wined3d.h:186
@ WINED3DFMT_R9G9B9E5_SHAREDEXP
Definition: wined3d.h:224
@ WINED3DFMT_NVDB
Definition: wined3d.h:271
@ WINED3DFMT_B8G8R8X8_TYPELESS
Definition: wined3d.h:248
@ WINED3DFMT_R32_UINT
Definition: wined3d.h:199
@ WINED3DFMT_B5G5R5A1_UNORM
Definition: wined3d.h:243
@ WINED3DFMT_R10G10B10_SNORM_A2_UNORM
Definition: wined3d.h:147
@ WINED3DFMT_R16_FLOAT
Definition: wined3d.h:211
@ WINED3DFMT_DXT3
Definition: wined3d.h:262
@ WINED3DFMT_DXT4
Definition: wined3d.h:263
@ WINED3DFMT_D32_UNORM
Definition: wined3d.h:149
@ WINED3DFMT_R8G8B8A8_UNORM
Definition: wined3d.h:185
@ WINED3DFMT_R10G10B10A2_UINT
Definition: wined3d.h:180
@ WINED3DFMT_G8R8_G8B8_UNORM
Definition: wined3d.h:226
@ WINED3DFMT_R10G10B10X2_TYPELESS
Definition: wined3d.h:144
@ WINED3DFMT_R32G32B32A32_UINT
Definition: wined3d.h:158
@ WINED3DFMT_R16G16B16A16_UNORM
Definition: wined3d.h:166
@ WINED3DFMT_BC3_UNORM
Definition: wined3d.h:234
@ WINED3DFMT_BC6H_UF16
Definition: wined3d.h:251
@ WINED3DFMT_R16G16B16A16_TYPELESS
Definition: wined3d.h:164
@ WINED3DFMT_R10G10B10A2_SNORM
Definition: wined3d.h:181
@ WINED3DFMT_R24_UNORM_X8_TYPELESS
Definition: wined3d.h:203
@ WINED3DFMT_R16
Definition: wined3d.h:277
@ WINED3DFMT_D32_FLOAT_S8X24_UINT
Definition: wined3d.h:175
@ WINED3DFMT_NVHU
Definition: wined3d.h:272
@ WINED3DFMT_R32_FLOAT
Definition: wined3d.h:198
@ WINED3DFMT_R8G8_SNORM_L8X8_UNORM
Definition: wined3d.h:142
@ WINED3DFMT_X32_TYPELESS_G8X24_UINT
Definition: wined3d.h:177
@ WINED3DFMT_YV12
Definition: wined3d.h:259
@ WINED3DFMT_B5G6R5_UNORM
Definition: wined3d.h:242
@ WINED3DFMT_R16G16B16A16_UINT
Definition: wined3d.h:167
@ WINED3DFMT_S4X4_UINT_D24_UNORM
Definition: wined3d.h:152
@ WINED3DFMT_BC1_TYPELESS
Definition: wined3d.h:227
@ WINED3DFMT_B8G8R8X8_UNORM_SRGB
Definition: wined3d.h:249
@ WINED3DFMT_DXT5
Definition: wined3d.h:264
@ WINED3DFMT_BC4_UNORM
Definition: wined3d.h:237
@ WINED3DFMT_B8G8R8A8_TYPELESS
Definition: wined3d.h:246
@ WINED3DFMT_BC3_TYPELESS
Definition: wined3d.h:233
@ WINED3DFMT_R16G16_TYPELESS
Definition: wined3d.h:190
@ WINED3DFMT_R8_SNORM
Definition: wined3d.h:220
@ WINED3DFMT_YUY2
Definition: wined3d.h:258
@ WINED3DFMT_R16G16_FLOAT
Definition: wined3d.h:191
@ WINED3DFMT_G8R8_G8B8
Definition: wined3d.h:266
@ WINED3DFMT_P8_UINT
Definition: wined3d.h:137
@ WINED3DFMT_R8G8B8A8_UINT
Definition: wined3d.h:187
@ WINED3DFMT_L16_UNORM
Definition: wined3d.h:153
@ WINED3DFMT_R16_SNORM
Definition: wined3d.h:215
@ WINED3DFMT_BC6H_TYPELESS
Definition: wined3d.h:250
@ WINED3DFMT_BC1_UNORM
Definition: wined3d.h:228
@ WINED3DFMT_R32G32B32A32_TYPELESS
Definition: wined3d.h:156
@ WINED3DFMT_R32_TYPELESS
Definition: wined3d.h:196
@ WINED3DFMT_R32G8X24_TYPELESS
Definition: wined3d.h:174
@ WINED3DFMT_R16_UINT
Definition: wined3d.h:214
@ WINED3DFMT_R8_SINT
Definition: wined3d.h:221
@ WINED3DFMT_UYVY
Definition: wined3d.h:257
@ WINED3DFMT_BC5_TYPELESS
Definition: wined3d.h:239
@ WINED3DFMT_R8G8_SINT
Definition: wined3d.h:209
@ WINED3DFMT_R32G32B32A32_SINT
Definition: wined3d.h:159
@ WINED3DFMT_DF24
Definition: wined3d.h:281
@ WINED3DFMT_R8G8B8A8_SINT
Definition: wined3d.h:189
@ WINED3DFMT_R10G10B10X2_SNORM
Definition: wined3d.h:146
@ WINED3DFMT_R1_UNORM
Definition: wined3d.h:223
@ WINED3DFMT_ATOC
Definition: wined3d.h:282
@ WINED3DFMT_R11G11B10_FLOAT
Definition: wined3d.h:183
@ WINED3DFMT_B8G8R8A8_UNORM_SRGB
Definition: wined3d.h:247
@ WINED3DFMT_BC3_UNORM_SRGB
Definition: wined3d.h:235
@ WINED3DFMT_A8_UNORM
Definition: wined3d.h:222
@ WINED3DFMT_R32G32B32A32_FLOAT
Definition: wined3d.h:157
@ WINED3DFMT_BC2_TYPELESS
Definition: wined3d.h:230
@ WINED3DFMT_R8G8_B8G8
Definition: wined3d.h:267
@ WINED3DFMT_BC6H_SF16
Definition: wined3d.h:252
@ WINED3DFMT_ATI2N
Definition: wined3d.h:269
@ WINED3DFMT_B4G4R4X4_UNORM
Definition: wined3d.h:133
@ WINED3DFMT_MULTI2_ARGB8
Definition: wined3d.h:265
@ WINED3DFMT_AL16
Definition: wined3d.h:278
@ WINED3DFMT_D24_UNORM_S8_UINT
Definition: wined3d.h:202
@ WINED3DFMT_P8_UINT_A8_UNORM
Definition: wined3d.h:136
@ WINED3DFMT_R16G16B16A16_SNORM
Definition: wined3d.h:168
@ WINED3DFMT_BC4_SNORM
Definition: wined3d.h:238
@ WINED3DFMT_R16G16_SINT
Definition: wined3d.h:195
@ WINED3DFMT_R32G32_TYPELESS
Definition: wined3d.h:170

◆ wined3d_input_classification

Enumerator
WINED3D_INPUT_PER_VERTEX_DATA 
WINED3D_INPUT_PER_INSTANCE_DATA 

Definition at line 1824 of file wined3d.h.

1825{
1828};
@ WINED3D_INPUT_PER_INSTANCE_DATA
Definition: wined3d.h:1827
@ WINED3D_INPUT_PER_VERTEX_DATA
Definition: wined3d.h:1826

◆ wined3d_light_type

Enumerator
WINED3D_LIGHT_POINT 
WINED3D_LIGHT_SPOT 
WINED3D_LIGHT_DIRECTIONAL 
WINED3D_LIGHT_PARALLELPOINT 
WINED3D_LIGHT_GLSPOT 

Definition at line 64 of file wined3d.h.

65{
69 WINED3D_LIGHT_PARALLELPOINT = 4, /* < D3D7 */
70 WINED3D_LIGHT_GLSPOT = 5, /* < D3D5, not actually usable */
71};
@ WINED3D_LIGHT_SPOT
Definition: wined3d.h:67
@ WINED3D_LIGHT_GLSPOT
Definition: wined3d.h:70
@ WINED3D_LIGHT_PARALLELPOINT
Definition: wined3d.h:69
@ WINED3D_LIGHT_POINT
Definition: wined3d.h:66
@ WINED3D_LIGHT_DIRECTIONAL
Definition: wined3d.h:68

◆ wined3d_material_color_source

Enumerator
WINED3D_MCS_MATERIAL 
WINED3D_MCS_COLOR1 
WINED3D_MCS_COLOR2 

Definition at line 519 of file wined3d.h.

520{
524};
@ WINED3D_MCS_COLOR2
Definition: wined3d.h:523
@ WINED3D_MCS_MATERIAL
Definition: wined3d.h:521
@ WINED3D_MCS_COLOR1
Definition: wined3d.h:522

◆ wined3d_memory_segment_group

Enumerator
WINED3D_MEMORY_SEGMENT_GROUP_LOCAL 
WINED3D_MEMORY_SEGMENT_GROUP_NON_LOCAL 

Definition at line 860 of file wined3d.h.

861{
864};
@ WINED3D_MEMORY_SEGMENT_GROUP_NON_LOCAL
Definition: wined3d.h:863
@ WINED3D_MEMORY_SEGMENT_GROUP_LOCAL
Definition: wined3d.h:862

◆ wined3d_multisample_type

Enumerator
WINED3D_MULTISAMPLE_NONE 
WINED3D_MULTISAMPLE_NON_MASKABLE 
WINED3D_MULTISAMPLE_2_SAMPLES 
WINED3D_MULTISAMPLE_3_SAMPLES 
WINED3D_MULTISAMPLE_4_SAMPLES 
WINED3D_MULTISAMPLE_5_SAMPLES 
WINED3D_MULTISAMPLE_6_SAMPLES 
WINED3D_MULTISAMPLE_7_SAMPLES 
WINED3D_MULTISAMPLE_8_SAMPLES 
WINED3D_MULTISAMPLE_9_SAMPLES 
WINED3D_MULTISAMPLE_10_SAMPLES 
WINED3D_MULTISAMPLE_11_SAMPLES 
WINED3D_MULTISAMPLE_12_SAMPLES 
WINED3D_MULTISAMPLE_13_SAMPLES 
WINED3D_MULTISAMPLE_14_SAMPLES 
WINED3D_MULTISAMPLE_15_SAMPLES 
WINED3D_MULTISAMPLE_16_SAMPLES 

Definition at line 571 of file wined3d.h.

572{
590};
@ WINED3D_MULTISAMPLE_6_SAMPLES
Definition: wined3d.h:579
@ WINED3D_MULTISAMPLE_3_SAMPLES
Definition: wined3d.h:576
@ WINED3D_MULTISAMPLE_13_SAMPLES
Definition: wined3d.h:586
@ WINED3D_MULTISAMPLE_NON_MASKABLE
Definition: wined3d.h:574
@ WINED3D_MULTISAMPLE_14_SAMPLES
Definition: wined3d.h:587
@ WINED3D_MULTISAMPLE_11_SAMPLES
Definition: wined3d.h:584
@ WINED3D_MULTISAMPLE_8_SAMPLES
Definition: wined3d.h:581
@ WINED3D_MULTISAMPLE_16_SAMPLES
Definition: wined3d.h:589
@ WINED3D_MULTISAMPLE_12_SAMPLES
Definition: wined3d.h:585
@ WINED3D_MULTISAMPLE_4_SAMPLES
Definition: wined3d.h:577
@ WINED3D_MULTISAMPLE_10_SAMPLES
Definition: wined3d.h:583
@ WINED3D_MULTISAMPLE_15_SAMPLES
Definition: wined3d.h:588
@ WINED3D_MULTISAMPLE_2_SAMPLES
Definition: wined3d.h:575
@ WINED3D_MULTISAMPLE_7_SAMPLES
Definition: wined3d.h:580
@ WINED3D_MULTISAMPLE_5_SAMPLES
Definition: wined3d.h:578
@ WINED3D_MULTISAMPLE_NONE
Definition: wined3d.h:573
@ WINED3D_MULTISAMPLE_9_SAMPLES
Definition: wined3d.h:582

◆ wined3d_patch_edge_style

Enumerator
WINED3D_PATCH_EDGE_DISCRETE 
WINED3D_PATCH_EDGE_CONTINUOUS 

Definition at line 526 of file wined3d.h.

527{
530};
@ WINED3D_PATCH_EDGE_DISCRETE
Definition: wined3d.h:528
@ WINED3D_PATCH_EDGE_CONTINUOUS
Definition: wined3d.h:529

◆ wined3d_pipeline

Enumerator
WINED3D_PIPELINE_GRAPHICS 
WINED3D_PIPELINE_COMPUTE 
WINED3D_PIPELINE_COUNT 

Definition at line 853 of file wined3d.h.

854{
858};
@ WINED3D_PIPELINE_COMPUTE
Definition: wined3d.h:856
@ WINED3D_PIPELINE_COUNT
Definition: wined3d.h:857
@ WINED3D_PIPELINE_GRAPHICS
Definition: wined3d.h:855

◆ wined3d_primitive_type

Enumerator
WINED3D_PT_UNDEFINED 
WINED3D_PT_POINTLIST 
WINED3D_PT_LINELIST 
WINED3D_PT_LINESTRIP 
WINED3D_PT_TRIANGLELIST 
WINED3D_PT_TRIANGLESTRIP 
WINED3D_PT_TRIANGLEFAN 
WINED3D_PT_LINELIST_ADJ 
WINED3D_PT_LINESTRIP_ADJ 
WINED3D_PT_TRIANGLELIST_ADJ 
WINED3D_PT_TRIANGLESTRIP_ADJ 
WINED3D_PT_PATCH 

Definition at line 73 of file wined3d.h.

74{
87};
@ WINED3D_PT_LINESTRIP_ADJ
Definition: wined3d.h:83
@ WINED3D_PT_LINELIST
Definition: wined3d.h:77
@ WINED3D_PT_UNDEFINED
Definition: wined3d.h:75
@ WINED3D_PT_PATCH
Definition: wined3d.h:86
@ WINED3D_PT_POINTLIST
Definition: wined3d.h:76
@ WINED3D_PT_TRIANGLELIST_ADJ
Definition: wined3d.h:84
@ WINED3D_PT_LINELIST_ADJ
Definition: wined3d.h:82
@ WINED3D_PT_TRIANGLESTRIP_ADJ
Definition: wined3d.h:85
@ WINED3D_PT_TRIANGLESTRIP
Definition: wined3d.h:80
@ WINED3D_PT_LINESTRIP
Definition: wined3d.h:78
@ WINED3D_PT_TRIANGLELIST
Definition: wined3d.h:79
@ WINED3D_PT_TRIANGLEFAN
Definition: wined3d.h:81

◆ wined3d_query_type

Enumerator
WINED3D_QUERY_TYPE_VCACHE 
WINED3D_QUERY_TYPE_RESOURCE_MANAGER 
WINED3D_QUERY_TYPE_VERTEX_STATS 
WINED3D_QUERY_TYPE_EVENT 
WINED3D_QUERY_TYPE_OCCLUSION 
WINED3D_QUERY_TYPE_TIMESTAMP 
WINED3D_QUERY_TYPE_TIMESTAMP_DISJOINT 
WINED3D_QUERY_TYPE_TIMESTAMP_FREQ 
WINED3D_QUERY_TYPE_PIPELINE_TIMINGS 
WINED3D_QUERY_TYPE_INTERFACE_TIMINGS 
WINED3D_QUERY_TYPE_VERTEX_TIMINGS 
WINED3D_QUERY_TYPE_PIXEL_TIMINGS 
WINED3D_QUERY_TYPE_BANDWIDTH_TIMINGS 
WINED3D_QUERY_TYPE_CACHE_UTILIZATION 
WINED3D_QUERY_TYPE_MEMORY_PRESSURE 
WINED3D_QUERY_TYPE_PIPELINE_STATISTICS 
WINED3D_QUERY_TYPE_SO_STATISTICS 
WINED3D_QUERY_TYPE_SO_OVERFLOW 
WINED3D_QUERY_TYPE_SO_STATISTICS_STREAM0 
WINED3D_QUERY_TYPE_SO_STATISTICS_STREAM1 
WINED3D_QUERY_TYPE_SO_STATISTICS_STREAM2 
WINED3D_QUERY_TYPE_SO_STATISTICS_STREAM3 
WINED3D_QUERY_TYPE_SO_OVERFLOW_STREAM0 
WINED3D_QUERY_TYPE_SO_OVERFLOW_STREAM1 
WINED3D_QUERY_TYPE_SO_OVERFLOW_STREAM2 
WINED3D_QUERY_TYPE_SO_OVERFLOW_STREAM3 

Definition at line 724 of file wined3d.h.

725{
752};
@ WINED3D_QUERY_TYPE_RESOURCE_MANAGER
Definition: wined3d.h:727
@ WINED3D_QUERY_TYPE_TIMESTAMP_FREQ
Definition: wined3d.h:733
@ WINED3D_QUERY_TYPE_SO_STATISTICS_STREAM2
Definition: wined3d.h:746
@ WINED3D_QUERY_TYPE_PIXEL_TIMINGS
Definition: wined3d.h:737
@ WINED3D_QUERY_TYPE_SO_OVERFLOW_STREAM3
Definition: wined3d.h:751
@ WINED3D_QUERY_TYPE_PIPELINE_TIMINGS
Definition: wined3d.h:734
@ WINED3D_QUERY_TYPE_SO_STATISTICS
Definition: wined3d.h:742
@ WINED3D_QUERY_TYPE_PIPELINE_STATISTICS
Definition: wined3d.h:741
@ WINED3D_QUERY_TYPE_SO_OVERFLOW_STREAM2
Definition: wined3d.h:750
@ WINED3D_QUERY_TYPE_VCACHE
Definition: wined3d.h:726
@ WINED3D_QUERY_TYPE_VERTEX_STATS
Definition: wined3d.h:728
@ WINED3D_QUERY_TYPE_SO_STATISTICS_STREAM0
Definition: wined3d.h:744
@ WINED3D_QUERY_TYPE_SO_OVERFLOW_STREAM0
Definition: wined3d.h:748
@ WINED3D_QUERY_TYPE_BANDWIDTH_TIMINGS
Definition: wined3d.h:738
@ WINED3D_QUERY_TYPE_CACHE_UTILIZATION
Definition: wined3d.h:739
@ WINED3D_QUERY_TYPE_SO_OVERFLOW_STREAM1
Definition: wined3d.h:749
@ WINED3D_QUERY_TYPE_SO_STATISTICS_STREAM1
Definition: wined3d.h:745
@ WINED3D_QUERY_TYPE_TIMESTAMP
Definition: wined3d.h:731
@ WINED3D_QUERY_TYPE_MEMORY_PRESSURE
Definition: wined3d.h:740
@ WINED3D_QUERY_TYPE_SO_OVERFLOW
Definition: wined3d.h:743
@ WINED3D_QUERY_TYPE_EVENT
Definition: wined3d.h:729
@ WINED3D_QUERY_TYPE_TIMESTAMP_DISJOINT
Definition: wined3d.h:732
@ WINED3D_QUERY_TYPE_INTERFACE_TIMINGS
Definition: wined3d.h:735
@ WINED3D_QUERY_TYPE_OCCLUSION
Definition: wined3d.h:730
@ WINED3D_QUERY_TYPE_VERTEX_TIMINGS
Definition: wined3d.h:736
@ WINED3D_QUERY_TYPE_SO_STATISTICS_STREAM3
Definition: wined3d.h:747

◆ wined3d_render_state

Enumerator
WINED3D_RS_ANTIALIAS 
WINED3D_RS_TEXTUREPERSPECTIVE 
WINED3D_RS_WRAPU 
WINED3D_RS_WRAPV 
WINED3D_RS_ZENABLE 
WINED3D_RS_FILLMODE 
WINED3D_RS_SHADEMODE 
WINED3D_RS_LINEPATTERN 
WINED3D_RS_MONOENABLE 
WINED3D_RS_ROP2 
WINED3D_RS_PLANEMASK 
WINED3D_RS_ZWRITEENABLE 
WINED3D_RS_ALPHATESTENABLE 
WINED3D_RS_LASTPIXEL 
WINED3D_RS_SRCBLEND 
WINED3D_RS_DESTBLEND 
WINED3D_RS_CULLMODE 
WINED3D_RS_ZFUNC 
WINED3D_RS_ALPHAREF 
WINED3D_RS_ALPHAFUNC 
WINED3D_RS_DITHERENABLE 
WINED3D_RS_ALPHABLENDENABLE 
WINED3D_RS_FOGENABLE 
WINED3D_RS_SPECULARENABLE 
WINED3D_RS_ZVISIBLE 
WINED3D_RS_SUBPIXEL 
WINED3D_RS_SUBPIXELX 
WINED3D_RS_STIPPLEDALPHA 
WINED3D_RS_FOGCOLOR 
WINED3D_RS_FOGTABLEMODE 
WINED3D_RS_FOGSTART 
WINED3D_RS_FOGEND 
WINED3D_RS_FOGDENSITY 
WINED3D_RS_STIPPLEENABLE 
WINED3D_RS_COLORKEYENABLE 
WINED3D_RS_MIPMAPLODBIAS 
WINED3D_RS_RANGEFOGENABLE 
WINED3D_RS_ANISOTROPY 
WINED3D_RS_FLUSHBATCH 
WINED3D_RS_TRANSLUCENTSORTINDEPENDENT 
WINED3D_RS_STENCILENABLE 
WINED3D_RS_STENCILFAIL 
WINED3D_RS_STENCILZFAIL 
WINED3D_RS_STENCILPASS 
WINED3D_RS_STENCILFUNC 
WINED3D_RS_STENCILREF 
WINED3D_RS_STENCILMASK 
WINED3D_RS_STENCILWRITEMASK 
WINED3D_RS_TEXTUREFACTOR 
WINED3D_RS_WRAP0 
WINED3D_RS_WRAP1 
WINED3D_RS_WRAP2 
WINED3D_RS_WRAP3 
WINED3D_RS_WRAP4 
WINED3D_RS_WRAP5 
WINED3D_RS_WRAP6 
WINED3D_RS_WRAP7 
WINED3D_RS_CLIPPING 
WINED3D_RS_LIGHTING 
WINED3D_RS_EXTENTS 
WINED3D_RS_AMBIENT 
WINED3D_RS_FOGVERTEXMODE 
WINED3D_RS_COLORVERTEX 
WINED3D_RS_LOCALVIEWER 
WINED3D_RS_NORMALIZENORMALS 
WINED3D_RS_COLORKEYBLENDENABLE 
WINED3D_RS_DIFFUSEMATERIALSOURCE 
WINED3D_RS_SPECULARMATERIALSOURCE 
WINED3D_RS_AMBIENTMATERIALSOURCE 
WINED3D_RS_EMISSIVEMATERIALSOURCE 
WINED3D_RS_VERTEXBLEND 
WINED3D_RS_CLIPPLANEENABLE 
WINED3D_RS_SOFTWAREVERTEXPROCESSING 
WINED3D_RS_POINTSIZE 
WINED3D_RS_POINTSIZE_MIN 
WINED3D_RS_POINTSPRITEENABLE 
WINED3D_RS_POINTSCALEENABLE 
WINED3D_RS_POINTSCALE_A 
WINED3D_RS_POINTSCALE_B 
WINED3D_RS_POINTSCALE_C 
WINED3D_RS_MULTISAMPLEANTIALIAS 
WINED3D_RS_MULTISAMPLEMASK 
WINED3D_RS_PATCHEDGESTYLE 
WINED3D_RS_PATCHSEGMENTS 
WINED3D_RS_DEBUGMONITORTOKEN 
WINED3D_RS_POINTSIZE_MAX 
WINED3D_RS_INDEXEDVERTEXBLENDENABLE 
WINED3D_RS_COLORWRITEENABLE 
WINED3D_RS_TWEENFACTOR 
WINED3D_RS_BLENDOP 
WINED3D_RS_POSITIONDEGREE 
WINED3D_RS_NORMALDEGREE 
WINED3D_RS_SCISSORTESTENABLE 
WINED3D_RS_SLOPESCALEDEPTHBIAS 
WINED3D_RS_ANTIALIASEDLINEENABLE 
WINED3D_RS_MINTESSELLATIONLEVEL 
WINED3D_RS_MAXTESSELLATIONLEVEL 
WINED3D_RS_ADAPTIVETESS_X 
WINED3D_RS_ADAPTIVETESS_Y 
WINED3D_RS_ADAPTIVETESS_Z 
WINED3D_RS_ADAPTIVETESS_W 
WINED3D_RS_ENABLEADAPTIVETESSELLATION 
WINED3D_RS_TWOSIDEDSTENCILMODE 
WINED3D_RS_BACK_STENCILFAIL 
WINED3D_RS_BACK_STENCILZFAIL 
WINED3D_RS_BACK_STENCILPASS 
WINED3D_RS_BACK_STENCILFUNC 
WINED3D_RS_COLORWRITEENABLE1 
WINED3D_RS_COLORWRITEENABLE2 
WINED3D_RS_COLORWRITEENABLE3 
WINED3D_RS_BLENDFACTOR 
WINED3D_RS_SRGBWRITEENABLE 
WINED3D_RS_DEPTHBIAS 
WINED3D_RS_WRAP8 
WINED3D_RS_WRAP9 
WINED3D_RS_WRAP10 
WINED3D_RS_WRAP11 
WINED3D_RS_WRAP12 
WINED3D_RS_WRAP13 
WINED3D_RS_WRAP14 
WINED3D_RS_WRAP15 
WINED3D_RS_SEPARATEALPHABLENDENABLE 
WINED3D_RS_SRCBLENDALPHA 
WINED3D_RS_DESTBLENDALPHA 
WINED3D_RS_BLENDOPALPHA 

Definition at line 287 of file wined3d.h.

288{
298 WINED3D_RS_ROP2 = 12,
306 WINED3D_RS_ZFUNC = 23,
338 WINED3D_RS_WRAP0 = 128,
339 WINED3D_RS_WRAP1 = 129,
340 WINED3D_RS_WRAP2 = 130,
341 WINED3D_RS_WRAP3 = 131,
342 WINED3D_RS_WRAP4 = 132,
343 WINED3D_RS_WRAP5 = 133,
344 WINED3D_RS_WRAP6 = 134,
345 WINED3D_RS_WRAP7 = 135,
348 WINED3D_RS_EXTENTS = 138,
349 WINED3D_RS_AMBIENT = 139,
378 WINED3D_RS_BLENDOP = 171,
402 WINED3D_RS_WRAP8 = 198,
403 WINED3D_RS_WRAP9 = 199,
404 WINED3D_RS_WRAP10 = 200,
405 WINED3D_RS_WRAP11 = 201,
406 WINED3D_RS_WRAP12 = 202,
407 WINED3D_RS_WRAP13 = 203,
408 WINED3D_RS_WRAP14 = 204,
409 WINED3D_RS_WRAP15 = 205,
414};
@ WINED3D_RS_TEXTUREFACTOR
Definition: wined3d.h:337
@ WINED3D_RS_COLORKEYENABLE
Definition: wined3d.h:323
@ WINED3D_RS_STENCILFAIL
Definition: wined3d.h:330
@ WINED3D_RS_NORMALDEGREE
Definition: wined3d.h:380
@ WINED3D_RS_WRAP8
Definition: wined3d.h:402
@ WINED3D_RS_LIGHTING
Definition: wined3d.h:347
@ WINED3D_RS_SOFTWAREVERTEXPROCESSING
Definition: wined3d.h:361
@ WINED3D_RS_STIPPLEDALPHA
Definition: wined3d.h:316
@ WINED3D_RS_COLORWRITEENABLE1
Definition: wined3d.h:396
@ WINED3D_RS_STENCILENABLE
Definition: wined3d.h:329
@ WINED3D_RS_COLORVERTEX
Definition: wined3d.h:351
@ WINED3D_RS_TWEENFACTOR
Definition: wined3d.h:377
@ WINED3D_RS_FOGCOLOR
Definition: wined3d.h:317
@ WINED3D_RS_WRAP4
Definition: wined3d.h:342
@ WINED3D_RS_WRAP15
Definition: wined3d.h:409
@ WINED3D_RS_ZENABLE
Definition: wined3d.h:293
@ WINED3D_RS_ANTIALIASEDLINEENABLE
Definition: wined3d.h:383
@ WINED3D_RS_SPECULARMATERIALSOURCE
Definition: wined3d.h:356
@ WINED3D_RS_STENCILPASS
Definition: wined3d.h:332
@ WINED3D_RS_WRAP13
Definition: wined3d.h:407
@ WINED3D_RS_DEBUGMONITORTOKEN
Definition: wined3d.h:373
@ WINED3D_RS_WRAP1
Definition: wined3d.h:339
@ WINED3D_RS_WRAP3
Definition: wined3d.h:341
@ WINED3D_RS_DEPTHBIAS
Definition: wined3d.h:401
@ WINED3D_RS_MAXTESSELLATIONLEVEL
Definition: wined3d.h:385
@ WINED3D_RS_DITHERENABLE
Definition: wined3d.h:309
@ WINED3D_RS_SHADEMODE
Definition: wined3d.h:295
@ WINED3D_RS_CULLMODE
Definition: wined3d.h:305
@ WINED3D_RS_BACK_STENCILPASS
Definition: wined3d.h:394
@ WINED3D_RS_WRAPV
Definition: wined3d.h:292
@ WINED3D_RS_PATCHEDGESTYLE
Definition: wined3d.h:371
@ WINED3D_RS_SCISSORTESTENABLE
Definition: wined3d.h:381
@ WINED3D_RS_LASTPIXEL
Definition: wined3d.h:302
@ WINED3D_RS_VERTEXBLEND
Definition: wined3d.h:359
@ WINED3D_RS_FOGEND
Definition: wined3d.h:320
@ WINED3D_RS_MINTESSELLATIONLEVEL
Definition: wined3d.h:384
@ WINED3D_RS_POINTSCALE_A
Definition: wined3d.h:366
@ WINED3D_RS_MULTISAMPLEMASK
Definition: wined3d.h:370
@ WINED3D_RS_BACK_STENCILFUNC
Definition: wined3d.h:395
@ WINED3D_RS_SRCBLEND
Definition: wined3d.h:303
@ WINED3D_RS_SRGBWRITEENABLE
Definition: wined3d.h:400
@ WINED3D_RS_RANGEFOGENABLE
Definition: wined3d.h:325
@ WINED3D_RS_POINTSIZE_MIN
Definition: wined3d.h:363
@ WINED3D_RS_TEXTUREPERSPECTIVE
Definition: wined3d.h:290
@ WINED3D_RS_ENABLEADAPTIVETESSELLATION
Definition: wined3d.h:390
@ WINED3D_RS_COLORWRITEENABLE3
Definition: wined3d.h:398
@ WINED3D_RS_ALPHABLENDENABLE
Definition: wined3d.h:310
@ WINED3D_RS_WRAPU
Definition: wined3d.h:291
@ WINED3D_RS_ADAPTIVETESS_X
Definition: wined3d.h:386
@ WINED3D_RS_MONOENABLE
Definition: wined3d.h:297
@ WINED3D_RS_LOCALVIEWER
Definition: wined3d.h:352
@ WINED3D_RS_ADAPTIVETESS_Z
Definition: wined3d.h:388
@ WINED3D_RS_WRAP0
Definition: wined3d.h:338
@ WINED3D_RS_STENCILMASK
Definition: wined3d.h:335
@ WINED3D_RS_BLENDOP
Definition: wined3d.h:378
@ WINED3D_RS_POINTSCALE_C
Definition: wined3d.h:368
@ WINED3D_RS_FOGSTART
Definition: wined3d.h:319
@ WINED3D_RS_STENCILFUNC
Definition: wined3d.h:333
@ WINED3D_RS_WRAP7
Definition: wined3d.h:345
@ WINED3D_RS_FOGTABLEMODE
Definition: wined3d.h:318
@ WINED3D_RS_POINTSIZE
Definition: wined3d.h:362
@ WINED3D_RS_POINTSIZE_MAX
Definition: wined3d.h:374
@ WINED3D_RS_ZWRITEENABLE
Definition: wined3d.h:300
@ WINED3D_RS_PLANEMASK
Definition: wined3d.h:299
@ WINED3D_RS_SUBPIXELX
Definition: wined3d.h:315
@ WINED3D_RS_CLIPPLANEENABLE
Definition: wined3d.h:360
@ WINED3D_RS_DESTBLEND
Definition: wined3d.h:304
@ WINED3D_RS_AMBIENTMATERIALSOURCE
Definition: wined3d.h:357
@ WINED3D_RS_WRAP6
Definition: wined3d.h:344
@ WINED3D_RS_STENCILREF
Definition: wined3d.h:334
@ WINED3D_RS_FOGENABLE
Definition: wined3d.h:311
@ WINED3D_RS_POINTSPRITEENABLE
Definition: wined3d.h:364
@ WINED3D_RS_FLUSHBATCH
Definition: wined3d.h:327
@ WINED3D_RS_BACK_STENCILZFAIL
Definition: wined3d.h:393
@ WINED3D_RS_ZFUNC
Definition: wined3d.h:306
@ WINED3D_RS_ROP2
Definition: wined3d.h:298
@ WINED3D_RS_POSITIONDEGREE
Definition: wined3d.h:379
@ WINED3D_RS_MULTISAMPLEANTIALIAS
Definition: wined3d.h:369
@ WINED3D_RS_ANTIALIAS
Definition: wined3d.h:289
@ WINED3D_RS_BACK_STENCILFAIL
Definition: wined3d.h:392
@ WINED3D_RS_COLORWRITEENABLE
Definition: wined3d.h:376
@ WINED3D_RS_SLOPESCALEDEPTHBIAS
Definition: wined3d.h:382
@ WINED3D_RS_DIFFUSEMATERIALSOURCE
Definition: wined3d.h:355
@ WINED3D_RS_ALPHAREF
Definition: wined3d.h:307
@ WINED3D_RS_NORMALIZENORMALS
Definition: wined3d.h:353
@ WINED3D_RS_ANISOTROPY
Definition: wined3d.h:326
@ WINED3D_RS_TWOSIDEDSTENCILMODE
Definition: wined3d.h:391
@ WINED3D_RS_TRANSLUCENTSORTINDEPENDENT
Definition: wined3d.h:328
@ WINED3D_RS_EMISSIVEMATERIALSOURCE
Definition: wined3d.h:358
@ WINED3D_RS_PATCHSEGMENTS
Definition: wined3d.h:372
@ WINED3D_RS_SPECULARENABLE
Definition: wined3d.h:312
@ WINED3D_RS_WRAP2
Definition: wined3d.h:340
@ WINED3D_RS_ADAPTIVETESS_W
Definition: wined3d.h:389
@ WINED3D_RS_FILLMODE
Definition: wined3d.h:294
@ WINED3D_RS_CLIPPING
Definition: wined3d.h:346
@ WINED3D_RS_WRAP10
Definition: wined3d.h:404
@ WINED3D_RS_SRCBLENDALPHA
Definition: wined3d.h:411
@ WINED3D_RS_COLORKEYBLENDENABLE
Definition: wined3d.h:354
@ WINED3D_RS_COLORWRITEENABLE2
Definition: wined3d.h:397
@ WINED3D_RS_POINTSCALEENABLE
Definition: wined3d.h:365
@ WINED3D_RS_WRAP14
Definition: wined3d.h:408
@ WINED3D_RS_FOGVERTEXMODE
Definition: wined3d.h:350
@ WINED3D_RS_STENCILWRITEMASK
Definition: wined3d.h:336
@ WINED3D_RS_AMBIENT
Definition: wined3d.h:349
@ WINED3D_RS_WRAP11
Definition: wined3d.h:405
@ WINED3D_RS_LINEPATTERN
Definition: wined3d.h:296
@ WINED3D_RS_ZVISIBLE
Definition: wined3d.h:313
@ WINED3D_RS_BLENDFACTOR
Definition: wined3d.h:399
@ WINED3D_RS_EXTENTS
Definition: wined3d.h:348
@ WINED3D_RS_BLENDOPALPHA
Definition: wined3d.h:413
@ WINED3D_RS_DESTBLENDALPHA
Definition: wined3d.h:412
@ WINED3D_RS_FOGDENSITY
Definition: wined3d.h:321
@ WINED3D_RS_STENCILZFAIL
Definition: wined3d.h:331
@ WINED3D_RS_SUBPIXEL
Definition: wined3d.h:314
@ WINED3D_RS_POINTSCALE_B
Definition: wined3d.h:367
@ WINED3D_RS_INDEXEDVERTEXBLENDENABLE
Definition: wined3d.h:375
@ WINED3D_RS_MIPMAPLODBIAS
Definition: wined3d.h:324
@ WINED3D_RS_WRAP9
Definition: wined3d.h:403
@ WINED3D_RS_SEPARATEALPHABLENDENABLE
Definition: wined3d.h:410
@ WINED3D_RS_STIPPLEENABLE
Definition: wined3d.h:322
@ WINED3D_RS_WRAP5
Definition: wined3d.h:343
@ WINED3D_RS_ADAPTIVETESS_Y
Definition: wined3d.h:387
@ WINED3D_RS_ALPHATESTENABLE
Definition: wined3d.h:301
@ WINED3D_RS_ALPHAFUNC
Definition: wined3d.h:308
@ WINED3D_RS_WRAP12
Definition: wined3d.h:406

◆ wined3d_renderer

Enumerator
WINED3D_RENDERER_AUTO 
WINED3D_RENDERER_VULKAN 
WINED3D_RENDERER_OPENGL 
WINED3D_RENDERER_NO3D 

Definition at line 56 of file wined3d.h.

57{
62};
@ WINED3D_RENDERER_VULKAN
Definition: wined3d.h:59
@ WINED3D_RENDERER_AUTO
Definition: wined3d.h:58
@ WINED3D_RENDERER_OPENGL
Definition: wined3d.h:60
@ WINED3D_RENDERER_NO3D
Definition: wined3d.h:61

◆ wined3d_resource_type

Enumerator
WINED3D_RTYPE_NONE 
WINED3D_RTYPE_BUFFER 
WINED3D_RTYPE_TEXTURE_1D 
WINED3D_RTYPE_TEXTURE_2D 
WINED3D_RTYPE_TEXTURE_3D 

Definition at line 715 of file wined3d.h.

716{
722};
@ WINED3D_RTYPE_TEXTURE_2D
Definition: wined3d.h:720
@ WINED3D_RTYPE_TEXTURE_1D
Definition: wined3d.h:719
@ WINED3D_RTYPE_NONE
Definition: wined3d.h:717
@ WINED3D_RTYPE_BUFFER
Definition: wined3d.h:718
@ WINED3D_RTYPE_TEXTURE_3D
Definition: wined3d.h:721

◆ wined3d_sampler_state

Enumerator
WINED3D_SAMP_ADDRESS_U 
WINED3D_SAMP_ADDRESS_V 
WINED3D_SAMP_ADDRESS_W 
WINED3D_SAMP_BORDER_COLOR 
WINED3D_SAMP_MAG_FILTER 
WINED3D_SAMP_MIN_FILTER 
WINED3D_SAMP_MIP_FILTER 
WINED3D_SAMP_MIPMAP_LOD_BIAS 
WINED3D_SAMP_MAX_MIP_LEVEL 
WINED3D_SAMP_MAX_ANISOTROPY 
WINED3D_SAMP_SRGB_TEXTURE 
WINED3D_SAMP_ELEMENT_INDEX 
WINED3D_SAMP_DMAP_OFFSET 

Definition at line 553 of file wined3d.h.

554{
568};
@ WINED3D_SAMP_ELEMENT_INDEX
Definition: wined3d.h:566
@ WINED3D_SAMP_MAX_ANISOTROPY
Definition: wined3d.h:564
@ WINED3D_SAMP_MIPMAP_LOD_BIAS
Definition: wined3d.h:562
@ WINED3D_SAMP_MIN_FILTER
Definition: wined3d.h:560
@ WINED3D_SAMP_SRGB_TEXTURE
Definition: wined3d.h:565
@ WINED3D_SAMP_DMAP_OFFSET
Definition: wined3d.h:567
@ WINED3D_SAMP_MIP_FILTER
Definition: wined3d.h:561
@ WINED3D_SAMP_MAG_FILTER
Definition: wined3d.h:559
@ WINED3D_SAMP_BORDER_COLOR
Definition: wined3d.h:558
@ WINED3D_SAMP_ADDRESS_V
Definition: wined3d.h:556
@ WINED3D_SAMP_ADDRESS_U
Definition: wined3d.h:555
@ WINED3D_SAMP_ADDRESS_W
Definition: wined3d.h:557
@ WINED3D_SAMP_MAX_MIP_LEVEL
Definition: wined3d.h:563

◆ wined3d_scanline_ordering

Enumerator
WINED3D_SCANLINE_ORDERING_UNKNOWN 
WINED3D_SCANLINE_ORDERING_PROGRESSIVE 
WINED3D_SCANLINE_ORDERING_INTERLACED 

Definition at line 823 of file wined3d.h.

824{
828};
@ WINED3D_SCANLINE_ORDERING_UNKNOWN
Definition: wined3d.h:825
@ WINED3D_SCANLINE_ORDERING_INTERLACED
Definition: wined3d.h:827
@ WINED3D_SCANLINE_ORDERING_PROGRESSIVE
Definition: wined3d.h:826

◆ wined3d_shade_mode

Enumerator
WINED3D_SHADE_FLAT 
WINED3D_SHADE_GOURAUD 
WINED3D_SHADE_PHONG 

Definition at line 486 of file wined3d.h.

487{
491};
@ WINED3D_SHADE_GOURAUD
Definition: wined3d.h:489
@ WINED3D_SHADE_PHONG
Definition: wined3d.h:490
@ WINED3D_SHADE_FLAT
Definition: wined3d.h:488

◆ wined3d_shader_type

Enumerator
WINED3D_SHADER_TYPE_PIXEL 
WINED3D_SHADER_TYPE_VERTEX 
WINED3D_SHADER_TYPE_GEOMETRY 
WINED3D_SHADER_TYPE_HULL 
WINED3D_SHADER_TYPE_DOMAIN 
WINED3D_SHADER_TYPE_GRAPHICS_COUNT 
WINED3D_SHADER_TYPE_COMPUTE 
WINED3D_SHADER_TYPE_COUNT 
WINED3D_SHADER_TYPE_INVALID 

Definition at line 839 of file wined3d.h.

840{
847
851};
@ WINED3D_SHADER_TYPE_HULL
Definition: wined3d.h:844
@ WINED3D_SHADER_TYPE_PIXEL
Definition: wined3d.h:841
@ WINED3D_SHADER_TYPE_GEOMETRY
Definition: wined3d.h:843
@ WINED3D_SHADER_TYPE_GRAPHICS_COUNT
Definition: wined3d.h:846
@ WINED3D_SHADER_TYPE_DOMAIN
Definition: wined3d.h:845
@ WINED3D_SHADER_TYPE_COMPUTE
Definition: wined3d.h:848
@ WINED3D_SHADER_TYPE_VERTEX
Definition: wined3d.h:842
@ WINED3D_SHADER_TYPE_INVALID
Definition: wined3d.h:850
@ WINED3D_SHADER_TYPE_COUNT
Definition: wined3d.h:849

◆ wined3d_stateblock_type

Enumerator
WINED3D_SBT_ALL 
WINED3D_SBT_PIXEL_STATE 
WINED3D_SBT_VERTEX_STATE 
WINED3D_SBT_RECORDED 
WINED3D_SBT_PRIMARY 

Definition at line 785 of file wined3d.h.

786{
787 WINED3D_SBT_ALL = 1,
790 WINED3D_SBT_RECORDED = 4, /* WineD3D private */
791 WINED3D_SBT_PRIMARY = 5, /* WineD3D private */
792};
@ WINED3D_SBT_PIXEL_STATE
Definition: wined3d.h:788
@ WINED3D_SBT_VERTEX_STATE
Definition: wined3d.h:789
@ WINED3D_SBT_PRIMARY
Definition: wined3d.h:791
@ WINED3D_SBT_ALL
Definition: wined3d.h:787
@ WINED3D_SBT_RECORDED
Definition: wined3d.h:790

◆ wined3d_stencil_op

Enumerator
WINED3D_STENCIL_OP_KEEP 
WINED3D_STENCIL_OP_ZERO 
WINED3D_STENCIL_OP_REPLACE 
WINED3D_STENCIL_OP_INCR_SAT 
WINED3D_STENCIL_OP_DECR_SAT 
WINED3D_STENCIL_OP_INVERT 
WINED3D_STENCIL_OP_INCR 
WINED3D_STENCIL_OP_DECR 

Definition at line 507 of file wined3d.h.

508{
517};
@ WINED3D_STENCIL_OP_INCR
Definition: wined3d.h:515
@ WINED3D_STENCIL_OP_KEEP
Definition: wined3d.h:509
@ WINED3D_STENCIL_OP_REPLACE
Definition: wined3d.h:511
@ WINED3D_STENCIL_OP_INVERT
Definition: wined3d.h:514
@ WINED3D_STENCIL_OP_DECR_SAT
Definition: wined3d.h:513
@ WINED3D_STENCIL_OP_DECR
Definition: wined3d.h:516
@ WINED3D_STENCIL_OP_ZERO
Definition: wined3d.h:510
@ WINED3D_STENCIL_OP_INCR_SAT
Definition: wined3d.h:512

◆ wined3d_swap_effect

Enumerator
WINED3D_SWAP_EFFECT_DISCARD 
WINED3D_SWAP_EFFECT_SEQUENTIAL 
WINED3D_SWAP_EFFECT_FLIP_DISCARD 
WINED3D_SWAP_EFFECT_FLIP_SEQUENTIAL 
WINED3D_SWAP_EFFECT_COPY 
WINED3D_SWAP_EFFECT_COPY_VSYNC 
WINED3D_SWAP_EFFECT_OVERLAY 

Definition at line 532 of file wined3d.h.

533{
541};
@ WINED3D_SWAP_EFFECT_FLIP_DISCARD
Definition: wined3d.h:536
@ WINED3D_SWAP_EFFECT_COPY
Definition: wined3d.h:538
@ WINED3D_SWAP_EFFECT_SEQUENTIAL
Definition: wined3d.h:535
@ WINED3D_SWAP_EFFECT_DISCARD
Definition: wined3d.h:534
@ WINED3D_SWAP_EFFECT_COPY_VSYNC
Definition: wined3d.h:539
@ WINED3D_SWAP_EFFECT_OVERLAY
Definition: wined3d.h:540
@ WINED3D_SWAP_EFFECT_FLIP_SEQUENTIAL
Definition: wined3d.h:537

◆ wined3d_swap_interval

Enumerator
WINED3D_SWAP_INTERVAL_IMMEDIATE 
WINED3D_SWAP_INTERVAL_ONE 
WINED3D_SWAP_INTERVAL_TWO 
WINED3D_SWAP_INTERVAL_THREE 
WINED3D_SWAP_INTERVAL_FOUR 
WINED3D_SWAP_INTERVAL_DEFAULT 

Definition at line 543 of file wined3d.h.

544{
551};
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 * u
Definition: glfuncs.h:240
@ WINED3D_SWAP_INTERVAL_TWO
Definition: wined3d.h:547
@ WINED3D_SWAP_INTERVAL_FOUR
Definition: wined3d.h:549
@ WINED3D_SWAP_INTERVAL_ONE
Definition: wined3d.h:546
@ WINED3D_SWAP_INTERVAL_DEFAULT
Definition: wined3d.h:550
@ WINED3D_SWAP_INTERVAL_THREE
Definition: wined3d.h:548
@ WINED3D_SWAP_INTERVAL_IMMEDIATE
Definition: wined3d.h:545

◆ wined3d_texture_address

Enumerator
WINED3D_TADDRESS_WRAP 
WINED3D_TADDRESS_MIRROR 
WINED3D_TADDRESS_CLAMP 
WINED3D_TADDRESS_BORDER 
WINED3D_TADDRESS_MIRROR_ONCE 

Definition at line 656 of file wined3d.h.

657{
663};
@ WINED3D_TADDRESS_BORDER
Definition: wined3d.h:661
@ WINED3D_TADDRESS_MIRROR_ONCE
Definition: wined3d.h:662
@ WINED3D_TADDRESS_WRAP
Definition: wined3d.h:658
@ WINED3D_TADDRESS_MIRROR
Definition: wined3d.h:659
@ WINED3D_TADDRESS_CLAMP
Definition: wined3d.h:660

◆ wined3d_texture_filter_type

Enumerator
WINED3D_TEXF_NONE 
WINED3D_TEXF_POINT 
WINED3D_TEXF_LINEAR 
WINED3D_TEXF_ANISOTROPIC 
WINED3D_TEXF_FLAT_CUBIC 
WINED3D_TEXF_GAUSSIAN_CUBIC 
WINED3D_TEXF_PYRAMIDAL_QUAD 
WINED3D_TEXF_GAUSSIAN_QUAD 

Definition at line 703 of file wined3d.h.

704{
713};
@ WINED3D_TEXF_GAUSSIAN_CUBIC
Definition: wined3d.h:710
@ WINED3D_TEXF_NONE
Definition: wined3d.h:705
@ WINED3D_TEXF_PYRAMIDAL_QUAD
Definition: wined3d.h:711
@ WINED3D_TEXF_FLAT_CUBIC
Definition: wined3d.h:709
@ WINED3D_TEXF_GAUSSIAN_QUAD
Definition: wined3d.h:712
@ WINED3D_TEXF_POINT
Definition: wined3d.h:706
@ WINED3D_TEXF_ANISOTROPIC
Definition: wined3d.h:708
@ WINED3D_TEXF_LINEAR
Definition: wined3d.h:707

◆ wined3d_texture_op

Enumerator
WINED3D_TOP_DISABLE 
WINED3D_TOP_SELECT_ARG1 
WINED3D_TOP_SELECT_ARG2 
WINED3D_TOP_MODULATE 
WINED3D_TOP_MODULATE_2X 
WINED3D_TOP_MODULATE_4X 
WINED3D_TOP_ADD 
WINED3D_TOP_ADD_SIGNED 
WINED3D_TOP_ADD_SIGNED_2X 
WINED3D_TOP_SUBTRACT 
WINED3D_TOP_ADD_SMOOTH 
WINED3D_TOP_BLEND_DIFFUSE_ALPHA 
WINED3D_TOP_BLEND_TEXTURE_ALPHA 
WINED3D_TOP_BLEND_FACTOR_ALPHA 
WINED3D_TOP_BLEND_TEXTURE_ALPHA_PM 
WINED3D_TOP_BLEND_CURRENT_ALPHA 
WINED3D_TOP_PREMODULATE 
WINED3D_TOP_MODULATE_ALPHA_ADD_COLOR 
WINED3D_TOP_MODULATE_COLOR_ADD_ALPHA 
WINED3D_TOP_MODULATE_INVALPHA_ADD_COLOR 
WINED3D_TOP_MODULATE_INVCOLOR_ADD_ALPHA 
WINED3D_TOP_BUMPENVMAP 
WINED3D_TOP_BUMPENVMAP_LUMINANCE 
WINED3D_TOP_DOTPRODUCT3 
WINED3D_TOP_MULTIPLY_ADD 
WINED3D_TOP_LERP 

Definition at line 626 of file wined3d.h.

627{
634 WINED3D_TOP_ADD = 7,
653 WINED3D_TOP_LERP = 26,
654};
@ WINED3D_TOP_SELECT_ARG1
Definition: wined3d.h:629
@ WINED3D_TOP_DISABLE
Definition: wined3d.h:628
@ WINED3D_TOP_BLEND_DIFFUSE_ALPHA
Definition: wined3d.h:639
@ WINED3D_TOP_ADD
Definition: wined3d.h:634
@ WINED3D_TOP_BLEND_TEXTURE_ALPHA_PM
Definition: wined3d.h:642
@ WINED3D_TOP_BLEND_CURRENT_ALPHA
Definition: wined3d.h:643
@ WINED3D_TOP_ADD_SIGNED_2X
Definition: wined3d.h:636
@ WINED3D_TOP_MODULATE_INVCOLOR_ADD_ALPHA
Definition: wined3d.h:648
@ WINED3D_TOP_MULTIPLY_ADD
Definition: wined3d.h:652
@ WINED3D_TOP_MODULATE_INVALPHA_ADD_COLOR
Definition: wined3d.h:647
@ WINED3D_TOP_SUBTRACT
Definition: wined3d.h:637
@ WINED3D_TOP_BUMPENVMAP_LUMINANCE
Definition: wined3d.h:650
@ WINED3D_TOP_MODULATE_COLOR_ADD_ALPHA
Definition: wined3d.h:646
@ WINED3D_TOP_MODULATE
Definition: wined3d.h:631
@ WINED3D_TOP_BUMPENVMAP
Definition: wined3d.h:649
@ WINED3D_TOP_MODULATE_4X
Definition: wined3d.h:633
@ WINED3D_TOP_SELECT_ARG2
Definition: wined3d.h:630
@ WINED3D_TOP_LERP
Definition: wined3d.h:653
@ WINED3D_TOP_MODULATE_ALPHA_ADD_COLOR
Definition: wined3d.h:645
@ WINED3D_TOP_BLEND_TEXTURE_ALPHA
Definition: wined3d.h:640
@ WINED3D_TOP_ADD_SIGNED
Definition: wined3d.h:635
@ WINED3D_TOP_DOTPRODUCT3
Definition: wined3d.h:651
@ WINED3D_TOP_PREMODULATE
Definition: wined3d.h:644
@ WINED3D_TOP_ADD_SMOOTH
Definition: wined3d.h:638
@ WINED3D_TOP_MODULATE_2X
Definition: wined3d.h:632
@ WINED3D_TOP_BLEND_FACTOR_ALPHA
Definition: wined3d.h:641

◆ wined3d_texture_stage_state

Enumerator
WINED3D_TSS_COLOR_OP 
WINED3D_TSS_COLOR_ARG1 
WINED3D_TSS_COLOR_ARG2 
WINED3D_TSS_ALPHA_OP 
WINED3D_TSS_ALPHA_ARG1 
WINED3D_TSS_ALPHA_ARG2 
WINED3D_TSS_BUMPENV_MAT00 
WINED3D_TSS_BUMPENV_MAT01 
WINED3D_TSS_BUMPENV_MAT10 
WINED3D_TSS_BUMPENV_MAT11 
WINED3D_TSS_TEXCOORD_INDEX 
WINED3D_TSS_BUMPENV_LSCALE 
WINED3D_TSS_BUMPENV_LOFFSET 
WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS 
WINED3D_TSS_COLOR_ARG0 
WINED3D_TSS_ALPHA_ARG0 
WINED3D_TSS_RESULT_ARG 
WINED3D_TSS_CONSTANT 
WINED3D_TSS_INVALID 

Definition at line 592 of file wined3d.h.

593{
613};
@ WINED3D_TSS_COLOR_ARG2
Definition: wined3d.h:596
@ WINED3D_TSS_BUMPENV_LOFFSET
Definition: wined3d.h:606
@ WINED3D_TSS_ALPHA_OP
Definition: wined3d.h:597
@ WINED3D_TSS_BUMPENV_MAT11
Definition: wined3d.h:603
@ WINED3D_TSS_COLOR_OP
Definition: wined3d.h:594
@ WINED3D_TSS_INVALID
Definition: wined3d.h:612
@ WINED3D_TSS_BUMPENV_MAT10
Definition: wined3d.h:602
@ WINED3D_TSS_TEXCOORD_INDEX
Definition: wined3d.h:604
@ WINED3D_TSS_ALPHA_ARG2
Definition: wined3d.h:599
@ WINED3D_TSS_CONSTANT
Definition: wined3d.h:611
@ WINED3D_TSS_BUMPENV_MAT01
Definition: wined3d.h:601
@ WINED3D_TSS_ALPHA_ARG0
Definition: wined3d.h:609
@ WINED3D_TSS_BUMPENV_LSCALE
Definition: wined3d.h:605
@ WINED3D_TSS_COLOR_ARG0
Definition: wined3d.h:608
@ WINED3D_TSS_COLOR_ARG1
Definition: wined3d.h:595
@ WINED3D_TSS_ALPHA_ARG1
Definition: wined3d.h:598
@ WINED3D_TSS_RESULT_ARG
Definition: wined3d.h:610
@ WINED3D_TSS_BUMPENV_MAT00
Definition: wined3d.h:600
@ WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS
Definition: wined3d.h:607

◆ wined3d_texture_transform_flags

Enumerator
WINED3D_TTFF_DISABLE 
WINED3D_TTFF_COUNT1 
WINED3D_TTFF_COUNT2 
WINED3D_TTFF_COUNT3 
WINED3D_TTFF_COUNT4 
WINED3D_TTFF_PROJECTED 

Definition at line 616 of file wined3d.h.

617{
624};
@ WINED3D_TTFF_COUNT2
Definition: wined3d.h:620
@ WINED3D_TTFF_COUNT4
Definition: wined3d.h:622
@ WINED3D_TTFF_DISABLE
Definition: wined3d.h:618
@ WINED3D_TTFF_COUNT3
Definition: wined3d.h:621
@ WINED3D_TTFF_COUNT1
Definition: wined3d.h:619
@ WINED3D_TTFF_PROJECTED
Definition: wined3d.h:623

◆ wined3d_transform_state

Enumerator
WINED3D_TS_VIEW 
WINED3D_TS_PROJECTION 
WINED3D_TS_TEXTURE0 
WINED3D_TS_TEXTURE1 
WINED3D_TS_TEXTURE2 
WINED3D_TS_TEXTURE3 
WINED3D_TS_TEXTURE4 
WINED3D_TS_TEXTURE5 
WINED3D_TS_TEXTURE6 
WINED3D_TS_TEXTURE7 
WINED3D_TS_WORLD 
WINED3D_TS_WORLD1 
WINED3D_TS_WORLD2 
WINED3D_TS_WORLD3 

Definition at line 665 of file wined3d.h.

666{
667 WINED3D_TS_VIEW = 2,
677 WINED3D_TS_WORLD = 256, /* WINED3D_TS_WORLD_MATRIX(0) */
678 WINED3D_TS_WORLD1 = 257,
679 WINED3D_TS_WORLD2 = 258,
680 WINED3D_TS_WORLD3 = 259,
681};
@ WINED3D_TS_WORLD2
Definition: wined3d.h:679
@ WINED3D_TS_TEXTURE1
Definition: wined3d.h:670
@ WINED3D_TS_TEXTURE0
Definition: wined3d.h:669
@ WINED3D_TS_TEXTURE2
Definition: wined3d.h:671
@ WINED3D_TS_PROJECTION
Definition: wined3d.h:668
@ WINED3D_TS_VIEW
Definition: wined3d.h:667
@ WINED3D_TS_TEXTURE7
Definition: wined3d.h:676
@ WINED3D_TS_TEXTURE6
Definition: wined3d.h:675
@ WINED3D_TS_TEXTURE4
Definition: wined3d.h:673
@ WINED3D_TS_TEXTURE3
Definition: wined3d.h:672
@ WINED3D_TS_WORLD1
Definition: wined3d.h:678
@ WINED3D_TS_WORLD
Definition: wined3d.h:677
@ WINED3D_TS_WORLD3
Definition: wined3d.h:680
@ WINED3D_TS_TEXTURE5
Definition: wined3d.h:674

◆ wined3d_vertex_blend_flags

Enumerator
WINED3D_VBF_DISABLE 
WINED3D_VBF_1WEIGHTS 
WINED3D_VBF_2WEIGHTS 
WINED3D_VBF_3WEIGHTS 
WINED3D_VBF_TWEENING 
WINED3D_VBF_0WEIGHTS 

Definition at line 449 of file wined3d.h.

450{
457};
@ WINED3D_VBF_TWEENING
Definition: wined3d.h:455
@ WINED3D_VBF_1WEIGHTS
Definition: wined3d.h:452
@ WINED3D_VBF_DISABLE
Definition: wined3d.h:451
@ WINED3D_VBF_3WEIGHTS
Definition: wined3d.h:454
@ WINED3D_VBF_2WEIGHTS
Definition: wined3d.h:453
@ WINED3D_VBF_0WEIGHTS
Definition: wined3d.h:456

Function Documentation

◆ wined3d_adapter_get_identifier()

HRESULT __cdecl wined3d_adapter_get_identifier ( const struct wined3d_adapter *  adapter,
uint32_t  flags,
struct wined3d_adapter_identifier *  identifier 
)

Definition at line 1785 of file directx.c.

1787{
1788 TRACE("adapter %p, flags %#x, identifier %p.\n", adapter, flags, identifier);
1789
1791
1792 wined3d_copy_name(identifier->driver, adapter->driver_info.name, identifier->driver_size);
1793 wined3d_copy_name(identifier->description, adapter->driver_info.description, identifier->description_size);
1794
1795 identifier->driver_version.u.HighPart = adapter->driver_info.version_high;
1796 identifier->driver_version.u.LowPart = adapter->driver_info.version_low;
1797 identifier->vendor_id = adapter->driver_info.vendor;
1798 identifier->device_id = adapter->driver_info.device;
1799 identifier->subsystem_id = 0;
1800 identifier->revision = 0;
1802 identifier->driver_uuid = adapter->driver_uuid;
1803 identifier->device_uuid = adapter->device_uuid;
1804 identifier->whql_level = (flags & WINED3DENUM_WHQL_LEVEL) ? 1 : 0;
1805 identifier->adapter_luid = adapter->luid;
1806 identifier->video_memory = min(~(SIZE_T)0, adapter->driver_info.vram_bytes);
1807 identifier->shared_system_memory = min(~(SIZE_T)0, adapter->driver_info.sysmem_bytes);
1808
1810
1811 return WINED3D_OK;
1812}
return adapter
GLbitfield flags
Definition: glext.h:7161
#define min(a, b)
Definition: monoChain.cc:55
#define TRACE(s)
Definition: solgame.cpp:4
unsigned int description_size
Definition: wined3d.h:1746
unsigned int driver_size
Definition: wined3d.h:1744
LARGE_INTEGER driver_version
Definition: wined3d.h:1747
ULONG_PTR SIZE_T
Definition: typedefs.h:80
struct _LARGE_INTEGER::@2736 u
static void wined3d_copy_name(char *dst, const char *src, unsigned int dst_size)
Definition: directx.c:728
static const GUID IID_D3DDEVICE_D3DUID
Definition: directx.c:57
#define WINED3DENUM_WHQL_LEVEL
Definition: wined3d.h:872
#define WINED3D_OK
Definition: wined3d.h:33
void WINAPI wined3d_mutex_unlock(void)
Definition: wined3d_main.c:544
void WINAPI wined3d_mutex_lock(void)
Definition: wined3d_main.c:539

Referenced by d3d8_GetAdapterIdentifier(), d3d9_GetAdapterIdentifier(), d3d9_GetAdapterLUID(), ddraw7_GetAvailableVidMem(), ddraw7_GetDeviceIdentifier(), ddraw_enumerate_secondary_devices(), dxgi_adapter_CheckInterfaceSupport(), dxgi_adapter_get_adapter_info(), dxgi_adapter_get_desc(), and wined3d_adapter_get_video_memory_info().

◆ wined3d_adapter_get_output()

struct wined3d_output *__cdecl wined3d_adapter_get_output ( const struct wined3d_adapter *  adapter,
unsigned int  idx 
)

Definition at line 1027 of file directx.c.

1029{
1030 TRACE("adapter %p, idx %u.\n", adapter, idx);
1031
1032 if (idx >= adapter->output_count)
1033 return NULL;
1034
1035 return &adapter->outputs[idx];
1036}
#define NULL
Definition: types.h:112
unsigned int idx
Definition: utils.c:40

Referenced by d3d8_init(), d3d9_init(), ddraw_enumerate_secondary_devices(), ddraw_init(), and dxgi_output_init().

◆ wined3d_adapter_get_output_count()

unsigned int __cdecl wined3d_adapter_get_output_count ( const struct wined3d_adapter *  adapter)

Definition at line 1038 of file directx.c.

1039{
1040 TRACE("adapter %p, reporting %Iu outputs.\n", adapter, adapter->output_count);
1041
1042 return adapter->output_count;
1043}

Referenced by d3d8_init(), d3d9_caps_from_wined3dcaps(), d3d9_init(), and dxgi_adapter_EnumOutputs().

◆ wined3d_adapter_get_video_memory_info()

HRESULT __cdecl wined3d_adapter_get_video_memory_info ( const struct wined3d_adapter *  adapter,
unsigned int  node_idx,
enum wined3d_memory_segment_group  group,
struct wined3d_video_memory_info *  info 
)

Definition at line 1045 of file directx.c.

1048{
1049 static unsigned int once;
1050 D3DKMT_QUERYVIDEOMEMORYINFO query_memory_info;
1051 struct wined3d_adapter_identifier adapter_id;
1053 HRESULT hr;
1054
1055 TRACE("adapter %p, node_idx %u, group %d, info %p.\n", adapter, node_idx, group, info);
1056
1058 {
1059 WARN("Invalid memory segment group %#x.\n", group);
1060 return E_INVALIDARG;
1061 }
1062
1063 query_memory_info.hProcess = NULL;
1064 query_memory_info.hAdapter = adapter->kmt_adapter;
1065 query_memory_info.PhysicalAdapterIndex = node_idx;
1067 status = D3DKMTQueryVideoMemoryInfo(&query_memory_info);
1068 if (status == STATUS_SUCCESS)
1069 {
1070 info->budget = query_memory_info.Budget;
1071 info->current_usage = query_memory_info.CurrentUsage;
1072 info->current_reservation = query_memory_info.CurrentReservation;
1073 info->available_reservation = query_memory_info.AvailableForReservation;
1074 return WINED3D_OK;
1075 }
1076
1077 /* D3DKMTQueryVideoMemoryInfo() failed, fallback to fake memory info */
1078 if (!once++)
1079 FIXME("Returning fake video memory info.\n");
1080
1081 if (node_idx)
1082 FIXME("Ignoring node index %u.\n", node_idx);
1083
1084 adapter_id.driver_size = 0;
1085 adapter_id.description_size = 0;
1086 if (FAILED(hr = wined3d_adapter_get_identifier(adapter, 0, &adapter_id)))
1087 return hr;
1088
1089 switch (group)
1090 {
1092 info->budget = adapter_id.video_memory;
1093 info->current_usage = adapter->vram_bytes_used;
1094 info->available_reservation = adapter_id.video_memory / 2;
1095 info->current_reservation = 0;
1096 break;
1098 memset(info, 0, sizeof(*info));
1099 break;
1100 }
1101 return WINED3D_OK;
1102}
LONG NTSTATUS
Definition: precomp.h:26
#define FIXME(fmt,...)
Definition: precomp.h:53
#define WARN(fmt,...)
Definition: precomp.h:61
#define E_INVALIDARG
Definition: ddrawi.h:101
HRESULT hr
Definition: delayimp.cpp:582
GLboolean GLuint group
Definition: glext.h:11120
#define FAILED(hr)
Definition: intsafe.h:51
#define memset(x, y, z)
Definition: compat.h:39
#define STATUS_SUCCESS
Definition: shellext.h:65
D3DKMT_MEMORY_SEGMENT_GROUP MemorySegmentGroup
Definition: d3dkmthk.h:709
Definition: ps.c:97
enum _D3DKMT_MEMORY_SEGMENT_GROUP D3DKMT_MEMORY_SEGMENT_GROUP
NTSTATUS WINAPI D3DKMTQueryVideoMemoryInfo(D3DKMT_QUERYVIDEOMEMORYINFO *desc)
HRESULT CDECL wined3d_adapter_get_identifier(const struct wined3d_adapter *adapter, uint32_t flags, struct wined3d_adapter_identifier *identifier)
Definition: directx.c:1785

Referenced by dxgi_adapter_QueryVideoMemoryInfo(), and notification_thread_func().

◆ wined3d_adapter_register_budget_change_notification()

HRESULT __cdecl wined3d_adapter_register_budget_change_notification ( const struct wined3d_adapter *  adapter,
HANDLE  event,
DWORD *  cookie 
)

Definition at line 1144 of file directx.c.

1146{
1147 static DWORD cookie_counter;
1148 static BOOL wrapped;
1150 BOOL found = FALSE;
1151
1152 new_notification = calloc(1, sizeof(*new_notification));
1153 if (!new_notification)
1154 return E_OUTOFMEMORY;
1155
1157 new_notification->adapter = adapter;
1158 new_notification->event = event;
1159 new_notification->cookie = cookie_counter++;
1160 if (cookie_counter < new_notification->cookie)
1161 wrapped = TRUE;
1162 if (wrapped)
1163 {
1164 while (TRUE)
1165 {
1168 {
1169 if (notification->cookie == new_notification->cookie)
1170 {
1171 found = TRUE;
1172 break;
1173 }
1174 }
1175
1176 if (!found)
1177 break;
1178
1179 new_notification->cookie = cookie_counter++;
1180 }
1181 }
1182
1183 *cookie = new_notification->cookie;
1185
1187 {
1191 }
1193 return WINED3D_OK;
1194}
static void list_add_head(struct list_entry *head, struct list_entry *entry)
Definition: list.h:76
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
static LONG cookie_counter
Definition: systemclock.c:28
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
Definition: thread.c:137
unsigned int BOOL
Definition: ntddk_ex.h:94
uint32_t entry
Definition: isohybrid.c:63
#define calloc
Definition: rosglue.h:14
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:236
Definition: cookie.c:34
const struct wined3d_adapter * adapter
Definition: directx.c:45
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
Definition: synch.c:587
static DWORD CALLBACK notification_thread_func(void *stop_event)
Definition: directx.c:1104
static struct list adapter_budget_change_notifications
Definition: directx.c:53
static HANDLE notification_thread_stop_event
Definition: directx.c:54
static HANDLE notification_thread
Definition: directx.c:54

Referenced by dxgi_adapter_RegisterVideoMemoryBudgetChangeNotificationEvent().

◆ wined3d_adapter_unregister_budget_change_notification()

HRESULT __cdecl wined3d_adapter_unregister_budget_change_notification ( DWORD  cookie)

Definition at line 1196 of file directx.c.

1197{
1199 HANDLE thread, thread_stop_event;
1200
1204 {
1205 if (notification->cookie == cookie)
1206 {
1207 list_remove(&notification->entry);
1209 break;
1210 }
1211 }
1212
1214 {
1216 return WINED3D_OK;
1217 }
1218
1220 thread_stop_event = notification_thread_stop_event;
1224 SetEvent(thread_stop_event);
1227 CloseHandle(thread_stop_event);
1228 return WINED3D_OK;
1229}
static void list_remove(struct list_entry *entry)
Definition: list.h:90
static int list_empty(struct list_entry *head)
Definition: list.h:58
static HANDLE thread
Definition: service.c:33
#define free
Definition: debug_ros.c:5
#define CloseHandle
Definition: compat.h:739
#define INFINITE
Definition: serial.h:102
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
Definition: synch.c:669

Referenced by dxgi_adapter_UnregisterVideoMemoryBudgetChangeNotification().

◆ wined3d_bit_scan()

static int wined3d_bit_scan ( unsigned int *  x)
inlinestatic

Definition at line 2982 of file wined3d.h.

2983{
2984 int bit_offset;
2985#if defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)))
2986 bit_offset = __builtin_ffs(*x) - 1;
2987#else
2988 for (bit_offset = 0; bit_offset < 32; bit_offset++)
2989 if (*x & (1u << bit_offset)) break;
2990#endif
2991 *x ^= 1u << bit_offset;
2992 return bit_offset;
2993}
GLint GLint GLint GLint GLint x
Definition: gl.h:1548

Referenced by compute_sphere_visibility(), context_apply_draw_state(), context_gl_load_shader_resources(), context_update_stream_info(), d3d8_device_ProcessVertices(), d3d8_device_upload_sysmem_vertex_buffers(), d3d9_device_ProcessVertices(), d3d9_device_upload_sysmem_vertex_buffers(), d3d9_generate_auto_mipmaps(), find_draw_buffers_mask(), init_vulkan_format_info(), set_glsl_shader_program(), shader_generate_glsl_declarations(), shader_glsl_generate_color_output(), shader_glsl_generate_fragment_shader(), shader_glsl_load_constants_b(), shader_glsl_load_constants_i(), viewport_alloc_active_light_index(), vshader_get_input(), wined3d_bitmap_ffs_xor(), wined3d_context_gl_apply_compute_state(), wined3d_context_gl_bind_shader_resources(), wined3d_context_gl_enable_clip_distances(), wined3d_context_gl_map_fixed_function_samplers(), wined3d_context_gl_unload_numbered_arrays(), wined3d_context_vk_apply_draw_state(), wined3d_context_vk_create_slab_bo(), wined3d_device_apply_stateblock(), wined3d_device_process_vertices(), wined3d_render_pass_vk_init(), wined3d_stateblock_apply(), and wined3d_stateblock_capture().

◆ wined3d_blend_state_create()

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 at line 313 of file device.c.

316{
318
319 TRACE("device %p, desc %p, parent %p, parent_ops %p, state %p.\n",
321
322 if (!(object = calloc(1, sizeof(*object))))
323 return E_OUTOFMEMORY;
324
325 object->refcount = 1;
326 object->desc = *desc;
327 object->parent = parent;
328 object->parent_ops = parent_ops;
329 object->device = device;
330
331 object->dual_source = desc->rt[0].enable
332 && (is_dual_source(desc->rt[0].src)
333 || is_dual_source(desc->rt[0].dst)
334 || is_dual_source(desc->rt[0].src_alpha)
335 || is_dual_source(desc->rt[0].dst_alpha));
336
337 TRACE("Created blend state %p.\n", object);
338 *state = object;
339
340 return WINED3D_OK;
341}
static int state
Definition: maze.c:121
static bool is_dual_source(enum wined3d_blend state)
Definition: device.c:308
r parent
Definition: btrfs.c:3010
D3D11_SHADER_VARIABLE_DESC desc
Definition: reflection.c:1683
Definition: devices.h:37
struct wined3d_device * device
const struct wined3d_parent_ops * parent_ops

Referenced by d3d_blend_state_create(), and wined3d_device_apply_stateblock().

◆ wined3d_blend_state_decref()

ULONG __cdecl wined3d_blend_state_decref ( struct wined3d_blend_state *  state)

Definition at line 284 of file device.c.

285{
286 unsigned int refcount = wined3d_atomic_decrement_mutex_lock(&state->refcount);
287 struct wined3d_device *device = state->device;
288
289 TRACE("%p decreasing refcount to %u.\n", state, refcount);
290
291 if (!refcount)
292 {
293 state->parent_ops->wined3d_object_destroyed(state->parent);
296 }
297
298 return refcount;
299}
void wined3d_cs_destroy_object(struct wined3d_cs *cs, void(*callback)(void *object), void *object)
Definition: cs.c:2299
static void wined3d_blend_state_destroy_object(void *object)
Definition: device.c:277
static ULONG wined3d_atomic_decrement_mutex_lock(volatile LONG *refcount)

Referenced by d3d11_blend_state_Release(), device_free_blend_state(), state_unbind_resources(), wined3d_cs_packet_decref_objects(), wined3d_device_apply_stateblock(), and wined3d_device_context_set_blend_state().

◆ wined3d_blend_state_get_parent()

void *__cdecl wined3d_blend_state_get_parent ( const struct wined3d_blend_state *  state)

Definition at line 301 of file device.c.

302{
303 TRACE("state %p.\n", state);
304
305 return state->parent;
306}

Referenced by d3d11_device_context_OMGetBlendState().

◆ wined3d_blend_state_incref()

ULONG __cdecl wined3d_blend_state_incref ( struct wined3d_blend_state *  state)

Definition at line 268 of file device.c.

269{
270 unsigned int refcount = InterlockedIncrement(&state->refcount);
271
272 TRACE("%p increasing refcount to %u.\n", state, refcount);
273
274 return refcount;
275}
#define InterlockedIncrement
Definition: armddk.h:53

Referenced by d3d11_blend_state_AddRef(), wined3d_cs_packet_incref_objects(), and wined3d_device_context_set_blend_state().

◆ wined3d_bound_range()

◆ wined3d_box_set()

static void wined3d_box_set ( struct wined3d_box *  box,
unsigned int  left,
unsigned int  top,
unsigned int  right,
unsigned int  bottom,
unsigned int  front,
unsigned int  back 
)
inlinestatic

Definition at line 3006 of file wined3d.h.

3008{
3009 box->left = left;
3010 box->top = top;
3011 box->right = right;
3012 box->bottom = bottom;
3013 box->front = front;
3014 box->back = back;
3015}
GLdouble GLdouble GLdouble GLdouble top
Definition: glext.h:10859
GLdouble GLdouble right
Definition: glext.h:10859
GLint left
Definition: glext.h:7726
GLint GLint bottom
Definition: glext.h:7726
static struct address_cache * front
Definition: rpcb_clnt.c:83
Definition: palette.c:466

Referenced by d3d10_device_CopySubresourceRegion(), d3d11_device_context_CopySubresourceRegion(), d3d11_device_context_CopySubresourceRegion1(), d3d11_device_context_UpdateSubresource(), d3d11_device_context_UpdateSubresource1(), d3d8_device_upload_sysmem_index_buffer(), d3d8_surface_LockRect(), d3d8_texture_2d_AddDirtyRect(), d3d8_texture_cube_AddDirtyRect(), d3d9_device_UpdateSurface(), d3d9_device_upload_sysmem_index_buffer(), d3d9_indexbuffer_Lock(), d3d9_surface_LockRect(), d3d9_texture_2d_AddDirtyRect(), d3d9_texture_cube_AddDirtyRect(), d3d9_vertexbuffer_Lock(), glsl_blitter_blit(), surface_lock(), wined3d_box_intersect(), wined3d_buffer_init_data(), wined3d_device_context_copy_resource(), wined3d_device_context_copy_sub_resource_region(), wined3d_device_context_map(), wined3d_device_context_push_constants(), wined3d_device_context_update_sub_resource(), wined3d_rendertarget_view_get_box(), wined3d_streaming_buffer_map(), wined3d_texture_get_level_box(), and wined3d_texture_update_sub_resource().

◆ wined3d_buffer_create()

HRESULT __cdecl wined3d_buffer_create ( struct wined3d_device *  device,
const struct wined3d_buffer_desc *  desc,
const struct wined3d_sub_resource_data *  data,
void *  parent,
const struct wined3d_parent_ops *  parent_ops,
struct wined3d_buffer **  buffer 
)

Definition at line 1329 of file buffer.c.

1332{
1333 TRACE("device %p, desc %p, data %p, parent %p, parent_ops %p, buffer %p.\n",
1334 device, desc, data, parent, parent_ops, buffer);
1335
1336 return device->adapter->adapter_ops->adapter_create_buffer(device, desc, data, parent, parent_ops, buffer);
1337}
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLuint buffer
Definition: glext.h:5915

Referenced by d3d_buffer_init(), d3d_execute_buffer_SetExecuteData(), d3d_vertex_buffer_create_wined3d_buffer(), indexbuffer_init(), prepare_push_constant_buffer(), vertexbuffer_init(), and wined3d_streaming_buffer_prepare().

◆ wined3d_buffer_decref()

ULONG __cdecl wined3d_buffer_decref ( struct wined3d_buffer *  buffer)

Definition at line 459 of file buffer.c.

460{
461 unsigned int refcount = InterlockedDecrement(&buffer->resource.ref);
462
463 TRACE("%p decreasing refcount to %u.\n", buffer, refcount);
464
465 if (!refcount)
466 {
468 buffer->resource.parent_ops->wined3d_object_destroyed(buffer->resource.parent);
469 buffer->resource.device->adapter->adapter_ops->adapter_destroy_buffer(buffer);
471 }
472
473 return refcount;
474}
#define InterlockedDecrement
Definition: armddk.h:52

Referenced by buffer_resource_decref(), d3d11_buffer_Release(), d3d8_indexbuffer_Release(), d3d8_vertexbuffer_Release(), d3d8_vertexbuffer_wined3d_object_destroyed(), d3d9_indexbuffer_Release(), d3d9_vertexbuffer_Release(), d3d9_vertexbuffer_wined3d_object_destroyed(), d3d_buffer_init(), d3d_execute_buffer_Release(), d3d_execute_buffer_SetExecuteData(), d3d_vertex_buffer7_Lock(), d3d_vertex_buffer7_Release(), d3d_vertex_buffer_create(), state_unbind_resources(), vertexbuffer_init(), wined3d_cs_packet_decref_objects(), wined3d_device_context_set_constant_buffers(), wined3d_device_context_set_index_buffer(), wined3d_device_context_set_stream_outputs(), wined3d_device_context_set_stream_sources(), wined3d_device_reset(), wined3d_device_uninit_3d(), wined3d_stateblock_capture(), wined3d_stateblock_set_index_buffer(), wined3d_stateblock_set_stream_source(), wined3d_stateblock_state_cleanup(), wined3d_streaming_buffer_cleanup(), and wined3d_streaming_buffer_prepare().

◆ wined3d_buffer_get_parent()

◆ wined3d_buffer_get_resource()

◆ wined3d_buffer_incref()

◆ wined3d_calculate_format_pitch()

unsigned int __cdecl wined3d_calculate_format_pitch ( const struct wined3d_adapter *  adapter,
enum wined3d_format_id  format_id,
unsigned int  width 
)

Definition at line 2197 of file directx.c.

2199{
2200 unsigned int row_pitch, slice_pitch;
2201
2202 TRACE("adapter %p, format_id %s, width %u.\n", adapter, debug_d3dformat(format_id), width);
2203
2205 1, width, 1, &row_pitch, &slice_pitch);
2206
2207 return row_pitch;
2208}
const char * debug_d3dformat(enum wined3d_format_id format_id)
Definition: utils.c:4605
const struct wined3d_format * wined3d_get_format(const struct wined3d_adapter *adapter, enum wined3d_format_id format_id, unsigned int bind_flags)
Definition: utils.c:4428
void wined3d_format_calculate_pitch(const struct wined3d_format *format, unsigned int alignment, unsigned int width, unsigned int height, unsigned int *row_pitch, unsigned int *slice_pitch)
Definition: utils.c:4489
GLint GLint GLsizei width
Definition: gl.h:1546
static UINT format_id
Definition: clipboard.c:1455

Referenced by ddraw7_GetAvailableVidMem(), and ddraw_texture_init().

◆ wined3d_check_depth_stencil_match()

HRESULT __cdecl wined3d_check_depth_stencil_match ( const struct wined3d_adapter *  adapter,
enum wined3d_device_type  device_type,
enum wined3d_format_id  adapter_format_id,
enum wined3d_format_id  render_target_format_id,
enum wined3d_format_id  depth_stencil_format_id 
)

Definition at line 1859 of file directx.c.

1862{
1863 const struct wined3d_format *rt_format;
1864 const struct wined3d_format *ds_format;
1865
1866 TRACE("adapter %p, device_type %s, adapter_format %s, render_target_format %s, "
1867 "depth_stencil_format %s.\n",
1869 debug_d3dformat(render_target_format_id), debug_d3dformat(depth_stencil_format_id));
1870
1871 rt_format = wined3d_get_format(adapter, render_target_format_id, WINED3D_BIND_RENDER_TARGET);
1872 ds_format = wined3d_get_format(adapter, depth_stencil_format_id, WINED3D_BIND_DEPTH_STENCIL);
1873
1875 {
1876 WARN("Format %s is not render target format.\n", debug_d3dformat(rt_format->id));
1878 }
1880 {
1881 WARN("Format %s is not depth/stencil format.\n", debug_d3dformat(ds_format->id));
1883 }
1884
1885 if (adapter->adapter_ops->adapter_check_format(adapter, NULL, rt_format, ds_format))
1886 {
1887 TRACE("Formats match.\n");
1888 return WINED3D_OK;
1889 }
1890
1891 TRACE("Unsupported format pair: %s and %s.\n",
1892 debug_d3dformat(render_target_format_id),
1893 debug_d3dformat(depth_stencil_format_id));
1894
1896}
device_type
const char * debug_d3ddevicetype(enum wined3d_device_type device_type)
Definition: utils.c:4781
unsigned int caps[WINED3D_GL_RES_TYPE_COUNT]
enum wined3d_format_id id
#define WINED3DERR_NOTAVAILABLE
Definition: wined3d.h:42
#define WINED3D_BIND_DEPTH_STENCIL
Definition: wined3d.h:915
#define WINED3D_BIND_RENDER_TARGET
Definition: wined3d.h:914
@ WINED3D_GL_RES_TYPE_TEX_2D
#define WINED3D_FORMAT_CAP_DEPTH_STENCIL
#define WINED3D_FORMAT_CAP_RENDERTARGET

Referenced by d3d8_CheckDepthStencilMatch(), and d3d9_CheckDepthStencilMatch().

◆ wined3d_check_device_format()

HRESULT __cdecl wined3d_check_device_format ( const struct wined3d *  wined3d,
const struct wined3d_adapter *  adapter,
enum wined3d_device_type  device_type,
enum wined3d_format_id  adapter_format_id,
uint32_t  usage,
unsigned int  bind_flags,
enum wined3d_resource_type  resource_type,
enum wined3d_format_id  check_format_id 
)

Definition at line 1972 of file directx.c.

1976{
1977 const struct wined3d_format *adapter_format, *format;
1978 enum wined3d_gl_resource_type gl_type, gl_type_end;
1979 unsigned int format_caps = 0, format_attrs = 0;
1980 BOOL mipmap_gen_supported = TRUE;
1981 unsigned int allowed_bind_flags;
1982 uint32_t allowed_usage;
1983
1984 TRACE("wined3d %p, adapter %p, device_type %s, adapter_format %s, usage %s, "
1985 "bind_flags %s, resource_type %s, check_format %s.\n",
1988 debug_d3dresourcetype(resource_type), debug_d3dformat(check_format_id));
1989
1990 adapter_format = wined3d_get_format(adapter, adapter_format_id, WINED3D_BIND_RENDER_TARGET);
1991 format = wined3d_get_format(adapter, check_format_id, bind_flags);
1992
1993 switch (resource_type)
1994 {
1995 case WINED3D_RTYPE_NONE:
1996 allowed_usage = 0;
1997 allowed_bind_flags = WINED3D_BIND_RENDER_TARGET
2001 gl_type_end = WINED3D_GL_RES_TYPE_TEX_3D;
2002 break;
2003
2005 allowed_usage = WINED3DUSAGE_DYNAMIC
2014 allowed_bind_flags = WINED3D_BIND_SHADER_RESOURCE
2016 gl_type = gl_type_end = WINED3D_GL_RES_TYPE_TEX_1D;
2017 break;
2018
2021 if (bind_flags & WINED3D_BIND_RENDER_TARGET)
2022 allowed_usage |= WINED3DUSAGE_QUERY_SRGBWRITE;
2023 allowed_bind_flags = WINED3D_BIND_RENDER_TARGET
2026 gl_type = gl_type_end = WINED3D_GL_RES_TYPE_TEX_2D;
2027 if (!(bind_flags & WINED3D_BIND_SHADER_RESOURCE))
2028 {
2030 {
2031 TRACE("%s is not supported for plain surfaces.\n", debug_d3dformat(format->id));
2033 }
2034 break;
2035 }
2036 allowed_usage |= WINED3DUSAGE_DYNAMIC
2046 allowed_bind_flags |= WINED3D_BIND_SHADER_RESOURCE;
2048 {
2049 allowed_usage &= ~WINED3DUSAGE_QUERY_LEGACYBUMPMAP;
2050 allowed_bind_flags &= ~WINED3D_BIND_DEPTH_STENCIL;
2051 gl_type = gl_type_end = WINED3D_GL_RES_TYPE_TEX_CUBE;
2052 }
2053 break;
2054
2056 allowed_usage = WINED3DUSAGE_DYNAMIC
2064 allowed_bind_flags = WINED3D_BIND_SHADER_RESOURCE
2066 gl_type = gl_type_end = WINED3D_GL_RES_TYPE_TEX_3D;
2067 break;
2068
2071 {
2072 TRACE("Requested WINED3D_RTYPE_BUFFER, but format %s is typeless.\n", debug_d3dformat(check_format_id));
2074 }
2075
2076 allowed_usage = WINED3DUSAGE_DYNAMIC;
2077 allowed_bind_flags = WINED3D_BIND_SHADER_RESOURCE
2081 gl_type = gl_type_end = WINED3D_GL_RES_TYPE_BUFFER;
2082 break;
2083
2084 default:
2085 FIXME("Unhandled resource type %s.\n", debug_d3dresourcetype(resource_type));
2087 }
2088
2089 if ((usage & allowed_usage) != usage)
2090 {
2091 TRACE("Requested usage %#x, but resource type %s only allows %#x.\n",
2092 usage, debug_d3dresourcetype(resource_type), allowed_usage);
2094 }
2095
2096 if ((bind_flags & allowed_bind_flags) != bind_flags)
2097 {
2098 TRACE("Requested bind flags %s, but resource type %s only allows %s.\n",
2099 wined3d_debug_bind_flags(bind_flags), debug_d3dresourcetype(resource_type),
2100 wined3d_debug_bind_flags(allowed_bind_flags));
2102 }
2103
2104 if (bind_flags & WINED3D_BIND_SHADER_RESOURCE)
2105 format_caps |= WINED3D_FORMAT_CAP_TEXTURE;
2106 if (bind_flags & WINED3D_BIND_RENDER_TARGET)
2107 format_caps |= WINED3D_FORMAT_CAP_RENDERTARGET;
2108 if (bind_flags & WINED3D_BIND_DEPTH_STENCIL)
2109 format_caps |= WINED3D_FORMAT_CAP_DEPTH_STENCIL;
2110 if (bind_flags & WINED3D_BIND_UNORDERED_ACCESS)
2112 if (bind_flags & WINED3D_BIND_VERTEX_BUFFER)
2114 if (bind_flags & WINED3D_BIND_INDEX_BUFFER)
2115 format_caps |= WINED3D_FORMAT_CAP_INDEX_BUFFER;
2116
2118 format_caps |= WINED3D_FORMAT_CAP_FILTERING;
2122 format_caps |= WINED3D_FORMAT_CAP_SRGB_READ;
2124 format_caps |= WINED3D_FORMAT_CAP_SRGB_WRITE;
2126 format_caps |= WINED3D_FORMAT_CAP_VTF;
2128 format_attrs |= WINED3D_FORMAT_ATTR_BUMPMAP;
2129
2130 if ((format_caps & WINED3D_FORMAT_CAP_TEXTURE) && (wined3d->flags & WINED3D_NO3D))
2131 {
2132 TRACE("Requested texturing support, but wined3d was created with WINED3D_NO3D.\n");
2134 }
2135
2136 if ((format->attrs & format_attrs) != format_attrs)
2137 {
2138 TRACE("Requested format attributes %#x, but format %s only has %#x.\n",
2139 format_attrs, debug_d3dformat(check_format_id), format->attrs);
2141 }
2142
2143 for (; gl_type <= gl_type_end; ++gl_type)
2144 {
2145 unsigned int caps = format->caps[gl_type];
2146
2147 if (gl_type == WINED3D_GL_RES_TYPE_TEX_2D && !(bind_flags & WINED3D_BIND_SHADER_RESOURCE))
2149
2150 if ((bind_flags & WINED3D_BIND_RENDER_TARGET)
2151 && !adapter->adapter_ops->adapter_check_format(adapter, adapter_format, format, NULL))
2152 {
2153 TRACE("Requested WINED3D_BIND_RENDER_TARGET, but format %s is not supported for render targets.\n",
2154 debug_d3dformat(check_format_id));
2156 }
2157
2158 /* 3D depth / stencil textures are never supported. */
2159 if (bind_flags == WINED3D_BIND_DEPTH_STENCIL && gl_type == WINED3D_GL_RES_TYPE_TEX_3D)
2160 continue;
2161
2162 if ((bind_flags & WINED3D_BIND_DEPTH_STENCIL)
2163 && !wined3d_check_depth_stencil_format(adapter, adapter_format, format, gl_type))
2164 {
2165 TRACE("Requested WINED3D_BIND_DEPTH_STENCIL, but format %s is not supported for depth/stencil buffers.\n",
2166 debug_d3dformat(check_format_id));
2168 }
2169
2171 {
2172 TRACE("Requested WINED3D_BIND_UNORDERED_ACCESS, but format %s is typeless.\n",
2173 debug_d3dformat(check_format_id));
2175 }
2176
2177 if ((caps & format_caps) != format_caps)
2178 {
2179 TRACE("Requested format caps %#x, but format %s only has %#x.\n",
2180 format_caps, debug_d3dformat(check_format_id), caps);
2182 }
2183
2185 mipmap_gen_supported = FALSE;
2186 }
2187
2188 if ((usage & WINED3DUSAGE_QUERY_GENMIPMAP) && !mipmap_gen_supported)
2189 {
2190 TRACE("No WINED3DUSAGE_AUTOGENMIPMAP support, returning WINED3DOK_NOAUTOGEN.\n");
2191 return WINED3DOK_NOMIPGEN;
2192 }
2193
2194 return WINED3D_OK;
2195}
UINT32 uint32_t
Definition: types.h:75
const char * debug_d3dusage(uint32_t usage)
Definition: utils.c:4895
const char * wined3d_debug_bind_flags(uint32_t bind_flags)
Definition: utils.c:4845
const char * debug_d3dresourcetype(enum wined3d_resource_type resource_type)
Definition: utils.c:4992
GLsizeiptr const GLvoid GLenum usage
Definition: glext.h:5919
unsigned int flags
static BOOL wined3d_check_depth_stencil_format(const struct wined3d_adapter *adapter, const struct wined3d_format *adapter_format, const struct wined3d_format *ds_format, enum wined3d_gl_resource_type gl_type)
Definition: directx.c:1941
static BOOL wined3d_check_surface_format(const struct wined3d_format *format)
Definition: directx.c:1951
#define WINED3DUSAGE_QUERY_LEGACYBUMPMAP
Definition: wined3d.h:942
#define WINED3D_NO3D
Definition: wined3d.h:1323
#define WINED3DUSAGE_LEGACY_CUBEMAP
Definition: wined3d.h:934
#define WINED3D_BIND_VERTEX_BUFFER
Definition: wined3d.h:909
#define WINED3D_BIND_UNORDERED_ACCESS
Definition: wined3d.h:916
#define WINED3DUSAGE_QUERY_SRGBREAD
Definition: wined3d.h:945
#define WINED3DUSAGE_QUERY_FILTER
Definition: wined3d.h:943
#define WINED3D_BIND_SHADER_RESOURCE
Definition: wined3d.h:912
#define WINED3DUSAGE_QUERY_WRAPANDMIP
Definition: wined3d.h:948
#define WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING
Definition: wined3d.h:944
#define WINED3DUSAGE_QUERY_VERTEXTEXTURE
Definition: wined3d.h:947
#define WINED3DUSAGE_QUERY_GENMIPMAP
Definition: wined3d.h:941
#define WINED3DUSAGE_DYNAMIC
Definition: wined3d.h:924
#define WINED3DUSAGE_QUERY_SRGBWRITE
Definition: wined3d.h:946
#define WINED3D_BIND_INDEX_BUFFER
Definition: wined3d.h:910
#define WINED3DOK_NOMIPGEN
Definition: wined3d.h:37
#define WINED3DUSAGE_SOFTWAREPROCESSING
Definition: wined3d.h:919
#define WINED3D_FORMAT_CAP_VERTEX_ATTRIBUTE
static BOOL wined3d_format_is_typeless(const struct wined3d_format *format)
#define WINED3D_FORMAT_CAP_UNORDERED_ACCESS
#define WINED3D_FORMAT_CAP_TEXTURE
#define WINED3D_FORMAT_CAP_INDEX_BUFFER
#define WINED3D_FORMAT_CAP_SRGB_WRITE
#define WINED3D_FORMAT_CAP_FILTERING
wined3d_gl_resource_type
@ WINED3D_GL_RES_TYPE_TEX_3D
@ WINED3D_GL_RES_TYPE_TEX_CUBE
@ WINED3D_GL_RES_TYPE_BUFFER
@ WINED3D_GL_RES_TYPE_RB
@ WINED3D_GL_RES_TYPE_TEX_1D
#define WINED3D_FORMAT_CAP_POSTPIXELSHADER_BLENDING
#define WINED3D_FORMAT_CAP_VTF
#define WINED3D_FORMAT_CAP_SRGB_READ
#define WINED3D_FORMAT_CAP_GEN_MIPMAP
#define WINED3D_FORMAT_ATTR_BUMPMAP

Referenced by d3d11_device_CheckFormatSupport(), d3d7_EnumZBufferFormats(), d3d8_CheckDeviceFormat(), d3d9_CheckDeviceFormat(), d3d9_texture_init(), d3d_device2_EnumTextureFormats(), d3d_device7_EnumTextureFormats(), ddraw7_GetFourCCCodes(), ddraw_surface_create(), and wined3d_check_device_type().

◆ wined3d_check_device_format_conversion()

HRESULT __cdecl wined3d_check_device_format_conversion ( const struct wined3d_output *  output,
enum wined3d_device_type  device_type,
enum wined3d_format_id  source_format_id,
enum wined3d_format_id  target_format_id 
)

Definition at line 2210 of file directx.c.

2213{
2214 const struct wined3d_format *src_format = wined3d_get_format(output->adapter, src_format_id, 0);
2215 const struct wined3d_format *dst_format = wined3d_get_format(output->adapter, dst_format_id, 0);
2216
2217 TRACE("output %p, device_type %s, src_format %s, dst_format %s.\n",
2218 output, debug_d3ddevicetype(device_type), debug_d3dformat(src_format_id),
2219 debug_d3dformat(dst_format_id));
2220
2222 {
2223 TRACE("Source format does not support blitting.\n");
2225 }
2226
2228 {
2229 TRACE("Destination format does not support blitting.\n");
2231 }
2232
2233 /* Source cannot be depth/stencil (although it can be YUV or compressed,
2234 * and AMD also allows blitting from luminance formats). */
2235 if (src_format->depth_size || src_format->stencil_size)
2236 {
2237 TRACE("Source format is depth/stencil.\n");
2239 }
2240
2241 /* The destination format must be a simple RGB format (no luminance, YUV,
2242 * compression, etc.) All such formats have a nonzero red_size; the only
2243 * exceptions are X24G8 (not supported in d3d9) and A8 (which, it turns out,
2244 * no vendor reports support for converting to). */
2245 if (!dst_format->red_size)
2246 {
2247 TRACE("Destination format is not a simple RGB format.\n");
2249 }
2250
2251 return WINED3D_OK;
2252}
static const char * dst_format
Definition: dib.c:1339
struct wined3d_adapter * adapter
#define WINED3D_FORMAT_CAP_BLIT

Referenced by d3d9_CheckDeviceFormatConversion(), and wined3d_check_device_type().

◆ wined3d_check_device_multisample_type()

HRESULT __cdecl wined3d_check_device_multisample_type ( const struct wined3d_adapter *  adapter,
enum wined3d_device_type  device_type,
enum wined3d_format_id  surface_format_id,
BOOL  windowed,
enum wined3d_multisample_type  multisample_type,
unsigned int *  quality_levels 
)

Definition at line 1898 of file directx.c.

1901{
1902 const struct wined3d_format *format;
1904
1905 TRACE("adapter %p, device_type %s, surface_format %s, "
1906 "windowed %#x, multisample_type %#x, quality_levels %p.\n",
1908 windowed, multisample_type, quality_levels);
1909
1910 if (surface_format_id == WINED3DFMT_UNKNOWN)
1912 if (multisample_type < WINED3D_MULTISAMPLE_NONE)
1914 if (multisample_type > WINED3D_MULTISAMPLE_16_SAMPLES)
1915 {
1916 FIXME("multisample_type %u not handled yet.\n", multisample_type);
1918 }
1919
1920 format = wined3d_get_format(adapter, surface_format_id, 0);
1921
1922 if (multisample_type && !(format->multisample_types & 1u << (multisample_type - 1)))
1924
1925 if (SUCCEEDED(hr) || (multisample_type == WINED3D_MULTISAMPLE_NON_MASKABLE && format->multisample_types))
1926 {
1927 if (quality_levels)
1928 {
1929 if (multisample_type == WINED3D_MULTISAMPLE_NON_MASKABLE)
1930 *quality_levels = wined3d_popcount(format->multisample_types);
1931 else
1932 *quality_levels = 1;
1933 }
1934 return WINED3D_OK;
1935 }
1936
1937 TRACE("Returning not supported.\n");
1938 return hr;
1939}
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define WINED3DERR_INVALIDCALL
Definition: wined3d.h:44
static unsigned int wined3d_popcount(unsigned int x)

Referenced by d3d11_device_CheckFormatSupport(), d3d11_device_CheckMultisampleQualityLevels(), d3d8_CheckDeviceFormat(), d3d8_CheckDeviceMultiSampleType(), d3d9_CheckDeviceFormat(), and d3d9_CheckDeviceMultiSampleType().

◆ wined3d_check_device_type()

HRESULT __cdecl wined3d_check_device_type ( const struct wined3d *  wined3d,
struct wined3d_output *  output,
enum wined3d_device_type  device_type,
enum wined3d_format_id  display_format_id,
enum wined3d_format_id  backbuffer_format_id,
BOOL  windowed 
)

Definition at line 2254 of file directx.c.

2258{
2259 BOOL present_conversion = wined3d->flags & WINED3D_PRESENT_CONVERSION;
2260
2261 TRACE("wined3d %p, output %p, device_type %s, display_format %s, backbuffer_format %s, windowed %#x.\n",
2262 wined3d, output, debug_d3ddevicetype(device_type), debug_d3dformat(display_format),
2263 debug_d3dformat(backbuffer_format), windowed);
2264
2265 /* The task of this function is to check whether a certain display / backbuffer format
2266 * combination is available on the given output. In fullscreen mode microsoft specified
2267 * that the display format shouldn't provide alpha and that ignoring alpha the backbuffer
2268 * and display format should match exactly.
2269 * In windowed mode format conversion can occur and this depends on the driver. */
2270
2271 /* There are only 4 display formats. */
2272 if (!(display_format == WINED3DFMT_B5G6R5_UNORM
2273 || display_format == WINED3DFMT_B5G5R5X1_UNORM
2274 || display_format == WINED3DFMT_B8G8R8X8_UNORM
2275 || display_format == WINED3DFMT_B10G10R10A2_UNORM))
2276 {
2277 TRACE("Format %s is not supported as display format.\n", debug_d3dformat(display_format));
2279 }
2280
2281 if (!windowed)
2282 {
2283 /* If the requested display format is not available, don't continue. */
2284 if (!wined3d_output_get_mode_count(output, display_format,
2286 {
2287 TRACE("No available modes for display format %s.\n", debug_d3dformat(display_format));
2289 }
2290
2291 present_conversion = FALSE;
2292 }
2293 else if (display_format == WINED3DFMT_B10G10R10A2_UNORM)
2294 {
2295 /* WINED3DFMT_B10G10R10A2_UNORM is only allowed in fullscreen mode. */
2296 TRACE("Unsupported format combination %s / %s in windowed mode.\n",
2297 debug_d3dformat(display_format), debug_d3dformat(backbuffer_format));
2299 }
2300
2301 if (present_conversion)
2302 {
2303 /* Use the display format as back buffer format if the latter is
2304 * WINED3DFMT_UNKNOWN. */
2305 if (backbuffer_format == WINED3DFMT_UNKNOWN)
2306 backbuffer_format = display_format;
2307
2308 if (FAILED(wined3d_check_device_format_conversion(output, device_type, backbuffer_format,
2309 display_format)))
2310 {
2311 TRACE("Format conversion from %s to %s not supported.\n",
2312 debug_d3dformat(backbuffer_format), debug_d3dformat(display_format));
2314 }
2315 }
2316 else
2317 {
2318 /* When format conversion from the back buffer format to the display
2319 * format is not allowed, only a limited number of combinations are
2320 * valid. */
2321
2322 if (display_format == WINED3DFMT_B5G6R5_UNORM && backbuffer_format != WINED3DFMT_B5G6R5_UNORM)
2323 {
2324 TRACE("Unsupported format combination %s / %s.\n",
2325 debug_d3dformat(display_format), debug_d3dformat(backbuffer_format));
2327 }
2328
2329 if (display_format == WINED3DFMT_B5G5R5X1_UNORM
2330 && !(backbuffer_format == WINED3DFMT_B5G5R5X1_UNORM || backbuffer_format == WINED3DFMT_B5G5R5A1_UNORM))
2331 {
2332 TRACE("Unsupported format combination %s / %s.\n",
2333 debug_d3dformat(display_format), debug_d3dformat(backbuffer_format));
2335 }
2336
2337 if (display_format == WINED3DFMT_B8G8R8X8_UNORM
2338 && !(backbuffer_format == WINED3DFMT_B8G8R8X8_UNORM || backbuffer_format == WINED3DFMT_B8G8R8A8_UNORM))
2339 {
2340 TRACE("Unsupported format combination %s / %s.\n",
2341 debug_d3dformat(display_format), debug_d3dformat(backbuffer_format));
2343 }
2344
2345 if (display_format == WINED3DFMT_B10G10R10A2_UNORM
2346 && backbuffer_format != WINED3DFMT_B10G10R10A2_UNORM)
2347 {
2348 TRACE("Unsupported format combination %s / %s.\n",
2349 debug_d3dformat(display_format), debug_d3dformat(backbuffer_format));
2351 }
2352 }
2353
2354 /* Validate that the back buffer format is usable for render targets. */
2357 backbuffer_format)))
2358 {
2359 TRACE("Format %s not allowed for render targets.\n", debug_d3dformat(backbuffer_format));
2361 }
2362
2363 return WINED3D_OK;
2364}
HRESULT CDECL wined3d_check_device_format(const struct wined3d *wined3d, const struct wined3d_adapter *adapter, enum wined3d_device_type device_type, enum wined3d_format_id adapter_format_id, uint32_t usage, unsigned int bind_flags, enum wined3d_resource_type resource_type, enum wined3d_format_id check_format_id)
Definition: directx.c:1972
unsigned int CDECL wined3d_output_get_mode_count(struct wined3d_output *output, enum wined3d_format_id format_id, enum wined3d_scanline_ordering scanline_ordering, bool cached)
Definition: directx.c:1341
HRESULT CDECL wined3d_check_device_format_conversion(const struct wined3d_output *output, enum wined3d_device_type device_type, enum wined3d_format_id src_format_id, enum wined3d_format_id dst_format_id)
Definition: directx.c:2210
#define WINED3D_PRESENT_CONVERSION
Definition: wined3d.h:1324

Referenced by d3d8_CheckDeviceType(), and d3d9_CheckDeviceType().

◆ wined3d_command_list_decref()

ULONG __cdecl wined3d_command_list_decref ( struct wined3d_command_list *  list)

Definition at line 4651 of file cs.c.

4652{
4653 unsigned int refcount = InterlockedDecrement(&list->refcount);
4654 struct wined3d_device *device = list->device;
4655 const struct wined3d_cs_packet *packet;
4656 SIZE_T i, offset;
4657
4658 TRACE("%p decreasing refcount to %u.\n", list, refcount);
4659
4660 if (!refcount)
4661 {
4662 for (i = 0; i < list->command_list_count; ++i)
4663 wined3d_command_list_decref(list->command_lists[i]);
4664 for (i = 0; i < list->resource_count; ++i)
4665 wined3d_resource_decref(list->resources[i]);
4666 for (i = 0; i < list->upload_count; ++i)
4667 wined3d_resource_decref(list->uploads[i].resource);
4668 for (i = 0; i < list->query_count; ++i)
4669 wined3d_query_decref(list->queries[i].query);
4670
4671 offset = 0;
4672 while (offset < list->data_size)
4673 {
4676 }
4677
4681 }
4682
4683 return refcount;
4684}
Definition: list.h:39
static void wined3d_command_list_destroy_object(void *object)
Definition: cs.c:4600
static struct wined3d_cs_packet * wined3d_next_cs_packet(const uint8_t *data, SIZE_T *offset, SIZE_T mask)
Definition: cs.c:636
static void wined3d_cs_packet_decref_objects(const struct wined3d_cs_packet *packet)
Definition: cs.c:3675
ULONG CDECL wined3d_command_list_decref(struct wined3d_command_list *list)
Definition: cs.c:4651
ULONG CDECL wined3d_query_decref(struct wined3d_query *query)
Definition: query.c:432
GLintptr offset
Definition: glext.h:5920
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
Definition: dhcpd.h:135
static ULONG wined3d_resource_decref(struct wined3d_resource *resource)

Referenced by d3d11_command_list_Release(), wined3d_command_list_decref(), and wined3d_deferred_context_destroy().

◆ wined3d_command_list_incref()

ULONG __cdecl wined3d_command_list_incref ( struct wined3d_command_list *  list)

Definition at line 4642 of file cs.c.

4643{
4644 unsigned int refcount = InterlockedIncrement(&list->refcount);
4645
4646 TRACE("%p increasing refcount to %u.\n", list, refcount);
4647
4648 return refcount;
4649}

Referenced by wined3d_deferred_context_reference_command_list().

◆ wined3d_create()

struct wined3d *__cdecl wined3d_create ( uint32_t  flags)

Definition at line 142 of file wined3d_main.c.

143{
144 struct wined3d *object;
145 HRESULT hr;
146
147 if (!(object = calloc(1, FIELD_OFFSET(struct wined3d, adapters[1]))))
148 {
149 ERR("Failed to allocate wined3d object memory.\n");
150 return NULL;
151 }
152
155
156 if (FAILED(hr = wined3d_init(object, flags)))
157 {
158 WARN("Failed to initialize wined3d object, hr %#lx.\n", hr);
159 free(object);
160 return NULL;
161 }
162
163 TRACE("Created wined3d object %p.\n", object);
164
165 return object;
166}
#define ERR(fmt,...)
Definition: precomp.h:57
enum wined3d_renderer renderer
struct wined3d_adapter * adapters[1]
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
HRESULT wined3d_init(struct wined3d *wined3d, uint32_t flags)
Definition: directx.c:3477

Referenced by d3d8_init(), d3d9_init(), ddraw_init(), DirectDrawEnumerateExA(), and dxgi_factory_init().

◆ wined3d_decref()

ULONG __cdecl wined3d_decref ( struct wined3d *  wined3d)

Definition at line 198 of file directx.c.

199{
200 unsigned int refcount = InterlockedDecrement(&wined3d->ref);
201
202 TRACE("%p decreasing refcount to %u.\n", wined3d, refcount);
203
204 if (!refcount)
205 {
206 unsigned int i;
207
209 for (i = 0; i < wined3d->adapter_count; ++i)
210 {
212
213 adapter->adapter_ops->adapter_destroy(adapter);
214 }
215 free(wined3d);
217 }
218
219 return refcount;
220}
unsigned int adapter_count

Referenced by d3d8_init(), d3d8_Release(), d3d9_init(), d3d9_Release(), ddraw_destroy(), ddraw_init(), DirectDrawEnumerateExA(), dxgi_factory_Release(), wined3d_device_cleanup(), and wined3d_device_init().

◆ wined3d_deferred_context_create()

HRESULT __cdecl wined3d_deferred_context_create ( struct wined3d_device *  device,
struct wined3d_device_context **  context 
)

Definition at line 4443 of file cs.c.

4444{
4446 HRESULT hr;
4447
4448 TRACE("device %p, context %p.\n", device, context);
4449
4450 if (!(object = calloc(1, sizeof(*object))))
4451 return E_OUTOFMEMORY;
4452
4453 if (FAILED(hr = wined3d_state_create(device, &device->cs->c.state->feature_level, 1, &object->c.state)))
4454 {
4455 free(object);
4456 return hr;
4457 }
4458
4459 object->c.ops = &wined3d_deferred_context_ops;
4460 object->c.device = device;
4461
4462 /* Make sure the first command list gets the state reset when executed.
4463 * Resets for subsequent command lists are encoded in wined3d_deferred_context_record_command_list(). */
4465
4466 TRACE("Created deferred context %p.\n", object);
4467 *context = &object->c;
4468
4469 return S_OK;
4470}
static const struct wined3d_device_context_ops wined3d_deferred_context_ops
Definition: cs.c:4430
void wined3d_device_context_emit_reset_state(struct wined3d_device_context *context, bool invalidate)
Definition: cs.c:2269
#define S_OK
Definition: intsafe.h:52
Definition: http.c:7252
HRESULT CDECL wined3d_state_create(struct wined3d_device *device, const enum wined3d_feature_level *levels, unsigned int level_count, struct wined3d_state **state)
Definition: stateblock.c:2357

Referenced by d3d11_deferred_context_create().

◆ wined3d_deferred_context_destroy()

void __cdecl wined3d_deferred_context_destroy ( struct wined3d_device_context *  context)

Definition at line 4472 of file cs.c.

4473{
4475 const struct wined3d_cs_packet *packet;
4476 SIZE_T i, offset = 0;
4477
4478 TRACE("context %p.\n", context);
4479
4480 for (i = 0; i < deferred->resource_count; ++i)
4482 free(deferred->resources);
4483
4484 for (i = 0; i < deferred->upload_count; ++i)
4485 {
4486 wined3d_resource_decref(deferred->uploads[i].resource);
4487 HeapFree(deferred->upload_heap, 0, deferred->uploads[i].resource);
4488 }
4489
4490 if (deferred->upload_heap)
4491 {
4493 {
4494 HeapDestroy(deferred->upload_heap);
4495 free(deferred->upload_heap_refcount);
4496 }
4497 }
4498
4499 free(deferred->uploads);
4500
4501 for (i = 0; i < deferred->command_list_count; ++i)
4503 free(deferred->command_lists);
4504
4505 for (i = 0; i < deferred->query_count; ++i)
4506 wined3d_query_decref(deferred->queries[i].query);
4507 free(deferred->queries);
4508
4509 while (offset < deferred->data_size)
4510 {
4511 packet = wined3d_next_cs_packet(deferred->data, &offset, ~(SIZE_T)0);
4513 }
4514
4515 wined3d_state_destroy(deferred->c.state);
4516 free(deferred->data);
4517 free(deferred);
4518}
static struct wined3d_deferred_context * wined3d_deferred_context_from_context(struct wined3d_device_context *context)
Definition: cs.c:4199
#define HeapFree(x, y, z)
Definition: compat.h:735
BOOL WINAPI HeapDestroy(HANDLE hHeap)
Definition: heapmem.c:85
SIZE_T command_list_count
Definition: cs.c:4192
struct wined3d_deferred_upload * uploads
Definition: cs.c:4184
struct wined3d_resource ** resources
Definition: cs.c:4181
struct wined3d_deferred_query_issue * queries
Definition: cs.c:4196
struct wined3d_command_list ** command_lists
Definition: cs.c:4193
LONG * upload_heap_refcount
Definition: cs.c:4187
SIZE_T resource_count
Definition: cs.c:4180
struct wined3d_device_context c
Definition: cs.c:4175
void CDECL wined3d_state_destroy(struct wined3d_state *state)
Definition: stateblock.c:2385

Referenced by d3d11_device_context_Release().

◆ wined3d_deferred_context_record_command_list()

HRESULT __cdecl wined3d_deferred_context_record_command_list ( struct wined3d_device_context *  context,
bool  restore,
struct wined3d_command_list **  list 
)

Definition at line 4520 of file cs.c.

4522{
4525 void *memory;
4526
4527 TRACE("context %p, list %p.\n", context, list);
4528
4530 memory = malloc(sizeof(*object) + deferred->resource_count * sizeof(*object->resources)
4531 + deferred->upload_count * sizeof(*object->uploads)
4532 + deferred->command_list_count * sizeof(*object->command_lists)
4533 + deferred->query_count * sizeof(*object->queries)
4534 + deferred->data_size);
4535
4536 if (!memory)
4537 {
4539 return E_OUTOFMEMORY;
4540 }
4541
4542 object = memory;
4543 memory = &object[1];
4544 memset(object, 0, sizeof(*object));
4545 object->refcount = 1;
4546 object->device = deferred->c.device;
4547
4548 object->resources = memory;
4549 memory = &object->resources[deferred->resource_count];
4550 object->resource_count = deferred->resource_count;
4551 memcpy(object->resources, deferred->resources, deferred->resource_count * sizeof(*object->resources));
4552 /* Transfer our references to the resources to the command list. */
4553
4554 object->uploads = memory;
4555 memory = &object->uploads[deferred->upload_count];
4556 object->upload_count = deferred->upload_count;
4557 memcpy(object->uploads, deferred->uploads, deferred->upload_count * sizeof(*object->uploads));
4558 /* Transfer our references to the resources to the command list. */
4559
4560 object->command_lists = memory;
4561 memory = &object->command_lists[deferred->command_list_count];
4562 object->command_list_count = deferred->command_list_count;
4563 memcpy(object->command_lists, deferred->command_lists,
4564 deferred->command_list_count * sizeof(*object->command_lists));
4565 /* Transfer our references to the command lists to the command list. */
4566
4567 object->queries = memory;
4568 memory = &object->queries[deferred->query_count];
4569 object->query_count = deferred->query_count;
4570 memcpy(object->queries, deferred->queries, deferred->query_count * sizeof(*object->queries));
4571 /* Transfer our references to the queries to the command list. */
4572
4573 object->data = memory;
4574 object->data_size = deferred->data_size;
4575 memcpy(object->data, deferred->data, deferred->data_size);
4576
4577 deferred->data_size = 0;
4578 deferred->resource_count = 0;
4579 deferred->upload_count = 0;
4580 deferred->command_list_count = 0;
4581 deferred->query_count = 0;
4582
4583 object->upload_heap = deferred->upload_heap;
4584 if ((object->upload_heap_refcount = deferred->upload_heap_refcount))
4585 InterlockedIncrement(object->upload_heap_refcount);
4586
4587 /* This is in fact recorded into a subsequent command list. */
4588 if (restore)
4589 wined3d_device_context_set_state(&deferred->c, deferred->c.state);
4590 else
4592
4593 TRACE("Created command list %p.\n", object);
4594 *list = object;
4596
4597 return S_OK;
4598}
#define malloc
Definition: debug_ros.c:4
void CDECL wined3d_device_context_set_state(struct wined3d_device_context *context, struct wined3d_state *state)
Definition: device.c:1915
void CDECL wined3d_device_context_reset_state(struct wined3d_device_context *context)
Definition: device.c:1904
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
static char memory[1024 *256]
Definition: process.c:122
static void wined3d_device_context_unlock(struct wined3d_device_context *context)
static void wined3d_device_context_lock(struct wined3d_device_context *context)

Referenced by d3d11_device_context_FinishCommandList().

◆ wined3d_depth_stencil_state_create()

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 at line 404 of file device.c.

407{
409
410 TRACE("device %p, desc %p, parent %p, parent_ops %p, state %p.\n",
412
413 if (!(object = calloc(1, sizeof(*object))))
414 return E_OUTOFMEMORY;
415
416 object->refcount = 1;
417 object->desc = *desc;
418 object->parent = parent;
419 object->parent_ops = parent_ops;
420 object->device = device;
421
422 object->writes_ds = depth_stencil_state_desc_writes_ds(desc);
423
424 TRACE("Created depth/stencil state %p.\n", object);
425 *state = object;
426
427 return WINED3D_OK;
428}
static bool depth_stencil_state_desc_writes_ds(const struct wined3d_depth_stencil_state_desc *desc)
Definition: device.c:390
struct wined3d_device * device
const struct wined3d_parent_ops * parent_ops

Referenced by d3d_depthstencil_state_create(), and wined3d_device_apply_stateblock().

◆ wined3d_depth_stencil_state_decref()

ULONG __cdecl wined3d_depth_stencil_state_decref ( struct wined3d_depth_stencil_state *  state)

Definition at line 359 of file device.c.

360{
361 unsigned int refcount = wined3d_atomic_decrement_mutex_lock(&state->refcount);
362 struct wined3d_device *device = state->device;
363
364 TRACE("%p decreasing refcount to %u.\n", state, refcount);
365
366 if (!refcount)
367 {
368 state->parent_ops->wined3d_object_destroyed(state->parent);
371 }
372
373 return refcount;
374}
static void wined3d_depth_stencil_state_destroy_object(void *object)
Definition: device.c:352

Referenced by d3d11_depthstencil_state_Release(), device_free_depth_stencil_state(), wined3d_cs_packet_decref_objects(), wined3d_device_apply_stateblock(), and wined3d_device_context_set_depth_stencil_state().

◆ wined3d_depth_stencil_state_get_parent()

void *__cdecl wined3d_depth_stencil_state_get_parent ( const struct wined3d_depth_stencil_state *  state)

Definition at line 376 of file device.c.

377{
378 TRACE("state %p.\n", state);
379
380 return state->parent;
381}

Referenced by d3d11_device_context_OMGetDepthStencilState().

◆ wined3d_depth_stencil_state_incref()

ULONG __cdecl wined3d_depth_stencil_state_incref ( struct wined3d_depth_stencil_state *  state)

Definition at line 343 of file device.c.

344{
345 unsigned int refcount = InterlockedIncrement(&state->refcount);
346
347 TRACE("%p increasing refcount to %u.\n", state, refcount);
348
349 return refcount;
350}

Referenced by d3d11_depthstencil_state_AddRef(), wined3d_cs_packet_incref_objects(), and wined3d_device_context_set_depth_stencil_state().

◆ wined3d_device_acquire_focus_window()

HRESULT __cdecl wined3d_device_acquire_focus_window ( struct wined3d_device *  device,
HWND  window 
)

Definition at line 1133 of file device.c.

1134{
1135 unsigned int screensaver_active;
1136
1137 TRACE("device %p, window %p.\n", device, window);
1138
1140 {
1141 ERR("Failed to register window %p.\n", window);
1142 return E_FAIL;
1143 }
1144
1145 InterlockedExchangePointer((void **)&device->focus_window, window);
1146 SetWindowPos(window, 0, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);
1147 SystemParametersInfoW(SPI_GETSCREENSAVEACTIVE, 0, &screensaver_active, 0);
1148 if ((device->restore_screensaver = !!screensaver_active))
1150
1151 return WINED3D_OK;
1152}
#define E_FAIL
Definition: ddrawi.h:102
#define InterlockedExchangePointer(Target, Value)
Definition: dshow.h:45
static IHTMLWindow2 * window
Definition: events.c:77
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define SWP_NOMOVE
Definition: winuser.h:1255
#define SPI_SETSCREENSAVEACTIVE
Definition: winuser.h:1377
#define SWP_NOSIZE
Definition: winuser.h:1256
BOOL WINAPI SystemParametersInfoW(_In_ UINT uiAction, _In_ UINT uiParam, _Inout_opt_ PVOID pvParam, _In_ UINT fWinIni)
#define SPI_GETSCREENSAVEACTIVE
Definition: winuser.h:1376
BOOL CDECL wined3d_register_window(struct wined3d *wined3d, HWND window, struct wined3d_device *device, unsigned int flags)
Definition: wined3d_main.c:715

Referenced by ddraw_set_cooperative_level(), device_init(), and wined3d_device_reset().

◆ wined3d_device_apply_stateblock()

void __cdecl wined3d_device_apply_stateblock ( struct wined3d_device *  device,
struct wined3d_stateblock *  stateblock 
)

Definition at line 3038 of file stateblock.c.

3040{
3041 bool set_blend_state = false, set_depth_stencil_state = false;
3042
3043 const struct wined3d_stateblock_state *state = &stateblock->stateblock_state;
3044 const unsigned int word_bit_count = sizeof(DWORD) * CHAR_BIT;
3045 struct wined3d_saved_states *changed = &stateblock->changed;
3046 struct wined3d_device_context *context = &device->cs->c;
3047 unsigned int i, j, start, idx;
3048 bool set_depth_bounds = false;
3049 struct wined3d_range range;
3050 uint32_t map;
3051
3052 TRACE("device %p, stateblock %p.\n", device, stateblock);
3053
3055
3056 if (changed->vertexShader)
3057 {
3058 /* Clip planes are affected by the view matrix, but only if not using
3059 * vertex shaders. */
3061 }
3062
3063 for (start = 0; ; start = range.offset + range.size)
3064 {
3066 break;
3067
3068 wined3d_device_set_vs_consts_f(device, range.offset, range.size, &state->vs_consts_f[range.offset]);
3069 }
3070
3071 map = changed->vertexShaderConstantsI;
3072 for (start = 0; ; start = range.offset + range.size)
3073 {
3075 break;
3076
3077 wined3d_device_set_vs_consts_i(device, range.offset, range.size, &state->vs_consts_i[range.offset]);
3078 }
3079
3080 map = changed->vertexShaderConstantsB;
3081 for (start = 0; ; start = range.offset + range.size)
3082 {
3084 break;
3085
3086 wined3d_device_set_vs_consts_b(device, range.offset, range.size, &state->vs_consts_b[range.offset]);
3087 }
3088
3089 for (start = 0; ; start = range.offset + range.size)
3090 {
3092 break;
3093
3094 wined3d_device_set_ps_consts_f(device, range.offset, range.size, &state->ps_consts_f[range.offset]);
3095 }
3096
3097 map = changed->pixelShaderConstantsI;
3098 for (start = 0; ; start = range.offset + range.size)
3099 {
3101 break;
3102
3103 wined3d_device_set_ps_consts_i(device, range.offset, range.size, &state->ps_consts_i[range.offset]);
3104 }
3105
3106 map = changed->pixelShaderConstantsB;
3107 for (start = 0; ; start = range.offset + range.size)
3108 {
3110 break;
3111
3112 wined3d_device_set_ps_consts_b(device, range.offset, range.size, &state->ps_consts_b[range.offset]);
3113 }
3114
3115 for (i = 0; i < ARRAY_SIZE(changed->renderState); ++i)
3116 {
3117 map = changed->renderState[i];
3118 while (map)
3119 {
3121 idx = i * word_bit_count + j;
3122
3123 switch (idx)
3124 {
3130 case WINED3D_RS_BLENDOP:
3139 set_blend_state = true;
3140 break;
3141
3155 case WINED3D_RS_ZENABLE:
3156 case WINED3D_RS_ZFUNC:
3158 set_depth_stencil_state = true;
3159 break;
3160
3164 set_depth_bounds = true;
3165 break;
3166
3167 case WINED3D_RS_AMBIENT:
3168 changed->lights = 1;
3169 break;
3170
3184 break;
3185
3187 if (state->rs[WINED3D_RS_ANTIALIAS])
3188 FIXME("Antialias not supported yet.\n");
3189 break;
3190
3192 break;
3193
3194 case WINED3D_RS_WRAPU:
3195 if (state->rs[WINED3D_RS_WRAPU])
3196 FIXME("Render state WINED3D_RS_WRAPU not implemented yet.\n");
3197 break;
3198
3199 case WINED3D_RS_WRAPV:
3200 if (state->rs[WINED3D_RS_WRAPV])
3201 FIXME("Render state WINED3D_RS_WRAPV not implemented yet.\n");
3202 break;
3203
3206 FIXME("Render state WINED3D_RS_MONOENABLE not implemented yet.\n");
3207 break;
3208
3209 case WINED3D_RS_ROP2:
3210 if (state->rs[WINED3D_RS_ROP2])
3211 FIXME("Render state WINED3D_RS_ROP2 not implemented yet.\n");
3212 break;
3213
3215 if (state->rs[WINED3D_RS_PLANEMASK])
3216 FIXME("Render state WINED3D_RS_PLANEMASK not implemented yet.\n");
3217 break;
3218
3220 if (!state->rs[WINED3D_RS_LASTPIXEL])
3221 {
3222 static bool warned;
3223 if (!warned)
3224 {
3225 FIXME("Last Pixel Drawing Disabled, not handled yet.\n");
3226 warned = true;
3227 }
3228 }
3229 break;
3230
3232 if (state->rs[WINED3D_RS_ZVISIBLE])
3233 FIXME("WINED3D_RS_ZVISIBLE not implemented.\n");
3234 break;
3235
3237 if (state->rs[WINED3D_RS_SUBPIXEL])
3238 FIXME("Render state WINED3D_RS_SUBPIXEL not implemented yet.\n");
3239 break;
3240
3242 if (state->rs[WINED3D_RS_SUBPIXELX])
3243 FIXME("Render state WINED3D_RS_SUBPIXELX not implemented yet.\n");
3244 break;
3245
3248 FIXME("Stippled Alpha not supported yet.\n");
3249 break;
3250
3253 FIXME("Render state WINED3D_RS_STIPPLEENABLE not implemented yet.\n");
3254 break;
3255
3258 FIXME("Render state WINED3D_RS_MIPMAPLODBIAS not implemented yet.\n");
3259 break;
3260
3263 FIXME("Render state WINED3D_RS_ANISOTROPY not implemented yet.\n");
3264 break;
3265
3268 FIXME("Render state WINED3D_RS_FLUSHBATCH not implemented yet.\n");
3269 break;
3270
3273 FIXME("Render state WINED3D_RS_TRANSLUCENTSORTINDEPENDENT not implemented yet.\n");
3274 break;
3275
3276 case WINED3D_RS_WRAP0:
3277 case WINED3D_RS_WRAP1:
3278 case WINED3D_RS_WRAP2:
3279 case WINED3D_RS_WRAP3:
3280 case WINED3D_RS_WRAP4:
3281 case WINED3D_RS_WRAP5:
3282 case WINED3D_RS_WRAP6:
3283 case WINED3D_RS_WRAP7:
3284 case WINED3D_RS_WRAP8:
3285 case WINED3D_RS_WRAP9:
3286 case WINED3D_RS_WRAP10:
3287 case WINED3D_RS_WRAP11:
3288 case WINED3D_RS_WRAP12:
3289 case WINED3D_RS_WRAP13:
3290 case WINED3D_RS_WRAP14:
3291 case WINED3D_RS_WRAP15:
3292 {
3293 static unsigned int once;
3294
3295 if ((state->rs[idx]) && !once++)
3296 FIXME("(WINED3D_RS_WRAP0) Texture wrapping not yet supported.\n");
3297 break;
3298 }
3299
3300 case WINED3D_RS_EXTENTS:
3301 if (state->rs[WINED3D_RS_EXTENTS])
3302 FIXME("Render state WINED3D_RS_EXTENTS not implemented yet.\n");
3303 break;
3304
3307 FIXME("Render state WINED3D_RS_COLORKEYBLENDENABLE not implemented yet.\n");
3308 break;
3309
3311 {
3312 static unsigned int once;
3313
3314 if ((state->rs[WINED3D_RS_SOFTWAREVERTEXPROCESSING]) && !once++)
3315 FIXME("Software vertex processing not implemented.\n");
3316 break;
3317 }
3318
3321 FIXME("WINED3D_RS_PATCHEDGESTYLE %#x not yet implemented.\n",
3323 break;
3324
3326 {
3327 union
3328 {
3329 uint32_t d;
3330 float f;
3331 } tmpvalue;
3332 tmpvalue.f = 1.0f;
3333
3334 if (state->rs[WINED3D_RS_PATCHSEGMENTS] != tmpvalue.d)
3335 {
3336 static bool displayed = false;
3337
3338 tmpvalue.d = state->rs[WINED3D_RS_PATCHSEGMENTS];
3339 if(!displayed)
3340 FIXME("(WINED3D_RS_PATCHSEGMENTS,%f) not yet implemented.\n", tmpvalue.f);
3341
3342 displayed = true;
3343 }
3344 break;
3345 }
3346
3348 WARN("token: %#x.\n", state->rs[WINED3D_RS_DEBUGMONITORTOKEN]);
3349 break;
3350
3352 break;
3353
3355 break;
3356
3359 FIXME("WINED3D_RS_POSITIONDEGREE %#x not yet implemented.\n",
3361 break;
3362
3365 FIXME("WINED3D_RS_NORMALDEGREE %#x not yet implemented.\n",
3367 break;
3368
3370 break;
3371
3373 break;
3374
3377 FIXME("WINED3D_RS_ENABLEADAPTIVETESSELLATION %#x not yet implemented.\n",
3379 break;
3380
3381 default:
3383 break;
3384 }
3385 }
3386 }
3387
3388 if (set_blend_state || changed->alpha_to_coverage
3390 {
3391 struct wined3d_blend_state *blend_state;
3393 struct wine_rb_entry *entry;
3394 struct wined3d_color colour;
3395 unsigned int sample_mask;
3396
3397 memset(&desc, 0, sizeof(desc));
3398 desc.alpha_to_coverage = state->alpha_to_coverage;
3399 desc.independent = FALSE;
3401 desc.alpha_to_coverage = TRUE;
3402 desc.rt[0].enable = state->rs[WINED3D_RS_ALPHABLENDENABLE];
3403 desc.rt[0].src = state->rs[WINED3D_RS_SRCBLEND];
3404 desc.rt[0].dst = state->rs[WINED3D_RS_DESTBLEND];
3405 desc.rt[0].op = state->rs[WINED3D_RS_BLENDOP];
3407 {
3408 desc.rt[0].src_alpha = state->rs[WINED3D_RS_SRCBLENDALPHA];
3409 desc.rt[0].dst_alpha = state->rs[WINED3D_RS_DESTBLENDALPHA];
3410 desc.rt[0].op_alpha = state->rs[WINED3D_RS_BLENDOPALPHA];
3411 }
3412 else
3413 {
3414 desc.rt[0].src_alpha = state->rs[WINED3D_RS_SRCBLEND];
3415 desc.rt[0].dst_alpha = state->rs[WINED3D_RS_DESTBLEND];
3416 desc.rt[0].op_alpha = state->rs[WINED3D_RS_BLENDOP];
3417 }
3418 desc.rt[0].writemask = state->rs[WINED3D_RS_COLORWRITEENABLE];
3419 desc.rt[1].writemask = state->rs[WINED3D_RS_COLORWRITEENABLE1];
3420 desc.rt[2].writemask = state->rs[WINED3D_RS_COLORWRITEENABLE2];
3421 desc.rt[3].writemask = state->rs[WINED3D_RS_COLORWRITEENABLE3];
3422 if (desc.rt[1].writemask != desc.rt[0].writemask
3423 || desc.rt[2].writemask != desc.rt[0].writemask
3424 || desc.rt[3].writemask != desc.rt[0].writemask)
3425 {
3426 desc.independent = TRUE;
3427 for (i = 1; i < 4; ++i)
3428 {
3429 desc.rt[i].enable = desc.rt[0].enable;
3430 desc.rt[i].src = desc.rt[0].src;
3431 desc.rt[i].dst = desc.rt[0].dst;
3432 desc.rt[i].op = desc.rt[0].op;
3433 desc.rt[i].src_alpha = desc.rt[0].src_alpha;
3434 desc.rt[i].dst_alpha = desc.rt[0].dst_alpha;
3435 desc.rt[i].op_alpha = desc.rt[0].op_alpha;
3436 }
3437 }
3438
3441 else
3442 wined3d_device_context_get_blend_state(context, &colour, &sample_mask);
3443
3444 if ((entry = wine_rb_get(&device->blend_states, &desc)))
3445 {
3446 blend_state = WINE_RB_ENTRY_VALUE(entry, struct wined3d_blend_state, entry);
3447 wined3d_device_context_set_blend_state(context, blend_state, &colour,
3449 }
3451 &wined3d_null_parent_ops, &blend_state)))
3452 {
3453 wined3d_device_context_set_blend_state(context, blend_state, &colour,
3455 if (wine_rb_put(&device->blend_states, &desc, &blend_state->entry) == -1)
3456 {
3457 ERR("Failed to insert blend state.\n");
3458 wined3d_blend_state_decref(blend_state);
3459 }
3460 }
3461 }
3462
3463 if (set_depth_stencil_state)
3464 {
3465 struct wined3d_depth_stencil_state *depth_stencil_state;
3467 struct wine_rb_entry *entry;
3468 unsigned int stencil_ref;
3469
3470 memset(&desc, 0, sizeof(desc));
3471 switch (state->rs[WINED3D_RS_ZENABLE])
3472 {
3473 case WINED3D_ZB_FALSE:
3474 desc.depth = FALSE;
3475 break;
3476
3477 case WINED3D_ZB_USEW:
3478 FIXME("W buffer is not well handled.\n");
3479 case WINED3D_ZB_TRUE:
3480 desc.depth = TRUE;
3481 break;
3482
3483 default:
3484 FIXME("Unrecognized depth buffer type %#x.\n", state->rs[WINED3D_RS_ZENABLE]);
3485 }
3486 desc.depth_write = state->rs[WINED3D_RS_ZWRITEENABLE];
3487 desc.depth_func = state->rs[WINED3D_RS_ZFUNC];
3488 desc.stencil = state->rs[WINED3D_RS_STENCILENABLE];
3489 desc.stencil_read_mask = state->rs[WINED3D_RS_STENCILMASK];
3490 desc.stencil_write_mask = state->rs[WINED3D_RS_STENCILWRITEMASK];
3491 desc.front.fail_op = state->rs[WINED3D_RS_STENCILFAIL];
3492 desc.front.depth_fail_op = state->rs[WINED3D_RS_STENCILZFAIL];
3493 desc.front.pass_op = state->rs[WINED3D_RS_STENCILPASS];
3494 desc.front.func = state->rs[WINED3D_RS_STENCILFUNC];
3495
3497 {
3498 desc.back.fail_op = state->rs[WINED3D_RS_BACK_STENCILFAIL];
3499 desc.back.depth_fail_op = state->rs[WINED3D_RS_BACK_STENCILZFAIL];
3500 desc.back.pass_op = state->rs[WINED3D_RS_BACK_STENCILPASS];
3501 desc.back.func = state->rs[WINED3D_RS_BACK_STENCILFUNC];
3502 }
3503 else
3504 {
3505 desc.back = desc.front;
3506 }
3507
3509 stencil_ref = state->rs[WINED3D_RS_STENCILREF];
3510 else
3512
3513 if ((entry = wine_rb_get(&device->depth_stencil_states, &desc)))
3514 {
3515 depth_stencil_state = WINE_RB_ENTRY_VALUE(entry, struct wined3d_depth_stencil_state, entry);
3516 wined3d_device_context_set_depth_stencil_state(context, depth_stencil_state, stencil_ref);
3517 }
3519 &wined3d_null_parent_ops, &depth_stencil_state)))
3520 {
3521 wined3d_device_context_set_depth_stencil_state(context, depth_stencil_state, stencil_ref);
3522 if (wine_rb_put(&device->depth_stencil_states, &desc, &depth_stencil_state->entry) == -1)
3523 {
3524 ERR("Failed to insert depth/stencil state.\n");
3525 wined3d_depth_stencil_state_decref(depth_stencil_state);
3526 }
3527 }
3528 }
3529
3530 if (set_depth_bounds)
3531 {
3536 }
3537
3538 for (i = 0; i < ARRAY_SIZE(changed->textureState); ++i)
3539 {
3540 map = changed->textureState[i];
3541 while (map)
3542 {
3544
3545 switch (j)
3546 {
3554 break;
3555
3556 default:
3558 }
3559 }
3560 }
3561
3562 for (i = 0; i < ARRAY_SIZE(changed->samplerState); ++i)
3563 {
3566 struct wined3d_texture *texture;
3567 struct wined3d_sampler *sampler;
3568 unsigned int bind_index = i;
3569 struct wine_rb_entry *entry;
3570
3571 if (!changed->samplerState[i] && !(changed->textures & (1u << i)))
3572 continue;
3573
3574 if (!(texture = state->textures[i]))
3575 continue;
3576
3577 memset(&desc, 0, sizeof(desc));
3579
3581 {
3583 bind_index -= WINED3D_VERTEX_SAMPLER_OFFSET;
3584 }
3585
3586 if ((entry = wine_rb_get(&device->samplers, &desc)))
3587 {
3589
3591 }
3593 {
3595
3596 if (wine_rb_put(&device->samplers, &desc, &sampler->entry) == -1)
3597 {
3598 ERR("Failed to insert sampler.\n");
3600 }
3601 }
3602 }
3603
3604 if (state->vertex_declaration && state->vertex_declaration->position_transformed)
3605 {
3606 /* We reuse the projection matrix to undo the translation between
3607 * clip coordinates and pixel coordinates. */
3608 if (changed->position_transformed || changed->viewport)
3609 {
3610 float x = state->viewport.x;
3611 float y = state->viewport.y;
3612 float w = state->viewport.width;
3613 float h = state->viewport.height;
3614 float x_scale = 2.0f / w;
3615 float x_offset = (-(2.0f * x) - w) / w;
3616 float y_scale = 2.0f / -h;
3617 float y_offset = (-(2.0f * y) - h) / -h;
3618 bool depth = (state->rs[WINED3D_RS_ZENABLE] && context->state->fb.depth_stencil);
3619 float z_scale = depth ? 1.0f : 0.0f;
3620 const struct wined3d_matrix matrix =
3621 {
3622 x_scale, 0.0f, 0.0f, 0.0f,
3623 0.0f, y_scale, 0.0f, 0.0f,
3624 0.0f, 0.0f, z_scale, 0.0f,
3625 x_offset, y_offset, 0.0f, 1.0f,
3626 };
3627
3629 offsetof(struct wined3d_ffp_vs_constants, projection_matrix), sizeof(matrix), &matrix);
3630 }
3631
3633 {
3634 /* wined3d_ffp_vs_settings.ortho_fog still needs the
3635 * device state to be set. */
3637 }
3638 }
3639 else if (changed->transforms)
3640 {
3642 {
3643 changed->lights = 1;
3645 }
3646
3648 {
3651 offsetof(struct wined3d_ffp_vs_constants, projection_matrix),
3652 sizeof(state->transforms[WINED3D_TS_PROJECTION]), &state->transforms[WINED3D_TS_PROJECTION]);
3653 /* wined3d_ffp_vs_settings.ortho_fog and vs_compile_args.ortho_fog
3654 * still need the device state to be set. */
3656 }
3657
3658 /* Clip planes are affected by the view matrix. */
3660 }
3661
3662 if (changed->indices)
3663 wined3d_device_context_set_index_buffer(context, state->index_buffer, state->index_format, 0);
3665 if (changed->vertexDecl)
3667
3668 map = changed->streamSource | changed->streamFreq;
3669 while (map)
3670 {
3673 }
3674
3675 map = changed->textures;
3676 while (map)
3677 {
3678 struct wined3d_color float_key[2];
3679 struct wined3d_texture *texture;
3680
3682 texture = state->textures[i];
3684
3685 if (!i && texture && (texture->color_key_flags & WINED3D_CKEY_SRC_BLT))
3686 {
3687 wined3d_format_get_float_color_key(texture->resource.format, &texture->src_blt_color_key, float_key);
3690 offsetof(struct wined3d_ffp_ps_constants, color_key), sizeof(float_key), float_key);
3691 }
3692 }
3693
3694 map = changed->clipplane;
3695 while (map)
3696 {
3698
3699 /* In Direct3D, clipping is done based on the position as transformed
3700 * by the world (model) matrix, but not the view matrix.
3701 *
3702 * GL and Vulkan do not distinguish the world and view, so we pass them
3703 * as a single uniform. That means, however, that we need to unapply the
3704 * view matrix from the clip planes that we are applying. We do this by
3705 * multiplying by the transpose of the inverse of the view matrix.
3706 *
3707 * This works mathematically (c = clip plane, p = position):
3708 *
3709 * clip distance = dot((V⁻¹)ᵀc, VMp)
3710 * = ((V⁻¹)ᵀc)ᵀVMp
3711 * = cᵀV⁻¹VMp
3712 * = cᵀMp
3713 * = dot(c, Mp)
3714 */
3715
3716 if (!state->vs)
3717 {
3718 struct wined3d_matrix matrix;
3719 struct wined3d_vec4 plane;
3720
3721 invert_matrix(&matrix, &state->transforms[WINED3D_TS_VIEW]);
3723 wined3d_vec4_transform(&plane, &state->clip_planes[i], &matrix);
3725 }
3726 else
3727 {
3728 wined3d_device_set_clip_plane(device, i, &state->clip_planes[i]);
3729 }
3730 }
3731
3732 if (changed->material)
3734 offsetof(struct wined3d_ffp_vs_constants, material), sizeof(state->material), &state->material);
3735
3736 if (changed->lights)
3737 {
3738 unsigned int point_idx, spot_idx, directional_idx, parallel_point_idx;
3739 unsigned int point_count = 0, spot_count = 0, directional_count = 0;
3740 struct wined3d_ffp_light_constants constants;
3742
3744 {
3745 wined3d_device_context_set_light(context, light->OriginalIndex, &light->OriginalParms);
3746 wined3d_device_set_light_enable(device, light->OriginalIndex, light->glIndex != -1);
3747 list_remove(&light->changed_entry);
3748 light->changed = false;
3749 }
3750
3752
3753 for (unsigned int i = 0; i < WINED3D_MAX_ACTIVE_LIGHTS; ++i)
3754 {
3755 if (!state->light_state->lights[i])
3756 continue;
3757
3758 switch (state->light_state->lights[i]->OriginalParms.type)
3759 {
3761 ++point_count;
3762 break;
3763 case WINED3D_LIGHT_SPOT:
3764 ++spot_count;
3765 break;
3767 ++directional_count;
3768 break;
3770 break;
3771 default:
3772 FIXME("Unhandled light type %#x.\n", state->light_state->lights[i]->OriginalParms.type);
3773 break;
3774 }
3775 }
3776 point_idx = 0;
3777 spot_idx = point_idx + point_count;
3778 directional_idx = spot_idx + spot_count;
3779 parallel_point_idx = directional_idx + directional_count;
3780
3781 for (unsigned int i = 0; i < WINED3D_MAX_ACTIVE_LIGHTS; ++i)
3782 {
3783 const struct wined3d_light_info *light_info = state->light_state->lights[i];
3784 const struct wined3d_light_constants *light_constants;
3786 unsigned int idx;
3787
3788 if (!light_info)
3789 continue;
3790 type = light_info->OriginalParms.type;
3791 light_constants = &state->light_state->lights[i]->constants;
3792
3793 switch (type)
3794 {
3796 idx = point_idx++;
3797 break;
3798 case WINED3D_LIGHT_SPOT:
3799 idx = spot_idx++;
3800 break;
3802 idx = directional_idx++;
3803 break;
3805 idx = parallel_point_idx++;
3806 break;
3807 default:
3808 FIXME("Unhandled light type %#x.\n", type);
3809 continue;
3810 }
3811 constants.lights[idx] = *light_constants;
3812
3814 wined3d_vec4_transform(&constants.lights[idx].position,
3815 &light_constants->position, &state->transforms[WINED3D_TS_VIEW]);
3817 wined3d_vec4_transform(&constants.lights[idx].direction,
3818 &light_constants->direction, &state->transforms[WINED3D_TS_VIEW]);
3819 }
3820
3823 }
3824
3825 if (changed->modelview_matrices)
3826 {
3827 union wined3d_ffp_vs_modelview_matrices matrices;
3828
3829 get_modelview_matrix(state, 0, &matrices.modelview_matrices[0]);
3830
3832 {
3833 for (i = 1; i < MAX_VERTEX_BLENDS; ++i)
3834 get_modelview_matrix(state, i, &matrices.modelview_matrices[i]);
3835
3838 offsetof(struct wined3d_ffp_vs_constants, modelview), sizeof(matrices), &matrices);
3839 }
3840 else
3841 {
3842 compute_normal_matrix(&matrices.not_blended.normal_matrix,
3843 device->adapter->d3d_info.wined3d_creation_flags & WINED3D_LEGACY_FFP_LIGHTING,
3844 &matrices.not_blended.modelview_matrix);
3845
3848 offsetof(struct wined3d_ffp_vs_constants, modelview), sizeof(matrices.not_blended), &matrices);
3849 }
3850 }
3851
3852 if (changed->texture_matrices)
3853 {
3855
3856 for (i = 0; i < WINED3D_MAX_FFP_TEXTURES; ++i)
3857 get_texture_matrix(state, i, &constants.texture_matrices[i]);
3861 sizeof(constants.texture_matrices), constants.texture_matrices);
3862 }
3863
3864 if (changed->point_scale)
3865 {
3866 struct wined3d_ffp_point_constants constants;
3867
3869
3871 {
3872 float scale_factor = state->viewport.height * state->viewport.height;
3873
3877 }
3878 else
3879 {
3880 constants.scale_const = 1.0f;
3881 constants.scale_linear = 0.0f;
3882 constants.scale_quad = 0.0f;
3883 }
3884
3887 }
3888
3889 if (changed->bumpenv_constants)
3890 {
3891 struct wined3d_ffp_bumpenv_constants constants;
3892
3893 for (unsigned int i = 0; i < WINED3D_MAX_FFP_TEXTURES; ++i)
3894 {
3895 constants.matrices[i]._00 = int_to_float(state->texture_states[i][WINED3D_TSS_BUMPENV_MAT00]);
3896 constants.matrices[i]._01 = int_to_float(state->texture_states[i][WINED3D_TSS_BUMPENV_MAT01]);
3897 constants.matrices[i]._10 = int_to_float(state->texture_states[i][WINED3D_TSS_BUMPENV_MAT10]);
3898 constants.matrices[i]._11 = int_to_float(state->texture_states[i][WINED3D_TSS_BUMPENV_MAT11]);
3899 constants.loffset[i] = int_to_float(state->texture_states[i][WINED3D_TSS_BUMPENV_LOFFSET]);
3900 constants.lscale[i] = int_to_float(state->texture_states[i][WINED3D_TSS_BUMPENV_LSCALE]);
3901 }
3902
3904 offsetof(struct wined3d_ffp_ps_constants, bumpenv), sizeof(constants), &constants);
3905 }
3906
3907 if (changed->ffp_ps_constants)
3908 {
3909 static const struct wined3d_color specular_enabled = {1.0f, 1.0f, 1.0f, 0.0f};
3910 static const struct wined3d_color specular_disabled;
3912
3913 for (i = 0; i < WINED3D_MAX_FFP_TEXTURES; ++i)
3914 wined3d_color_from_d3dcolor(&constants.texture_constants[i], state->texture_states[i][WINED3D_TSS_CONSTANT]);
3915
3917
3918 constants.specular_enable = state->rs[WINED3D_RS_SPECULARENABLE] ? specular_enabled : specular_disabled;
3919
3922 }
3923
3925 {
3926 float f = (state->rs[WINED3D_RS_ALPHAREF] & 0xff) / 255.0f;
3927
3930 offsetof(struct wined3d_ffp_ps_constants, alpha_test_ref), sizeof(f), &f);
3931 }
3932
3933 if (changed->vertexShader)
3934 {
3942 }
3943 if (changed->pixelShader)
3944 {
3952 }
3953
3954 /* XXX: We don't invalidate HLSL shaders for every field contained in
3955 * wined3d_ffp_vs_settings / ffp_frag_settings; only the ones that the HLSL
3956 * FFP pipeline cares about. The rest should eventually be removed from
3957 * those structs and left only in vs_compile_args / ps_compile_args. */
3958
3959 if (changed->ffp_vs_settings
3960 && (!state->vs || !state->vertex_declaration || state->vertex_declaration->position_transformed))
3961 {
3962 if (device->adapter->d3d_info.ffp_hlsl)
3963 {
3964 struct wined3d_shader *shader = get_ffp_vertex_shader(device, device->cs->c.state);
3965
3969 }
3970 else
3971 {
3972 /* Force invalidation of the vertex shader. */
3974 }
3975 }
3976
3977 if (changed->ffp_ps_settings && !state->ps)
3978 {
3979 if (device->adapter->d3d_info.ffp_hlsl)
3980 {
3981 struct wined3d_shader *shader = get_ffp_pixel_shader(device, device->cs->c.state);
3982
3986 }
3987 else
3988 {
3989 /* Force invalidation of the pixel shader. */
3991 }
3992 }
3993
3996
3997 assert(list_empty(&stateblock->changed.changed_lights));
3998 memset(&stateblock->changed, 0, sizeof(stateblock->changed));
3999 list_init(&stateblock->changed.changed_lights);
4000
4001 TRACE("Applied stateblock %p.\n", stateblock);
4002}
#define ARRAY_SIZE(A)
Definition: main.h:20
static void list_init(struct list_entry *head)
Definition: list.h:51
Definition: _map.h:48
void wined3d_device_context_push_constants(struct wined3d_device_context *context, enum wined3d_push_constants type, uint32_t update_mask, unsigned int start_idx, unsigned int count, const void *constants)
Definition: cs.c:2231
void wined3d_device_context_set_depth_bounds(struct wined3d_device_context *context, bool enable, float min_depth, float max_depth)
Definition: cs.c:1871
void wined3d_device_context_emit_set_shader(struct wined3d_device_context *context, enum wined3d_shader_type type, struct wined3d_shader *shader)
Definition: cs.c:1768
range
Definition: d3dx9_private.h:58
static void wined3d_color_from_d3dcolor(struct wined3d_color *wined3d_colour, D3DCOLOR d3d_colour)
Definition: device.c:34
void CDECL wined3d_device_context_set_depth_stencil_state(struct wined3d_device_context *context, struct wined3d_depth_stencil_state *depth_stencil_state, unsigned int stencil_ref)
Definition: device.c:2077
struct wined3d_depth_stencil_state *CDECL wined3d_device_context_get_depth_stencil_state(const struct wined3d_device_context *context, unsigned int *stencil_ref)
Definition: device.c:1871
void CDECL wined3d_device_context_set_shader(struct wined3d_device_context *context, enum wined3d_shader_type type, struct wined3d_shader *shader)
Definition: device.c:1984
ULONG CDECL wined3d_depth_stencil_state_decref(struct wined3d_depth_stencil_state *state)
Definition: device.c:359
void CDECL wined3d_device_context_set_blend_state(struct wined3d_device_context *context, struct wined3d_blend_state *blend_state, const struct wined3d_color *blend_factor, unsigned int sample_mask)
Definition: device.c:2050
void CDECL wined3d_device_context_set_vertex_declaration(struct wined3d_device_context *context, struct wined3d_vertex_declaration *declaration)
Definition: device.c:2588
HRESULT CDECL wined3d_device_context_set_stream_sources(struct wined3d_device_context *context, unsigned int start_idx, unsigned int count, const struct wined3d_stream_state *streams)
Definition: device.c:2510
ULONG CDECL wined3d_blend_state_decref(struct wined3d_blend_state *state)
Definition: device.c:284
void CDECL wined3d_device_context_set_samplers(struct wined3d_device_context *context, enum wined3d_shader_type type, unsigned int start_idx, unsigned int count, struct wined3d_sampler *const *samplers)
Definition: device.c:2243
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
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
struct wined3d_blend_state *CDECL wined3d_device_context_get_blend_state(const struct wined3d_device_context *context, struct wined3d_color *blend_factor, unsigned int *sample_mask)
Definition: device.c:1859
void CDECL wined3d_device_context_set_index_buffer(struct wined3d_device_context *context, struct wined3d_buffer *buffer, enum wined3d_format_id format_id, unsigned int offset)
Definition: device.c:2557
void get_modelview_matrix(const struct wined3d_stateblock_state *state, unsigned int index, struct wined3d_matrix *mat)
Definition: utils.c:5588
void compute_normal_matrix(struct wined3d_matrix *normal_matrix, BOOL legacy_lighting, const struct wined3d_matrix *modelview)
Definition: utils.c:7042
BOOL invert_matrix(struct wined3d_matrix *out, const struct wined3d_matrix *m)
Definition: utils.c:6775
void get_texture_matrix(const struct wined3d_stateblock_state *state, const unsigned int tex, struct wined3d_matrix *mat)
Definition: utils.c:5671
void wined3d_format_get_float_color_key(const struct wined3d_format *format, const struct wined3d_color_key *key, struct wined3d_color *float_colors)
Definition: utils.c:5997
#define CHAR_BIT
Definition: cabinet.h:45
#define assert(_expr)
Definition: assert.h:32
POINTL point
Definition: edittest.c:50
GLint GLint GLsizei GLsizei GLsizei depth
Definition: gl.h:1546
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLenum GLuint texture
Definition: glext.h:6295
GLuint sampler
Definition: glext.h:7283
GLuint shader
Definition: glext.h:6030
GLfloat f
Definition: glext.h:7540
GLuint GLenum matrix
Definition: glext.h:9407
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:6102
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
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
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 GLenum GLenum GLenum GLint GLuint GLenum GLenum GLfloat GLenum GLfloat GLenum GLint const GLfloat GLenum GLint const GLushort GLint GLint GLsizei GLsizei GLenum GLsizei GLsizei GLenum GLenum const GLvoid GLenum plane
Definition: glfuncs.h:270
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 light
Definition: glfuncs.h:170
const char cursor[]
Definition: icontest.c:13
int scale_factor
Definition: jpeglib.h:997
#define d
Definition: ke_i.h:81
#define f
Definition: ke_i.h:83
constants
Definition: resource.c:30
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
ULONG CDECL wined3d_sampler_decref(struct wined3d_sampler *sampler)
Definition: sampler.c:35
#define offsetof(TYPE, MEMBER)
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
Definition: list.h:242
#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
uint64_t size
Definition: devices.h:44
struct wine_rb_entry entry
struct wine_rb_entry entry
struct wined3d_matrix texture_matrices[WINED3D_MAX_FFP_TEXTURES]
struct wined3d_vec4 position direction
struct list changed_entry
struct wined3d_light OriginalParms
uint32_t point_scale
Definition: stateblock.c:66
uint32_t texture_matrices
Definition: stateblock.c:64
uint32_t bumpenv_constants
Definition: stateblock.c:71
uint32_t textureState[WINED3D_MAX_FFP_TEXTURES]
Definition: stateblock.c:45
uint32_t modelview_matrices
Definition: stateblock.c:65
uint16_t streamSource
Definition: stateblock.c:42
uint32_t ps_consts_f[WINED3D_BITMAP_SIZE(WINED3D_MAX_PS_CONSTS_F)]
Definition: stateblock.c:38
uint32_t renderState[WINED3D_BITMAP_SIZE(WINEHIGHEST_RENDER_STATE+1)]
Definition: stateblock.c:44
uint16_t vertexShaderConstantsB
Definition: stateblock.c:37
uint16_t pixelShaderConstantsI
Definition: stateblock.c:39
uint32_t transform[WINED3D_BITMAP_SIZE(WINED3D_HIGHEST_TRANSFORM_STATE+1)]
Definition: stateblock.c:41
uint32_t ffp_vs_settings
Definition: stateblock.c:67
uint32_t vs_consts_f[WINED3D_BITMAP_SIZE(WINED3D_MAX_VS_CONSTS_F)]
Definition: stateblock.c:35
uint32_t position_transformed
Definition: stateblock.c:70
uint32_t pixelShader
Definition: stateblock.c:53
uint16_t vertexShaderConstantsI
Definition: stateblock.c:36
uint32_t vertexShader
Definition: stateblock.c:54
uint16_t samplerState[WINED3D_MAX_COMBINED_SAMPLERS]
Definition: stateblock.c:46
uint32_t alpha_to_coverage
Definition: stateblock.c:57
uint16_t pixelShaderConstantsB
Definition: stateblock.c:40
uint32_t ffp_ps_constants
Definition: stateblock.c:63
uint32_t ffp_ps_settings
Definition: stateblock.c:68
struct wined3d_stateblock_state stateblock_state
Definition: stateblock.c:86
struct wined3d_saved_states changed
Definition: stateblock.c:84
@ VKD3D_SHADER_D3DBC_BOOL_CONSTANT_REGISTER
Definition: vkd3d_shader.h:919
@ VKD3D_SHADER_D3DBC_FLOAT_CONSTANT_REGISTER
Definition: vkd3d_shader.h:915
@ VKD3D_SHADER_D3DBC_INT_CONSTANT_REGISTER
Definition: vkd3d_shader.h:917
const struct wined3d_parent_ops wined3d_null_parent_ops
Definition: directx.c:3472
static void wined3d_device_set_vs_consts_b(struct wined3d_device *device, unsigned int start_idx, unsigned int count, const BOOL *constants)
Definition: stateblock.c:2552
static void wined3d_device_set_texture(struct wined3d_device *device, unsigned int stage, struct wined3d_texture *texture)
Definition: stateblock.c:2770
static void bind_push_constant_buffer(struct wined3d_device *device, enum wined3d_push_constants type, enum wined3d_shader_type shader_type, unsigned int shader_binding)
Definition: stateblock.c:3024
static struct wined3d_shader * get_ffp_pixel_shader(struct wined3d_device *device, const struct wined3d_state *state)
Definition: stateblock.c:2999
static void wined3d_device_set_clip_plane(struct wined3d_device *device, unsigned int plane_idx, const struct wined3d_vec4 *plane)
Definition: stateblock.c:2696
static void wined3d_device_context_set_light(struct wined3d_device_context *context, unsigned int light_idx, const struct wined3d_light *light)
Definition: stateblock.c:2661
static void wined3d_device_set_render_state(struct wined3d_device *device, enum wined3d_render_state state, unsigned int value)
Definition: stateblock.c:2733
static void wined3d_device_set_base_vertex_index(struct wined3d_device *device, int base_index)
Definition: stateblock.c:2545
static void wined3d_device_set_ps_consts_b(struct wined3d_device *device, unsigned int start_idx, unsigned int count, const BOOL *constants)
Definition: stateblock.c:2603
static void wined3d_device_set_ps_consts_f(struct wined3d_device *device, unsigned int start_idx, unsigned int count, const struct wined3d_vec4 *constants)
Definition: stateblock.c:2637
static void wined3d_device_set_ps_consts_i(struct wined3d_device *device, unsigned int start_idx, unsigned int count, const struct wined3d_ivec4 *constants)
Definition: stateblock.c:2620
static void sampler_desc_from_sampler_states(struct wined3d_sampler_desc *desc, const uint32_t *sampler_states, const struct wined3d_texture *texture)
Definition: stateblock.c:2850
static void wined3d_device_set_transform(struct wined3d_device *device, enum wined3d_transform_state state, const struct wined3d_matrix *matrix)
Definition: stateblock.c:2808
static void wined3d_device_set_vs_consts_f(struct wined3d_device *device, unsigned int start_idx, unsigned int count, const struct wined3d_vec4 *constants)
Definition: stateblock.c:2586
static void wined3d_device_set_vs_consts_i(struct wined3d_device *device, unsigned int start_idx, unsigned int count, const struct wined3d_ivec4 *constants)
Definition: stateblock.c:2569
static void wined3d_device_set_texture_stage_state(struct wined3d_device *device, unsigned int stage, enum wined3d_texture_stage_state state, uint32_t value)
Definition: stateblock.c:2753
void CDECL wined3d_stateblock_apply_clear_state(struct wined3d_stateblock *stateblock, struct wined3d_device *device)
Definition: stateblock.c:2917
static struct wined3d_shader * get_ffp_vertex_shader(struct wined3d_device *device, const struct wined3d_state *state)
Definition: stateblock.c:2965
static void wined3d_device_set_light_enable(struct wined3d_device *device, unsigned int light_idx, bool enable)
Definition: stateblock.c:2672
static void transpose_matrix(struct wined3d_matrix *out, const struct wined3d_matrix *m)
Definition: stateblock.c:260
static int wined3d_bit_scan(unsigned int *x)
Definition: wined3d.h:2982
#define WINED3D_MAX_PS_CONSTS_F
Definition: wined3d.h:1605
#define WINED3D_MAX_VS_CONSTS_F
Definition: wined3d.h:1604
wined3d_light_type
Definition: wined3d.h:65
#define WINED3D_CKEY_SRC_BLT
Definition: wined3d.h:1341
#define WINED3D_VERTEX_SAMPLER_OFFSET
Definition: wined3d.h:1037
#define WINED3D_MAX_CONSTS_B
Definition: wined3d.h:1602
#define WINED3D_MAX_CLIP_DISTANCES
Definition: wined3d.h:1601
wined3d_shader_type
Definition: wined3d.h:840
#define WINED3D_MAX_CONSTS_I
Definition: wined3d.h:1603
#define WINED3D_LEGACY_FFP_LIGHTING
Definition: wined3d.h:1329
#define WINED3D_MAX_FFP_TEXTURES
Definition: wined3d.h:1597
#define WINED3D_SHADER_CONST_PS_BUMP_ENV
@ WINED3D_PUSH_CONSTANTS_PS_FFP
@ WINED3D_PUSH_CONSTANTS_PS_B
@ WINED3D_PUSH_CONSTANTS_VS_B
@ WINED3D_PUSH_CONSTANTS_VS_FFP
@ WINED3D_PUSH_CONSTANTS_VS_I
@ WINED3D_PUSH_CONSTANTS_PS_F
@ WINED3D_PUSH_CONSTANTS_PS_I
@ WINED3D_PUSH_CONSTANTS_VS_F
static BOOL wined3d_bitmap_get_range(const uint32_t *bitmap, unsigned int bit_count, unsigned int start, struct wined3d_range *range)
static void wined3d_vec4_transform(struct wined3d_vec4 *dst, const struct wined3d_vec4 *v, const struct wined3d_matrix *m)
#define WINED3D_SHADER_CONST_FFP_VERTEXBLEND
#define WINED3D_MAX_ACTIVE_LIGHTS
#define WINED3D_SHADER_CONST_FFP_COLOR_KEY
static uint32_t wined3d_mask_from_size(unsigned int size)
#define WINED3D_SHADER_CONST_PS_ALPHA_TEST
#define WINED3D_SHADER_CONST_FFP_MODELVIEW
#define WINED3D_SHADER_CONST_FFP_PS
#define WINED3D_SHADER_CONST_FFP_LIGHTS
#define WINED3D_SHADER_CONST_FFP_PROJ
#define WINED3D_FFP_CONSTANTS_EXTRA_REGISTER
#define MAX_VERTEX_BLENDS
static BOOL wined3d_bitmap_is_set(const uint32_t *map, unsigned int idx)
static float int_to_float(uint32_t i)
#define WINED3D_SHADER_CONST_FFP_TEXMATRIX
#define WINED3D_SHADER_CONST_VS_POINTSIZE
#define WINED3D_SHADER_CONST_FFP_MATERIAL

Referenced by d3d8_device_DrawIndexedPrimitive(), d3d8_device_DrawIndexedPrimitiveUP(), d3d8_device_DrawPrimitive(), d3d8_device_DrawPrimitiveUP(), d3d9_device_DrawIndexedPrimitive(), d3d9_device_DrawIndexedPrimitiveUP(), d3d9_device_DrawPrimitive(), d3d9_device_DrawPrimitiveUP(), d3d_device_apply_state(), and wined3d_device_process_vertices().

◆ wined3d_device_begin_scene()

HRESULT __cdecl wined3d_device_begin_scene ( struct wined3d_device *  device)

Definition at line 3700 of file device.c.

3701{
3702 /* At the moment we have no need for any functionality at the beginning
3703 * of a scene. */
3704 TRACE("device %p.\n", device);
3705
3706 if (device->inScene)
3707 {
3708 WARN("Already in scene, returning WINED3DERR_INVALIDCALL.\n");
3710 }
3711 device->inScene = TRUE;
3712 return WINED3D_OK;
3713}

Referenced by d3d8_device_BeginScene(), d3d9_device_BeginScene(), and d3d_device7_BeginScene().

◆ wined3d_device_clear()

HRESULT __cdecl wined3d_device_clear ( struct wined3d_device *  device,
unsigned int  rect_count,
const RECT *  rects,
uint32_t  flags,
const struct wined3d_color *  color,
float  z,
unsigned int  stencil 
)

Definition at line 3729 of file device.c.

3731{
3732 struct wined3d_fb_state *fb = &device->cs->c.state->fb;
3733
3734 TRACE("device %p, rect_count %u, rects %p, flags %#x, color %s, depth %.8e, stencil %u.\n",
3735 device, rect_count, rects, flags, debug_color(color), depth, stencil);
3736
3737 if (!rect_count && rects)
3738 {
3739 WARN("Rects is %p, but rect_count is 0, ignoring clear\n", rects);
3740 return WINED3D_OK;
3741 }
3742
3744 {
3746 if (!ds)
3747 {
3748 WARN("Clearing depth and/or stencil without a depth stencil buffer attached, returning WINED3DERR_INVALIDCALL\n");
3749 /* TODO: What about depth stencil buffers without stencil bits? */
3751 }
3752 else if (flags & WINED3DCLEAR_TARGET)
3753 {
3754 if (ds->width < fb->render_targets[0]->width
3755 || ds->height < fb->render_targets[0]->height)
3756 {
3757 WARN("Silently ignoring depth and target clear with mismatching sizes\n");
3758 return WINED3D_OK;
3759 }
3760 }
3761 }
3762
3763 wined3d_cs_emit_clear(device->cs, rect_count, rects, flags, color, depth, stencil);
3764
3765 return WINED3D_OK;
3766}
void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *rects, uint32_t flags, const struct wined3d_color *color, float depth, DWORD stencil)
Definition: cs.c:804
const char * debug_color(const struct wined3d_color *color)
Definition: utils.c:4561
GLuint color
Definition: glext.h:6243
GLint GLfloat GLint stencil
Definition: glext.h:6260
#define ds
Definition: i386-dis.c:443
struct wined3d_rendertarget_view * depth_stencil
struct wined3d_rendertarget_view * render_targets[WINED3D_MAX_RENDER_TARGETS]
#define WINED3DCLEAR_TARGET
Definition: wined3d.h:1008
#define WINED3DCLEAR_STENCIL
Definition: wined3d.h:1010
#define WINED3DCLEAR_ZBUFFER
Definition: wined3d.h:1009

Referenced by d3d8_device_Clear(), d3d9_device_Clear(), d3d_device7_Clear(), and wined3d_device_set_implicit_swapchain().

◆ wined3d_device_context_blt()

HRESULT __cdecl wined3d_device_context_blt ( struct wined3d_device_context *  context,
struct wined3d_texture *  dst_texture,
unsigned int  dst_sub_resource_idx,
const RECT *  dst_rect,
struct wined3d_texture *  src_texture,
unsigned int  src_sub_resource_idx,
const RECT *  src_rect,
unsigned int  flags,
const struct wined3d_blt_fx *  fx,
enum wined3d_texture_filter_type  filter 
)

Definition at line 3854 of file texture.c.

3858{
3859 struct wined3d_box src_box = {src_rect->left, src_rect->top, src_rect->right, src_rect->bottom, 0, 1};
3860 struct wined3d_box dst_box = {dst_rect->left, dst_rect->top, dst_rect->right, dst_rect->bottom, 0, 1};
3861 HRESULT hr;
3862
3863 TRACE("context %p, dst_texture %p, dst_sub_resource_idx %u, dst_rect %s, src_texture %p, "
3864 "src_sub_resource_idx %u, src_rect %s, flags %#x, fx %p, filter %s.\n",
3865 context, dst_texture, dst_sub_resource_idx, wine_dbgstr_rect(dst_rect), src_texture,
3866 src_sub_resource_idx, wine_dbgstr_rect(src_rect), flags, fx, debug_d3dtexturefiltertype(filter));
3867
3868 if (!wined3d_texture_validate_sub_resource_idx(dst_texture, dst_sub_resource_idx)
3869 || dst_texture->resource.type != WINED3D_RTYPE_TEXTURE_2D)
3871
3872 if (!wined3d_texture_validate_sub_resource_idx(src_texture, src_sub_resource_idx)
3873 || src_texture->resource.type != WINED3D_RTYPE_TEXTURE_2D)
3875
3879
3880 if (FAILED(hr = wined3d_resource_check_box_dimensions(&dst_texture->resource, dst_sub_resource_idx, &dst_box)))
3881 return hr;
3882
3883 if (FAILED(hr = wined3d_resource_check_box_dimensions(&src_texture->resource, src_sub_resource_idx, &src_box)))
3884 return hr;
3885
3886 if (dst_texture->sub_resources[dst_sub_resource_idx].map_count
3887 || src_texture->sub_resources[src_sub_resource_idx].map_count)
3888 {
3889 WARN("Sub-resource is busy, returning WINEDDERR_SURFACEBUSY.\n");
3890 return WINEDDERR_SURFACEBUSY;
3891 }
3892
3893 if (!src_texture->resource.format->depth_size != !dst_texture->resource.format->depth_size
3894 || !src_texture->resource.format->stencil_size != !dst_texture->resource.format->stencil_size)
3895 {
3896 WARN("Rejecting depth/stencil blit between incompatible formats.\n");
3898 }
3899
3900 if (dst_texture->resource.device != src_texture->resource.device)
3901 {
3902 FIXME("Rejecting cross-device blit.\n");
3903 return E_NOTIMPL;
3904 }
3905
3906 wined3d_device_context_emit_blt_sub_resource(context, &dst_texture->resource, dst_sub_resource_idx,
3907 &dst_box, &src_texture->resource, src_sub_resource_idx, &src_box, flags, fx, filter);
3908
3909 if (dst_texture->dirty_regions)
3910 wined3d_texture_add_dirty_region(dst_texture, dst_sub_resource_idx, &dst_box);
3911
3912 return WINED3D_OK;
3913}
static const char * wine_dbgstr_rect(const RECT *prc)
Definition: atltest.h:160
void wined3d_device_context_emit_blt_sub_resource(struct wined3d_device_context *context, struct wined3d_resource *dst_resource, unsigned int dst_sub_resource_idx, const struct wined3d_box *dst_box, struct wined3d_resource *src_resource, unsigned int src_sub_resource_idx, const struct wined3d_box *src_box, unsigned int flags, const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter)
Definition: cs.c:2703
#define E_NOTIMPL
Definition: ddrawi.h:99
HRESULT wined3d_resource_check_box_dimensions(struct wined3d_resource *resource, unsigned int sub_resource_idx, const struct wined3d_box *box)
Definition: resource.c:488
HRESULT CDECL wined3d_texture_add_dirty_region(struct wined3d_texture *texture, UINT layer, const struct wined3d_box *dirty_region)
Definition: texture.c:2132
bool wined3d_texture_validate_sub_resource_idx(const struct wined3d_texture *texture, unsigned int sub_resource_idx)
Definition: texture.c:50
const char * debug_d3dtexturefiltertype(enum wined3d_texture_filter_type filter_type)
Definition: utils.c:5194
long bottom
Definition: dcommon.idl:29
long right
Definition: dcommon.idl:29
long left
Definition: dcommon.idl:29
long top
Definition: dcommon.idl:29
Definition: filter.c:165
struct wined3d_texture::wined3d_texture_sub_resource * sub_resources
struct wined3d_resource resource
struct wined3d_texture::wined3d_dirty_regions * dirty_regions
GLfixed fx
Definition: tritemp.h:484
#define WINEDDERR_SURFACEBUSY
Definition: wined3d.h:47

Referenced by copy_mipmap_chain(), d3d8_device_CopyRects(), d3d9_device_GetRenderTargetData(), d3d9_device_StretchRect(), ddraw_surface7_BltFast(), ddraw_surface_blt(), ddraw_surface_update_frontbuffer(), wined3d_cs_exec_present(), wined3d_device_context_resolve_sub_resource(), and wined3d_swapchain_get_front_buffer_data().

◆ wined3d_device_context_clear_rendertarget_view()

HRESULT __cdecl wined3d_device_context_clear_rendertarget_view ( struct wined3d_device_context *  context,
struct wined3d_rendertarget_view *  view,
const RECT *  rect,
unsigned int  flags,
const struct wined3d_color *  color,
float  depth,
unsigned int  stencil 
)

Definition at line 4468 of file device.c.

4471{
4472 struct wined3d_resource *resource;
4473 RECT r;
4474
4475 TRACE("context %p, view %p, rect %s, flags %#x, color %s, depth %.8e, stencil %u.\n",
4477
4478 if (!flags)
4479 return WINED3D_OK;
4480
4481 resource = view->resource;
4482 if (resource->type == WINED3D_RTYPE_BUFFER)
4483 {
4484 FIXME("Not implemented for %s resources.\n", debug_d3dresourcetype(resource->type));
4486 }
4487
4488 if (!rect)
4489 {
4490 SetRect(&r, 0, 0, view->width, view->height);
4491 rect = &r;
4492 }
4493 else
4494 {
4495 struct wined3d_box b = {rect->left, rect->top, rect->right, rect->bottom, 0, 1};
4496 HRESULT hr;
4497
4498 if (FAILED(hr = wined3d_resource_check_box_dimensions(resource, view->sub_resource_idx, &b)))
4499 return hr;
4500 }
4501
4505
4506 return WINED3D_OK;
4507}
RECT rect
Definition: combotst.c:67
void wined3d_device_context_emit_clear_rendertarget_view(struct wined3d_device_context *context, struct wined3d_rendertarget_view *view, const RECT *rect, unsigned int flags, const struct wined3d_color *color, float depth, unsigned int stencil)
Definition: cs.c:844
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
#define resource
Definition: kernel32.h:9
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
Definition: dcommon.idl:28

Referenced by d3d10_device_ClearDepthStencilView(), d3d10_device_ClearRenderTargetView(), d3d11_device_context_ClearDepthStencilView(), d3d11_device_context_ClearRenderTargetView(), d3d9_device_ColorFill(), and ddraw_surface_blt().

◆ wined3d_device_context_clear_sysmem_texture()

HRESULT __cdecl wined3d_device_context_clear_sysmem_texture ( struct wined3d_device_context *  context,
struct wined3d_texture *  texture,
unsigned int  sub_resource_idx,
const RECT *  rect,
unsigned int  flags,
const struct wined3d_color *  color 
)

Definition at line 896 of file cs.c.

899{
901
902 TRACE("context %p, texture %p, sub_resource_idx %u, rect %s, flags %#x, color %s.\n",
904
905 if (rect)
906 {
907 struct wined3d_box b = {rect->left, rect->top, rect->right, rect->bottom, 0, 1};
908 HRESULT hr;
909
910 if (FAILED(hr = wined3d_resource_check_box_dimensions(&texture->resource, sub_resource_idx, &b)))
911 return hr;
912 }
913
915
918 op->texture = texture;
919 op->sub_resource_idx = sub_resource_idx;
920 op->color = *color;
921
922 if (rect)
923 {
924 op->rect = *rect;
925 }
926 else
927 {
928 unsigned int level_idx = sub_resource_idx % texture->level_count;
929
930 op->rect.left = 0;
931 op->rect.top = 0;
932 op->rect.right = wined3d_texture_get_level_width(texture, level_idx);
933 op->rect.bottom = wined3d_texture_get_level_height(texture, level_idx);
934 }
935
937
941
943 return S_OK;
944}
static void wined3d_device_context_submit(struct wined3d_device_context *context, enum wined3d_cs_queue_id queue_id)
Definition: cs.c:552
static void wined3d_device_context_finish(struct wined3d_device_context *context, enum wined3d_cs_queue_id queue_id)
Definition: cs.c:558
@ WINED3D_CS_OP_CLEAR_SYSMEM_TEXTURE
Definition: cs.c:139
static void wined3d_device_context_reference_resource(struct wined3d_device_context *context, struct wined3d_resource *resource)
Definition: cs.c:564
static void * wined3d_device_context_require_space(struct wined3d_device_context *context, size_t size, enum wined3d_cs_queue_id queue_id)
Definition: cs.c:546
UINT op
Definition: effect.c:235
unsigned int sub_resource_idx
Definition: cs.c:187
#define WINED3DCLEAR_SYNCHRONOUS
Definition: wined3d.h:1011
static unsigned int wined3d_texture_get_level_height(const struct wined3d_texture *texture, unsigned int level)
static unsigned int wined3d_texture_get_level_width(const struct wined3d_texture *texture, unsigned int level)
@ WINED3D_CS_QUEUE_DEFAULT

Referenced by ddraw_surface_blt().

◆ wined3d_device_context_clear_uav_float()

void __cdecl wined3d_device_context_clear_uav_float ( struct wined3d_device_context *  context,
struct wined3d_unordered_access_view *  view,
const struct wined3d_vec4 *  clear_value 
)

Definition at line 4509 of file device.c.

4511{
4512 TRACE("context %p, view %p, clear_value %s.\n", context, view, debug_vec4(clear_value));
4513
4515 {
4516 WARN("Not supported for view format %s.\n", debug_d3dformat(view->format->id));
4517 return;
4518 }
4519
4521 wined3d_device_context_emit_clear_uav(context, view, (const struct wined3d_uvec4 *)clear_value, true);
4523}
void wined3d_device_context_emit_clear_uav(struct wined3d_device_context *context, struct wined3d_unordered_access_view *view, const struct wined3d_uvec4 *clear_value, bool fp)
Definition: cs.c:2854
const char * debug_vec4(const struct wined3d_vec4 *v)
Definition: utils.c:4585
#define WINED3D_FORMAT_ATTR_FLOAT
#define WINED3D_FORMAT_ATTR_NORMALISED

Referenced by d3d11_device_context_ClearUnorderedAccessViewFloat().

◆ wined3d_device_context_clear_uav_uint()

void __cdecl wined3d_device_context_clear_uav_uint ( struct wined3d_device_context *  context,
struct wined3d_unordered_access_view *  view,
const struct wined3d_uvec4 *  clear_value 
)

Definition at line 4525 of file device.c.

4527{
4528 TRACE("context %p, view %p, clear_value %s.\n", context, view, debug_uvec4(clear_value));
4529
4533}
const char * debug_uvec4(const struct wined3d_uvec4 *v)
Definition: utils.c:4577

Referenced by d3d11_device_context_ClearUnorderedAccessViewUint().

◆ wined3d_device_context_copy_resource()

void __cdecl wined3d_device_context_copy_resource ( struct wined3d_device_context *  context,
struct wined3d_resource *  dst_resource,
struct wined3d_resource *  src_resource 
)

Definition at line 4131 of file device.c.

4133{
4134 unsigned int src_row_block_count, dst_row_block_count;
4135 struct wined3d_texture *dst_texture, *src_texture;
4136 unsigned int src_row_count, dst_row_count;
4137 struct wined3d_box src_box, dst_box;
4138 unsigned int i, j;
4139
4140 TRACE("context %p, dst_resource %p, src_resource %p.\n", context, dst_resource, src_resource);
4141
4142 if (src_resource == dst_resource)
4143 {
4144 WARN("Source and destination are the same resource.\n");
4145 return;
4146 }
4147
4148 if (src_resource->type != dst_resource->type)
4149 {
4150 WARN("Resource types (%s / %s) don't match.\n",
4151 debug_d3dresourcetype(dst_resource->type),
4152 debug_d3dresourcetype(src_resource->type));
4153 return;
4154 }
4155
4156 if (!resources_format_compatible(src_resource, dst_resource))
4157 {
4158 WARN("Resource formats %s and %s are incompatible.\n",
4159 debug_d3dformat(dst_resource->format->id),
4160 debug_d3dformat(src_resource->format->id));
4161 return;
4162 }
4163
4164 src_row_block_count = (src_resource->width + (src_resource->format->block_width - 1))
4165 / src_resource->format->block_width;
4166 dst_row_block_count = (dst_resource->width + (dst_resource->format->block_width - 1))
4167 / dst_resource->format->block_width;
4168 src_row_count = (src_resource->height + (src_resource->format->block_height - 1))
4169 / src_resource->format->block_height;
4170 dst_row_count = (dst_resource->height + (dst_resource->format->block_height - 1))
4171 / dst_resource->format->block_height;
4172
4173 if (src_row_block_count != dst_row_block_count || src_row_count != dst_row_count
4174 || src_resource->depth != dst_resource->depth)
4175 {
4176 WARN("Resource block dimensions (%ux%ux%u / %ux%ux%u) don't match.\n",
4177 dst_row_block_count, dst_row_count, dst_resource->depth,
4178 src_row_block_count, src_row_count, src_resource->depth);
4179 return;
4180 }
4181
4182 if (dst_resource->type == WINED3D_RTYPE_BUFFER)
4183 {
4184 wined3d_box_set(&src_box, 0, 0, src_resource->size, 1, 0, 1);
4186 wined3d_device_context_emit_blt_sub_resource(context, dst_resource, 0, &src_box,
4187 src_resource, 0, &src_box, WINED3D_BLT_RAW, NULL, WINED3D_TEXF_POINT);
4189 return;
4190 }
4191
4192 dst_texture = texture_from_resource(dst_resource);
4193 src_texture = texture_from_resource(src_resource);
4194
4195 if (src_texture->layer_count != dst_texture->layer_count
4196 || src_texture->level_count != dst_texture->level_count)
4197 {
4198 WARN("Subresource layouts (%ux%u / %ux%u) don't match.\n",
4199 dst_texture->layer_count, dst_texture->level_count,
4200 src_texture->layer_count, src_texture->level_count);
4201 return;
4202 }
4203
4205 for (i = 0; i < dst_texture->level_count; ++i)
4206 {
4207 wined3d_texture_get_level_box(src_texture, i, &src_box);
4208 wined3d_texture_get_level_box(dst_texture, i, &dst_box);
4209 for (j = 0; j < dst_texture->layer_count; ++j)
4210 {
4211 unsigned int idx = j * dst_texture->level_count + i;
4212
4214 src_resource, idx, &src_box, WINED3D_BLT_RAW, NULL, WINED3D_TEXF_POINT);
4215 }
4216 }
4218}
static bool resources_format_compatible(const struct wined3d_resource *src_resource, const struct wined3d_resource *dst_resource)
Definition: device.c:4113
enum wined3d_resource_type type
const struct wined3d_format * format
unsigned int level_count
static void wined3d_box_set(struct wined3d_box *box, unsigned int left, unsigned int top, unsigned int right, unsigned int bottom, unsigned int front, unsigned int back)
Definition: wined3d.h:3006
#define WINED3D_BLT_RAW
Definition: wined3d.h:1371
static void wined3d_texture_get_level_box(const struct wined3d_texture *texture, unsigned int level, struct wined3d_box *box)
static struct wined3d_texture * texture_from_resource(struct wined3d_resource *resource)

Referenced by d3d10_device_CopyResource(), and d3d11_device_context_CopyResource().

◆ wined3d_device_context_copy_sub_resource_region()

HRESULT __cdecl wined3d_device_context_copy_sub_resource_region ( struct wined3d_device_context *  context,
struct wined3d_resource *  dst_resource,
unsigned int  dst_sub_resource_idx,
unsigned int  dst_x,
unsigned int  dst_y,
unsigned int  dst_z,
struct wined3d_resource *  src_resource,
unsigned int  src_sub_resource_idx,
const struct wined3d_box *  src_box,
unsigned int  flags 
)

Definition at line 4220 of file device.c.

4224{
4225 struct wined3d_box dst_box, b;
4226
4227 TRACE("context %p, dst_resource %p, dst_sub_resource_idx %u, dst_x %u, dst_y %u, dst_z %u, "
4228 "src_resource %p, src_sub_resource_idx %u, src_box %s, flags %#x.\n",
4229 context, dst_resource, dst_sub_resource_idx, dst_x, dst_y, dst_z,
4230 src_resource, src_sub_resource_idx, debug_box(src_box), flags);
4231
4232 if (flags)
4233 FIXME("Ignoring flags %#x.\n", flags);
4234
4235 if (src_resource == dst_resource && src_sub_resource_idx == dst_sub_resource_idx)
4236 {
4237 WARN("Source and destination are the same sub-resource.\n");
4239 }
4240
4241 if (!resources_format_compatible(src_resource, dst_resource))
4242 {
4243 WARN("Resource formats %s and %s are incompatible.\n",
4244 debug_d3dformat(dst_resource->format->id),
4245 debug_d3dformat(src_resource->format->id));
4247 }
4248
4249 if (dst_resource->type == WINED3D_RTYPE_BUFFER)
4250 {
4251 if (src_resource->type != WINED3D_RTYPE_BUFFER)
4252 {
4253 WARN("Resource types (%s / %s) don't match.\n",
4254 debug_d3dresourcetype(dst_resource->type),
4255 debug_d3dresourcetype(src_resource->type));
4257 }
4258
4259 if (dst_sub_resource_idx)
4260 {
4261 WARN("Invalid dst_sub_resource_idx %u.\n", dst_sub_resource_idx);
4263 }
4264
4265 if (src_sub_resource_idx)
4266 {
4267 WARN("Invalid src_sub_resource_idx %u.\n", src_sub_resource_idx);
4269 }
4270
4271 if (!src_box)
4272 {
4273 unsigned int dst_w;
4274
4275 dst_w = dst_resource->size - dst_x;
4276 wined3d_box_set(&b, 0, 0, min(src_resource->size, dst_w), 1, 0, 1);
4277 src_box = &b;
4278 }
4279 else if ((src_box->left >= src_box->right
4280 || src_box->top >= src_box->bottom
4281 || src_box->front >= src_box->back))
4282 {
4283 WARN("Invalid box %s specified.\n", debug_box(src_box));
4285 }
4286
4287 if (src_box->right > src_resource->size || dst_x >= dst_resource->size
4288 || src_box->right - src_box->left > dst_resource->size - dst_x)
4289 {
4290 WARN("Invalid range specified, dst_offset %u, src_offset %u, size %u.\n",
4291 dst_x, src_box->left, src_box->right - src_box->left);
4293 }
4294
4295 wined3d_box_set(&dst_box, dst_x, 0, dst_x + (src_box->right - src_box->left), 1, 0, 1);
4296 }
4297 else
4298 {
4299 struct wined3d_texture *dst_texture = texture_from_resource(dst_resource);
4300 struct wined3d_texture *src_texture = texture_from_resource(src_resource);
4301 unsigned int src_level = src_sub_resource_idx % src_texture->level_count;
4302 unsigned int src_row_block_count, src_row_count;
4303
4304 if (!wined3d_texture_validate_sub_resource_idx(dst_texture, dst_sub_resource_idx))
4306
4307 if (!wined3d_texture_validate_sub_resource_idx(src_texture, src_sub_resource_idx))
4309
4310 if (dst_texture->sub_resources[dst_sub_resource_idx].map_count)
4311 {
4312 WARN("Destination sub-resource %u is mapped.\n", dst_sub_resource_idx);
4314 }
4315
4316 if (src_texture->sub_resources[src_sub_resource_idx].map_count)
4317 {
4318 WARN("Source sub-resource %u is mapped.\n", src_sub_resource_idx);
4320 }
4321
4322 if (!src_box)
4323 {
4324 unsigned int src_w, src_h, src_d, dst_w, dst_h, dst_d, dst_level;
4325
4326 src_w = wined3d_texture_get_level_width(src_texture, src_level);
4327 src_h = wined3d_texture_get_level_height(src_texture, src_level);
4328 src_d = wined3d_texture_get_level_depth(src_texture, src_level);
4329
4330 dst_level = dst_sub_resource_idx % dst_texture->level_count;
4331 dst_w = wined3d_texture_get_level_width(dst_texture, dst_level) - dst_x;
4332 dst_h = wined3d_texture_get_level_height(dst_texture, dst_level) - dst_y;
4333 dst_d = wined3d_texture_get_level_depth(dst_texture, dst_level) - dst_z;
4334
4335 wined3d_box_set(&b, 0, 0, min(src_w, dst_w), min(src_h, dst_h), 0, min(src_d, dst_d));
4336 src_box = &b;
4337 }
4338 else if (FAILED(wined3d_resource_check_box_dimensions(src_resource, src_sub_resource_idx, src_box)))
4339 {
4340 WARN("Invalid source box %s.\n", debug_box(src_box));
4342 }
4343
4344 if (src_resource->format->block_width == dst_resource->format->block_width
4345 && src_resource->format->block_height == dst_resource->format->block_height)
4346 {
4347 wined3d_box_set(&dst_box, dst_x, dst_y, dst_x + (src_box->right - src_box->left),
4348 dst_y + (src_box->bottom - src_box->top), dst_z, dst_z + (src_box->back - src_box->front));
4349 }
4350 else
4351 {
4352 src_row_block_count = (src_box->right - src_box->left + src_resource->format->block_width - 1)
4353 / src_resource->format->block_width;
4354 src_row_count = (src_box->bottom - src_box->top + src_resource->format->block_height - 1)
4355 / src_resource->format->block_height;
4356 wined3d_box_set(&dst_box, dst_x, dst_y,
4357 dst_x + (src_row_block_count * dst_resource->format->block_width),
4358 dst_y + (src_row_count * dst_resource->format->block_height),
4359 dst_z, dst_z + (src_box->back - src_box->front));
4360 }
4361 if (FAILED(wined3d_resource_check_box_dimensions(dst_resource, dst_sub_resource_idx, &dst_box)))
4362 {
4363 WARN("Invalid destination box %s.\n", debug_box(&dst_box));
4365 }
4366 }
4367
4369 wined3d_device_context_emit_blt_sub_resource(context, dst_resource, dst_sub_resource_idx, &dst_box,
4370 src_resource, src_sub_resource_idx, src_box, WINED3D_BLT_RAW, NULL, WINED3D_TEXF_POINT);
4372
4373 return WINED3D_OK;
4374}
const char * debug_box(const struct wined3d_box *box)
Definition: utils.c:4552
#define b
Definition: ke_i.h:79
UINT left
Definition: wined3d.h:1873
UINT right
Definition: wined3d.h:1875
UINT back
Definition: wined3d.h:1878
UINT front
Definition: wined3d.h:1877
UINT bottom
Definition: wined3d.h:1876
UINT top
Definition: wined3d.h:1874
static unsigned int wined3d_texture_get_level_depth(const struct wined3d_texture *texture, unsigned int level)

Referenced by d3d10_device_CopySubresourceRegion(), d3d11_device_context_CopySubresourceRegion(), d3d11_device_context_CopySubresourceRegion1(), d3d8_device_upload_sysmem_vertex_buffers(), d3d9_device_UpdateSurface(), d3d9_device_upload_sysmem_vertex_buffers(), ddraw_surface_get_default_texture(), and ddraw_surface_get_draw_texture().

◆ wined3d_device_context_copy_uav_counter()

void __cdecl wined3d_device_context_copy_uav_counter ( struct wined3d_device_context *  context,
struct wined3d_buffer *  dst_buffer,
unsigned int  offset,
struct wined3d_unordered_access_view *  uav 
)

Definition at line 4102 of file device.c.

4104{
4105 TRACE("context %p, dst_buffer %p, offset %u, uav %p.\n",
4106 context, dst_buffer, offset, uav);
4107
4111}
void wined3d_device_context_emit_copy_uav_counter(struct wined3d_device_context *context, struct wined3d_buffer *dst_buffer, unsigned int offset, struct wined3d_unordered_access_view *uav)
Definition: cs.c:2881

Referenced by d3d11_device_context_CopyStructureCount().

◆ wined3d_device_context_dispatch()

void __cdecl wined3d_device_context_dispatch ( struct wined3d_device_context *  context,
unsigned int  group_count_x,
unsigned int  group_count_y,
unsigned int  group_count_z 
)

Definition at line 1030 of file cs.c.

1032{
1033 struct wined3d_cs_dispatch *op;
1034
1037 op->opcode = WINED3D_CS_OP_DISPATCH;
1038 op->parameters.indirect = FALSE;
1039 op->parameters.u.direct.group_count_x = group_count_x;
1040 op->parameters.u.direct.group_count_y = group_count_y;
1041 op->parameters.u.direct.group_count_z = group_count_z;
1042
1044
1047}
@ WINED3D_CS_OP_DISPATCH
Definition: cs.c:97
static void reference_compute_pipeline_resources(struct wined3d_device_context *context)
Definition: cs.c:1021

Referenced by d3d11_device_context_Dispatch().

◆ wined3d_device_context_dispatch_indirect()

void __cdecl wined3d_device_context_dispatch_indirect ( struct wined3d_device_context *  context,
struct wined3d_buffer *  buffer,
unsigned int  offset 
)

Definition at line 1049 of file cs.c.

1051{
1052 struct wined3d_cs_dispatch *op;
1053
1056 op->opcode = WINED3D_CS_OP_DISPATCH;
1057 op->parameters.indirect = TRUE;
1058 op->parameters.u.indirect.buffer = buffer;
1059 op->parameters.u.indirect.offset = offset;
1060
1063
1066}

Referenced by d3d11_device_context_DispatchIndirect().

◆ wined3d_device_context_draw()

void __cdecl wined3d_device_context_draw ( struct wined3d_device_context *  context,
unsigned int  start_vertex,
unsigned int  vertex_count,
unsigned int  start_instance,
unsigned int  instance_count 
)

Definition at line 2635 of file device.c.

2637{
2638 struct wined3d_state *state = context->state;
2639
2640 TRACE("context %p, start_vertex %u, vertex_count %u, start_instance %u, instance_count %u.\n",
2641 context, start_vertex, vertex_count, start_instance, instance_count);
2642
2644 wined3d_device_context_emit_draw(context, state->primitive_type, state->patch_vertex_count,
2645 0, start_vertex, vertex_count, start_instance, instance_count, false);
2647}
void wined3d_device_context_emit_draw(struct wined3d_device_context *context, enum wined3d_primitive_type primitive_type, unsigned int patch_vertex_count, int base_vertex_idx, unsigned int start_idx, unsigned int index_count, unsigned int start_instance, unsigned int instance_count, bool indexed)
Definition: cs.c:1166
int vertex_count
Definition: d3drm.c:3528

Referenced by d3d10_device_Draw(), d3d10_device_DrawInstanced(), d3d11_device_context_Draw(), d3d11_device_context_DrawInstanced(), d3d8_device_DrawPrimitive(), d3d8_device_DrawPrimitiveUP(), d3d9_device_DrawPrimitive(), d3d9_device_DrawPrimitiveUP(), d3d_device7_DrawPrimitive(), d3d_device7_DrawPrimitiveStrided(), and d3d_device7_DrawPrimitiveVB().

◆ wined3d_device_context_draw_indexed()

void __cdecl wined3d_device_context_draw_indexed ( struct wined3d_device_context *  context,
int  base_vertex_index,
unsigned int  start_index,
unsigned int  index_count,
unsigned int  start_instance,
unsigned int  instance_count 
)

Definition at line 2649 of file device.c.

2651{
2652 struct wined3d_state *state = context->state;
2653
2654 TRACE("context %p, base_vertex_index %d, start_index %u, index_count %u, start_instance %u, instance_count %u.\n",
2655 context, base_vertex_index, start_index, index_count, start_instance, instance_count);
2656
2658 wined3d_device_context_emit_draw(context, state->primitive_type, state->patch_vertex_count,
2659 base_vertex_index, start_index, index_count, start_instance, instance_count, true);
2661}

Referenced by d3d10_device_DrawIndexed(), d3d10_device_DrawIndexedInstanced(), d3d11_device_context_DrawIndexed(), d3d11_device_context_DrawIndexedInstanced(), d3d8_device_DrawIndexedPrimitive(), d3d8_device_DrawIndexedPrimitiveUP(), d3d9_device_DrawIndexedPrimitive(), d3d9_device_DrawIndexedPrimitiveUP(), d3d_device7_DrawIndexedPrimitive(), d3d_device7_DrawIndexedPrimitiveStrided(), and d3d_device7_DrawIndexedPrimitiveVB().

◆ wined3d_device_context_draw_indirect()

void __cdecl wined3d_device_context_draw_indirect ( struct wined3d_device_context *  context,
struct wined3d_buffer *  buffer,
unsigned int  offset,
bool  indexed 
)

Definition at line 1191 of file cs.c.

1193{
1194 const struct wined3d_d3d_info *d3d_info = &context->device->adapter->d3d_info;
1195 const struct wined3d_state *state = context->state;
1196 struct wined3d_cs_draw *op;
1197
1200 op->opcode = WINED3D_CS_OP_DRAW;
1201 op->primitive_type = state->primitive_type;
1202 op->patch_vertex_count = state->patch_vertex_count;
1203 op->parameters.indirect = TRUE;
1204 op->parameters.u.indirect.buffer = buffer;
1205 op->parameters.u.indirect.offset = offset;
1206 op->parameters.indexed = indexed;
1207
1210
1213}
@ WINED3D_CS_OP_DRAW
Definition: cs.c:98
static void reference_graphics_pipeline_resources(struct wined3d_device_context *context, BOOL indexed, const struct wined3d_d3d_info *d3d_info)
Definition: cs.c:1131

Referenced by d3d11_device_context_DrawIndexedInstancedIndirect(), and d3d11_device_context_DrawInstancedIndirect().

◆ wined3d_device_context_execute_command_list()

void __cdecl wined3d_device_context_execute_command_list ( struct wined3d_device_context *  context,
struct wined3d_command_list *  list,
bool  restore_state 
)

Definition at line 4649 of file device.c.

4651{
4652 TRACE("context %p, list %p, restore_state %d.\n", context, list, restore_state);
4653
4657}
void wined3d_device_context_emit_execute_command_list(struct wined3d_device_context *context, struct wined3d_command_list *list, bool restore_state)
Definition: cs.c:2994

Referenced by d3d11_device_context_ExecuteCommandList().

◆ wined3d_device_context_flush()

void __cdecl wined3d_device_context_flush ( struct wined3d_device_context *  context)

Definition at line 4946 of file device.c.

4947{
4948 TRACE("context %p.\n", context);
4949
4951 context->ops->flush(context);
4953}

Referenced by d3d10_device_Flush(), and d3d11_device_context_Flush().

◆ wined3d_device_context_flush_mapped_buffer()

void __cdecl wined3d_device_context_flush_mapped_buffer ( struct wined3d_device_context *  context,
struct wined3d_buffer *  buffer 
)

Definition at line 3533 of file cs.c.

3535{
3536 struct wined3d_client_resource *client = &buffer->resource.client;
3537
3538 /* d3d9 applications can draw from a mapped dynamic buffer.
3539 * Castlevania 2 depends on this behaviour.
3540 * This means that we need to upload a pending discard bo, without actually
3541 * unmapping it. */
3542
3543 assert(context == &context->device->cs->c);
3544
3545 if (wined3d_bo_address_is_null(&client->mapped_upload.addr))
3546 return;
3547
3548 if (client->mapped_upload.flags & UPLOAD_BO_UPLOAD_ON_UNMAP)
3550 &client->mapped_box, &client->mapped_upload, buffer->resource.size, buffer->resource.size);
3551
3552 if (client->mapped_upload.flags & UPLOAD_BO_RENAME_ON_UNMAP)
3553 {
3554 client->mapped_upload.flags &= ~UPLOAD_BO_RENAME_ON_UNMAP;
3555 /* This logic matches wined3d_cs_map_upload_bo(). */
3556 if (client->mapped_upload.addr.buffer_object->coherent && wined3d_map_persistent())
3557 client->mapped_upload.flags &= ~UPLOAD_BO_UPLOAD_ON_UNMAP;
3558 }
3559}
static void wined3d_device_context_upload_bo(struct wined3d_device_context *context, struct wined3d_resource *resource, unsigned int sub_resource_idx, const struct wined3d_box *box, const struct upload_bo *bo, unsigned int row_pitch, unsigned int slice_pitch)
Definition: cs.c:2455
static bool wined3d_bo_address_is_null(struct wined3d_const_bo_address *addr)
Definition: cs.c:3186
static FILE * client
Definition: client.c:37
#define UPLOAD_BO_RENAME_ON_UNMAP
static bool wined3d_map_persistent(void)
#define UPLOAD_BO_UPLOAD_ON_UNMAP

Referenced by d3d9_device_DrawIndexedPrimitive(), and d3d9_device_flush_mapped_vertex_buffers().

◆ wined3d_device_context_generate_mipmaps()

void __cdecl wined3d_device_context_generate_mipmaps ( struct wined3d_device_context *  context,
struct wined3d_shader_resource_view *  view 
)

Definition at line 4684 of file device.c.

4686{
4687 struct wined3d_texture *texture;
4688
4689 TRACE("context %p, view %p.\n", context, view);
4690
4691 if (view->resource->type == WINED3D_RTYPE_BUFFER)
4692 {
4693 WARN("Called on buffer resource %p.\n", view->resource);
4694 return;
4695 }
4696
4697 texture = texture_from_resource(view->resource);
4699 {
4700 WARN("Texture without the WINED3D_TEXTURE_GENERATE_MIPMAPS flag, ignoring.\n");
4701 return;
4702 }
4703
4707}
void wined3d_device_context_emit_generate_mipmaps(struct wined3d_device_context *context, struct wined3d_shader_resource_view *view)
Definition: cs.c:2908
enum view_type type
#define WINED3D_TEXTURE_GENERATE_MIPMAPS

Referenced by d3d10_device_GenerateMips(), d3d11_device_context_GenerateMips(), and d3d9_texture_gen_auto_mipmap().

◆ wined3d_device_context_get_blend_state()

struct wined3d_blend_state *__cdecl wined3d_device_context_get_blend_state ( const struct wined3d_device_context *  context,
struct wined3d_color *  blend_factor,
unsigned int *  sample_mask 
)

Definition at line 1859 of file device.c.

1861{
1862 const struct wined3d_state *state = context->state;
1863
1864 TRACE("context %p, blend_factor %p, sample_mask %p.\n", context, blend_factor, sample_mask);
1865
1866 *blend_factor = state->blend_factor;
1867 *sample_mask = state->sample_mask;
1868 return state->blend_state;
1869}
struct wined3d_color blend_factor
uint32_t sample_mask

Referenced by d3d11_device_context_OMGetBlendState(), and wined3d_device_apply_stateblock().

◆ wined3d_device_context_get_constant_buffer()

void __cdecl wined3d_device_context_get_constant_buffer ( const struct wined3d_device_context *  context,
enum wined3d_shader_type  shader_type,
unsigned int  idx,
struct wined3d_constant_buffer_state *  state 
)

Definition at line 2663 of file device.c.

2665{
2666 TRACE("context %p, shader_type %#x, idx %u.\n", context, shader_type, idx);
2667
2669 {
2670 WARN("Invalid constant buffer index %u.\n", idx);
2671 return;
2672 }
2673
2674 *state = context->state->cb[shader_type][idx];
2675}
#define MAX_CONSTANT_BUFFERS

Referenced by d3d10_device_get_constant_buffers(), and d3d11_device_context_get_constant_buffers().

◆ wined3d_device_context_get_depth_stencil_state()

struct wined3d_depth_stencil_state *__cdecl wined3d_device_context_get_depth_stencil_state ( const struct wined3d_device_context *  context,
unsigned int *  stencil_ref 
)

Definition at line 1871 of file device.c.

1873{
1874 const struct wined3d_state *state = context->state;
1875
1876 TRACE("context %p, stencil_ref %p.\n", context, stencil_ref);
1877
1878 *stencil_ref = state->stencil_ref;
1879 return state->depth_stencil_state;
1880}
unsigned int stencil_ref

Referenced by d3d11_device_context_OMGetDepthStencilState(), and wined3d_device_apply_stateblock().

◆ wined3d_device_context_get_depth_stencil_view()

◆ wined3d_device_context_get_index_buffer()

struct wined3d_buffer *__cdecl wined3d_device_context_get_index_buffer ( const struct wined3d_device_context *  context,
enum wined3d_format_id *  format,
unsigned int *  offset 
)

Definition at line 1831 of file device.c.

1833{
1834 const struct wined3d_state *state = context->state;
1835
1836 TRACE("context %p, format %p, offset %p.\n", context, format, offset);
1837
1838 *format = state->index_format;
1839 if (offset)
1840 *offset = state->index_offset;
1841 return state->index_buffer;
1842}

Referenced by d3d10_device_IAGetIndexBuffer(), and d3d11_device_context_IAGetIndexBuffer().

◆ wined3d_device_context_get_predication()

struct wined3d_query *__cdecl wined3d_device_context_get_predication ( struct wined3d_device_context *  context,
BOOL *  value 
)

Definition at line 3768 of file device.c.

3769{
3770 struct wined3d_state *state = context->state;
3771
3772 TRACE("context %p, value %p.\n", context, value);
3773
3774 if (value)
3775 *value = state->predicate_value;
3776 return state->predicate;
3777}
Definition: pdh_main.c:64

Referenced by d3d10_device_GetPredication(), and d3d11_device_context_GetPredication().

◆ wined3d_device_context_get_primitive_type()

void __cdecl wined3d_device_context_get_primitive_type ( const struct wined3d_device_context *  context,
enum wined3d_primitive_type *  primitive_topology,
unsigned int *  patch_vertex_count 
)

Definition at line 3793 of file device.c.

3795{
3796 const struct wined3d_state *state = context->state;
3797
3798 TRACE("context %p, primitive_type %p, patch_vertex_count %p.\n",
3800
3801 *primitive_type = state->primitive_type;
3803 *patch_vertex_count = state->patch_vertex_count;
3804
3805 TRACE("Returning %s.\n", debug_d3dprimitivetype(*primitive_type));
3806}
const char * debug_d3dprimitivetype(enum wined3d_primitive_type primitive_type)
Definition: utils.c:5009
enum wined3d_primitive_type primitive_type
unsigned int patch_vertex_count

Referenced by d3d10_device_IAGetPrimitiveTopology(), and d3d11_device_context_IAGetPrimitiveTopology().

◆ wined3d_device_context_get_rasterizer_state()

struct wined3d_rasterizer_state *__cdecl wined3d_device_context_get_rasterizer_state ( struct wined3d_device_context *  context)

Definition at line 1882 of file device.c.

1884{
1885 TRACE("context %p.\n", context);
1886
1887 return context->state->rasterizer_state;
1888}

Referenced by d3d10_device_RSGetState(), and d3d11_device_context_RSGetState().

◆ wined3d_device_context_get_rendertarget_view()

struct wined3d_rendertarget_view *__cdecl wined3d_device_context_get_rendertarget_view ( const struct wined3d_device_context *  context,
unsigned int  view_idx 
)

Definition at line 4659 of file device.c.

4661{
4662 unsigned int max_rt_count;
4663
4664 TRACE("context %p, view_idx %u.\n", context, view_idx);
4665
4666 max_rt_count = context->device->adapter->d3d_info.limits.max_rt_count;
4667 if (view_idx >= max_rt_count)
4668 {
4669 WARN("Only %u render targets are supported.\n", max_rt_count);
4670 return NULL;
4671 }
4672
4673 return context->state->fb.render_targets[view_idx];
4674}

Referenced by d3d10_device_OMGetRenderTargets(), d3d11_device_context_OMGetRenderTargets(), d3d8_device_GetRenderTarget(), d3d8_device_SetRenderTarget(), d3d8_device_SetViewport(), d3d9_device_GetRenderTarget(), d3d9_device_reset(), ddraw_surface1_Flip(), ddraw_surface7_SetSurfaceDesc(), and device_init().

◆ wined3d_device_context_get_sampler()

struct wined3d_sampler *__cdecl wined3d_device_context_get_sampler ( const struct wined3d_device_context *  context,
enum wined3d_shader_type  shader_type,
unsigned int  idx 
)

Definition at line 2689 of file device.c.

2691{
2692 TRACE("context %p, shader_type %#x, idx %u.\n", context, shader_type, idx);
2693
2694 if (idx >= MAX_SAMPLER_OBJECTS)
2695 {
2696 WARN("Invalid sampler index %u.\n", idx);
2697 return NULL;
2698 }
2699
2700 return context->state->sampler[shader_type][idx];
2701}
#define MAX_SAMPLER_OBJECTS

Referenced by d3d10_device_GSGetSamplers(), d3d10_device_PSGetSamplers(), d3d10_device_VSGetSamplers(), d3d11_device_context_CSGetSamplers(), d3d11_device_context_DSGetSamplers(), d3d11_device_context_GSGetSamplers(), d3d11_device_context_HSGetSamplers(), d3d11_device_context_PSGetSamplers(), and d3d11_device_context_VSGetSamplers().

◆ wined3d_device_context_get_scissor_rects()

void __cdecl wined3d_device_context_get_scissor_rects ( const struct wined3d_device_context *  context,
unsigned int *  rect_count,
RECT *  rects 
)

Definition at line 1890 of file device.c.

1892{
1893 const struct wined3d_state *state = context->state;
1894 unsigned int count;
1895
1896 TRACE("context %p, rect_count %p, rects %p.\n", context, rect_count, rects);
1897
1898 if (rects && (count = rect_count ? min(*rect_count, state->scissor_rect_count) : 1))
1899 memcpy(rects, state->scissor_rects, count * sizeof(*rects));
1900 if (rect_count)
1901 *rect_count = state->scissor_rect_count;
1902}

Referenced by d3d10_device_RSGetScissorRects(), d3d11_device_context_RSGetScissorRects(), and device_reset_viewport_state().

◆ wined3d_device_context_get_shader()

◆ wined3d_device_context_get_shader_resource_view()

◆ wined3d_device_context_get_stream_output()

struct wined3d_buffer *__cdecl wined3d_device_context_get_stream_output ( struct wined3d_device_context *  context,
unsigned int  idx,
unsigned int *  offset 
)

Definition at line 1770 of file device.c.

1772{
1773 TRACE("context %p, idx %u, offset %p.\n", context, idx, offset);
1774
1776 {
1777 WARN("Invalid stream output %u.\n", idx);
1778 return NULL;
1779 }
1780
1781 if (offset)
1782 *offset = context->state->stream_output[idx].offset;
1783 return context->state->stream_output[idx].buffer;
1784}
#define WINED3D_MAX_STREAM_OUTPUT_BUFFERS
Definition: wined3d.h:1576

Referenced by d3d10_device_SOGetTargets(), and d3d11_device_context_SOGetTargets().

◆ wined3d_device_context_get_stream_source()

HRESULT __cdecl wined3d_device_context_get_stream_source ( const struct wined3d_device_context *  context,
unsigned int  stream_idx,
struct wined3d_buffer **  buffer,
unsigned int *  offset,
unsigned int *  stride 
)

Definition at line 1786 of file device.c.

1788{
1789 const struct wined3d_stream_state *stream;
1790
1791 TRACE("context %p, stream_idx %u, buffer %p, offset %p, stride %p.\n",
1792 context, stream_idx, buffer, offset, stride);
1793
1794 if (stream_idx >= WINED3D_MAX_STREAMS)
1795 {
1796 WARN("Stream index %u out of range.\n", stream_idx);
1798 }
1799
1800 stream = &context->state->streams[stream_idx];
1801 *buffer = stream->buffer;
1802 if (offset)
1803 *offset = stream->offset;
1804 *stride = stream->stride;
1805
1806 return WINED3D_OK;
1807}
GLsizei stride
Definition: glext.h:5848
Definition: parse.h:23
#define WINED3D_MAX_STREAMS
Definition: wined3d.h:1596

Referenced by d3d10_device_IAGetVertexBuffers(), and d3d11_device_context_IAGetVertexBuffers().

◆ wined3d_device_context_get_unordered_access_view()

struct wined3d_unordered_access_view *__cdecl wined3d_device_context_get_unordered_access_view ( const struct wined3d_device_context *  context,
enum wined3d_pipeline  pipeline,
unsigned int  idx 
)

Definition at line 2703 of file device.c.

2705{
2706 TRACE("context %p, pipeline %#x, idx %u.\n", context, pipeline, idx);
2707
2709 {
2710 WARN("Invalid UAV index %u.\n", idx);
2711 return NULL;
2712 }
2713
2714 return context->state->unordered_access_view[pipeline][idx];
2715}
#define MAX_UNORDERED_ACCESS_VIEWS

Referenced by d3d11_device_context_CSGetUnorderedAccessViews(), and d3d11_device_context_OMGetRenderTargetsAndUnorderedAccessViews().

◆ wined3d_device_context_get_vertex_declaration()

struct wined3d_vertex_declaration *__cdecl wined3d_device_context_get_vertex_declaration ( const struct wined3d_device_context *  device)

Definition at line 1976 of file device.c.

1978{
1979 TRACE("context %p.\n", context);
1980
1981 return context->state->vertex_declaration;
1982}

Referenced by d3d10_device_IAGetInputLayout(), and d3d11_device_context_IAGetInputLayout().

◆ wined3d_device_context_get_viewports()

void __cdecl wined3d_device_context_get_viewports ( const struct wined3d_device_context *  context,
unsigned int *  viewport_count,
struct wined3d_viewport *  viewports 
)

Definition at line 1844 of file device.c.

1846{
1847 const struct wined3d_state *state = context->state;
1848 unsigned int count;
1849
1850 TRACE("context %p, viewport_count %p, viewports %p.\n", context, viewport_count, viewports);
1851
1852 count = viewport_count ? min(*viewport_count, state->viewport_count) : 1;
1853 if (count && viewports)
1854 memcpy(viewports, state->viewports, count * sizeof(*viewports));
1855 if (viewport_count)
1856 *viewport_count = state->viewport_count;
1857}
unsigned int viewport_count
struct wined3d_viewport viewports[WINED3D_MAX_VIEWPORTS]

Referenced by d3d10_device_RSGetViewports(), d3d11_device_context_RSGetViewports(), device_reset_viewport_state(), and process_vertices_strided().

◆ wined3d_device_context_issue_query()

void __cdecl wined3d_device_context_issue_query ( struct wined3d_device_context *  context,
struct wined3d_query *  query,
unsigned int  flags 
)

Definition at line 4639 of file device.c.

4641{
4642 TRACE("context %p, query %p, flags %#x.\n", context, query, flags);
4643
4645 context->ops->issue_query(context, query, flags);
4647}

Referenced by d3d11_device_context_Begin(), d3d11_device_context_End(), and wined3d_query_issue().

◆ wined3d_device_context_map()

HRESULT __cdecl wined3d_device_context_map ( struct wined3d_device_context *  context,
struct wined3d_resource *  resource,
unsigned int  sub_resource_idx,
struct wined3d_map_desc *  map_desc,
const struct wined3d_box *  box,
unsigned int  flags 
)

Definition at line 4570 of file device.c.

4573{
4575 struct wined3d_box b;
4576 HRESULT hr;
4577
4578 TRACE("context %p, resource %p, sub_resource_idx %u, map_desc %p, box %s, flags %#x.\n",
4579 context, resource, sub_resource_idx, map_desc, debug_box(box), flags);
4580
4582 {
4583 WARN("No read/write flags specified.\n");
4584 return E_INVALIDARG;
4585 }
4586
4588 {
4589 WARN("Resource does not have MAP_R access.\n");
4590 return E_INVALIDARG;
4591 }
4592
4594 {
4595 WARN("Resource does not have MAP_W access.\n");
4596 return E_INVALIDARG;
4597 }
4598
4600
4602 return E_INVALIDARG;
4603
4604 if (!box)
4605 {
4606 wined3d_box_set(&b, 0, 0, desc.width, desc.height, 0, desc.depth);
4607 box = &b;
4608 }
4609 else if (FAILED(wined3d_resource_check_box_dimensions(resource, sub_resource_idx, box)))
4610 {
4611 WARN("Map box is invalid.\n");
4612
4615
4616 if ((resource->format_attrs & WINED3D_FORMAT_ATTR_BLOCKS) &&
4619 }
4620
4622 hr = wined3d_device_context_emit_map(context, resource, sub_resource_idx, map_desc, box, flags);
4624 return hr;
4625}
HRESULT wined3d_device_context_emit_map(struct wined3d_device_context *context, struct wined3d_resource *resource, unsigned int sub_resource_idx, struct wined3d_map_desc *map_desc, const struct wined3d_box *box, unsigned int flags)
Definition: cs.c:2488
static unsigned int sanitise_map_flags(const struct wined3d_resource *resource, unsigned int flags)
Definition: device.c:4535
#define WINED3D_RESOURCE_ACCESS_CPU
Definition: wined3d.h:52
#define WINED3D_MAP_READ
Definition: wined3d.h:957
#define WINED3D_RESOURCE_ACCESS_MAP_R
Definition: wined3d.h:53
#define WINED3D_MAP_WRITE
Definition: wined3d.h:956
#define WINED3D_RESOURCE_ACCESS_MAP_W
Definition: wined3d.h:54
static HRESULT wined3d_resource_get_sub_resource_desc(struct wined3d_resource *resource, unsigned int sub_resource_idx, struct wined3d_sub_resource_desc *desc)
#define WINED3D_FORMAT_ATTR_BLOCKS

Referenced by d3d11_device_context_Map(), and wined3d_resource_map().

◆ wined3d_device_context_reset_state()

void __cdecl wined3d_device_context_reset_state ( struct wined3d_device_context *  context)

Definition at line 1904 of file device.c.

1905{
1906 TRACE("context %p.\n", context);
1907
1909 state_cleanup(context->state);
1910 wined3d_state_reset(context->state, &context->device->adapter->d3d_info);
1913}
void state_cleanup(struct wined3d_state *state)
Definition: stateblock.c:648
static void wined3d_state_reset(struct wined3d_state *state, const struct wined3d_d3d_info *d3d_info)

Referenced by d3d11_device_context_ClearState(), wined3d_deferred_context_record_command_list(), and wined3d_device_context_emit_execute_command_list().

◆ wined3d_device_context_resolve_sub_resource()

void __cdecl wined3d_device_context_resolve_sub_resource ( struct wined3d_device_context *  context,
struct wined3d_resource *  dst_resource,
unsigned int  dst_sub_resource_idx,
struct wined3d_resource *  src_resource,
unsigned int  src_sub_resource_idx,
enum wined3d_format_id  format_id 
)

Definition at line 4417 of file device.c.

4421{
4422 struct wined3d_texture *dst_texture, *src_texture;
4423 unsigned int dst_level, src_level;
4424 struct wined3d_blt_fx fx = {0};
4425 RECT dst_rect, src_rect;
4426
4427 TRACE("context %p, dst_resource %p, dst_sub_resource_idx %u, "
4428 "src_resource %p, src_sub_resource_idx %u, format %s.\n",
4429 context, dst_resource, dst_sub_resource_idx,
4430 src_resource, src_sub_resource_idx, debug_d3dformat(format_id));
4431
4432 if (wined3d_format_is_typeless(dst_resource->format)
4433 || wined3d_format_is_typeless(src_resource->format))
4434 {
4435 FIXME("Multisample resolve is not fully supported for typeless formats "
4436 "(dst_format %s, src_format %s, format %s).\n",
4437 debug_d3dformat(dst_resource->format->id), debug_d3dformat(src_resource->format->id),
4439 }
4440 if (dst_resource->type != WINED3D_RTYPE_TEXTURE_2D)
4441 {
4442 WARN("Invalid destination resource type %s.\n", debug_d3dresourcetype(dst_resource->type));
4443 return;
4444 }
4445 if (src_resource->type != WINED3D_RTYPE_TEXTURE_2D)
4446 {
4447 WARN("Invalid source resource type %s.\n", debug_d3dresourcetype(src_resource->type));
4448 return;
4449 }
4450
4452 fx.resolve_format_id = format_id;
4453
4454 dst_texture = texture_from_resource(dst_resource);
4455 src_texture = texture_from_resource(src_resource);
4456
4457 dst_level = dst_sub_resource_idx % dst_texture->level_count;
4458 SetRect(&dst_rect, 0, 0, wined3d_texture_get_level_width(dst_texture, dst_level),
4459 wined3d_texture_get_level_height(dst_texture, dst_level));
4460 src_level = src_sub_resource_idx % src_texture->level_count;
4461 SetRect(&src_rect, 0, 0, wined3d_texture_get_level_width(src_texture, src_level),
4462 wined3d_texture_get_level_height(src_texture, src_level));
4463 wined3d_device_context_blt(context, dst_texture, dst_sub_resource_idx, &dst_rect,
4464 src_texture, src_sub_resource_idx, &src_rect, 0, &fx, WINED3D_TEXF_POINT);
4466}
HRESULT CDECL wined3d_device_context_blt(struct wined3d_device_context *context, struct wined3d_texture *dst_texture, unsigned int dst_sub_resource_idx, const RECT *dst_rect, struct wined3d_texture *src_texture, unsigned int src_sub_resource_idx, const RECT *src_rect, unsigned int flags, const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter)
Definition: texture.c:3854

Referenced by d3d10_device_ResolveSubresource(), d3d11_device_context_ResolveSubresource(), and resolve_depth_buffer().

◆ wined3d_device_context_set_blend_state()

void __cdecl wined3d_device_context_set_blend_state ( struct wined3d_device_context *  context,
struct wined3d_blend_state *  state,
const struct wined3d_color *  blend_factor,
unsigned int  sample_mask 
)

Definition at line 2050 of file device.c.

2052{
2053 struct wined3d_state *state = context->state;
2054 struct wined3d_blend_state *prev;
2055
2056 TRACE("context %p, blend_state %p, blend_factor %p, sample_mask %#x.\n",
2057 context, blend_state, blend_factor, sample_mask);
2058
2060 prev = state->blend_state;
2061 if (prev == blend_state && !memcmp(blend_factor, &state->blend_factor, sizeof(*blend_factor))
2062 && sample_mask == state->sample_mask)
2063 goto out;
2064
2065 if (blend_state)
2066 wined3d_blend_state_incref(blend_state);
2067 state->blend_state = blend_state;
2068 state->blend_factor = *blend_factor;
2069 state->sample_mask = sample_mask;
2070 wined3d_device_context_emit_set_blend_state(context, blend_state, blend_factor, sample_mask);
2071 if (prev)
2073out:
2075}
void wined3d_device_context_emit_set_blend_state(struct wined3d_device_context *context, struct wined3d_blend_state *state, const struct wined3d_color *blend_factor, unsigned int sample_mask)
Definition: cs.c:1800
ULONG CDECL wined3d_blend_state_incref(struct wined3d_blend_state *state)
Definition: device.c:268
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
Definition: string.c:2807
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
Definition: wcsftime.cpp:383

Referenced by d3d11_device_context_OMSetBlendState(), and wined3d_device_apply_stateblock().

◆ wined3d_device_context_set_constant_buffers()

void __cdecl wined3d_device_context_set_constant_buffers ( struct wined3d_device_context *  context,
enum wined3d_shader_type  type,
unsigned int  start_idx,
unsigned int  count,
const struct wined3d_constant_buffer_state *  buffers 
)

Definition at line 2015 of file device.c.

2018{
2019 struct wined3d_state *state = context->state;
2020 unsigned int i;
2021
2022 TRACE("context %p, type %#x, start_idx %u, count %u, buffers %p.\n", context, type, start_idx, count, buffers);
2023
2025 {
2026 WARN("Invalid constant buffer index %u, count %u.\n", start_idx, count);
2027 return;
2028 }
2029
2031 if (!memcmp(buffers, &state->cb[type][start_idx], count * sizeof(*buffers)))
2032 goto out;
2033
2035 for (i = 0; i < count; ++i)
2036 {
2037 struct wined3d_buffer *prev = state->cb[type][start_idx + i].buffer;
2038 struct wined3d_buffer *buffer = buffers[i].buffer;
2039
2040 if (buffer)
2042 state->cb[type][start_idx + i] = buffers[i];
2043 if (prev)
2045 }
2046out:
2048}
void wined3d_device_context_emit_set_constant_buffers(struct wined3d_device_context *context, enum wined3d_shader_type type, unsigned int start_idx, unsigned int count, const struct wined3d_constant_buffer_state *buffers)
Definition: cs.c:1546
ULONG CDECL wined3d_buffer_incref(struct wined3d_buffer *buffer)
Definition: buffer.c:248
ULONG CDECL wined3d_buffer_decref(struct wined3d_buffer *buffer)
Definition: buffer.c:459
const GLuint * buffers
Definition: glext.h:5916
static bool wined3d_bound_range(unsigned int start, unsigned int count, unsigned int limit)
Definition: wined3d.h:2995

Referenced by bind_push_constant_buffer(), d3d10_device_set_constant_buffers(), and d3d11_device_context_set_constant_buffers().

◆ wined3d_device_context_set_depth_stencil_state()

void __cdecl wined3d_device_context_set_depth_stencil_state ( struct wined3d_device_context *  context,
struct wined3d_depth_stencil_state *  depth_stencil_state,
unsigned int  stencil_ref 
)

Definition at line 2077 of file device.c.

2079{
2080 struct wined3d_state *state = context->state;
2081 struct wined3d_depth_stencil_state *prev;
2082
2083 TRACE("context %p, depth_stencil_state %p, stencil_ref %u.\n", context, depth_stencil_state, stencil_ref);
2084
2086 prev = state->depth_stencil_state;
2087 if (prev == depth_stencil_state && state->stencil_ref == stencil_ref)
2088 goto out;
2089
2090 if (depth_stencil_state)
2091 wined3d_depth_stencil_state_incref(depth_stencil_state);
2092 state->depth_stencil_state = depth_stencil_state;
2093 state->stencil_ref = stencil_ref;
2094 wined3d_device_context_emit_set_depth_stencil_state(context, depth_stencil_state, stencil_ref);
2095 if (prev)
2097out:
2099}
void wined3d_device_context_emit_set_depth_stencil_state(struct wined3d_device_context *context, struct wined3d_depth_stencil_state *state, unsigned int stencil_ref)
Definition: cs.c:1828
ULONG CDECL wined3d_depth_stencil_state_incref(struct wined3d_depth_stencil_state *state)
Definition: device.c:343

Referenced by d3d11_device_context_OMSetDepthStencilState(), and wined3d_device_apply_stateblock().

◆ wined3d_device_context_set_depth_stencil_view()

HRESULT __cdecl wined3d_device_context_set_depth_stencil_view ( struct wined3d_device_context *  context,
struct wined3d_rendertarget_view *  view 
)

Definition at line 2453 of file device.c.

2455{
2456 struct wined3d_fb_state *fb = &context->state->fb;
2457 struct wined3d_rendertarget_view *prev;
2458
2459 TRACE("context %p, view %p.\n", context, view);
2460
2461 if (view && !(view->resource->bind_flags & WINED3D_BIND_DEPTH_STENCIL))
2462 {
2463 WARN("View resource %p has incompatible %s bind flags.\n",
2464 view->resource, wined3d_debug_bind_flags(view->resource->bind_flags));
2466 }
2467
2469 prev = fb->depth_stencil;
2470 if (prev == view)
2471 {
2472 TRACE("Trying to do a NOP SetRenderTarget operation.\n");
2473 goto out;
2474 }
2475
2476 if ((fb->depth_stencil = view))
2479 if (prev)
2482out:
2484 return WINED3D_OK;
2485}
void wined3d_device_context_emit_set_depth_stencil_view(struct wined3d_device_context *context, struct wined3d_rendertarget_view *view)
Definition: cs.c:1394
static void wined3d_device_context_unbind_srv_for_rtv(struct wined3d_device_context *context, const struct wined3d_rendertarget_view *view, BOOL dsv)
Definition: device.c:2344
ULONG CDECL wined3d_rendertarget_view_incref(struct wined3d_rendertarget_view *view)
Definition: view.c:365
ULONG CDECL wined3d_rendertarget_view_decref(struct wined3d_rendertarget_view *view)
Definition: view.c:379

Referenced by d3d8_device_SetRenderTarget(), d3d9_device_SetDepthStencilSurface(), d3d_device_sync_rendertarget(), d3d_device_update_depth_stencil(), ddraw_surface_delete_attached_surface(), device_init_swapchain_state(), wined3d_device_context_set_render_targets_and_unordered_access_views(), and wined3d_device_reset().

◆ wined3d_device_context_set_index_buffer()

void __cdecl wined3d_device_context_set_index_buffer ( struct wined3d_device_context *  context,
struct wined3d_buffer *  buffer,
enum wined3d_format_id  format_id,
unsigned int  offset 
)

Definition at line 2557 of file device.c.

2559{
2560 struct wined3d_state *state = context->state;
2561 enum wined3d_format_id prev_format;
2562 struct wined3d_buffer *prev_buffer;
2563 unsigned int prev_offset;
2564
2565 TRACE("context %p, buffer %p, format %s, offset %u.\n",
2567
2569 prev_buffer = state->index_buffer;
2570 prev_format = state->index_format;
2571 prev_offset = state->index_offset;
2572
2573 if (prev_buffer == buffer && prev_format == format_id && prev_offset == offset)
2574 goto out;
2575
2576 if (buffer)
2578 state->index_buffer = buffer;
2579 state->index_format = format_id;
2580 state->index_offset = offset;
2582 if (prev_buffer)
2583 wined3d_buffer_decref(prev_buffer);
2584out:
2586}
void wined3d_device_context_emit_set_index_buffer(struct wined3d_device_context *context, struct wined3d_buffer *buffer, enum wined3d_format_id format_id, unsigned int offset)
Definition: cs.c:1511
wined3d_format_id
Definition: wined3d.h:126

Referenced by d3d10_device_IASetIndexBuffer(), d3d11_device_context_IASetIndexBuffer(), d3d8_device_upload_sysmem_index_buffer(), d3d9_device_upload_sysmem_index_buffer(), and wined3d_device_apply_stateblock().

◆ wined3d_device_context_set_predication()

void __cdecl wined3d_device_context_set_predication ( struct wined3d_device_context *  context,
struct wined3d_query *  predicate,
BOOL  value 
)

Definition at line 2487 of file device.c.

2489{
2490 struct wined3d_state *state = context->state;
2491 struct wined3d_query *prev;
2492
2493 TRACE("context %p, predicate %p, value %#x.\n", context, predicate, value);
2494
2496 prev = state->predicate;
2497 if (predicate)
2498 {
2499 FIXME("Predicated rendering not implemented.\n");
2500 wined3d_query_incref(predicate);
2501 }
2502 state->predicate = predicate;
2503 state->predicate_value = value;
2505 if (prev)
2508}
void wined3d_device_context_emit_set_predication(struct wined3d_device_context *context, struct wined3d_query *predicate, BOOL value)
Definition: cs.c:1245
ULONG CDECL wined3d_query_incref(struct wined3d_query *query)
Definition: query.c:413

Referenced by d3d10_device_SetPredication(), and d3d11_device_context_SetPredication().

◆ wined3d_device_context_set_primitive_type()

◆ wined3d_device_context_set_rasterizer_state()

void __cdecl wined3d_device_context_set_rasterizer_state ( struct wined3d_device_context *  context,
struct wined3d_rasterizer_state *  rasterizer_state 
)

Definition at line 2101 of file device.c.

2103{
2104 struct wined3d_state *state = context->state;
2105 struct wined3d_rasterizer_state *prev;
2106
2107 TRACE("context %p, rasterizer_state %p.\n", context, rasterizer_state);
2108
2110 prev = state->rasterizer_state;
2111 if (prev == rasterizer_state)
2112 goto out;
2113
2114 if (rasterizer_state)
2115 wined3d_rasterizer_state_incref(rasterizer_state);
2116 state->rasterizer_state = rasterizer_state;
2118 if (prev)
2120out:
2122}
void wined3d_device_context_emit_set_rasterizer_state(struct wined3d_device_context *context, struct wined3d_rasterizer_state *rasterizer_state)
Definition: cs.c:1849
ULONG CDECL wined3d_rasterizer_state_incref(struct wined3d_rasterizer_state *state)
Definition: device.c:430
ULONG CDECL wined3d_rasterizer_state_decref(struct wined3d_rasterizer_state *state)
Definition: device.c:446

Referenced by d3d11_device_context_RSSetState(), and wined3d_stateblock_apply_clear_state().

◆ wined3d_device_context_set_render_targets_and_unordered_access_views()

void __cdecl wined3d_device_context_set_render_targets_and_unordered_access_views ( struct wined3d_device_context *  context,
unsigned int  rtv_count,
struct wined3d_rendertarget_view *const *  render_target_views,
struct wined3d_rendertarget_view *  depth_stencil_view,
UINT  uav_count,
struct wined3d_unordered_access_view *const *  unordered_access_views,
const unsigned int *  initial_counts 
)

Definition at line 2313 of file device.c.

2317{
2319 if (rtv_count != ~0u)
2320 {
2321 if (depth_stencil_view && !(depth_stencil_view->resource->bind_flags & WINED3D_BIND_DEPTH_STENCIL))
2322 {
2323 WARN("View resource %p has incompatible %s bind flags.\n",
2324 depth_stencil_view->resource, wined3d_debug_bind_flags(depth_stencil_view->resource->bind_flags));
2325 goto out;
2326 }
2327
2329 render_target_views, FALSE)))
2330 goto out;
2331
2333 }
2334
2335 if (uav_count != ~0u)
2336 {
2338 unordered_access_views, initial_counts);
2339 }
2340out:
2342}
HRESULT CDECL wined3d_device_context_set_rendertarget_views(struct wined3d_device_context *context, unsigned int start_idx, unsigned int count, struct wined3d_rendertarget_view *const *views, BOOL set_viewport)
Definition: device.c:2377
void CDECL wined3d_device_context_set_unordered_access_views(struct wined3d_device_context *context, enum wined3d_pipeline pipeline, unsigned int start_idx, unsigned int count, struct wined3d_unordered_access_view *const *uavs, const unsigned int *initial_counts)
Definition: device.c:2277
HRESULT CDECL wined3d_device_context_set_depth_stencil_view(struct wined3d_device_context *context, struct wined3d_rendertarget_view *view)
Definition: device.c:2453
struct wined3d_resource * resource

Referenced by d3d10_device_OMSetRenderTargets(), d3d11_device_context_OMSetRenderTargets(), and d3d11_device_context_OMSetRenderTargetsAndUnorderedAccessViews().

◆ wined3d_device_context_set_rendertarget_views()

HRESULT __cdecl wined3d_device_context_set_rendertarget_views ( struct wined3d_device_context *  context,
unsigned int  start_idx,
unsigned int  count,
struct wined3d_rendertarget_view *const *  views,
BOOL  set_viewport 
)

Definition at line 2377 of file device.c.

2379{
2380 struct wined3d_state *state = context->state;
2381 unsigned int i, max_rt_count;
2382
2383 TRACE("context %p, start_idx %u, count %u, views %p, set_viewport %#x.\n",
2384 context, start_idx, count, views, set_viewport);
2385
2386 max_rt_count = context->device->adapter->d3d_info.limits.max_rt_count;
2387 if (start_idx >= max_rt_count)
2388 {
2389 WARN("Only %u render targets are supported.\n", max_rt_count);
2391 }
2392 count = min(count, max_rt_count - start_idx);
2393
2394 for (i = 0; i < count; ++i)
2395 {
2396 if (views[i] && !(views[i]->resource->bind_flags & WINED3D_BIND_RENDER_TARGET))
2397 {
2398 WARN("View resource %p doesn't have render target bind flags.\n", views[i]->resource);
2400 }
2401 }
2402
2404 /* Set the viewport and scissor rectangles, if requested. Tests show that
2405 * stateblock recording is ignored, the change goes directly into the
2406 * primary stateblock. */
2407 if (!start_idx && set_viewport)
2408 {
2409 state->viewports[0].x = 0;
2410 state->viewports[0].y = 0;
2411 state->viewports[0].width = views[0]->width;
2412 state->viewports[0].height = views[0]->height;
2413 state->viewports[0].min_z = 0.0f;
2414 state->viewports[0].max_z = 1.0f;
2415 state->viewport_count = 1;
2417
2418 SetRect(&state->scissor_rects[0], 0, 0, views[0]->width, views[0]->height);
2419 state->scissor_rect_count = 1;
2421 }
2422
2423 if (!memcmp(views, &state->fb.render_targets[start_idx], count * sizeof(*views)))
2424 goto out;
2425
2427 for (i = 0; i < count; ++i)
2428 {
2429 struct wined3d_rendertarget_view *prev = state->fb.render_targets[start_idx + i];
2430 struct wined3d_rendertarget_view *view = views[i];
2431
2432 if (view)
2433 {
2436 }
2437 state->fb.render_targets[start_idx + i] = view;
2438 /* Release after the assignment, to prevent device_resource_released()
2439 * from seeing the resource as still in use. */
2440 if (prev)
2441 {
2444 }
2445
2447 }
2448out:
2450 return WINED3D_OK;
2451}
void wined3d_device_context_emit_set_rendertarget_views(struct wined3d_device_context *context, unsigned int start_idx, unsigned int count, struct wined3d_rendertarget_view *const *views)
Definition: cs.c:1343
void wined3d_device_context_emit_set_viewports(struct wined3d_device_context *context, unsigned int viewport_count, const struct wined3d_viewport *viewports)
Definition: cs.c:1270
void wined3d_device_context_emit_set_scissor_rects(struct wined3d_device_context *context, unsigned int rect_count, const RECT *rects)
Definition: cs.c:1296
static void wined3d_rtv_bind_count_dec(struct wined3d_rendertarget_view *rtv)
static void wined3d_rtv_bind_count_inc(struct wined3d_rendertarget_view *rtv)

Referenced by d3d8_device_SetRenderTarget(), d3d9_device_SetRenderTarget(), d3d_device_init(), d3d_device_inner_Release(), d3d_device_set_render_target(), d3d_device_sync_rendertarget(), ddraw_surface7_SetSurfaceDesc(), ddraw_texture_rename_to(), device_init_swapchain_state(), wined3d_device_context_set_render_targets_and_unordered_access_views(), and wined3d_device_reset().

◆ wined3d_device_context_set_samplers()

void __cdecl wined3d_device_context_set_samplers ( struct wined3d_device_context *  context,
enum wined3d_shader_type  type,
unsigned int  start_idx,
unsigned int  count,
struct wined3d_sampler *const *  samplers 
)

Definition at line 2243 of file device.c.

2245{
2246 struct wined3d_state *state = context->state;
2247 unsigned int i;
2248
2249 TRACE("context %p, type %#x, start_idx %u, count %u, samplers %p.\n", context, type, start_idx, count, samplers);
2250
2252 {
2253 WARN("Invalid sampler index %u, count %u.\n", start_idx, count);
2254 return;
2255 }
2256
2258 if (!memcmp(samplers, &state->sampler[type][start_idx], count * sizeof(*samplers)))
2259 goto out;
2260
2262 for (i = 0; i < count; ++i)
2263 {
2264 struct wined3d_sampler *prev = state->sampler[type][start_idx + i];
2265 struct wined3d_sampler *sampler = samplers[i];
2266
2267 if (sampler)
2269 state->sampler[type][start_idx + i] = sampler;
2270 if (prev)
2272 }
2273out:
2275}
void wined3d_device_context_emit_set_samplers(struct wined3d_device_context *context, enum wined3d_shader_type type, unsigned int start_idx, unsigned int count, struct wined3d_sampler *const *samplers)
Definition: cs.c:1737
GLuint * samplers
Definition: glext.h:7280
ULONG CDECL wined3d_sampler_incref(struct wined3d_sampler *sampler)
Definition: sampler.c:26

Referenced by d3d10_device_set_samplers(), d3d11_device_context_set_samplers(), and wined3d_device_apply_stateblock().

◆ wined3d_device_context_set_scissor_rects()

void __cdecl wined3d_device_context_set_scissor_rects ( struct wined3d_device_context *  context,
unsigned int  rect_count,
const RECT *  rects 
)

Definition at line 2149 of file device.c.

2151{
2152 struct wined3d_state *state = context->state;
2153 unsigned int i;
2154
2155 TRACE("context %p, rect_count %u, rects %p.\n", context, rect_count, rects);
2156
2157 for (i = 0; i < rect_count; ++i)
2158 {
2159 TRACE("%u: %s\n", i, wine_dbgstr_rect(&rects[i]));
2160 }
2161
2163 if (state->scissor_rect_count == rect_count
2164 && !memcmp(state->scissor_rects, rects, rect_count * sizeof(*rects)))
2165 {
2166 TRACE("App is setting the old scissor rectangles over, nothing to do.\n");
2167 goto out;
2168 }
2169
2170 if (rect_count)
2171 memcpy(state->scissor_rects, rects, rect_count * sizeof(*rects));
2172 else
2173 memset(state->scissor_rects, 0, sizeof(state->scissor_rects));
2174 state->scissor_rect_count = rect_count;
2175
2177out:
2179}

Referenced by d3d10_device_RSSetScissorRects(), d3d11_device_context_RSSetScissorRects(), and wined3d_stateblock_apply_clear_state().

◆ wined3d_device_context_set_shader()

void __cdecl wined3d_device_context_set_shader ( struct wined3d_device_context *  context,
enum wined3d_shader_type  type,
struct wined3d_shader *  shader 
)

Definition at line 1984 of file device.c.

1986{
1987 struct wined3d_state *state = context->state;
1988 struct wined3d_shader *prev;
1989
1990 TRACE("context %p, type %#x, shader %p.\n", context, type, shader);
1991
1993 prev = state->shader[type];
1994 if (shader == prev)
1995 goto out;
1996
1997 if (shader)
1999 state->shader[type] = shader;
2001 if (prev)
2003out:
2005}
ULONG CDECL wined3d_shader_incref(struct wined3d_shader *shader)
Definition: shader.c:2535
ULONG CDECL wined3d_shader_decref(struct wined3d_shader *shader)
Definition: shader.c:2588

Referenced by d3d10_device_GSSetShader(), d3d10_device_PSSetShader(), d3d10_device_VSSetShader(), d3d11_device_context_CSSetShader(), d3d11_device_context_DSSetShader(), d3d11_device_context_GSSetShader(), d3d11_device_context_HSSetShader(), d3d11_device_context_PSSetShader(), d3d11_device_context_VSSetShader(), and wined3d_device_apply_stateblock().

◆ wined3d_device_context_set_shader_resource_views()

void __cdecl wined3d_device_context_set_shader_resource_views ( struct wined3d_device_context *  context,
enum wined3d_shader_type  type,
unsigned int  start_idx,
unsigned int  count,
struct wined3d_shader_resource_view *const *  views 
)

Definition at line 2181 of file device.c.

2188{
2190 struct wined3d_state *state = context->state;
2191 const struct wined3d_rendertarget_view *dsv = state->fb.depth_stencil;
2192 unsigned int i;
2193
2194 TRACE("context %p, type %#x, start_idx %u, count %u, views %p.\n", context, type, start_idx, count, views);
2195
2197 {
2198 WARN("Invalid view index %u, count %u.\n", start_idx, count);
2199 return;
2200 }
2201
2203 if (!memcmp(views, &state->shader_resource_view[type][start_idx], count * sizeof(*views)))
2204 goto out;
2205
2206 memcpy(real_views, views, count * sizeof(*views));
2207
2208 for (i = 0; i < count; ++i)
2209 {
2210 struct wined3d_shader_resource_view *view = real_views[i];
2211
2213 || (dsv && dsv->resource == view->resource && wined3d_dsv_srv_conflict(dsv, view->format))))
2214 {
2215 WARN("Application is trying to bind resource which is attached as render target.\n");
2216 real_views[i] = NULL;
2217 }
2218 }
2219
2221 for (i = 0; i < count; ++i)
2222 {
2223 struct wined3d_shader_resource_view *prev = state->shader_resource_view[type][start_idx + i];
2224 struct wined3d_shader_resource_view *view = real_views[i];
2225
2226 if (view)
2227 {
2230 }
2231
2232 state->shader_resource_view[type][start_idx + i] = view;
2233 if (prev)
2234 {
2237 }
2238 }
2239out:
2241}
void wined3d_device_context_emit_set_shader_resource_views(struct wined3d_device_context *context, enum wined3d_shader_type type, unsigned int start_idx, unsigned int count, struct wined3d_shader_resource_view *const *views)
Definition: cs.c:1659
ULONG CDECL wined3d_shader_resource_view_incref(struct wined3d_shader_resource_view *view)
Definition: view.c:965
ULONG CDECL wined3d_shader_resource_view_decref(struct wined3d_shader_resource_view *view)
Definition: view.c:990
static bool wined3d_is_srv_rtv_bound(const struct wined3d_state *state, const struct wined3d_shader_resource_view *srv)
static void wined3d_srv_bind_count_inc(struct wined3d_shader_resource_view *srv)
static BOOL wined3d_dsv_srv_conflict(const struct wined3d_rendertarget_view *dsv, const struct wined3d_format *srv_format)
static void wined3d_srv_bind_count_dec(struct wined3d_shader_resource_view *srv)

Referenced by d3d10_device_set_shader_resource_views(), d3d11_device_context_set_shader_resource_views(), and wined3d_device_context_unbind_srv_for_rtv().

◆ wined3d_device_context_set_state()

void __cdecl wined3d_device_context_set_state ( struct wined3d_device_context *  context,
struct wined3d_state *  state 
)

Definition at line 1915 of file device.c.

1916{
1917 unsigned int i;
1918
1919 TRACE("context %p, state %p.\n", context, state);
1920
1922 context->state = state;
1924
1926 ARRAY_SIZE(state->fb.render_targets), state->fb.render_targets);
1927
1930
1932
1934
1936 state->index_format, state->index_offset);
1937
1938 wined3d_device_context_emit_set_predication(context, state->predicate, state->predicate_value);
1939
1940 for (i = 0; i < WINED3D_SHADER_TYPE_COUNT; ++i)
1941 {
1946 MAX_SHADER_RESOURCE_VIEWS, state->shader_resource_view[i]);
1947 }
1948
1949 for (i = 0; i < WINED3D_PIPELINE_COUNT; ++i)
1951 state->unordered_access_view[i], NULL);
1952
1953 wined3d_device_context_emit_set_viewports(context, state->viewport_count, state->viewports);
1954 wined3d_device_context_emit_set_scissor_rects(context, state->scissor_rect_count, state->scissor_rects);
1955
1956 wined3d_device_context_emit_set_blend_state(context, state->blend_state, &state->blend_factor, state->sample_mask);
1957 wined3d_device_context_emit_set_depth_stencil_state(context, state->depth_stencil_state, state->stencil_ref);
1960}
void wined3d_device_context_emit_set_unordered_access_views(struct wined3d_device_context *context, enum wined3d_pipeline pipeline, unsigned int start_idx, unsigned int count, struct wined3d_unordered_access_view *const *views, const unsigned int *initial_counts)
Definition: cs.c:1701
void wined3d_device_context_emit_set_vertex_declaration(struct wined3d_device_context *context, struct wined3d_vertex_declaration *declaration)
Definition: cs.c:1414
void wined3d_device_context_emit_set_stream_outputs(struct wined3d_device_context *context, const struct wined3d_stream_output outputs[WINED3D_MAX_STREAM_OUTPUT_BUFFERS])
Definition: cs.c:1481
void wined3d_device_context_emit_set_feature_level(struct wined3d_device_context *context, enum wined3d_feature_level level)
Definition: cs.c:2129
void wined3d_device_context_emit_set_stream_sources(struct wined3d_device_context *context, unsigned int start_idx, unsigned int count, const struct wined3d_stream_state *streams)
Definition: cs.c:1446

Referenced by d3d11_device_context_SwapDeviceContextState(), wined3d_deferred_context_record_command_list(), and wined3d_device_context_emit_execute_command_list().

◆ wined3d_device_context_set_stream_outputs()

void __cdecl wined3d_device_context_set_stream_outputs ( struct wined3d_device_context *  context,
const struct wined3d_stream_output  outputs[WINED3D_MAX_STREAM_OUTPUT_BUFFERS] 
)

Definition at line 2611 of file device.c.

2613{
2614 struct wined3d_state *state = context->state;
2615 unsigned int i;
2616
2617 TRACE("context %p, outputs %p.\n", context, outputs);
2618
2621 for (i = 0; i < WINED3D_MAX_STREAM_OUTPUT_BUFFERS; ++i)
2622 {
2623 struct wined3d_buffer *prev_buffer = state->stream_output[i].buffer;
2624 struct wined3d_buffer *buffer = outputs[i].buffer;
2625
2626 if (buffer)
2628 state->stream_output[i] = outputs[i];
2629 if (prev_buffer)
2630 wined3d_buffer_decref(prev_buffer);
2631 }
2633}
struct wined3d_buffer * buffer
Definition: wined3d.h:2203

Referenced by d3d10_device_SOSetTargets(), and d3d11_device_context_SOSetTargets().

◆ wined3d_device_context_set_stream_sources()

HRESULT __cdecl wined3d_device_context_set_stream_sources ( struct wined3d_device_context *  context,
unsigned int  start_idx,
unsigned int  count,
const struct wined3d_stream_state *  streams 
)

Definition at line 2510 of file device.c.

2512{
2513 struct wined3d_state *state = context->state;
2514 unsigned int i;
2515
2516 TRACE("context %p, start_idx %u, count %u, streams %p.\n", context, start_idx, count, streams);
2517
2518 if (start_idx >= WINED3D_MAX_STREAMS)
2519 {
2520 WARN("Start index %u is out of range.\n", start_idx);
2522 }
2523
2524 count = min(count, WINED3D_MAX_STREAMS - start_idx);
2525
2526 for (i = 0; i < count; ++i)
2527 {
2528 if (streams[i].offset & 0x3)
2529 {
2530 WARN("Offset %u is not 4 byte aligned.\n", streams[i].offset);
2532 }
2533 }
2534
2536 if (!memcmp(streams, &state->streams[start_idx], count * sizeof(*streams)))
2537 goto out;
2538
2540 for (i = 0; i < count; ++i)
2541 {
2542 struct wined3d_buffer *prev = state->streams[start_idx + i].buffer;
2543 struct wined3d_buffer *buffer = streams[i].buffer;
2544
2545 state->streams[start_idx + i] = streams[i];
2546
2547 if (buffer)
2549 if (prev)
2551 }
2552out:
2554 return WINED3D_OK;
2555}
struct wined3d_stream_state streams[WINED3D_MAX_STREAMS]
struct wined3d_buffer * buffer
Definition: wined3d.h:2160

Referenced by d3d10_device_IASetVertexBuffers(), d3d11_device_context_IASetVertexBuffers(), and wined3d_device_apply_stateblock().

◆ wined3d_device_context_set_unordered_access_views()

void __cdecl wined3d_device_context_set_unordered_access_views ( struct wined3d_device_context *  context,
enum wined3d_pipeline  pipeline,
unsigned int  start_idx,
unsigned int  count,
struct wined3d_unordered_access_view *const *  uavs,
const unsigned int *  initial_counts 
)

Definition at line 2277 of file device.c.

2280{
2281 struct wined3d_state *state = context->state;
2282 unsigned int i;
2283
2284 TRACE("context %p, pipeline %#x, start_idx %u, count %u, uavs %p, initial_counts %p.\n",
2285 context, pipeline, start_idx, count, uavs, initial_counts);
2286
2288 {
2289 WARN("Invalid UAV index %u, count %u.\n", start_idx, count);
2290 return;
2291 }
2292
2294 if (!memcmp(uavs, &state->unordered_access_view[pipeline][start_idx], count * sizeof(*uavs)) && !initial_counts)
2295 goto out;
2296
2297 wined3d_device_context_emit_set_unordered_access_views(context, pipeline, start_idx, count, uavs, initial_counts);
2298 for (i = 0; i < count; ++i)
2299 {
2300 struct wined3d_unordered_access_view *prev = state->unordered_access_view[pipeline][start_idx + i];
2301 struct wined3d_unordered_access_view *uav = uavs[i];
2302
2303 if (uav)
2305 state->unordered_access_view[pipeline][start_idx + i] = uav;
2306 if (prev)
2308 }
2309out:
2311}
ULONG CDECL wined3d_unordered_access_view_decref(struct wined3d_unordered_access_view *view)
Definition: view.c:1536
ULONG CDECL wined3d_unordered_access_view_incref(struct wined3d_unordered_access_view *view)
Definition: view.c:1522

Referenced by d3d11_device_context_CSSetUnorderedAccessViews(), and wined3d_device_context_set_render_targets_and_unordered_access_views().

◆ wined3d_device_context_set_vertex_declaration()

void __cdecl wined3d_device_context_set_vertex_declaration ( struct wined3d_device_context *  context,
struct wined3d_vertex_declaration *  declaration 
)

Definition at line 2588 of file device.c.

2590{
2591 struct wined3d_state *state = context->state;
2592 struct wined3d_vertex_declaration *prev;
2593
2594 TRACE("context %p, declaration %p.\n", context, declaration);
2595
2597 prev = state->vertex_declaration;
2598 if (declaration == prev)
2599 goto out;
2600
2601 if (declaration)
2603 state->vertex_declaration = declaration;
2605 if (prev)
2607out:
2609}
ULONG CDECL wined3d_vertex_declaration_incref(struct wined3d_vertex_declaration *declaration)
ULONG CDECL wined3d_vertex_declaration_decref(struct wined3d_vertex_declaration *declaration)

Referenced by d3d10_device_IASetInputLayout(), d3d11_device_context_IASetInputLayout(), and wined3d_device_apply_stateblock().

◆ wined3d_device_context_set_viewports()

void __cdecl wined3d_device_context_set_viewports ( struct wined3d_device_context *  context,
unsigned int  viewport_count,
const struct wined3d_viewport *  viewports 
)

Definition at line 2124 of file device.c.

2126{
2127 struct wined3d_state *state = context->state;
2128 unsigned int i;
2129
2130 TRACE("context %p, viewport_count %u, viewports %p.\n", context, viewport_count, viewports);
2131
2132 for (i = 0; i < viewport_count; ++i)
2133 {
2134 TRACE("%u: x %.8e, y %.8e, w %.8e, h %.8e, min_z %.8e, max_z %.8e.\n", i, viewports[i].x, viewports[i].y,
2135 viewports[i].width, viewports[i].height, viewports[i].min_z, viewports[i].max_z);
2136 }
2137
2139 if (viewport_count)
2140 memcpy(state->viewports, viewports, viewport_count * sizeof(*viewports));
2141 else
2142 memset(state->viewports, 0, sizeof(state->viewports));
2143 state->viewport_count = viewport_count;
2144
2147}
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546

Referenced by d3d10_device_RSSetViewports(), d3d11_device_context_RSSetViewports(), and wined3d_stateblock_apply_clear_state().

◆ wined3d_device_context_unmap()

HRESULT __cdecl wined3d_device_context_unmap ( struct wined3d_device_context *  context,
struct wined3d_resource *  resource,
unsigned int  sub_resource_idx 
)

Definition at line 4627 of file device.c.

4629{
4630 HRESULT hr;
4631 TRACE("context %p, resource %p, sub_resource_idx %u.\n", context, resource, sub_resource_idx);
4632
4636 return hr;
4637}
HRESULT wined3d_device_context_emit_unmap(struct wined3d_device_context *context, struct wined3d_resource *resource, unsigned int sub_resource_idx)
Definition: cs.c:2541

Referenced by d3d11_device_context_Unmap(), and wined3d_resource_unmap().

◆ wined3d_device_context_update_sub_resource()

void __cdecl wined3d_device_context_update_sub_resource ( struct wined3d_device_context *  context,
struct wined3d_resource *  resource,
unsigned int  sub_resource_idx,
const struct wined3d_box *  box,
const void *  data,
unsigned int  row_pitch,
unsigned int  depth_pitch,
unsigned int  flags 
)

Definition at line 4376 of file device.c.

4379{
4381 struct wined3d_box b;
4382
4383 TRACE("context %p, resource %p, sub_resource_idx %u, box %s, data %p, row_pitch %u, depth_pitch %u, flags %#x.\n",
4384 context, resource, sub_resource_idx, debug_box(box), data, row_pitch, depth_pitch, flags);
4385
4386 if (flags)
4387 FIXME("Ignoring flags %#x.\n", flags);
4388
4389 if (!(resource->access & WINED3D_RESOURCE_ACCESS_GPU))
4390 {
4391 WARN("Resource %p is not GPU accessible.\n", resource);
4392 return;
4393 }
4394
4396 return;
4397
4398 if (!box)
4399 {
4400 wined3d_box_set(&b, 0, 0, desc.width, desc.height, 0, desc.depth);
4401 box = &b;
4402 }
4403 else if (box->left >= box->right || box->right > desc.width
4404 || box->top >= box->bottom || box->bottom > desc.height
4405 || box->front >= box->back || box->back > desc.depth)
4406 {
4407 WARN("Invalid box %s specified.\n", debug_box(box));
4408 return;
4409 }
4410
4413 sub_resource_idx, box, data, row_pitch, depth_pitch);
4415}
void wined3d_device_context_emit_update_sub_resource(struct wined3d_device_context *context, struct wined3d_resource *resource, unsigned int sub_resource_idx, const struct wined3d_box *box, const void *data, unsigned int row_pitch, unsigned int slice_pitch)
Definition: cs.c:2766
#define WINED3D_RESOURCE_ACCESS_GPU
Definition: wined3d.h:51

Referenced by d3d11_device_context_UpdateSubresource(), and d3d11_device_context_UpdateSubresource1().

◆ wined3d_device_create()

HRESULT __cdecl wined3d_device_create ( struct wined3d *  wined3d,
struct wined3d_adapter *  adapter,
enum wined3d_device_type  device_type,
HWND  focus_window,
unsigned int  behaviour_flags,
BYTE  surface_alignment,
const enum wined3d_feature_level *  feature_levels,
unsigned int  feature_level_count,
struct wined3d_device_parent *  device_parent,
struct wined3d_device **  device 
)

◆ wined3d_device_decref()

ULONG __cdecl wined3d_device_decref ( struct wined3d_device *  device)

◆ wined3d_device_end_scene()

HRESULT __cdecl wined3d_device_end_scene ( struct wined3d_device *  device)

Definition at line 3715 of file device.c.

3716{
3717 TRACE("device %p.\n", device);
3718
3719 if (!device->inScene)
3720 {
3721 WARN("Not in scene, returning WINED3DERR_INVALIDCALL.\n");
3723 }
3724
3725 device->inScene = FALSE;
3726 return WINED3D_OK;
3727}

Referenced by d3d8_device_EndScene(), d3d9_device_EndScene(), d3d_device7_EndScene(), and wined3d_device_reset().

◆ wined3d_device_evict_managed_resources()

void __cdecl wined3d_device_evict_managed_resources ( struct wined3d_device *  device)

Definition at line 4923 of file device.c.

4924{
4926
4927 TRACE("device %p.\n", device);
4928
4930 {
4931 TRACE("Checking resource %p for eviction.\n", resource);
4932
4933 if ((resource->usage & WINED3DUSAGE_MANAGED) && !resource->map_count)
4934 {
4936 {
4937 TRACE("Evicting %p.\n", resource);
4939 }
4940
4942 }
4943 }
4944}
void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource)
Definition: cs.c:2440
static void mark_managed_resource_dirty(struct wined3d_resource *resource)
Definition: device.c:4908
struct list resource_list_entry
#define WINED3DUSAGE_MANAGED
Definition: wined3d.h:938

Referenced by d3d7_EvictManagedTextures(), d3d8_device_ResourceManagerDiscardBytes(), and d3d9_device_EvictManagedResources().

◆ wined3d_device_get_available_texture_mem()

UINT __cdecl wined3d_device_get_available_texture_mem ( const struct wined3d_device *  device)

Definition at line 1754 of file device.c.

1755{
1756 const struct wined3d_driver_info *driver_info;
1757
1758 TRACE("device %p.\n", device);
1759
1760 driver_info = &device->adapter->driver_info;
1761
1762 TRACE("Emulating 0x%s bytes. 0x%s used, returning 0x%s left.\n",
1763 wine_dbgstr_longlong(driver_info->vram_bytes),
1764 wine_dbgstr_longlong(device->adapter->vram_bytes_used),
1765 wine_dbgstr_longlong(driver_info->vram_bytes - device->adapter->vram_bytes_used));
1766
1767 return min(UINT_MAX, driver_info->vram_bytes) - device->adapter->vram_bytes_used;
1768}
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:49
#define UINT_MAX
Definition: limits.h:27

Referenced by d3d8_device_GetAvailableTextureMem(), d3d9_device_GetAvailableTextureMem(), ddraw7_GetAvailableVidMem(), and resource_init().

◆ wined3d_device_get_clip_status()

HRESULT __cdecl wined3d_device_get_clip_status ( const struct wined3d_device *  device,
struct wined3d_clip_status *  clip_status 
)

Definition at line 1820 of file device.c.

1822{
1823 FIXME("device %p, clip_status %p stub!\n", device, clip_status);
1824
1825 if (!clip_status)
1827
1828 return WINED3D_OK;
1829}

Referenced by d3d8_device_GetClipStatus(), and d3d9_device_GetClipStatus().

◆ wined3d_device_get_creation_parameters()

void __cdecl wined3d_device_get_creation_parameters ( const struct wined3d_device *  device,
struct wined3d_device_creation_parameters *  creation_parameters 
)

Definition at line 5274 of file device.c.

5276{
5277 TRACE("device %p, parameters %p.\n", device, parameters);
5278
5279 *parameters = device->create_parms;
5280}
static BYTE parameters[]
Definition: asn.c:558

Referenced by d3d11_device_CheckFormatSupport(), d3d11_device_CheckMultisampleQualityLevels(), d3d8_device_GetCreationParameters(), d3d9_device_CreateAdditionalSwapChain(), and d3d9_device_GetCreationParameters().

◆ wined3d_device_get_device_caps()

HRESULT __cdecl wined3d_device_get_device_caps ( const struct wined3d_device *  device,
struct wined3d_caps *  caps 
)

Definition at line 3679 of file device.c.

3680{
3681 TRACE("device %p, caps %p.\n", device, caps);
3682
3683 return wined3d_get_device_caps(device->adapter, device->create_parms.device_type, caps);
3684}
HRESULT CDECL wined3d_get_device_caps(const struct wined3d_adapter *adapter, enum wined3d_device_type device_type, struct wined3d_caps *caps)
Definition: directx.c:2366

Referenced by d3d11_device_CheckFeatureSupport(), d3d8_device_GetDeviceCaps(), d3d9_device_GetDeviceCaps(), and ddraw7_GetCaps().

◆ wined3d_device_get_display_mode()

HRESULT __cdecl wined3d_device_get_display_mode ( const struct wined3d_device *  device,
UINT  swapchain_idx,
struct wined3d_display_mode *  mode,
enum wined3d_display_rotation *  rotation 
)

Definition at line 3686 of file device.c.

3688{
3689 struct wined3d_swapchain *swapchain;
3690
3691 TRACE("device %p, swapchain_idx %u, mode %p, rotation %p.\n",
3692 device, swapchain_idx, mode, rotation);
3693
3694 if (!(swapchain = wined3d_device_get_swapchain(device, swapchain_idx)))
3696
3697 return wined3d_swapchain_get_display_mode(swapchain, mode, rotation);
3698}
struct wined3d_swapchain *CDECL wined3d_device_get_swapchain(const struct wined3d_device *device, UINT swapchain_idx)
Definition: device.c:501
GLenum mode
Definition: glext.h:6217
HRESULT CDECL wined3d_swapchain_get_display_mode(const struct wined3d_swapchain *swapchain, struct wined3d_display_mode *mode, enum wined3d_display_rotation *rotation)
Definition: swapchain.c:316

Referenced by d3d8_device_GetDisplayMode(), d3d9_device_GetDisplayMode(), and d3d9_device_GetDisplayModeEx().

◆ wined3d_device_get_gamma_ramp()

void __cdecl wined3d_device_get_gamma_ramp ( const struct wined3d_device *  device,
UINT  swapchain_idx,
struct wined3d_gamma_ramp *  ramp 
)

Definition at line 5301 of file device.c.

5303{
5304 struct wined3d_swapchain *swapchain;
5305
5306 TRACE("device %p, swapchain_idx %u, ramp %p.\n",
5307 device, swapchain_idx, ramp);
5308
5309 if ((swapchain = wined3d_device_get_swapchain(device, swapchain_idx)))
5311}
static const BYTE ramp[17]
Definition: dib.c:2957
HRESULT CDECL wined3d_swapchain_get_gamma_ramp(const struct wined3d_swapchain *swapchain, struct wined3d_gamma_ramp *ramp)
Definition: swapchain.c:381

Referenced by d3d8_device_GetGammaRamp(), d3d9_device_GetGammaRamp(), and ddraw_gamma_control_GetGammaRamp().

◆ wined3d_device_get_immediate_context()

struct wined3d_device_context *__cdecl wined3d_device_get_immediate_context ( struct wined3d_device *  device)

Definition at line 1969 of file device.c.

1970{
1971 TRACE("device %p.\n", device);
1972
1973 return &device->cs->c;
1974}

Referenced by ddraw_init(), device_init(), and device_parent_wined3d_device_created().

◆ wined3d_device_get_max_frame_latency()

unsigned int __cdecl wined3d_device_get_max_frame_latency ( const struct wined3d_device *  device)

Definition at line 2729 of file device.c.

2730{
2731 return device->max_frame_latency;
2732}

Referenced by d3d9_device_GetMaximumFrameLatency(), and dxgi_device_GetMaximumFrameLatency().

◆ wined3d_device_get_npatch_mode()

float __cdecl wined3d_device_get_npatch_mode ( const struct wined3d_device *  device)

Definition at line 4087 of file device.c.

4088{
4089 static BOOL warned;
4090
4091 TRACE("device %p.\n", device);
4092
4093 if (!warned)
4094 {
4095 FIXME("device %p stub!\n", device);
4096 warned = TRUE;
4097 }
4098
4099 return 0.0f;
4100}

Referenced by d3d9_device_GetNPatchMode().

◆ wined3d_device_get_raster_status()

HRESULT __cdecl wined3d_device_get_raster_status ( const struct wined3d_device *  device,
UINT  swapchain_idx,
struct wined3d_raster_status *  raster_status 
)

Definition at line 4055 of file device.c.

4057{
4058 struct wined3d_swapchain *swapchain;
4059
4060 TRACE("device %p, swapchain_idx %u, raster_status %p.\n",
4061 device, swapchain_idx, raster_status);
4062
4063 if (!(swapchain = wined3d_device_get_swapchain(device, swapchain_idx)))
4065
4066 return wined3d_swapchain_get_raster_status(swapchain, raster_status);
4067}
HRESULT CDECL wined3d_swapchain_get_raster_status(const struct wined3d_swapchain *swapchain, struct wined3d_raster_status *raster_status)
Definition: swapchain.c:294

Referenced by d3d8_device_GetRasterStatus(), and d3d9_device_GetRasterStatus().

◆ wined3d_device_get_software_vertex_processing()

BOOL __cdecl wined3d_device_get_software_vertex_processing ( const struct wined3d_device *  device)

Definition at line 4040 of file device.c.

4041{
4042 static BOOL warned;
4043
4044 TRACE("device %p.\n", device);
4045
4046 if (!warned)
4047 {
4048 TRACE("device %p stub!\n", device);
4049 warned = TRUE;
4050 }
4051
4052 return device->softwareVertexProcessing;
4053}

Referenced by d3d9_device_GetSoftwareVertexProcessing().

◆ wined3d_device_get_state()

struct wined3d_state *__cdecl wined3d_device_get_state ( struct wined3d_device *  device)

Definition at line 1962 of file device.c.

1963{
1964 TRACE("device %p.\n", device);
1965
1966 return device->cs->c.state;
1967}

Referenced by d3d_device_context_state_private_release(), d3d_device_context_state_remove_entry(), and device_parent_wined3d_device_created().

◆ wined3d_device_get_swapchain()

struct wined3d_swapchain *__cdecl wined3d_device_get_swapchain ( const struct wined3d_device *  device,
UINT  swapchain_idx 
)

Definition at line 501 of file device.c.

502{
503 TRACE("device %p, swapchain_idx %u.\n", device, swapchain_idx);
504
505 if (swapchain_idx >= device->swapchain_count)
506 {
507 WARN("swapchain_idx %u >= swapchain_count %u.\n",
508 swapchain_idx, device->swapchain_count);
509 return NULL;
510 }
511
512 return device->swapchains[swapchain_idx];
513}

Referenced by d3d8_device_CreateAdditionalSwapChain(), d3d9_device_CreateAdditionalSwapChain(), d3d9_device_get_swapchains(), wined3d_device_get_display_mode(), wined3d_device_get_gamma_ramp(), wined3d_device_get_raster_status(), wined3d_device_reset(), and wined3d_device_set_gamma_ramp().

◆ wined3d_device_get_swapchain_count()

UINT __cdecl wined3d_device_get_swapchain_count ( const struct wined3d_device *  device)

Definition at line 494 of file device.c.

495{
496 TRACE("device %p.\n", device);
497
498 return device->swapchain_count;
499}

Referenced by d3d8_device_CreateAdditionalSwapChain(), d3d9_device_CreateAdditionalSwapChain(), d3d9_device_get_swapchains(), and d3d9_device_GetNumberOfSwapChains().

◆ wined3d_device_get_wined3d()

struct wined3d *__cdecl wined3d_device_get_wined3d ( const struct wined3d_device *  device)

Definition at line 5282 of file device.c.

5283{
5284 TRACE("device %p.\n", device);
5285
5286 return device->wined3d;
5287}

Referenced by d3d11_device_CheckFormatSupport(), and d3d11_device_CheckMultisampleQualityLevels().

◆ wined3d_device_incref()

◆ wined3d_device_process_vertices()

HRESULT __cdecl wined3d_device_process_vertices ( struct wined3d_device *  device,
struct wined3d_stateblock *  stateblock,
UINT  src_start_idx,
UINT  dst_idx,
UINT  vertex_count,
struct wined3d_buffer *  dst_buffer,
const struct wined3d_vertex_declaration *  declaration,
uint32_t  flags,
uint32_t  dst_fvf 
)

Definition at line 3598 of file device.c.

3601{
3603 struct wined3d_state *device_state = device->cs->c.state;
3605 struct wined3d_resource *resource;
3606 struct wined3d_box box = {0};
3607 struct wined3d_shader *vs;
3608 unsigned int i, j;
3609 uint32_t map;
3610 HRESULT hr;
3611
3612 TRACE("device %p, src_start_idx %u, dst_idx %u, vertex_count %u, "
3613 "dst_buffer %p, declaration %p, flags %#x, dst_fvf %#x.\n",
3614 device, src_start_idx, dst_idx, vertex_count,
3615 dst_buffer, declaration, flags, dst_fvf);
3616
3617 if (declaration)
3618 FIXME("Output vertex declaration not implemented yet.\n");
3619
3621
3626
3627 /* We can't convert FROM a VBO, and vertex buffers used to source into
3628 * process_vertices() are unlikely to ever be used for drawing. Release
3629 * VBOs in those buffers and fix up the stream_info structure.
3630 *
3631 * Also apply the start index. */
3632 map = stream_info.use_map;
3633 while (map)
3634 {
3636 struct wined3d_map_desc map_desc;
3637
3639 e = &stream_info.elements[i];
3640 resource = &state->streams[e->stream_idx].buffer->resource;
3641 box.left = src_start_idx * e->stride;
3642 box.right = box.left + vertex_count * e->stride;
3644 {
3645 ERR("Failed to map resource.\n");
3646 map = stream_info.use_map;
3647 while (map)
3648 {
3650 if (j >= i)
3651 break;
3652
3653 e = &stream_info.elements[j];
3654 resource = &state->streams[e->stream_idx].buffer->resource;
3656 ERR("Failed to unmap resource.\n");
3657 }
3659 }
3660 e->data.buffer_object = 0;
3661 e->data.addr += (ULONG_PTR)map_desc.data;
3662 }
3663
3665 &stream_info, dst_buffer, flags, dst_fvf);
3666
3667 map = stream_info.use_map;
3668 while (map)
3669 {
3671 resource = &state->streams[stream_info.elements[i].stream_idx].buffer->resource;
3673 ERR("Failed to unmap resource.\n");
3674 }
3675
3676 return hr;
3677}
void wined3d_stream_info_from_declaration(struct wined3d_stream_info *stream_info, const struct wined3d_state *state, const struct wined3d_d3d_info *d3d_info)
Definition: context.c:160
static HRESULT process_vertices_strided(const struct wined3d_device *device, const struct wined3d_stateblock_state *state, DWORD dwDestIndex, DWORD dwCount, const struct wined3d_stream_info *stream_info, struct wined3d_buffer *dest, uint32_t flags, uint32_t dst_fvf)
Definition: device.c:3276
HRESULT CDECL wined3d_resource_unmap(struct wined3d_resource *resource, unsigned int sub_resource_idx)
Definition: resource.c:304
HRESULT CDECL wined3d_resource_map(struct wined3d_resource *resource, unsigned int sub_resource_idx, struct wined3d_map_desc *map_desc, const struct wined3d_box *box, uint32_t flags)
Definition: resource.c:295
#define ULONG_PTR
Definition: config.h:101
#define e
Definition: ke_i.h:82
static void stream_info(IStream *stream, HGLOBAL *hmem, int *size, int *pos)
static vector_t * vs
Definition: server.c:146
const struct wined3d_stateblock_state *CDECL wined3d_stateblock_get_state(const struct wined3d_stateblock *stateblock)
Definition: stateblock.c:2064
void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device, struct wined3d_stateblock *stateblock)
Definition: stateblock.c:3038

Referenced by d3d8_device_ProcessVertices(), d3d9_device_ProcessVertices(), and d3d_vertex_buffer7_ProcessVertices().

◆ wined3d_device_release_focus_window()

void __cdecl wined3d_device_release_focus_window ( struct wined3d_device *  device)

Definition at line 1154 of file device.c.

1155{
1156 TRACE("device %p.\n", device);
1157
1158 if (device->focus_window) wined3d_unregister_window(device->focus_window);
1159 InterlockedExchangePointer((void **)&device->focus_window, NULL);
1160 if (device->restore_screensaver)
1161 {
1163 device->restore_screensaver = FALSE;
1164 }
1165}
void wined3d_unregister_window(HWND window)
Definition: wined3d_main.c:790

Referenced by d3d8_device_Release(), d3d9_device_Release(), ddraw_set_cooperative_level(), device_init(), wined3d_device_reset(), and wined3d_swapchain_cleanup().

◆ wined3d_device_reset()

HRESULT __cdecl wined3d_device_reset ( struct wined3d_device *  device,
const struct wined3d_swapchain_desc *  swapchain_desc,
const struct wined3d_display_mode *  mode,
wined3d_device_reset_cb  callback,
BOOL  reset_state 
)

Definition at line 4970 of file device.c.

4973{
4974 static struct wined3d_rendertarget_view *const views[WINED3D_MAX_RENDER_TARGETS];
4975 const struct wined3d_d3d_info *d3d_info = &device->adapter->d3d_info;
4976 struct wined3d_device_context *context = &device->cs->c;
4977 struct wined3d_swapchain_state *swapchain_state;
4978 struct wined3d_state *state = context->state;
4979 struct wined3d_swapchain_desc *current_desc;
4982 struct wined3d_swapchain *swapchain;
4983 struct wined3d_view_desc view_desc;
4984 BOOL backbuffer_resized, windowed;
4986 HWND device_window;
4987 unsigned int i;
4988
4989 TRACE("device %p, swapchain_desc %p, mode %p, callback %p, reset_state %#x.\n",
4990 device, swapchain_desc, mode, callback, reset_state);
4991
4993
4994 if (!(swapchain = wined3d_device_get_swapchain(device, 0)))
4995 {
4996 ERR("Failed to get the first implicit swapchain.\n");
4998 }
4999 swapchain_state = &swapchain->state;
5000 current_desc = &swapchain_state->desc;
5001
5002 if (reset_state)
5003 {
5004 if (device->logo_texture)
5005 {
5006 wined3d_texture_decref(device->logo_texture);
5007 device->logo_texture = NULL;
5008 }
5009 if (device->cursor_texture)
5010 {
5011 wined3d_texture_decref(device->cursor_texture);
5012 device->cursor_texture = NULL;
5013 }
5014 for (unsigned int i = 0; i < ARRAY_SIZE(device->push_constants); ++i)
5015 {
5016 if (device->push_constants[i])
5017 wined3d_buffer_decref(device->push_constants[i]);
5018 device->push_constants[i] = NULL;
5019 }
5021 }
5022
5023 wined3d_device_context_set_rendertarget_views(context, 0, d3d_info->limits.max_rt_count, views, FALSE);
5025
5026 if (reset_state)
5027 {
5028 LIST_FOR_EACH_ENTRY_SAFE(resource, cursor, &device->resources, struct wined3d_resource, resource_list_entry)
5029 {
5030 TRACE("Enumerating resource %p.\n", resource);
5031 if (FAILED(hr = callback(resource)))
5032 return hr;
5033 }
5034 }
5035
5036 TRACE("New params:\n");
5037 TRACE("output %p\n", swapchain_desc->output);
5038 TRACE("backbuffer_width %u\n", swapchain_desc->backbuffer_width);
5039 TRACE("backbuffer_height %u\n", swapchain_desc->backbuffer_height);
5040 TRACE("backbuffer_format %s\n", debug_d3dformat(swapchain_desc->backbuffer_format));
5041 TRACE("backbuffer_count %u\n", swapchain_desc->backbuffer_count);
5042 TRACE("multisample_type %#x\n", swapchain_desc->multisample_type);
5043 TRACE("multisample_quality %u\n", swapchain_desc->multisample_quality);
5044 TRACE("swap_effect %#x\n", swapchain_desc->swap_effect);
5045 TRACE("device_window %p\n", swapchain_desc->device_window);
5046 TRACE("windowed %#x\n", swapchain_desc->windowed);
5047 TRACE("enable_auto_depth_stencil %#x\n", swapchain_desc->enable_auto_depth_stencil);
5048 if (swapchain_desc->enable_auto_depth_stencil)
5049 TRACE("auto_depth_stencil_format %s\n", debug_d3dformat(swapchain_desc->auto_depth_stencil_format));
5050 TRACE("flags %#x\n", swapchain_desc->flags);
5051 TRACE("refresh_rate %u\n", swapchain_desc->refresh_rate);
5052 TRACE("auto_restore_display_mode %#x\n", swapchain_desc->auto_restore_display_mode);
5053
5054 if (swapchain_desc->backbuffer_bind_flags && swapchain_desc->backbuffer_bind_flags != WINED3D_BIND_RENDER_TARGET)
5055 FIXME("Got unexpected backbuffer bind flags %#x.\n", swapchain_desc->backbuffer_bind_flags);
5056
5057 if (swapchain_desc->swap_effect != WINED3D_SWAP_EFFECT_DISCARD
5058 && swapchain_desc->swap_effect != WINED3D_SWAP_EFFECT_SEQUENTIAL
5059 && swapchain_desc->swap_effect != WINED3D_SWAP_EFFECT_COPY)
5060 FIXME("Unimplemented swap effect %#x.\n", swapchain_desc->swap_effect);
5061
5062 /* No special treatment of these parameters. Just store them */
5063 current_desc->swap_effect = swapchain_desc->swap_effect;
5064 current_desc->enable_auto_depth_stencil = swapchain_desc->enable_auto_depth_stencil;
5065 current_desc->auto_depth_stencil_format = swapchain_desc->auto_depth_stencil_format;
5066 current_desc->refresh_rate = swapchain_desc->refresh_rate;
5067 current_desc->auto_restore_display_mode = swapchain_desc->auto_restore_display_mode;
5068
5069 device_window = swapchain_desc->device_window ? swapchain_desc->device_window : device->create_parms.focus_window;
5070 if (device_window && device_window != current_desc->device_window)
5071 {
5072 TRACE("Changing the device window from %p to %p.\n",
5073 current_desc->device_window, device_window);
5074 current_desc->device_window = device_window;
5075 swapchain_state->device_window = device_window;
5077 }
5078
5079 backbuffer_resized = swapchain_desc->backbuffer_width != current_desc->backbuffer_width
5080 || swapchain_desc->backbuffer_height != current_desc->backbuffer_height;
5081 windowed = current_desc->windowed;
5082
5083 if (!swapchain_desc->windowed != !windowed || swapchain->reapply_mode
5084 || mode || (!swapchain_desc->windowed && backbuffer_resized))
5085 {
5086 /* Switch from windowed to fullscreen. */
5087 if (windowed && !swapchain_desc->windowed)
5088 {
5089 HWND focus_window = device->create_parms.focus_window;
5090
5091 if (!focus_window)
5092 focus_window = swapchain->state.device_window;
5094 {
5095 ERR("Failed to acquire focus window, hr %#lx.\n", hr);
5096 return hr;
5097 }
5098 }
5099
5101 swapchain_desc, mode)))
5102 return hr;
5103
5104 /* Switch from fullscreen to windowed. */
5105 if (!windowed && swapchain_desc->windowed)
5107 }
5108 else if (!swapchain_desc->windowed)
5109 {
5110 DWORD style = swapchain_state->style;
5111 DWORD exstyle = swapchain_state->exstyle;
5112 struct wined3d_output_desc output_desc;
5113
5114 /* If we're in fullscreen, and the mode wasn't changed, we have to get
5115 * the window back into the right position. Some applications
5116 * (Battlefield 2, Guild Wars) move it and then call Reset() to clean
5117 * up their mess. Guild Wars also loses the device during that. */
5118 if (FAILED(hr = wined3d_output_get_desc(swapchain_desc->output, &output_desc)))
5119 {
5120 ERR("Failed to get output description, hr %#lx.\n", hr);
5121 return hr;
5122 }
5123
5124 swapchain_state->style = 0;
5125 swapchain_state->exstyle = 0;
5126 wined3d_swapchain_state_setup_fullscreen(swapchain_state, swapchain_state->device_window,
5127 output_desc.desktop_rect.left, output_desc.desktop_rect.top,
5128 swapchain_desc->backbuffer_width, swapchain_desc->backbuffer_height);
5129 swapchain_state->style = style;
5130 swapchain_state->exstyle = exstyle;
5131 }
5132
5133 if (FAILED(hr = wined3d_swapchain_resize_buffers(swapchain, swapchain_desc->backbuffer_count,
5134 swapchain_desc->backbuffer_width, swapchain_desc->backbuffer_height, swapchain_desc->backbuffer_format,
5135 swapchain_desc->multisample_type, swapchain_desc->multisample_quality)))
5136 return hr;
5137
5138 if (swapchain_desc->flags != current_desc->flags)
5139 {
5140 current_desc->flags = swapchain_desc->flags;
5141
5143 for (i = 0; i < current_desc->backbuffer_count; ++i)
5144 {
5146 }
5147 }
5148
5149 if ((view = device->auto_depth_stencil_view))
5150 {
5151 device->auto_depth_stencil_view = NULL;
5153 }
5154 if (current_desc->enable_auto_depth_stencil)
5155 {
5156 struct wined3d_resource_desc texture_desc;
5157 struct wined3d_texture *texture;
5158
5159 TRACE("Creating the depth stencil buffer.\n");
5160
5161 texture_desc.resource_type = WINED3D_RTYPE_TEXTURE_2D;
5162 texture_desc.format = current_desc->auto_depth_stencil_format;
5163 texture_desc.multisample_type = current_desc->multisample_type;
5164 texture_desc.multisample_quality = current_desc->multisample_quality;
5165 texture_desc.usage = 0;
5166 texture_desc.bind_flags = WINED3D_BIND_DEPTH_STENCIL;
5167 texture_desc.access = WINED3D_RESOURCE_ACCESS_GPU;
5168 texture_desc.width = current_desc->backbuffer_width;
5169 texture_desc.height = current_desc->backbuffer_height;
5170 texture_desc.depth = 1;
5171 texture_desc.size = 0;
5172
5173 if (FAILED(hr = wined3d_texture_create(device, &texture_desc, 1, 1, 0,
5175 {
5176 ERR("Failed to create the auto depth/stencil surface, hr %#lx.\n", hr);
5178 }
5179
5180 view_desc.format_id = texture->resource.format->id;
5181 view_desc.flags = 0;
5182 view_desc.u.texture.level_idx = 0;
5183 view_desc.u.texture.level_count = 1;
5184 view_desc.u.texture.layer_idx = 0;
5185 view_desc.u.texture.layer_count = 1;
5186 hr = wined3d_rendertarget_view_create(&view_desc, &texture->resource,
5187 NULL, &wined3d_null_parent_ops, &device->auto_depth_stencil_view);
5189 if (FAILED(hr))
5190 {
5191 ERR("Failed to create rendertarget view, hr %#lx.\n", hr);
5192 return hr;
5193 }
5194 }
5195
5196 if ((view = device->back_buffer_view))
5197 {
5198 device->back_buffer_view = NULL;
5200 }
5201 if (current_desc->backbuffer_count && current_desc->backbuffer_bind_flags & WINED3D_BIND_RENDER_TARGET)
5202 {
5203 struct wined3d_resource *back_buffer = &swapchain->back_buffers[0]->resource;
5204
5205 view_desc.format_id = back_buffer->format->id;
5206 view_desc.flags = 0;
5207 view_desc.u.texture.level_idx = 0;
5208 view_desc.u.texture.level_count = 1;
5209 view_desc.u.texture.layer_idx = 0;
5210 view_desc.u.texture.layer_count = 1;
5211 if (FAILED(hr = wined3d_rendertarget_view_create(&view_desc, back_buffer,
5212 NULL, &wined3d_null_parent_ops, &device->back_buffer_view)))
5213 {
5214 ERR("Failed to create rendertarget view, hr %#lx.\n", hr);
5215 return hr;
5216 }
5217 }
5218
5223
5224 if (reset_state)
5225 {
5226 TRACE("Resetting state.\n");
5227 if (device->inScene)
5231
5233 {
5234 TRACE("Unloading resource %p.\n", resource);
5236
5237 if (resource->usage & WINED3DUSAGE_MANAGED)
5239 }
5240
5241 device->adapter->adapter_ops->adapter_uninit_3d(device);
5242
5243 wined3d_state_reset(state, &device->adapter->d3d_info);
5244
5248
5249 hr = device->adapter->adapter_ops->adapter_init_3d(device);
5250 }
5251 else
5252 {
5253 if ((view = device->back_buffer_view))
5255 if ((view = device->auto_depth_stencil_view))
5257 }
5258
5259 /* All done. There is no need to reload resources or shaders, this will
5260 * happen automatically on the first use. */
5261 return hr;
5262}
static void update_swapchain_flags(struct wined3d_texture *texture)
Definition: device.c:4955
HRESULT CDECL wined3d_device_acquire_focus_window(struct wined3d_device *device, HWND window)
Definition: device.c:1133
static void device_free_blend_state(struct wine_rb_entry *entry, void *context)
Definition: device.c:1632
HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device)
Definition: device.c:3715
void CDECL wined3d_device_release_focus_window(struct wined3d_device *device)
Definition: device.c:1154
static void device_free_depth_stencil_state(struct wine_rb_entry *entry, void *context)
Definition: device.c:1639
static void device_free_sampler(struct wine_rb_entry *entry, void *context)
Definition: device.c:1618
static void device_load_logo(struct wined3d_device *device, const char *filename)
Definition: device.c:515
static void device_init_swapchain_state(struct wined3d_device *device, struct wined3d_swapchain *swapchain)
Definition: device.c:1167
static void device_free_rasterizer_state(struct wine_rb_entry *entry, void *context)
Definition: device.c:1625
HRESULT CDECL wined3d_texture_create(struct wined3d_device *device, const struct wined3d_resource_desc *desc, UINT layer_count, UINT level_count, uint32_t flags, const struct wined3d_sub_resource_data *data, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_texture **texture)
Definition: texture.c:4158
ULONG CDECL wined3d_texture_decref(struct wined3d_texture *texture)
Definition: texture.c:1606
HRESULT CDECL wined3d_rendertarget_view_create(const struct wined3d_view_desc *desc, struct wined3d_resource *resource, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_rendertarget_view **view)
Definition: view.c:933
static IPrintDialogCallback callback
Definition: printdlg.c:325
#define wine_rb_destroy
Definition: rbtree.h:408
Definition: style.c:91
struct wined3d_d3d_limits limits
unsigned int multisample_quality
Definition: wined3d.h:1778
unsigned int backbuffer_height
Definition: wined3d.h:1773
BOOL auto_restore_display_mode
Definition: wined3d.h:1786
enum wined3d_multisample_type multisample_type
Definition: wined3d.h:1777
enum wined3d_format_id auto_depth_stencil_format
Definition: wined3d.h:1783
struct wined3d_output * output
Definition: wined3d.h:1771
unsigned int backbuffer_width
Definition: wined3d.h:1772
unsigned int backbuffer_count
Definition: wined3d.h:1775
enum wined3d_format_id backbuffer_format
Definition: wined3d.h:1774
enum wined3d_swap_effect swap_effect
Definition: wined3d.h:1779
BOOL enable_auto_depth_stencil
Definition: wined3d.h:1782
unsigned int refresh_rate
Definition: wined3d.h:1785
unsigned int backbuffer_bind_flags
Definition: wined3d.h:1776
struct wined3d_swapchain_desc desc
struct wined3d_texture ** back_buffers
struct wined3d_texture * front_buffer
struct wined3d_swapchain_state state
HRESULT CDECL wined3d_output_get_desc(const struct wined3d_output *output, struct wined3d_output_desc *desc)
Definition: directx.c:1256
void state_unbind_resources(struct wined3d_state *state)
Definition: stateblock.c:475
void CDECL wined3d_swapchain_set_window(struct wined3d_swapchain *swapchain, HWND window)
Definition: swapchain.c:177
HRESULT CDECL wined3d_swapchain_resize_buffers(struct wined3d_swapchain *swapchain, unsigned int buffer_count, unsigned int width, unsigned int height, enum wined3d_format_id format_id, enum wined3d_multisample_type multisample_type, unsigned int multisample_quality)
Definition: swapchain.c:1923
HRESULT wined3d_swapchain_state_setup_fullscreen(struct wined3d_swapchain_state *state, HWND window, int x, int y, int width, int height)
Definition: swapchain.c:2225
HRESULT CDECL wined3d_swapchain_state_set_fullscreen(struct wined3d_swapchain_state *state, const struct wined3d_swapchain_desc *swapchain_desc, const struct wined3d_display_mode *mode)
Definition: swapchain.c:2344
#define WINED3D_MAX_RENDER_TARGETS
Definition: wined3d.h:1606
static void wined3d_cs_finish(struct wined3d_cs *cs, enum wined3d_cs_queue_id queue_id)

Referenced by d3d8_device_Reset(), d3d9_device_reset(), and ddraw_surface_create().

◆ wined3d_device_set_clip_status()

HRESULT __cdecl wined3d_device_set_clip_status ( struct wined3d_device *  device,
const struct wined3d_clip_status *  clip_status 
)

Definition at line 1809 of file device.c.

1811{
1812 FIXME("device %p, clip_status %p stub!\n", device, clip_status);
1813
1814 if (!clip_status)
1816
1817 return WINED3D_OK;
1818}

Referenced by d3d8_device_SetClipStatus(), and d3d9_device_SetClipStatus().

◆ wined3d_device_set_cursor_position()

void __cdecl wined3d_device_set_cursor_position ( struct wined3d_device *  device,
int  x_screen_space,
int  y_screen_space,
uint32_t  flags 
)

Definition at line 4845 of file device.c.

4847{
4848 TRACE("device %p, x %d, y %d, flags %#x.\n",
4849 device, x_screen_space, y_screen_space, flags);
4850
4851 device->xScreenSpace = x_screen_space;
4852 device->yScreenSpace = y_screen_space;
4853
4854 if (device->hardwareCursor)
4855 {
4856 POINT pt;
4857
4858 GetCursorPos( &pt );
4859 if (x_screen_space == pt.x && y_screen_space == pt.y)
4860 return;
4861 SetCursorPos( x_screen_space, y_screen_space );
4862
4863 /* Switch to the software cursor if position diverges from the hardware one. */
4864 GetCursorPos( &pt );
4865 if (x_screen_space != pt.x || y_screen_space != pt.y)
4866 {
4867 if (device->bCursorVisible) SetCursor( NULL );
4868 DestroyCursor( device->hardwareCursor );
4869 device->hardwareCursor = 0;
4870 }
4871 }
4872}
#define pt(x, y)
Definition: drawing.c:79
BOOL WINAPI DestroyCursor(_In_ HCURSOR)
Definition: cursoricon.c:3093
BOOL WINAPI GetCursorPos(_Out_ LPPOINT)
Definition: cursoricon.c:3074
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
BOOL WINAPI SetCursorPos(_In_ int, _In_ int)
Definition: cursoricon.c:3066

Referenced by d3d8_device_SetCursorPosition(), and d3d9_device_SetCursorPosition().

◆ wined3d_device_set_cursor_properties()

HRESULT __cdecl wined3d_device_set_cursor_properties ( struct wined3d_device *  device,
UINT  x_hotspot,
UINT  y_hotspot,
struct wined3d_texture *  texture,
unsigned int  sub_resource_idx 
)

Definition at line 4752 of file device.c.

4754{
4755 unsigned int texture_level = sub_resource_idx % texture->level_count;
4756 unsigned int cursor_width, cursor_height;
4757 struct wined3d_map_desc map_desc;
4758
4759 TRACE("device %p, x_hotspot %u, y_hotspot %u, texture %p, sub_resource_idx %u.\n",
4760 device, x_hotspot, y_hotspot, texture, sub_resource_idx);
4761
4763 || texture->resource.type != WINED3D_RTYPE_TEXTURE_2D)
4765
4766 if (device->cursor_texture)
4767 {
4768 wined3d_texture_decref(device->cursor_texture);
4769 device->cursor_texture = NULL;
4770 }
4771
4772 if (texture->resource.format->id != WINED3DFMT_B8G8R8A8_UNORM)
4773 {
4774 WARN("Texture %p has invalid format %s.\n",
4775 texture, debug_d3dformat(texture->resource.format->id));
4777 }
4778
4779 /* Cursor width and height must all be powers of two */
4780 cursor_width = wined3d_texture_get_level_width(texture, texture_level);
4781 cursor_height = wined3d_texture_get_level_height(texture, texture_level);
4782 if ((cursor_width & (cursor_width - 1)) || (cursor_height & (cursor_height - 1)))
4783 {
4784 WARN("Cursor size %ux%u are not all powers of two.\n", cursor_width, cursor_height);
4786 }
4787
4788 /* Do not store the surface's pointer because the application may
4789 * release it after setting the cursor image. Windows doesn't
4790 * addref the set surface, so we can't do this either without
4791 * creating circular refcount dependencies. */
4792 if (!(device->cursor_texture = wined3d_device_create_cursor_texture(device, texture, sub_resource_idx)))
4793 {
4794 ERR("Failed to create cursor texture.\n");
4796 }
4797
4798 if (cursor_width == 32 && cursor_height == 32)
4799 {
4800 UINT mask_size = cursor_width * cursor_height / 8;
4801 ICONINFO cursor_info;
4802 DWORD *mask_bits;
4804
4805 /* 32-bit user32 cursors ignore the alpha channel if it's all
4806 * zeroes, and use the mask instead. Fill the mask with all ones
4807 * to ensure we still get a fully transparent cursor. */
4808 if (!(mask_bits = malloc(mask_size)))
4809 return E_OUTOFMEMORY;
4810 memset(mask_bits, 0xff, mask_size);
4811
4812 wined3d_resource_map(&texture->resource, sub_resource_idx, &map_desc, NULL,
4814 cursor_info.fIcon = FALSE;
4815 cursor_info.xHotspot = x_hotspot;
4816 cursor_info.yHotspot = y_hotspot;
4817 cursor_info.hbmMask = CreateBitmap(cursor_width, cursor_height, 1, 1, mask_bits);
4818 cursor_info.hbmColor = CreateBitmap(cursor_width, cursor_height, 1, 32, map_desc.data);
4819 wined3d_resource_unmap(&texture->resource, sub_resource_idx);
4820
4821 /* Create our cursor and clean up. */
4822 cursor = CreateIconIndirect(&cursor_info);
4823 if (cursor_info.hbmMask)
4824 DeleteObject(cursor_info.hbmMask);
4825 if (cursor_info.hbmColor)
4826 DeleteObject(cursor_info.hbmColor);
4827 if (device->hardwareCursor)
4828 DestroyCursor(device->hardwareCursor);
4829 device->hardwareCursor = cursor;
4830 if (device->bCursorVisible)
4832
4833 free(mask_bits);
4834 }
4835
4836 TRACE("New cursor dimensions are %ux%u.\n", cursor_width, cursor_height);
4837 device->cursorWidth = cursor_width;
4838 device->cursorHeight = cursor_height;
4839 device->xHotSpot = x_hotspot;
4840 device->yHotSpot = y_hotspot;
4841
4842 return WINED3D_OK;
4843}
static struct wined3d_texture * wined3d_device_create_cursor_texture(struct wined3d_device *device, struct wined3d_texture *cursor_image, unsigned int sub_resource_idx)
Definition: device.c:4709
pKey DeleteObject()
unsigned int UINT
Definition: sysinfo.c:13
HICON WINAPI CreateIconIndirect(_In_ PICONINFO)
Definition: cursoricon.c:2985
DWORD yHotspot
Definition: winuser.h:3233
BOOL fIcon
Definition: winuser.h:3231
DWORD xHotspot
Definition: winuser.h:3232
HBITMAP hbmColor
Definition: winuser.h:3235
HBITMAP hbmMask
Definition: winuser.h:3234
HICON HCURSOR
Definition: windef.h:99
#define WINED3D_MAP_NO_DIRTY_UPDATE
Definition: wined3d.h:955
HBITMAP WINAPI CreateBitmap(_In_ INT cx, _In_ INT cy, _In_ UINT cPlanes, _In_ UINT cBitsPerPel, _In_opt_ const VOID *pvBits)

Referenced by d3d8_device_SetCursorProperties(), and d3d9_device_SetCursorProperties().

◆ wined3d_device_set_dialog_box_mode()

HRESULT __cdecl wined3d_device_set_dialog_box_mode ( struct wined3d_device *  device,
BOOL  enable_dialogs 
)

Definition at line 5264 of file device.c.

5265{
5266 TRACE("device %p, enable_dialogs %#x.\n", device, enable_dialogs);
5267
5268 if (!enable_dialogs) FIXME("Dialogs cannot be disabled yet.\n");
5269
5270 return WINED3D_OK;
5271}

Referenced by d3d9_device_SetDialogBoxMode().

◆ wined3d_device_set_gamma_ramp()

void __cdecl wined3d_device_set_gamma_ramp ( const struct wined3d_device *  device,
UINT  swapchain_idx,
uint32_t  flags,
const struct wined3d_gamma_ramp *  ramp 
)

Definition at line 5289 of file device.c.

5291{
5292 struct wined3d_swapchain *swapchain;
5293
5294 TRACE("device %p, swapchain_idx %u, flags %#x, ramp %p.\n",
5295 device, swapchain_idx, flags, ramp);
5296
5297 if ((swapchain = wined3d_device_get_swapchain(device, swapchain_idx)))
5299}
HRESULT CDECL wined3d_swapchain_set_gamma_ramp(const struct wined3d_swapchain *swapchain, uint32_t flags, const struct wined3d_gamma_ramp *ramp)
Definition: swapchain.c:353

Referenced by d3d8_device_SetGammaRamp(), d3d9_device_SetGammaRamp(), and ddraw_gamma_control_SetGammaRamp().

◆ wined3d_device_set_max_frame_latency()

void __cdecl wined3d_device_set_max_frame_latency ( struct wined3d_device *  device,
unsigned int  max_frame_latency 
)

Definition at line 2717 of file device.c.

2718{
2719 unsigned int i;
2720
2721 if (!latency)
2722 latency = 3;
2723
2724 device->max_frame_latency = latency;
2725 for (i = 0; i < device->swapchain_count; ++i)
2727}
void swapchain_set_max_frame_latency(struct wined3d_swapchain *swapchain, const struct wined3d_device *device)
Definition: swapchain.c:1374

Referenced by d3d9_device_SetMaximumFrameLatency(), and dxgi_device_SetMaximumFrameLatency().

◆ wined3d_device_set_multithreaded()

void __cdecl wined3d_device_set_multithreaded ( struct wined3d_device *  device)

Definition at line 1746 of file device.c.

1747{
1748 TRACE("device %p.\n", device);
1749
1750 /* For now just store the flag (needed in case of ddraw). */
1751 device->create_parms.flags |= WINED3DCREATE_MULTITHREADED;
1752}
#define WINED3DCREATE_MULTITHREADED

Referenced by ddraw_set_cooperative_level(), and device_init().

◆ wined3d_device_set_npatch_mode()

HRESULT __cdecl wined3d_device_set_npatch_mode ( struct wined3d_device *  device,
float  segments 
)

Definition at line 4069 of file device.c.

4070{
4071 static BOOL warned;
4072
4073 TRACE("device %p, segments %.8e.\n", device, segments);
4074
4075 if (segments != 0.0f)
4076 {
4077 if (!warned)
4078 {
4079 FIXME("device %p, segments %.8e stub!\n", device, segments);
4080 warned = TRUE;
4081 }
4082 }
4083
4084 return WINED3D_OK;
4085}

Referenced by d3d9_device_SetNPatchMode().

◆ wined3d_device_set_software_vertex_processing()

void __cdecl wined3d_device_set_software_vertex_processing ( struct wined3d_device *  device,
BOOL  software 
)

Definition at line 4025 of file device.c.

4026{
4027 static BOOL warned;
4028
4029 TRACE("device %p, software %#x.\n", device, software);
4030
4031 if (!warned)
4032 {
4033 FIXME("device %p, software %#x stub!\n", device, software);
4034 warned = TRUE;
4035 }
4036
4037 device->softwareVertexProcessing = software;
4038}

Referenced by d3d9_device_SetSoftwareVertexProcessing().

◆ wined3d_device_show_cursor()

BOOL __cdecl wined3d_device_show_cursor ( struct wined3d_device *  device,
BOOL  show 
)

Definition at line 4874 of file device.c.

4875{
4876 BOOL oldVisible = device->bCursorVisible;
4877
4878 TRACE("device %p, show %#x.\n", device, show);
4879
4880 /*
4881 * When ShowCursor is first called it should make the cursor appear at the OS's last
4882 * known cursor position.
4883 */
4884 if (show && !oldVisible)
4885 {
4886 POINT pt;
4887 GetCursorPos(&pt);
4888 device->xScreenSpace = pt.x;
4889 device->yScreenSpace = pt.y;
4890 }
4891
4892 if (device->hardwareCursor)
4893 {
4894 device->bCursorVisible = show;
4895 if (show)
4896 SetCursor(device->hardwareCursor);
4897 else
4898 SetCursor(NULL);
4899 }
4900 else if (device->cursor_texture)
4901 {
4902 device->bCursorVisible = show;
4903 }
4904
4905 return oldVisible;
4906}

Referenced by d3d8_device_ShowCursor(), and d3d9_device_ShowCursor().

◆ wined3d_device_update_texture()

HRESULT __cdecl wined3d_device_update_texture ( struct wined3d_device *  device,
struct wined3d_texture *  src_texture,
struct wined3d_texture *  dst_texture 
)

Definition at line 3808 of file device.c.

3810{
3811 unsigned int src_size, dst_size, src_skip_levels = 0;
3812 unsigned int src_level_count, dst_level_count;
3813 const struct wined3d_dirty_regions *regions;
3814 unsigned int layer_count, level_count, i, j;
3816 BOOL entire_texture = TRUE;
3817 struct wined3d_box box;
3818
3819 TRACE("device %p, src_texture %p, dst_texture %p.\n", device, src_texture, dst_texture);
3820
3821 /* Verify that the source and destination textures are non-NULL. */
3822 if (!src_texture || !dst_texture)
3823 {
3824 WARN("Source and destination textures must be non-NULL, returning WINED3DERR_INVALIDCALL.\n");
3826 }
3827
3828 if (src_texture->resource.access & WINED3D_RESOURCE_ACCESS_GPU
3829 || src_texture->resource.usage & WINED3DUSAGE_SCRATCH)
3830 {
3831 WARN("Source resource is GPU accessible or a scratch resource.\n");
3833 }
3834 if (dst_texture->resource.access & WINED3D_RESOURCE_ACCESS_CPU)
3835 {
3836 WARN("Destination resource is CPU accessible.\n");
3838 }
3839
3840 /* Verify that the source and destination textures are the same type. */
3841 type = src_texture->resource.type;
3842 if (dst_texture->resource.type != type)
3843 {
3844 WARN("Source and destination have different types, returning WINED3DERR_INVALIDCALL.\n");
3846 }
3847
3848 layer_count = src_texture->layer_count;
3849 if (layer_count != dst_texture->layer_count)
3850 {
3851 WARN("Source and destination have different layer counts.\n");
3853 }
3854
3855 if (src_texture->resource.format != dst_texture->resource.format)
3856 {
3857 WARN("Source and destination formats do not match.\n");
3859 }
3860
3861 src_level_count = src_texture->level_count;
3862 dst_level_count = dst_texture->level_count;
3863 level_count = min(src_level_count, dst_level_count);
3864
3865 src_size = max(src_texture->resource.width, src_texture->resource.height);
3866 src_size = max(src_size, src_texture->resource.depth);
3867 dst_size = max(dst_texture->resource.width, dst_texture->resource.height);
3868 dst_size = max(dst_size, dst_texture->resource.depth);
3869 while (src_size > dst_size)
3870 {
3871 src_size >>= 1;
3872 ++src_skip_levels;
3873 }
3874
3875 if (wined3d_texture_get_level_width(src_texture, src_skip_levels) != dst_texture->resource.width
3876 || wined3d_texture_get_level_height(src_texture, src_skip_levels) != dst_texture->resource.height
3877 || wined3d_texture_get_level_depth(src_texture, src_skip_levels) != dst_texture->resource.depth)
3878 {
3879 WARN("Source and destination dimensions do not match.\n");
3881 }
3882
3883 if ((regions = src_texture->dirty_regions))
3884 {
3885 for (i = 0; i < layer_count && entire_texture; ++i)
3886 {
3888 continue;
3889
3890 entire_texture = FALSE;
3891 break;
3892 }
3893 }
3894
3895 /* Update every surface level of the texture. */
3896 if (entire_texture)
3897 {
3898 for (i = 0; i < level_count; ++i)
3899 {
3900 wined3d_texture_get_level_box(dst_texture, i, &box);
3901 for (j = 0; j < layer_count; ++j)
3902 {
3904 &dst_texture->resource, j * dst_level_count + i, &box,
3905 &src_texture->resource, j * src_level_count + i + src_skip_levels, &box,
3907 }
3908 }
3909 }
3910 else
3911 {
3912 unsigned int src_level, box_count, k;
3913 const struct wined3d_box *boxes;
3914 struct wined3d_box b;
3915
3916 for (i = 0; i < layer_count; ++i)
3917 {
3918 boxes = regions[i].boxes;
3919 box_count = regions[i].box_count;
3921 {
3922 boxes = &b;
3923 box_count = 1;
3924 wined3d_texture_get_level_box(dst_texture, i, &b);
3925 }
3926
3927 for (j = 0; j < level_count; ++j)
3928 {
3929 src_level = j + src_skip_levels;
3930
3931 /* TODO: We could pass an array of boxes here to avoid
3932 * multiple context acquisitions for the same resource. */
3933 for (k = 0; k < box_count; ++k)
3934 {
3935 box = boxes[k];
3936 if (src_level)
3937 {
3938 box.left >>= src_level;
3939 box.top >>= src_level;
3940 box.right = min((box.right + (1u << src_level) - 1) >> src_level,
3941 wined3d_texture_get_level_width(src_texture, src_level));
3942 box.bottom = min((box.bottom + (1u << src_level) - 1) >> src_level,
3943 wined3d_texture_get_level_height(src_texture, src_level));
3944 box.front >>= src_level;
3945 box.back = min((box.back + (1u << src_level) - 1) >> src_level,
3946 wined3d_texture_get_level_depth(src_texture, src_level));
3947 }
3948
3950 &dst_texture->resource, i * dst_level_count + j, &box,
3951 &src_texture->resource, i * src_level_count + src_level, &box,
3953 }
3954 }
3955 }
3956 }
3957
3959
3960 return WINED3D_OK;
3961}
void wined3d_texture_clear_dirty_regions(struct wined3d_texture *texture)
Definition: texture.c:753
static unsigned int box_count(struct histogram *h, struct box *b)
Definition: palette.c:512
int k
Definition: mpi.c:3369
#define max(a, b)
Definition: svc.c:63
wined3d_resource_type
Definition: wined3d.h:716
#define WINED3DUSAGE_SCRATCH
Definition: wined3d.h:932
#define WINED3D_MAX_DIRTY_REGION_COUNT

Referenced by d3d8_device_UpdateTexture(), d3d8_device_upload_managed_textures(), d3d8_texture_preload(), d3d9_device_UpdateTexture(), d3d9_device_upload_managed_textures(), and d3d9_texture_gen_auto_mipmap().

◆ wined3d_device_validate_device()

HRESULT __cdecl wined3d_device_validate_device ( const struct wined3d_device *  device,
const struct wined3d_stateblock_state *  state,
DWORD *  num_passes 
)

Definition at line 3963 of file device.c.

3964{
3965 const struct wined3d_state *device_state = device->cs->c.state;
3966 struct wined3d_texture *texture;
3967 unsigned i;
3968
3969 TRACE("device %p, num_passes %p.\n", device, num_passes);
3970
3971 for (i = 0; i < WINED3D_MAX_COMBINED_SAMPLERS; ++i)
3972 {
3973 if (state->sampler_states[i][WINED3D_SAMP_MIN_FILTER] == WINED3D_TEXF_NONE)
3974 {
3975 WARN("Sampler state %u has minfilter D3DTEXF_NONE, returning D3DERR_UNSUPPORTEDTEXTUREFILTER\n", i);
3977 }
3978 if (state->sampler_states[i][WINED3D_SAMP_MAG_FILTER] == WINED3D_TEXF_NONE)
3979 {
3980 WARN("Sampler state %u has magfilter D3DTEXF_NONE, returning D3DERR_UNSUPPORTEDTEXTUREFILTER\n", i);
3982 }
3983
3984 texture = state->textures[i];
3985 if (!texture || texture->resource.format_caps & WINED3D_FORMAT_CAP_FILTERING)
3986 continue;
3987
3988 if (state->sampler_states[i][WINED3D_SAMP_MAG_FILTER] != WINED3D_TEXF_POINT)
3989 {
3990 WARN("Non-filterable texture and mag filter enabled on sampler %u, returning E_FAIL\n", i);
3991 return E_FAIL;
3992 }
3993 if (state->sampler_states[i][WINED3D_SAMP_MIN_FILTER] != WINED3D_TEXF_POINT)
3994 {
3995 WARN("Non-filterable texture and min filter enabled on sampler %u, returning E_FAIL\n", i);
3996 return E_FAIL;
3997 }
3998 if (state->sampler_states[i][WINED3D_SAMP_MIP_FILTER] != WINED3D_TEXF_NONE
3999 && state->sampler_states[i][WINED3D_SAMP_MIP_FILTER] != WINED3D_TEXF_POINT)
4000 {
4001 WARN("Non-filterable texture and mip filter enabled on sampler %u, returning E_FAIL\n", i);
4002 return E_FAIL;
4003 }
4004 }
4005
4007 {
4010
4011 if (ds && rt && (ds->width < rt->width || ds->height < rt->height))
4012 {
4013 WARN("Depth stencil is smaller than the color buffer, returning D3DERR_CONFLICTINGRENDERSTATE\n");
4015 }
4016 }
4017
4018 /* return a sensible default */
4019 *num_passes = 1;
4020
4021 TRACE("returning D3D_OK\n");
4022 return WINED3D_OK;
4023}
IDirect3DSurface9 * depth_stencil
Definition: render.c:29
IDirect3DSurface9 ** render_targets
Definition: render.c:28
#define WINED3DERR_UNSUPPORTEDTEXTUREFILTER
Definition: wined3d.h:41
#define WINED3D_MAX_COMBINED_SAMPLERS
Definition: wined3d.h:1600
#define WINED3DERR_CONFLICTINGRENDERSTATE
Definition: wined3d.h:40

Referenced by d3d8_device_ValidateDevice(), d3d9_device_ValidateDevice(), and d3d_device7_ValidateDevice().

◆ wined3d_get_adapter()

struct wined3d_adapter *__cdecl wined3d_get_adapter ( const struct wined3d *  wined3d,
unsigned int  idx 
)

Definition at line 1009 of file directx.c.

1010{
1011 TRACE("wined3d %p, idx %u.\n", wined3d, idx);
1012
1013 if (idx >= wined3d->adapter_count)
1014 return NULL;
1015
1016 return wined3d->adapters[idx];
1017}

Referenced by d3d11_device_CheckFormatSupport(), d3d11_device_CheckMultisampleQualityLevels(), d3d8_init(), d3d9_init(), ddraw_enumerate_secondary_devices(), ddraw_init(), and dxgi_adapter_init().

◆ wined3d_get_adapter_count()

UINT __cdecl wined3d_get_adapter_count ( const struct wined3d *  wined3d)

Definition at line 1019 of file directx.c.

1020{
1021 TRACE("wined3d %p, reporting %u adapters.\n",
1023
1024 return wined3d->adapter_count;
1025}

Referenced by d3d8_init(), d3d9_init(), and dxgi_factory_EnumAdapters1().

◆ wined3d_get_device_caps()

HRESULT __cdecl wined3d_get_device_caps ( const struct wined3d_adapter *  adapter,
enum wined3d_device_type  device_type,
struct wined3d_caps *  caps 
)

Definition at line 2366 of file directx.c.

2368{
2369 const struct wined3d_d3d_info *d3d_info;
2370 struct wined3d_vertex_caps vertex_caps;
2371 DWORD ckey_caps, blit_caps, fx_caps;
2373 struct shader_caps shader_caps;
2374
2375 TRACE("adapter %p, device_type %s, caps %p.\n",
2377
2378 d3d_info = &adapter->d3d_info;
2379
2381
2382 caps->Caps = 0;
2386
2390
2393
2408
2417 /* TODO:
2418 WINED3DPMISCCAPS_NULLREFERENCE
2419 WINED3DPMISCCAPS_FOGANDSPECULARALPHA
2420 WINED3DPMISCCAPS_FOGVERTEXCLAMPED */
2421
2434
2443
2444 /* WINED3DPBLENDCAPS_BOTHINVSRCALPHA and WINED3DPBLENDCAPS_BOTHSRCALPHA
2445 * are legacy settings for srcblend only. */
2459
2470
2479
2488
2496
2497 if (!d3d_info->unconditional_npot)
2499
2512
2513 caps->CubeTextureFilterCaps = 0;
2514 caps->VolumeTextureFilterCaps = 0;
2515
2519
2520 caps->VolumeTextureAddressCaps = 0;
2521
2527 /* WINED3DLINECAPS_ANTIALIAS is not supported on Windows, and dx and gl seem to have a different
2528 * idea how generating the smoothing alpha values works; the result is different
2529 */
2530
2531 caps->MaxTextureWidth = d3d_info->limits.texture_size;
2532 caps->MaxTextureHeight = d3d_info->limits.texture_size;
2533
2534 caps->MaxVolumeExtent = 0;
2535
2536 caps->MaxTextureRepeat = 32768;
2537 caps->MaxTextureAspectRatio = d3d_info->limits.texture_size;
2538 caps->MaxVertexW = 1e10f;
2539
2540 caps->GuardBandLeft = -32768.0f;
2541 caps->GuardBandTop = -32768.0f;
2542 caps->GuardBandRight = 32768.0f;
2543 caps->GuardBandBottom = 32768.0f;
2544
2545 caps->ExtentsAdjust = 0.0f;
2546
2553
2554 caps->MaxAnisotropy = 0;
2555 caps->MaxPointSize = d3d_info->limits.pointsize_max;
2556
2557 caps->MaxPrimitiveCount = 0x555555; /* Taken from an AMD Radeon HD 5700 (Evergreen) GPU. */
2558 caps->MaxVertexIndex = 0xffffff; /* Taken from an AMD Radeon HD 5700 (Evergreen) GPU. */
2560 caps->MaxStreamStride = 1024;
2561
2562 /* d3d9.dll sets D3DDEVCAPS2_CAN_STRETCHRECT_FROM_TEXTURES here because StretchRects is implemented in d3d9 */
2566
2567 caps->NumSimultaneousRTs = d3d_info->limits.max_rt_count;
2568
2573 caps->VertexTextureFilterCaps = 0;
2574
2575 adapter->shader_backend->shader_get_caps(adapter, &shader_caps);
2576 adapter->fragment_pipe->get_caps(adapter, &fragment_caps);
2577 adapter->vertex_pipe->vp_get_caps(adapter, &vertex_caps);
2578
2579 /* Add shader misc caps. Only some of them belong to the shader parts of the pipeline */
2581
2584
2587
2591
2592 caps->MaxUserClipPlanes = vertex_caps.max_user_clip_planes;
2593 caps->MaxActiveLights = vertex_caps.max_active_lights;
2594 caps->MaxVertexBlendMatrices = vertex_caps.max_vertex_blend_matrices;
2595 caps->MaxVertexBlendMatrixIndex = vertex_caps.max_vertex_blend_matrix_index;
2596 caps->VertexProcessingCaps = vertex_caps.vertex_processing_caps;
2597 caps->FVFCaps = vertex_caps.fvf_caps;
2598 caps->RasterCaps |= vertex_caps.raster_caps;
2599
2600 /* The following caps are shader specific, but they are things we cannot detect, or which
2601 * are the same among all shader models. So to avoid code duplication set the shader version
2602 * specific, but otherwise constant caps here
2603 */
2604 if (caps->VertexShaderVersion >= 3)
2605 {
2606 /* Where possible set the caps based on OpenGL extensions and if they
2607 * aren't set (in case of software rendering) use the VS 3.0 from
2608 * MSDN or else if there's OpenGL spec use a hardcoded value minimum
2609 * VS3.0 value. */
2611 /* VS 3.0 requires MAX_DYNAMICFLOWCONTROLDEPTH (24) */
2612 caps->VS20Caps.dynamic_flow_control_depth = WINED3DVS20_MAX_DYNAMICFLOWCONTROLDEPTH;
2613 caps->VS20Caps.temp_count = 32;
2614 /* level of nesting in loops / if-statements; VS 3.0 requires MAX (4) */
2615 caps->VS20Caps.static_flow_control_depth = WINED3DVS20_MAX_STATICFLOWCONTROLDEPTH;
2616
2617 caps->MaxVShaderInstructionsExecuted = 65535; /* VS 3.0 needs at least 65535, some cards even use 2^32-1 */
2620 }
2621 else if (caps->VertexShaderVersion == 2)
2622 {
2623 caps->VS20Caps.caps = 0;
2624 caps->VS20Caps.dynamic_flow_control_depth = WINED3DVS20_MIN_DYNAMICFLOWCONTROLDEPTH;
2625 caps->VS20Caps.temp_count = WINED3DVS20_MIN_NUMTEMPS;
2626 caps->VS20Caps.static_flow_control_depth = 1;
2627
2628 caps->MaxVShaderInstructionsExecuted = 65535;
2630 }
2631 else /* VS 1.x */
2632 {
2633 caps->VS20Caps.caps = 0;
2634 caps->VS20Caps.dynamic_flow_control_depth = 0;
2635 caps->VS20Caps.temp_count = 0;
2636 caps->VS20Caps.static_flow_control_depth = 0;
2637
2640 }
2641
2642 if (caps->PixelShaderVersion >= 3)
2643 {
2644 /* Where possible set the caps based on OpenGL extensions and if they
2645 * aren't set (in case of software rendering) use the PS 3.0 from
2646 * MSDN or else if there's OpenGL spec use a hardcoded value minimum
2647 * PS 3.0 value. */
2648
2649 /* Caps is more or less undocumented on MSDN but it appears to be
2650 * used for PS20Caps based on results from R9600/FX5900/Geforce6800
2651 * cards from Windows */
2657 /* PS 3.0 requires MAX_DYNAMICFLOWCONTROLDEPTH (24) */
2658 caps->PS20Caps.dynamic_flow_control_depth = WINED3DPS20_MAX_DYNAMICFLOWCONTROLDEPTH;
2659 caps->PS20Caps.temp_count = 32;
2660 /* PS 3.0 requires MAX_STATICFLOWCONTROLDEPTH (4) */
2661 caps->PS20Caps.static_flow_control_depth = WINED3DPS20_MAX_STATICFLOWCONTROLDEPTH;
2662 /* PS 3.0 requires MAX_NUMINSTRUCTIONSLOTS (512) */
2663 caps->PS20Caps.instruction_slot_count = WINED3DPS20_MAX_NUMINSTRUCTIONSLOTS;
2664
2665 caps->MaxPShaderInstructionsExecuted = 65535;
2667 }
2668 else if (caps->PixelShaderVersion == 2)
2669 {
2670 /* Below we assume PS2.0 specs, not extended 2.0a(GeforceFX)/2.0b(Radeon R3xx) ones */
2671 caps->PS20Caps.caps = 0;
2672 caps->PS20Caps.dynamic_flow_control_depth = 0; /* WINED3DVS20_MIN_DYNAMICFLOWCONTROLDEPTH = 0 */
2673 caps->PS20Caps.temp_count = WINED3DPS20_MIN_NUMTEMPS;
2674 caps->PS20Caps.static_flow_control_depth = WINED3DPS20_MIN_STATICFLOWCONTROLDEPTH; /* Minimum: 1 */
2675 /* Minimum number (64 ALU + 32 Texture), a GeforceFX uses 512 */
2676 caps->PS20Caps.instruction_slot_count = WINED3DPS20_MIN_NUMINSTRUCTIONSLOTS;
2677
2678 caps->MaxPShaderInstructionsExecuted = 512; /* Minimum value, a GeforceFX uses 1024 */
2680 }
2681 else /* PS 1.x */
2682 {
2683 caps->PS20Caps.caps = 0;
2684 caps->PS20Caps.dynamic_flow_control_depth = 0;
2685 caps->PS20Caps.temp_count = 0;
2686 caps->PS20Caps.static_flow_control_depth = 0;
2687 caps->PS20Caps.instruction_slot_count = 0;
2688
2691 }
2692
2693 if (caps->VertexShaderVersion >= 2)
2694 {
2695 /* OpenGL supports all the formats below, perhaps not always
2696 * without conversion, but it supports them.
2697 * Further GLSL doesn't seem to have an official unsigned type so
2698 * don't advertise it yet as I'm not sure how we handle it.
2699 * We might need to add some clamping in the shader engine to
2700 * support it.
2701 * TODO: WINED3DDTCAPS_USHORT2N, WINED3DDTCAPS_USHORT4N, WINED3DDTCAPS_UDEC3, WINED3DDTCAPS_DEC3N */
2706 }
2707 else
2708 {
2709 caps->DeclTypes = 0;
2710 }
2711
2712 /* Set DirectDraw helper Caps */
2713 ckey_caps = WINEDDCKEYCAPS_DESTBLT |
2715 fx_caps = WINEDDFXCAPS_BLTALPHA |
2727 blit_caps = WINEDDCAPS_BLT |
2736
2737 /* Fill the ddraw caps structure */
2738 caps->ddraw_caps.caps = WINEDDCAPS_GDI |
2740 blit_caps;
2741 caps->ddraw_caps.caps2 = WINEDDCAPS2_CERTIFIED |
2746 caps->ddraw_caps.color_key_caps = ckey_caps;
2747 caps->ddraw_caps.fx_caps = fx_caps;
2748 caps->ddraw_caps.svb_caps = blit_caps;
2749 caps->ddraw_caps.svb_color_key_caps = ckey_caps;
2750 caps->ddraw_caps.svb_fx_caps = fx_caps;
2751 caps->ddraw_caps.vsb_caps = blit_caps;
2752 caps->ddraw_caps.vsb_color_key_caps = ckey_caps;
2753 caps->ddraw_caps.vsb_fx_caps = fx_caps;
2754 caps->ddraw_caps.ssb_caps = blit_caps;
2755 caps->ddraw_caps.ssb_color_key_caps = ckey_caps;
2756 caps->ddraw_caps.ssb_fx_caps = fx_caps;
2757
2758 caps->ddraw_caps.dds_caps = WINEDDSCAPS_FLIP
2765
2768 caps->stencil_export = d3d_info->stencil_export;
2769
2770 caps->max_feature_level = d3d_info->feature_level;
2771
2772 adapter->adapter_ops->adapter_get_wined3d_caps(adapter, caps);
2773
2774 return WINED3D_OK;
2775}
unsigned int max_blend_stages
unsigned int PrimitiveMiscCaps
unsigned int max_textures
unsigned int TextureOpCaps
unsigned int vs_version
unsigned int vs_uniform_count
unsigned int ps_version
DWORD MaxPShaderInstructionsExecuted
Definition: wined3d.h:1995
BOOL viewport_array_index_any_shader
Definition: wined3d.h:2002
DWORD MaxVertexBlendMatrices
Definition: wined3d.h:1967
DWORD MaxVertexShader30InstructionSlots
Definition: wined3d.h:1996
DWORD MaxTextureBlendStages
Definition: wined3d.h:1961
struct wined3d_vertex_shader_caps VS20Caps
Definition: wined3d.h:1991
DWORD StretchRectFilterCaps
Definition: wined3d.h:1990
BOOL stencil_export
Definition: wined3d.h:2003
DWORD VolumeTextureAddressCaps
Definition: wined3d.h:1940
float GuardBandTop
Definition: wined3d.h:1952
float PixelShader1xMaxValue
Definition: wined3d.h:1981
DWORD FVFCaps
Definition: wined3d.h:1959
DWORD PrimitiveMiscCaps
Definition: wined3d.h:1928
DWORD MaxVertexBlendMatrixIndex
Definition: wined3d.h:1968
DWORD VertexProcessingCaps
Definition: wined3d.h:1964
DWORD TextureAddressCaps
Definition: wined3d.h:1939
DWORD TextureCaps
Definition: wined3d.h:1935
DWORD ShadeCaps
Definition: wined3d.h:1934
DWORD TextureOpCaps
Definition: wined3d.h:1960
DWORD MaxTextureRepeat
Definition: wined3d.h:1946
DWORD MaxAnisotropy
Definition: wined3d.h:1948
DWORD MaxPixelShader30InstructionSlots
Definition: wined3d.h:1997
DWORD MaxVolumeExtent
Definition: wined3d.h:1945
float ExtentsAdjust
Definition: wined3d.h:1956
float MaxNpatchTessellationLevel
Definition: wined3d.h:1986
float GuardBandLeft
Definition: wined3d.h:1951
DWORD VolumeTextureFilterCaps
Definition: wined3d.h:1938
DWORD DevCaps
Definition: wined3d.h:1927
DWORD ZCmpCaps
Definition: wined3d.h:1930
DWORD MaxTextureHeight
Definition: wined3d.h:1944
DWORD CursorCaps
Definition: wined3d.h:1926
DWORD Caps
Definition: wined3d.h:1922
DWORD Caps3
Definition: wined3d.h:1924
DWORD MaxStreams
Definition: wined3d.h:1974
DWORD NumSimultaneousRTs
Definition: wined3d.h:1989
DWORD AlphaCmpCaps
Definition: wined3d.h:1933
DWORD DestBlendCaps
Definition: wined3d.h:1932
enum wined3d_feature_level max_feature_level
Definition: wined3d.h:2005
DWORD RasterCaps
Definition: wined3d.h:1929
DWORD DevCaps2
Definition: wined3d.h:1984
struct wined3d_pixel_shader_caps PS20Caps
Definition: wined3d.h:1992
float MaxVertexW
Definition: wined3d.h:1949
float MaxPointSize
Definition: wined3d.h:1970
DWORD Caps2
Definition: wined3d.h:1923
DWORD MaxPrimitiveCount
Definition: wined3d.h:1972
DWORD VertexShaderVersion
Definition: wined3d.h:1977
enum wined3d_device_type DeviceType
Definition: wined3d.h:1920
DWORD MaxTextureWidth
Definition: wined3d.h:1943
DWORD LineCaps
Definition: wined3d.h:1941
DWORD MaxUserClipPlanes
Definition: wined3d.h:1966
DWORD VertexTextureFilterCaps
Definition: wined3d.h:1993
DWORD PixelShaderVersion
Definition: wined3d.h:1980
float GuardBandBottom
Definition: wined3d.h:1954
float GuardBandRight
Definition: wined3d.h:1953
DWORD MaxVertexIndex
Definition: wined3d.h:1973
DWORD CubeTextureFilterCaps
Definition: wined3d.h:1937
DWORD MaxTextureAspectRatio
Definition: wined3d.h:1947
DWORD MaxStreamStride
Definition: wined3d.h:1975
DWORD MaxSimultaneousTextures
Definition: wined3d.h:1962
DWORD MaxActiveLights
Definition: wined3d.h:1965
DWORD StencilCaps
Definition: wined3d.h:1957
DWORD SrcBlendCaps
Definition: wined3d.h:1931
DWORD DeclTypes
Definition: wined3d.h:1988
DWORD TextureFilterCaps
Definition: wined3d.h:1936
struct wined3d_ddraw_caps ddraw_caps
Definition: wined3d.h:1999
DWORD MaxVertexShaderConst
Definition: wined3d.h:1978
BOOL shader_double_precision
Definition: wined3d.h:2001
DWORD MaxVShaderInstructionsExecuted
Definition: wined3d.h:1994
uint32_t viewport_array_index_any_shader
enum wined3d_feature_level feature_level
uint32_t shader_double_precision
uint32_t unconditional_npot
#define WINED3DPS20_MAX_DYNAMICFLOWCONTROLDEPTH
Definition: wined3d.h:1122
#define WINED3DSTENCILCAPS_ZERO
Definition: wined3d.h:1145
#define WINED3DPMISCCAPS_MASKZ
Definition: wined3d.h:1102
#define WINED3DPMISCCAPS_CULLCW
Definition: wined3d.h:1105
#define WINED3DPSHADECAPS_FOGGOURAUD
Definition: wined3d.h:1244
#define WINED3DSTENCILCAPS_KEEP
Definition: wined3d.h:1144
#define WINEDDCAPS_BLTSTRETCH
Definition: wined3d.h:1509
#define WINED3DPTADDRESSCAPS_WRAP
Definition: wined3d.h:1137
#define WINED3DVS20_MIN_NUMTEMPS
Definition: wined3d.h:1184
#define WINED3DPRASTERCAPS_FOGVERTEX
Definition: wined3d.h:1206
#define WINEDDSCAPS_PRIMARYSURFACE
Definition: wined3d.h:1429
#define WINED3DPTEXTURECAPS_NONPOW2CONDITIONAL
Definition: wined3d.h:1255
#define WINED3DVS20_MAX_DYNAMICFLOWCONTROLDEPTH
Definition: wined3d.h:1181
#define WINED3DPBLENDCAPS_INVSRCALPHA
Definition: wined3d.h:1083
#define WINED3DPRASTERCAPS_FOGTABLE
Definition: wined3d.h:1207
#define WINEDDCAPS_COLORKEY
Definition: wined3d.h:1522
#define WINED3DPS20_MIN_NUMTEMPS
Definition: wined3d.h:1125
#define WINED3DPCMPCAPS_LESSEQUAL
Definition: wined3d.h:1096
#define WINED3DPBLENDCAPS_INVDESTCOLOR
Definition: wined3d.h:1087
#define WINED3DDEVCAPS_TEXTURESYSTEMMEMORY
Definition: wined3d.h:1305
#define WINED3DDEVCAPS_TEXTUREVIDEOMEMORY
Definition: wined3d.h:1306
#define WINED3DDEVCAPS_DRAWPRIMITIVES2
Definition: wined3d.h:1310
#define WINED3DPCMPCAPS_NEVER
Definition: wined3d.h:1093
#define WINED3DCAPS2_DYNAMICTEXTURES
Definition: wined3d.h:1196
#define WINED3DPRASTERCAPS_WFOG
Definition: wined3d.h:1217
#define WINED3DDEVCAPS_PUREDEVICE
Definition: wined3d.h:1316
#define WINED3DPSHADECAPS_COLORFLATRGB
Definition: wined3d.h:1226
#define WINED3DPMISCCAPS_MRTPOSTPIXELSHADERBLENDING
Definition: wined3d.h:1118
#define WINEDDCKEYCAPS_DESTBLT
Definition: wined3d.h:1451
#define WINEDDSCAPS_ZBUFFER
Definition: wined3d.h:1437
#define WINED3DPTFILTERCAPS_LINEARMIPNEAREST
Definition: wined3d.h:1271
#define WINED3DVS20CAPS_PREDICATION
Definition: wined3d.h:1188
#define WINEDDFXCAPS_BLTROTATION90
Definition: wined3d.h:1478
#define WINED3DPS20_MAX_NUMINSTRUCTIONSLOTS
Definition: wined3d.h:1128
#define WINED3DPS20_MAX_STATICFLOWCONTROLDEPTH
Definition: wined3d.h:1126
#define WINED3DPTFILTERCAPS_MAGFLINEAR
Definition: wined3d.h:1279
#define WINED3DPTADDRESSCAPS_INDEPENDENTUV
Definition: wined3d.h:1141
#define WINED3DPTFILTERCAPS_MIPNEAREST
Definition: wined3d.h:1269
#define WINED3DLINECAPS_BLEND
Definition: wined3d.h:1070
#define WINED3DCAPS2_CANRENDERWINDOWED
Definition: wined3d.h:1192
#define WINED3DPBLENDCAPS_ZERO
Definition: wined3d.h:1078
#define WINED3DCAPS3_ALPHA_FULLSCREEN_FLIP_OR_DISCARD
Definition: wined3d.h:1039
#define WINED3DPTADDRESSCAPS_CLAMP
Definition: wined3d.h:1139
#define WINEDDFXCAPS_BLTSTRETCHX
Definition: wined3d.h:1483
#define WINED3DPBLENDCAPS_SRCALPHASAT
Definition: wined3d.h:1088
#define WINEDDFXCAPS_BLTSHRINKYN
Definition: wined3d.h:1482
#define WINED3DDEVCAPS_TLVERTEXSYSTEMMEMORY
Definition: wined3d.h:1303
#define WINED3DCAPS2_FULLSCREENGAMMA
Definition: wined3d.h:1191
#define WINED3DPSHADECAPS_ALPHAGOURAUDBLEND
Definition: wined3d.h:1239
#define WINED3DSTENCILCAPS_REPLACE
Definition: wined3d.h:1146
#define WINEDDSCAPS_OFFSCREENPLAIN
Definition: wined3d.h:1426
#define WINED3DSTENCILCAPS_INCRSAT
Definition: wined3d.h:1147
#define WINED3DPRASTERCAPS_ZTEST
Definition: wined3d.h:1203
#define WINED3DPTFILTERCAPS_MIPFLINEAR
Definition: wined3d.h:1277
#define WINED3DPTEXTURECAPS_ALPHA
Definition: wined3d.h:1249
#define WINED3DPMISCCAPS_CULLNONE
Definition: wined3d.h:1104
#define WINED3DPS20CAPS_PREDICATION
Definition: wined3d.h:1133
#define WINED3DPTEXTURECAPS_POW2
Definition: wined3d.h:1248
#define WINED3DDEVCAPS_DRAWPRIMTLVERTEX
Definition: wined3d.h:1307
#define WINED3DPS20_MIN_STATICFLOWCONTROLDEPTH
Definition: wined3d.h:1127
#define WINEDDFXCAPS_BLTSTRETCHYN
Definition: wined3d.h:1486
#define WINEDDCAPS_GDI
Definition: wined3d.h:1510
#define WINED3DLINECAPS_ZTEST
Definition: wined3d.h:1069
#define WINED3DPTEXTURECAPS_BORDER
Definition: wined3d.h:1251
#define WINED3DPMISCCAPS_CULLCCW
Definition: wined3d.h:1106
#define WINED3DDTCAPS_SHORT4N
Definition: wined3d.h:1056
#define WINED3DVS20_MIN_DYNAMICFLOWCONTROLDEPTH
Definition: wined3d.h:1182
#define WINEDDSCAPS_PALETTE
Definition: wined3d.h:1428
#define WINEDDCAPS_BLTDEPTHFILL
Definition: wined3d.h:1528
#define WINEDDCAPS_CANCLIP
Definition: wined3d.h:1529
#define WINED3DLINECAPS_FOG
Definition: wined3d.h:1072
#define WINED3DPSHADECAPS_SPECULARFLATRGB
Definition: wined3d.h:1232
#define WINED3DPRASTERCAPS_ZFOG
Definition: wined3d.h:1218
#define WINED3DSTENCILCAPS_DECRSAT
Definition: wined3d.h:1148
#define WINEDDCAPS_COLORKEYHWASSIST
Definition: wined3d.h:1524
#define WINED3DPBLENDCAPS_SRCCOLOR
Definition: wined3d.h:1080
#define WINED3DDEVCAPS_FLOATTLVERTEX
Definition: wined3d.h:1297
#define WINEDDCAPS_BLTCOLORFILL
Definition: wined3d.h:1526
#define WINED3DPRASTERCAPS_SUBPIXEL
Definition: wined3d.h:1204
#define WINED3DDEVCAPS_EXECUTESYSTEMMEMORY
Definition: wined3d.h:1301
#define WINED3DPTEXTURECAPS_TRANSPARENCY
Definition: wined3d.h:1250
#define WINED3DPRASTERCAPS_STIPPLE
Definition: wined3d.h:1208
#define WINED3DPS20CAPS_ARBITRARYSWIZZLE
Definition: wined3d.h:1131
#define WINED3DPCMPCAPS_LESS
Definition: wined3d.h:1094
#define WINED3DPSHADECAPS_SPECULARGOURAUDRGB
Definition: wined3d.h:1234
#define WINED3DPSHADECAPS_COLORGOURAUDRGB
Definition: wined3d.h:1228
#define WINED3DPTFILTERCAPS_LINEARMIPLINEAR
Definition: wined3d.h:1272
#define WINEDDSCAPS_TEXTURE
Definition: wined3d.h:1432
#define WINEDDCAPS2_CERTIFIED
Definition: wined3d.h:1533
#define WINED3DPTEXTURECAPS_MIPMAP
Definition: wined3d.h:1260
#define WINED3DPBLENDCAPS_DESTCOLOR
Definition: wined3d.h:1086
#define WINEDDCAPS2_NOPAGELOCKREQUIRED
Definition: wined3d.h:1544
#define WINED3DDEVCAPS_HWRASTERIZATION
Definition: wined3d.h:1315
#define WINEDDFXCAPS_BLTSHRINKXN
Definition: wined3d.h:1480
#define WINED3DPRASTERCAPS_PAT
Definition: wined3d.h:1202
#define WINEDDFXCAPS_BLTMIRRORUPDOWN
Definition: wined3d.h:1476
#define WINEDDFXCAPS_BLTSTRETCHXN
Definition: wined3d.h:1484
#define WINED3DPSHADECAPS_ALPHAFLATBLEND
Definition: wined3d.h:1237
#define WINED3DPBLENDCAPS_ONE
Definition: wined3d.h:1079
#define WINED3DCAPS3_COPY_TO_VIDMEM
Definition: wined3d.h:1041
#define WINED3DPTFILTERCAPS_NEAREST
Definition: wined3d.h:1267
#define WINEDDCAPS_PALETTE
Definition: wined3d.h:1515
#define WINED3DPRASTERCAPS_DEPTHBIAS
Definition: wined3d.h:1222
#define WINEDDCAPS_CANBLTSYSMEM
Definition: wined3d.h:1531
#define WINEDDSCAPS_FLIP
Definition: wined3d.h:1424
#define WINED3DPTFILTERCAPS_MAGFPOINT
Definition: wined3d.h:1278
#define WINEDDCAPS_CANCLIPSTRETCHED
Definition: wined3d.h:1530
#define WINED3DMIN30SHADERINSTRUCTIONS
Definition: wined3d.h:1076
#define WINED3DDEVCAPS_CANRENDERAFTERFLIP
Definition: wined3d.h:1308
#define WINED3DPRASTERCAPS_SLOPESCALEDEPTHBIAS
Definition: wined3d.h:1221
#define WINED3DPTFILTERCAPS_LINEAR
Definition: wined3d.h:1268
#define WINED3DPS20CAPS_GRADIENTINSTRUCTIONS
Definition: wined3d.h:1132
#define WINED3DPRASTERCAPS_DITHER
Definition: wined3d.h:1199
#define WINED3DPTEXTURECAPS_PERSPECTIVE
Definition: wined3d.h:1247
#define WINED3DCURSORCAPS_COLOR
Definition: wined3d.h:1294
#define WINEDDFXCAPS_BLTSHRINKX
Definition: wined3d.h:1479
#define WINED3DDTCAPS_UBYTE4N
Definition: wined3d.h:1054
#define WINED3DPBLENDCAPS_BOTHINVSRCALPHA
Definition: wined3d.h:1090
#define WINED3DPS20CAPS_NOTEXINSTRUCTIONLIMIT
Definition: wined3d.h:1135
#define WINED3DCURSORCAPS_LOWRES
Definition: wined3d.h:1295
#define WINED3DPS20_MIN_NUMINSTRUCTIONSLOTS
Definition: wined3d.h:1129
#define WINED3DSTENCILCAPS_INVERT
Definition: wined3d.h:1149
#define WINED3DPTFILTERCAPS_MIPLINEAR
Definition: wined3d.h:1270
#define WINEDDCAPS2_CANRENDERWINDOWED
Definition: wined3d.h:1550
#define WINED3DPMISCCAPS_CLIPPLANESCALEDPOINTS
Definition: wined3d.h:1108
#define WINED3DPTEXTURECAPS_PROJECTED
Definition: wined3d.h:1256
#define WINED3DPCMPCAPS_GREATEREQUAL
Definition: wined3d.h:1099
#define WINED3DDTCAPS_SHORT2N
Definition: wined3d.h:1055
#define WINED3DPTFILTERCAPS_MINFPOINT
Definition: wined3d.h:1273
#define WINED3DPBLENDCAPS_INVSRCCOLOR
Definition: wined3d.h:1081
#define WINEDDCAPS2_PRIMARYGAMMA
Definition: wined3d.h:1549
#define WINED3DPCMPCAPS_EQUAL
Definition: wined3d.h:1095
#define WINED3DPMISCCAPS_COLORWRITEENABLE
Definition: wined3d.h:1107
#define WINEDDFXCAPS_BLTSHRINKY
Definition: wined3d.h:1481
#define WINED3DPCMPCAPS_NOTEQUAL
Definition: wined3d.h:1098
#define WINED3DLINECAPS_TEXTURE
Definition: wined3d.h:1068
#define WINED3DPBLENDCAPS_SRCALPHA
Definition: wined3d.h:1082
#define WINED3DDEVCAPS2_STREAMOFFSET
Definition: wined3d.h:1045
#define WINED3DDEVCAPS_DRAWPRIMITIVES2EX
Definition: wined3d.h:1312
#define WINEDDFXCAPS_BLTSTRETCHY
Definition: wined3d.h:1485
#define WINED3DPBLENDCAPS_DESTALPHA
Definition: wined3d.h:1084
#define WINED3DPRASTERCAPS_SCISSORTEST
Definition: wined3d.h:1220
#define WINED3DPTFILTERCAPS_MIPFPOINT
Definition: wined3d.h:1276
#define WINED3DCAPS3_COPY_TO_SYSTEMMEM
Definition: wined3d.h:1042
#define WINED3DPS20CAPS_NODEPENDENTREADLIMIT
Definition: wined3d.h:1134
#define WINED3DPCMPCAPS_GREATER
Definition: wined3d.h:1097
#define WINEDDCKEYCAPS_SRCBLT
Definition: wined3d.h:1460
#define WINEDDFXCAPS_BLTALPHA
Definition: wined3d.h:1471
#define WINED3DPBLENDCAPS_INVDESTALPHA
Definition: wined3d.h:1085
#define WINEDDCAPS2_WIDESURFACES
Definition: wined3d.h:1545
#define WINED3DPTFILTERCAPS_MINFLINEAR
Definition: wined3d.h:1274
#define WINED3DPTEXTURECAPS_ALPHAPALETTE
Definition: wined3d.h:1254
#define WINED3DPBLENDCAPS_BOTHSRCALPHA
Definition: wined3d.h:1089
#define WINEDDSCAPS_MIPMAP
Definition: wined3d.h:1442
#define WINEDDCAPS_BLT
Definition: wined3d.h:1506
#define WINED3DDEVCAPS_EXECUTEVIDEOMEMORY
Definition: wined3d.h:1302
#define WINEDDFXCAPS_BLTMIRRORLEFTRIGHT
Definition: wined3d.h:1475
#define WINED3DPMISCCAPS_CLIPTLVERTS
Definition: wined3d.h:1109
#define WINED3DDTCAPS_UBYTE4
Definition: wined3d.h:1053
#define WINED3DVS20_MAX_STATICFLOWCONTROLDEPTH
Definition: wined3d.h:1185
#define WINED3DDEVCAPS_TLVERTEXVIDEOMEMORY
Definition: wined3d.h:1304
#define WINED3DDEVCAPS_HWTRANSFORMANDLIGHT
Definition: wined3d.h:1313
#define WINED3DLINECAPS_ALPHACMP
Definition: wined3d.h:1071
#define WINED3DPSHADECAPS_FOGFLAT
Definition: wined3d.h:1243
#define WINED3DPCMPCAPS_ALWAYS
Definition: wined3d.h:1100
#define WINED3DDEVCAPS2_VERTEXELEMENTSCANSHARESTREAMOFFSET
Definition: wined3d.h:1051

Referenced by d3d8_GetDeviceCaps(), d3d9_GetDeviceCaps(), ddraw_get_d3dcaps(), ddraw_init(), device_init(), dxgi_adapter_CheckInterfaceSupport(), and wined3d_device_get_device_caps().

◆ wined3d_get_renderer()

enum wined3d_renderer __cdecl wined3d_get_renderer ( void  )

Definition at line 134 of file wined3d_main.c.

◆ wined3d_incref()

ULONG __cdecl wined3d_incref ( struct wined3d *  wined3d)

Definition at line 189 of file directx.c.

190{
191 unsigned int refcount = InterlockedIncrement(&wined3d->ref);
192
193 TRACE("%p increasing refcount to %u.\n", wined3d, refcount);
194
195 return refcount;
196}

Referenced by wined3d_device_init().

◆ wined3d_log2i()

static unsigned int wined3d_log2i ( unsigned int  x)
inlinestatic

Definition at line 2952 of file wined3d.h.

2953{
2954#if defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)))
2955 return __builtin_clz(x) ^ 0x1f;
2956#else
2957 static const unsigned int l[] =
2958 {
2959 ~0u, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3,
2960 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
2961 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
2962 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
2963 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
2964 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
2965 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
2966 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
2967 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
2968 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
2969 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
2970 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
2971 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
2972 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
2973 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
2974 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
2975 };
2976 unsigned int i;
2977
2978 return (i = x >> 16) ? (x = i >> 8) ? l[x] + 24 : l[i] + 16 : (i = x >> 8) ? l[i] + 8 : l[x];
2979#endif
2980}
r l[0]
Definition: byte_order.h:168

Referenced by d3d8_texture_init(), d3d9_texture_init(), d3d_texture1d_create(), d3d_texture2d_create(), d3d_texture3d_init(), ddraw_surface_create(), query_internal_format(), shader_find_free_input_register(), shader_glsl_alloc(), shader_glsl_generate_vertex_shader(), wined3d_adapter_vk_init_d3d_info(), and wined3d_allocator_allocate().

◆ wined3d_mutex_lock()

void __stdcall wined3d_mutex_lock ( void  )

Definition at line 539 of file wined3d_main.c.

540{
542}
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)

Referenced by CF_CreateDirectDraw(), CF_CreateDirectDrawClipper(), d3d10_device_get_constant_buffers(), d3d10_device_GetPredication(), d3d10_device_GSGetSamplers(), d3d10_device_GSGetShader(), d3d10_device_GSGetShaderResources(), d3d10_device_IAGetIndexBuffer(), d3d10_device_IAGetInputLayout(), d3d10_device_IAGetPrimitiveTopology(), d3d10_device_IAGetVertexBuffers(), d3d10_device_OMGetRenderTargets(), d3d10_device_PSGetSamplers(), d3d10_device_PSGetShader(), d3d10_device_PSGetShaderResources(), d3d10_device_RSGetScissorRects(), d3d10_device_RSGetState(), d3d10_device_RSGetViewports(), d3d10_device_SOGetTargets(), d3d10_device_VSGetSamplers(), d3d10_device_VSGetShader(), d3d10_device_VSGetShaderResources(), d3d10_multithread_Enter(), d3d10_query_GetData(), d3d10_query_GetDataSize(), d3d11_compute_shader_init(), d3d11_device_CheckFeatureSupport(), d3d11_device_CheckFormatSupport(), d3d11_device_CheckMultisampleQualityLevels(), d3d11_device_context_CSGetSamplers(), d3d11_device_context_CSGetShader(), d3d11_device_context_CSGetShaderResources(), d3d11_device_context_CSGetUnorderedAccessViews(), d3d11_device_context_DSGetSamplers(), d3d11_device_context_DSGetShader(), d3d11_device_context_DSGetShaderResources(), d3d11_device_context_get_constant_buffers(), d3d11_device_context_GetData(), d3d11_device_context_GetPredication(), d3d11_device_context_GSGetSamplers(), d3d11_device_context_GSGetShader(), d3d11_device_context_GSGetShaderResources(), d3d11_device_context_HSGetSamplers(), d3d11_device_context_HSGetShader(), d3d11_device_context_HSGetShaderResources(), d3d11_device_context_IAGetIndexBuffer(), d3d11_device_context_IAGetInputLayout(), d3d11_device_context_IAGetPrimitiveTopology(), d3d11_device_context_IAGetVertexBuffers(), d3d11_device_context_OMGetBlendState(), d3d11_device_context_OMGetDepthStencilState(), d3d11_device_context_OMGetRenderTargets(), d3d11_device_context_OMGetRenderTargetsAndUnorderedAccessViews(), d3d11_device_context_PSGetSamplers(), d3d11_device_context_PSGetShader(), d3d11_device_context_PSGetShaderResources(), d3d11_device_context_RSGetScissorRects(), d3d11_device_context_RSGetState(), d3d11_device_context_RSGetViewports(), d3d11_device_context_SOGetTargets(), d3d11_device_context_SwapDeviceContextState(), d3d11_device_context_VSGetSamplers(), d3d11_device_context_VSGetShader(), d3d11_device_context_VSGetShaderResources(), d3d11_device_CreateDeviceContextState(), d3d11_domain_shader_init(), d3d11_hull_shader_init(), d3d11_multithread_Enter(), d3d11_query_GetDataSize(), d3d11_swapchain_get_hwnd(), d3d11_swapchain_GetBuffer(), d3d11_swapchain_GetDesc(), d3d11_swapchain_GetDesc1(), d3d11_swapchain_GetFullscreenDesc(), d3d11_swapchain_GetFullscreenState(), d3d11_swapchain_init(), d3d11_swapchain_ResizeBuffers(), d3d11_swapchain_SetFullscreenState(), d3d11_texture2d_GetDesc(), d3d11_unordered_access_view_init(), d3d12_swapchain_GetDesc(), d3d12_swapchain_GetFullscreenDesc(), d3d12_swapchain_GetFullscreenState(), d3d12_swapchain_SetFullscreenState(), d3d2_CreateDevice(), d3d3_CreateDevice(), d3d3_EnumDevices(), d3d7_CreateDevice(), d3d7_EnumDevices(), d3d7_EnumZBufferFormats(), d3d7_EvictManagedTextures(), d3d8_CheckDepthStencilMatch(), d3d8_CheckDeviceFormat(), d3d8_CheckDeviceMultiSampleType(), d3d8_CheckDeviceType(), d3d8_device_ApplyStateBlock(), d3d8_device_BeginScene(), d3d8_device_BeginStateBlock(), d3d8_device_CaptureStateBlock(), d3d8_device_Clear(), d3d8_device_CopyRects(), d3d8_device_create_surface(), d3d8_device_CreateAdditionalSwapChain(), d3d8_device_CreatePixelShader(), d3d8_device_CreateStateBlock(), d3d8_device_CreateVertexShader(), d3d8_device_DeletePixelShader(), d3d8_device_DeleteStateBlock(), d3d8_device_DeleteVertexShader(), d3d8_device_DrawIndexedPrimitive(), d3d8_device_DrawIndexedPrimitiveUP(), d3d8_device_DrawPrimitive(), d3d8_device_DrawPrimitiveUP(), d3d8_device_EndScene(), d3d8_device_EndStateBlock(), d3d8_device_GetAvailableTextureMem(), d3d8_device_GetBackBuffer(), d3d8_device_GetClipPlane(), d3d8_device_GetClipStatus(), d3d8_device_GetCreationParameters(), d3d8_device_GetDepthStencilSurface(), d3d8_device_GetDeviceCaps(), d3d8_device_GetDisplayMode(), d3d8_device_GetFrontBuffer(), d3d8_device_GetGammaRamp(), d3d8_device_GetIndices(), d3d8_device_GetLight(), d3d8_device_GetLightEnable(), d3d8_device_GetMaterial(), d3d8_device_GetPixelShader(), d3d8_device_GetPixelShaderConstant(), d3d8_device_GetPixelShaderFunction(), d3d8_device_GetRasterStatus(), d3d8_device_GetRenderState(), d3d8_device_GetRenderTarget(), d3d8_device_GetStreamSource(), d3d8_device_GetTexture(), d3d8_device_GetTextureStageState(), d3d8_device_GetTransform(), d3d8_device_GetVertexShader(), d3d8_device_GetVertexShaderConstant(), d3d8_device_GetVertexShaderDeclaration(), d3d8_device_GetVertexShaderFunction(), d3d8_device_GetViewport(), d3d8_device_LightEnable(), d3d8_device_MultiplyTransform(), d3d8_device_ProcessVertices(), d3d8_device_Release(), d3d8_device_Reset(), d3d8_device_ResourceManagerDiscardBytes(), d3d8_device_SetClipPlane(), d3d8_device_SetClipStatus(), d3d8_device_SetCursorPosition(), d3d8_device_SetCursorProperties(), d3d8_device_SetGammaRamp(), d3d8_device_SetIndices(), d3d8_device_SetLight(), d3d8_device_SetMaterial(), d3d8_device_SetPixelShader(), d3d8_device_SetPixelShaderConstant(), d3d8_device_SetRenderState(), d3d8_device_SetRenderTarget(), d3d8_device_SetStreamSource(), d3d8_device_SetTexture(), d3d8_device_SetTextureStageState(), d3d8_device_SetTransform(), d3d8_device_SetVertexShader(), d3d8_device_SetVertexShaderConstant(), d3d8_device_SetViewport(), d3d8_device_ShowCursor(), d3d8_device_UpdateTexture(), d3d8_device_ValidateDevice(), d3d8_EnumAdapterModes(), d3d8_GetAdapterDisplayMode(), d3d8_GetAdapterModeCount(), d3d8_GetAdapterMonitor(), d3d8_GetDeviceCaps(), d3d8_indexbuffer_GetDesc(), d3d8_indexbuffer_GetPriority(), d3d8_indexbuffer_PreLoad(), d3d8_indexbuffer_SetPriority(), d3d8_init(), d3d8_pixel_shader_destroy(), d3d8_pixel_shader_init(), d3d8_RegisterSoftwareDevice(), d3d8_Release(), d3d8_resource_free_private_data(), d3d8_resource_get_private_data(), d3d8_resource_set_private_data(), d3d8_surface_GetDesc(), d3d8_surface_LockRect(), d3d8_swapchain_GetBackBuffer(), d3d8_texture_2d_AddDirtyRect(), d3d8_texture_2d_GetLevelCount(), d3d8_texture_2d_GetLevelDesc(), d3d8_texture_2d_GetLOD(), d3d8_texture_2d_GetPriority(), d3d8_texture_2d_GetSurfaceLevel(), d3d8_texture_2d_LockRect(), d3d8_texture_2d_SetLOD(), d3d8_texture_2d_SetPriority(), d3d8_texture_2d_UnlockRect(), d3d8_texture_3d_AddDirtyBox(), d3d8_texture_3d_GetLevelCount(), d3d8_texture_3d_GetLevelDesc(), d3d8_texture_3d_GetLOD(), d3d8_texture_3d_GetPriority(), d3d8_texture_3d_GetVolumeLevel(), d3d8_texture_3d_LockBox(), d3d8_texture_3d_SetLOD(), d3d8_texture_3d_SetPriority(), d3d8_texture_3d_UnlockBox(), d3d8_texture_cube_AddDirtyRect(), d3d8_texture_cube_GetCubeMapSurface(), d3d8_texture_cube_GetLevelCount(), d3d8_texture_cube_GetLevelDesc(), d3d8_texture_cube_GetLOD(), d3d8_texture_cube_GetPriority(), d3d8_texture_cube_LockRect(), d3d8_texture_cube_SetLOD(), d3d8_texture_cube_SetPriority(), d3d8_texture_cube_UnlockRect(), d3d8_texture_decref(), d3d8_texture_incref(), d3d8_texture_init(), d3d8_texture_preload(), d3d8_vertex_declaration_init(), d3d8_vertex_shader_destroy(), d3d8_vertex_shader_init(), d3d8_vertexbuffer_GetDesc(), d3d8_vertexbuffer_GetPriority(), d3d8_vertexbuffer_PreLoad(), d3d8_vertexbuffer_SetPriority(), d3d8_volume_GetDesc(), d3d9_caps_from_wined3dcaps(), d3d9_CheckDepthStencilMatch(), d3d9_CheckDeviceFormat(), d3d9_CheckDeviceFormatConversion(), d3d9_CheckDeviceMultiSampleType(), d3d9_CheckDeviceType(), d3d9_device_BeginScene(), d3d9_device_BeginStateBlock(), d3d9_device_CheckDeviceState(), d3d9_device_Clear(), d3d9_device_ColorFill(), d3d9_device_create_surface(), d3d9_device_CreateAdditionalSwapChain(), d3d9_device_CreateStateBlock(), d3d9_device_CreateTexture(), d3d9_device_DrawIndexedPrimitive(), d3d9_device_DrawIndexedPrimitiveUP(), d3d9_device_DrawPrimitive(), d3d9_device_DrawPrimitiveUP(), d3d9_device_EndScene(), d3d9_device_EndStateBlock(), d3d9_device_EvictManagedResources(), d3d9_device_GetAvailableTextureMem(), d3d9_device_GetBackBuffer(), d3d9_device_GetClipPlane(), d3d9_device_GetClipStatus(), d3d9_device_GetCreationParameters(), d3d9_device_GetDepthStencilSurface(), d3d9_device_GetDeviceCaps(), d3d9_device_GetDisplayMode(), d3d9_device_GetDisplayModeEx(), d3d9_device_GetFrontBufferData(), d3d9_device_GetFVF(), d3d9_device_GetGammaRamp(), d3d9_device_GetIndices(), d3d9_device_GetLight(), d3d9_device_GetLightEnable(), d3d9_device_GetMaterial(), d3d9_device_GetMaximumFrameLatency(), d3d9_device_GetNPatchMode(), d3d9_device_GetNumberOfSwapChains(), d3d9_device_GetPixelShader(), d3d9_device_GetPixelShaderConstantB(), d3d9_device_GetPixelShaderConstantF(), d3d9_device_GetPixelShaderConstantI(), d3d9_device_GetRasterStatus(), d3d9_device_GetRenderState(), d3d9_device_GetRenderTarget(), d3d9_device_GetRenderTargetData(), d3d9_device_GetSamplerState(), d3d9_device_GetScissorRect(), d3d9_device_GetSoftwareVertexProcessing(), d3d9_device_GetStreamSource(), d3d9_device_GetStreamSourceFreq(), d3d9_device_GetSwapChain(), d3d9_device_GetTexture(), d3d9_device_GetTextureStageState(), d3d9_device_GetTransform(), d3d9_device_GetVertexDeclaration(), d3d9_device_GetVertexShader(), d3d9_device_GetVertexShaderConstantB(), d3d9_device_GetVertexShaderConstantF(), d3d9_device_GetVertexShaderConstantI(), d3d9_device_GetViewport(), d3d9_device_LightEnable(), d3d9_device_MultiplyTransform(), d3d9_device_Present(), d3d9_device_PresentEx(), d3d9_device_ProcessVertices(), d3d9_device_Release(), d3d9_device_reset(), d3d9_device_SetClipPlane(), d3d9_device_SetClipStatus(), d3d9_device_SetCursorPosition(), d3d9_device_SetCursorProperties(), d3d9_device_SetDepthStencilSurface(), d3d9_device_SetDialogBoxMode(), d3d9_device_SetFVF(), d3d9_device_SetGammaRamp(), d3d9_device_SetIndices(), d3d9_device_SetLight(), d3d9_device_SetMaterial(), d3d9_device_SetMaximumFrameLatency(), d3d9_device_SetNPatchMode(), d3d9_device_SetPixelShader(), d3d9_device_SetPixelShaderConstantB(), d3d9_device_SetPixelShaderConstantF(), d3d9_device_SetPixelShaderConstantI(), d3d9_device_SetRenderState(), d3d9_device_SetRenderTarget(), d3d9_device_SetSamplerState(), d3d9_device_SetScissorRect(), d3d9_device_SetSoftwareVertexProcessing(), d3d9_device_SetStreamSource(), d3d9_device_SetStreamSourceFreq(), d3d9_device_SetTexture(), d3d9_device_SetTextureStageState(), d3d9_device_SetTransform(), d3d9_device_SetVertexDeclaration(), d3d9_device_SetVertexShader(), d3d9_device_SetVertexShaderConstantB(), d3d9_device_SetVertexShaderConstantF(), d3d9_device_SetVertexShaderConstantI(), d3d9_device_SetViewport(), d3d9_device_ShowCursor(), d3d9_device_StretchRect(), d3d9_device_UpdateSurface(), d3d9_device_UpdateTexture(), d3d9_device_ValidateDevice(), d3d9_EnumAdapterModes(), d3d9_EnumAdapterModesEx(), d3d9_GetAdapterDisplayMode(), d3d9_GetAdapterDisplayModeEx(), d3d9_GetAdapterIdentifier(), d3d9_GetAdapterModeCount(), d3d9_GetAdapterModeCountEx(), d3d9_GetAdapterMonitor(), d3d9_GetDeviceCaps(), d3d9_indexbuffer_GetDesc(), d3d9_indexbuffer_GetPriority(), d3d9_indexbuffer_PreLoad(), d3d9_indexbuffer_SetPriority(), d3d9_init(), d3d9_pixelshader_GetFunction(), d3d9_query_GetData(), d3d9_query_GetType(), d3d9_RegisterSoftwareDevice(), d3d9_resource_free_private_data(), d3d9_resource_get_private_data(), d3d9_resource_set_private_data(), d3d9_stateblock_Apply(), d3d9_stateblock_Capture(), d3d9_surface_GetDC(), d3d9_surface_GetDesc(), d3d9_surface_PreLoad(), d3d9_surface_ReleaseDC(), d3d9_surface_UnlockRect(), d3d9_swapchain_GetBackBuffer(), d3d9_swapchain_GetDisplayMode(), d3d9_swapchain_GetDisplayModeEx(), d3d9_swapchain_GetFrontBufferData(), d3d9_swapchain_GetPresentParameters(), d3d9_swapchain_GetRasterStatus(), d3d9_texture_2d_AddDirtyRect(), d3d9_texture_2d_GenerateMipSubLevels(), d3d9_texture_2d_GetLevelCount(), d3d9_texture_2d_GetLevelDesc(), d3d9_texture_2d_GetLOD(), d3d9_texture_2d_GetPriority(), d3d9_texture_2d_GetSurfaceLevel(), d3d9_texture_2d_LockRect(), d3d9_texture_2d_SetLOD(), d3d9_texture_2d_SetPriority(), d3d9_texture_2d_UnlockRect(), d3d9_texture_3d_AddDirtyBox(), d3d9_texture_3d_GetLevelCount(), d3d9_texture_3d_GetLevelDesc(), d3d9_texture_3d_GetLOD(), d3d9_texture_3d_GetPriority(), d3d9_texture_3d_GetVolumeLevel(), d3d9_texture_3d_LockBox(), d3d9_texture_3d_SetLOD(), d3d9_texture_3d_SetPriority(), d3d9_texture_3d_UnlockBox(), d3d9_texture_cube_AddDirtyRect(), d3d9_texture_cube_GenerateMipSubLevels(), d3d9_texture_cube_GetCubeMapSurface(), d3d9_texture_cube_GetLevelCount(), d3d9_texture_cube_GetLevelDesc(), d3d9_texture_cube_GetLOD(), d3d9_texture_cube_GetPriority(), d3d9_texture_cube_LockRect(), d3d9_texture_cube_SetLOD(), d3d9_texture_cube_SetPriority(), d3d9_texture_cube_UnlockRect(), d3d9_texture_decref(), d3d9_texture_incref(), d3d9_texture_init(), d3d9_texture_preload(), d3d9_vertexbuffer_GetDesc(), d3d9_vertexbuffer_GetPriority(), d3d9_vertexbuffer_PreLoad(), d3d9_vertexbuffer_SetPriority(), d3d9_vertexshader_GetFunction(), d3d9_volume_GetDesc(), d3d_blend_state_create(), d3d_buffer_init(), d3d_depthstencil_state_create(), d3d_depthstencil_view_init(), d3d_device1_CreateMatrix(), d3d_device1_DeleteMatrix(), d3d_device1_Execute(), d3d_device1_GetMatrix(), d3d_device1_SetMatrix(), d3d_device2_EnumTextureFormats(), d3d_device2_SetRenderTarget(), d3d_device2_SwapTextureHandles(), d3d_device3_AddViewport(), d3d_device3_Begin(), d3d_device3_DeleteViewport(), d3d_device3_GetCurrentViewport(), d3d_device3_GetLightState(), d3d_device3_GetRenderState(), d3d_device3_GetTransform(), d3d_device3_MultiplyTransform(), d3d_device3_NextViewport(), d3d_device3_SetCurrentViewport(), d3d_device3_SetLightState(), d3d_device3_SetRenderState(), d3d_device3_SetRenderTarget(), d3d_device3_SetTexture(), d3d_device3_SetTransform(), d3d_device3_Vertex(), d3d_device7_ApplyStateBlock(), d3d_device7_BeginScene(), d3d_device7_BeginStateBlock(), d3d_device7_CaptureStateBlock(), d3d_device7_Clear(), d3d_device7_CreateStateBlock(), d3d_device7_DeleteStateBlock(), d3d_device7_DrawIndexedPrimitive(), d3d_device7_DrawIndexedPrimitiveStrided(), d3d_device7_DrawIndexedPrimitiveVB(), d3d_device7_DrawPrimitive(), d3d_device7_DrawPrimitiveStrided(), d3d_device7_DrawPrimitiveVB(), d3d_device7_EndScene(), d3d_device7_EndStateBlock(), d3d_device7_EnumTextureFormats(), d3d_device7_GetClipPlane(), d3d_device7_GetLight(), d3d_device7_GetLightEnable(), d3d_device7_GetMaterial(), d3d_device7_GetRenderState(), d3d_device7_GetRenderTarget(), d3d_device7_GetTexture(), d3d_device7_GetTextureStageState(), d3d_device7_GetTransform(), d3d_device7_GetViewport(), d3d_device7_LightEnable(), d3d_device7_Load(), d3d_device7_MultiplyTransform(), d3d_device7_PreLoad(), d3d_device7_SetClipPlane(), d3d_device7_SetLight(), d3d_device7_SetMaterial(), d3d_device7_SetRenderState(), d3d_device7_SetRenderTarget(), d3d_device7_SetTexture(), d3d_device7_SetTextureStageState(), d3d_device7_SetTransform(), d3d_device7_SetViewport(), d3d_device7_ValidateDevice(), d3d_device_inner_Release(), d3d_geometry_shader_init(), d3d_get_private_data(), d3d_input_layout_init(), d3d_light_GetLight(), d3d_light_SetLight(), d3d_material3_GetHandle(), d3d_material3_GetMaterial(), d3d_material3_Release(), d3d_material3_SetMaterial(), d3d_pixel_shader_init(), d3d_query_init(), d3d_rasterizer_state_create(), d3d_rendertarget_view_init(), d3d_sampler_state_create(), d3d_set_private_data(), d3d_set_private_data_interface(), d3d_shader_resource_view_init(), d3d_texture1d_create(), d3d_texture2_GetHandle(), d3d_texture2_Load(), d3d_texture2d_create(), d3d_texture3d_init(), d3d_vertex_buffer7_GetVertexBufferDesc(), d3d_vertex_buffer7_Lock(), d3d_vertex_buffer7_Optimize(), d3d_vertex_buffer7_ProcessVertices(), d3d_vertex_buffer7_Release(), d3d_vertex_buffer_create(), d3d_vertex_shader_init(), d3d_video_decoder_output_view_init(), d3d_viewport_AddLight(), d3d_viewport_Clear(), d3d_viewport_Clear2(), d3d_viewport_DeleteLight(), d3d_viewport_GetBackground(), d3d_viewport_GetViewport(), d3d_viewport_GetViewport2(), d3d_viewport_NextLight(), d3d_viewport_SetBackground(), d3d_viewport_SetViewport(), d3d_viewport_SetViewport2(), d3d_viewport_TransformVertices(), ddraw1_CreateSurface(), ddraw2_CreateSurface(), ddraw4_CreateSurface(), ddraw7_CreatePalette(), ddraw7_CreateSurface(), ddraw7_EnumDisplayModes(), ddraw7_EnumSurfaces(), ddraw7_FlipToGDISurface(), ddraw7_GetAvailableVidMem(), ddraw7_GetCaps(), ddraw7_GetDeviceIdentifier(), ddraw7_GetDisplayMode(), ddraw7_GetGDISurface(), ddraw7_GetMonitorFrequency(), ddraw7_GetScanLine(), ddraw7_GetSurfaceFromDC(), ddraw7_GetVerticalBlankStatus(), ddraw7_RestoreDisplayMode(), ddraw7_SetDisplayMode(), ddraw_clipper_GetClipList(), ddraw_clipper_GetHWnd(), ddraw_clipper_Initialize(), ddraw_clipper_SetClipList(), ddraw_clipper_SetHWnd(), ddraw_destroy(), ddraw_enumerate_secondary_devices(), ddraw_gamma_control_GetGammaRamp(), ddraw_gamma_control_SetGammaRamp(), ddraw_get_d3dcaps(), ddraw_palette_GetCaps(), ddraw_palette_GetEntries(), ddraw_palette_Release(), ddraw_palette_SetEntries(), ddraw_set_cooperative_level(), ddraw_surface1_Blt(), ddraw_surface1_Flip(), ddraw_surface1_Unlock(), ddraw_surface3_GetSurfaceDesc(), ddraw_surface7_BltFast(), ddraw_surface7_EnumAttachedSurfaces(), ddraw_surface7_FreePrivateData(), ddraw_surface7_GetAttachedSurface(), ddraw_surface7_GetClipper(), ddraw_surface7_GetColorKey(), ddraw_surface7_GetDC(), ddraw_surface7_GetLOD(), ddraw_surface7_GetOverlayPosition(), ddraw_surface7_GetPalette(), ddraw_surface7_GetPixelFormat(), ddraw_surface7_GetPriority(), ddraw_surface7_GetPrivateData(), ddraw_surface7_GetSurfaceDesc(), ddraw_surface7_QueryInterface(), ddraw_surface7_ReleaseDC(), ddraw_surface7_SetClipper(), ddraw_surface7_SetLOD(), ddraw_surface7_SetOverlayPosition(), ddraw_surface7_SetPriority(), ddraw_surface7_SetPrivateData(), ddraw_surface7_SetSurfaceDesc(), ddraw_surface7_UpdateOverlay(), ddraw_surface7_UpdateOverlayZOrder(), ddraw_surface_add_iface(), ddraw_surface_attach_surface(), ddraw_surface_delete_attached_surface(), ddraw_surface_release_iface(), ddraw_surface_set_color_key(), ddraw_surface_set_palette(), device_init(), DirectDrawCreate(), DirectDrawCreateClipper(), DirectDrawCreateEx(), dxgi_adapter_CheckInterfaceSupport(), dxgi_device_CreateSurface(), dxgi_device_GetMaximumFrameLatency(), dxgi_device_init(), dxgi_device_Release(), dxgi_device_SetMaximumFrameLatency(), dxgi_factory_EnumAdapters1(), dxgi_factory_get_device_window(), dxgi_factory_init(), dxgi_get_private_data(), dxgi_output_find_closest_matching_mode(), dxgi_output_get_display_mode_list(), dxgi_output_GetDesc(), dxgi_output_GetDesc1(), dxgi_output_ReleaseOwnership(), dxgi_output_SetGammaControl(), dxgi_output_TakeOwnership(), dxgi_set_private_data(), dxgi_set_private_data_interface(), dxgi_surface_GetDC(), dxgi_surface_GetDesc(), dxgi_surface_ReleaseDC(), DXGID3D10RegisterLayers(), get_layer(), GetSurfaceFromDC(), indexbuffer_init(), notification_thread_func(), pixelshader_init(), prepare_clip_space_planes(), query_init(), register_d3d10core_layers(), stateblock_init(), surface_lock(), vertexbuffer_init(), vertexdeclaration_init(), vertexshader_init(), wined3d_adapter_get_identifier(), wined3d_adapter_register_budget_change_notification(), wined3d_adapter_unregister_budget_change_notification(), wined3d_atomic_decrement_mutex_lock(), wined3d_buffer_decref(), wined3d_command_list_decref(), wined3d_cs_emit_present(), wined3d_decref(), wined3d_device_context_lock(), wined3d_device_decref(), wined3d_palette_decref(), wined3d_query_decref(), wined3d_rendertarget_view_decref(), wined3d_shader_decref(), wined3d_shader_resource_view_destroy(), wined3d_stateblock_decref(), wined3d_swapchain_create(), wined3d_swapchain_decref(), wined3d_swapchain_init(), wined3d_swapchain_present(), wined3d_swapchain_state_resize_target(), wined3d_texture_decref(), wined3d_unordered_access_view_decref(), and wined3d_vertex_declaration_decref().

◆ wined3d_mutex_unlock()

void __stdcall wined3d_mutex_unlock ( void  )

Definition at line 544 of file wined3d_main.c.

545{
547}
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)

Referenced by CF_CreateDirectDraw(), CF_CreateDirectDrawClipper(), d3d10_device_get_constant_buffers(), d3d10_device_GetPredication(), d3d10_device_GSGetSamplers(), d3d10_device_GSGetShader(), d3d10_device_GSGetShaderResources(), d3d10_device_IAGetIndexBuffer(), d3d10_device_IAGetInputLayout(), d3d10_device_IAGetPrimitiveTopology(), d3d10_device_IAGetVertexBuffers(), d3d10_device_OMGetRenderTargets(), d3d10_device_PSGetSamplers(), d3d10_device_PSGetShader(), d3d10_device_PSGetShaderResources(), d3d10_device_RSGetScissorRects(), d3d10_device_RSGetState(), d3d10_device_RSGetViewports(), d3d10_device_SOGetTargets(), d3d10_device_VSGetSamplers(), d3d10_device_VSGetShader(), d3d10_device_VSGetShaderResources(), d3d10_multithread_Leave(), d3d10_query_GetData(), d3d10_query_GetDataSize(), d3d11_compute_shader_init(), d3d11_device_CheckFeatureSupport(), d3d11_device_CheckFormatSupport(), d3d11_device_CheckMultisampleQualityLevels(), d3d11_device_context_CSGetSamplers(), d3d11_device_context_CSGetShader(), d3d11_device_context_CSGetShaderResources(), d3d11_device_context_CSGetUnorderedAccessViews(), d3d11_device_context_DSGetSamplers(), d3d11_device_context_DSGetShader(), d3d11_device_context_DSGetShaderResources(), d3d11_device_context_get_constant_buffers(), d3d11_device_context_GetData(), d3d11_device_context_GetPredication(), d3d11_device_context_GSGetSamplers(), d3d11_device_context_GSGetShader(), d3d11_device_context_GSGetShaderResources(), d3d11_device_context_HSGetSamplers(), d3d11_device_context_HSGetShader(), d3d11_device_context_HSGetShaderResources(), d3d11_device_context_IAGetIndexBuffer(), d3d11_device_context_IAGetInputLayout(), d3d11_device_context_IAGetPrimitiveTopology(), d3d11_device_context_IAGetVertexBuffers(), d3d11_device_context_OMGetBlendState(), d3d11_device_context_OMGetDepthStencilState(), d3d11_device_context_OMGetRenderTargets(), d3d11_device_context_OMGetRenderTargetsAndUnorderedAccessViews(), d3d11_device_context_PSGetSamplers(), d3d11_device_context_PSGetShader(), d3d11_device_context_PSGetShaderResources(), d3d11_device_context_RSGetScissorRects(), d3d11_device_context_RSGetState(), d3d11_device_context_RSGetViewports(), d3d11_device_context_SOGetTargets(), d3d11_device_context_SwapDeviceContextState(), d3d11_device_context_VSGetSamplers(), d3d11_device_context_VSGetShader(), d3d11_device_context_VSGetShaderResources(), d3d11_device_CreateDeviceContextState(), d3d11_domain_shader_init(), d3d11_hull_shader_init(), d3d11_multithread_Leave(), d3d11_query_GetDataSize(), d3d11_swapchain_get_hwnd(), d3d11_swapchain_GetBuffer(), d3d11_swapchain_GetDesc(), d3d11_swapchain_GetDesc1(), d3d11_swapchain_GetFullscreenDesc(), d3d11_swapchain_GetFullscreenState(), d3d11_swapchain_init(), d3d11_swapchain_ResizeBuffers(), d3d11_swapchain_SetFullscreenState(), d3d11_texture2d_GetDesc(), d3d11_unordered_access_view_init(), d3d12_swapchain_GetDesc(), d3d12_swapchain_GetFullscreenDesc(), d3d12_swapchain_GetFullscreenState(), d3d12_swapchain_SetFullscreenState(), d3d2_CreateDevice(), d3d3_CreateDevice(), d3d3_EnumDevices(), d3d7_CreateDevice(), d3d7_EnumDevices(), d3d7_EnumZBufferFormats(), d3d7_EvictManagedTextures(), d3d8_CheckDepthStencilMatch(), d3d8_CheckDeviceFormat(), d3d8_CheckDeviceMultiSampleType(), d3d8_CheckDeviceType(), d3d8_device_ApplyStateBlock(), d3d8_device_BeginScene(), d3d8_device_BeginStateBlock(), d3d8_device_CaptureStateBlock(), d3d8_device_Clear(), d3d8_device_CopyRects(), d3d8_device_create_surface(), d3d8_device_CreateAdditionalSwapChain(), d3d8_device_CreatePixelShader(), d3d8_device_CreateStateBlock(), d3d8_device_CreateVertexShader(), d3d8_device_DeletePixelShader(), d3d8_device_DeleteStateBlock(), d3d8_device_DeleteVertexShader(), d3d8_device_DrawIndexedPrimitive(), d3d8_device_DrawIndexedPrimitiveUP(), d3d8_device_DrawPrimitive(), d3d8_device_DrawPrimitiveUP(), d3d8_device_EndScene(), d3d8_device_EndStateBlock(), d3d8_device_GetAvailableTextureMem(), d3d8_device_GetBackBuffer(), d3d8_device_GetClipPlane(), d3d8_device_GetClipStatus(), d3d8_device_GetCreationParameters(), d3d8_device_GetDepthStencilSurface(), d3d8_device_GetDeviceCaps(), d3d8_device_GetDisplayMode(), d3d8_device_GetFrontBuffer(), d3d8_device_GetGammaRamp(), d3d8_device_GetIndices(), d3d8_device_GetLight(), d3d8_device_GetLightEnable(), d3d8_device_GetMaterial(), d3d8_device_GetPixelShader(), d3d8_device_GetPixelShaderConstant(), d3d8_device_GetPixelShaderFunction(), d3d8_device_GetRasterStatus(), d3d8_device_GetRenderState(), d3d8_device_GetRenderTarget(), d3d8_device_GetStreamSource(), d3d8_device_GetTexture(), d3d8_device_GetTextureStageState(), d3d8_device_GetTransform(), d3d8_device_GetVertexShader(), d3d8_device_GetVertexShaderConstant(), d3d8_device_GetVertexShaderDeclaration(), d3d8_device_GetVertexShaderFunction(), d3d8_device_GetViewport(), d3d8_device_LightEnable(), d3d8_device_MultiplyTransform(), d3d8_device_ProcessVertices(), d3d8_device_Release(), d3d8_device_Reset(), d3d8_device_ResourceManagerDiscardBytes(), d3d8_device_SetClipPlane(), d3d8_device_SetClipStatus(), d3d8_device_SetCursorPosition(), d3d8_device_SetCursorProperties(), d3d8_device_SetGammaRamp(), d3d8_device_SetIndices(), d3d8_device_SetLight(), d3d8_device_SetMaterial(), d3d8_device_SetPixelShader(), d3d8_device_SetPixelShaderConstant(), d3d8_device_SetRenderState(), d3d8_device_SetRenderTarget(), d3d8_device_SetStreamSource(), d3d8_device_SetTexture(), d3d8_device_SetTextureStageState(), d3d8_device_SetTransform(), d3d8_device_SetVertexShader(), d3d8_device_SetVertexShaderConstant(), d3d8_device_SetViewport(), d3d8_device_ShowCursor(), d3d8_device_UpdateTexture(), d3d8_device_ValidateDevice(), d3d8_EnumAdapterModes(), d3d8_GetAdapterDisplayMode(), d3d8_GetAdapterModeCount(), d3d8_GetAdapterMonitor(), d3d8_GetDeviceCaps(), d3d8_indexbuffer_GetDesc(), d3d8_indexbuffer_GetPriority(), d3d8_indexbuffer_PreLoad(), d3d8_indexbuffer_SetPriority(), d3d8_init(), d3d8_pixel_shader_destroy(), d3d8_pixel_shader_init(), d3d8_RegisterSoftwareDevice(), d3d8_Release(), d3d8_resource_free_private_data(), d3d8_resource_get_private_data(), d3d8_resource_set_private_data(), d3d8_surface_GetDesc(), d3d8_surface_LockRect(), d3d8_swapchain_GetBackBuffer(), d3d8_texture_2d_AddDirtyRect(), d3d8_texture_2d_GetLevelCount(), d3d8_texture_2d_GetLevelDesc(), d3d8_texture_2d_GetLOD(), d3d8_texture_2d_GetPriority(), d3d8_texture_2d_GetSurfaceLevel(), d3d8_texture_2d_LockRect(), d3d8_texture_2d_SetLOD(), d3d8_texture_2d_SetPriority(), d3d8_texture_2d_UnlockRect(), d3d8_texture_3d_AddDirtyBox(), d3d8_texture_3d_GetLevelCount(), d3d8_texture_3d_GetLevelDesc(), d3d8_texture_3d_GetLOD(), d3d8_texture_3d_GetPriority(), d3d8_texture_3d_GetVolumeLevel(), d3d8_texture_3d_LockBox(), d3d8_texture_3d_SetLOD(), d3d8_texture_3d_SetPriority(), d3d8_texture_3d_UnlockBox(), d3d8_texture_cube_AddDirtyRect(), d3d8_texture_cube_GetCubeMapSurface(), d3d8_texture_cube_GetLevelCount(), d3d8_texture_cube_GetLevelDesc(), d3d8_texture_cube_GetLOD(), d3d8_texture_cube_GetPriority(), d3d8_texture_cube_LockRect(), d3d8_texture_cube_SetLOD(), d3d8_texture_cube_SetPriority(), d3d8_texture_cube_UnlockRect(), d3d8_texture_decref(), d3d8_texture_incref(), d3d8_texture_init(), d3d8_texture_preload(), d3d8_vertex_declaration_init(), d3d8_vertex_shader_destroy(), d3d8_vertex_shader_init(), d3d8_vertexbuffer_GetDesc(), d3d8_vertexbuffer_GetPriority(), d3d8_vertexbuffer_PreLoad(), d3d8_vertexbuffer_SetPriority(), d3d8_volume_GetDesc(), d3d9_caps_from_wined3dcaps(), d3d9_CheckDepthStencilMatch(), d3d9_CheckDeviceFormat(), d3d9_CheckDeviceFormatConversion(), d3d9_CheckDeviceMultiSampleType(), d3d9_CheckDeviceType(), d3d9_device_BeginScene(), d3d9_device_BeginStateBlock(), d3d9_device_CheckDeviceState(), d3d9_device_Clear(), d3d9_device_ColorFill(), d3d9_device_create_surface(), d3d9_device_CreateAdditionalSwapChain(), d3d9_device_CreateStateBlock(), d3d9_device_CreateTexture(), d3d9_device_DrawIndexedPrimitive(), d3d9_device_DrawIndexedPrimitiveUP(), d3d9_device_DrawPrimitive(), d3d9_device_DrawPrimitiveUP(), d3d9_device_EndScene(), d3d9_device_EndStateBlock(), d3d9_device_EvictManagedResources(), d3d9_device_GetAvailableTextureMem(), d3d9_device_GetBackBuffer(), d3d9_device_GetClipPlane(), d3d9_device_GetClipStatus(), d3d9_device_GetCreationParameters(), d3d9_device_GetDepthStencilSurface(), d3d9_device_GetDeviceCaps(), d3d9_device_GetDisplayMode(), d3d9_device_GetDisplayModeEx(), d3d9_device_GetFrontBufferData(), d3d9_device_GetFVF(), d3d9_device_GetGammaRamp(), d3d9_device_GetIndices(), d3d9_device_GetLight(), d3d9_device_GetLightEnable(), d3d9_device_GetMaterial(), d3d9_device_GetMaximumFrameLatency(), d3d9_device_GetNPatchMode(), d3d9_device_GetNumberOfSwapChains(), d3d9_device_GetPixelShader(), d3d9_device_GetPixelShaderConstantB(), d3d9_device_GetPixelShaderConstantF(), d3d9_device_GetPixelShaderConstantI(), d3d9_device_GetRasterStatus(), d3d9_device_GetRenderState(), d3d9_device_GetRenderTarget(), d3d9_device_GetRenderTargetData(), d3d9_device_GetSamplerState(), d3d9_device_GetScissorRect(), d3d9_device_GetSoftwareVertexProcessing(), d3d9_device_GetStreamSource(), d3d9_device_GetStreamSourceFreq(), d3d9_device_GetSwapChain(), d3d9_device_GetTexture(), d3d9_device_GetTextureStageState(), d3d9_device_GetTransform(), d3d9_device_GetVertexDeclaration(), d3d9_device_GetVertexShader(), d3d9_device_GetVertexShaderConstantB(), d3d9_device_GetVertexShaderConstantF(), d3d9_device_GetVertexShaderConstantI(), d3d9_device_GetViewport(), d3d9_device_LightEnable(), d3d9_device_MultiplyTransform(), d3d9_device_Present(), d3d9_device_PresentEx(), d3d9_device_ProcessVertices(), d3d9_device_Release(), d3d9_device_reset(), d3d9_device_SetClipPlane(), d3d9_device_SetClipStatus(), d3d9_device_SetCursorPosition(), d3d9_device_SetCursorProperties(), d3d9_device_SetDepthStencilSurface(), d3d9_device_SetDialogBoxMode(), d3d9_device_SetFVF(), d3d9_device_SetGammaRamp(), d3d9_device_SetIndices(), d3d9_device_SetLight(), d3d9_device_SetMaterial(), d3d9_device_SetMaximumFrameLatency(), d3d9_device_SetNPatchMode(), d3d9_device_SetPixelShader(), d3d9_device_SetPixelShaderConstantB(), d3d9_device_SetPixelShaderConstantF(), d3d9_device_SetPixelShaderConstantI(), d3d9_device_SetRenderState(), d3d9_device_SetRenderTarget(), d3d9_device_SetSamplerState(), d3d9_device_SetScissorRect(), d3d9_device_SetSoftwareVertexProcessing(), d3d9_device_SetStreamSource(), d3d9_device_SetStreamSourceFreq(), d3d9_device_SetTexture(), d3d9_device_SetTextureStageState(), d3d9_device_SetTransform(), d3d9_device_SetVertexDeclaration(), d3d9_device_SetVertexShader(), d3d9_device_SetVertexShaderConstantB(), d3d9_device_SetVertexShaderConstantF(), d3d9_device_SetVertexShaderConstantI(), d3d9_device_SetViewport(), d3d9_device_ShowCursor(), d3d9_device_StretchRect(), d3d9_device_UpdateSurface(), d3d9_device_UpdateTexture(), d3d9_device_ValidateDevice(), d3d9_EnumAdapterModes(), d3d9_EnumAdapterModesEx(), d3d9_GetAdapterDisplayMode(), d3d9_GetAdapterDisplayModeEx(), d3d9_GetAdapterIdentifier(), d3d9_GetAdapterModeCount(), d3d9_GetAdapterModeCountEx(), d3d9_GetAdapterMonitor(), d3d9_GetDeviceCaps(), d3d9_indexbuffer_GetDesc(), d3d9_indexbuffer_GetPriority(), d3d9_indexbuffer_PreLoad(), d3d9_indexbuffer_SetPriority(), d3d9_init(), d3d9_pixelshader_GetFunction(), d3d9_query_GetData(), d3d9_query_GetType(), d3d9_RegisterSoftwareDevice(), d3d9_resource_free_private_data(), d3d9_resource_get_private_data(), d3d9_resource_set_private_data(), d3d9_stateblock_Apply(), d3d9_stateblock_Capture(), d3d9_surface_GetDC(), d3d9_surface_GetDesc(), d3d9_surface_PreLoad(), d3d9_surface_ReleaseDC(), d3d9_surface_UnlockRect(), d3d9_swapchain_GetBackBuffer(), d3d9_swapchain_GetDisplayMode(), d3d9_swapchain_GetDisplayModeEx(), d3d9_swapchain_GetFrontBufferData(), d3d9_swapchain_GetPresentParameters(), d3d9_swapchain_GetRasterStatus(), d3d9_texture_2d_AddDirtyRect(), d3d9_texture_2d_GenerateMipSubLevels(), d3d9_texture_2d_GetLevelCount(), d3d9_texture_2d_GetLevelDesc(), d3d9_texture_2d_GetLOD(), d3d9_texture_2d_GetPriority(), d3d9_texture_2d_GetSurfaceLevel(), d3d9_texture_2d_LockRect(), d3d9_texture_2d_SetLOD(), d3d9_texture_2d_SetPriority(), d3d9_texture_2d_UnlockRect(), d3d9_texture_3d_AddDirtyBox(), d3d9_texture_3d_GetLevelCount(), d3d9_texture_3d_GetLevelDesc(), d3d9_texture_3d_GetLOD(), d3d9_texture_3d_GetPriority(), d3d9_texture_3d_GetVolumeLevel(), d3d9_texture_3d_LockBox(), d3d9_texture_3d_SetLOD(), d3d9_texture_3d_SetPriority(), d3d9_texture_3d_UnlockBox(), d3d9_texture_cube_AddDirtyRect(), d3d9_texture_cube_GenerateMipSubLevels(), d3d9_texture_cube_GetCubeMapSurface(), d3d9_texture_cube_GetLevelCount(), d3d9_texture_cube_GetLevelDesc(), d3d9_texture_cube_GetLOD(), d3d9_texture_cube_GetPriority(), d3d9_texture_cube_LockRect(), d3d9_texture_cube_SetLOD(), d3d9_texture_cube_SetPriority(), d3d9_texture_cube_UnlockRect(), d3d9_texture_decref(), d3d9_texture_incref(), d3d9_texture_init(), d3d9_texture_preload(), d3d9_vertexbuffer_GetDesc(), d3d9_vertexbuffer_GetPriority(), d3d9_vertexbuffer_PreLoad(), d3d9_vertexbuffer_SetPriority(), d3d9_vertexshader_GetFunction(), d3d9_volume_GetDesc(), d3d_blend_state_create(), d3d_buffer_init(), d3d_depthstencil_state_create(), d3d_depthstencil_view_init(), d3d_device1_CreateMatrix(), d3d_device1_DeleteMatrix(), d3d_device1_Execute(), d3d_device1_GetMatrix(), d3d_device1_SetMatrix(), d3d_device2_EnumTextureFormats(), d3d_device2_SetRenderTarget(), d3d_device2_SwapTextureHandles(), d3d_device3_AddViewport(), d3d_device3_Begin(), d3d_device3_DeleteViewport(), d3d_device3_GetCurrentViewport(), d3d_device3_GetLightState(), d3d_device3_GetRenderState(), d3d_device3_GetTransform(), d3d_device3_MultiplyTransform(), d3d_device3_NextViewport(), d3d_device3_SetCurrentViewport(), d3d_device3_SetLightState(), d3d_device3_SetRenderState(), d3d_device3_SetRenderTarget(), d3d_device3_SetTexture(), d3d_device3_SetTransform(), d3d_device3_Vertex(), d3d_device7_ApplyStateBlock(), d3d_device7_BeginScene(), d3d_device7_BeginStateBlock(), d3d_device7_CaptureStateBlock(), d3d_device7_Clear(), d3d_device7_CreateStateBlock(), d3d_device7_DeleteStateBlock(), d3d_device7_DrawIndexedPrimitive(), d3d_device7_DrawIndexedPrimitiveStrided(), d3d_device7_DrawIndexedPrimitiveVB(), d3d_device7_DrawPrimitive(), d3d_device7_DrawPrimitiveStrided(), d3d_device7_DrawPrimitiveVB(), d3d_device7_EndScene(), d3d_device7_EndStateBlock(), d3d_device7_EnumTextureFormats(), d3d_device7_GetClipPlane(), d3d_device7_GetLight(), d3d_device7_GetLightEnable(), d3d_device7_GetMaterial(), d3d_device7_GetRenderState(), d3d_device7_GetRenderTarget(), d3d_device7_GetTexture(), d3d_device7_GetTextureStageState(), d3d_device7_GetTransform(), d3d_device7_GetViewport(), d3d_device7_LightEnable(), d3d_device7_Load(), d3d_device7_MultiplyTransform(), d3d_device7_PreLoad(), d3d_device7_SetClipPlane(), d3d_device7_SetLight(), d3d_device7_SetMaterial(), d3d_device7_SetRenderState(), d3d_device7_SetRenderTarget(), d3d_device7_SetTexture(), d3d_device7_SetTextureStageState(), d3d_device7_SetTransform(), d3d_device7_SetViewport(), d3d_device7_ValidateDevice(), d3d_device_inner_Release(), d3d_geometry_shader_init(), d3d_get_private_data(), d3d_input_layout_init(), d3d_light_GetLight(), d3d_light_SetLight(), d3d_material3_GetHandle(), d3d_material3_GetMaterial(), d3d_material3_Release(), d3d_material3_SetMaterial(), d3d_pixel_shader_init(), d3d_query_init(), d3d_rasterizer_state_create(), d3d_rendertarget_view_init(), d3d_sampler_state_create(), d3d_set_private_data(), d3d_set_private_data_interface(), d3d_shader_resource_view_init(), d3d_texture1d_create(), d3d_texture2_GetHandle(), d3d_texture2_Load(), d3d_texture2d_create(), d3d_texture3d_init(), d3d_vertex_buffer7_GetVertexBufferDesc(), d3d_vertex_buffer7_Lock(), d3d_vertex_buffer7_Optimize(), d3d_vertex_buffer7_ProcessVertices(), d3d_vertex_buffer7_Release(), d3d_vertex_buffer_create(), d3d_vertex_shader_init(), d3d_video_decoder_output_view_init(), d3d_viewport_AddLight(), d3d_viewport_Clear(), d3d_viewport_Clear2(), d3d_viewport_DeleteLight(), d3d_viewport_GetBackground(), d3d_viewport_GetViewport(), d3d_viewport_GetViewport2(), d3d_viewport_NextLight(), d3d_viewport_SetBackground(), d3d_viewport_SetViewport(), d3d_viewport_SetViewport2(), d3d_viewport_TransformVertices(), ddraw1_CreateSurface(), ddraw2_CreateSurface(), ddraw4_CreateSurface(), ddraw7_CreatePalette(), ddraw7_CreateSurface(), ddraw7_EnumDisplayModes(), ddraw7_EnumSurfaces(), ddraw7_FlipToGDISurface(), ddraw7_GetAvailableVidMem(), ddraw7_GetCaps(), ddraw7_GetDeviceIdentifier(), ddraw7_GetDisplayMode(), ddraw7_GetGDISurface(), ddraw7_GetMonitorFrequency(), ddraw7_GetScanLine(), ddraw7_GetSurfaceFromDC(), ddraw7_GetVerticalBlankStatus(), ddraw7_RestoreDisplayMode(), ddraw7_SetDisplayMode(), ddraw_clipper_GetClipList(), ddraw_clipper_GetHWnd(), ddraw_clipper_Initialize(), ddraw_clipper_SetClipList(), ddraw_clipper_SetHWnd(), ddraw_destroy(), ddraw_enumerate_secondary_devices(), ddraw_gamma_control_GetGammaRamp(), ddraw_gamma_control_SetGammaRamp(), ddraw_get_d3dcaps(), ddraw_palette_GetCaps(), ddraw_palette_GetEntries(), ddraw_palette_Release(), ddraw_palette_SetEntries(), ddraw_set_cooperative_level(), ddraw_surface1_Blt(), ddraw_surface1_Flip(), ddraw_surface1_Unlock(), ddraw_surface3_GetSurfaceDesc(), ddraw_surface7_BltFast(), ddraw_surface7_EnumAttachedSurfaces(), ddraw_surface7_FreePrivateData(), ddraw_surface7_GetAttachedSurface(), ddraw_surface7_GetClipper(), ddraw_surface7_GetColorKey(), ddraw_surface7_GetDC(), ddraw_surface7_GetLOD(), ddraw_surface7_GetOverlayPosition(), ddraw_surface7_GetPalette(), ddraw_surface7_GetPixelFormat(), ddraw_surface7_GetPriority(), ddraw_surface7_GetPrivateData(), ddraw_surface7_GetSurfaceDesc(), ddraw_surface7_QueryInterface(), ddraw_surface7_ReleaseDC(), ddraw_surface7_SetClipper(), ddraw_surface7_SetLOD(), ddraw_surface7_SetOverlayPosition(), ddraw_surface7_SetPriority(), ddraw_surface7_SetPrivateData(), ddraw_surface7_SetSurfaceDesc(), ddraw_surface7_UpdateOverlay(), ddraw_surface7_UpdateOverlayZOrder(), ddraw_surface_add_iface(), ddraw_surface_attach_surface(), ddraw_surface_delete_attached_surface(), ddraw_surface_release_iface(), ddraw_surface_set_color_key(), ddraw_surface_set_palette(), device_init(), DirectDrawCreate(), DirectDrawCreateClipper(), DirectDrawCreateEx(), dxgi_adapter_CheckInterfaceSupport(), dxgi_device_CreateSurface(), dxgi_device_GetMaximumFrameLatency(), dxgi_device_init(), dxgi_device_Release(), dxgi_device_SetMaximumFrameLatency(), dxgi_factory_EnumAdapters1(), dxgi_factory_get_device_window(), dxgi_factory_init(), dxgi_get_private_data(), dxgi_output_find_closest_matching_mode(), dxgi_output_get_display_mode_list(), dxgi_output_GetDesc(), dxgi_output_GetDesc1(), dxgi_output_ReleaseOwnership(), dxgi_output_SetGammaControl(), dxgi_output_TakeOwnership(), dxgi_set_private_data(), dxgi_set_private_data_interface(), dxgi_surface_GetDC(), dxgi_surface_GetDesc(), dxgi_surface_ReleaseDC(), DXGID3D10RegisterLayers(), get_layer(), GetSurfaceFromDC(), indexbuffer_init(), notification_thread_func(), pixelshader_init(), prepare_clip_space_planes(), query_init(), register_d3d10core_layers(), stateblock_init(), surface_lock(), vertexbuffer_init(), vertexdeclaration_init(), vertexshader_init(), wined3d_adapter_get_identifier(), wined3d_adapter_register_budget_change_notification(), wined3d_adapter_unregister_budget_change_notification(), wined3d_atomic_decrement_mutex_lock(), wined3d_blend_state_decref(), wined3d_buffer_decref(), wined3d_command_list_decref(), wined3d_cs_emit_present(), wined3d_decref(), wined3d_depth_stencil_state_decref(), wined3d_device_context_unlock(), wined3d_device_decref(), wined3d_palette_decref(), wined3d_query_decref(), wined3d_rasterizer_state_decref(), wined3d_rendertarget_view_decref(), wined3d_sampler_decref(), wined3d_shader_decref(), wined3d_shader_resource_view_destroy(), wined3d_stateblock_decref(), wined3d_swapchain_create(), wined3d_swapchain_decref(), wined3d_swapchain_init(), wined3d_swapchain_present(), wined3d_swapchain_state_resize_target(), wined3d_texture_decref(), wined3d_unordered_access_view_decref(), and wined3d_vertex_declaration_decref().

◆ wined3d_output_find_closest_matching_mode()

HRESULT __cdecl wined3d_output_find_closest_matching_mode ( struct wined3d_output *  output,
struct wined3d_display_mode *  mode 
)

Definition at line 1409 of file directx.c.

1411{
1412 unsigned int i, j, mode_count, matching_mode_count, closest;
1413 struct wined3d_display_mode **matching_modes;
1414 struct wined3d_display_mode *modes;
1415 HRESULT hr;
1416
1417 TRACE("output %p, mode %p.\n", output, mode);
1418
1419 if (!(mode_count = wined3d_output_get_mode_count(output, mode->format_id,
1421 {
1422 WARN("Output has 0 matching modes.\n");
1423 return E_FAIL;
1424 }
1425
1426 if (!(modes = calloc(mode_count, sizeof(*modes))))
1427 return E_OUTOFMEMORY;
1428 if (!(matching_modes = calloc(mode_count, sizeof(*matching_modes))))
1429 {
1430 free(modes);
1431 return E_OUTOFMEMORY;
1432 }
1433
1434 for (i = 0; i < mode_count; ++i)
1435 {
1436 if (FAILED(hr = wined3d_output_get_mode(output, mode->format_id,
1437 WINED3D_SCANLINE_ORDERING_UNKNOWN, i, &modes[i], true)))
1438 {
1439 free(matching_modes);
1440 free(modes);
1441 return hr;
1442 }
1443 matching_modes[i] = &modes[i];
1444 }
1445
1446 matching_mode_count = mode_count;
1447
1448 if (mode->scanline_ordering != WINED3D_SCANLINE_ORDERING_UNKNOWN)
1449 {
1450 for (i = 0, j = 0; i < matching_mode_count; ++i)
1451 {
1452 if (matching_modes[i]->scanline_ordering == mode->scanline_ordering)
1453 matching_modes[j++] = matching_modes[i];
1454 }
1455 if (j > 0)
1456 matching_mode_count = j;
1457 }
1458
1459 if (mode->refresh_rate)
1460 {
1461 for (i = 0, j = 0; i < matching_mode_count; ++i)
1462 {
1463 if (matching_modes[i]->refresh_rate == mode->refresh_rate)
1464 matching_modes[j++] = matching_modes[i];
1465 }
1466 if (j > 0)
1467 matching_mode_count = j;
1468 }
1469
1470 if (!mode->width || !mode->height)
1471 {
1472 struct wined3d_display_mode current_mode;
1473 if (FAILED(hr = wined3d_output_get_display_mode(output, &current_mode, NULL)))
1474 {
1475 free(matching_modes);
1476 free(modes);
1477 return hr;
1478 }
1479 mode->width = current_mode.width;
1480 mode->height = current_mode.height;
1481 }
1482
1483 closest = ~0u;
1484 for (i = 0, j = 0; i < matching_mode_count; ++i)
1485 {
1486 unsigned int d = abs((int)(mode->width - matching_modes[i]->width))
1487 + abs((int)(mode->height - matching_modes[i]->height));
1488
1489 if (closest > d)
1490 {
1491 closest = d;
1492 j = i;
1493 }
1494 }
1495
1496 *mode = *matching_modes[j];
1497
1498 free(matching_modes);
1499 free(modes);
1500
1501 TRACE("Returning %ux%u@%u %s %#x.\n", mode->width, mode->height,
1502 mode->refresh_rate, debug_d3dformat(mode->format_id),
1503 mode->scanline_ordering);
1504
1505 return WINED3D_OK;
1506}
#define abs(i)
Definition: fconv.c:206
enum wined3d_scanline_ordering scanline_ordering
Definition: wined3d.h:1615
HRESULT CDECL wined3d_output_get_mode(struct wined3d_output *output, enum wined3d_format_id format_id, enum wined3d_scanline_ordering scanline_ordering, unsigned int mode_idx, struct wined3d_display_mode *mode, bool cached)
Definition: directx.c:1369
HRESULT CDECL wined3d_output_get_display_mode(const struct wined3d_output *output, struct wined3d_display_mode *mode, enum wined3d_display_rotation *rotation)
Definition: directx.c:1515

Referenced by dxgi_output_find_closest_matching_mode(), and wined3d_swapchain_state_set_display_mode().

◆ wined3d_output_get_adapter()

◆ wined3d_output_get_desc()

HRESULT __cdecl wined3d_output_get_desc ( const struct wined3d_output *  output,
struct wined3d_output_desc *  desc 
)

Definition at line 1256 of file directx.c.

1258{
1259 TRACE("output %p, desc %p.\n", output, desc);
1260
1261 memset(desc, 0, sizeof(*desc));
1262 desc->ordinal = output->ordinal;
1263 lstrcpyW(desc->device_name, output->device_name);
1265 return WINED3D_OK;
1266}
#define lstrcpyW
Definition: compat.h:749
LONG_PTR LPARAM
Definition: minwindef.h:175
BOOL WINAPI EnumDisplayMonitors(_In_opt_ HDC, _In_opt_ LPCRECT, _In_ MONITORENUMPROC, _In_ LPARAM)
WCHAR device_name[CCHDEVICENAME]
unsigned int ordinal
static BOOL CALLBACK enum_monitor_proc(HMONITOR monitor, HDC hdc, RECT *rect, LPARAM lparam)
Definition: directx.c:1238

Referenced by d3d8_GetAdapterMonitor(), d3d9_caps_from_wined3dcaps(), d3d9_GetAdapterIdentifier(), d3d9_GetAdapterMonitor(), ddraw_enumerate_secondary_devices(), device_parent_mode_changed(), dxgi_output_GetDesc(), dxgi_output_GetDesc1(), wined3d_device_reset(), wined3d_swapchain_activate(), wined3d_swapchain_init(), wined3d_swapchain_state_resize_target(), and wined3d_swapchain_state_set_fullscreen().

◆ wined3d_output_get_display_mode()

HRESULT __cdecl wined3d_output_get_display_mode ( const struct wined3d_output *  output,
struct wined3d_display_mode *  mode,
enum wined3d_display_rotation *  rotation 
)

Definition at line 1515 of file directx.c.

1517{
1518 DEVMODEW m;
1519
1520 TRACE("output %p, display_mode %p, rotation %p.\n", output, mode, rotation);
1521
1522 if (!mode)
1524
1525 memset(&m, 0, sizeof(m));
1526 m.dmSize = sizeof(m);
1527
1529 mode->width = m.dmPelsWidth;
1530 mode->height = m.dmPelsHeight;
1531 mode->refresh_rate = DEFAULT_REFRESH_RATE;
1532 if (m.dmFields & DM_DISPLAYFREQUENCY)
1533 mode->refresh_rate = m.dmDisplayFrequency;
1534 mode->format_id = pixelformat_for_depth(m.dmBitsPerPel);
1535
1536 /* Lie about the format. X11 can't change the color depth, and some apps
1537 * are pretty angry if they SetDisplayMode from 24 to 16 bpp and find out
1538 * that GetDisplayMode still returns 24 bpp. This should probably be
1539 * handled in winex11 instead. */
1540 if (output->screen_format && output->screen_format != mode->format_id)
1541 {
1542 WARN("Overriding format %s with stored format %s.\n",
1543 debug_d3dformat(mode->format_id),
1545 mode->format_id = output->screen_format;
1546 }
1547
1548 if (!(m.dmFields & DM_DISPLAYFLAGS))
1549 mode->scanline_ordering = WINED3D_SCANLINE_ORDERING_UNKNOWN;
1550 else if (m.dmDisplayFlags & DM_INTERLACED)
1551 mode->scanline_ordering = WINED3D_SCANLINE_ORDERING_INTERLACED;
1552 else
1553 mode->scanline_ordering = WINED3D_SCANLINE_ORDERING_PROGRESSIVE;
1554
1555 if (rotation)
1556 {
1557 switch (m.dmDisplayOrientation)
1558 {
1559 case DMDO_DEFAULT:
1560 *rotation = WINED3D_DISPLAY_ROTATION_0;
1561 break;
1562 case DMDO_90:
1563 *rotation = WINED3D_DISPLAY_ROTATION_90;
1564 break;
1565 case DMDO_180:
1566 *rotation = WINED3D_DISPLAY_ROTATION_180;
1567 break;
1568 case DMDO_270:
1569 *rotation = WINED3D_DISPLAY_ROTATION_270;
1570 break;
1571 default:
1572 FIXME("Unhandled display rotation %#lx.\n", m.dmDisplayOrientation);
1574 break;
1575 }
1576 }
1577
1578 TRACE("Returning %ux%u@%u %s %#x.\n", mode->width, mode->height,
1579 mode->refresh_rate, debug_d3dformat(mode->format_id),
1580 mode->scanline_ordering);
1581 return WINED3D_OK;
1582}
enum wined3d_format_id pixelformat_for_depth(DWORD depth)
Definition: utils.c:6067
const GLfloat * m
Definition: glext.h:10848
#define ENUM_CURRENT_SETTINGS
Definition: winuser.h:179
enum wined3d_format_id screen_format
BOOL WINAPI EnumDisplaySettingsExW(LPCWSTR lpszDeviceName, DWORD iModeNum, LPDEVMODEW lpDevMode, DWORD dwFlags)
Definition: display.c:330
#define DEFAULT_REFRESH_RATE
Definition: directx.c:32
#define DM_DISPLAYFREQUENCY
Definition: wingdi.h:1272
#define DMDO_DEFAULT
Definition: wingdi.h:1217
#define DM_INTERLACED
Definition: wingdi.h:1228
#define DMDO_180
Definition: wingdi.h:1219
#define DMDO_270
Definition: wingdi.h:1220
#define DMDO_90
Definition: wingdi.h:1218
#define DM_DISPLAYFLAGS
Definition: wingdi.h:1271

Referenced by d3d7_EnumZBufferFormats(), d3d8_GetAdapterDisplayMode(), d3d9_GetAdapterDisplayMode(), d3d9_GetAdapterDisplayModeEx(), d3d_device2_EnumTextureFormats(), d3d_device7_EnumTextureFormats(), ddraw7_EnumSurfaces(), ddraw7_GetAvailableVidMem(), ddraw7_GetDisplayMode(), ddraw7_GetFourCCCodes(), ddraw7_GetMonitorFrequency(), ddraw7_RestoreDisplayMode(), ddraw_attach_d3d_device(), ddraw_surface_create(), dxgi_output_GetDesc(), dxgi_output_GetDesc1(), wined3d_output_find_closest_matching_mode(), wined3d_output_get_raster_status(), wined3d_swapchain_get_display_mode(), wined3d_swapchain_state_init(), wined3d_swapchain_state_set_display_mode(), and wined3d_swapchain_state_set_fullscreen().

◆ wined3d_output_get_mode()

HRESULT __cdecl wined3d_output_get_mode ( struct wined3d_output *  output,
enum wined3d_format_id  format_id,
enum wined3d_scanline_ordering  scanline_ordering,
unsigned int  mode_idx,
struct wined3d_display_mode *  mode,
bool  cached 
)

Definition at line 1369 of file directx.c.

1372{
1373 const struct wined3d_adapter *adapter;
1374 const struct wined3d_format *format;
1375 SIZE_T i, match_idx = 0;
1376
1377 TRACE("output %p, format %s, scanline_ordering %#x, mode_idx %u, mode %p.\n",
1378 output, debug_d3dformat(format_id), scanline_ordering, mode_idx, mode);
1379
1380 if (!mode)
1382
1383 adapter = output->adapter;
1385
1386 wined3d_output_update_modes(output, cached);
1387
1388 for (i = 0; i < output->mode_count; ++i)
1389 {
1390 const struct wined3d_display_mode *wined3d_mode = &output->modes[i];
1391
1392 if (mode_matches_filter(adapter, wined3d_mode, format, scanline_ordering) && match_idx++ == mode_idx)
1393 {
1394 *mode = *wined3d_mode;
1397
1398 TRACE("%ux%u@%u %u bpp, %s %#x.\n", mode->width, mode->height, mode->refresh_rate,
1400 debug_d3dformat(mode->format_id), mode->scanline_ordering);
1401 return WINED3D_OK;
1402 }
1403 }
1404
1405 WARN("Invalid mode_idx %u.\n", mode_idx);
1407}
enum wined3d_format_id format_id
Definition: wined3d.h:1614
struct wined3d_display_mode * modes
static bool mode_matches_filter(const struct wined3d_adapter *adapter, const struct wined3d_display_mode *mode, const struct wined3d_format *format, enum wined3d_scanline_ordering scanline_ordering)
Definition: directx.c:1314
static void wined3d_output_update_modes(struct wined3d_output *output, bool cached)
Definition: directx.c:1271

Referenced by d3d8_EnumAdapterModes(), d3d9_EnumAdapterModes(), d3d9_EnumAdapterModesEx(), ddraw7_EnumDisplayModes(), dxgi_output_get_display_mode_list(), and wined3d_output_find_closest_matching_mode().

◆ wined3d_output_get_mode_count()

unsigned int __cdecl wined3d_output_get_mode_count ( struct wined3d_output *  output,
enum wined3d_format_id  format_id,
enum wined3d_scanline_ordering  scanline_ordering,
bool  cached 
)

Definition at line 1341 of file directx.c.

1343{
1344 const struct wined3d_adapter *adapter;
1345 const struct wined3d_format *format;
1346 unsigned int count = 0;
1347 SIZE_T i;
1348
1349 TRACE("output %p, format %s, scanline_ordering %#x.\n",
1350 output, debug_d3dformat(format_id), scanline_ordering);
1351
1352 adapter = output->adapter;
1354
1355 wined3d_output_update_modes(output, cached);
1356
1357 for (i = 0; i < output->mode_count; ++i)
1358 {
1359 if (mode_matches_filter(adapter, &output->modes[i], format, scanline_ordering))
1360 ++count;
1361 }
1362
1363 TRACE("Returning %u matching modes (out of %Iu total).\n", count, output->mode_count);
1364
1365 return count;
1366}

Referenced by d3d8_GetAdapterModeCount(), d3d9_GetAdapterModeCount(), d3d9_GetAdapterModeCountEx(), dxgi_output_get_display_mode_list(), wined3d_check_device_type(), and wined3d_output_find_closest_matching_mode().

◆ wined3d_output_get_raster_status()

HRESULT __cdecl wined3d_output_get_raster_status ( const struct wined3d_output *  output,
struct wined3d_raster_status *  raster_status 
)

Definition at line 1814 of file directx.c.

1816{
1817 LONGLONG freq_per_frame, freq_per_line;
1818 LARGE_INTEGER counter, freq_per_sec;
1820 static UINT once;
1821
1822 if (!once++)
1823 FIXME("output %p, raster_status %p semi-stub!\n", output, raster_status);
1824 else
1825 WARN("output %p, raster_status %p semi-stub!\n", output, raster_status);
1826
1827 /* Obtaining the raster status is a widely implemented but optional
1828 * feature. When this method returns OK StarCraft 2 expects the
1829 * raster_status->InVBlank value to actually change over time.
1830 * And Endless Alice Crysis doesn't care even if this method fails.
1831 * Thus this method returns OK and fakes raster_status by
1832 * QueryPerformanceCounter. */
1833
1838 if (mode.refresh_rate == DEFAULT_REFRESH_RATE)
1839 mode.refresh_rate = 60;
1840
1841 freq_per_frame = freq_per_sec.QuadPart / mode.refresh_rate;
1842 /* Assume 20 scan lines in the vertical blank. */
1843 freq_per_line = freq_per_frame / (mode.height + 20);
1844 raster_status->scan_line = (counter.QuadPart % freq_per_frame) / freq_per_line;
1845 if (raster_status->scan_line < mode.height)
1846 raster_status->in_vblank = FALSE;
1847 else
1848 {
1849 raster_status->scan_line = 0;
1850 raster_status->in_vblank = TRUE;
1851 }
1852
1853 TRACE("Returning fake value, in_vblank %u, scan_line %u.\n",
1854 raster_status->in_vblank, raster_status->scan_line);
1855
1856 return WINED3D_OK;
1857}
BOOL WINAPI QueryPerformanceFrequency(OUT PLARGE_INTEGER lpFrequency)
Definition: perfcnt.c:45
BOOL WINAPI QueryPerformanceCounter(OUT PLARGE_INTEGER lpPerformanceCount)
Definition: perfcnt.c:23
int64_t LONGLONG
Definition: typedefs.h:68
LONGLONG QuadPart
Definition: typedefs.h:114

Referenced by ddraw7_GetScanLine(), ddraw7_GetVerticalBlankStatus(), and wined3d_swapchain_get_raster_status().

◆ wined3d_output_release_ownership()

void __cdecl wined3d_output_release_ownership ( const struct wined3d_output *  output)

Definition at line 77 of file directx.c.

78{
79 D3DKMT_SETVIDPNSOURCEOWNER set_owner_desc = {0};
80
81 TRACE("output %p.\n", output);
82
83 set_owner_desc.hDevice = output->kmt_device;
84 D3DKMTSetVidPnSourceOwner(&set_owner_desc);
85}
D3DKMT_HANDLE kmt_device
NTSTATUS WINAPI D3DKMTSetVidPnSourceOwner(const D3DKMT_SETVIDPNSOURCEOWNER *desc)

Referenced by dxgi_output_ReleaseOwnership().

◆ wined3d_output_set_display_mode()

HRESULT __cdecl wined3d_output_set_display_mode ( struct wined3d_output *  output,
const struct wined3d_display_mode *  mode 
)

Definition at line 1693 of file directx.c.

1695{
1696 enum wined3d_format_id new_format_id;
1697 const struct wined3d_format *format;
1698 DEVMODEW new_mode, current_mode;
1699 LONG ret;
1700
1701 TRACE("output %p, mode %p.\n", output, mode);
1702 TRACE("mode %ux%u@%u %s %#x.\n", mode->width, mode->height, mode->refresh_rate,
1703 debug_d3dformat(mode->format_id), mode->scanline_ordering);
1704
1705 memset(&new_mode, 0, sizeof(new_mode));
1706 new_mode.dmSize = sizeof(new_mode);
1707 memset(&current_mode, 0, sizeof(current_mode));
1708 current_mode.dmSize = sizeof(current_mode);
1709
1711
1713 new_mode.dmBitsPerPel = format->byte_count * CHAR_BIT;
1714 new_mode.dmPelsWidth = mode->width;
1715 new_mode.dmPelsHeight = mode->height;
1716 new_mode.dmDisplayFrequency = mode->refresh_rate;
1717 if (mode->refresh_rate)
1718 new_mode.dmFields |= DM_DISPLAYFREQUENCY;
1719 if (mode->scanline_ordering != WINED3D_SCANLINE_ORDERING_UNKNOWN)
1720 {
1721 new_mode.dmFields |= DM_DISPLAYFLAGS;
1722 if (mode->scanline_ordering == WINED3D_SCANLINE_ORDERING_INTERLACED)
1723 new_mode.dmDisplayFlags |= DM_INTERLACED;
1724 }
1725 new_format_id = mode->format_id;
1726
1727 /* Only change the mode if necessary. */
1728 if (!EnumDisplaySettingsW(output->device_name, ENUM_CURRENT_SETTINGS, &current_mode))
1729 {
1730 ERR("Failed to get current display mode.\n");
1731 }
1732 else if (equal_display_mode(&current_mode, &new_mode))
1733 {
1734 TRACE("Skipping redundant mode setting call.\n");
1735 output->screen_format = new_format_id;
1736 return WINED3D_OK;
1737 }
1738
1741 {
1742 if (new_mode.dmFields & DM_DISPLAYFREQUENCY)
1743 {
1744 WARN("ChangeDisplaySettingsExW failed, trying without the refresh rate.\n");
1745 new_mode.dmFields &= ~DM_DISPLAYFREQUENCY;
1746 new_mode.dmDisplayFrequency = 0;
1748 }
1751 }
1752
1753 /* Store the new values. */
1754 output->screen_format = new_format_id;
1755
1756 return WINED3D_OK;
1757}
return ret
Definition: mutex.c:147
long LONG
Definition: pedump.c:60
#define DISP_CHANGE_SUCCESSFUL
Definition: winuser.h:190
#define CDS_FULLSCREEN
Definition: winuser.h:183
DWORD dmBitsPerPel
Definition: wingdi.h:2093
DWORD dmFields
Definition: wingdi.h:2068
DWORD dmPelsWidth
Definition: wingdi.h:2094
DWORD dmDisplayFlags
Definition: wingdi.h:2097
DWORD dmPelsHeight
Definition: wingdi.h:2095
DWORD dmDisplayFrequency
Definition: wingdi.h:2100
WORD dmSize
Definition: wingdi.h:2066
LONG WINAPI ChangeDisplaySettingsExW(LPCWSTR lpszDeviceName, LPDEVMODEW lpDevMode, HWND hwnd, DWORD dwflags, LPVOID lParam)
Definition: display.c:585
BOOL WINAPI EnumDisplaySettingsW(LPCWSTR lpszDeviceName, DWORD iModeNum, LPDEVMODEW lpDevMode)
Definition: display.c:408
static BOOL equal_display_mode(const DEVMODEW *mode1, const DEVMODEW *mode2)
Definition: directx.c:1584
#define DM_PELSWIDTH
Definition: wingdi.h:1269
#define DM_BITSPERPEL
Definition: wingdi.h:1268
#define DM_PELSHEIGHT
Definition: wingdi.h:1270

Referenced by ddraw7_SetDisplayMode(), wined3d_swapchain_activate(), wined3d_swapchain_init(), and wined3d_swapchain_state_set_display_mode().

◆ wined3d_output_set_gamma_ramp()

HRESULT __cdecl wined3d_output_set_gamma_ramp ( struct wined3d_output *  output,
const struct wined3d_gamma_ramp *  ramp 
)

Definition at line 1759 of file directx.c.

1760{
1761 HDC dc;
1762
1763 TRACE("output %p, ramp %p.\n", output, ramp);
1764
1765 dc = CreateDCW(output->device_name, NULL, NULL, NULL);
1766 SetDeviceGammaRamp(dc, (void *)ramp);
1767 DeleteDC(dc);
1768
1769 return WINED3D_OK;
1770}
HDC dc
Definition: cylfrac.c:34
static HDC
Definition: imagelist.c:88
BOOL WINAPI SetDeviceGammaRamp(_In_ HDC hdc, _In_reads_bytes_(3 *256 *2) LPVOID lpRamp)
BOOL WINAPI DeleteDC(_In_ HDC)
HDC WINAPI CreateDCW(_In_opt_ LPCWSTR pszDriver, _In_opt_ LPCWSTR pszDevice, _In_opt_ LPCWSTR psz, _In_opt_ const DEVMODEW *pdmInit)

Referenced by dxgi_output_SetGammaControl(), and wined3d_swapchain_set_gamma_ramp().

◆ wined3d_output_take_ownership()

HRESULT __cdecl wined3d_output_take_ownership ( const struct wined3d_output *  output,
BOOL  exclusive 
)

Definition at line 87 of file directx.c.

88{
89 D3DKMT_SETVIDPNSOURCEOWNER set_owner_desc;
92
93 TRACE("output %p, exclusive %#x.\n", output, exclusive);
94
96 set_owner_desc.pType = &owner_type;
97 set_owner_desc.pVidPnSourceId = &output->vidpn_source_id;
98 set_owner_desc.VidPnSourceCount = 1;
99 set_owner_desc.hDevice = output->kmt_device;
100 status = D3DKMTSetVidPnSourceOwner(&set_owner_desc);
101
102 switch (status)
103 {
107 return E_INVALIDARG;
109 return E_NOINTERFACE;
110 case STATUS_SUCCESS:
111 return S_OK;
112 default:
113 FIXME("Unhandled error %#lx.\n", status);
114 return E_FAIL;
115 }
116}
#define STATUS_GRAPHICS_VIDPN_SOURCE_IN_USE
Definition: ntstatus.h:2094
#define STATUS_PROCEDURE_NOT_FOUND
Definition: ntstatus.h:452
const D3DKMT_VIDPNSOURCEOWNER_TYPE * pType
Definition: d3dkmthk.h:141
const D3DDDI_VIDEO_PRESENT_SOURCE_ID * pVidPnSourceId
Definition: d3dkmthk.h:142
D3DDDI_VIDEO_PRESENT_SOURCE_ID vidpn_source_id
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
enum _D3DKMT_VIDPNSOURCEOWNER_TYPE D3DKMT_VIDPNSOURCEOWNER_TYPE
@ D3DKMT_VIDPNSOURCEOWNER_EXCLUSIVE
Definition: d3dkmthk.h:29
@ D3DKMT_VIDPNSOURCEOWNER_SHARED
Definition: d3dkmthk.h:28
#define E_NOINTERFACE
Definition: winerror.h:3479
#define DXGI_ERROR_NOT_CURRENTLY_AVAILABLE
Definition: winerror.h:7140

Referenced by dxgi_output_TakeOwnership().

◆ wined3d_palette_apply_to_dc()

void __cdecl wined3d_palette_apply_to_dc ( const struct wined3d_palette *  palette,
HDC  dc 
)

Definition at line 91 of file palette.c.

92{
93 if (SetDIBColorTable(dc, 0, 256, palette->colors) != 256)
94 ERR("Failed to set DIB color table.\n");
95}
static HPALETTE palette
Definition: clipboard.c:1457
UINT WINAPI SetDIBColorTable(_In_ HDC hdc, _In_ UINT iStart, _In_ UINT cEntries, _In_reads_(cEntries) const RGBQUAD *prgbq)

Referenced by ddraw_surface7_GetDC(), ddraw_surface_update_frontbuffer(), and swapchain_gdi_frontbuffer_updated().

◆ wined3d_palette_create()

HRESULT __cdecl wined3d_palette_create ( struct wined3d_device *  device,
uint32_t  flags,
unsigned int  entry_count,
const PALETTEENTRY *  entries,
struct wined3d_palette **  palette 
)

Definition at line 161 of file palette.c.

163{
164 struct wined3d_palette *object;
165 HRESULT hr;
166
167 TRACE("device %p, flags %#x, entry_count %u, entries %p, palette %p.\n",
168 device, flags, entry_count, entries, palette);
169
170 if (!(object = calloc(1, sizeof(*object))))
171 return E_OUTOFMEMORY;
172
173 if (FAILED(hr = wined3d_palette_init(object, device, flags, entry_count, entries)))
174 {
175 WARN("Failed to initialize palette, hr %#lx.\n", hr);
176 free(object);
177 return hr;
178 }
179
180 TRACE("Created palette %p.\n", object);
181 *palette = object;
182
183 return WINED3D_OK;
184}
static HRESULT wined3d_palette_init(struct wined3d_palette *palette, struct wined3d_device *device, uint32_t flags, unsigned int entry_count, const PALETTEENTRY *entries)
Definition: palette.c:142

Referenced by ddraw_palette_init().

◆ wined3d_palette_decref()

ULONG __cdecl wined3d_palette_decref ( struct wined3d_palette *  palette)

Definition at line 42 of file palette.c.

43{
44 unsigned int refcount = InterlockedDecrement(&palette->ref);
45
46 TRACE("%p decreasing refcount to %u.\n", palette, refcount);
47
48 if (!refcount)
49 {
53 }
54
55 return refcount;
56}
static void wined3d_palette_destroy_object(void *object)
Definition: palette.c:35

Referenced by ddraw_palette_Release().

◆ wined3d_palette_get_entries()

HRESULT __cdecl wined3d_palette_get_entries ( const struct wined3d_palette *  palette,
uint32_t  flags,
unsigned int  start,
unsigned int  count,
PALETTEENTRY *  entries 
)

Definition at line 58 of file palette.c.

60{
61 unsigned int i;
62 TRACE("palette %p, flags %#x, start %u, count %u, entries %p.\n",
63 palette, flags, start, count, entries);
64
65 if (flags)
66 return WINED3DERR_INVALIDCALL; /* unchecked */
69
71 {
72 BYTE *entry = (BYTE *)entries;
73
74 for (i = start; i < count + start; ++i)
75 *entry++ = palette->colors[i].rgbRed;
76 }
77 else
78 {
79 for (i = 0; i < count; ++i)
80 {
81 entries[i].peRed = palette->colors[i + start].rgbRed;
82 entries[i].peGreen = palette->colors[i + start].rgbGreen;
83 entries[i].peBlue = palette->colors[i + start].rgbBlue;
84 entries[i].peFlags = palette->colors[i + start].rgbReserved;
85 }
86 }
87
88 return WINED3D_OK;
89}
#define WINED3D_PALETTE_8BIT_ENTRIES
Definition: wined3d.h:1559

Referenced by ddraw_palette_GetEntries(), and wined3d_colour_from_ddraw_colour().

◆ wined3d_palette_incref()

ULONG __cdecl wined3d_palette_incref ( struct wined3d_palette *  palette)

Definition at line 26 of file palette.c.

27{
28 unsigned int refcount = InterlockedIncrement(&palette->ref);
29
30 TRACE("%p increasing refcount to %u.\n", palette, refcount);
31
32 return refcount;
33}

◆ wined3d_palette_set_entries()

HRESULT __cdecl wined3d_palette_set_entries ( struct wined3d_palette *  palette,
uint32_t  flags,
unsigned int  start,
unsigned int  count,
const PALETTEENTRY *  entries 
)

Definition at line 97 of file palette.c.

99{
100 unsigned int i;
101
102 TRACE("palette %p, flags %#x, start %u, count %u, entries %p.\n",
103 palette, flags, start, count, entries);
104 TRACE("Palette flags: %#x.\n", palette->flags);
105
107
109 {
110 const BYTE *entry = (const BYTE *)entries;
111
112 for (i = start; i < count + start; ++i)
113 palette->colors[i].rgbRed = *entry++;
114 }
115 else
116 {
117 for (i = 0; i < count; ++i)
118 {
119 palette->colors[i + start].rgbRed = entries[i].peRed;
120 palette->colors[i + start].rgbGreen = entries[i].peGreen;
121 palette->colors[i + start].rgbBlue = entries[i].peBlue;
122 palette->colors[i + start].rgbReserved = entries[i].peFlags;
123 }
124
125 /* When WINEDDCAPS_ALLOW256 isn't set we need to override entry 0 with black and 255 with white */
126 if (!(palette->flags & WINED3D_PALETTE_ALLOW_256))
127 {
128 TRACE("WINED3D_PALETTE_ALLOW_256 not set, overriding palette entry 0 with black and 255 with white.\n");
129 palette->colors[0].rgbRed = 0;
130 palette->colors[0].rgbGreen = 0;
131 palette->colors[0].rgbBlue = 0;
132
133 palette->colors[255].rgbRed = 255;
134 palette->colors[255].rgbGreen = 255;
135 palette->colors[255].rgbBlue = 255;
136 }
137 }
138
139 return WINED3D_OK;
140}
#define WINED3D_PALETTE_ALLOW_256
Definition: wined3d.h:1560

Referenced by ddraw_palette_SetEntries(), and wined3d_palette_init().

◆ wined3d_private_store_cleanup()

static void wined3d_private_store_cleanup ( struct wined3d_private_store *  store)
inlinestatic

Definition at line 2636 of file wined3d.h.

2637{
2638 struct wined3d_private_data *data;
2639 struct list *e1, *e2;
2640
2641 LIST_FOR_EACH_SAFE(e1, e2, &store->content)
2642 {
2645 }
2646}
#define LIST_FOR_EACH_SAFE(cursor, cursor2, list)
Definition: list.h:230
struct list content
Definition: wined3d.h:2272
#define LIST_ENTRY(type)
Definition: queue.h:175
static void wined3d_private_store_free_private_data(struct wined3d_private_store *store, struct wined3d_private_data *entry)
Definition: wined3d.h:2627

Referenced by d3d11_class_linkage_Release(), d3d11_command_list_Release(), d3d11_compute_shader_init(), d3d11_compute_shader_wined3d_object_destroyed(), d3d11_device_context_cleanup(), d3d11_domain_shader_init(), d3d11_domain_shader_wined3d_object_destroyed(), d3d11_hull_shader_init(), d3d11_hull_shader_wined3d_object_destroyed(), d3d11_swapchain_init(), d3d11_swapchain_wined3d_object_released(), d3d11_unordered_access_view_wined3d_object_destroyed(), d3d11_video_decoder_output_view_Release(), d3d11_video_decoder_Release(), d3d12_swapchain_destroy(), d3d8_resource_cleanup(), d3d9_resource_cleanup(), d3d_blend_state_create(), d3d_blend_state_wined3d_object_destroyed(), d3d_depth_stencil_view_wined3d_object_destroyed(), d3d_depthstencil_state_create(), d3d_depthstencil_state_wined3d_object_destroyed(), d3d_device_context_state_private_release(), d3d_geometry_shader_init(), d3d_geometry_shader_wined3d_object_destroyed(), d3d_input_layout_init(), d3d_input_layout_wined3d_object_destroyed(), d3d_pixel_shader_init(), d3d_pixel_shader_wined3d_object_destroyed(), d3d_query_init(), d3d_query_wined3d_object_destroyed(), d3d_rasterizer_state_init(), d3d_rasterizer_state_wined3d_object_destroyed(), d3d_render_target_view_wined3d_object_destroyed(), d3d_sampler_state_init(), d3d_sampler_wined3d_object_destroyed(), d3d_shader_resource_view_wined3d_object_destroyed(), d3d_vertex_shader_init(), d3d_vertex_shader_wined3d_object_destroyed(), ddraw_surface_wined3d_object_destroyed(), dxgi_adapter_Release(), dxgi_device_init(), dxgi_device_Release(), dxgi_factory_init(), dxgi_factory_Release(), dxgi_output_Release(), and dxgi_resource_inner_Release().

◆ wined3d_private_store_free_private_data()

static void wined3d_private_store_free_private_data ( struct wined3d_private_store *  store,
struct wined3d_private_data *  entry 
)
inlinestatic

Definition at line 2627 of file wined3d.h.

2629{
2630 if (entry->flags & WINED3DSPD_IUNKNOWN)
2631 IUnknown_Release(entry->content.object);
2632 list_remove(&entry->entry);
2634}
#define GetProcessHeap()
Definition: compat.h:736
#define WINED3DSPD_IUNKNOWN
Definition: wined3d.h:1018

Referenced by d3d8_resource_free_private_data(), d3d9_resource_free_private_data(), d3d_set_private_data(), ddraw_surface7_FreePrivateData(), dxgi_set_private_data(), wined3d_private_store_cleanup(), and wined3d_private_store_set_private_data().

◆ wined3d_private_store_get_private_data()

static struct wined3d_private_data * wined3d_private_store_get_private_data ( const struct wined3d_private_store *  store,
const GUID *  tag 
)
inlinestatic

◆ wined3d_private_store_init()

◆ wined3d_private_store_set_private_data()

static HRESULT wined3d_private_store_set_private_data ( struct wined3d_private_store *  store,
const GUID *  guid,
const void *  data,
DWORD  data_size,
uint32_t  flags 
)
inlinestatic

Definition at line 2648 of file wined3d.h.

2650{
2651 struct wined3d_private_data *d, *old;
2652 const void *ptr = data;
2653
2655 {
2656 if (data_size != sizeof(IUnknown *))
2658 ptr = &data;
2659 }
2660
2661 if (!(d = HeapAlloc(GetProcessHeap(), 0,
2662 FIELD_OFFSET(struct wined3d_private_data, content.data[data_size]))))
2663 return E_OUTOFMEMORY;
2664
2665 d->tag = *guid;
2666 d->flags = flags;
2667 d->size = data_size;
2668
2669 memcpy(d->content.data, ptr, data_size);
2671 IUnknown_AddRef(d->content.object);
2672
2674 if (old)
2676 list_add_tail(&store->content, &d->entry);
2677
2678 return WINED3D_OK;
2679}
static void list_add_tail(struct list_entry *head, struct list_entry *entry)
Definition: list.h:83
content
Definition: atl_ax.c:990
#define HeapAlloc
Definition: compat.h:733
GUID guid
Definition: version.c:147
static PVOID ptr
Definition: dispmode.c:27
struct list entry
Definition: wpp.c:51
static struct wined3d_private_data * wined3d_private_store_get_private_data(const struct wined3d_private_store *store, const GUID *tag)
Definition: wined3d.h:2612

Referenced by d3d8_resource_set_private_data(), d3d9_resource_set_private_data(), d3d_set_private_data(), d3d_set_private_data_interface(), ddraw_surface7_SetPrivateData(), dxgi_set_private_data(), and dxgi_set_private_data_interface().

◆ wined3d_query_create()

HRESULT __cdecl wined3d_query_create ( struct wined3d_device *  device,
enum wined3d_query_type  type,
void *  parent,
const struct wined3d_parent_ops *  parent_ops,
struct wined3d_query **  query 
)

Definition at line 1988 of file query.c.

1990{
1991 TRACE("device %p, type %#x, parent %p, parent_ops %p, query %p.\n",
1992 device, type, parent, parent_ops, query);
1993
1994 return device->adapter->adapter_ops->adapter_create_query(device, type, parent, parent_ops, query);
1995}

Referenced by d3d_query_init(), and query_init().

◆ wined3d_query_decref()

ULONG __cdecl wined3d_query_decref ( struct wined3d_query *  query)

Definition at line 432 of file query.c.

433{
434 unsigned int refcount = InterlockedDecrement(&query->ref);
435
436 TRACE("%p decreasing refcount to %u.\n", query, refcount);
437
438 if (!refcount)
439 {
440 struct wined3d_device *device = query->device;
441
443 query->parent_ops->wined3d_object_destroyed(query->parent);
445 device->adapter->adapter_ops->adapter_destroy_query(query);
447 }
448
449 return refcount;
450}
static void wined3d_query_destroy_object(void *object)
Definition: query.c:422

Referenced by d3d11_query_Release(), d3d9_query_Release(), wined3d_command_list_decref(), wined3d_deferred_context_destroy(), and wined3d_device_context_set_predication().

◆ wined3d_query_get_data()

HRESULT __cdecl wined3d_query_get_data ( struct wined3d_query *  query,
void *  data,
UINT  data_size,
uint32_t  flags 
)

Definition at line 452 of file query.c.

454{
455 TRACE("query %p, data %p, data_size %u, flags %#x.\n",
456 query, data, data_size, flags);
457
458 if (query->state == QUERY_BUILDING)
459 {
460 WARN("Query is building, returning S_FALSE.\n");
461 return S_FALSE;
462 }
463
464 if (query->state == QUERY_CREATED)
465 {
466 WARN("Query wasn't started yet.\n");
468 }
469
470 if (query->counter_main != query->counter_retrieved
471 || (query->buffer_object && !wined3d_query_buffer_is_valid(query)))
472 {
473 if (flags & WINED3DGETDATA_FLUSH && !query->device->cs->queries_flushed)
474 query->device->cs->c.ops->flush(&query->device->cs->c);
475 return S_FALSE;
476 }
477 else if (!query->poll_in_cs && !query->query_ops->query_poll(query, flags))
478 {
479 return S_FALSE;
480 }
481
482 if (query->buffer_object)
483 query->data = query->map_ptr;
484
485 if (data)
486 memcpy(data, query->data, min(data_size, query->data_size));
487
488 return S_OK;
489}
static BOOL wined3d_query_buffer_is_valid(struct wined3d_query *query)
Definition: query.c:34
#define WINED3DGETDATA_FLUSH
Definition: wined3d.h:783
@ QUERY_BUILDING
@ QUERY_CREATED
#define S_FALSE
Definition: winerror.h:3451

Referenced by d3d10_query_GetData(), d3d11_device_context_GetData(), and d3d9_query_GetData().

◆ wined3d_query_get_data_size()

UINT __cdecl wined3d_query_get_data_size ( const struct wined3d_query *  query)

Definition at line 491 of file query.c.

492{
493 TRACE("query %p.\n", query);
494
495 return query->data_size;
496}

Referenced by d3d10_query_GetData(), d3d10_query_GetDataSize(), d3d11_device_context_GetData(), d3d11_query_GetDataSize(), and query_init().

◆ wined3d_query_get_parent()

void *__cdecl wined3d_query_get_parent ( const struct wined3d_query *  query)

Definition at line 570 of file query.c.

571{
572 TRACE("query %p.\n", query);
573
574 return query->parent;
575}

Referenced by d3d10_device_GetPredication(), and d3d11_device_context_GetPredication().

◆ wined3d_query_get_type()

enum wined3d_query_type __cdecl wined3d_query_get_type ( const struct wined3d_query *  query)

Definition at line 577 of file query.c.

578{
579 TRACE("query %p.\n", query);
580
581 return query->type;
582}

Referenced by d3d9_query_GetData(), and d3d9_query_GetType().

◆ wined3d_query_incref()

ULONG __cdecl wined3d_query_incref ( struct wined3d_query *  query)

Definition at line 413 of file query.c.

414{
415 unsigned int refcount = InterlockedIncrement(&query->ref);
416
417 TRACE("%p increasing refcount to %u.\n", query, refcount);
418
419 return refcount;
420}

Referenced by d3d11_query_AddRef(), wined3d_deferred_context_issue_query(), and wined3d_device_context_set_predication().

◆ wined3d_query_issue()

HRESULT __cdecl wined3d_query_issue ( struct wined3d_query *  query,
uint32_t  flags 
)

Definition at line 498 of file query.c.

499{
500 TRACE("query %p, flags %#x.\n", query, flags);
501
503
504 return WINED3D_OK;
505}
void CDECL wined3d_device_context_issue_query(struct wined3d_device_context *context, struct wined3d_query *query, unsigned int flags)
Definition: device.c:4639

Referenced by d3d10_query_Begin(), d3d10_query_End(), and d3d9_query_Issue().

◆ wined3d_rasterizer_state_create()

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 at line 470 of file device.c.

473{
475
476 TRACE("device %p, desc %p, parent %p, parent_ops %p, state %p.\n",
478
479 if (!(object = calloc(1, sizeof(*object))))
480 return E_OUTOFMEMORY;
481
482 object->refcount = 1;
483 object->desc = *desc;
484 object->parent = parent;
485 object->parent_ops = parent_ops;
486 object->device = device;
487
488 TRACE("Created rasterizer state %p.\n", object);
489 *state = object;
490
491 return WINED3D_OK;
492}
struct wined3d_device * device
const struct wined3d_parent_ops * parent_ops

Referenced by d3d_rasterizer_state_init(), and wined3d_stateblock_apply_clear_state().

◆ wined3d_rasterizer_state_decref()

ULONG __cdecl wined3d_rasterizer_state_decref ( struct wined3d_rasterizer_state *  state)

Definition at line 446 of file device.c.

447{
448 unsigned int refcount = wined3d_atomic_decrement_mutex_lock(&state->refcount);
449 struct wined3d_device *device = state->device;
450
451 TRACE("%p decreasing refcount to %u.\n", state, refcount);
452
453 if (!refcount)
454 {
455 state->parent_ops->wined3d_object_destroyed(state->parent);
458 }
459
460 return refcount;
461}
static void wined3d_rasterizer_state_destroy_object(void *object)
Definition: device.c:439

Referenced by d3d11_rasterizer_state_Release(), device_free_rasterizer_state(), wined3d_cs_packet_decref_objects(), wined3d_device_context_set_rasterizer_state(), and wined3d_stateblock_apply_clear_state().

◆ wined3d_rasterizer_state_get_parent()

void *__cdecl wined3d_rasterizer_state_get_parent ( const struct wined3d_rasterizer_state *  state)

Definition at line 463 of file device.c.

464{
465 TRACE("rasterizer_state %p.\n", state);
466
467 return state->parent;
468}

Referenced by d3d10_device_RSGetState(), and d3d11_device_context_RSGetState().

◆ wined3d_rasterizer_state_incref()

ULONG __cdecl wined3d_rasterizer_state_incref ( struct wined3d_rasterizer_state *  state)

Definition at line 430 of file device.c.

431{
432 unsigned int refcount = InterlockedIncrement(&state->refcount);
433
434 TRACE("%p increasing refcount to %u.\n", state, refcount);
435
436 return refcount;
437}

Referenced by d3d11_rasterizer_state_AddRef(), wined3d_cs_packet_incref_objects(), and wined3d_device_context_set_rasterizer_state().

◆ wined3d_register_software_device()

HRESULT __cdecl wined3d_register_software_device ( struct wined3d *  wined3d,
void *  init_function 
)

Definition at line 1231 of file directx.c.

1232{
1233 FIXME("wined3d %p, init_function %p stub!\n", wined3d, init_function);
1234
1235 return WINED3D_OK;
1236}

Referenced by d3d8_RegisterSoftwareDevice(), and d3d9_RegisterSoftwareDevice().

◆ wined3d_register_window()

BOOL __cdecl wined3d_register_window ( struct wined3d *  wined3d,
HWND  window,
struct wined3d_device *  device,
unsigned int  flags 
)

Definition at line 715 of file wined3d_main.c.

717{
718 struct wined3d_wndproc *entry;
719
720 TRACE("wined3d %p, window %p, device %p, flags %#x.\n", wined3d, window, device, flags);
721
723
725 {
726 if (!wined3d)
727 WARN("Window %p is already registered with wined3d.\n", window);
728 entry->flags = flags;
730 return TRUE;
731 }
732
733 if (!wined3d_array_reserve((void **)&wndproc_table.entries, &wndproc_table.size,
734 wndproc_table.count + 1, sizeof(*entry)))
735 {
737 ERR("Failed to grow table.\n");
738 return FALSE;
739 }
740
741 entry = &wndproc_table.entries[wndproc_table.count++];
742 entry->window = window;
743 entry->unicode = IsWindowUnicode(window);
744 if (!wined3d)
745 {
746 /* Set a window proc that matches the window. Some applications (e.g.
747 * NoX) replace the window proc after we've set ours, and expect to be
748 * able to call the previous one (ours) directly, without using
749 * CallWindowProc(). */
750 if (entry->unicode)
752 else
754 }
755 else
756 {
757 entry->proc = NULL;
758 }
759 entry->device = device;
760 entry->wined3d = wined3d;
761 entry->flags = flags;
762
764
765 return TRUE;
766}
BOOL wined3d_array_reserve(void **elements, SIZE_T *capacity, SIZE_T count, SIZE_T size)
Definition: utils.c:6740
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
#define SetWindowLongPtrA
Definition: winuser.h:5511
BOOL WINAPI IsWindowUnicode(_In_ HWND)
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: winuser.h:3014
#define SetWindowLongPtrW
Definition: winuser.h:5512
struct wined3d * wined3d
Definition: wined3d_main.c:41
struct wined3d_device * device
Definition: wined3d_main.c:46
#define GWLP_WNDPROC
Definition: treelist.c:66
static struct wined3d_wndproc * wined3d_find_wndproc(HWND window, struct wined3d *wined3d)
Definition: wined3d_main.c:590
static struct wined3d_wndproc_table wndproc_table
Definition: wined3d_main.c:81
static void wined3d_wndproc_mutex_lock(void)
Definition: wined3d_main.c:549
static void wined3d_wndproc_mutex_unlock(void)
Definition: wined3d_main.c:554

Referenced by dxgi_factory_MakeWindowAssociation(), and wined3d_device_acquire_focus_window().

◆ wined3d_rendertarget_view_create()

HRESULT __cdecl wined3d_rendertarget_view_create ( const struct wined3d_view_desc *  desc,
struct wined3d_resource *  resource,
void *  parent,
const struct wined3d_parent_ops *  parent_ops,
struct wined3d_rendertarget_view **  view 
)

Definition at line 933 of file view.c.

936{
937 const struct wined3d_adapter_ops *adapter_ops;
938
939 TRACE("desc %s, resource %p, parent %p, parent_ops %p, view %p.\n",
941
942 adapter_ops = resource->device->adapter->adapter_ops;
943 return adapter_ops->adapter_create_rendertarget_view(desc, resource, parent, parent_ops, view);
944}
const char * wined3d_debug_view_desc(const struct wined3d_view_desc *d, const struct wined3d_resource *resource)
Definition: utils.c:4867
HRESULT(* adapter_create_rendertarget_view)(const struct wined3d_view_desc *desc, struct wined3d_resource *resource, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_rendertarget_view **view)

Referenced by d3d_depthstencil_view_init(), d3d_rendertarget_view_init(), wined3d_device_reset(), wined3d_device_set_implicit_swapchain(), wined3d_rendertarget_view_create_from_sub_resource(), and wined3d_swapchain_init().

◆ wined3d_rendertarget_view_create_from_sub_resource()

HRESULT __cdecl wined3d_rendertarget_view_create_from_sub_resource ( struct wined3d_texture *  texture,
unsigned int  sub_resource_idx,
void *  parent,
const struct wined3d_parent_ops *  parent_ops,
struct wined3d_rendertarget_view **  view 
)

Definition at line 946 of file view.c.

949{
950 struct wined3d_view_desc desc;
951
952 TRACE("texture %p, sub_resource_idx %u, parent %p, parent_ops %p, view %p.\n",
953 texture, sub_resource_idx, parent, parent_ops, view);
954
955 desc.format_id = texture->resource.format->id;
956 desc.flags = 0;
957 desc.u.texture.level_idx = sub_resource_idx % texture->level_count;
958 desc.u.texture.level_count = 1;
959 desc.u.texture.layer_idx = sub_resource_idx / texture->level_count;
960 desc.u.texture.layer_count = 1;
961
962 return wined3d_rendertarget_view_create(&desc, &texture->resource, parent, parent_ops, view);
963}

Referenced by d3d8_surface_acquire_rendertarget_view(), d3d9_surface_acquire_rendertarget_view(), and ddraw_surface_get_rendertarget_view().

◆ wined3d_rendertarget_view_decref()

ULONG __cdecl wined3d_rendertarget_view_decref ( struct wined3d_rendertarget_view *  view)

Definition at line 379 of file view.c.

380{
381 unsigned int refcount = InterlockedDecrement(&view->refcount);
382
383 TRACE("%p decreasing refcount to %u.\n", view, refcount);
384
385 if (!refcount)
386 {
387 struct wined3d_resource *resource = view->resource;
388
389 /* Release the resource after destroying the view.
390 * See wined3d_shader_resource_view_decref(). */
392 resource->device->adapter->adapter_ops->adapter_destroy_rendertarget_view(view);
395 }
396
397 return refcount;
398}

Referenced by d3d11_depthstencil_view_Release(), d3d11_rendertarget_view_Release(), d3d8_surface_Release(), d3d8_texture_decref(), d3d9_surface_Release(), d3d9_texture_decref(), ddraw_surface7_SetSurfaceDesc(), ddraw_surface_cleanup(), state_unbind_resources(), wined3d_cs_packet_decref_objects(), wined3d_device_context_set_depth_stencil_view(), wined3d_device_context_set_rendertarget_views(), wined3d_device_reset(), and wined3d_device_uninit_3d().

◆ wined3d_rendertarget_view_get_parent()

void *__cdecl wined3d_rendertarget_view_get_parent ( const struct wined3d_rendertarget_view *  view)

Definition at line 400 of file view.c.

401{
402 TRACE("view %p.\n", view);
403
404 return view->parent;
405}

Referenced by d3d10_device_OMGetRenderTargets(), d3d11_device_context_OMGetRenderTargets(), and d3d_device_sync_rendertarget().

◆ wined3d_rendertarget_view_get_resource()

struct wined3d_resource *__cdecl wined3d_rendertarget_view_get_resource ( const struct wined3d_rendertarget_view *  view)

Definition at line 430 of file view.c.

431{
432 TRACE("view %p.\n", view);
433
434 return view->resource;
435}

Referenced by d3d8_device_Reset(), d3d8_swapchain_create(), d3d9_device_reset(), d3d9_swapchain_create(), and resolve_depth_buffer().

◆ wined3d_rendertarget_view_get_sub_resource_parent()

void *__cdecl wined3d_rendertarget_view_get_sub_resource_parent ( const struct wined3d_rendertarget_view *  view)

Definition at line 407 of file view.c.

408{
409 struct wined3d_texture *texture;
410
411 TRACE("view %p.\n", view);
412
413 if (view->resource->type == WINED3D_RTYPE_BUFFER)
415
417
418 return texture->sub_resources[view->sub_resource_idx].parent;
419}
void *CDECL wined3d_buffer_get_parent(const struct wined3d_buffer *buffer)
Definition: buffer.c:476
static struct wined3d_buffer * buffer_from_resource(struct wined3d_resource *resource)

Referenced by d3d8_device_GetDepthStencilSurface(), d3d8_device_GetRenderTarget(), d3d8_device_SetRenderTarget(), d3d8_device_SetViewport(), d3d9_device_GetDepthStencilSurface(), d3d9_device_GetRenderTarget(), d3d9_device_reset(), d3d_device7_SetViewport(), d3d_viewport_SetViewport(), d3d_viewport_SetViewport2(), device_init(), and resolve_depth_buffer().

◆ wined3d_rendertarget_view_incref()

◆ wined3d_rendertarget_view_set_parent()

void __cdecl wined3d_rendertarget_view_set_parent ( struct wined3d_rendertarget_view *  view,
void *  parent,
const struct wined3d_parent_ops *  parent_ops 
)

Definition at line 421 of file view.c.

423{
424 TRACE("view %p, parent %p, parent_ops %p.\n", view, parent, parent_ops);
425
426 view->parent = parent;
427 view->parent_ops = parent_ops;
428}

Referenced by ddraw_surface7_SetSurfaceDesc(), and ddraw_texture_rename_to().

◆ wined3d_resource_get_desc()

◆ wined3d_resource_get_parent()

void *__cdecl wined3d_resource_get_parent ( const struct wined3d_resource *  resource)

Definition at line 269 of file resource.c.

270{
271 return resource->parent;
272}

Referenced by reset_enum_callback().

◆ wined3d_resource_get_priority()

◆ wined3d_resource_map()

HRESULT __cdecl wined3d_resource_map ( struct wined3d_resource *  resource,
unsigned int  sub_resource_idx,
struct wined3d_map_desc *  map_desc,
const struct wined3d_box *  box,
uint32_t  flags 
)

◆ wined3d_resource_preload()

void __cdecl wined3d_resource_preload ( struct wined3d_resource *  resource)

Definition at line 311 of file resource.c.

312{
314}
void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource)
Definition: cs.c:2419

Referenced by d3d8_indexbuffer_PreLoad(), d3d8_texture_preload(), d3d8_vertexbuffer_PreLoad(), d3d9_indexbuffer_PreLoad(), d3d9_surface_PreLoad(), d3d9_texture_preload(), d3d9_vertexbuffer_PreLoad(), and d3d_device7_PreLoad().

◆ wined3d_resource_set_parent()

void __cdecl wined3d_resource_set_parent ( struct wined3d_resource *  resource,
void *  parent,
const struct wined3d_parent_ops *  parent_ops 
)

Definition at line 274 of file resource.c.

275{
276 resource->parent = parent;
277 resource->parent_ops = parent_ops;
278}

Referenced by d3d_texture2d_create(), ddraw_surface7_SetSurfaceDesc(), ddraw_texture_init(), and ddraw_texture_rename_to().

◆ wined3d_resource_set_priority()

unsigned int __cdecl wined3d_resource_set_priority ( struct wined3d_resource *  resource,
unsigned int  priority 
)

Definition at line 247 of file resource.c.

248{
249 unsigned int prev;
250
251 if (!(resource->usage & WINED3DUSAGE_MANAGED))
252 {
253 WARN("Called on non-managed resource %p, ignoring.\n", resource);
254 return 0;
255 }
256
257 prev = resource->priority;
258 resource->priority = priority;
259 TRACE("resource %p, new priority %u, returning old priority %u.\n", resource, priority, prev);
260 return prev;
261}
static int priority
Definition: timer.c:163

Referenced by d3d8_indexbuffer_SetPriority(), d3d8_texture_2d_SetPriority(), d3d8_texture_3d_SetPriority(), d3d8_texture_cube_SetPriority(), d3d8_vertexbuffer_SetPriority(), d3d9_indexbuffer_SetPriority(), d3d9_texture_2d_SetPriority(), d3d9_texture_3d_SetPriority(), d3d9_texture_cube_SetPriority(), d3d9_vertexbuffer_SetPriority(), and ddraw_surface7_SetPriority().

◆ wined3d_resource_unmap()

◆ wined3d_restore_display_modes()

HRESULT __cdecl wined3d_restore_display_modes ( struct wined3d *  wined3d)

Definition at line 1618 of file directx.c.

1619{
1620 unsigned int adapter_idx, output_idx = 0;
1621 DEVMODEW current_mode, registry_mode;
1622 struct wined3d_adapter *adapter;
1623 DISPLAY_DEVICEW display_device;
1624 struct wined3d_output *output;
1625 BOOL do_mode_change = FALSE;
1626 LONG ret;
1627
1628 TRACE("wined3d %p.\n", wined3d);
1629
1630 memset(&current_mode, 0, sizeof(current_mode));
1631 memset(&registry_mode, 0, sizeof(registry_mode));
1632 current_mode.dmSize = sizeof(current_mode);
1633 registry_mode.dmSize = sizeof(registry_mode);
1634 display_device.cb = sizeof(display_device);
1635 while (EnumDisplayDevicesW(NULL, output_idx++, &display_device, 0))
1636 {
1637 if (!EnumDisplaySettingsExW(display_device.DeviceName, ENUM_CURRENT_SETTINGS, &current_mode, 0))
1638 {
1639 ERR("Failed to read the current display mode for %s.\n",
1640 wine_dbgstr_w(display_device.DeviceName));
1642 }
1643
1644 if (!EnumDisplaySettingsExW(display_device.DeviceName, ENUM_REGISTRY_SETTINGS, &registry_mode, 0))
1645 {
1646 ERR("Failed to read the registry display mode for %s.\n",
1647 wine_dbgstr_w(display_device.DeviceName));
1649 }
1650
1651 if (!equal_display_mode(&current_mode, &registry_mode))
1652 {
1653 do_mode_change = TRUE;
1654 break;
1655 }
1656 }
1657
1658 if (do_mode_change)
1659 {
1662 {
1663 ERR("Failed to restore all outputs to their registry display settings, error %ld.\n", ret);
1665 }
1666 }
1667 else
1668 {
1669 TRACE("Skipping redundant mode setting call.\n");
1670 }
1671
1672 for (adapter_idx = 0; adapter_idx < wined3d->adapter_count; ++adapter_idx)
1673 {
1674 adapter = wined3d->adapters[adapter_idx];
1675 for (output_idx = 0; output_idx < adapter->output_count; ++output_idx)
1676 {
1677 output = &adapter->outputs[output_idx];
1678
1679 if (!EnumDisplaySettingsExW(output->device_name, ENUM_CURRENT_SETTINGS, &current_mode, 0))
1680 {
1681 ERR("Failed to read the current display mode for %s.\n",
1682 wine_dbgstr_w(output->device_name));
1684 }
1685
1686 output->screen_format = pixelformat_for_depth(current_mode.dmBitsPerPel);
1687 }
1688 }
1689
1690 return WINED3D_OK;
1691}
#define wine_dbgstr_w
Definition: kernel32.h:34
#define ENUM_REGISTRY_SETTINGS
Definition: winuser.h:180
WCHAR DeviceName[32]
Definition: wingdi.h:3264
BOOL WINAPI EnumDisplayDevicesW(LPCWSTR lpDevice, DWORD iDevNum, PDISPLAY_DEVICEW lpDisplayDevice, DWORD dwFlags)
Definition: display.c:78

Referenced by ddraw7_RestoreDisplayMode(), wined3d_swapchain_activate(), wined3d_swapchain_cleanup(), wined3d_swapchain_init(), wined3d_swapchain_state_set_display_mode(), and wined3d_swapchain_state_set_fullscreen().

◆ wined3d_sampler_create()

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 at line 287 of file sampler.c.

289{
290 TRACE("device %p, desc %p, parent %p, parent_ops %p, sampler %p.\n",
291 device, desc, parent, parent_ops, sampler);
292
293 if (desc->address_u < WINED3D_TADDRESS_WRAP || desc->address_u > WINED3D_TADDRESS_MIRROR_ONCE
294 || desc->address_v < WINED3D_TADDRESS_WRAP || desc->address_v > WINED3D_TADDRESS_MIRROR_ONCE
295 || desc->address_w < WINED3D_TADDRESS_WRAP || desc->address_w > WINED3D_TADDRESS_MIRROR_ONCE)
297
298 if (desc->mag_filter < WINED3D_TEXF_POINT || desc->mag_filter > WINED3D_TEXF_LINEAR
299 || desc->min_filter < WINED3D_TEXF_POINT || desc->min_filter > WINED3D_TEXF_LINEAR
300 || desc->mip_filter > WINED3D_TEXF_LINEAR)
302
303 return device->adapter->adapter_ops->adapter_create_sampler(device, desc, parent, parent_ops, sampler);
304}

Referenced by d3d_sampler_state_init(), wined3d_device_apply_stateblock(), and wined3d_device_create_default_samplers().

◆ wined3d_sampler_decref()

ULONG __cdecl wined3d_sampler_decref ( struct wined3d_sampler *  sampler)

Definition at line 35 of file sampler.c.

36{
37 unsigned int refcount = wined3d_atomic_decrement_mutex_lock(&sampler->refcount);
38
39 TRACE("%p decreasing refcount to %u.\n", sampler, refcount);
40
41 if (!refcount)
42 {
43 sampler->parent_ops->wined3d_object_destroyed(sampler->parent);
44 sampler->device->adapter->adapter_ops->adapter_destroy_sampler(sampler);
46 }
47
48 return refcount;
49}

Referenced by d3d11_sampler_state_Release(), device_free_sampler(), state_unbind_resources(), wined3d_cs_packet_decref_objects(), wined3d_device_apply_stateblock(), wined3d_device_context_set_samplers(), and wined3d_device_destroy_default_samplers().

◆ wined3d_sampler_get_parent()

◆ wined3d_sampler_incref()

ULONG __cdecl wined3d_sampler_incref ( struct wined3d_sampler *  sampler)

Definition at line 26 of file sampler.c.

27{
28 unsigned int refcount = InterlockedIncrement(&sampler->refcount);
29
30 TRACE("%p increasing refcount to %u.\n", sampler, refcount);
31
32 return refcount;
33}

Referenced by d3d11_sampler_state_AddRef(), wined3d_cs_packet_incref_objects(), and wined3d_device_context_set_samplers().

◆ wined3d_shader_create_cs()

HRESULT __cdecl wined3d_shader_create_cs ( struct wined3d_device *  device,
const struct wined3d_shader_desc *  desc,
void *  parent,
const struct wined3d_parent_ops *  parent_ops,
struct wined3d_shader **  shader 
)

Definition at line 3176 of file shader.c.

3178{
3179 struct wined3d_shader *object;
3180 HRESULT hr;
3181
3182 TRACE("device %p, desc %p, parent %p, parent_ops %p, shader %p.\n",
3184
3185 if (!(object = calloc(1, sizeof(*object))))
3186 return E_OUTOFMEMORY;
3187
3189
3191 {
3192 shader_cleanup(object);
3193 free(object);
3194 return hr;
3195 }
3196
3198
3199 TRACE("Created compute shader %p.\n", object);
3200 *shader = object;
3201
3202 return WINED3D_OK;
3203}
void wined3d_cs_init_object(struct wined3d_cs *cs, void(*callback)(void *object), void *object)
Definition: cs.c:2304
static HRESULT shader_set_function(struct wined3d_shader *shader, const struct wined3d_shader_desc *desc, enum wined3d_shader_type type, const struct wined3d_stream_output_desc *so_desc, unsigned int float_const_count)
Definition: shader.c:2319
static void shader_init(struct wined3d_shader *shader, struct wined3d_device *device, void *parent, const struct wined3d_parent_ops *parent_ops)
Definition: shader.c:2786
static void shader_cleanup(struct wined3d_shader *shader)
Definition: shader.c:1927
static void wined3d_shader_init_object(void *object)
Definition: shader.c:2544
const struct wined3d_parent_ops * parent_ops

Referenced by d3d11_compute_shader_init().

◆ wined3d_shader_create_ds()

HRESULT __cdecl wined3d_shader_create_ds ( struct wined3d_device *  device,
const struct wined3d_shader_desc *  desc,
void *  parent,
const struct wined3d_parent_ops *  parent_ops,
struct wined3d_shader **  shader 
)

Definition at line 3205 of file shader.c.

3207{
3208 struct wined3d_shader *object;
3209 HRESULT hr;
3210
3211 TRACE("device %p, desc %p, parent %p, parent_ops %p, shader %p.\n",
3213
3214 if (!(object = calloc(1, sizeof(*object))))
3215 return E_OUTOFMEMORY;
3216
3218
3220 {
3221 shader_cleanup(object);
3222 free(object);
3223 return hr;
3224 }
3225
3227
3228 TRACE("Created domain shader %p.\n", object);
3229 *shader = object;
3230
3231 return WINED3D_OK;
3232}

Referenced by d3d11_domain_shader_init().

◆ wined3d_shader_create_gs()

HRESULT __cdecl wined3d_shader_create_gs ( struct wined3d_device *  device,
const struct wined3d_shader_desc *  desc,
const struct wined3d_stream_output_desc *  so_desc,
void *  parent,
const struct wined3d_parent_ops *  parent_ops,
struct wined3d_shader **  shader 
)

Definition at line 3234 of file shader.c.

3237{
3238 struct wined3d_shader *object;
3239 HRESULT hr;
3240
3241 TRACE("device %p, desc %p, so_desc %p, parent %p, parent_ops %p, shader %p.\n",
3242 device, desc, so_desc, parent, parent_ops, shader);
3243
3244 if (!(object = calloc(1, sizeof(*object))))
3245 return E_OUTOFMEMORY;
3246
3247 if (FAILED(hr = geometry_shader_init(object, device, desc, so_desc, parent, parent_ops)))
3248 {
3249 WARN("Failed to initialize geometry shader, hr %#lx.\n", hr);
3250 free(object);
3251 return hr;
3252 }
3253
3255
3256 TRACE("Created geometry shader %p.\n", object);
3257 *shader = object;
3258
3259 return WINED3D_OK;
3260}
static HRESULT geometry_shader_init(struct wined3d_shader *shader, struct wined3d_device *device, const struct wined3d_shader_desc *desc, const struct wined3d_stream_output_desc *so_desc, void *parent, const struct wined3d_parent_ops *parent_ops)
Definition: shader.c:2820

Referenced by d3d_geometry_shader_init().

◆ wined3d_shader_create_hs()

HRESULT __cdecl wined3d_shader_create_hs ( struct wined3d_device *  device,
const struct wined3d_shader_desc *  desc,
void *  parent,
const struct wined3d_parent_ops *  parent_ops,
struct wined3d_shader **  shader 
)

Definition at line 3262 of file shader.c.

3264{
3265 struct wined3d_shader *object;
3266 HRESULT hr;
3267
3268 TRACE("device %p, desc %p, parent %p, parent_ops %p, shader %p.\n",
3270
3271 if (!(object = calloc(1, sizeof(*object))))
3272 return E_OUTOFMEMORY;
3273
3275
3277 {
3278 shader_cleanup(object);
3279 free(object);
3280 return hr;
3281 }
3282
3284
3285 TRACE("Created hull shader %p.\n", object);
3286 *shader = object;
3287
3288 return WINED3D_OK;
3289}

Referenced by d3d11_hull_shader_init().

◆ wined3d_shader_create_ps()

HRESULT __cdecl wined3d_shader_create_ps ( struct wined3d_device *  device,
const struct wined3d_shader_desc *  desc,
void *  parent,
const struct wined3d_parent_ops *  parent_ops,
struct wined3d_shader **  shader 
)

Definition at line 3291 of file shader.c.

3293{
3294 struct wined3d_shader *object;
3295 HRESULT hr;
3296
3297 TRACE("device %p, desc %p, parent %p, parent_ops %p, shader %p.\n",
3299
3300 if (!(object = calloc(1, sizeof(*object))))
3301 return E_OUTOFMEMORY;
3302
3304 {
3305 WARN("Failed to initialize pixel shader, hr %#lx.\n", hr);
3306 free(object);
3307 return hr;
3308 }
3309
3311
3312 TRACE("Created pixel shader %p.\n", object);
3313 *shader = object;
3314
3315 return WINED3D_OK;
3316}
static HRESULT pixel_shader_init(struct wined3d_shader *shader, struct wined3d_device *device, const struct wined3d_shader_desc *desc, void *parent, const struct wined3d_parent_ops *parent_ops)
Definition: shader.c:3135

Referenced by d3d8_pixel_shader_init(), d3d_pixel_shader_init(), and pixelshader_init().

◆ wined3d_shader_create_vs()

HRESULT __cdecl wined3d_shader_create_vs ( struct wined3d_device *  device,
const struct wined3d_shader_desc *  desc,
void *  parent,
const struct wined3d_parent_ops *  parent_ops,
struct wined3d_shader **  shader 
)

Definition at line 3318 of file shader.c.

3320{
3321 struct wined3d_shader *object;
3322 HRESULT hr;
3323
3324 TRACE("device %p, desc %p, parent %p, parent_ops %p, shader %p.\n",
3326
3327 if (!(object = calloc(1, sizeof(*object))))
3328 return E_OUTOFMEMORY;
3329
3331 {
3332 WARN("Failed to initialize vertex shader, hr %#lx.\n", hr);
3333 free(object);
3334 return hr;
3335 }
3336
3338
3339 TRACE("Created vertex shader %p.\n", object);
3340 *shader = object;
3341
3342 return WINED3D_OK;
3343}
static HRESULT vertex_shader_init(struct wined3d_shader *shader, struct wined3d_device *device, const struct wined3d_shader_desc *desc, void *parent, const struct wined3d_parent_ops *parent_ops)
Definition: shader.c:2803

Referenced by d3d8_vertex_shader_init(), d3d_vertex_shader_init(), and vertexshader_init().

◆ wined3d_shader_decref()

◆ wined3d_shader_get_byte_code()

HRESULT __cdecl wined3d_shader_get_byte_code ( const struct wined3d_shader *  shader,
void *  byte_code,
UINT *  byte_code_size 
)

Definition at line 2612 of file shader.c.

2614{
2615 TRACE("shader %p, byte_code %p, byte_code_size %p.\n", shader, byte_code, byte_code_size);
2616
2617 if (!byte_code)
2618 {
2619 *byte_code_size = shader->byte_code_size;
2620 return WINED3D_OK;
2621 }
2622
2623 if (*byte_code_size < shader->byte_code_size)
2624 {
2625 /* MSDN claims (for d3d8 at least) that if *byte_code_size is smaller
2626 * than the required size we should write the required size and
2627 * return D3DERR_MOREDATA. That's not actually true. */
2629 }
2630
2631 memcpy(byte_code, shader->byte_code, shader->byte_code_size);
2632
2633 return WINED3D_OK;
2634}

Referenced by d3d8_device_GetPixelShaderFunction(), d3d8_device_GetVertexShaderFunction(), d3d9_pixelshader_GetFunction(), and d3d9_vertexshader_GetFunction().

◆ wined3d_shader_get_parent()

◆ wined3d_shader_incref()

◆ wined3d_shader_resource_view_create()

HRESULT __cdecl wined3d_shader_resource_view_create ( const struct wined3d_view_desc *  desc,
struct wined3d_resource *  resource,
void *  parent,
const struct wined3d_parent_ops *  parent_ops,
struct wined3d_shader_resource_view **  view 
)

Definition at line 1261 of file view.c.

1264{
1265 const struct wined3d_adapter_ops *adapter_ops;
1266
1267 TRACE("desc %s, resource %p, parent %p, parent_ops %p, view %p.\n",
1269
1270 adapter_ops = resource->device->adapter->adapter_ops;
1271 return adapter_ops->adapter_create_shader_resource_view(desc, resource, parent, parent_ops, view);
1272}
HRESULT(* adapter_create_shader_resource_view)(const struct wined3d_view_desc *desc, struct wined3d_resource *resource, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_shader_resource_view **view)

Referenced by d3d_shader_resource_view_init(), and wined3d_texture_acquire_identity_srv().

◆ wined3d_shader_resource_view_decref()

ULONG __cdecl wined3d_shader_resource_view_decref ( struct wined3d_shader_resource_view *  view)

Definition at line 990 of file view.c.

991{
992 unsigned int refcount;
993
994 if (view->desc.flags & WINED3D_VIEW_FORWARD_REFERENCE)
995 return wined3d_resource_decref(view->resource);
996
997 refcount = InterlockedDecrement(&view->refcount);
998 TRACE("%p decreasing refcount to %u.\n", view, refcount);
999
1000 if (!refcount)
1001 {
1002 struct wined3d_resource *resource = view->resource;
1003
1004 /* Release the resource after destroying the view:
1005 * - adapter_destroy_shader_resource_view() needs a reference to the
1006 * device, which the resource implicitly provides.
1007 * - We shouldn't free buffer resources until after we've removed the
1008 * view from its bo_user list. */
1011 }
1012
1013 return refcount;
1014}
void wined3d_shader_resource_view_destroy(struct wined3d_shader_resource_view *view)
Definition: view.c:983
#define WINED3D_VIEW_FORWARD_REFERENCE
Definition: wined3d.h:1588

Referenced by d3d11_shader_resource_view_Release(), state_unbind_resources(), wined3d_cs_packet_decref_objects(), wined3d_device_context_set_shader_resource_views(), wined3d_device_set_texture(), and wined3d_texture_acquire_identity_srv().

◆ wined3d_shader_resource_view_get_parent()

◆ wined3d_shader_resource_view_incref()

ULONG __cdecl wined3d_shader_resource_view_incref ( struct wined3d_shader_resource_view *  view)

Definition at line 965 of file view.c.

966{
967 unsigned int refcount;
968
969 if (view->desc.flags & WINED3D_VIEW_FORWARD_REFERENCE)
970 return wined3d_resource_incref(view->resource);
971
972 refcount = InterlockedIncrement(&view->refcount);
973 TRACE("%p increasing refcount to %u.\n", view, refcount);
974
975 return refcount;
976}
static ULONG wined3d_resource_incref(struct wined3d_resource *resource)

Referenced by d3d11_shader_resource_view_AddRef(), wined3d_cs_packet_incref_objects(), wined3d_device_context_set_shader_resource_views(), and wined3d_device_set_texture().

◆ wined3d_shader_set_local_constants_float()

HRESULT __cdecl wined3d_shader_set_local_constants_float ( struct wined3d_shader *  shader,
UINT  start_idx,
const float *  src_data,
UINT  vector4f_count 
)

Definition at line 2637 of file shader.c.

2639{
2640 UINT end_idx = start_idx + count;
2641 UINT i;
2642
2643 TRACE("shader %p, start_idx %u, src_data %p, count %u.\n", shader, start_idx, src_data, count);
2644
2645 if (end_idx > shader->limits->constant_float)
2646 {
2647 WARN("end_idx %u > float constants limit %u.\n",
2648 end_idx, shader->limits->constant_float);
2649 end_idx = shader->limits->constant_float;
2650 }
2651
2652 for (i = start_idx; i < end_idx; ++i)
2653 {
2654 struct wined3d_shader_lconst *lconst;
2655 float *value;
2656
2657 if (!(lconst = malloc(sizeof(*lconst))))
2658 return E_OUTOFMEMORY;
2659
2660 lconst->idx = i;
2661 value = (float *)lconst->value;
2662 memcpy(value, src_data + (i - start_idx) * 4 /* 4 components */, 4 * sizeof(float));
2663 list_add_head(&shader->constantsF, &lconst->entry);
2664
2665 if (isinf(value[0]) || isnan(value[0]) || isinf(value[1]) || isnan(value[1])
2666 || isinf(value[2]) || isnan(value[2]) || isinf(value[3]) || isnan(value[3]))
2667 {
2668 shader->lconst_inf_or_nan = TRUE;
2669 }
2670 }
2671
2672 return WINED3D_OK;
2673}
#define isinf(x)
Definition: math.h:359
#define isnan(x)
Definition: math.h:360
static float(__cdecl *square_half_float)(float x

Referenced by load_local_constants().

◆ wined3d_state_create()

HRESULT __cdecl wined3d_state_create ( struct wined3d_device *  device,
const enum wined3d_feature_level *  levels,
unsigned int  level_count,
struct wined3d_state **  state 
)

Definition at line 2357 of file stateblock.c.

2359{
2360 enum wined3d_feature_level feature_level;
2361 struct wined3d_state *object;
2362
2363 TRACE("device %p, levels %p, level_count %u, state %p.\n", device, levels, level_count, state);
2364
2365 if (!wined3d_select_feature_level(device->adapter, levels, level_count, &feature_level))
2366 return E_FAIL;
2367
2368 TRACE("Selected feature level %s.\n", wined3d_debug_feature_level(feature_level));
2369
2370 if (!(object = calloc(1, sizeof(*object))))
2371 return E_OUTOFMEMORY;
2372 state_init(object, &device->adapter->d3d_info, WINED3D_STATE_INIT_DEFAULT, feature_level);
2373
2374 *state = object;
2375 return S_OK;
2376}
const char * wined3d_debug_feature_level(enum wined3d_feature_level level)
Definition: utils.c:6619
GLsizei levels
Definition: glext.h:7884
enum wined3d_feature_level feature_level
static bool wined3d_select_feature_level(const struct wined3d_adapter *adapter, const enum wined3d_feature_level *levels, unsigned int level_count, enum wined3d_feature_level *selected_level)
Definition: stateblock.c:2336
void state_init(struct wined3d_state *state, const struct wined3d_d3d_info *d3d_info, uint32_t flags, enum wined3d_feature_level feature_level)
Definition: stateblock.c:2324
wined3d_feature_level
Definition: wined3d.h:98
#define WINED3D_STATE_INIT_DEFAULT

Referenced by d3d11_device_CreateDeviceContextState(), d3d_device_context_state_get_wined3d_state(), wined3d_cs_create(), and wined3d_deferred_context_create().

◆ wined3d_state_destroy()

◆ wined3d_state_get_feature_level()

enum wined3d_feature_level __cdecl wined3d_state_get_feature_level ( const struct wined3d_state *  state)

Definition at line 2378 of file stateblock.c.

2379{
2380 TRACE("state %p.\n", state);
2381
2382 return state->feature_level;
2383}

Referenced by d3d11_device_CreateDeviceContextState(), and device_parent_wined3d_device_created().

◆ wined3d_stateblock_apply()

void __cdecl wined3d_stateblock_apply ( const struct wined3d_stateblock *  stateblock,
struct wined3d_stateblock *  device_state 
)

Definition at line 1156 of file stateblock.c.

1158{
1159 const struct wined3d_stateblock_state *state = &stateblock->stateblock_state;
1160 struct wined3d_range range;
1161 unsigned int i, start;
1162 uint32_t map;
1163
1164 TRACE("stateblock %p, device_state %p.\n", stateblock, device_state);
1165
1166 if (stateblock->changed.vertexShader)
1168 if (stateblock->changed.pixelShader)
1170
1171 for (start = 0; ; start = range.offset + range.size)
1172 {
1173 if (!wined3d_bitmap_get_range(stateblock->changed.vs_consts_f, WINED3D_MAX_VS_CONSTS_F, start, &range))
1174 break;
1175 wined3d_stateblock_set_vs_consts_f(device_state, range.offset, range.size, &state->vs_consts_f[range.offset]);
1176 }
1177 map = stateblock->changed.vertexShaderConstantsI;
1178 for (start = 0; ; start = range.offset + range.size)
1179 {
1181 break;
1182 wined3d_stateblock_set_vs_consts_i(device_state, range.offset, range.size, &state->vs_consts_i[range.offset]);
1183 }
1184 map = stateblock->changed.vertexShaderConstantsB;
1185 for (start = 0; ; start = range.offset + range.size)
1186 {
1188 break;
1189 wined3d_stateblock_set_vs_consts_b(device_state, range.offset, range.size, &state->vs_consts_b[range.offset]);
1190 }
1191
1192 for (start = 0; ; start = range.offset + range.size)
1193 {
1194 if (!wined3d_bitmap_get_range(stateblock->changed.ps_consts_f, WINED3D_MAX_PS_CONSTS_F, start, &range))
1195 break;
1196 wined3d_stateblock_set_ps_consts_f(device_state, range.offset, range.size, &state->ps_consts_f[range.offset]);
1197 }
1198 map = stateblock->changed.pixelShaderConstantsI;
1199 for (start = 0; ; start = range.offset + range.size)
1200 {
1202 break;
1203 wined3d_stateblock_set_ps_consts_i(device_state, range.offset, range.size, &state->ps_consts_i[range.offset]);
1204 }
1205 map = stateblock->changed.pixelShaderConstantsB;
1206 for (start = 0; ; start = range.offset + range.size)
1207 {
1209 break;
1210 wined3d_stateblock_set_ps_consts_b(device_state, range.offset, range.size, &state->ps_consts_b[range.offset]);
1211 }
1212
1213 if (stateblock->changed.transforms)
1214 {
1215 for (i = 0; i < stateblock->num_contained_transform_states; ++i)
1216 {
1218
1220 }
1221 }
1222
1223 if (stateblock->changed.lights)
1224 {
1225 const struct wined3d_light_info *light;
1226
1227 LIST_FOR_EACH_ENTRY(light, &stateblock->changed.changed_lights, struct wined3d_light_info, changed_entry)
1228 {
1229 wined3d_stateblock_set_light(device_state, light->OriginalIndex, &light->OriginalParms);
1230 wined3d_stateblock_set_light_enable(device_state, light->OriginalIndex, light->glIndex != -1);
1231 }
1232 }
1233
1234 if (stateblock->changed.alpha_to_coverage)
1235 {
1236 device_state->stateblock_state.alpha_to_coverage = state->alpha_to_coverage;
1237 device_state->changed.alpha_to_coverage = 1;
1238 }
1239
1240 /* Render states. */
1241 for (i = 0; i < stateblock->num_contained_render_states; ++i)
1242 {
1243 enum wined3d_render_state rs = stateblock->contained_render_states[i];
1244
1246 }
1247
1248 /* Texture states. */
1249 for (i = 0; i < stateblock->num_contained_tss_states; ++i)
1250 {
1251 DWORD stage = stateblock->contained_tss_states[i].stage;
1252 DWORD texture_state = stateblock->contained_tss_states[i].state;
1253
1255 state->texture_states[stage][texture_state]);
1256 }
1257
1258 /* Sampler states. */
1259 for (i = 0; i < stateblock->num_contained_sampler_states; ++i)
1260 {
1261 DWORD stage = stateblock->contained_sampler_states[i].stage;
1262 DWORD sampler_state = stateblock->contained_sampler_states[i].state;
1263
1265 state->sampler_states[stage][sampler_state]);
1266 }
1267
1268 if (stateblock->changed.indices)
1269 {
1270 wined3d_stateblock_set_index_buffer(device_state, state->index_buffer, state->index_format);
1272 }
1273
1274 if (stateblock->changed.vertexDecl && state->vertex_declaration)
1276
1277 if (stateblock->changed.material)
1279
1280 if (stateblock->changed.viewport)
1282
1283 if (stateblock->changed.scissorRect)
1285
1286 map = stateblock->changed.streamSource;
1287 while (map)
1288 {
1291 state->streams[i].offset, state->streams[i].stride);
1292 }
1293
1294 map = stateblock->changed.streamFreq;
1295 while (map)
1296 {
1299 state->streams[i].frequency | state->streams[i].flags);
1300 }
1301
1302 map = stateblock->changed.textures;
1303 while (map)
1304 {
1307 }
1308
1309 map = stateblock->changed.clipplane;
1310 while (map)
1311 {
1314 }
1315
1316 TRACE("Applied stateblock %p.\n", stateblock);
1317}
GLuint GLenum GLenum transform
Definition: glext.h:9407
unsigned int num_contained_sampler_states
Definition: stateblock.c:96
unsigned int num_contained_transform_states
Definition: stateblock.c:92
unsigned int contained_render_states[WINEHIGHEST_RENDER_STATE+1]
Definition: stateblock.c:89
unsigned int contained_transform_states[WINED3D_HIGHEST_TRANSFORM_STATE+1]
Definition: stateblock.c:91
struct stage_state contained_tss_states[WINED3D_MAX_FFP_TEXTURES *(WINED3D_HIGHEST_TEXTURE_STATE+1)]
Definition: stateblock.c:93
unsigned int num_contained_tss_states
Definition: stateblock.c:94
struct stage_state contained_sampler_states[WINED3D_MAX_COMBINED_SAMPLERS *WINED3D_HIGHEST_SAMPLER_STATE]
Definition: stateblock.c:95
unsigned int num_contained_render_states
Definition: stateblock.c:90
HRESULT CDECL wined3d_stateblock_set_vs_consts_b(struct wined3d_stateblock *stateblock, unsigned int start_idx, unsigned int count, const BOOL *constants)
Definition: stateblock.c:1396
HRESULT CDECL wined3d_stateblock_set_vs_consts_f(struct wined3d_stateblock *stateblock, unsigned int start_idx, unsigned int count, const struct wined3d_vec4 *constants)
Definition: stateblock.c:1360
void CDECL wined3d_stateblock_set_vertex_declaration(struct wined3d_stateblock *stateblock, struct wined3d_vertex_declaration *declaration)
Definition: stateblock.c:1571
HRESULT CDECL wined3d_stateblock_set_vs_consts_i(struct wined3d_stateblock *stateblock, unsigned int start_idx, unsigned int count, const struct wined3d_ivec4 *constants)
Definition: stateblock.c:1376
void CDECL wined3d_stateblock_set_material(struct wined3d_stateblock *stateblock, const struct wined3d_material *material)
Definition: stateblock.c:1891
void CDECL wined3d_stateblock_set_texture(struct wined3d_stateblock *stateblock, UINT stage, struct wined3d_texture *texture)
Definition: stateblock.c:1816
HRESULT CDECL wined3d_stateblock_set_stream_source_freq(struct wined3d_stateblock *stateblock, UINT stream_idx, UINT divider)
Definition: stateblock.c:1966
HRESULT CDECL wined3d_stateblock_set_light(struct wined3d_stateblock *stateblock, UINT light_idx, const struct wined3d_light *light)
Definition: stateblock.c:1996
HRESULT CDECL wined3d_stateblock_set_clip_plane(struct wined3d_stateblock *stateblock, UINT plane_idx, const struct wined3d_vec4 *plane)
Definition: stateblock.c:1875
HRESULT CDECL wined3d_stateblock_set_ps_consts_b(struct wined3d_stateblock *stateblock, unsigned int start_idx, unsigned int count, const BOOL *constants)
Definition: stateblock.c:1509
HRESULT CDECL wined3d_stateblock_set_ps_consts_i(struct wined3d_stateblock *stateblock, unsigned int start_idx, unsigned int count, const struct wined3d_ivec4 *constants)
Definition: stateblock.c:1489
HRESULT CDECL wined3d_stateblock_set_light_enable(struct wined3d_stateblock *stateblock, UINT light_idx, BOOL enable)
Definition: stateblock.c:2042
void CDECL wined3d_stateblock_set_pixel_shader(struct wined3d_stateblock *stateblock, struct wined3d_shader *shader)
Definition: stateblock.c:1460
HRESULT CDECL wined3d_stateblock_set_ps_consts_f(struct wined3d_stateblock *stateblock, unsigned int start_idx, unsigned int count, const struct wined3d_vec4 *constants)
Definition: stateblock.c:1473
void CDECL wined3d_stateblock_set_sampler_state(struct wined3d_stateblock *stateblock, UINT sampler_idx, enum wined3d_sampler_state state, unsigned int value)
Definition: stateblock.c:1702
void CDECL wined3d_stateblock_set_vertex_shader(struct wined3d_stateblock *stateblock, struct wined3d_shader *shader)
Definition: stateblock.c:1319
void CDECL wined3d_stateblock_set_transform(struct wined3d_stateblock *stateblock, enum wined3d_transform_state d3dts, const struct wined3d_matrix *matrix)
Definition: stateblock.c:1840
void CDECL wined3d_stateblock_set_index_buffer(struct wined3d_stateblock *stateblock, struct wined3d_buffer *buffer, enum wined3d_format_id format_id)
Definition: stateblock.c:1918
void CDECL wined3d_stateblock_set_render_state(struct wined3d_stateblock *stateblock, enum wined3d_render_state state, unsigned int value)
Definition: stateblock.c:1623
void CDECL wined3d_stateblock_set_scissor_rect(struct wined3d_stateblock *stateblock, const RECT *rect)
Definition: stateblock.c:1910
void CDECL wined3d_stateblock_set_base_vertex_index(struct wined3d_stateblock *stateblock, INT base_index)
Definition: stateblock.c:1932
HRESULT CDECL wined3d_stateblock_set_stream_source(struct wined3d_stateblock *stateblock, UINT stream_idx, struct wined3d_buffer *buffer, UINT offset, UINT stride)
Definition: stateblock.c:1939
void CDECL wined3d_stateblock_set_texture_stage_state(struct wined3d_stateblock *stateblock, UINT stage, enum wined3d_texture_stage_state state, unsigned int value)
Definition: stateblock.c:1718
void CDECL wined3d_stateblock_set_viewport(struct wined3d_stateblock *stateblock, const struct wined3d_viewport *viewport)
Definition: stateblock.c:1900
wined3d_render_state
Definition: wined3d.h:288
wined3d_transform_state
Definition: wined3d.h:666

Referenced by d3d8_device_ApplyStateBlock(), d3d9_stateblock_Apply(), d3d_device7_ApplyStateBlock(), and ddraw_set_cooperative_level().

◆ wined3d_stateblock_apply_clear_state()

void __cdecl wined3d_stateblock_apply_clear_state ( struct wined3d_stateblock *  stateblock,
struct wined3d_device *  device 
)

Definition at line 2917 of file stateblock.c.

2918{
2919 const struct wined3d_stateblock_state *state = &stateblock->stateblock_state;
2920 struct wined3d_device_context *context = &device->cs->c;
2921
2922 /* Clear state depends on the viewport, scissor rect, and scissor enable. */
2923
2924 if (stateblock->changed.viewport)
2926 if (stateblock->changed.scissorRect)
2928
2929 if (stateblock->changed.rasterizer_state)
2930 {
2931 struct wined3d_rasterizer_state *rasterizer_state;
2933 struct wine_rb_entry *entry;
2934
2935 memset(&desc, 0, sizeof(desc));
2936 desc.fill_mode = state->rs[WINED3D_RS_FILLMODE];
2937 desc.cull_mode = state->rs[WINED3D_RS_CULLMODE];
2938 desc.depth_bias = int_to_float(state->rs[WINED3D_RS_DEPTHBIAS]);
2940 desc.depth_clip = TRUE;
2942 desc.line_antialias = state->rs[WINED3D_RS_ANTIALIASEDLINEENABLE];
2943
2944 if ((entry = wine_rb_get(&device->rasterizer_states, &desc)))
2945 {
2946 rasterizer_state = WINE_RB_ENTRY_VALUE(entry, struct wined3d_rasterizer_state, entry);
2948 }
2950 &wined3d_null_parent_ops, &rasterizer_state)))
2951 {
2953 if (wine_rb_put(&device->rasterizer_states, &desc, &rasterizer_state->entry) == -1)
2954 {
2955 ERR("Failed to insert rasterizer state.\n");
2956 wined3d_rasterizer_state_decref(rasterizer_state);
2957 }
2958 }
2959 }
2960
2961 if (wined3d_bitmap_is_set(stateblock->changed.renderState, WINED3D_RS_SRGBWRITEENABLE))
2963}
void CDECL wined3d_device_context_set_rasterizer_state(struct wined3d_device_context *context, struct wined3d_rasterizer_state *rasterizer_state)
Definition: device.c:2101
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
void CDECL wined3d_device_context_set_viewports(struct wined3d_device_context *context, unsigned int viewport_count, const struct wined3d_viewport *viewports)
Definition: device.c:2124
void CDECL wined3d_device_context_set_scissor_rects(struct wined3d_device_context *context, unsigned int rect_count, const RECT *rects)
Definition: device.c:2149
struct wine_rb_entry entry

Referenced by d3d8_device_Clear(), d3d9_device_Clear(), d3d9_device_ColorFill(), d3d_device_apply_state(), and wined3d_device_apply_stateblock().

◆ wined3d_stateblock_capture()

void __cdecl wined3d_stateblock_capture ( struct wined3d_stateblock *  stateblock,
const struct wined3d_stateblock *  device_state 
)

Definition at line 893 of file stateblock.c.

895{
896 const struct wined3d_stateblock_state *state = &device_state->stateblock_state;
897 struct wined3d_range range;
898 unsigned int i, start;
900
901 TRACE("stateblock %p, device_state %p.\n", stateblock, device_state);
902
903 if (stateblock->changed.vertexShader && stateblock->stateblock_state.vs != state->vs)
904 {
905 TRACE("Updating vertex shader from %p to %p.\n", stateblock->stateblock_state.vs, state->vs);
906
907 if (state->vs)
909 if (stateblock->stateblock_state.vs)
911 stateblock->stateblock_state.vs = state->vs;
912 }
913
914 for (start = 0; ; start = range.offset + range.size)
915 {
916 if (!wined3d_bitmap_get_range(stateblock->changed.vs_consts_f, WINED3D_MAX_VS_CONSTS_F, start, &range))
917 break;
918
919 memcpy(&stateblock->stateblock_state.vs_consts_f[range.offset], &state->vs_consts_f[range.offset],
920 sizeof(*state->vs_consts_f) * range.size);
921 }
922 map = stateblock->changed.vertexShaderConstantsI;
923 for (start = 0; ; start = range.offset + range.size)
924 {
926 break;
927
928 memcpy(&stateblock->stateblock_state.vs_consts_i[range.offset], &state->vs_consts_i[range.offset],
929 sizeof(*state->vs_consts_i) * range.size);
930 }
931 map = stateblock->changed.vertexShaderConstantsB;
932 for (start = 0; ; start = range.offset + range.size)
933 {
935 break;
936
937 memcpy(&stateblock->stateblock_state.vs_consts_b[range.offset], &state->vs_consts_b[range.offset],
938 sizeof(*state->vs_consts_b) * range.size);
939 }
940
941 for (start = 0; ; start = range.offset + range.size)
942 {
943 if (!wined3d_bitmap_get_range(stateblock->changed.ps_consts_f, WINED3D_MAX_PS_CONSTS_F, start, &range))
944 break;
945
946 memcpy(&stateblock->stateblock_state.ps_consts_f[range.offset], &state->ps_consts_f[range.offset],
947 sizeof(*state->ps_consts_f) * range.size);
948 }
949 map = stateblock->changed.pixelShaderConstantsI;
950 for (start = 0; ; start = range.offset + range.size)
951 {
953 break;
954
955 memcpy(&stateblock->stateblock_state.ps_consts_i[range.offset], &state->ps_consts_i[range.offset],
956 sizeof(*state->ps_consts_i) * range.size);
957 }
958 map = stateblock->changed.pixelShaderConstantsB;
959 for (start = 0; ; start = range.offset + range.size)
960 {
962 break;
963
964 memcpy(&stateblock->stateblock_state.ps_consts_b[range.offset], &state->ps_consts_b[range.offset],
965 sizeof(*state->ps_consts_b) * range.size);
966 }
967
968 if (stateblock->changed.transforms)
969 {
970 for (i = 0; i < stateblock->num_contained_transform_states; ++i)
971 {
973
974 TRACE("Updating transform %#x.\n", transform);
975
976 stateblock->stateblock_state.transforms[transform] = state->transforms[transform];
977 }
978 }
979
980 if (stateblock->changed.indices
981 && ((stateblock->stateblock_state.index_buffer != state->index_buffer)
982 || (stateblock->stateblock_state.base_vertex_index != state->base_vertex_index)
983 || (stateblock->stateblock_state.index_format != state->index_format)))
984 {
985 TRACE("Updating index buffer to %p, base vertex index to %d.\n",
986 state->index_buffer, state->base_vertex_index);
987
988 if (state->index_buffer)
989 wined3d_buffer_incref(state->index_buffer);
990 if (stateblock->stateblock_state.index_buffer)
991 wined3d_buffer_decref(stateblock->stateblock_state.index_buffer);
992 stateblock->stateblock_state.index_buffer = state->index_buffer;
993 stateblock->stateblock_state.base_vertex_index = state->base_vertex_index;
994 stateblock->stateblock_state.index_format = state->index_format;
995 }
996
997 if (stateblock->changed.vertexDecl && stateblock->stateblock_state.vertex_declaration != state->vertex_declaration)
998 {
999 TRACE("Updating vertex declaration from %p to %p.\n",
1000 stateblock->stateblock_state.vertex_declaration, state->vertex_declaration);
1001
1002 if (state->vertex_declaration)
1003 wined3d_vertex_declaration_incref(state->vertex_declaration);
1004 if (stateblock->stateblock_state.vertex_declaration)
1005 wined3d_vertex_declaration_decref(stateblock->stateblock_state.vertex_declaration);
1006 stateblock->stateblock_state.vertex_declaration = state->vertex_declaration;
1007 }
1008
1009 if (stateblock->changed.material
1010 && memcmp(&state->material, &stateblock->stateblock_state.material,
1011 sizeof(stateblock->stateblock_state.material)))
1012 {
1013 TRACE("Updating material.\n");
1014
1015 stateblock->stateblock_state.material = state->material;
1016 }
1017
1018 if (stateblock->changed.viewport
1019 && memcmp(&state->viewport, &stateblock->stateblock_state.viewport, sizeof(state->viewport)))
1020 {
1021 TRACE("Updating viewport.\n");
1022
1023 stateblock->stateblock_state.viewport = state->viewport;
1024 }
1025
1026 if (stateblock->changed.scissorRect
1027 && memcmp(&state->scissor_rect, &stateblock->stateblock_state.scissor_rect, sizeof(state->scissor_rect)))
1028 {
1029 TRACE("Updating scissor rect.\n");
1030
1031 stateblock->stateblock_state.scissor_rect = state->scissor_rect;
1032 }
1033
1034 map = stateblock->changed.streamSource;
1035 while (map)
1036 {
1038
1039 if (stateblock->stateblock_state.streams[i].stride != state->streams[i].stride
1040 || stateblock->stateblock_state.streams[i].offset != state->streams[i].offset
1041 || stateblock->stateblock_state.streams[i].buffer != state->streams[i].buffer)
1042 {
1043 TRACE("stateblock %p, stream source %u, buffer %p, stride %u, offset %u.\n",
1044 stateblock, i, state->streams[i].buffer, state->streams[i].stride,
1045 state->streams[i].offset);
1046
1047 stateblock->stateblock_state.streams[i].stride = state->streams[i].stride;
1048 if (stateblock->changed.store_stream_offset)
1049 stateblock->stateblock_state.streams[i].offset = state->streams[i].offset;
1050
1051 if (state->streams[i].buffer)
1052 wined3d_buffer_incref(state->streams[i].buffer);
1053 if (stateblock->stateblock_state.streams[i].buffer)
1054 wined3d_buffer_decref(stateblock->stateblock_state.streams[i].buffer);
1055 stateblock->stateblock_state.streams[i].buffer = state->streams[i].buffer;
1056 }
1057 }
1058
1059 map = stateblock->changed.streamFreq;
1060 while (map)
1061 {
1063
1064 if (stateblock->stateblock_state.streams[i].frequency != state->streams[i].frequency
1065 || stateblock->stateblock_state.streams[i].flags != state->streams[i].flags)
1066 {
1067 TRACE("Updating stream frequency %u to %u flags to %#x.\n",
1068 i, state->streams[i].frequency, state->streams[i].flags);
1069
1070 stateblock->stateblock_state.streams[i].frequency = state->streams[i].frequency;
1071 stateblock->stateblock_state.streams[i].flags = state->streams[i].flags;
1072 }
1073 }
1074
1075 map = stateblock->changed.clipplane;
1076 while (map)
1077 {
1079
1080 if (memcmp(&stateblock->stateblock_state.clip_planes[i], &state->clip_planes[i], sizeof(state->clip_planes[i])))
1081 {
1082 TRACE("Updating clipplane %u.\n", i);
1083 stateblock->stateblock_state.clip_planes[i] = state->clip_planes[i];
1084 }
1085 }
1086
1087 /* Render */
1088 for (i = 0; i < stateblock->num_contained_render_states; ++i)
1089 {
1090 enum wined3d_render_state rs = stateblock->contained_render_states[i];
1091
1092 TRACE("Updating render state %#x to %u.\n", rs, state->rs[rs]);
1093
1094 stateblock->stateblock_state.rs[rs] = state->rs[rs];
1095 }
1096
1097 /* Texture states */
1098 for (i = 0; i < stateblock->num_contained_tss_states; ++i)
1099 {
1100 unsigned int stage = stateblock->contained_tss_states[i].stage;
1101 unsigned int texture_state = stateblock->contained_tss_states[i].state;
1102
1103 TRACE("Updating texturestage state %u, %u to %#x (was %#x).\n", stage, texture_state,
1104 state->texture_states[stage][texture_state],
1105 stateblock->stateblock_state.texture_states[stage][texture_state]);
1106
1107 stateblock->stateblock_state.texture_states[stage][texture_state] = state->texture_states[stage][texture_state];
1108 }
1109
1110 /* Samplers */
1111 map = stateblock->changed.textures;
1112 while (map)
1113 {
1115
1116 TRACE("Updating texture %u to %p (was %p).\n",
1117 i, state->textures[i], stateblock->stateblock_state.textures[i]);
1118
1119 if (state->textures[i])
1120 wined3d_texture_incref(state->textures[i]);
1121 if (stateblock->stateblock_state.textures[i])
1122 wined3d_texture_decref(stateblock->stateblock_state.textures[i]);
1123 stateblock->stateblock_state.textures[i] = state->textures[i];
1124 }
1125
1126 for (i = 0; i < stateblock->num_contained_sampler_states; ++i)
1127 {
1128 unsigned int stage = stateblock->contained_sampler_states[i].stage;
1129 unsigned int sampler_state = stateblock->contained_sampler_states[i].state;
1130
1131 TRACE("Updating sampler state %u, %u to %#x (was %#x).\n", stage, sampler_state,
1132 state->sampler_states[stage][sampler_state],
1133 stateblock->stateblock_state.sampler_states[stage][sampler_state]);
1134
1135 stateblock->stateblock_state.sampler_states[stage][sampler_state] = state->sampler_states[stage][sampler_state];
1136 }
1137
1138 if (stateblock->changed.pixelShader && stateblock->stateblock_state.ps != state->ps)
1139 {
1140 if (state->ps)
1142 if (stateblock->stateblock_state.ps)
1144 stateblock->stateblock_state.ps = state->ps;
1145 }
1146
1147 if (stateblock->changed.lights)
1148 wined3d_state_record_lights(stateblock->stateblock_state.light_state, state->light_state);
1149
1150 if (stateblock->changed.alpha_to_coverage)
1151 stateblock->stateblock_state.alpha_to_coverage = state->alpha_to_coverage;
1152
1153 TRACE("Capture done.\n");
1154}
ULONG CDECL wined3d_texture_incref(struct wined3d_texture *texture)
Definition: texture.c:1516
static void wined3d_state_record_lights(struct wined3d_light_state *dst_state, const struct wined3d_light_state *src_state)
Definition: stateblock.c:849

Referenced by d3d8_device_CaptureStateBlock(), d3d9_stateblock_Capture(), d3d_device7_CaptureStateBlock(), and stateblock_init().

◆ wined3d_stateblock_create()

HRESULT __cdecl wined3d_stateblock_create ( struct wined3d_device *  device,
const struct wined3d_stateblock *  device_state,
enum wined3d_stateblock_type  type,
struct wined3d_stateblock **  stateblock 
)

Definition at line 2508 of file stateblock.c.

2510{
2511 struct wined3d_stateblock *object;
2512 HRESULT hr;
2513
2514 TRACE("device %p, device_state %p, type %#x, stateblock %p.\n",
2515 device, device_state, type, stateblock);
2516
2517 if (!(object = calloc(1, sizeof(*object))))
2518 return E_OUTOFMEMORY;
2519
2521 if (FAILED(hr))
2522 {
2523 WARN("Failed to initialize stateblock, hr %#lx.\n", hr);
2524 free(object);
2525 return hr;
2526 }
2527
2528 TRACE("Created stateblock %p.\n", object);
2529 *stateblock = object;
2530
2531 return WINED3D_OK;
2532}
static HRESULT stateblock_init(struct wined3d_stateblock *stateblock, const struct wined3d_stateblock *device_state, struct wined3d_device *device, enum wined3d_stateblock_type type)
Definition: stateblock.c:2450

Referenced by d3d8_device_BeginStateBlock(), d3d8_device_CreateStateBlock(), d3d9_device_BeginStateBlock(), d3d_device7_BeginStateBlock(), d3d_device7_CreateStateBlock(), d3d_device_init(), ddraw_set_cooperative_level(), device_init(), and stateblock_init().

◆ wined3d_stateblock_decref()

ULONG __cdecl wined3d_stateblock_decref ( struct wined3d_stateblock *  stateblock)

Definition at line 670 of file stateblock.c.

671{
672 unsigned int refcount = InterlockedDecrement(&stateblock->ref);
673
674 TRACE("%p decreasing refcount to %u\n", stateblock, refcount);
675
676 if (!refcount)
677 {
680 free(stateblock);
682 }
683
684 return refcount;
685}
static void wined3d_stateblock_state_cleanup(struct wined3d_stateblock_state *state)
Definition: stateblock.c:588

Referenced by d3d8_device_CreateStateBlock(), d3d8_device_DeleteStateBlock(), d3d8_device_EndStateBlock(), d3d8_device_Release(), d3d8_device_Reset(), d3d9_device_EndStateBlock(), d3d9_device_Release(), d3d9_device_reset(), d3d9_stateblock_Release(), d3d_device7_CreateStateBlock(), d3d_device7_DeleteStateBlock(), d3d_device7_EndStateBlock(), d3d_device_init(), d3d_device_inner_Release(), and ddraw_set_cooperative_level().

◆ wined3d_stateblock_depth_buffer_changed()

void __cdecl wined3d_stateblock_depth_buffer_changed ( struct wined3d_stateblock *  stateblock)

Definition at line 4043 of file stateblock.c.

4044{
4045 struct wined3d_vertex_declaration *decl = stateblock->stateblock_state.vertex_declaration;
4046
4047 /* The presence of a depth buffer affects depth clipping when drawing RHW.
4048 * The depth buffer is not part of the stateblock, though, so we need a
4049 * separate function to invalidate it.
4050 * We pass this via the projection matrix, but use
4051 * changed->position_transformed to invalidate it. */
4052
4053 if (decl && decl->position_transformed)
4054 stateblock->changed.position_transformed = 1;
4055}

Referenced by d3d8_device_SetRenderTarget(), d3d9_device_SetDepthStencilSurface(), d3d_device_sync_rendertarget(), d3d_device_update_depth_stencil(), and ddraw_surface_delete_attached_surface().

◆ wined3d_stateblock_get_light()

HRESULT __cdecl wined3d_stateblock_get_light ( const struct wined3d_stateblock *  stateblock,
UINT  light_idx,
struct wined3d_light *  light,
BOOL *  enabled 
)

Definition at line 2069 of file stateblock.c.

2071{
2072 struct wined3d_light_info *light_info;
2073
2074 if (!(light_info = wined3d_light_state_get_light(&stateblock->light_state, light_idx)))
2075 {
2076 TRACE("Light %u is not defined.\n", light_idx);
2078 }
2079 *light = light_info->OriginalParms;
2080 *enabled = light_info->enabled ? 128 : 0;
2081 return WINED3D_OK;
2082}
GLenum GLenum GLsizei const GLuint GLboolean enabled
Definition: glext.h:7750
struct wined3d_light_state light_state
Definition: stateblock.c:87
struct wined3d_light_info * wined3d_light_state_get_light(const struct wined3d_light_state *state, unsigned int idx)
Definition: stateblock.c:687

Referenced by d3d8_device_GetLight(), d3d8_device_GetLightEnable(), d3d9_device_GetLight(), d3d9_device_GetLightEnable(), d3d_device7_GetLight(), and d3d_device7_GetLightEnable().

◆ wined3d_stateblock_get_ps_consts_b()

HRESULT __cdecl wined3d_stateblock_get_ps_consts_b ( struct wined3d_stateblock *  stateblock,
unsigned int  start_idx,
unsigned int  count,
BOOL *  constants 
)

Definition at line 1556 of file stateblock.c.

1558{
1559 TRACE("stateblock %p, start_idx %u, count %u, constants %p.\n", stateblock, start_idx, count, constants);
1560
1561 if (!constants || start_idx >= WINED3D_MAX_CONSTS_B)
1563
1564 if (count > WINED3D_MAX_CONSTS_B - start_idx)
1565 count = WINED3D_MAX_CONSTS_B - start_idx;
1566
1567 memcpy(constants, &stateblock->stateblock_state.ps_consts_b[start_idx], count * sizeof(*constants));
1568 return WINED3D_OK;
1569}

Referenced by d3d9_device_GetPixelShaderConstantB().

◆ wined3d_stateblock_get_ps_consts_f()

HRESULT __cdecl wined3d_stateblock_get_ps_consts_f ( struct wined3d_stateblock *  stateblock,
unsigned int  start_idx,
unsigned int  count,
struct wined3d_vec4 *  constants 
)

Definition at line 1529 of file stateblock.c.

1531{
1532 TRACE("stateblock %p, start_idx %u, count %u, constants %p.\n", stateblock, start_idx, count, constants);
1533
1536
1537 memcpy(constants, &stateblock->stateblock_state.ps_consts_f[start_idx], count * sizeof(*constants));
1538 return WINED3D_OK;
1539}

Referenced by d3d8_device_GetPixelShaderConstant(), and d3d9_device_GetPixelShaderConstantF().

◆ wined3d_stateblock_get_ps_consts_i()

HRESULT __cdecl wined3d_stateblock_get_ps_consts_i ( struct wined3d_stateblock *  stateblock,
unsigned int  start_idx,
unsigned int  count,
struct wined3d_ivec4 *  constants 
)

Definition at line 1541 of file stateblock.c.

1543{
1544 TRACE("stateblock %p, start_idx %u, count %u, constants %p.\n", stateblock, start_idx, count, constants);
1545
1546 if (!constants || start_idx >= WINED3D_MAX_CONSTS_I)
1548
1549 if (count > WINED3D_MAX_CONSTS_I - start_idx)
1550 count = WINED3D_MAX_CONSTS_I - start_idx;
1551
1552 memcpy(constants, &stateblock->stateblock_state.ps_consts_i[start_idx], count * sizeof(*constants));
1553 return WINED3D_OK;
1554}

Referenced by d3d9_device_GetPixelShaderConstantI().

◆ wined3d_stateblock_get_state()

const struct wined3d_stateblock_state *__cdecl wined3d_stateblock_get_state ( const struct wined3d_stateblock *  stateblock)

Definition at line 2064 of file stateblock.c.

2065{
2066 return &stateblock->stateblock_state;
2067}

Referenced by d3d_device_init(), device_init(), and wined3d_device_process_vertices().

◆ wined3d_stateblock_get_vs_consts_b()

HRESULT __cdecl wined3d_stateblock_get_vs_consts_b ( struct wined3d_stateblock *  stateblock,
unsigned int  start_idx,
unsigned int  count,
BOOL *  constants 
)

Definition at line 1445 of file stateblock.c.

1447{
1448 TRACE("stateblock %p, start_idx %u, count %u, constants %p.\n", stateblock, start_idx, count, constants);
1449
1450 if (!constants || start_idx >= WINED3D_MAX_CONSTS_B)
1452
1453 if (count > WINED3D_MAX_CONSTS_B - start_idx)
1454 count = WINED3D_MAX_CONSTS_B - start_idx;
1455
1456 memcpy(constants, &stateblock->stateblock_state.vs_consts_b[start_idx], count * sizeof(*constants));
1457 return WINED3D_OK;
1458}

Referenced by d3d9_device_GetVertexShaderConstantB().

◆ wined3d_stateblock_get_vs_consts_f()

HRESULT __cdecl wined3d_stateblock_get_vs_consts_f ( struct wined3d_stateblock *  stateblock,
unsigned int  start_idx,
unsigned int  count,
struct wined3d_vec4 *  constants 
)

Definition at line 1416 of file stateblock.c.

1418{
1419 const struct wined3d_d3d_info *d3d_info = &stateblock->device->adapter->d3d_info;
1420
1421 TRACE("stateblock %p, start_idx %u, count %u, constants %p.\n", stateblock, start_idx, count, constants);
1422
1423 if (!constants || !wined3d_bound_range(start_idx, count, d3d_info->limits.vs_uniform_count))
1425
1426 memcpy(constants, &stateblock->stateblock_state.vs_consts_f[start_idx], count * sizeof(*constants));
1427 return WINED3D_OK;
1428}
struct wined3d_device * device
Definition: stateblock.c:82

Referenced by d3d8_device_GetVertexShaderConstant(), and d3d9_device_GetVertexShaderConstantF().

◆ wined3d_stateblock_get_vs_consts_i()

HRESULT __cdecl wined3d_stateblock_get_vs_consts_i ( struct wined3d_stateblock *  stateblock,
unsigned int  start_idx,
unsigned int  count,
struct wined3d_ivec4 *  constants 
)

Definition at line 1430 of file stateblock.c.

1432{
1433 TRACE("stateblock %p, start_idx %u, count %u, constants %p.\n", stateblock, start_idx, count, constants);
1434
1435 if (!constants || start_idx >= WINED3D_MAX_CONSTS_I)
1437
1438 if (count > WINED3D_MAX_CONSTS_I - start_idx)
1439 count = WINED3D_MAX_CONSTS_I - start_idx;
1440
1441 memcpy(constants, &stateblock->stateblock_state.vs_consts_i[start_idx], count * sizeof(*constants));
1442 return WINED3D_OK;
1443}

Referenced by d3d9_device_GetVertexShaderConstantI().

◆ wined3d_stateblock_incref()

ULONG __cdecl wined3d_stateblock_incref ( struct wined3d_stateblock *  stateblock)

Definition at line 466 of file stateblock.c.

467{
468 unsigned int refcount = InterlockedIncrement(&stateblock->ref);
469
470 TRACE("%p increasing refcount to %u.\n", stateblock, refcount);
471
472 return refcount;
473}

◆ wined3d_stateblock_init_contained_states()

void __cdecl wined3d_stateblock_init_contained_states ( struct wined3d_stateblock *  stateblock)

Definition at line 393 of file stateblock.c.

394{
395 unsigned int i, j;
396
397 for (i = 0; i <= WINEHIGHEST_RENDER_STATE >> 5; ++i)
398 {
399 DWORD map = stateblock->changed.renderState[i];
400 for (j = 0; map; map >>= 1, ++j)
401 {
402 if (!(map & 1)) continue;
403
404 stateblock->contained_render_states[stateblock->num_contained_render_states] = (i << 5) | j;
405 ++stateblock->num_contained_render_states;
406 }
407 }
408
409 for (i = 0; i <= WINED3D_HIGHEST_TRANSFORM_STATE >> 5; ++i)
410 {
411 DWORD map = stateblock->changed.transform[i];
412 for (j = 0; map; map >>= 1, ++j)
413 {
414 if (!(map & 1)) continue;
415
416 stateblock->contained_transform_states[stateblock->num_contained_transform_states] = (i << 5) | j;
417 ++stateblock->num_contained_transform_states;
418 }
419 }
420
421 for (i = 0; i < WINED3D_MAX_FFP_TEXTURES; ++i)
422 {
423 DWORD map = stateblock->changed.textureState[i];
424
425 for(j = 0; map; map >>= 1, ++j)
426 {
427 if (!(map & 1)) continue;
428
429 stateblock->contained_tss_states[stateblock->num_contained_tss_states].stage = i;
430 stateblock->contained_tss_states[stateblock->num_contained_tss_states].state = j;
431 ++stateblock->num_contained_tss_states;
432 }
433 }
434
435 for (i = 0; i < WINED3D_MAX_COMBINED_SAMPLERS; ++i)
436 {
437 DWORD map = stateblock->changed.samplerState[i];
438
439 for (j = 0; map; map >>= 1, ++j)
440 {
441 if (!(map & 1)) continue;
442
443 stateblock->contained_sampler_states[stateblock->num_contained_sampler_states].stage = i;
444 stateblock->contained_sampler_states[stateblock->num_contained_sampler_states].state = j;
445 ++stateblock->num_contained_sampler_states;
446 }
447 }
448}

Referenced by d3d8_device_EndStateBlock(), d3d9_device_EndStateBlock(), d3d_device7_EndStateBlock(), and stateblock_init().

◆ wined3d_stateblock_multiply_transform()

void __cdecl wined3d_stateblock_multiply_transform ( struct wined3d_stateblock *  stateblock,
enum wined3d_transform_state  state,
const struct wined3d_matrix *  matrix 
)

Definition at line 1859 of file stateblock.c.

1861{
1862 struct wined3d_matrix *mat = &stateblock->stateblock_state.transforms[d3dts];
1863
1864 TRACE("stateblock %p, state %s, matrix %p.\n", stateblock, debug_d3dtstype(d3dts), matrix);
1865 TRACE("%.8e %.8e %.8e %.8e\n", matrix->_11, matrix->_12, matrix->_13, matrix->_14);
1866 TRACE("%.8e %.8e %.8e %.8e\n", matrix->_21, matrix->_22, matrix->_23, matrix->_24);
1867 TRACE("%.8e %.8e %.8e %.8e\n", matrix->_31, matrix->_32, matrix->_33, matrix->_34);
1868 TRACE("%.8e %.8e %.8e %.8e\n", matrix->_41, matrix->_42, matrix->_43, matrix->_44);
1869
1871 stateblock->changed.transform[d3dts >> 5] |= 1u << (d3dts & 0x1f);
1872 stateblock->changed.transforms = 1;
1873}
void multiply_matrix(struct wined3d_matrix *dst, const struct wined3d_matrix *src1, const struct wined3d_matrix *src2)
Definition: utils.c:1153
const char * debug_d3dtstype(enum wined3d_transform_state tstype)
Definition: utils.c:5282
static const MAT2 mat
Definition: font.c:51

Referenced by d3d8_device_MultiplyTransform(), d3d9_device_MultiplyTransform(), and d3d_device7_MultiplyTransform().

◆ wined3d_stateblock_primary_dirtify_all_states()

void __cdecl wined3d_stateblock_primary_dirtify_all_states ( struct wined3d_device *  device,
struct wined3d_stateblock *  stateblock 
)

Definition at line 313 of file stateblock.c.

314{
315 struct rb_tree *lights_tree = &stateblock->stateblock_state.light_state->lights_tree;
316 const struct wined3d_d3d_info *d3d_info = &device->adapter->d3d_info;
317 struct wined3d_saved_states *states = &stateblock->changed;
319
320 stateblock_savedstates_set_all(states, d3d_info->limits.vs_uniform_count, d3d_info->limits.ps_uniform_count);
321 states->ffp_ps_constants = 1;
322 states->texture_matrices = 1;
323 states->modelview_matrices = 1;
324 states->point_scale = 1;
325 states->ffp_vs_settings = 1;
326 states->ffp_ps_settings = 1;
327 states->rasterizer_state = 1;
328 states->position_transformed = 1;
329
330 list_init(&stateblock->changed.changed_lights);
331 RB_FOR_EACH_ENTRY(light, lights_tree, struct wined3d_light_info, entry)
332 {
333 light->changed = true;
334 list_add_tail(&stateblock->changed.changed_lights, &light->changed_entry);
335 }
336}
#define RB_FOR_EACH_ENTRY(elem, tree, type, field)
Definition: rbtree.h:148
Definition: rbtree.h:40
uint32_t rasterizer_state
Definition: stateblock.c:69
static void stateblock_savedstates_set_all(struct wined3d_saved_states *states, DWORD vs_consts, DWORD ps_consts)
Definition: stateblock.c:281

Referenced by d3d_device_apply_state().

◆ wined3d_stateblock_reset()

void __cdecl wined3d_stateblock_reset ( struct wined3d_stateblock *  stateblock)

Definition at line 2534 of file stateblock.c.

2535{
2536 TRACE("stateblock %p.\n", stateblock);
2537
2539 memset(&stateblock->stateblock_state, 0, sizeof(stateblock->stateblock_state));
2540 stateblock->stateblock_state.light_state = &stateblock->light_state;
2543}
static void wined3d_stateblock_state_init(struct wined3d_stateblock_state *state, const struct wined3d_device *device, uint32_t flags)
Definition: stateblock.c:2422
static void wined3d_stateblock_invalidate_initial_states(struct wined3d_stateblock *stateblock)
Definition: stateblock.c:2435

Referenced by d3d8_device_Reset(), and d3d9_device_reset().

◆ wined3d_stateblock_set_base_vertex_index()

void __cdecl wined3d_stateblock_set_base_vertex_index ( struct wined3d_stateblock *  stateblock,
INT  base_index 
)

Definition at line 1932 of file stateblock.c.

1933{
1934 TRACE("stateblock %p, base_index %d.\n", stateblock, base_index);
1935
1936 stateblock->stateblock_state.base_vertex_index = base_index;
1937}

Referenced by d3d8_device_DrawIndexedPrimitiveUP(), d3d8_device_SetIndices(), and wined3d_stateblock_apply().

◆ wined3d_stateblock_set_clip_plane()

HRESULT __cdecl wined3d_stateblock_set_clip_plane ( struct wined3d_stateblock *  stateblock,
UINT  plane_idx,
const struct wined3d_vec4 *  plane 
)

Definition at line 1875 of file stateblock.c.

1877{
1878 TRACE("stateblock %p, plane_idx %u, plane %p.\n", stateblock, plane_idx, plane);
1879
1880 if (plane_idx >= stateblock->device->adapter->d3d_info.limits.max_clip_distances)
1881 {
1882 TRACE("Application has requested clipplane this device doesn't support.\n");
1884 }
1885
1886 stateblock->stateblock_state.clip_planes[plane_idx] = *plane;
1887 stateblock->changed.clipplane |= 1u << plane_idx;
1888 return S_OK;
1889}

Referenced by d3d8_device_SetClipPlane(), d3d9_device_SetClipPlane(), d3d_device7_SetClipPlane(), and wined3d_stateblock_apply().

◆ wined3d_stateblock_set_index_buffer()

void __cdecl wined3d_stateblock_set_index_buffer ( struct wined3d_stateblock *  stateblock,
struct wined3d_buffer *  index_buffer,
enum wined3d_format_id  format_id 
)

Definition at line 1918 of file stateblock.c.

1920{
1921 TRACE("stateblock %p, buffer %p, format %s.\n", stateblock, buffer, debug_d3dformat(format_id));
1922
1923 if (buffer)
1925 if (stateblock->stateblock_state.index_buffer)
1926 wined3d_buffer_decref(stateblock->stateblock_state.index_buffer);
1927 stateblock->stateblock_state.index_buffer = buffer;
1928 stateblock->stateblock_state.index_format = format_id;
1929 stateblock->changed.indices = TRUE;
1930}

Referenced by d3d8_device_DrawIndexedPrimitiveUP(), d3d8_device_SetIndices(), d3d9_device_DrawIndexedPrimitiveUP(), d3d9_device_SetIndices(), d3d_device7_DrawIndexedPrimitive(), d3d_device7_DrawIndexedPrimitiveStrided(), d3d_device7_DrawIndexedPrimitiveVB(), and wined3d_stateblock_apply().

◆ wined3d_stateblock_set_light()

HRESULT __cdecl wined3d_stateblock_set_light ( struct wined3d_stateblock *  stateblock,
UINT  light_idx,
const struct wined3d_light *  light 
)

Definition at line 1996 of file stateblock.c.

1998{
1999 struct wined3d_light_info *object = NULL;
2000 HRESULT hr;
2001
2002 TRACE("stateblock %p, light_idx %u, light %p.\n", stateblock, light_idx, light);
2003
2004 /* Check the parameter range. Need for speed most wanted sets junk lights
2005 * which confuse the GL driver. */
2006 if (!light)
2008
2009 switch (light->type)
2010 {
2012 case WINED3D_LIGHT_SPOT:
2014 /* Incorrect attenuation values can cause the gl driver to crash.
2015 * Happens with Need for speed most wanted. */
2016 if (light->attenuation0 < 0.0f || light->attenuation1 < 0.0f || light->attenuation2 < 0.0f)
2017 {
2018 WARN("Attenuation is negative, returning WINED3DERR_INVALIDCALL.\n");
2020 }
2021 break;
2022
2025 /* Ignores attenuation */
2026 break;
2027
2028 default:
2029 WARN("Light type out of range, returning WINED3DERR_INVALIDCALL.\n");
2031 }
2032
2033 if (!(object = wined3d_light_state_get_light(stateblock->stateblock_state.light_state, light_idx))
2034 || light->type != object->OriginalParms.type)
2035 stateblock->changed.ffp_vs_settings = 1;
2036
2037 if (SUCCEEDED(hr = wined3d_light_state_set_light(stateblock->stateblock_state.light_state, light_idx, light, &object)))
2038 set_light_changed(stateblock, object);
2039 return hr;
2040}
static void set_light_changed(struct wined3d_stateblock *stateblock, struct wined3d_light_info *light_info)
Definition: stateblock.c:697
static HRESULT wined3d_light_state_set_light(struct wined3d_light_state *state, unsigned int light_idx, const struct wined3d_light *params, struct wined3d_light_info **light_info)
Definition: stateblock.c:707

Referenced by d3d8_device_SetLight(), d3d9_device_SetLight(), d3d_device7_SetLight(), and wined3d_stateblock_apply().

◆ wined3d_stateblock_set_light_enable()

HRESULT __cdecl wined3d_stateblock_set_light_enable ( struct wined3d_stateblock *  stateblock,
UINT  light_idx,
BOOL  enable 
)

Definition at line 2042 of file stateblock.c.

2043{
2044 struct wined3d_light_state *light_state = stateblock->stateblock_state.light_state;
2045 struct wined3d_light_info *light_info;
2046 HRESULT hr;
2047
2048 TRACE("stateblock %p, light_idx %u, enable %#x.\n", stateblock, light_idx, enable);
2049
2050 if (!(light_info = wined3d_light_state_get_light(light_state, light_idx)))
2051 {
2052 if (FAILED(hr = wined3d_light_state_set_light(light_state, light_idx, &WINED3D_default_light, &light_info)))
2053 return hr;
2054 set_light_changed(stateblock, light_info);
2055 }
2056
2057 if (wined3d_light_state_enable_light(light_state, &stateblock->device->adapter->d3d_info, light_info, enable))
2058 set_light_changed(stateblock, light_info);
2059
2060 stateblock->changed.ffp_vs_settings = 1;
2061 return S_OK;
2062}
const struct wined3d_light WINED3D_default_light
Definition: device.c:69
GLboolean enable
Definition: glext.h:11120
bool wined3d_light_state_enable_light(struct wined3d_light_state *state, const struct wined3d_d3d_info *d3d_info, struct wined3d_light_info *light_info, BOOL enable)
Definition: stateblock.c:803

Referenced by d3d8_device_LightEnable(), d3d9_device_LightEnable(), d3d_device7_LightEnable(), and wined3d_stateblock_apply().

◆ wined3d_stateblock_set_material()

void __cdecl wined3d_stateblock_set_material ( struct wined3d_stateblock *  stateblock,
const struct wined3d_material *  material 
)

Definition at line 1891 of file stateblock.c.

1893{
1894 TRACE("stateblock %p, material %p.\n", stateblock, material);
1895
1896 stateblock->stateblock_state.material = *material;
1897 stateblock->changed.material = TRUE;
1898}

Referenced by d3d8_device_SetMaterial(), d3d9_device_SetMaterial(), d3d_device7_SetMaterial(), and wined3d_stateblock_apply().

◆ wined3d_stateblock_set_pixel_shader()

void __cdecl wined3d_stateblock_set_pixel_shader ( struct wined3d_stateblock *  stateblock,
struct wined3d_shader *  shader 
)

Definition at line 1460 of file stateblock.c.

1461{
1462 TRACE("stateblock %p, shader %p.\n", stateblock, shader);
1463
1464 if (shader)
1466 if (stateblock->stateblock_state.ps)
1468 stateblock->stateblock_state.ps = shader;
1469 stateblock->changed.pixelShader = TRUE;
1470 stateblock->changed.ffp_ps_settings = 1;
1471}

Referenced by d3d8_device_SetPixelShader(), d3d9_device_SetPixelShader(), and wined3d_stateblock_apply().

◆ wined3d_stateblock_set_ps_consts_b()

HRESULT __cdecl wined3d_stateblock_set_ps_consts_b ( struct wined3d_stateblock *  stateblock,
unsigned int  start_idx,
unsigned int  count,
const BOOL *  constants 
)

Definition at line 1509 of file stateblock.c.

1511{
1512 unsigned int i;
1513
1514 TRACE("stateblock %p, start_idx %u, count %u, constants %p.\n",
1515 stateblock, start_idx, count, constants);
1516
1517 if (!constants || start_idx >= WINED3D_MAX_CONSTS_B)
1519
1520 if (count > WINED3D_MAX_CONSTS_B - start_idx)
1521 count = WINED3D_MAX_CONSTS_B - start_idx;
1522
1523 memcpy(&stateblock->stateblock_state.ps_consts_b[start_idx], constants, count * sizeof(*constants));
1524 for (i = start_idx; i < count + start_idx; ++i)
1525 stateblock->changed.pixelShaderConstantsB |= (1u << i);
1526 return WINED3D_OK;
1527}

Referenced by d3d9_device_SetPixelShaderConstantB(), and wined3d_stateblock_apply().

◆ wined3d_stateblock_set_ps_consts_f()

HRESULT __cdecl wined3d_stateblock_set_ps_consts_f ( struct wined3d_stateblock *  stateblock,
unsigned int  start_idx,
unsigned int  count,
const struct wined3d_vec4 *  constants 
)

Definition at line 1473 of file stateblock.c.

1475{
1476 const struct wined3d_d3d_info *d3d_info = &stateblock->device->adapter->d3d_info;
1477
1478 TRACE("stateblock %p, start_idx %u, count %u, constants %p.\n",
1479 stateblock, start_idx, count, constants);
1480
1481 if (!constants || !wined3d_bound_range(start_idx, count, d3d_info->limits.ps_uniform_count))
1483
1484 memcpy(&stateblock->stateblock_state.ps_consts_f[start_idx], constants, count * sizeof(*constants));
1485 wined3d_bitmap_set_bits(stateblock->changed.ps_consts_f, start_idx, count);
1486 return WINED3D_OK;
1487}
static void wined3d_bitmap_set_bits(uint32_t *bitmap, unsigned int start, unsigned int count)
Definition: stateblock.c:1332

Referenced by d3d8_device_SetPixelShaderConstant(), d3d9_device_SetPixelShaderConstantF(), and wined3d_stateblock_apply().

◆ wined3d_stateblock_set_ps_consts_i()

HRESULT __cdecl wined3d_stateblock_set_ps_consts_i ( struct wined3d_stateblock *  stateblock,
unsigned int  start_idx,
unsigned int  count,
const struct wined3d_ivec4 *  constants 
)

Definition at line 1489 of file stateblock.c.

1491{
1492 unsigned int i;
1493
1494 TRACE("stateblock %p, start_idx %u, count %u, constants %p.\n",
1495 stateblock, start_idx, count, constants);
1496
1497 if (!constants || start_idx >= WINED3D_MAX_CONSTS_I)
1499
1500 if (count > WINED3D_MAX_CONSTS_I - start_idx)
1501 count = WINED3D_MAX_CONSTS_I - start_idx;
1502
1503 memcpy(&stateblock->stateblock_state.ps_consts_i[start_idx], constants, count * sizeof(*constants));
1504 for (i = start_idx; i < count + start_idx; ++i)
1505 stateblock->changed.pixelShaderConstantsI |= (1u << i);
1506 return WINED3D_OK;
1507}

Referenced by d3d9_device_SetPixelShaderConstantI(), and wined3d_stateblock_apply().

◆ wined3d_stateblock_set_render_state()

void __cdecl wined3d_stateblock_set_render_state ( struct wined3d_stateblock *  stateblock,
enum wined3d_render_state  state,
unsigned int  value 
)

Definition at line 1623 of file stateblock.c.

1625{
1626 TRACE("stateblock %p, state %s (%#x), value %#x.\n", stateblock, debug_d3drenderstate(state), state, value);
1627
1629 {
1630 WARN("Unhandled render state %#x.\n", state);
1631 return;
1632 }
1633
1634 stateblock->stateblock_state.rs[state] = value;
1635 stateblock->changed.renderState[state >> 5] |= 1u << (state & 0x1f);
1636
1637 switch (state)
1638 {
1641 {
1642 stateblock->changed.alpha_to_coverage = 1;
1643 stateblock->stateblock_state.alpha_to_coverage = (value == WINED3D_ALPHA_TO_COVERAGE_ENABLE);
1644 }
1645 stateblock->changed.point_scale = 1;
1646 break;
1647
1649 stateblock->changed.ffp_ps_constants = 1;
1650 break;
1651
1653 stateblock->changed.modelview_matrices = 1;
1654 stateblock->changed.ffp_vs_settings = 1;
1655 break;
1656
1661 stateblock->changed.point_scale = 1;
1662 break;
1663
1676 stateblock->changed.ffp_vs_settings = 1;
1677 break;
1678
1680 stateblock->changed.ffp_ps_settings = 1;
1681 break;
1682
1684 stateblock->changed.ffp_vs_settings = 1;
1685 stateblock->changed.ffp_ps_constants = 1;
1686 break;
1687
1694 stateblock->changed.rasterizer_state = 1;
1695 break;
1696
1697 default:
1698 break;
1699 }
1700}
const char * debug_d3drenderstate(enum wined3d_render_state state)
Definition: utils.c:5033
#define WINEHIGHEST_RENDER_STATE
Definition: wined3d.h:415
#define WINED3D_ALPHA_TO_COVERAGE_ENABLE
#define WINED3D_ALPHA_TO_COVERAGE_DISABLE

Referenced by d3d8_device_Reset(), d3d8_device_SetRenderState(), d3d9_device_reset(), d3d9_device_SetRenderState(), d3d_device7_SetRenderState(), d3d_device_init(), d3d_vertex_buffer7_ProcessVertices(), device_init(), setup_lighting(), and wined3d_stateblock_apply().

◆ wined3d_stateblock_set_sampler_state()

void __cdecl wined3d_stateblock_set_sampler_state ( struct wined3d_stateblock *  stateblock,
UINT  sampler_idx,
enum wined3d_sampler_state  state,
unsigned int  value 
)

Definition at line 1702 of file stateblock.c.

1704{
1705 TRACE("stateblock %p, sampler_idx %u, state %s, value %#x.\n",
1706 stateblock, sampler_idx, debug_d3dsamplerstate(state), value);
1707
1708 if (sampler_idx >= ARRAY_SIZE(stateblock->stateblock_state.sampler_states))
1709 {
1710 WARN("Invalid sampler %u.\n", sampler_idx);
1711 return;
1712 }
1713
1714 stateblock->stateblock_state.sampler_states[sampler_idx][state] = value;
1715 stateblock->changed.samplerState[sampler_idx] |= 1u << state;
1716}
const char * debug_d3dsamplerstate(enum wined3d_sampler_state state)
Definition: utils.c:5169

Referenced by d3d8_device_SetTextureStageState(), d3d9_device_SetSamplerState(), d3d_device7_SetRenderState(), d3d_device7_SetTextureStageState(), and wined3d_stateblock_apply().

◆ wined3d_stateblock_set_scissor_rect()

void __cdecl wined3d_stateblock_set_scissor_rect ( struct wined3d_stateblock *  stateblock,
const RECT *  rect 
)

Definition at line 1910 of file stateblock.c.

1911{
1912 TRACE("stateblock %p, rect %s.\n", stateblock, wine_dbgstr_rect(rect));
1913
1914 stateblock->stateblock_state.scissor_rect = *rect;
1915 stateblock->changed.scissorRect = TRUE;
1916}

Referenced by d3d9_device_reset(), d3d9_device_SetScissorRect(), device_reset_viewport_state(), and wined3d_stateblock_apply().

◆ wined3d_stateblock_set_stream_source()

HRESULT __cdecl wined3d_stateblock_set_stream_source ( struct wined3d_stateblock *  stateblock,
UINT  stream_idx,
struct wined3d_buffer *  buffer,
UINT  offset,
UINT  stride 
)

Definition at line 1939 of file stateblock.c.

1941{
1943
1944 TRACE("stateblock %p, stream_idx %u, buffer %p, stride %u.\n",
1945 stateblock, stream_idx, buffer, stride);
1946
1947 if (stream_idx >= WINED3D_MAX_STREAMS)
1948 {
1949 WARN("Stream index %u out of range.\n", stream_idx);
1951 }
1952
1953 stream = &stateblock->stateblock_state.streams[stream_idx];
1954
1955 if (buffer)
1957 if (stream->buffer)
1959 stream->buffer = buffer;
1960 stream->stride = stride;
1961 stream->offset = offset;
1962 stateblock->changed.streamSource |= 1u << stream_idx;
1963 return WINED3D_OK;
1964}

Referenced by d3d8_device_DrawIndexedPrimitiveUP(), d3d8_device_DrawPrimitiveUP(), d3d8_device_ProcessVertices(), d3d8_device_SetStreamSource(), d3d9_device_DrawIndexedPrimitiveUP(), d3d9_device_DrawPrimitiveUP(), d3d9_device_ProcessVertices(), d3d9_device_SetStreamSource(), d3d_device7_DrawIndexedPrimitive(), d3d_device7_DrawIndexedPrimitiveStrided(), d3d_device7_DrawIndexedPrimitiveVB(), d3d_device7_DrawPrimitive(), d3d_device7_DrawPrimitiveStrided(), d3d_device7_DrawPrimitiveVB(), d3d_vertex_buffer7_ProcessVertices(), d3d_vertex_buffer7_Release(), and wined3d_stateblock_apply().

◆ wined3d_stateblock_set_stream_source_freq()

HRESULT __cdecl wined3d_stateblock_set_stream_source_freq ( struct wined3d_stateblock *  stateblock,
UINT  stream_idx,
UINT  divider 
)

Definition at line 1966 of file stateblock.c.

1968{
1970
1971 TRACE("stateblock %p, stream_idx %u, divider %#x.\n", stateblock, stream_idx, divider);
1972
1974 {
1975 WARN("INSTANCEDATA and INDEXEDDATA were set, returning D3DERR_INVALIDCALL.\n");
1977 }
1978 if ((divider & WINED3DSTREAMSOURCE_INSTANCEDATA) && !stream_idx)
1979 {
1980 WARN("INSTANCEDATA used on stream 0, returning D3DERR_INVALIDCALL.\n");
1982 }
1983 if (!divider)
1984 {
1985 WARN("Divider is 0, returning D3DERR_INVALIDCALL.\n");
1987 }
1988
1989 stream = &stateblock->stateblock_state.streams[stream_idx];
1991 stream->frequency = divider & 0x7fffff;
1992 stateblock->changed.streamFreq |= 1u << stream_idx;
1993 return WINED3D_OK;
1994}
#define WINED3DSTREAMSOURCE_INSTANCEDATA
Definition: wined3d.h:1015
#define WINED3DSTREAMSOURCE_INDEXEDDATA
Definition: wined3d.h:1014

Referenced by d3d9_device_SetStreamSourceFreq(), and wined3d_stateblock_apply().

◆ wined3d_stateblock_set_texture()

void __cdecl wined3d_stateblock_set_texture ( struct wined3d_stateblock *  stateblock,
UINT  stage,
struct wined3d_texture *  texture 
)

Definition at line 1816 of file stateblock.c.

1818{
1819 struct wined3d_texture *prev = stateblock->stateblock_state.textures[stage];
1820
1821 TRACE("stateblock %p, stage %u, texture %p.\n", stateblock, stage, texture);
1822
1823 if (stage >= ARRAY_SIZE(stateblock->stateblock_state.textures))
1824 {
1825 WARN("Ignoring invalid stage %u.\n", stage);
1826 return;
1827 }
1828
1829 if (texture)
1831 if (prev)
1833 stateblock->stateblock_state.textures[stage] = texture;
1834 stateblock->changed.textures |= 1u << stage;
1835
1836 if (texture_binding_might_invalidate_fs_settings(stateblock, texture, prev, stage))
1837 stateblock->changed.ffp_ps_settings = 1;
1838}
static bool texture_binding_might_invalidate_fs_settings(const struct wined3d_stateblock *stateblock, const struct wined3d_texture *texture, const struct wined3d_texture *prev, unsigned int stage)
Definition: stateblock.c:1780

Referenced by d3d8_device_SetTexture(), d3d9_device_SetTexture(), d3d_device3_SetRenderState(), d3d_device3_SetTexture(), d3d_device7_SetTexture(), and wined3d_stateblock_apply().

◆ wined3d_stateblock_set_texture_lod()

unsigned int __cdecl wined3d_stateblock_set_texture_lod ( struct wined3d_stateblock *  stateblock,
struct wined3d_texture *  texture,
unsigned int  lod 
)

Definition at line 4004 of file stateblock.c.

4006{
4007 unsigned int old;
4008
4009 TRACE("texture %p, lod %u.\n", texture, lod);
4010
4012
4013 if (old != lod)
4014 {
4015 for (unsigned int i = 0; i < WINED3D_MAX_COMBINED_SAMPLERS; ++i)
4016 {
4017 /* Mark the texture as changed. The next time the appplication
4018 * draws from this texture, wined3d_device_apply_stateblock() will
4019 * recompute the texture LOD.
4020 *
4021 * We only need to do this for the primary stateblock.
4022 * If a recording stateblock uses a texture whose LOD is changed,
4023 * that texture will be invalidated on the primary stateblock
4024 * anyway when the recording stateblock is applied. */
4025 if (stateblock->stateblock_state.textures[i] == texture)
4026 stateblock->changed.textures |= (1u << i);
4027 }
4028 }
4029
4030 return old;
4031}
unsigned int CDECL wined3d_texture_set_lod(struct wined3d_texture *texture, unsigned int lod)
Definition: texture.c:1722
GLint lod
Definition: glext.h:7795

Referenced by d3d8_texture_2d_SetLOD(), d3d8_texture_3d_SetLOD(), d3d8_texture_cube_SetLOD(), d3d9_texture_2d_SetLOD(), d3d9_texture_3d_SetLOD(), and d3d9_texture_cube_SetLOD().

◆ wined3d_stateblock_set_texture_stage_state()

void __cdecl wined3d_stateblock_set_texture_stage_state ( struct wined3d_stateblock *  stateblock,
UINT  stage,
enum wined3d_texture_stage_state  state,
unsigned int  value 
)

Definition at line 1718 of file stateblock.c.

1720{
1721 TRACE("stateblock %p, stage %u, state %s, value %#x.\n",
1722 stateblock, stage, debug_d3dtexturestate(state), value);
1723
1725 {
1726 WARN("Invalid state %#x passed.\n", state);
1727 return;
1728 }
1729
1730 if (stage >= WINED3D_MAX_FFP_TEXTURES)
1731 {
1732 WARN("Attempting to set stage %u which is higher than the max stage %u, ignoring.\n",
1733 stage, WINED3D_MAX_FFP_TEXTURES - 1);
1734 return;
1735 }
1736
1737 stateblock->stateblock_state.texture_states[stage][state] = value;
1738 stateblock->changed.textureState[stage] |= 1u << state;
1739
1740 switch (state)
1741 {
1743 stateblock->changed.ffp_ps_constants = 1;
1744 break;
1745
1747 stateblock->changed.ffp_vs_settings = 1;
1748 /* fall through */
1750 stateblock->changed.texture_matrices = 1;
1751 stateblock->changed.ffp_ps_settings = 1;
1752 break;
1753
1763 stateblock->changed.ffp_ps_settings = 1;
1764 break;
1765
1772 stateblock->changed.bumpenv_constants = 1;
1773 break;
1774
1775 default:
1776 break;
1777 }
1778}
const char * debug_d3dtexturestate(enum wined3d_texture_stage_state state)
Definition: utils.c:5214
#define WINED3D_HIGHEST_TEXTURE_STATE
Definition: wined3d.h:614

Referenced by d3d8_device_SetTextureStageState(), d3d9_device_SetTextureStageState(), d3d_device3_SetRenderState(), d3d_device7_SetTextureStageState(), fixup_texture_alpha_op(), and wined3d_stateblock_apply().

◆ wined3d_stateblock_set_transform()

void __cdecl wined3d_stateblock_set_transform ( struct wined3d_stateblock *  stateblock,
enum wined3d_transform_state  state,
const struct wined3d_matrix *  matrix 
)

Definition at line 1840 of file stateblock.c.

1842{
1843 TRACE("stateblock %p, state %s, matrix %p.\n", stateblock, debug_d3dtstype(d3dts), matrix);
1844 TRACE("%.8e %.8e %.8e %.8e\n", matrix->_11, matrix->_12, matrix->_13, matrix->_14);
1845 TRACE("%.8e %.8e %.8e %.8e\n", matrix->_21, matrix->_22, matrix->_23, matrix->_24);
1846 TRACE("%.8e %.8e %.8e %.8e\n", matrix->_31, matrix->_32, matrix->_33, matrix->_34);
1847 TRACE("%.8e %.8e %.8e %.8e\n", matrix->_41, matrix->_42, matrix->_43, matrix->_44);
1848
1849 stateblock->stateblock_state.transforms[d3dts] = *matrix;
1850 stateblock->changed.transform[d3dts >> 5] |= 1u << (d3dts & 0x1f);
1851 stateblock->changed.transforms = 1;
1852
1853 if (d3dts >= WINED3D_TS_TEXTURE0 && d3dts <= WINED3D_TS_TEXTURE7)
1854 stateblock->changed.texture_matrices = 1;
1855 else if (d3dts == WINED3D_TS_VIEW || d3dts >= WINED3D_TS_WORLD)
1856 stateblock->changed.modelview_matrices = 1;
1857}

Referenced by d3d8_device_SetTransform(), d3d9_device_SetTransform(), d3d_device1_SetMatrix(), d3d_device3_MultiplyTransform(), d3d_device3_SetTransform(), d3d_device7_SetTransform(), update_clip_space(), and wined3d_stateblock_apply().

◆ wined3d_stateblock_set_vertex_declaration()

void __cdecl wined3d_stateblock_set_vertex_declaration ( struct wined3d_stateblock *  stateblock,
struct wined3d_vertex_declaration *  declaration 
)

Definition at line 1571 of file stateblock.c.

1573{
1574 struct wined3d_vertex_declaration *prev = stateblock->stateblock_state.vertex_declaration;
1575
1576 TRACE("stateblock %p, declaration %p.\n", stateblock, declaration);
1577
1578 if (declaration)
1580 if (prev)
1582 stateblock->stateblock_state.vertex_declaration = declaration;
1583 stateblock->changed.vertexDecl = TRUE;
1584 /* Texture matrices depend on the format of the TEXCOORD attributes. */
1585 /* FIXME: They also depend on whether the draw is pretransformed,
1586 * but that should go away. */
1587 stateblock->changed.texture_matrices = TRUE;
1588
1589 if (declaration && prev)
1590 {
1591 if (!stateblock->stateblock_state.vs)
1592 {
1593 /* Because of settings->texcoords, we have to regenerate the vertex
1594 * shader on a vdecl change if there aren't enough varyings to just
1595 * always output all the texture coordinates.
1596 *
1597 * Likewise, we have to invalidate the shader when using per-vertex
1598 * colours and diffuse/specular attribute presence changes, or when
1599 * normal presence changes. */
1600 if (!stateblock->device->adapter->d3d_info.full_ffp_varyings || declaration->diffuse != prev->diffuse
1601 || (stateblock->stateblock_state.rs[WINED3D_RS_COLORVERTEX] && declaration->specular != prev->specular)
1602 || declaration->normal != prev->normal || declaration->point_size != prev->point_size)
1603 stateblock->changed.ffp_vs_settings = 1;
1604 }
1605
1606 if (declaration->position_transformed != prev->position_transformed)
1607 {
1608 /* We reuse the projection matrix to undo the translation between
1609 * clip coordinates and pixel coordinates, so we need to invalidate
1610 * it here. */
1611 stateblock->changed.ffp_vs_settings = 1;
1612 stateblock->changed.position_transformed = 1;
1613 stateblock->changed.transforms = 1;
1614 }
1615 }
1616 else
1617 {
1618 stateblock->changed.position_transformed = 1;
1619 stateblock->changed.ffp_vs_settings = 1;
1620 }
1621}

Referenced by d3d8_device_SetVertexShader(), d3d9_device_SetFVF(), d3d9_device_SetVertexDeclaration(), d3d_device7_DrawIndexedPrimitive(), d3d_device7_DrawIndexedPrimitiveStrided(), d3d_device7_DrawIndexedPrimitiveVB(), d3d_device7_DrawPrimitive(), d3d_device7_DrawPrimitiveStrided(), d3d_device7_DrawPrimitiveVB(), d3d_vertex_buffer7_ProcessVertices(), and wined3d_stateblock_apply().

◆ wined3d_stateblock_set_vertex_shader()

void __cdecl wined3d_stateblock_set_vertex_shader ( struct wined3d_stateblock *  stateblock,
struct wined3d_shader *  shader 
)

Definition at line 1319 of file stateblock.c.

1320{
1321 TRACE("stateblock %p, shader %p.\n", stateblock, shader);
1322
1323 if (shader)
1325 if (stateblock->stateblock_state.vs)
1327 stateblock->stateblock_state.vs = shader;
1328 stateblock->changed.vertexShader = TRUE;
1329 stateblock->changed.ffp_vs_settings = 1;
1330}

Referenced by d3d8_device_SetVertexShader(), d3d9_device_SetVertexShader(), and wined3d_stateblock_apply().

◆ wined3d_stateblock_set_viewport()

void __cdecl wined3d_stateblock_set_viewport ( struct wined3d_stateblock *  stateblock,
const struct wined3d_viewport *  viewport 
)

Definition at line 1900 of file stateblock.c.

1902{
1903 TRACE("stateblock %p, viewport %p.\n", stateblock, viewport);
1904
1905 stateblock->stateblock_state.viewport = *viewport;
1906 stateblock->changed.viewport = TRUE;
1907 stateblock->changed.point_scale = TRUE;
1908}

Referenced by d3d8_device_SetViewport(), d3d9_device_reset(), d3d9_device_SetViewport(), d3d_device7_SetViewport(), device_reset_viewport_state(), and wined3d_stateblock_apply().

◆ wined3d_stateblock_set_vs_consts_b()

HRESULT __cdecl wined3d_stateblock_set_vs_consts_b ( struct wined3d_stateblock *  stateblock,
unsigned int  start_idx,
unsigned int  count,
const BOOL *  constants 
)

Definition at line 1396 of file stateblock.c.

1398{
1399 unsigned int i;
1400
1401 TRACE("stateblock %p, start_idx %u, count %u, constants %p.\n",
1402 stateblock, start_idx, count, constants);
1403
1404 if (!constants || start_idx >= WINED3D_MAX_CONSTS_B)
1406
1407 if (count > WINED3D_MAX_CONSTS_B - start_idx)
1408 count = WINED3D_MAX_CONSTS_B - start_idx;
1409
1410 memcpy(&stateblock->stateblock_state.vs_consts_b[start_idx], constants, count * sizeof(*constants));
1411 for (i = start_idx; i < count + start_idx; ++i)
1412 stateblock->changed.vertexShaderConstantsB |= (1u << i);
1413 return WINED3D_OK;
1414}

Referenced by d3d9_device_SetVertexShaderConstantB(), and wined3d_stateblock_apply().

◆ wined3d_stateblock_set_vs_consts_f()

HRESULT __cdecl wined3d_stateblock_set_vs_consts_f ( struct wined3d_stateblock *  stateblock,
unsigned int  start_idx,
unsigned int  count,
const struct wined3d_vec4 *  constants 
)

Definition at line 1360 of file stateblock.c.

1362{
1363 const struct wined3d_d3d_info *d3d_info = &stateblock->device->adapter->d3d_info;
1364
1365 TRACE("stateblock %p, start_idx %u, count %u, constants %p.\n",
1366 stateblock, start_idx, count, constants);
1367
1368 if (!constants || !wined3d_bound_range(start_idx, count, d3d_info->limits.vs_uniform_count))
1370
1371 memcpy(&stateblock->stateblock_state.vs_consts_f[start_idx], constants, count * sizeof(*constants));
1372 wined3d_bitmap_set_bits(stateblock->changed.vs_consts_f, start_idx, count);
1373 return WINED3D_OK;
1374}

Referenced by d3d8_device_SetVertexShaderConstant(), d3d9_device_SetVertexShaderConstantF(), and wined3d_stateblock_apply().

◆ wined3d_stateblock_set_vs_consts_i()

HRESULT __cdecl wined3d_stateblock_set_vs_consts_i ( struct wined3d_stateblock *  stateblock,
unsigned int  start_idx,
unsigned int  count,
const struct wined3d_ivec4 *  constants 
)

Definition at line 1376 of file stateblock.c.

1378{
1379 unsigned int i;
1380
1381 TRACE("stateblock %p, start_idx %u, count %u, constants %p.\n",
1382 stateblock, start_idx, count, constants);
1383
1384 if (!constants || start_idx >= WINED3D_MAX_CONSTS_I)
1386
1387 if (count > WINED3D_MAX_CONSTS_I - start_idx)
1388 count = WINED3D_MAX_CONSTS_I - start_idx;
1389
1390 memcpy(&stateblock->stateblock_state.vs_consts_i[start_idx], constants, count * sizeof(*constants));
1391 for (i = start_idx; i < count + start_idx; ++i)
1392 stateblock->changed.vertexShaderConstantsI |= (1u << i);
1393 return WINED3D_OK;
1394}

Referenced by d3d9_device_SetVertexShaderConstantI(), and wined3d_stateblock_apply().

◆ wined3d_stateblock_texture_changed()

void __cdecl wined3d_stateblock_texture_changed ( struct wined3d_stateblock *  stateblock,
const struct wined3d_texture *  texture 
)

Definition at line 4033 of file stateblock.c.

4035{
4036 for (unsigned int i = 0; i < WINED3D_MAX_COMBINED_SAMPLERS; ++i)
4037 {
4038 if (stateblock->stateblock_state.textures[i] == texture)
4039 stateblock->changed.textures |= (1u << i);
4040 }
4041}

Referenced by ddraw_surface7_SetLOD(), and ddraw_surface_set_wined3d_textures_colour_key().

◆ wined3d_streaming_buffer_cleanup()

static void wined3d_streaming_buffer_cleanup ( struct wined3d_streaming_buffer *  buffer)
inlinestatic

Definition at line 2943 of file wined3d.h.

2944{
2945 if (buffer->buffer)
2947 buffer->buffer = NULL;
2948 buffer->pos = 0;
2949}
ULONG __cdecl wined3d_buffer_decref(struct wined3d_buffer *buffer)
Definition: buffer.c:459

Referenced by d3d8_device_Release(), d3d8_device_Reset(), d3d9_device_Release(), d3d9_device_reset(), and d3d_device_inner_Release().

◆ wined3d_streaming_buffer_init()

static void wined3d_streaming_buffer_init ( struct wined3d_streaming_buffer *  buffer,
unsigned int  bind_flags 
)
inlinestatic

Definition at line 2937 of file wined3d.h.

2938{
2939 memset(buffer, 0, sizeof(*buffer));
2940 buffer->bind_flags = bind_flags;
2941}

Referenced by d3d_device_init(), and device_init().

◆ wined3d_streaming_buffer_map()

HRESULT __cdecl wined3d_streaming_buffer_map ( struct wined3d_device *  device,
struct wined3d_streaming_buffer *  buffer,
unsigned int  size,
unsigned int  stride,
unsigned int *  ret_pos,
void **  ret_data 
)

Definition at line 1375 of file buffer.c.

1378{
1379 unsigned int map_flags = WINED3D_MAP_WRITE;
1380 struct wined3d_resource *resource;
1381 struct wined3d_map_desc map_desc;
1382 unsigned int pos, align;
1383 struct wined3d_box box;
1384 HRESULT hr;
1385
1386 TRACE("device %p, buffer %p, size %u, stride %u, ret_pos %p, ret_data %p.\n",
1387 device, buffer, size, stride, ret_pos, ret_data);
1388
1390 return hr;
1391 resource = &buffer->buffer->resource;
1392
1393 pos = buffer->pos;
1394 if ((align = pos % stride))
1395 align = stride - align;
1396 if (pos + size + align > resource->size)
1397 {
1398 pos = 0;
1399 map_flags |= WINED3D_MAP_DISCARD;
1400 }
1401 else
1402 {
1403 pos += align;
1404 map_flags |= WINED3D_MAP_NOOVERWRITE;
1405 }
1406
1407 wined3d_box_set(&box, pos, 0, pos + size, 1, 0, 1);
1408 if (SUCCEEDED(hr = wined3d_resource_map(resource, 0, &map_desc, &box, map_flags)))
1409 {
1410 *ret_pos = pos;
1411 *ret_data = map_desc.data;
1412 buffer->pos = pos + size;
1413 }
1414 return hr;
1415}
static HRESULT wined3d_streaming_buffer_prepare(struct wined3d_device *device, struct wined3d_streaming_buffer *buffer, unsigned int min_size)
Definition: buffer.c:1339
GLsizeiptr size
Definition: glext.h:5919
#define WINED3D_MAP_DISCARD
Definition: wined3d.h:953
#define WINED3D_MAP_NOOVERWRITE
Definition: wined3d.h:952
static size_t align(size_t addr, size_t alignment)

Referenced by d3d_device7_DrawIndexedPrimitiveStrided(), d3d_device7_DrawPrimitiveStrided(), and wined3d_streaming_buffer_upload().

◆ wined3d_streaming_buffer_unmap()

void __cdecl wined3d_streaming_buffer_unmap ( struct wined3d_streaming_buffer *  buffer)

◆ wined3d_streaming_buffer_upload()

HRESULT __cdecl wined3d_streaming_buffer_upload ( struct wined3d_device *  device,
struct wined3d_streaming_buffer *  buffer,
const void *  data,
unsigned int  size,
unsigned int  stride,
unsigned int *  pos 
)

Definition at line 1422 of file buffer.c.

1424{
1425 void *dst_data;
1426 HRESULT hr;
1427
1428 if (SUCCEEDED(hr = wined3d_streaming_buffer_map(device, buffer, size, stride, ret_pos, &dst_data)))
1429 {
1430 memcpy(dst_data, data, size);
1432 }
1433 return hr;
1434}
void CDECL wined3d_streaming_buffer_unmap(struct wined3d_streaming_buffer *buffer)
Definition: buffer.c:1417
HRESULT CDECL wined3d_streaming_buffer_map(struct wined3d_device *device, struct wined3d_streaming_buffer *buffer, unsigned int size, unsigned int stride, unsigned int *ret_pos, void **ret_data)
Definition: buffer.c:1375

Referenced by d3d8_device_DrawIndexedPrimitiveUP(), d3d8_device_DrawPrimitiveUP(), d3d8_device_upload_sysmem_index_buffer(), d3d9_device_DrawIndexedPrimitiveUP(), d3d9_device_DrawPrimitiveUP(), d3d9_device_upload_sysmem_index_buffer(), d3d_device7_DrawIndexedPrimitive(), d3d_device7_DrawIndexedPrimitiveStrided(), d3d_device7_DrawIndexedPrimitiveVB(), and d3d_device7_DrawPrimitive().

◆ wined3d_swapchain_create()

HRESULT __cdecl wined3d_swapchain_create ( struct wined3d_device *  device,
const struct wined3d_swapchain_desc *  desc,
struct wined3d_swapchain_state_parent *  state_parent,
void *  parent,
const struct wined3d_parent_ops *  parent_ops,
struct wined3d_swapchain **  swapchain 
)

Definition at line 1732 of file swapchain.c.

1736{
1737 struct wined3d_swapchain *object;
1738 HRESULT hr;
1739
1740 if (FAILED(hr = device->adapter->adapter_ops->adapter_create_swapchain(device,
1741 desc, state_parent, parent, parent_ops, &object)))
1742 return hr;
1743
1744 if (desc->flags & WINED3D_SWAPCHAIN_IMPLICIT)
1745 {
1748 {
1750 device->adapter->adapter_ops->adapter_destroy_swapchain(object);
1752 return hr;
1753 }
1755 }
1756
1757 *swapchain = object;
1758
1759 return hr;
1760}
HRESULT wined3d_device_set_implicit_swapchain(struct wined3d_device *device, struct wined3d_swapchain *swapchain)
Definition: device.c:1537
const struct wined3d_parent_ops * parent_ops
#define WINED3D_SWAPCHAIN_IMPLICIT
Definition: wined3d.h:901

Referenced by d3d11_swapchain_init(), ddraw_attach_d3d_device(), dxgi_device_init(), and swapchain_init().

◆ wined3d_swapchain_decref()

ULONG __cdecl wined3d_swapchain_decref ( struct wined3d_swapchain *  swapchain)

Definition at line 144 of file swapchain.c.

145{
146 unsigned int refcount = InterlockedDecrement(&swapchain->ref);
147
148 TRACE("%p decreasing refcount to %u.\n", swapchain, refcount);
149
150 if (!refcount)
151 {
152 struct wined3d_device *device;
153
155
156 device = swapchain->device;
157 if (device->swapchain_count && device->swapchains[0] == swapchain)
160
161 swapchain->parent_ops->wined3d_object_destroyed(swapchain->parent);
162 swapchain->device->adapter->adapter_ops->adapter_destroy_swapchain(swapchain);
163
165 }
166
167 return refcount;
168}
void wined3d_device_uninit_3d(struct wined3d_device *device)
Definition: device.c:1662
struct wined3d_device * device

Referenced by d3d11_swapchain_init(), d3d11_swapchain_Release(), d3d11_texture2d_Release(), d3d8_device_Release(), d3d8_surface_Release(), d3d8_swapchain_Release(), d3d9_device_Release(), d3d9_device_reset(), d3d9_surface_Release(), d3d9_swapchain_Release(), ddraw_attach_d3d_device(), ddraw_destroy_swapchain(), device_init(), and dxgi_device_Release().

◆ wined3d_swapchain_get_back_buffer()

struct wined3d_texture *__cdecl wined3d_swapchain_get_back_buffer ( const struct wined3d_swapchain *  swapchain,
UINT  backbuffer_idx 
)

Definition at line 256 of file swapchain.c.

258{
259 TRACE("swapchain %p, back_buffer_idx %u.\n",
260 swapchain, back_buffer_idx);
261
262 /* Return invalid if there is no backbuffer array, otherwise it will
263 * crash when ddraw is used (there swapchain->back_buffers is always
264 * NULL). We need this because this function is called from
265 * stateblock_init_default_state() to get the default scissorrect
266 * dimensions. */
267 if (!swapchain->back_buffers || back_buffer_idx >= swapchain->state.desc.backbuffer_count)
268 {
269 WARN("Invalid back buffer index.\n");
270 /* Native d3d9 doesn't set NULL here, just as wine's d3d9. But set it
271 * here in wined3d to avoid problems in other libs. */
272 return NULL;
273 }
274
275 TRACE("Returning back buffer %p.\n", swapchain->back_buffers[back_buffer_idx]);
276
277 return swapchain->back_buffers[back_buffer_idx];
278}

Referenced by d3d11_swapchain_create_d3d11_textures(), d3d11_swapchain_GetBuffer(), d3d11_swapchain_ResizeBuffers(), d3d8_device_GetBackBuffer(), d3d8_device_Reset(), d3d8_swapchain_create(), d3d8_swapchain_GetBackBuffer(), d3d9_device_reset(), d3d9_swapchain_create(), d3d9_swapchain_GetBackBuffer(), ddraw_surface_update_frontbuffer(), and dxgi_resource_GetUsage().

◆ wined3d_swapchain_get_desc()

◆ wined3d_swapchain_get_device()

struct wined3d_device *__cdecl wined3d_swapchain_get_device ( const struct wined3d_swapchain *  swapchain)

Definition at line 338 of file swapchain.c.

339{
340 TRACE("swapchain %p.\n", swapchain);
341
342 return swapchain->device;
343}

◆ wined3d_swapchain_get_display_mode()

HRESULT __cdecl wined3d_swapchain_get_display_mode ( const struct wined3d_swapchain *  swapchain,
struct wined3d_display_mode *  mode,
enum wined3d_display_rotation *  rotation 
)

Definition at line 316 of file swapchain.c.

318{
319 struct wined3d_output *output;
320 HRESULT hr;
321
322 TRACE("swapchain %p, mode %p, rotation %p.\n", swapchain, mode, rotation);
323
324 if (!(output = wined3d_swapchain_get_output(swapchain)))
325 {
326 ERR("Failed to get output from swapchain %p.\n", swapchain);
327 return E_FAIL;
328 }
329
330 hr = wined3d_output_get_display_mode(output, mode, rotation);
331
332 TRACE("Returning w %u, h %u, refresh rate %u, format %s.\n",
333 mode->width, mode->height, mode->refresh_rate, debug_d3dformat(mode->format_id));
334
335 return hr;
336}
struct wined3d_output * wined3d_swapchain_get_output(const struct wined3d_swapchain *swapchain)
Definition: swapchain.c:287

Referenced by d3d9_swapchain_GetDisplayMode(), d3d9_swapchain_GetDisplayModeEx(), ddraw_surface7_Restore(), and wined3d_device_get_display_mode().

◆ wined3d_swapchain_get_front_buffer()

struct wined3d_texture *__cdecl wined3d_swapchain_get_front_buffer ( const struct wined3d_swapchain *  swapchain)

Definition at line 280 of file swapchain.c.

281{
282 TRACE("swapchain %p.\n", swapchain);
283
284 return swapchain->front_buffer;
285}

Referenced by ddraw_surface_update_frontbuffer().

◆ wined3d_swapchain_get_front_buffer_data()

HRESULT __cdecl wined3d_swapchain_get_front_buffer_data ( const struct wined3d_swapchain *  swapchain,
struct wined3d_texture *  dst_texture,
unsigned int  sub_resource_idx 
)

Definition at line 235 of file swapchain.c.

237{
238 RECT src_rect, dst_rect;
239
240 TRACE("swapchain %p, dst_texture %p, sub_resource_idx %u.\n", swapchain, dst_texture, sub_resource_idx);
241
242 SetRect(&src_rect, 0, 0, swapchain->front_buffer->resource.width, swapchain->front_buffer->resource.height);
243 dst_rect = src_rect;
244
245 if (swapchain->state.desc.windowed)
246 {
247 MapWindowPoints(swapchain->win_handle, NULL, (POINT *)&dst_rect, 2);
248 FIXME("Using destination rect %s in windowed mode, this is likely wrong.\n",
249 wine_dbgstr_rect(&dst_rect));
250 }
251
252 return wined3d_device_context_blt(&swapchain->device->cs->c, dst_texture, sub_resource_idx, &dst_rect,
253 swapchain->front_buffer, 0, &src_rect, 0, NULL, WINED3D_TEXF_POINT);
254}
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)

Referenced by d3d8_device_GetFrontBuffer(), d3d9_device_GetFrontBufferData(), and d3d9_swapchain_GetFrontBufferData().

◆ wined3d_swapchain_get_gamma_ramp()

HRESULT __cdecl wined3d_swapchain_get_gamma_ramp ( const struct wined3d_swapchain *  swapchain,
struct wined3d_gamma_ramp *  ramp 
)

Definition at line 381 of file swapchain.c.

383{
384 struct wined3d_output *output;
385
386 TRACE("swapchain %p, ramp %p.\n", swapchain, ramp);
387
388 if (!(output = wined3d_swapchain_get_output(swapchain)))
389 {
390 ERR("Failed to get output from swapchain %p.\n", swapchain);
391 return E_FAIL;
392 }
393
394 return wined3d_output_get_gamma_ramp(output, ramp);
395}
HRESULT wined3d_output_get_gamma_ramp(struct wined3d_output *output, struct wined3d_gamma_ramp *ramp)
Definition: directx.c:1772

Referenced by wined3d_device_get_gamma_ramp(), and wined3d_swapchain_init().

◆ wined3d_swapchain_get_parent()

void *__cdecl wined3d_swapchain_get_parent ( const struct wined3d_swapchain *  swapchain)

Definition at line 170 of file swapchain.c.

171{
172 TRACE("swapchain %p.\n", swapchain);
173
174 return swapchain->parent;
175}

Referenced by d3d8_device_Present(), d3d8_device_Reset(), d3d9_device_GetBackBuffer(), d3d9_device_GetSwapChain(), d3d9_device_Present(), d3d9_device_PresentEx(), and d3d9_device_reset().

◆ wined3d_swapchain_get_raster_status()

HRESULT __cdecl wined3d_swapchain_get_raster_status ( const struct wined3d_swapchain *  swapchain,
struct wined3d_raster_status *  raster_status 
)

Definition at line 294 of file swapchain.c.

296{
297 struct wined3d_output *output;
298
299 TRACE("swapchain %p, raster_status %p.\n", swapchain, raster_status);
300
301 output = wined3d_swapchain_get_output(swapchain);
302 if (!output)
303 {
304 ERR("Failed to get output from swapchain %p.\n", swapchain);
305 return E_FAIL;
306 }
307
308 return wined3d_output_get_raster_status(output, raster_status);
309}
HRESULT CDECL wined3d_output_get_raster_status(const struct wined3d_output *output, struct wined3d_raster_status *raster_status)
Definition: directx.c:1814

Referenced by d3d9_swapchain_GetRasterStatus(), and wined3d_device_get_raster_status().

◆ wined3d_swapchain_get_state()

struct wined3d_swapchain_state *__cdecl wined3d_swapchain_get_state ( struct wined3d_swapchain *  swapchain)

Definition at line 311 of file swapchain.c.

312{
313 return &swapchain->state;
314}

Referenced by d3d11_swapchain_init(), d3d11_swapchain_ResizeTarget(), and d3d11_swapchain_SetFullscreenState().

◆ wined3d_swapchain_incref()

ULONG __cdecl wined3d_swapchain_incref ( struct wined3d_swapchain *  swapchain)

Definition at line 135 of file swapchain.c.

136{
137 unsigned int refcount = InterlockedIncrement(&swapchain->ref);
138
139 TRACE("%p increasing refcount to %u.\n", swapchain, refcount);
140
141 return refcount;
142}

Referenced by d3d11_swapchain_AddRef(), d3d11_texture2d_AddRef(), d3d8_surface_AddRef(), d3d8_swapchain_AddRef(), d3d9_surface_AddRef(), d3d9_swapchain_AddRef(), d3d_texture2d_create(), ddraw_create_swapchain(), and device_init().

◆ wined3d_swapchain_present()

HRESULT __cdecl wined3d_swapchain_present ( struct wined3d_swapchain *  swapchain,
const RECT *  src_rect,
const RECT *  dst_rect,
HWND  dst_window_override,
unsigned int  swap_interval,
uint32_t  flags 
)

Definition at line 192 of file swapchain.c.

195{
196 RECT s, d;
197
198 TRACE("swapchain %p, src_rect %s, dst_rect %s, dst_window_override %p, swap_interval %u, flags %#x.\n",
199 swapchain, wine_dbgstr_rect(src_rect), wine_dbgstr_rect(dst_rect),
200 dst_window_override, swap_interval, flags);
201
202 if (flags)
203 FIXME("Ignoring flags %#x.\n", flags);
204
206
207 if (!swapchain->back_buffers)
208 {
209 WARN("Swapchain doesn't have a backbuffer, returning WINED3DERR_INVALIDCALL.\n");
212 }
213
214 if (!src_rect)
215 {
216 SetRect(&s, 0, 0, swapchain->state.desc.backbuffer_width,
217 swapchain->state.desc.backbuffer_height);
218 src_rect = &s;
219 }
220
221 if (!dst_rect)
222 {
223 GetClientRect(swapchain->win_handle, &d);
224 dst_rect = &d;
225 }
226
227 wined3d_cs_emit_present(swapchain->device->cs, swapchain, src_rect,
228 dst_rect, dst_window_override, swap_interval, flags);
229
231
232 return WINED3D_OK;
233}
void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *swapchain, const RECT *src_rect, const RECT *dst_rect, HWND dst_window_override, unsigned int swap_interval, uint32_t flags)
Definition: cs.c:748
GLdouble s
Definition: gl.h:2039
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)

Referenced by d3d11_swapchain_present(), d3d8_swapchain_Present(), d3d9_device_Present(), d3d9_device_PresentEx(), d3d9_swapchain_Present(), ddraw_surface_update_frontbuffer(), and texture2d_blt().

◆ wined3d_swapchain_resize_buffers()

HRESULT __cdecl wined3d_swapchain_resize_buffers ( struct wined3d_swapchain *  swapchain,
unsigned int  buffer_count,
unsigned int  width,
unsigned int  height,
enum wined3d_format_id  format_id,
enum wined3d_multisample_type  multisample_type,
unsigned int  multisample_quality 
)

Definition at line 1923 of file swapchain.c.

1926{
1927 struct wined3d_swapchain_desc *desc = &swapchain->state.desc;
1928 bool recreate = false;
1929
1930 TRACE("swapchain %p, buffer_count %u, width %u, height %u, format %s, "
1931 "multisample_type %#x, multisample_quality %#x.\n",
1934
1936
1937 if (buffer_count && buffer_count != desc->backbuffer_count)
1938 FIXME("Cannot change the back buffer count yet.\n");
1939
1941
1942 if (!width || !height)
1943 {
1944 RECT client_rect;
1945
1946 /* The application is requesting that either the swapchain width or
1947 * height be set to the corresponding dimension in the window's
1948 * client rect. */
1949
1950 if (!GetClientRect(swapchain->state.device_window, &client_rect))
1951 {
1952 ERR("Failed to get client rect, last error %#lx.\n", GetLastError());
1954 }
1955
1956 if (!width)
1957 width = client_rect.right;
1958
1959 if (!height)
1960 height = client_rect.bottom;
1961 }
1962
1963 if (width != desc->backbuffer_width || height != desc->backbuffer_height)
1964 {
1965 desc->backbuffer_width = width;
1966 desc->backbuffer_height = height;
1967 recreate = true;
1968 }
1969
1971 {
1972 if (!desc->windowed)
1974 format_id = swapchain->state.original_mode.format_id;
1975 }
1976
1977 if (format_id != desc->backbuffer_format)
1978 {
1979 desc->backbuffer_format = format_id;
1980 recreate = true;
1981 }
1982
1983 if (multisample_type != desc->multisample_type
1984 || multisample_quality != desc->multisample_quality)
1985 {
1986 desc->multisample_type = multisample_type;
1987 desc->multisample_quality = multisample_quality;
1988 recreate = true;
1989 }
1990
1991 if (recreate)
1992 {
1993 struct wined3d_texture *new_texture;
1994 HRESULT hr;
1995 UINT i;
1996
1997 TRACE("Recreating swapchain textures.\n");
1998
1999 if (FAILED(hr = swapchain_create_texture(swapchain, true, false, &new_texture)))
2000 return hr;
2002 if (wined3d_texture_decref(swapchain->front_buffer))
2003 ERR("Something's still holding the front buffer (%p).\n", swapchain->front_buffer);
2004 swapchain->front_buffer = new_texture;
2005
2006 if (!(swapchain->device->wined3d->flags & WINED3D_NO3D))
2007 {
2010 }
2011
2012 for (i = 0; i < desc->backbuffer_count; ++i)
2013 {
2014 if (FAILED(hr = swapchain_create_texture(swapchain, false, false, &new_texture)))
2015 return hr;
2017 if (wined3d_texture_decref(swapchain->back_buffers[i]))
2018 ERR("Something's still holding back buffer %u (%p).\n", i, swapchain->back_buffers[i]);
2019 swapchain->back_buffers[i] = new_texture;
2020 }
2021 }
2022
2024
2025 return WINED3D_OK;
2026}
void wined3d_texture_invalidate_location(struct wined3d_texture *texture, unsigned int sub_resource_idx, uint32_t location)
Definition: texture.c:702
void wined3d_texture_set_swapchain(struct wined3d_texture *texture, struct wined3d_swapchain *swapchain)
Definition: texture.c:1263
void wined3d_texture_validate_location(struct wined3d_texture *texture, unsigned int sub_resource_idx, uint32_t location)
Definition: texture.c:678
struct wined3d_swapchain * swapchain
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
static void wined3d_swapchain_apply_sample_count_override(const struct wined3d_swapchain *swapchain, enum wined3d_format_id format_id, enum wined3d_multisample_type *type, unsigned int *quality)
Definition: swapchain.c:1352
void swapchain_update_draw_bindings(struct wined3d_swapchain *swapchain)
Definition: swapchain.c:1814
static HRESULT swapchain_create_texture(struct wined3d_swapchain *swapchain, bool front, bool depth, struct wined3d_texture **texture)
Definition: swapchain.c:1456
#define WINED3D_LOCATION_DRAWABLE
size_t const buffer_count
Definition: xtoa.cpp:36

Referenced by d3d11_swapchain_ResizeBuffers(), ddraw7_SetDisplayMode(), and wined3d_device_reset().

◆ wined3d_swapchain_set_gamma_ramp()

HRESULT __cdecl wined3d_swapchain_set_gamma_ramp ( const struct wined3d_swapchain *  swapchain,
uint32_t  flags,
const struct wined3d_gamma_ramp *  ramp 
)

Definition at line 353 of file swapchain.c.

355{
356 struct wined3d_output *output;
357
358 TRACE("swapchain %p, flags %#x, ramp %p.\n", swapchain, flags, ramp);
359
360 if (flags)
361 FIXME("Ignoring flags %#x.\n", flags);
362
363 if (!(output = wined3d_swapchain_get_output(swapchain)))
364 {
365 ERR("Failed to get output from swapchain %p.\n", swapchain);
366 return E_FAIL;
367 }
368
369 return wined3d_output_set_gamma_ramp(output, ramp);
370}
HRESULT CDECL wined3d_output_set_gamma_ramp(struct wined3d_output *output, const struct wined3d_gamma_ramp *ramp)
Definition: directx.c:1759

Referenced by wined3d_device_set_gamma_ramp(), and wined3d_swapchain_cleanup().

◆ wined3d_swapchain_set_palette()

void __cdecl wined3d_swapchain_set_palette ( struct wined3d_swapchain *  swapchain,
struct wined3d_palette *  palette 
)

Definition at line 372 of file swapchain.c.

373{
374 TRACE("swapchain %p, palette %p.\n", swapchain, palette);
375
377
378 swapchain->palette = palette;
379}
struct wined3d_palette * palette

Referenced by ddraw_create_swapchain(), and ddraw_surface_set_palette().

◆ wined3d_swapchain_set_window()

void __cdecl wined3d_swapchain_set_window ( struct wined3d_swapchain *  swapchain,
HWND  window 
)

Definition at line 177 of file swapchain.c.

178{
179 if (!window)
180 window = swapchain->state.device_window;
181 if (window == swapchain->win_handle)
182 return;
183
184 TRACE("Setting swapchain %p window from %p to %p.\n",
185 swapchain, swapchain->win_handle, window);
186
188
189 swapchain->win_handle = window;
190}

Referenced by ddraw_surface7_SetClipper(), wined3d_cs_exec_present(), and wined3d_device_reset().

◆ wined3d_swapchain_state_create()

HRESULT __cdecl wined3d_swapchain_state_create ( const struct wined3d_swapchain_desc *  desc,
HWND  window,
struct wined3d *  wined3d,
struct wined3d_swapchain_state_parent *  state_parent,
struct wined3d_swapchain_state **  state 
)

Definition at line 2473 of file swapchain.c.

2476{
2477 struct wined3d_swapchain_state *s;
2478 HRESULT hr;
2479
2480 TRACE("desc %p, window %p, wined3d %p, state %p.\n", desc, window, wined3d, state);
2481
2482 if (!(s = calloc(1, sizeof(*s))))
2483 return E_OUTOFMEMORY;
2484
2485 if (FAILED(hr = wined3d_swapchain_state_init(s, desc, window, wined3d, state_parent)))
2486 {
2487 free(s);
2488 return hr;
2489 }
2490
2491 *state = s;
2492
2493 return hr;
2494}
static HRESULT wined3d_swapchain_state_init(struct wined3d_swapchain_state *state, const struct wined3d_swapchain_desc *desc, HWND window, struct wined3d *wined3d, struct wined3d_swapchain_state_parent *parent)
Definition: swapchain.c:1389

Referenced by d3d12_swapchain_init().

◆ wined3d_swapchain_state_destroy()

void __cdecl wined3d_swapchain_state_destroy ( struct wined3d_swapchain_state *  state)

Definition at line 2467 of file swapchain.c.

2468{
2470 free(state);
2471}
void wined3d_swapchain_state_cleanup(struct wined3d_swapchain_state *state)
Definition: wined3d_main.c:942

Referenced by d3d12_swapchain_destroy(), and d3d12_swapchain_init().

◆ wined3d_swapchain_state_get_size()

void __cdecl wined3d_swapchain_state_get_size ( const struct wined3d_swapchain_state *  state,
unsigned int *  width,
unsigned int *  height 
)

Definition at line 2458 of file swapchain.c.

2460{
2461 TRACE("state %p.\n", state);
2462
2463 *width = state->desc.backbuffer_width;
2464 *height = state->desc.backbuffer_height;
2465}

Referenced by d3d11_swapchain_init(), and d3d12_swapchain_init().

◆ wined3d_swapchain_state_is_windowed()

BOOL __cdecl wined3d_swapchain_state_is_windowed ( const struct wined3d_swapchain_state *  state)

Definition at line 2451 of file swapchain.c.

2452{
2453 TRACE("state %p.\n", state);
2454
2455 return state->desc.windowed;
2456}

Referenced by d3d12_swapchain_GetDesc(), d3d12_swapchain_GetFullscreenDesc(), and d3d12_swapchain_GetFullscreenState().

◆ wined3d_swapchain_state_resize_target()

HRESULT __cdecl wined3d_swapchain_state_resize_target ( struct wined3d_swapchain_state *  state,
const struct wined3d_display_mode *  mode 
)

Definition at line 2065 of file swapchain.c.

2067{
2068 struct wined3d_display_mode actual_mode;
2069 struct wined3d_output_desc output_desc;
2070 RECT original_window_rect, window_rect;
2071 int x, y, width, height;
2072 HWND window;
2073 HRESULT hr;
2074
2075 TRACE("state %p, mode %p.\n", state, mode);
2076
2078
2079 window = state->device_window;
2080
2081 if (state->desc.windowed)
2082 {
2083 SetRect(&window_rect, 0, 0, mode->width, mode->height);
2084 AdjustWindowRectEx(&window_rect,
2087 GetWindowRect(window, &original_window_rect);
2088
2089 x = original_window_rect.left;
2090 y = original_window_rect.top;
2091 width = window_rect.right - window_rect.left;
2092 height = window_rect.bottom - window_rect.top;
2093 }
2094 else
2095 {
2097 {
2098 actual_mode = *mode;
2100 &actual_mode)))
2101 {
2102 ERR("Failed to set display mode, hr %#lx.\n", hr);
2104 return hr;
2105 }
2106 }
2107
2108 if (FAILED(hr = wined3d_output_get_desc(state->desc.output, &output_desc)))
2109 {
2110 ERR("Failed to get output description, hr %#lx.\n", hr);
2112 return hr;
2113 }
2114
2115 x = output_desc.desktop_rect.left;
2116 y = output_desc.desktop_rect.top;
2117 width = output_desc.desktop_rect.right - output_desc.desktop_rect.left;
2118 height = output_desc.desktop_rect.bottom - output_desc.desktop_rect.top;
2119 }
2120
2122
2124
2125 return WINED3D_OK;
2126}
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
LONG WINAPI GetWindowLongW(_In_ HWND, _In_ int)
BOOL WINAPI AdjustWindowRectEx(_Inout_ LPRECT, _In_ DWORD, _In_ BOOL, _In_ DWORD)
#define GWL_STYLE
Definition: winuser.h:863
BOOL WINAPI MoveWindow(_In_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ BOOL)
#define GWL_EXSTYLE
Definition: winuser.h:862
static HRESULT wined3d_swapchain_state_set_display_mode(struct wined3d_swapchain_state *state, struct wined3d_output *output, struct wined3d_display_mode *mode)
Definition: swapchain.c:2028
#define WINED3D_SWAPCHAIN_ALLOW_MODE_SWITCH
Definition: wined3d.h:897

Referenced by dxgi_swapchain_resize_target().

◆ wined3d_swapchain_state_set_fullscreen()

HRESULT __cdecl wined3d_swapchain_state_set_fullscreen ( struct wined3d_swapchain_state *  state,
const struct wined3d_swapchain_desc *  desc,
const struct wined3d_display_mode *  mode 
)

Definition at line 2344 of file swapchain.c.

2347{
2348 struct wined3d_display_mode actual_mode;
2349 struct wined3d_output_desc output_desc;
2350 BOOL windowed = state->desc.windowed;
2351 HRESULT hr;
2352
2353 TRACE("state %p, swapchain_desc %p, mode %p.\n", state, swapchain_desc, mode);
2354
2356 {
2357 if (mode)
2358 {
2359 actual_mode = *mode;
2360 if (FAILED(hr = wined3d_swapchain_state_set_display_mode(state, swapchain_desc->output,
2361 &actual_mode)))
2362 return hr;
2363 }
2364 else
2365 {
2366 if (!swapchain_desc->windowed)
2367 {
2368 actual_mode.width = swapchain_desc->backbuffer_width;
2369 actual_mode.height = swapchain_desc->backbuffer_height;
2370 actual_mode.refresh_rate = swapchain_desc->refresh_rate;
2371 actual_mode.format_id = adapter_format_from_backbuffer_format(swapchain_desc->output->adapter,
2372 swapchain_desc->backbuffer_format);
2373 actual_mode.scanline_ordering = WINED3D_SCANLINE_ORDERING_UNKNOWN;
2374 if (FAILED(hr = wined3d_swapchain_state_set_display_mode(state, swapchain_desc->output,
2375 &actual_mode)))
2376 return hr;
2377 }
2378 else
2379 {
2381 {
2382 WARN("Failed to restore display modes for all outputs, hr %#lx.\n", hr);
2383 return hr;
2384 }
2385 }
2386 }
2387 }
2388 else
2389 {
2390 if (mode)
2391 WARN("WINED3D_SWAPCHAIN_ALLOW_MODE_SWITCH is not set, ignoring mode.\n");
2392
2393 if (FAILED(hr = wined3d_output_get_display_mode(swapchain_desc->output, &actual_mode,
2394 NULL)))
2395 {
2396 ERR("Failed to get display mode, hr %#lx.\n", hr);
2398 }
2399 }
2400
2401 if (!swapchain_desc->windowed)
2402 {
2403 unsigned int width = actual_mode.width;
2404 unsigned int height = actual_mode.height;
2405
2406 if (FAILED(hr = wined3d_output_get_desc(swapchain_desc->output, &output_desc)))
2407 {
2408 ERR("Failed to get output description, hr %#lx.\n", hr);
2409 return hr;
2410 }
2411
2412 if (state->desc.windowed)
2413 {
2414 /* Switch from windowed to fullscreen */
2416 output_desc.desktop_rect.left, output_desc.desktop_rect.top, width, height)))
2417 return hr;
2418 }
2419 else
2420 {
2421 HWND window = state->device_window;
2422 BOOL filter;
2423
2424 /* Fullscreen -> fullscreen mode change */
2426 MoveWindow(window, output_desc.desktop_rect.left, output_desc.desktop_rect.top, width,
2427 height, TRUE);
2430 }
2431 state->d3d_mode = actual_mode;
2432 }
2433 else if (!state->desc.windowed)
2434 {
2435 /* Fullscreen -> windowed switch */
2436 RECT *window_rect = NULL;
2438 window_rect = &state->original_window_rect;
2439 wined3d_swapchain_state_restore_from_fullscreen(state, state->device_window, window_rect);
2440 }
2441
2442 state->desc.output = swapchain_desc->output;
2443 state->desc.windowed = swapchain_desc->windowed;
2444
2445 if (windowed != state->desc.windowed)
2446 state->parent->ops->windowed_state_changed(state->parent, state->desc.windowed);
2447
2448 return WINED3D_OK;
2449}
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define SW_SHOW
Definition: winuser.h:786
HRESULT CDECL wined3d_restore_display_modes(struct wined3d *wined3d)
Definition: directx.c:1618
static enum wined3d_format_id adapter_format_from_backbuffer_format(const struct wined3d_adapter *adapter, enum wined3d_format_id format_id)
Definition: swapchain.c:1380
void wined3d_swapchain_state_restore_from_fullscreen(struct wined3d_swapchain_state *state, HWND window, const RECT *window_rect)
Definition: swapchain.c:2275
#define WINED3D_SWAPCHAIN_RESTORE_WINDOW_RECT
Definition: wined3d.h:899
BOOL wined3d_filter_messages(HWND window, BOOL filter)
Definition: wined3d_main.c:605

Referenced by d3d11_swapchain_init(), d3d11_swapchain_SetFullscreenState(), d3d12_swapchain_init(), d3d12_swapchain_SetFullscreenState(), wined3d_device_reset(), and wined3d_hook_proc().

◆ wined3d_texture_acquire_identity_srv()

struct wined3d_shader_resource_view *__cdecl wined3d_texture_acquire_identity_srv ( struct wined3d_texture *  texture)

Definition at line 4476 of file texture.c.

4477{
4478 struct wined3d_view_desc desc;
4479 HRESULT hr;
4480
4481 TRACE("texture %p.\n", texture);
4482
4483 if (texture->identity_srv)
4484 return texture->identity_srv;
4485
4486 desc.format_id = texture->resource.format->id;
4487 /* The texture owns a reference to the SRV, so we can't have the SRV hold
4488 * a reference to the texture.
4489 * At the same time, a view must be destroyed before its texture, and we
4490 * need a bound SRV to keep the texture alive even if it doesn't have any
4491 * other references.
4492 * In order to achieve this we have the objects share reference counts.
4493 * This means the view doesn't hold a reference to the resource, but any
4494 * references to the view are forwarded to the resource instead. The view
4495 * is destroyed manually when all references are released. */
4497 desc.u.texture.level_idx = 0;
4498 desc.u.texture.level_count = texture->level_count;
4499 desc.u.texture.layer_idx = 0;
4500 desc.u.texture.layer_count = texture->layer_count;
4502 NULL, &wined3d_null_parent_ops, &texture->identity_srv)))
4503 {
4504 ERR("Failed to create shader resource view, hr %#lx.\n", hr);
4505 return NULL;
4506 }
4508
4509 return texture->identity_srv;
4510}
HRESULT CDECL wined3d_shader_resource_view_create(const struct wined3d_view_desc *desc, struct wined3d_resource *resource, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_shader_resource_view **view)
Definition: view.c:1261

Referenced by d3d9_texture_gen_auto_mipmap(), and wined3d_device_set_texture().

◆ wined3d_texture_add_dirty_region()

HRESULT __cdecl wined3d_texture_add_dirty_region ( struct wined3d_texture *  texture,
UINT  layer,
const struct wined3d_box *  dirty_region 
)

Definition at line 2132 of file texture.c.

2134{
2135 TRACE("texture %p, layer %u, dirty_region %s.\n", texture, layer, debug_box(dirty_region));
2136
2137 if (layer >= texture->layer_count)
2138 {
2139 WARN("Invalid layer %u specified.\n", layer);
2141 }
2142
2143 if (dirty_region && FAILED(wined3d_resource_check_box_dimensions(&texture->resource, 0, dirty_region)))
2144 {
2145 WARN("Invalid dirty_region %s specified.\n", debug_box(dirty_region));
2147 }
2148
2151
2152 return WINED3D_OK;
2153}
void wined3d_cs_emit_add_dirty_texture_region(struct wined3d_cs *cs, struct wined3d_texture *texture, unsigned int layer)
Definition: cs.c:2828
static void wined3d_texture_dirty_region_add(struct wined3d_texture *texture, unsigned int layer, const struct wined3d_box *box)
Definition: texture.c:1080
GLenum GLuint GLint GLint layer
Definition: glext.h:7007

Referenced by d3d8_texture_2d_AddDirtyRect(), d3d8_texture_3d_AddDirtyBox(), d3d8_texture_cube_AddDirtyRect(), d3d9_texture_2d_AddDirtyRect(), d3d9_texture_3d_AddDirtyBox(), d3d9_texture_cube_AddDirtyRect(), mark_managed_resource_dirty(), and wined3d_device_context_blt().

◆ wined3d_texture_create()

HRESULT __cdecl wined3d_texture_create ( struct wined3d_device *  device,
const struct wined3d_resource_desc *  desc,
UINT  layer_count,
unsigned int  level_count,
uint32_t  flags,
const struct wined3d_sub_resource_data *  data,
void *  parent,
const struct wined3d_parent_ops *  parent_ops,
struct wined3d_texture **  texture 
)

◆ wined3d_texture_decref()

ULONG __cdecl wined3d_texture_decref ( struct wined3d_texture *  texture)

Definition at line 1606 of file texture.c.

1607{
1608 unsigned int i, sub_resource_count, refcount;
1609
1610 TRACE("texture %p, swapchain %p.\n", texture, texture->swapchain);
1611
1612 refcount = InterlockedDecrement(&texture->resource.ref);
1613 TRACE("%p decreasing refcount to %u.\n", texture, refcount);
1614
1615 if (!refcount)
1616 {
1617 bool in_cs_thread = GetCurrentThreadId() == texture->resource.device->cs->thread_id;
1618
1619 if (texture->identity_srv)
1620 {
1621 assert(!in_cs_thread);
1623 }
1624
1625 /* This is called from the CS thread to destroy temporary textures. */
1626 if (!in_cs_thread)
1628 /* Wait for the texture to become idle if it's using user memory,
1629 * since the application is allowed to free that memory once the
1630 * texture is destroyed. Note that this implies that
1631 * the destroy handler can't access that memory either. */
1632 sub_resource_count = texture->layer_count * texture->level_count;
1633 for (i = 0; i < sub_resource_count; ++i)
1634 {
1635 if (texture->sub_resources[i].user_memory)
1636 {
1638 break;
1639 }
1640 }
1641 texture->resource.device->adapter->adapter_ops->adapter_destroy_texture(texture);
1642 if (!in_cs_thread)
1644 }
1645
1646 return refcount;
1647}
DWORD WINAPI GetCurrentThreadId(void)
Definition: thread.c:459
static void wined3d_resource_wait_idle(const struct wined3d_resource *resource)

Referenced by d3d11_texture1d_Release(), d3d11_texture2d_Release(), d3d11_texture3d_Release(), d3d8_device_create_surface(), d3d8_surface_Release(), d3d8_texture_decref(), d3d8_texture_init(), d3d8_texture_wined3d_object_destroyed(), d3d9_device_create_surface(), d3d9_surface_Release(), d3d9_texture_decref(), d3d9_texture_init(), d3d9_texture_wined3d_object_destroyed(), d3d_texture1d_create(), d3d_texture2d_create(), d3d_texture3d_init(), ddraw_surface7_SetSurfaceDesc(), ddraw_surface_cleanup(), ddraw_surface_wined3d_object_destroyed(), ddraw_texture_init(), device_load_logo(), dxgi_device_CreateSurface(), glsl_blitter_blit(), surface_cpu_blt(), texture2d_blt_fbo(), texture_resource_decref(), wined3d_cs_packet_decref_objects(), wined3d_device_reset(), wined3d_device_set_cursor_properties(), wined3d_device_uninit_3d(), wined3d_stateblock_capture(), wined3d_stateblock_set_texture(), wined3d_stateblock_state_cleanup(), wined3d_swapchain_cleanup(), wined3d_swapchain_init(), and wined3d_swapchain_resize_buffers().

◆ wined3d_texture_from_resource()

◆ wined3d_texture_get_dc()

HRESULT __cdecl wined3d_texture_get_dc ( struct wined3d_texture *  texture,
unsigned int  sub_resource_idx,
HDC *  dc 
)

Definition at line 4243 of file texture.c.

4244{
4245 struct wined3d_device *device = texture->resource.device;
4246 struct wined3d_texture_sub_resource *sub_resource;
4247 struct wined3d_dc_info *dc_info;
4248
4249 TRACE("texture %p, sub_resource_idx %u, dc %p.\n", texture, sub_resource_idx, dc);
4250
4251 if (!(texture->flags & WINED3D_TEXTURE_GET_DC))
4252 {
4253 WARN("Texture does not support GetDC\n");
4254 /* Don't touch the DC */
4256 }
4257
4258 if (!(sub_resource = wined3d_texture_get_sub_resource(texture, sub_resource_idx)))
4260
4261 if (texture->resource.type != WINED3D_RTYPE_TEXTURE_2D)
4262 {
4263 WARN("Not supported on %s resources.\n", debug_d3dresourcetype(texture->resource.type));
4265 }
4266
4267 if (texture->resource.map_count && !(texture->flags & WINED3D_TEXTURE_GET_DC_LENIENT))
4269
4270 if (!(dc_info = texture->dc_info) || !dc_info[sub_resource_idx].dc)
4271 {
4272 struct wined3d_texture_idx texture_idx = {texture, sub_resource_idx};
4273
4276 if (!(dc_info = texture->dc_info) || !dc_info[sub_resource_idx].dc)
4278 }
4279
4282 ++texture->resource.map_count;
4283 ++sub_resource->map_count;
4284
4285 *dc = dc_info[sub_resource_idx].dc;
4286 TRACE("Returning dc %p.\n", *dc);
4287
4288 return WINED3D_OK;
4289}
static void wined3d_texture_create_dc(void *object)
Definition: texture.c:1129
static struct wined3d_texture_sub_resource * wined3d_texture_get_sub_resource(struct wined3d_texture *texture, unsigned int sub_resource_idx)
Definition: texture.c:2122
unsigned int sub_resource_idx
Definition: texture.c:39
#define WINED3D_TEXTURE_GET_DC_LENIENT
#define WINED3D_TEXTURE_GET_DC
#define WINED3D_TEXTURE_DC_IN_USE

Referenced by d3d9_surface_GetDC(), ddraw_surface7_GetDC(), ddraw_surface_update_frontbuffer(), device_load_logo(), and dxgi_surface_GetDC().

◆ wined3d_texture_get_level_count()

◆ wined3d_texture_get_lod()

unsigned int __cdecl wined3d_texture_get_lod ( const struct wined3d_texture *  texture)

Definition at line 1715 of file texture.c.

1716{
1717 TRACE("texture %p, returning %u.\n", texture, texture->lod);
1718
1719 return texture->lod;
1720}

Referenced by d3d8_texture_2d_GetLOD(), d3d8_texture_3d_GetLOD(), d3d8_texture_cube_GetLOD(), d3d9_texture_2d_GetLOD(), d3d9_texture_3d_GetLOD(), d3d9_texture_cube_GetLOD(), and ddraw_surface7_GetLOD().

◆ wined3d_texture_get_overlay_position()

HRESULT __cdecl wined3d_texture_get_overlay_position ( const struct wined3d_texture *  texture,
unsigned int  sub_resource_idx,
LONG *  x,
LONG *  y 
)

Definition at line 3915 of file texture.c.

3917{
3918 struct wined3d_overlay_info *overlay;
3919
3920 TRACE("texture %p, sub_resource_idx %u, x %p, y %p.\n", texture, sub_resource_idx, x, y);
3921
3922 if (!(texture->resource.usage & WINED3DUSAGE_OVERLAY)
3925
3926 overlay = &texture->overlay_info[sub_resource_idx];
3927 if (!overlay->dst_texture)
3928 {
3929 TRACE("Overlay not visible.\n");
3930 *x = 0;
3931 *y = 0;
3933 }
3934
3935 *x = overlay->dst_rect.left;
3936 *y = overlay->dst_rect.top;
3937
3938 TRACE("Returning position %ld, %ld.\n", *x, *y);
3939
3940 return WINED3D_OK;
3941}
#define WINEDDERR_OVERLAYNOTVISIBLE
Definition: wined3d.h:49
#define WINED3DUSAGE_OVERLAY
Definition: wined3d.h:937
#define WINEDDERR_NOTAOVERLAYSURFACE
Definition: wined3d.h:45

Referenced by ddraw_surface7_GetOverlayPosition().

◆ wined3d_texture_get_parent()

◆ wined3d_texture_get_pitch()

void __cdecl wined3d_texture_get_pitch ( const struct wined3d_texture *  texture,
unsigned int  level,
unsigned int *  row_pitch,
unsigned int *  slice_pitch 
)

◆ wined3d_texture_get_resource()

struct wined3d_resource *__cdecl wined3d_texture_get_resource ( struct wined3d_texture *  texture)

Definition at line 1649 of file texture.c.

1650{
1651 TRACE("texture %p.\n", texture);
1652
1653 return &texture->resource;
1654}

Referenced by d3d10_texture1d_Map(), d3d10_texture1d_Unmap(), d3d10_texture2d_Map(), d3d10_texture2d_Unmap(), d3d10_texture3d_Map(), d3d10_texture3d_Unmap(), d3d11_texture2d_GetDesc(), d3d8_surface_LockRect(), d3d8_surface_UnlockRect(), d3d8_texture_2d_GetPriority(), d3d8_texture_2d_SetPriority(), d3d8_texture_3d_GetPriority(), d3d8_texture_3d_SetPriority(), d3d8_texture_cube_GetPriority(), d3d8_texture_cube_SetPriority(), d3d8_texture_preload(), d3d8_volume_LockBox(), d3d8_volume_UnlockBox(), d3d9_device_UpdateSurface(), d3d9_surface_LockRect(), d3d9_surface_PreLoad(), d3d9_surface_UnlockRect(), d3d9_texture_2d_GetPriority(), d3d9_texture_2d_SetPriority(), d3d9_texture_3d_GetPriority(), d3d9_texture_3d_SetPriority(), d3d9_texture_cube_GetPriority(), d3d9_texture_cube_SetPriority(), d3d9_texture_preload(), d3d9_volume_LockBox(), d3d9_volume_UnlockBox(), d3d_device7_PreLoad(), d3d_texture1d_create(), d3d_texture2_Load(), d3d_texture2d_create(), d3d_texture3d_init(), ddraw_surface1_Unlock(), ddraw_surface7_GetPriority(), ddraw_surface7_SetPriority(), ddraw_surface7_SetSurfaceDesc(), ddraw_surface_get_default_texture(), ddraw_surface_get_draw_texture(), ddraw_surface_reserve_memory(), ddraw_texture_init(), ddraw_texture_rename_to(), dxgi_device_parent_register_swapchain_texture(), fixup_texture_alpha_op(), resolve_depth_buffer(), surface_lock(), wined3d_resource_from_d3d10_resource(), and wined3d_resource_from_d3d11_resource().

◆ wined3d_texture_get_sub_resource_desc()

HRESULT __cdecl wined3d_texture_get_sub_resource_desc ( const struct wined3d_texture *  texture,
unsigned int  sub_resource_idx,
struct wined3d_sub_resource_desc *  desc 
)

Definition at line 4055 of file texture.c.

4057{
4058 const struct wined3d_resource *resource;
4059 unsigned int level_idx;
4060
4061 TRACE("texture %p, sub_resource_idx %u, desc %p.\n", texture, sub_resource_idx, desc);
4062
4063 if (!wined3d_texture_validate_sub_resource_idx(texture, sub_resource_idx))
4065
4066 resource = &texture->resource;
4067 desc->format = resource->format->id;
4068 desc->multisample_type = resource->multisample_type;
4069 desc->multisample_quality = resource->multisample_quality;
4070 desc->usage = resource->usage;
4071 desc->bind_flags = resource->bind_flags;
4072 desc->access = resource->access;
4073
4074 level_idx = sub_resource_idx % texture->level_count;
4075 desc->width = wined3d_texture_get_level_width(texture, level_idx);
4076 desc->height = wined3d_texture_get_level_height(texture, level_idx);
4077 desc->depth = wined3d_texture_get_level_depth(texture, level_idx);
4078 desc->size = texture->sub_resources[sub_resource_idx].size;
4079
4080 return WINED3D_OK;
4081}

Referenced by d3d8_device_CopyRects(), d3d8_device_SetRenderTarget(), d3d8_device_SetViewport(), d3d8_surface_GetDesc(), d3d8_texture_2d_GetLevelDesc(), d3d8_texture_3d_GetLevelDesc(), d3d8_texture_cube_GetLevelDesc(), d3d8_volume_GetDesc(), d3d9_device_ColorFill(), d3d9_device_GetRenderTargetData(), d3d9_device_StretchRect(), d3d9_device_UpdateSurface(), d3d9_surface_GetDesc(), d3d9_texture_2d_GetLevelDesc(), d3d9_texture_3d_GetLevelDesc(), d3d9_texture_cube_GetLevelDesc(), d3d9_volume_GetDesc(), d3d_device7_SetViewport(), d3d_viewport_SetViewport(), d3d_viewport_SetViewport2(), ddraw_surface7_Restore(), ddraw_surface_reserve_memory(), ddraw_texture_init(), and texture_resource_sub_resource_get_desc().

◆ wined3d_texture_get_sub_resource_parent()

◆ wined3d_texture_get_swapchain()

struct wined3d_swapchain *__cdecl wined3d_texture_get_swapchain ( struct wined3d_texture *  texture)

Definition at line 4028 of file texture.c.

4029{
4030 return texture->swapchain;
4031}

Referenced by d3d8_surface_create(), d3d9_surface_create(), d3d_texture2d_create(), and dxgi_resource_GetUsage().

◆ wined3d_texture_incref()

ULONG __cdecl wined3d_texture_incref ( struct wined3d_texture *  texture)

Definition at line 1516 of file texture.c.

1517{
1518 unsigned int refcount;
1519
1520 TRACE("texture %p, swapchain %p.\n", texture, texture->swapchain);
1521
1522 refcount = InterlockedIncrement(&texture->resource.ref);
1523 TRACE("%p increasing refcount to %u.\n", texture, refcount);
1524
1525 return refcount;
1526}

Referenced by d3d11_texture1d_AddRef(), d3d11_texture2d_AddRef(), d3d11_texture3d_AddRef(), d3d8_surface_AddRef(), d3d8_texture_incref(), d3d9_surface_AddRef(), d3d9_texture_incref(), d3d_texture2d_create(), ddraw_surface_add_iface(), ddraw_surface_init(), ddraw_texture_init(), texture_resource_incref(), wined3d_cs_packet_incref_objects(), wined3d_stateblock_capture(), and wined3d_stateblock_set_texture().

◆ wined3d_texture_release_dc()

HRESULT __cdecl wined3d_texture_release_dc ( struct wined3d_texture *  texture,
unsigned int  sub_resource_idx,
HDC  dc 
)

Definition at line 4291 of file texture.c.

4292{
4293 struct wined3d_device *device = texture->resource.device;
4294 struct wined3d_texture_sub_resource *sub_resource;
4295 struct wined3d_dc_info *dc_info;
4296
4297 TRACE("texture %p, sub_resource_idx %u, dc %p.\n", texture, sub_resource_idx, dc);
4298
4299 if (!(sub_resource = wined3d_texture_get_sub_resource(texture, sub_resource_idx)))
4301
4302 if (texture->resource.type != WINED3D_RTYPE_TEXTURE_2D)
4303 {
4304 WARN("Not supported on %s resources.\n", debug_d3dresourcetype(texture->resource.type));
4306 }
4307
4310
4311 if (!(dc_info = texture->dc_info) || dc_info[sub_resource_idx].dc != dc)
4312 {
4313 WARN("Application tries to release invalid DC %p, sub-resource DC is %p.\n",
4314 dc, dc_info ? dc_info[sub_resource_idx].dc : NULL);
4316 }
4317
4318 if (!(texture->resource.usage & WINED3DUSAGE_OWNDC))
4319 {
4320 struct wined3d_texture_idx texture_idx = {texture, sub_resource_idx};
4321
4324 }
4325
4326 --sub_resource->map_count;
4327 if (!--texture->resource.map_count && texture->update_map_binding)
4330 texture->flags &= ~WINED3D_TEXTURE_DC_IN_USE;
4331
4332 return WINED3D_OK;
4333}
static void wined3d_texture_update_map_binding(struct wined3d_texture *texture)
Definition: texture.c:933
static void wined3d_texture_destroy_dc(void *object)
Definition: texture.c:1217
#define WINED3DUSAGE_OWNDC
Definition: wined3d.h:935

Referenced by d3d9_surface_ReleaseDC(), ddraw_surface7_ReleaseDC(), ddraw_surface_update_frontbuffer(), device_load_logo(), and dxgi_surface_ReleaseDC().

◆ wined3d_texture_set_color_key()

HRESULT __cdecl wined3d_texture_set_color_key ( struct wined3d_texture *  texture,
uint32_t  flags,
const struct wined3d_color_key *  color_key 
)

Definition at line 1753 of file texture.c.

1755{
1756 struct wined3d_device *device = texture->resource.device;
1757 static const DWORD all_flags = WINED3D_CKEY_DST_BLT | WINED3D_CKEY_DST_OVERLAY
1759
1760 TRACE("texture %p, flags %#x, color_key %p.\n", texture, flags, color_key);
1761
1762 if (flags & ~all_flags)
1763 {
1764 WARN("Invalid flags passed, returning WINED3DERR_INVALIDCALL.\n");
1766 }
1767
1768 if (color_key)
1769 {
1771 texture->src_blt_color_key = *color_key;
1772 texture->color_key_flags |= flags;
1773 }
1774 else
1775 {
1776 texture->color_key_flags &= ~flags;
1777 }
1778
1780
1781 return WINED3D_OK;
1782}
void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture *texture, WORD flags, const struct wined3d_color_key *color_key)
Definition: cs.c:2037
#define WINED3D_CKEY_DST_BLT
Definition: wined3d.h:1339
#define WINED3D_CKEY_SRC_OVERLAY
Definition: wined3d.h:1342
#define WINED3D_CKEY_DST_OVERLAY
Definition: wined3d.h:1340

Referenced by ddraw_surface_set_wined3d_textures_colour_key(), and device_load_logo().

◆ wined3d_texture_set_lod()

unsigned int __cdecl wined3d_texture_set_lod ( struct wined3d_texture *  texture,
unsigned int  lod 
)

Definition at line 1722 of file texture.c.

1723{
1724 struct wined3d_resource *resource;
1725 unsigned int old = texture->lod;
1726
1727 TRACE("texture %p, returning %u.\n", texture, texture->lod);
1728
1729 /* The d3d9:texture test shows that SetLOD is ignored on non-managed
1730 * textures. The call always returns 0, and GetLOD always returns 0. */
1731 resource = &texture->resource;
1732 if (!(resource->usage & WINED3DUSAGE_MANAGED))
1733 {
1734 TRACE("Ignoring LOD on texture with resource access %s.\n",
1736 return 0;
1737 }
1738
1739 if (lod >= texture->level_count)
1740 lod = texture->level_count - 1;
1741
1742 texture->lod = lod;
1743 return old;
1744}
const char * wined3d_debug_resource_access(uint32_t access)
Definition: utils.c:4828

Referenced by ddraw_surface7_SetLOD(), and wined3d_stateblock_set_texture_lod().

◆ wined3d_texture_set_overlay_position()

HRESULT __cdecl wined3d_texture_set_overlay_position ( struct wined3d_texture *  texture,
unsigned int  sub_resource_idx,
LONG  x,
LONG  y 
)

Definition at line 3943 of file texture.c.

3945{
3946 struct wined3d_overlay_info *overlay;
3947 LONG w, h;
3948
3949 TRACE("texture %p, sub_resource_idx %u, x %ld, y %ld.\n", texture, sub_resource_idx, x, y);
3950
3951 if (!(texture->resource.usage & WINED3DUSAGE_OVERLAY)
3954
3955 overlay = &texture->overlay_info[sub_resource_idx];
3956 w = overlay->dst_rect.right - overlay->dst_rect.left;
3957 h = overlay->dst_rect.bottom - overlay->dst_rect.top;
3958 SetRect(&overlay->dst_rect, x, y, x + w, y + h);
3959
3960 return WINED3D_OK;
3961}

Referenced by ddraw_surface7_SetOverlayPosition().

◆ wined3d_texture_set_sub_resource_parent()

void __cdecl wined3d_texture_set_sub_resource_parent ( struct wined3d_texture *  texture,
unsigned int  sub_resource_idx,
void *  parent,
const struct wined3d_parent_ops *  parent_ops 
)

Definition at line 4043 of file texture.c.

4045{
4046 TRACE("texture %p, sub_resource_idx %u, parent %p.\n", texture, sub_resource_idx, parent);
4047
4048 if (!wined3d_texture_validate_sub_resource_idx(texture, sub_resource_idx))
4049 return;
4050
4051 texture->sub_resources[sub_resource_idx].parent = parent;
4052 texture->sub_resources[sub_resource_idx].parent_ops = parent_ops;
4053}

Referenced by d3d8_surface_create(), d3d9_surface_create(), ddraw_surface7_SetSurfaceDesc(), ddraw_texture_init(), and ddraw_texture_rename_to().

◆ wined3d_texture_update_desc()

HRESULT __cdecl wined3d_texture_update_desc ( struct wined3d_texture *  texture,
unsigned int  sub_resource_idx,
void *  mem,
unsigned int  pitch 
)

Definition at line 1868 of file texture.c.

1870{
1871 unsigned int current_row_pitch, current_slice_pitch, width, height;
1872 struct wined3d_texture_sub_resource *sub_resource;
1873 unsigned int i, level, sub_resource_count;
1874 const struct wined3d_format *format;
1875 struct wined3d_device *device;
1876 unsigned int slice_pitch;
1877 bool update_memory_only;
1878 bool create_dib = false;
1879
1880 TRACE("texture %p, sub_resource_idx %u, mem %p, pitch %u.\n", texture, sub_resource_idx, mem, pitch);
1881
1882 device = texture->resource.device;
1883 format = texture->resource.format;
1884 level = sub_resource_idx % texture->level_count;
1885 sub_resource_count = texture->level_count * texture->layer_count;
1886
1889 if (pitch)
1890 slice_pitch = height * pitch;
1891 else
1892 wined3d_format_calculate_pitch(format, 1, width, height, &pitch, &slice_pitch);
1893
1894 wined3d_texture_get_pitch(texture, level, &current_row_pitch, &current_slice_pitch);
1895 update_memory_only = (pitch == current_row_pitch && slice_pitch == current_slice_pitch);
1896
1897 if (sub_resource_count > 1 && !update_memory_only)
1898 {
1899 FIXME("Texture has multiple sub-resources, not supported.\n");
1901 }
1902
1903 if (texture->resource.type != WINED3D_RTYPE_TEXTURE_2D)
1904 {
1905 WARN("Not supported on %s.\n", debug_d3dresourcetype(texture->resource.type));
1907 }
1908
1909 if (texture->resource.map_count)
1910 {
1911 WARN("Texture is mapped.\n");
1913 }
1914
1915 /* We have no way of supporting a pitch that is not a multiple of the pixel
1916 * byte width short of uploading the texture row-by-row.
1917 * Fortunately that's not an issue since D3D9Ex doesn't allow a custom pitch
1918 * for user-memory textures (it always expects packed data) while DirectDraw
1919 * requires a 4-byte aligned pitch and doesn't support texture formats
1920 * larger than 4 bytes per pixel nor any format using 3 bytes per pixel.
1921 * This check is here to verify that the assumption holds. */
1922 if (pitch % format->byte_count)
1923 {
1924 WARN("Pitch unsupported, not a multiple of the texture format byte width.\n");
1926 }
1927
1928 if (device->d3d_initialized)
1931
1932 if (texture->dc_info && texture->dc_info[0].dc)
1933 {
1934 struct wined3d_texture_idx texture_idx = {texture, sub_resource_idx};
1935
1938 create_dib = true;
1939 }
1940
1941 texture->sub_resources[sub_resource_idx].user_memory = mem;
1942
1943 if (update_memory_only)
1944 {
1945 for (i = 0; i < sub_resource_count; ++i)
1946 if (!texture->sub_resources[i].user_memory)
1947 break;
1948
1949 if (i == sub_resource_count)
1951 }
1952 else
1953 {
1955
1956 sub_resource = &texture->sub_resources[sub_resource_idx];
1957
1958 texture->row_pitch = pitch;
1959 texture->slice_pitch = slice_pitch;
1960
1961 if (!(texture->resource.access & WINED3D_RESOURCE_ACCESS_CPU)
1962 && texture->resource.usage & WINED3DUSAGE_VIDMEM_ACCOUNTING)
1963 adapter_adjust_memory(device->adapter, (INT64)texture->slice_pitch - texture->resource.size);
1964 texture->resource.size = texture->slice_pitch;
1965 sub_resource->size = texture->slice_pitch;
1966 sub_resource->locations = WINED3D_LOCATION_DISCARDED;
1967 }
1968
1969 if (!mem && !wined3d_resource_prepare_sysmem(&texture->resource))
1970 ERR("Failed to allocate resource memory.\n");
1971
1974
1975 if (create_dib)
1976 {
1977 struct wined3d_texture_idx texture_idx = {texture, sub_resource_idx};
1978
1981 }
1982
1983 return WINED3D_OK;
1984}
COMPILER_DEPENDENT_INT64 INT64
Definition: actypes.h:132
void wined3d_resource_free_sysmem(struct wined3d_resource *resource)
Definition: resource.c:345
BOOL wined3d_resource_prepare_sysmem(struct wined3d_resource *resource)
Definition: resource.c:337
void CDECL wined3d_texture_get_pitch(const struct wined3d_texture *texture, unsigned int level, unsigned int *row_pitch, unsigned int *slice_pitch)
Definition: texture.c:1697
static void create_dib(STGMEDIUM *med)
Definition: ole2.c:210
Definition: mem.c:349
UINT64 adapter_adjust_memory(struct wined3d_adapter *adapter, INT64 amount)
Definition: directx.c:158
#define WINED3DUSAGE_VIDMEM_ACCOUNTING
Definition: wined3d.h:939
#define WINED3D_LOCATION_SYSMEM
#define WINED3D_LOCATION_DISCARDED

Referenced by d3d9_device_create_surface(), d3d9_device_CreateTexture(), ddraw_surface7_SetSurfaceDesc(), ddraw_surface_reserve_memory(), and ddraw_texture_init().

◆ wined3d_texture_update_overlay()

HRESULT __cdecl wined3d_texture_update_overlay ( struct wined3d_texture *  texture,
unsigned int  sub_resource_idx,
const RECT *  src_rect,
struct wined3d_texture *  dst_texture,
unsigned int  dst_sub_resource_idx,
const RECT *  dst_rect,
uint32_t  flags 
)

Definition at line 3963 of file texture.c.

3966{
3967 struct wined3d_overlay_info *overlay;
3968 unsigned int level, dst_level;
3969
3970 TRACE("texture %p, sub_resource_idx %u, src_rect %s, dst_texture %p, "
3971 "dst_sub_resource_idx %u, dst_rect %s, flags %#x.\n",
3972 texture, sub_resource_idx, wine_dbgstr_rect(src_rect), dst_texture,
3973 dst_sub_resource_idx, wine_dbgstr_rect(dst_rect), flags);
3974
3975 if (!(texture->resource.usage & WINED3DUSAGE_OVERLAY) || texture->resource.type != WINED3D_RTYPE_TEXTURE_2D
3978
3979 if (!dst_texture || dst_texture->resource.type != WINED3D_RTYPE_TEXTURE_2D
3980 || !wined3d_texture_validate_sub_resource_idx(dst_texture, dst_sub_resource_idx))
3982
3983 overlay = &texture->overlay_info[sub_resource_idx];
3984
3985 level = sub_resource_idx % texture->level_count;
3986 if (src_rect)
3987 overlay->src_rect = *src_rect;
3988 else
3989 SetRect(&overlay->src_rect, 0, 0,
3992
3993 dst_level = dst_sub_resource_idx % dst_texture->level_count;
3994 if (dst_rect)
3995 overlay->dst_rect = *dst_rect;
3996 else
3997 SetRect(&overlay->dst_rect, 0, 0,
3998 wined3d_texture_get_level_width(dst_texture, dst_level),
3999 wined3d_texture_get_level_height(dst_texture, dst_level));
4000
4001 if (overlay->dst_texture && (overlay->dst_texture != dst_texture
4002 || overlay->dst_sub_resource_idx != dst_sub_resource_idx || flags & WINEDDOVER_HIDE))
4003 {
4004 overlay->dst_texture = NULL;
4005 list_remove(&overlay->entry);
4006 }
4007
4008 if (flags & WINEDDOVER_SHOW)
4009 {
4010 if (overlay->dst_texture != dst_texture || overlay->dst_sub_resource_idx != dst_sub_resource_idx)
4011 {
4012 overlay->dst_texture = dst_texture;
4013 overlay->dst_sub_resource_idx = dst_sub_resource_idx;
4014 list_add_tail(&texture->overlay_info[dst_sub_resource_idx].overlays, &overlay->entry);
4015 }
4016 }
4017 else if (flags & WINEDDOVER_HIDE)
4018 {
4019 /* Tests show that the rectangles are erased on hide. */
4020 SetRectEmpty(&overlay->src_rect);
4021 SetRectEmpty(&overlay->dst_rect);
4022 overlay->dst_texture = NULL;
4023 }
4024
4025 return WINED3D_OK;
4026}
BOOL WINAPI SetRectEmpty(_Out_ LPRECT)
#define WINEDDOVER_HIDE
Definition: wined3d.h:1404
#define WINEDDOVER_SHOW
Definition: wined3d.h:1409

Referenced by ddraw_surface7_UpdateOverlay().

◆ wined3d_unordered_access_view_create()

HRESULT __cdecl wined3d_unordered_access_view_create ( const struct wined3d_view_desc *  desc,
struct wined3d_resource *  resource,
void *  parent,
const struct wined3d_parent_ops *  parent_ops,
struct wined3d_unordered_access_view **  view 
)

Definition at line 2551 of file view.c.

2554{
2555 const struct wined3d_adapter_ops *adapter_ops;
2556
2557 TRACE("desc %s, resource %p, parent %p, parent_ops %p, view %p.\n",
2559
2560 adapter_ops = resource->device->adapter->adapter_ops;
2561 return adapter_ops->adapter_create_unordered_access_view(desc, resource, parent, parent_ops, view);
2562}
HRESULT(* adapter_create_unordered_access_view)(const struct wined3d_view_desc *desc, struct wined3d_resource *resource, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_unordered_access_view **view)

Referenced by d3d11_unordered_access_view_init().

◆ wined3d_unordered_access_view_decref()

ULONG __cdecl wined3d_unordered_access_view_decref ( struct wined3d_unordered_access_view *  view)

Definition at line 1536 of file view.c.

1537{
1538 unsigned int refcount = InterlockedDecrement(&view->refcount);
1539
1540 TRACE("%p decreasing refcount to %u.\n", view, refcount);
1541
1542 if (!refcount)
1543 {
1544 struct wined3d_resource *resource = view->resource;
1545
1546 /* Release the resource after destroying the view.
1547 * See wined3d_shader_resource_view_decref(). */
1549 resource->device->adapter->adapter_ops->adapter_destroy_unordered_access_view(view);
1552 }
1553
1554 return refcount;
1555}

Referenced by d3d11_unordered_access_view_Release(), state_unbind_resources(), wined3d_cs_packet_decref_objects(), and wined3d_device_context_set_unordered_access_views().

◆ wined3d_unordered_access_view_get_parent()

void *__cdecl wined3d_unordered_access_view_get_parent ( const struct wined3d_unordered_access_view *  view)

Definition at line 1557 of file view.c.

1558{
1559 TRACE("view %p.\n", view);
1560
1561 return view->parent;
1562}

Referenced by d3d11_device_context_CSGetUnorderedAccessViews(), and d3d11_device_context_OMGetRenderTargetsAndUnorderedAccessViews().

◆ wined3d_unordered_access_view_incref()

ULONG __cdecl wined3d_unordered_access_view_incref ( struct wined3d_unordered_access_view *  view)

Definition at line 1522 of file view.c.

1523{
1524 unsigned int refcount = InterlockedIncrement(&view->refcount);
1525
1526 TRACE("%p increasing refcount to %u.\n", view, refcount);
1527
1528 return refcount;
1529}

Referenced by d3d11_unordered_access_view_AddRef(), wined3d_cs_packet_incref_objects(), and wined3d_device_context_set_unordered_access_views().

◆ wined3d_unregister_windows()

void __cdecl wined3d_unregister_windows ( struct wined3d *  wined3d)

Definition at line 817 of file wined3d_main.c.

818{
819 struct wined3d_wndproc *entry, *last;
820 unsigned int i = 0;
821
822 TRACE("wined3d %p.\n", wined3d);
823
825
826 while (i < wndproc_table.count)
827 {
828 entry = &wndproc_table.entries[i];
829
830 if (entry->wined3d != wined3d)
831 {
832 ++i;
833 continue;
834 }
835
836 if (entry->proc && !restore_wndproc(entry))
837 {
838 entry->device = NULL;
839 WARN("Not unregistering window %p, current window proc doesn't match wined3d window proc.\n",
840 entry->window);
841 ++i;
842 continue;
843 }
844
845 last = &wndproc_table.entries[--wndproc_table.count];
846 if (entry != last)
847 *entry = *last;
848 else
849 ++i;
850 }
851
853}
static const LARGE_INTEGER *static const HANDLE const LARGE_INTEGER *static PSLIST_ENTRY PSLIST_ENTRY last
Definition: sync.c:64
static BOOL restore_wndproc(struct wined3d_wndproc *entry)
Definition: wined3d_main.c:768

Referenced by dxgi_factory_MakeWindowAssociation().

◆ wined3d_vertex_declaration_create()

HRESULT __cdecl wined3d_vertex_declaration_create ( struct wined3d_device *  device,
const struct wined3d_vertex_element *  elements,
UINT  element_count,
void *  parent,
const struct wined3d_parent_ops *  parent_ops,
struct wined3d_vertex_declaration **  declaration 
)

Definition at line 276 of file vertexdeclaration.c.

279{
281 HRESULT hr;
282
283 TRACE("device %p, elements %p, element_count %u, parent %p, parent_ops %p, declaration %p.\n",
285
286 if (!(object = calloc(1, sizeof(*object))))
287 return E_OUTOFMEMORY;
288
290 if (FAILED(hr))
291 {
292 WARN("Failed to initialize vertex declaration, hr %#lx.\n", hr);
293 free(object);
294 return hr;
295 }
296
297 TRACE("Created vertex declaration %p.\n", object);
299
300 return WINED3D_OK;
301}
static ULONG ** element_count
Definition: exception.c:124
struct wined3d_vertex_declaration_element * elements
const struct wined3d_parent_ops * parent_ops
static HRESULT vertexdeclaration_init(struct wined3d_vertex_declaration *declaration, struct wined3d_device *device, const struct wined3d_vertex_element *elements, UINT element_count, void *parent, const struct wined3d_parent_ops *parent_ops)

Referenced by d3d8_vertex_declaration_init(), d3d_input_layout_init(), vertexdeclaration_init(), and wined3d_vertex_declaration_create_from_fvf().

◆ wined3d_vertex_declaration_create_from_fvf()

HRESULT __cdecl wined3d_vertex_declaration_create_from_fvf ( struct wined3d_device *  device,
uint32_t  fvf,
void *  parent,
const struct wined3d_parent_ops *  parent_ops,
struct wined3d_vertex_declaration **  declaration 
)

Definition at line 445 of file vertexdeclaration.c.

448{
449 struct wined3d_vertex_element *elements;
450 unsigned int size;
451 DWORD hr;
452
453 TRACE("device %p, fvf %#x, parent %p, parent_ops %p, declaration %p.\n",
454 device, fvf, parent, parent_ops, declaration);
455
456 size = convert_fvf_to_declaration(device->adapter, fvf, &elements);
457 if (size == ~0u)
458 return E_OUTOFMEMORY;
459
461 free(elements);
462 return hr;
463}
HRESULT CDECL wined3d_vertex_declaration_create(struct wined3d_device *device, const struct wined3d_vertex_element *elements, UINT element_count, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_vertex_declaration **declaration)
static unsigned int convert_fvf_to_declaration(const struct wined3d_adapter *adapter, uint32_t fvf, struct wined3d_vertex_element **elements)

Referenced by d3d8_vertex_declaration_init_fvf(), and ddraw_find_decl().

◆ wined3d_vertex_declaration_decref()

ULONG __cdecl wined3d_vertex_declaration_decref ( struct wined3d_vertex_declaration *  declaration)

◆ wined3d_vertex_declaration_get_parent()

◆ wined3d_vertex_declaration_incref()

ULONG __cdecl wined3d_vertex_declaration_incref ( struct wined3d_vertex_declaration *  declaration)