Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
76b571cb
Commit
76b571cb
authored
Oct 09, 2006
by
Ivan Gyurdiev
Committed by
Alexandre Julliard
Oct 10, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Move D3DSP source modifier-related items into the WINED3D namespace.
parent
17c9d958
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
118 additions
and
64 deletions
+118
-64
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+17
-17
baseshader.c
dlls/wined3d/baseshader.c
+26
-26
glsl_shader.c
dlls/wined3d/glsl_shader.c
+18
-18
vertexshader.c
dlls/wined3d/vertexshader.c
+3
-3
wined3d_private_types.h
dlls/wined3d/wined3d_private_types.h
+54
-0
No files found.
dlls/wined3d/arb_program_shader.c
View file @
76b571cb
...
...
@@ -231,7 +231,7 @@ static void vshader_program_add_output_param_swizzle(const DWORD param, int is_c
static
void
pshader_get_input_register_swizzle
(
const
DWORD
instr
,
char
*
swzstring
)
{
static
const
char
swizzle_reg_chars
[]
=
"rgba"
;
DWORD
swizzle
=
(
instr
&
D3DSP_SWIZZLE_MASK
)
>>
D3DSP_SWIZZLE_SHIFT
;
DWORD
swizzle
=
(
instr
&
WINED3DSP_SWIZZLE_MASK
)
>>
WINE
D3DSP_SWIZZLE_SHIFT
;
DWORD
swizzle_x
=
swizzle
&
0x03
;
DWORD
swizzle_y
=
(
swizzle
>>
2
)
&
0x03
;
DWORD
swizzle_z
=
(
swizzle
>>
4
)
&
0x03
;
...
...
@@ -241,7 +241,7 @@ static void pshader_get_input_register_swizzle(const DWORD instr, char *swzstrin
* WWZZYYXX
*/
*
swzstring
=
0
;
if
((
D3DSP_NOSWIZZLE
>>
D3DSP_SWIZZLE_SHIFT
)
!=
swizzle
)
{
/* ! D3DVS_NOSWIZZLE == 0xE4 << D3DVS_SWIZZLE_SHIFT */
if
((
WINED3DSP_NOSWIZZLE
>>
WINED3DSP_SWIZZLE_SHIFT
)
!=
swizzle
)
{
if
(
swizzle_x
==
swizzle_y
&&
swizzle_x
==
swizzle_z
&&
swizzle_x
==
swizzle_w
)
{
...
...
@@ -264,7 +264,7 @@ static void vshader_program_add_input_param_swizzle(const DWORD param, int is_co
char
tmpReg
[
255
];
/** operand input */
DWORD
swizzle
=
(
param
&
D3DVS_SWIZZLE_MASK
)
>>
D3DVS_SWIZZLE_SHIFT
;
DWORD
swizzle
=
(
param
&
WINED3DVS_SWIZZLE_MASK
)
>>
WINE
D3DVS_SWIZZLE_SHIFT
;
DWORD
swizzle_x
=
swizzle
&
0x03
;
DWORD
swizzle_y
=
(
swizzle
>>
2
)
&
0x03
;
DWORD
swizzle_z
=
(
swizzle
>>
4
)
&
0x03
;
...
...
@@ -280,7 +280,7 @@ static void vshader_program_add_input_param_swizzle(const DWORD param, int is_co
* swizzle bits fields:
* WWZZYYXX
*/
if
((
D3DVS_NOSWIZZLE
>>
D3DVS_SWIZZLE_SHIFT
)
==
swizzle
)
{
/* D3DVS_NOSWIZZLE == 0xE4 << D3DVS_SWIZZLE_SHIFT */
if
((
WINED3DVS_NOSWIZZLE
>>
WINED3DVS_SWIZZLE_SHIFT
)
==
swizzle
)
{
if
(
is_color
)
{
sprintf
(
tmpReg
,
".%c%c%c%c"
,
swizzle_regs
[
swizzle_x
],
...
...
@@ -368,7 +368,7 @@ static void vshader_program_add_param(SHADER_OPCODE_ARG *arg, const DWORD param,
char
tmpReg
[
255
];
BOOL
is_color
=
FALSE
;
if
((
param
&
D3DSP_SRCMOD_MASK
)
==
D3DSPSM_NEG
)
{
if
((
param
&
WINED3DSP_SRCMOD_MASK
)
==
WINE
D3DSPSM_NEG
)
{
strcat
(
hwLine
,
" -"
);
}
else
{
strcat
(
hwLine
,
" "
);
...
...
@@ -441,41 +441,41 @@ static void pshader_gen_input_modifier_line (
pshader_get_register_name
(
instr
,
regstr
);
pshader_get_input_register_swizzle
(
instr
,
swzstr
);
switch
(
instr
&
D3DSP_SRCMOD_MASK
)
{
case
D3DSPSM_NONE
:
switch
(
instr
&
WINE
D3DSP_SRCMOD_MASK
)
{
case
WINE
D3DSPSM_NONE
:
sprintf
(
outregstr
,
"%s%s"
,
regstr
,
swzstr
);
insert_line
=
0
;
break
;
case
D3DSPSM_NEG
:
case
WINE
D3DSPSM_NEG
:
sprintf
(
outregstr
,
"-%s%s"
,
regstr
,
swzstr
);
insert_line
=
0
;
break
;
case
D3DSPSM_BIAS
:
case
WINE
D3DSPSM_BIAS
:
shader_addline
(
buffer
,
"ADD T%c, %s, -coefdiv.x;
\n
"
,
'A'
+
tmpreg
,
regstr
);
break
;
case
D3DSPSM_BIASNEG
:
case
WINE
D3DSPSM_BIASNEG
:
shader_addline
(
buffer
,
"ADD T%c, -%s, coefdiv.x;
\n
"
,
'A'
+
tmpreg
,
regstr
);
break
;
case
D3DSPSM_SIGN
:
case
WINE
D3DSPSM_SIGN
:
shader_addline
(
buffer
,
"MAD T%c, %s, coefmul.x, -one.x;
\n
"
,
'A'
+
tmpreg
,
regstr
);
break
;
case
D3DSPSM_SIGNNEG
:
case
WINE
D3DSPSM_SIGNNEG
:
shader_addline
(
buffer
,
"MAD T%c, %s, -coefmul.x, one.x;
\n
"
,
'A'
+
tmpreg
,
regstr
);
break
;
case
D3DSPSM_COMP
:
case
WINE
D3DSPSM_COMP
:
shader_addline
(
buffer
,
"SUB T%c, one.x, %s;
\n
"
,
'A'
+
tmpreg
,
regstr
);
break
;
case
D3DSPSM_X2
:
case
WINE
D3DSPSM_X2
:
shader_addline
(
buffer
,
"ADD T%c, %s, %s;
\n
"
,
'A'
+
tmpreg
,
regstr
,
regstr
);
break
;
case
D3DSPSM_X2NEG
:
case
WINE
D3DSPSM_X2NEG
:
shader_addline
(
buffer
,
"ADD T%c, -%s, -%s;
\n
"
,
'A'
+
tmpreg
,
regstr
,
regstr
);
break
;
case
D3DSPSM_DZ
:
case
WINE
D3DSPSM_DZ
:
shader_addline
(
buffer
,
"RCP T%c, %s.z;
\n
"
,
'A'
+
tmpreg
,
regstr
);
shader_addline
(
buffer
,
"MUL T%c, %s, T%c;
\n
"
,
'A'
+
tmpreg
,
regstr
,
'A'
+
tmpreg
);
break
;
case
D3DSPSM_DW
:
case
WINE
D3DSPSM_DW
:
shader_addline
(
buffer
,
"RCP T%c, %s.w;
\n
"
,
'A'
+
tmpreg
,
regstr
);
shader_addline
(
buffer
,
"MUL T%c, %s, T%c;
\n
"
,
'A'
+
tmpreg
,
regstr
,
'A'
+
tmpreg
);
break
;
...
...
dlls/wined3d/baseshader.c
View file @
76b571cb
...
...
@@ -507,7 +507,7 @@ void shader_dump_param(
DWORD
reg
=
param
&
WINED3DSP_REGNUM_MASK
;
DWORD
regtype
=
shader_get_regtype
(
param
);
DWORD
modifier
=
param
&
D3DSP_SRCMOD_MASK
;
DWORD
modifier
=
param
&
WINE
D3DSP_SRCMOD_MASK
;
/* There are some minor differences between pixel and vertex shaders */
char
pshader
=
shader_is_pshader_version
(
This
->
baseShader
.
hex_version
);
...
...
@@ -521,18 +521,18 @@ void shader_dump_param(
swizzle_reg_chars
[
3
]
=
pshader
?
'a'
:
'w'
;
if
(
input
)
{
if
(
(
modifier
==
D3DSPSM_NEG
)
||
(
modifier
==
D3DSPSM_BIASNEG
)
||
(
modifier
==
D3DSPSM_SIGNNEG
)
||
(
modifier
==
D3DSPSM_X2NEG
)
||
(
modifier
==
D3DSPSM_ABSNEG
)
)
if
(
(
modifier
==
WINE
D3DSPSM_NEG
)
||
(
modifier
==
WINE
D3DSPSM_BIASNEG
)
||
(
modifier
==
WINE
D3DSPSM_SIGNNEG
)
||
(
modifier
==
WINE
D3DSPSM_X2NEG
)
||
(
modifier
==
WINE
D3DSPSM_ABSNEG
)
)
TRACE
(
"-"
);
else
if
(
modifier
==
D3DSPSM_COMP
)
else
if
(
modifier
==
WINE
D3DSPSM_COMP
)
TRACE
(
"1-"
);
else
if
(
modifier
==
D3DSPSM_NOT
)
else
if
(
modifier
==
WINE
D3DSPSM_NOT
)
TRACE
(
"!"
);
if
(
modifier
==
D3DSPSM_ABS
||
modifier
==
D3DSPSM_ABSNEG
)
if
(
modifier
==
WINED3DSPSM_ABS
||
modifier
==
WINE
D3DSPSM_ABSNEG
)
TRACE
(
"abs("
);
}
...
...
@@ -616,7 +616,7 @@ void shader_dump_param(
}
else
{
/** operand input */
DWORD
swizzle
=
(
param
&
D3DSP_SWIZZLE_MASK
)
>>
D3DSP_SWIZZLE_SHIFT
;
DWORD
swizzle
=
(
param
&
WINED3DSP_SWIZZLE_MASK
)
>>
WINE
D3DSP_SWIZZLE_SHIFT
;
DWORD
swizzle_r
=
swizzle
&
0x03
;
DWORD
swizzle_g
=
(
swizzle
>>
2
)
&
0x03
;
DWORD
swizzle_b
=
(
swizzle
>>
4
)
&
0x03
;
...
...
@@ -624,22 +624,22 @@ void shader_dump_param(
if
(
0
!=
modifier
)
{
switch
(
modifier
)
{
case
D3DSPSM_NONE
:
break
;
case
D3DSPSM_NEG
:
break
;
case
D3DSPSM_NOT
:
break
;
case
D3DSPSM_BIAS
:
TRACE
(
"_bias"
);
break
;
case
D3DSPSM_BIASNEG
:
TRACE
(
"_bias"
);
break
;
case
D3DSPSM_SIGN
:
TRACE
(
"_bx2"
);
break
;
case
D3DSPSM_SIGNNEG
:
TRACE
(
"_bx2"
);
break
;
case
D3DSPSM_COMP
:
break
;
case
D3DSPSM_X2
:
TRACE
(
"_x2"
);
break
;
case
D3DSPSM_X2NEG
:
TRACE
(
"_x2"
);
break
;
case
D3DSPSM_DZ
:
TRACE
(
"_dz"
);
break
;
case
D3DSPSM_DW
:
TRACE
(
"_dw"
);
break
;
case
D3DSPSM_ABSNEG
:
TRACE
(
")"
);
break
;
case
D3DSPSM_ABS
:
TRACE
(
")"
);
break
;
case
WINE
D3DSPSM_NONE
:
break
;
case
WINE
D3DSPSM_NEG
:
break
;
case
WINE
D3DSPSM_NOT
:
break
;
case
WINE
D3DSPSM_BIAS
:
TRACE
(
"_bias"
);
break
;
case
WINE
D3DSPSM_BIASNEG
:
TRACE
(
"_bias"
);
break
;
case
WINE
D3DSPSM_SIGN
:
TRACE
(
"_bx2"
);
break
;
case
WINE
D3DSPSM_SIGNNEG
:
TRACE
(
"_bx2"
);
break
;
case
WINE
D3DSPSM_COMP
:
break
;
case
WINE
D3DSPSM_X2
:
TRACE
(
"_x2"
);
break
;
case
WINE
D3DSPSM_X2NEG
:
TRACE
(
"_x2"
);
break
;
case
WINE
D3DSPSM_DZ
:
TRACE
(
"_dz"
);
break
;
case
WINE
D3DSPSM_DW
:
TRACE
(
"_dw"
);
break
;
case
WINE
D3DSPSM_ABSNEG
:
TRACE
(
")"
);
break
;
case
WINE
D3DSPSM_ABS
:
TRACE
(
")"
);
break
;
default:
TRACE
(
"_unknown_modifier(%#x)"
,
modifier
>>
D3DSP_SRCMOD_SHIFT
);
TRACE
(
"_unknown_modifier(%#x)"
,
modifier
>>
WINE
D3DSP_SRCMOD_SHIFT
);
}
}
...
...
@@ -647,7 +647,7 @@ void shader_dump_param(
* swizzle bits fields:
* RRGGBBAA
*/
if
((
D3DVS_NOSWIZZLE
>>
D3DVS_SWIZZLE_SHIFT
)
!=
swizzle
)
{
/* ! D3DVS_NOSWIZZLE == 0xE4 << D3DVS_SWIZZLE_SHIFT */
if
((
WINED3DVS_NOSWIZZLE
>>
WINED3DVS_SWIZZLE_SHIFT
)
!=
swizzle
)
{
if
(
swizzle_r
==
swizzle_g
&&
swizzle_r
==
swizzle_b
&&
swizzle_r
==
swizzle_a
)
{
...
...
dlls/wined3d/glsl_shader.c
View file @
76b571cb
...
...
@@ -537,51 +537,51 @@ static void shader_glsl_gen_modifier (
if
(
instr
==
WINED3DSIO_TEXKILL
)
return
;
switch
(
instr
&
D3DSP_SRCMOD_MASK
)
{
case
D3DSPSM_NONE
:
switch
(
instr
&
WINE
D3DSP_SRCMOD_MASK
)
{
case
WINE
D3DSPSM_NONE
:
sprintf
(
out_str
,
"%s%s"
,
in_reg
,
in_regswizzle
);
break
;
case
D3DSPSM_NEG
:
case
WINE
D3DSPSM_NEG
:
sprintf
(
out_str
,
"-%s%s"
,
in_reg
,
in_regswizzle
);
break
;
case
D3DSPSM_NOT
:
case
WINE
D3DSPSM_NOT
:
sprintf
(
out_str
,
"!%s%s"
,
in_reg
,
in_regswizzle
);
break
;
case
D3DSPSM_BIAS
:
case
WINE
D3DSPSM_BIAS
:
sprintf
(
out_str
,
"(%s%s - vec4(0.5)%s)"
,
in_reg
,
in_regswizzle
,
in_regswizzle
);
break
;
case
D3DSPSM_BIASNEG
:
case
WINE
D3DSPSM_BIASNEG
:
sprintf
(
out_str
,
"-(%s%s - vec4(0.5)%s)"
,
in_reg
,
in_regswizzle
,
in_regswizzle
);
break
;
case
D3DSPSM_SIGN
:
case
WINE
D3DSPSM_SIGN
:
sprintf
(
out_str
,
"(2.0 * (%s%s - 0.5))"
,
in_reg
,
in_regswizzle
);
break
;
case
D3DSPSM_SIGNNEG
:
case
WINE
D3DSPSM_SIGNNEG
:
sprintf
(
out_str
,
"-(2.0 * (%s%s - 0.5))"
,
in_reg
,
in_regswizzle
);
break
;
case
D3DSPSM_COMP
:
case
WINE
D3DSPSM_COMP
:
sprintf
(
out_str
,
"(1.0 - %s%s)"
,
in_reg
,
in_regswizzle
);
break
;
case
D3DSPSM_X2
:
case
WINE
D3DSPSM_X2
:
sprintf
(
out_str
,
"(2.0 * %s%s)"
,
in_reg
,
in_regswizzle
);
break
;
case
D3DSPSM_X2NEG
:
case
WINE
D3DSPSM_X2NEG
:
sprintf
(
out_str
,
"-(2.0 * %s%s)"
,
in_reg
,
in_regswizzle
);
break
;
case
D3DSPSM_DZ
:
/* reg1_db = { reg1.r/b, reg1.g/b, ...} The g & a components are undefined, so we'll leave them alone */
case
WINE
D3DSPSM_DZ
:
/* reg1_db = { reg1.r/b, reg1.g/b, ...} The g & a components are undefined, so we'll leave them alone */
sprintf
(
out_str
,
"vec4(%s.r / %s.b, %s.g / %s.b, %s.b, %s.a)"
,
in_reg
,
in_reg
,
in_reg
,
in_reg
,
in_reg
,
in_reg
);
break
;
case
D3DSPSM_DW
:
case
WINE
D3DSPSM_DW
:
sprintf
(
out_str
,
"vec4(%s.r / %s.a, %s.g / %s.a, %s.b, %s.a)"
,
in_reg
,
in_reg
,
in_reg
,
in_reg
,
in_reg
,
in_reg
);
break
;
case
D3DSPSM_ABS
:
case
WINE
D3DSPSM_ABS
:
sprintf
(
out_str
,
"abs(%s%s)"
,
in_reg
,
in_regswizzle
);
break
;
case
D3DSPSM_ABSNEG
:
case
WINE
D3DSPSM_ABSNEG
:
sprintf
(
out_str
,
"-abs(%s%s)"
,
in_reg
,
in_regswizzle
);
break
;
default:
FIXME
(
"Unhandled modifier %u
\n
"
,
(
instr
&
D3DSP_SRCMOD_MASK
));
FIXME
(
"Unhandled modifier %u
\n
"
,
(
instr
&
WINE
D3DSP_SRCMOD_MASK
));
sprintf
(
out_str
,
"%s%s"
,
in_reg
,
in_regswizzle
);
}
}
...
...
@@ -747,7 +747,7 @@ static void shader_glsl_get_input_register_swizzle(
const
char
*
swizzle_regs
=
NULL
;
/** operand input */
DWORD
swizzle
=
(
param
&
D3DVS_SWIZZLE_MASK
)
>>
D3DVS_SWIZZLE_SHIFT
;
DWORD
swizzle
=
(
param
&
WINED3DVS_SWIZZLE_MASK
)
>>
WINE
D3DVS_SWIZZLE_SHIFT
;
DWORD
swizzle_x
=
swizzle
&
0x03
;
DWORD
swizzle_y
=
(
swizzle
>>
2
)
&
0x03
;
DWORD
swizzle_z
=
(
swizzle
>>
4
)
&
0x03
;
...
...
@@ -763,7 +763,7 @@ static void shader_glsl_get_input_register_swizzle(
* swizzle bits fields:
* WWZZYYXX
*/
if
((
D3DVS_NOSWIZZLE
>>
D3DVS_SWIZZLE_SHIFT
)
==
swizzle
)
{
/* D3DVS_NOSWIZZLE == 0xE4 << D3DVS_SWIZZLE_SHIFT */
if
((
WINED3DVS_NOSWIZZLE
>>
WINED3DVS_SWIZZLE_SHIFT
)
==
swizzle
)
{
if
(
is_color
)
{
sprintf
(
reg_mask
,
".%c%c%c%c"
,
swizzle_regs
[
swizzle_x
],
...
...
dlls/wined3d/vertexshader.c
View file @
76b571cb
...
...
@@ -971,10 +971,10 @@ HRESULT WINAPI IWineD3DVertexShaderImpl_ExecuteSW(IWineD3DVertexShader* iface, W
}
if
(
i
>
0
)
{
/* input reg */
DWORD
swizzle
=
(
pToken
[
i
]
&
D3DVS_SWIZZLE_MASK
)
>>
D3DVS_SWIZZLE_SHIFT
;
UINT
isNegative
=
((
pToken
[
i
]
&
D3DSP_SRCMOD_MASK
)
==
D3DSPSM_NEG
);
DWORD
swizzle
=
(
pToken
[
i
]
&
WINED3DVS_SWIZZLE_MASK
)
>>
WINE
D3DVS_SWIZZLE_SHIFT
;
UINT
isNegative
=
((
pToken
[
i
]
&
WINED3DSP_SRCMOD_MASK
)
==
WINE
D3DSPSM_NEG
);
if
(
!
isNegative
&&
(
D3DVS_NOSWIZZLE
>>
D3DVS_SWIZZLE_SHIFT
)
==
swizzle
)
{
if
(
!
isNegative
&&
(
WINED3DVS_NOSWIZZLE
>>
WINE
D3DVS_SWIZZLE_SHIFT
)
==
swizzle
)
{
/* TRACE("p[%d] not swizzled\n", i); */
p_send
[
i
]
=
p
[
i
];
}
else
{
...
...
dlls/wined3d/wined3d_private_types.h
View file @
76b571cb
...
...
@@ -80,6 +80,60 @@ typedef enum _WINED3DSHADER_PARAM_REGISTER_TYPE {
WINED3DSPR_FORCE_DWORD
=
0x7FFFFFFF
}
WINED3DSHADER_PARAM_REGISTER_TYPE
;
/** Source register modifiers **/
#define WINED3DVS_SWIZZLE_SHIFT 16
#define WINED3DVS_SWIZZLE_MASK (0xFF << WINED3DVS_SWIZZLE_SHIFT)
#define WINED3DSP_SWIZZLE_SHIFT 16
#define WINED3DSP_SWIZZLE_MASK (0xFF << WINED3DSP_SWIZZLE_SHIFT)
#define WINED3DVS_X_X (0 << WINED3DVS_SWIZZLE_SHIFT)
#define WINED3DVS_X_Y (1 << WINED3DVS_SWIZZLE_SHIFT)
#define WINED3DVS_X_Z (2 << WINED3DVS_SWIZZLE_SHIFT)
#define WINED3DVS_X_W (3 << WINED3DVS_SWIZZLE_SHIFT)
#define WINED3DVS_Y_X (0 << (WINED3DVS_SWIZZLE_SHIFT + 2))
#define WINED3DVS_Y_Y (1 << (WINED3DVS_SWIZZLE_SHIFT + 2))
#define WINED3DVS_Y_Z (2 << (WINED3DVS_SWIZZLE_SHIFT + 2))
#define WINED3DVS_Y_W (3 << (WINED3DVS_SWIZZLE_SHIFT + 2))
#define WINED3DVS_Z_X (0 << (WINED3DVS_SWIZZLE_SHIFT + 4))
#define WINED3DVS_Z_Y (1 << (WINED3DVS_SWIZZLE_SHIFT + 4))
#define WINED3DVS_Z_Z (2 << (WINED3DVS_SWIZZLE_SHIFT + 4))
#define WINED3DVS_Z_W (3 << (WINED3DVS_SWIZZLE_SHIFT + 4))
#define WINED3DVS_W_X (0 << (WINED3DVS_SWIZZLE_SHIFT + 6))
#define WINED3DVS_W_Y (1 << (WINED3DVS_SWIZZLE_SHIFT + 6))
#define WINED3DVS_W_Z (2 << (WINED3DVS_SWIZZLE_SHIFT + 6))
#define WINED3DVS_W_W (3 << (WINED3DVS_SWIZZLE_SHIFT + 6))
#define WINED3DVS_NOSWIZZLE (WINED3DVS_X_X | WINED3DVS_Y_Y | WINED3DVS_Z_Z | WINED3DVS_W_W)
#define WINED3DSP_NOSWIZZLE \
((0 << (WINED3DSP_SWIZZLE_SHIFT + 0)) | (1 << (WINED3DSP_SWIZZLE_SHIFT + 2)) | \
(2 << (WINED3DSP_SWIZZLE_SHIFT + 4)) | (3 << (WINED3DSP_SWIZZLE_SHIFT + 6)))
#define WINED3DSP_SRCMOD_SHIFT 24
#define WINED3DSP_SRCMOD_MASK (0xF << WINED3DSP_SRCMOD_SHIFT)
typedef
enum
_WINED3DSHADER_PARAM_SRCMOD_TYPE
{
WINED3DSPSM_NONE
=
0
<<
WINED3DSP_SRCMOD_SHIFT
,
WINED3DSPSM_NEG
=
1
<<
WINED3DSP_SRCMOD_SHIFT
,
WINED3DSPSM_BIAS
=
2
<<
WINED3DSP_SRCMOD_SHIFT
,
WINED3DSPSM_BIASNEG
=
3
<<
WINED3DSP_SRCMOD_SHIFT
,
WINED3DSPSM_SIGN
=
4
<<
WINED3DSP_SRCMOD_SHIFT
,
WINED3DSPSM_SIGNNEG
=
5
<<
WINED3DSP_SRCMOD_SHIFT
,
WINED3DSPSM_COMP
=
6
<<
WINED3DSP_SRCMOD_SHIFT
,
WINED3DSPSM_X2
=
7
<<
WINED3DSP_SRCMOD_SHIFT
,
WINED3DSPSM_X2NEG
=
8
<<
WINED3DSP_SRCMOD_SHIFT
,
WINED3DSPSM_DZ
=
9
<<
WINED3DSP_SRCMOD_SHIFT
,
WINED3DSPSM_DW
=
10
<<
WINED3DSP_SRCMOD_SHIFT
,
WINED3DSPSM_ABS
=
11
<<
WINED3DSP_SRCMOD_SHIFT
,
WINED3DSPSM_ABSNEG
=
12
<<
WINED3DSP_SRCMOD_SHIFT
,
WINED3DSPSM_NOT
=
13
<<
WINED3DSP_SRCMOD_SHIFT
,
WINED3DSPSM_FORCE_DWORD
=
0x7FFFFFFF
}
WINED3DSHADER_PARAM_SRCMOD_TYPE
;
/** opcodes types for PS and VS */
typedef
enum
_WINED3DSHADER_INSTRUCTION_OPCODE_TYPE
{
WINED3DSIO_NOP
=
0
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment