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
ca289301
Commit
ca289301
authored
Sep 22, 2008
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 23, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Merge pshader_hw_map2gl() and vshader_hw_map2gl().
This isn't the prettiest way to merge those functions, but it's a start.
parent
9d192c62
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
106 additions
and
111 deletions
+106
-111
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+58
-62
pixelshader.c
dlls/wined3d/pixelshader.c
+24
-24
vertexshader.c
dlls/wined3d/vertexshader.c
+23
-23
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-2
No files found.
dlls/wined3d/arb_program_shader.c
View file @
ca289301
...
...
@@ -1083,19 +1083,19 @@ void pshader_hw_dp2add(SHADER_OPCODE_ARG* arg) {
}
/* Map the opcode 1-to-1 to the GL code */
void
pshader_hw_map2gl
(
SHADER_OPCODE_ARG
*
arg
)
{
void
shader_hw_map2gl
(
SHADER_OPCODE_ARG
*
arg
)
{
IWineD3DBaseShaderImpl
*
shader
=
(
IWineD3DBaseShaderImpl
*
)
arg
->
shader
;
CONST
SHADER_OPCODE
*
curOpcode
=
arg
->
opcode
;
SHADER_BUFFER
*
buffer
=
arg
->
buffer
;
DWORD
dst
=
arg
->
dst
;
DWORD
*
src
=
arg
->
src
;
unsigned
int
i
;
char
tmpLine
[
256
];
unsigned
int
i
;
/* Output token related */
char
output_rname
[
256
];
char
output_wmask
[
20
];
if
(
shader_is_pshader_version
(
shader
->
baseShader
.
hex_version
))
{
BOOL
saturate
=
FALSE
;
BOOL
centroid
=
FALSE
;
BOOL
partialprecision
=
FALSE
;
...
...
@@ -1104,7 +1104,8 @@ void pshader_hw_map2gl(SHADER_OPCODE_ARG* arg) {
strcpy
(
tmpLine
,
curOpcode
->
glname
);
/* Process modifiers */
if
(
0
!=
(
dst
&
WINED3DSP_DSTMOD_MASK
))
{
if
(
dst
&
WINED3DSP_DSTMOD_MASK
)
{
DWORD
mask
=
dst
&
WINED3DSP_DSTMOD_MASK
;
saturate
=
mask
&
WINED3DSPDM_SATURATE
;
...
...
@@ -1120,7 +1121,11 @@ void pshader_hw_map2gl(SHADER_OPCODE_ARG* arg) {
shift
=
(
dst
&
WINED3DSP_DSTSHIFT_MASK
)
>>
WINED3DSP_DSTSHIFT_SHIFT
;
/* Generate input and output registers */
if
(
curOpcode
->
num_params
>
0
)
{
if
(
curOpcode
->
num_params
>
0
)
{
/* Output token related */
char
output_rname
[
256
];
char
output_wmask
[
20
];
char
operands
[
4
][
100
];
/* Generate input register names (with modifiers) */
...
...
@@ -1137,7 +1142,8 @@ void pshader_hw_map2gl(SHADER_OPCODE_ARG* arg) {
strcat
(
tmpLine
,
"_SAT"
);
strcat
(
tmpLine
,
" "
);
strcat
(
tmpLine
,
operands
[
0
]);
for
(
i
=
1
;
i
<
curOpcode
->
num_params
;
i
++
)
{
for
(
i
=
1
;
i
<
curOpcode
->
num_params
;
i
++
)
{
strcat
(
tmpLine
,
", "
);
strcat
(
tmpLine
,
operands
[
i
]);
}
...
...
@@ -1148,6 +1154,48 @@ void pshader_hw_map2gl(SHADER_OPCODE_ARG* arg) {
if
(
shift
!=
0
)
pshader_gen_output_modifier_line
(
buffer
,
saturate
,
output_wmask
,
shift
,
output_rname
);
}
}
else
{
if
((
curOpcode
->
opcode
==
WINED3DSIO_MOV
&&
shader_get_regtype
(
dst
)
==
WINED3DSPR_ADDR
)
||
curOpcode
->
opcode
==
WINED3DSIO_MOVA
)
{
memset
(
tmpLine
,
0
,
sizeof
(
tmpLine
));
if
(((
IWineD3DVertexShaderImpl
*
)
shader
)
->
rel_offset
)
{
vshader_program_add_param
(
arg
,
src
[
0
],
TRUE
,
tmpLine
);
shader_addline
(
buffer
,
"ADD TMP.x, %s, helper_const.z;
\n
"
,
tmpLine
);
shader_addline
(
buffer
,
"ARL A0.x, TMP.x;
\n
"
);
}
else
{
/* Apple's ARB_vertex_program implementation does not accept an ARL source argument
* with more than one component. Thus replicate the first source argument over all
* 4 components. For example, .xyzw -> .x (or better: .xxxx), .zwxy -> .z, etc)
*/
DWORD
parm
=
src
[
0
]
&
~
(
WINED3DVS_SWIZZLE_MASK
);
if
((
src
[
0
]
&
WINED3DVS_X_W
)
==
WINED3DVS_X_W
)
{
parm
|=
WINED3DVS_X_W
|
WINED3DVS_Y_W
|
WINED3DVS_Z_W
|
WINED3DVS_W_W
;
}
else
if
((
src
[
0
]
&
WINED3DVS_X_Z
)
==
WINED3DVS_X_Z
)
{
parm
|=
WINED3DVS_X_Z
|
WINED3DVS_Y_Z
|
WINED3DVS_Z_Z
|
WINED3DVS_W_Z
;
}
else
if
((
src
[
0
]
&
WINED3DVS_X_Y
)
==
WINED3DVS_X_Y
)
{
parm
|=
WINED3DVS_X_Y
|
WINED3DVS_Y_Y
|
WINED3DVS_Z_Y
|
WINED3DVS_W_Y
;
}
else
if
((
src
[
0
]
&
WINED3DVS_X_X
)
==
WINED3DVS_X_X
)
{
parm
|=
WINED3DVS_X_X
|
WINED3DVS_Y_X
|
WINED3DVS_Z_X
|
WINED3DVS_W_X
;
}
vshader_program_add_param
(
arg
,
parm
,
TRUE
,
tmpLine
);
shader_addline
(
buffer
,
"ARL A0.x, %s;
\n
"
,
tmpLine
);
}
return
;
}
else
strcpy
(
tmpLine
,
curOpcode
->
glname
);
if
(
curOpcode
->
num_params
>
0
)
{
vshader_program_add_param
(
arg
,
dst
,
FALSE
,
tmpLine
);
for
(
i
=
1
;
i
<
curOpcode
->
num_params
;
++
i
)
{
strcat
(
tmpLine
,
","
);
vshader_program_add_param
(
arg
,
src
[
i
-
1
],
TRUE
,
tmpLine
);
}
}
shader_addline
(
buffer
,
"%s;
\n
"
,
tmpLine
);
}
}
void
pshader_hw_texkill
(
SHADER_OPCODE_ARG
*
arg
)
{
...
...
@@ -1660,7 +1708,7 @@ void shader_hw_mnxn(SHADER_OPCODE_ARG* arg) {
for
(
i
=
0
;
i
<
nComponents
;
i
++
)
{
tmpArg
.
dst
=
((
arg
->
dst
)
&
~
WINED3DSP_WRITEMASK_ALL
)
|
(
WINED3DSP_WRITEMASK_0
<<
i
);
tmpArg
.
src
[
1
]
=
arg
->
src
[
1
]
+
i
;
v
shader_hw_map2gl
(
&
tmpArg
);
shader_hw_map2gl
(
&
tmpArg
);
}
}
...
...
@@ -1733,58 +1781,6 @@ void shader_hw_sincos(SHADER_OPCODE_ARG* arg) {
}
/* TODO: merge with pixel shader */
/* Map the opcode 1-to-1 to the GL code */
void
vshader_hw_map2gl
(
SHADER_OPCODE_ARG
*
arg
)
{
IWineD3DVertexShaderImpl
*
shader
=
(
IWineD3DVertexShaderImpl
*
)
arg
->
shader
;
CONST
SHADER_OPCODE
*
curOpcode
=
arg
->
opcode
;
SHADER_BUFFER
*
buffer
=
arg
->
buffer
;
DWORD
dst
=
arg
->
dst
;
DWORD
*
src
=
arg
->
src
;
DWORD
dst_regtype
=
shader_get_regtype
(
dst
);
char
tmpLine
[
256
];
unsigned
int
i
;
if
((
curOpcode
->
opcode
==
WINED3DSIO_MOV
&&
dst_regtype
==
WINED3DSPR_ADDR
)
||
curOpcode
->
opcode
==
WINED3DSIO_MOVA
)
{
memset
(
tmpLine
,
0
,
sizeof
(
tmpLine
));
if
(
shader
->
rel_offset
)
{
vshader_program_add_param
(
arg
,
src
[
0
],
TRUE
,
tmpLine
);
shader_addline
(
buffer
,
"ADD TMP.x, %s, helper_const.z;
\n
"
,
tmpLine
);
shader_addline
(
buffer
,
"ARL A0.x, TMP.x;
\n
"
);
}
else
{
/* Apple's ARB_vertex_program implementation does not accept an ARL source argument
* with more than one component. Thus replicate the first source argument over all
* 4 components. For example, .xyzw -> .x (or better: .xxxx), .zwxy -> .z, etc)
*/
DWORD
parm
=
src
[
0
]
&
~
(
WINED3DVS_SWIZZLE_MASK
);
if
((
src
[
0
]
&
WINED3DVS_X_W
)
==
WINED3DVS_X_W
)
{
parm
|=
WINED3DVS_X_W
|
WINED3DVS_Y_W
|
WINED3DVS_Z_W
|
WINED3DVS_W_W
;
}
else
if
((
src
[
0
]
&
WINED3DVS_X_Z
)
==
WINED3DVS_X_Z
)
{
parm
|=
WINED3DVS_X_Z
|
WINED3DVS_Y_Z
|
WINED3DVS_Z_Z
|
WINED3DVS_W_Z
;
}
else
if
((
src
[
0
]
&
WINED3DVS_X_Y
)
==
WINED3DVS_X_Y
)
{
parm
|=
WINED3DVS_X_Y
|
WINED3DVS_Y_Y
|
WINED3DVS_Z_Y
|
WINED3DVS_W_Y
;
}
else
if
((
src
[
0
]
&
WINED3DVS_X_X
)
==
WINED3DVS_X_X
)
{
parm
|=
WINED3DVS_X_X
|
WINED3DVS_Y_X
|
WINED3DVS_Z_X
|
WINED3DVS_W_X
;
}
vshader_program_add_param
(
arg
,
parm
,
TRUE
,
tmpLine
);
shader_addline
(
buffer
,
"ARL A0.x, %s;
\n
"
,
tmpLine
);
}
return
;
}
else
strcpy
(
tmpLine
,
curOpcode
->
glname
);
if
(
curOpcode
->
num_params
>
0
)
{
vshader_program_add_param
(
arg
,
dst
,
FALSE
,
tmpLine
);
for
(
i
=
1
;
i
<
curOpcode
->
num_params
;
++
i
)
{
strcat
(
tmpLine
,
","
);
vshader_program_add_param
(
arg
,
src
[
i
-
1
],
TRUE
,
tmpLine
);
}
}
shader_addline
(
buffer
,
"%s;
\n
"
,
tmpLine
);
}
static
GLuint
create_arb_blt_vertex_program
(
WineD3D_GL_Info
*
gl_info
)
{
GLuint
program_id
=
0
;
const
char
*
blt_vprogram
=
...
...
dlls/wined3d/pixelshader.c
View file @
ca289301
...
...
@@ -99,32 +99,32 @@ static HRESULT WINAPI IWineD3DPixelShaderImpl_GetFunction(IWineD3DPixelShader*
CONST
SHADER_OPCODE
IWineD3DPixelShaderImpl_shader_ins
[]
=
{
/* Arithmetic */
{
WINED3DSIO_NOP
,
"nop"
,
"NOP"
,
0
,
0
,
p
shader_hw_map2gl
,
NULL
,
0
,
0
},
{
WINED3DSIO_MOV
,
"mov"
,
"MOV"
,
1
,
2
,
p
shader_hw_map2gl
,
shader_glsl_mov
,
0
,
0
},
{
WINED3DSIO_ADD
,
"add"
,
"ADD"
,
1
,
3
,
p
shader_hw_map2gl
,
shader_glsl_arith
,
0
,
0
},
{
WINED3DSIO_SUB
,
"sub"
,
"SUB"
,
1
,
3
,
p
shader_hw_map2gl
,
shader_glsl_arith
,
0
,
0
},
{
WINED3DSIO_MAD
,
"mad"
,
"MAD"
,
1
,
4
,
p
shader_hw_map2gl
,
shader_glsl_mad
,
0
,
0
},
{
WINED3DSIO_MUL
,
"mul"
,
"MUL"
,
1
,
3
,
p
shader_hw_map2gl
,
shader_glsl_arith
,
0
,
0
},
{
WINED3DSIO_RCP
,
"rcp"
,
"RCP"
,
1
,
2
,
p
shader_hw_map2gl
,
shader_glsl_rcp
,
0
,
0
},
{
WINED3DSIO_RSQ
,
"rsq"
,
"RSQ"
,
1
,
2
,
p
shader_hw_map2gl
,
shader_glsl_rsq
,
0
,
0
},
{
WINED3DSIO_DP3
,
"dp3"
,
"DP3"
,
1
,
3
,
p
shader_hw_map2gl
,
shader_glsl_dot
,
0
,
0
},
{
WINED3DSIO_DP4
,
"dp4"
,
"DP4"
,
1
,
3
,
p
shader_hw_map2gl
,
shader_glsl_dot
,
0
,
0
},
{
WINED3DSIO_MIN
,
"min"
,
"MIN"
,
1
,
3
,
p
shader_hw_map2gl
,
shader_glsl_map2gl
,
0
,
0
},
{
WINED3DSIO_MAX
,
"max"
,
"MAX"
,
1
,
3
,
p
shader_hw_map2gl
,
shader_glsl_map2gl
,
0
,
0
},
{
WINED3DSIO_SLT
,
"slt"
,
"SLT"
,
1
,
3
,
p
shader_hw_map2gl
,
shader_glsl_compare
,
0
,
0
},
{
WINED3DSIO_SGE
,
"sge"
,
"SGE"
,
1
,
3
,
p
shader_hw_map2gl
,
shader_glsl_compare
,
0
,
0
},
{
WINED3DSIO_ABS
,
"abs"
,
"ABS"
,
1
,
2
,
p
shader_hw_map2gl
,
shader_glsl_map2gl
,
0
,
0
},
{
WINED3DSIO_EXP
,
"exp"
,
"EX2"
,
1
,
2
,
p
shader_hw_map2gl
,
shader_glsl_map2gl
,
0
,
0
},
{
WINED3DSIO_LOG
,
"log"
,
"LG2"
,
1
,
2
,
p
shader_hw_map2gl
,
shader_glsl_log
,
0
,
0
},
{
WINED3DSIO_EXPP
,
"expp"
,
"EXP"
,
1
,
2
,
p
shader_hw_map2gl
,
shader_glsl_expp
,
0
,
0
},
{
WINED3DSIO_LOGP
,
"logp"
,
"LOG"
,
1
,
2
,
p
shader_hw_map2gl
,
shader_glsl_map2gl
,
0
,
0
},
{
WINED3DSIO_DST
,
"dst"
,
"DST"
,
1
,
3
,
p
shader_hw_map2gl
,
shader_glsl_dst
,
0
,
0
},
{
WINED3DSIO_LRP
,
"lrp"
,
"LRP"
,
1
,
4
,
p
shader_hw_map2gl
,
shader_glsl_lrp
,
0
,
0
},
{
WINED3DSIO_FRC
,
"frc"
,
"FRC"
,
1
,
2
,
p
shader_hw_map2gl
,
shader_glsl_map2gl
,
0
,
0
},
{
WINED3DSIO_NOP
,
"nop"
,
"NOP"
,
0
,
0
,
shader_hw_map2gl
,
NULL
,
0
,
0
},
{
WINED3DSIO_MOV
,
"mov"
,
"MOV"
,
1
,
2
,
shader_hw_map2gl
,
shader_glsl_mov
,
0
,
0
},
{
WINED3DSIO_ADD
,
"add"
,
"ADD"
,
1
,
3
,
shader_hw_map2gl
,
shader_glsl_arith
,
0
,
0
},
{
WINED3DSIO_SUB
,
"sub"
,
"SUB"
,
1
,
3
,
shader_hw_map2gl
,
shader_glsl_arith
,
0
,
0
},
{
WINED3DSIO_MAD
,
"mad"
,
"MAD"
,
1
,
4
,
shader_hw_map2gl
,
shader_glsl_mad
,
0
,
0
},
{
WINED3DSIO_MUL
,
"mul"
,
"MUL"
,
1
,
3
,
shader_hw_map2gl
,
shader_glsl_arith
,
0
,
0
},
{
WINED3DSIO_RCP
,
"rcp"
,
"RCP"
,
1
,
2
,
shader_hw_map2gl
,
shader_glsl_rcp
,
0
,
0
},
{
WINED3DSIO_RSQ
,
"rsq"
,
"RSQ"
,
1
,
2
,
shader_hw_map2gl
,
shader_glsl_rsq
,
0
,
0
},
{
WINED3DSIO_DP3
,
"dp3"
,
"DP3"
,
1
,
3
,
shader_hw_map2gl
,
shader_glsl_dot
,
0
,
0
},
{
WINED3DSIO_DP4
,
"dp4"
,
"DP4"
,
1
,
3
,
shader_hw_map2gl
,
shader_glsl_dot
,
0
,
0
},
{
WINED3DSIO_MIN
,
"min"
,
"MIN"
,
1
,
3
,
shader_hw_map2gl
,
shader_glsl_map2gl
,
0
,
0
},
{
WINED3DSIO_MAX
,
"max"
,
"MAX"
,
1
,
3
,
shader_hw_map2gl
,
shader_glsl_map2gl
,
0
,
0
},
{
WINED3DSIO_SLT
,
"slt"
,
"SLT"
,
1
,
3
,
shader_hw_map2gl
,
shader_glsl_compare
,
0
,
0
},
{
WINED3DSIO_SGE
,
"sge"
,
"SGE"
,
1
,
3
,
shader_hw_map2gl
,
shader_glsl_compare
,
0
,
0
},
{
WINED3DSIO_ABS
,
"abs"
,
"ABS"
,
1
,
2
,
shader_hw_map2gl
,
shader_glsl_map2gl
,
0
,
0
},
{
WINED3DSIO_EXP
,
"exp"
,
"EX2"
,
1
,
2
,
shader_hw_map2gl
,
shader_glsl_map2gl
,
0
,
0
},
{
WINED3DSIO_LOG
,
"log"
,
"LG2"
,
1
,
2
,
shader_hw_map2gl
,
shader_glsl_log
,
0
,
0
},
{
WINED3DSIO_EXPP
,
"expp"
,
"EXP"
,
1
,
2
,
shader_hw_map2gl
,
shader_glsl_expp
,
0
,
0
},
{
WINED3DSIO_LOGP
,
"logp"
,
"LOG"
,
1
,
2
,
shader_hw_map2gl
,
shader_glsl_map2gl
,
0
,
0
},
{
WINED3DSIO_DST
,
"dst"
,
"DST"
,
1
,
3
,
shader_hw_map2gl
,
shader_glsl_dst
,
0
,
0
},
{
WINED3DSIO_LRP
,
"lrp"
,
"LRP"
,
1
,
4
,
shader_hw_map2gl
,
shader_glsl_lrp
,
0
,
0
},
{
WINED3DSIO_FRC
,
"frc"
,
"FRC"
,
1
,
2
,
shader_hw_map2gl
,
shader_glsl_map2gl
,
0
,
0
},
{
WINED3DSIO_CND
,
"cnd"
,
NULL
,
1
,
4
,
pshader_hw_cnd
,
shader_glsl_cnd
,
WINED3DPS_VERSION
(
1
,
0
),
WINED3DPS_VERSION
(
1
,
4
)},
{
WINED3DSIO_CMP
,
"cmp"
,
NULL
,
1
,
4
,
pshader_hw_cmp
,
shader_glsl_cmp
,
WINED3DPS_VERSION
(
1
,
2
),
WINED3DPS_VERSION
(
3
,
0
)},
{
WINED3DSIO_POW
,
"pow"
,
"POW"
,
1
,
3
,
p
shader_hw_map2gl
,
shader_glsl_pow
,
0
,
0
},
{
WINED3DSIO_CRS
,
"crs"
,
"XPD"
,
1
,
3
,
p
shader_hw_map2gl
,
shader_glsl_cross
,
0
,
0
},
{
WINED3DSIO_POW
,
"pow"
,
"POW"
,
1
,
3
,
shader_hw_map2gl
,
shader_glsl_pow
,
0
,
0
},
{
WINED3DSIO_CRS
,
"crs"
,
"XPD"
,
1
,
3
,
shader_hw_map2gl
,
shader_glsl_cross
,
0
,
0
},
{
WINED3DSIO_NRM
,
"nrm"
,
NULL
,
1
,
2
,
shader_hw_nrm
,
shader_glsl_map2gl
,
0
,
0
},
{
WINED3DSIO_SINCOS
,
"sincos"
,
NULL
,
1
,
4
,
shader_hw_sincos
,
shader_glsl_sincos
,
WINED3DPS_VERSION
(
2
,
0
),
WINED3DPS_VERSION
(
2
,
1
)},
{
WINED3DSIO_SINCOS
,
"sincos"
,
"SCS"
,
1
,
2
,
shader_hw_sincos
,
shader_glsl_sincos
,
WINED3DPS_VERSION
(
3
,
0
),
-
1
},
...
...
dlls/wined3d/vertexshader.c
View file @
ca289301
...
...
@@ -43,32 +43,32 @@ CONST SHADER_OPCODE IWineD3DVertexShaderImpl_shader_ins[] = {
/* This table is not order or position dependent. */
/* Arithmetic */
{
WINED3DSIO_NOP
,
"nop"
,
"NOP"
,
0
,
0
,
vshader_hw_map2gl
,
NULL
,
0
,
0
},
{
WINED3DSIO_MOV
,
"mov"
,
"MOV"
,
1
,
2
,
vshader_hw_map2gl
,
shader_glsl_mov
,
0
,
0
},
{
WINED3DSIO_MOVA
,
"mova"
,
NULL
,
1
,
2
,
vshader_hw_map2gl
,
shader_glsl_mov
,
WINED3DVS_VERSION
(
2
,
0
),
-
1
},
{
WINED3DSIO_ADD
,
"add"
,
"ADD"
,
1
,
3
,
vshader_hw_map2gl
,
shader_glsl_arith
,
0
,
0
},
{
WINED3DSIO_SUB
,
"sub"
,
"SUB"
,
1
,
3
,
vshader_hw_map2gl
,
shader_glsl_arith
,
0
,
0
},
{
WINED3DSIO_MAD
,
"mad"
,
"MAD"
,
1
,
4
,
vshader_hw_map2gl
,
shader_glsl_mad
,
0
,
0
},
{
WINED3DSIO_MUL
,
"mul"
,
"MUL"
,
1
,
3
,
vshader_hw_map2gl
,
shader_glsl_arith
,
0
,
0
},
{
WINED3DSIO_NOP
,
"nop"
,
"NOP"
,
0
,
0
,
shader_hw_map2gl
,
NULL
,
0
,
0
},
{
WINED3DSIO_MOV
,
"mov"
,
"MOV"
,
1
,
2
,
shader_hw_map2gl
,
shader_glsl_mov
,
0
,
0
},
{
WINED3DSIO_MOVA
,
"mova"
,
NULL
,
1
,
2
,
shader_hw_map2gl
,
shader_glsl_mov
,
WINED3DVS_VERSION
(
2
,
0
),
-
1
},
{
WINED3DSIO_ADD
,
"add"
,
"ADD"
,
1
,
3
,
shader_hw_map2gl
,
shader_glsl_arith
,
0
,
0
},
{
WINED3DSIO_SUB
,
"sub"
,
"SUB"
,
1
,
3
,
shader_hw_map2gl
,
shader_glsl_arith
,
0
,
0
},
{
WINED3DSIO_MAD
,
"mad"
,
"MAD"
,
1
,
4
,
shader_hw_map2gl
,
shader_glsl_mad
,
0
,
0
},
{
WINED3DSIO_MUL
,
"mul"
,
"MUL"
,
1
,
3
,
shader_hw_map2gl
,
shader_glsl_arith
,
0
,
0
},
{
WINED3DSIO_RCP
,
"rcp"
,
"RCP"
,
1
,
2
,
vshader_hw_rsq_rcp
,
shader_glsl_rcp
,
0
,
0
},
{
WINED3DSIO_RSQ
,
"rsq"
,
"RSQ"
,
1
,
2
,
vshader_hw_rsq_rcp
,
shader_glsl_rsq
,
0
,
0
},
{
WINED3DSIO_DP3
,
"dp3"
,
"DP3"
,
1
,
3
,
vshader_hw_map2gl
,
shader_glsl_dot
,
0
,
0
},
{
WINED3DSIO_DP4
,
"dp4"
,
"DP4"
,
1
,
3
,
vshader_hw_map2gl
,
shader_glsl_dot
,
0
,
0
},
{
WINED3DSIO_MIN
,
"min"
,
"MIN"
,
1
,
3
,
vshader_hw_map2gl
,
shader_glsl_map2gl
,
0
,
0
},
{
WINED3DSIO_MAX
,
"max"
,
"MAX"
,
1
,
3
,
vshader_hw_map2gl
,
shader_glsl_map2gl
,
0
,
0
},
{
WINED3DSIO_SLT
,
"slt"
,
"SLT"
,
1
,
3
,
vshader_hw_map2gl
,
shader_glsl_compare
,
0
,
0
},
{
WINED3DSIO_SGE
,
"sge"
,
"SGE"
,
1
,
3
,
vshader_hw_map2gl
,
shader_glsl_compare
,
0
,
0
},
{
WINED3DSIO_ABS
,
"abs"
,
"ABS"
,
1
,
2
,
vshader_hw_map2gl
,
shader_glsl_map2gl
,
0
,
0
},
{
WINED3DSIO_EXP
,
"exp"
,
"EX2"
,
1
,
2
,
vshader_hw_map2gl
,
shader_glsl_map2gl
,
0
,
0
},
{
WINED3DSIO_LOG
,
"log"
,
"LG2"
,
1
,
2
,
vshader_hw_map2gl
,
shader_glsl_map2gl
,
0
,
0
},
{
WINED3DSIO_EXPP
,
"expp"
,
"EXP"
,
1
,
2
,
vshader_hw_map2gl
,
shader_glsl_expp
,
0
,
0
},
{
WINED3DSIO_LOGP
,
"logp"
,
"LOG"
,
1
,
2
,
vshader_hw_map2gl
,
shader_glsl_map2gl
,
0
,
0
},
{
WINED3DSIO_LIT
,
"lit"
,
"LIT"
,
1
,
2
,
vshader_hw_map2gl
,
shader_glsl_lit
,
0
,
0
},
{
WINED3DSIO_DST
,
"dst"
,
"DST"
,
1
,
3
,
vshader_hw_map2gl
,
shader_glsl_dst
,
0
,
0
},
{
WINED3DSIO_DP3
,
"dp3"
,
"DP3"
,
1
,
3
,
shader_hw_map2gl
,
shader_glsl_dot
,
0
,
0
},
{
WINED3DSIO_DP4
,
"dp4"
,
"DP4"
,
1
,
3
,
shader_hw_map2gl
,
shader_glsl_dot
,
0
,
0
},
{
WINED3DSIO_MIN
,
"min"
,
"MIN"
,
1
,
3
,
shader_hw_map2gl
,
shader_glsl_map2gl
,
0
,
0
},
{
WINED3DSIO_MAX
,
"max"
,
"MAX"
,
1
,
3
,
shader_hw_map2gl
,
shader_glsl_map2gl
,
0
,
0
},
{
WINED3DSIO_SLT
,
"slt"
,
"SLT"
,
1
,
3
,
shader_hw_map2gl
,
shader_glsl_compare
,
0
,
0
},
{
WINED3DSIO_SGE
,
"sge"
,
"SGE"
,
1
,
3
,
shader_hw_map2gl
,
shader_glsl_compare
,
0
,
0
},
{
WINED3DSIO_ABS
,
"abs"
,
"ABS"
,
1
,
2
,
shader_hw_map2gl
,
shader_glsl_map2gl
,
0
,
0
},
{
WINED3DSIO_EXP
,
"exp"
,
"EX2"
,
1
,
2
,
shader_hw_map2gl
,
shader_glsl_map2gl
,
0
,
0
},
{
WINED3DSIO_LOG
,
"log"
,
"LG2"
,
1
,
2
,
shader_hw_map2gl
,
shader_glsl_map2gl
,
0
,
0
},
{
WINED3DSIO_EXPP
,
"expp"
,
"EXP"
,
1
,
2
,
shader_hw_map2gl
,
shader_glsl_expp
,
0
,
0
},
{
WINED3DSIO_LOGP
,
"logp"
,
"LOG"
,
1
,
2
,
shader_hw_map2gl
,
shader_glsl_map2gl
,
0
,
0
},
{
WINED3DSIO_LIT
,
"lit"
,
"LIT"
,
1
,
2
,
shader_hw_map2gl
,
shader_glsl_lit
,
0
,
0
},
{
WINED3DSIO_DST
,
"dst"
,
"DST"
,
1
,
3
,
shader_hw_map2gl
,
shader_glsl_dst
,
0
,
0
},
{
WINED3DSIO_LRP
,
"lrp"
,
"LRP"
,
1
,
4
,
NULL
,
shader_glsl_lrp
,
0
,
0
},
{
WINED3DSIO_FRC
,
"frc"
,
"FRC"
,
1
,
2
,
vshader_hw_map2gl
,
shader_glsl_map2gl
,
0
,
0
},
{
WINED3DSIO_POW
,
"pow"
,
"POW"
,
1
,
3
,
vshader_hw_map2gl
,
shader_glsl_pow
,
0
,
0
},
{
WINED3DSIO_CRS
,
"crs"
,
"XPD"
,
1
,
3
,
vshader_hw_map2gl
,
shader_glsl_cross
,
0
,
0
},
{
WINED3DSIO_FRC
,
"frc"
,
"FRC"
,
1
,
2
,
shader_hw_map2gl
,
shader_glsl_map2gl
,
0
,
0
},
{
WINED3DSIO_POW
,
"pow"
,
"POW"
,
1
,
3
,
shader_hw_map2gl
,
shader_glsl_pow
,
0
,
0
},
{
WINED3DSIO_CRS
,
"crs"
,
"XPD"
,
1
,
3
,
shader_hw_map2gl
,
shader_glsl_cross
,
0
,
0
},
/* TODO: sng can possibly be performed a s
RCP tmp, vec
MUL out, tmp, vec*/
...
...
dlls/wined3d/wined3d_private.h
View file @
ca289301
...
...
@@ -2030,7 +2030,6 @@ extern void shader_hw_def(SHADER_OPCODE_ARG *arg);
extern
void
pshader_hw_bem
(
SHADER_OPCODE_ARG
*
arg
);
extern
void
pshader_hw_cnd
(
SHADER_OPCODE_ARG
*
arg
);
extern
void
pshader_hw_cmp
(
SHADER_OPCODE_ARG
*
arg
);
extern
void
pshader_hw_map2gl
(
SHADER_OPCODE_ARG
*
arg
);
extern
void
pshader_hw_tex
(
SHADER_OPCODE_ARG
*
arg
);
extern
void
pshader_hw_texcoord
(
SHADER_OPCODE_ARG
*
arg
);
extern
void
pshader_hw_texreg2ar
(
SHADER_OPCODE_ARG
*
arg
);
...
...
@@ -2052,12 +2051,12 @@ extern void pshader_hw_dp2add(SHADER_OPCODE_ARG* arg);
extern
void
pshader_hw_texreg2rgb
(
SHADER_OPCODE_ARG
*
arg
);
/* ARB vertex / pixel shader common prototypes */
extern
void
shader_hw_map2gl
(
SHADER_OPCODE_ARG
*
arg
);
extern
void
shader_hw_nrm
(
SHADER_OPCODE_ARG
*
arg
);
extern
void
shader_hw_sincos
(
SHADER_OPCODE_ARG
*
arg
);
extern
void
shader_hw_mnxn
(
SHADER_OPCODE_ARG
*
arg
);
/* ARB vertex shader prototypes */
extern
void
vshader_hw_map2gl
(
SHADER_OPCODE_ARG
*
arg
);
extern
void
vshader_hw_rsq_rcp
(
SHADER_OPCODE_ARG
*
arg
);
/* GLSL helper functions */
...
...
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