mirror of
https://github.com/reactos/wine.git
synced 2024-11-26 05:00:30 +00:00
wined3d: Move frontend specfic constants to baseshader.c.
This commit is contained in:
parent
d6494ad00c
commit
fba6f871cf
@ -32,6 +32,64 @@
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3d_shader);
|
||||
WINE_DECLARE_DEBUG_CHANNEL(d3d);
|
||||
|
||||
/* DCL usage masks */
|
||||
#define WINED3DSP_DCL_USAGE_SHIFT 0
|
||||
#define WINED3DSP_DCL_USAGE_MASK (0xf << WINED3DSP_DCL_USAGE_SHIFT)
|
||||
#define WINED3DSP_DCL_USAGEINDEX_SHIFT 16
|
||||
#define WINED3DSP_DCL_USAGEINDEX_MASK (0xf << WINED3DSP_DCL_USAGEINDEX_SHIFT)
|
||||
|
||||
/* Opcode-related masks */
|
||||
#define WINED3DSI_OPCODE_MASK 0x0000ffff
|
||||
|
||||
#define WINED3D_OPCODESPECIFICCONTROL_SHIFT 16
|
||||
#define WINED3D_OPCODESPECIFICCONTROL_MASK (0xff << WINED3D_OPCODESPECIFICCONTROL_SHIFT)
|
||||
|
||||
#define WINED3DSI_INSTLENGTH_SHIFT 24
|
||||
#define WINED3DSI_INSTLENGTH_MASK (0xf << WINED3DSI_INSTLENGTH_SHIFT)
|
||||
|
||||
#define WINED3DSI_COISSUE (1 << 30)
|
||||
|
||||
#define WINED3DSI_COMMENTSIZE_SHIFT 16
|
||||
#define WINED3DSI_COMMENTSIZE_MASK (0x7fff << WINED3DSI_COMMENTSIZE_SHIFT)
|
||||
|
||||
#define WINED3DSHADER_INSTRUCTION_PREDICATED (1 << 28)
|
||||
|
||||
/* Register number mask */
|
||||
#define WINED3DSP_REGNUM_MASK 0x000007ff
|
||||
|
||||
/* Register type masks */
|
||||
#define WINED3DSP_REGTYPE_SHIFT 28
|
||||
#define WINED3DSP_REGTYPE_MASK (0x7 << WINED3DSP_REGTYPE_SHIFT)
|
||||
#define WINED3DSP_REGTYPE_SHIFT2 8
|
||||
#define WINED3DSP_REGTYPE_MASK2 (0x18 << WINED3DSP_REGTYPE_SHIFT2)
|
||||
|
||||
/* Relative addressing mask */
|
||||
#define WINED3DSHADER_ADDRESSMODE_SHIFT 13
|
||||
#define WINED3DSHADER_ADDRESSMODE_MASK (1 << WINED3DSHADER_ADDRESSMODE_SHIFT)
|
||||
|
||||
/* Destination modifier mask */
|
||||
#define WINED3DSP_DSTMOD_SHIFT 20
|
||||
#define WINED3DSP_DSTMOD_MASK (0xf << WINED3DSP_DSTMOD_SHIFT)
|
||||
|
||||
/* Destination shift mask */
|
||||
#define WINED3DSP_DSTSHIFT_SHIFT 24
|
||||
#define WINED3DSP_DSTSHIFT_MASK (0xf << WINED3DSP_DSTSHIFT_SHIFT)
|
||||
|
||||
/* Swizzle mask */
|
||||
#define WINED3DSP_SWIZZLE_SHIFT 16
|
||||
#define WINED3DSP_SWIZZLE_MASK (0xff << WINED3DSP_SWIZZLE_SHIFT)
|
||||
|
||||
/* Source modifier mask */
|
||||
#define WINED3DSP_SRCMOD_SHIFT 24
|
||||
#define WINED3DSP_SRCMOD_MASK (0xf << WINED3DSP_SRCMOD_SHIFT)
|
||||
|
||||
typedef enum _WINED3DSHADER_ADDRESSMODE_TYPE
|
||||
{
|
||||
WINED3DSHADER_ADDRMODE_ABSOLUTE = 0 << WINED3DSHADER_ADDRESSMODE_SHIFT,
|
||||
WINED3DSHADER_ADDRMODE_RELATIVE = 1 << WINED3DSHADER_ADDRESSMODE_SHIFT,
|
||||
WINED3DSHADER_ADDRMODE_FORCE_DWORD = 0x7fffffff,
|
||||
} WINED3DSHADER_ADDRESSMODE_TYPE;
|
||||
|
||||
static void shader_dump_param(const DWORD param, const DWORD addr_token, int input, DWORD shader_version);
|
||||
|
||||
static inline BOOL shader_is_version_token(DWORD token) {
|
||||
|
@ -31,12 +31,6 @@
|
||||
#define WINED3DFMT_FLAG_RENDERTARGET 0x10
|
||||
#define WINED3DFMT_FLAG_FOURCC 0x20
|
||||
|
||||
/** DCL usage masks **/
|
||||
#define WINED3DSP_DCL_USAGE_SHIFT 0
|
||||
#define WINED3DSP_DCL_USAGE_MASK 0x0000000f
|
||||
#define WINED3DSP_DCL_USAGEINDEX_SHIFT 16
|
||||
#define WINED3DSP_DCL_USAGEINDEX_MASK 0x000f0000
|
||||
|
||||
/** DCL sampler texture type **/
|
||||
#define WINED3DSP_TEXTURETYPE_SHIFT 27
|
||||
#define WINED3DSP_TEXTURETYPE_MASK 0x78000000
|
||||
@ -51,15 +45,6 @@ typedef enum _WINED3DSAMPLER_TEXTURE_TYPE {
|
||||
WINED3DSTT_FORCE_DWORD = 0x7FFFFFFF
|
||||
} WINED3DSAMPLER_TEXTURE_TYPE;
|
||||
|
||||
/** Register number mask **/
|
||||
#define WINED3DSP_REGNUM_MASK 0x000007FF
|
||||
|
||||
/** Register type masks **/
|
||||
#define WINED3DSP_REGTYPE_SHIFT 28
|
||||
#define WINED3DSP_REGTYPE_SHIFT2 8
|
||||
#define WINED3DSP_REGTYPE_MASK (0x7 << WINED3DSP_REGTYPE_SHIFT)
|
||||
#define WINED3DSP_REGTYPE_MASK2 0x00001800
|
||||
|
||||
/** Register types **/
|
||||
typedef enum _WINED3DSHADER_PARAM_REGISTER_TYPE {
|
||||
WINED3DSPR_TEMP = 0,
|
||||
@ -97,15 +82,8 @@ typedef enum _WINED3DVS_RASTOUT_OFFSETS {
|
||||
WINED3DSRO_FORCE_DWORD = 0x7FFFFFFF
|
||||
} WINED3DVS_RASTOUT_OFFSETS;
|
||||
|
||||
/** Source register modifiers **/
|
||||
#define WINED3DSP_SWIZZLE_SHIFT 16
|
||||
#define WINED3DSP_SWIZZLE_MASK (0xFF << WINED3DSP_SWIZZLE_SHIFT)
|
||||
|
||||
#define WINED3DSP_NOSWIZZLE (0 | (1 << 2) | (2 << 4) | (3 << 6))
|
||||
|
||||
#define WINED3DSP_SRCMOD_SHIFT 24
|
||||
#define WINED3DSP_SRCMOD_MASK (0xF << WINED3DSP_SRCMOD_SHIFT)
|
||||
|
||||
typedef enum _WINED3DSHADER_PARAM_SRCMOD_TYPE {
|
||||
WINED3DSPSM_NONE = 0,
|
||||
WINED3DSPSM_NEG = 1,
|
||||
@ -132,9 +110,6 @@ typedef enum _WINED3DSHADER_PARAM_SRCMOD_TYPE {
|
||||
#define WINED3DSP_WRITEMASK_3 0x00080000 /* .w a */
|
||||
#define WINED3DSP_WRITEMASK_ALL 0x000F0000 /* all */
|
||||
|
||||
#define WINED3DSP_DSTMOD_SHIFT 20
|
||||
#define WINED3DSP_DSTMOD_MASK (0xF << WINED3DSP_DSTMOD_SHIFT)
|
||||
|
||||
typedef enum _WINED3DSHADER_PARAM_DSTMOD_TYPE {
|
||||
WINED3DSPDM_NONE = 0,
|
||||
WINED3DSPDM_SATURATE = 1,
|
||||
@ -144,20 +119,6 @@ typedef enum _WINED3DSHADER_PARAM_DSTMOD_TYPE {
|
||||
WINED3DSPDM_FORCE_DWORD = 0x7FFFFFFF
|
||||
} WINED3DSHADER_PARAM_DSTMOD_TYPE;
|
||||
|
||||
#define WINED3DSP_DSTSHIFT_SHIFT 24
|
||||
#define WINED3DSP_DSTSHIFT_MASK (0xF << WINED3DSP_DSTSHIFT_SHIFT)
|
||||
|
||||
/** Register addressing modes **/
|
||||
#define WINED3DSHADER_ADDRESSMODE_SHIFT 13
|
||||
#define WINED3DSHADER_ADDRESSMODE_MASK (1 << WINED3DSHADER_ADDRESSMODE_SHIFT)
|
||||
|
||||
typedef enum _WINED3DSHADER_ADDRESSMODE_TYPE {
|
||||
WINED3DSHADER_ADDRMODE_ABSOLUTE = 0 << WINED3DSHADER_ADDRESSMODE_SHIFT,
|
||||
WINED3DSHADER_ADDRMODE_RELATIVE = 1 << WINED3DSHADER_ADDRESSMODE_SHIFT,
|
||||
|
||||
WINED3DSHADER_ADDRMODE_FORCE_DWORD = 0x7FFFFFFF
|
||||
} WINED3DSHADER_ADDRESSMODE_TYPE;
|
||||
|
||||
/** Opcode types */
|
||||
typedef enum _WINED3DSHADER_INSTRUCTION_OPCODE_TYPE {
|
||||
WINED3DSIO_NOP = 0,
|
||||
@ -251,24 +212,6 @@ typedef enum _WINED3DSHADER_INSTRUCTION_OPCODE_TYPE {
|
||||
WINED3DSIO_FORCE_DWORD = 0X7FFFFFFF /** for 32-bit alignment */
|
||||
} WINED3DSHADER_INSTRUCTION_OPCODE_TYPE;
|
||||
|
||||
/** opcode-related masks **/
|
||||
|
||||
#define WINED3D_OPCODESPECIFICCONTROL_MASK 0x00ff0000
|
||||
#define WINED3D_OPCODESPECIFICCONTROL_SHIFT 16
|
||||
|
||||
#define WINED3DSI_OPCODE_MASK 0x0000FFFF
|
||||
#define WINED3DSI_INSTLENGTH_MASK 0x0F000000
|
||||
#define WINED3DSI_INSTLENGTH_SHIFT 24
|
||||
|
||||
#define WINED3DSI_COISSUE 0x40000000
|
||||
|
||||
#define WINED3DSI_COMMENTSIZE_SHIFT 16
|
||||
#define WINED3DSI_COMMENTSIZE_MASK (0x7FFF << WINED3DSI_COMMENTSIZE_SHIFT)
|
||||
#define WINED3DSHADER_COMMENT(commentSize) \
|
||||
((((commentSize) << WINED3DSI_COMMENTSIZE_SHIFT) & WINED3DSI_COMMENTSIZE_MASK) | WINED3DSIO_COMMENT)
|
||||
|
||||
#define WINED3DSHADER_INSTRUCTION_PREDICATED (1 << 28)
|
||||
|
||||
/* Undocumented opcode control to identify projective texture lookups in ps 2.0 and later */
|
||||
#define WINED3DSI_TEXLD_PROJECT 0x00010000
|
||||
#define WINED3DSI_TEXLD_BIAS 0x00020000
|
||||
|
Loading…
Reference in New Issue
Block a user