Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
aea0b5d0
Commit
aea0b5d0
authored
Apr 26, 2006
by
Ivan Gyurdiev
Committed by
Alexandre Julliard
May 08, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Separate pshader/vshader tables.
parent
72d6d425
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
164 deletions
+1
-164
pixelshader.c
dlls/wined3d/pixelshader.c
+0
-25
vertexshader.c
dlls/wined3d/vertexshader.c
+1
-139
No files found.
dlls/wined3d/pixelshader.c
View file @
aea0b5d0
...
...
@@ -181,15 +181,6 @@ void pshader_expp(WINED3DSHADERVECTOR* d, WINED3DSHADERVECTOR* s0) {
s0
->
x
,
s0
->
y
,
s0
->
z
,
s0
->
w
,
d
->
x
,
d
->
y
,
d
->
z
,
d
->
w
));
}
void
pshader_lit
(
WINED3DSHADERVECTOR
*
d
,
WINED3DSHADERVECTOR
*
s0
)
{
d
->
x
=
1
.
0
f
;
d
->
y
=
(
0
.
0
f
<
s0
->
x
)
?
s0
->
x
:
0
.
0
f
;
d
->
z
=
(
0
.
0
f
<
s0
->
x
&&
0
.
0
f
<
s0
->
y
)
?
powf
(
s0
->
y
,
s0
->
w
)
:
0
.
0
f
;
d
->
w
=
1
.
0
f
;
PSTRACE
((
"executing lit: s0=(%f, %f, %f, %f) => d=(%f, %f, %f, %f)
\n
"
,
s0
->
x
,
s0
->
y
,
s0
->
z
,
s0
->
w
,
d
->
x
,
d
->
y
,
d
->
z
,
d
->
w
));
}
void
pshader_logp
(
WINED3DSHADERVECTOR
*
d
,
WINED3DSHADERVECTOR
*
s0
)
{
float
tmp_f
=
fabsf
(
s0
->
w
);
d
->
x
=
d
->
y
=
d
->
z
=
d
->
w
=
(
0
.
0
f
!=
tmp_f
)
?
logf
(
tmp_f
)
/
logf
(
2
.
0
f
)
:
-
HUGE_VAL
;
...
...
@@ -539,10 +530,6 @@ void pshader_pow(WINED3DSHADERVECTOR* d, WINED3DSHADERVECTOR* s0, WINED3DSHADERV
FIXME
(
" : Stub
\n
"
);
}
void
pshader_sng
(
WINED3DSHADERVECTOR
*
d
,
WINED3DSHADERVECTOR
*
s0
)
{
FIXME
(
" : Stub
\n
"
);
}
void
pshader_nrm
(
WINED3DSHADERVECTOR
*
d
,
WINED3DSHADERVECTOR
*
s0
)
{
FIXME
(
" : Stub
\n
"
);
}
...
...
@@ -591,10 +578,6 @@ void pshader_breakp(WINED3DSHADERVECTOR* d) {
FIXME
(
" : Stub
\n
"
);
}
void
pshader_mova
(
WINED3DSHADERVECTOR
*
d
)
{
FIXME
(
" : Stub
\n
"
);
}
void
pshader_defb
(
WINED3DSHADERVECTOR
*
d
)
{
FIXME
(
" : Stub
\n
"
);
}
...
...
@@ -648,7 +631,6 @@ CONST SHADER_OPCODE IWineD3DPixelShaderImpl_shader_ins[] = {
{
D3DSIO_ABS
,
"abs"
,
"ABS"
,
2
,
pshader_abs
,
0
,
0
},
{
D3DSIO_EXP
,
"exp"
,
"EX2"
,
2
,
pshader_exp
,
0
,
0
},
{
D3DSIO_LOG
,
"log"
,
"LG2"
,
2
,
pshader_log
,
0
,
0
},
{
D3DSIO_LIT
,
"lit"
,
"LIT"
,
2
,
pshader_lit
,
0
,
0
},
{
D3DSIO_DST
,
"dst"
,
"DST"
,
3
,
pshader_dst
,
0
,
0
},
{
D3DSIO_LRP
,
"lrp"
,
"LRP"
,
4
,
pshader_lrp
,
0
,
0
},
{
D3DSIO_FRC
,
"frc"
,
"FRC"
,
2
,
pshader_frc
,
0
,
0
},
...
...
@@ -664,10 +646,6 @@ CONST SHADER_OPCODE IWineD3DPixelShaderImpl_shader_ins[] = {
{
D3DSIO_DCL
,
"dcl"
,
NULL
,
2
,
pshader_dcl
,
0
,
0
},
{
D3DSIO_POW
,
"pow"
,
"POW"
,
3
,
pshader_pow
,
0
,
0
},
{
D3DSIO_CRS
,
"crs"
,
"XPS"
,
3
,
pshader_crs
,
0
,
0
},
/* TODO: sng can possibly be performed as
RCP tmp, vec
MUL out, tmp, vec*/
{
D3DSIO_SGN
,
"sng"
,
NULL
,
2
,
pshader_sng
,
0
,
0
},
/* TODO: xyz normalise can be performed as VS_ARB using one temporary register,
DP3 tmp , vec, vec;
RSQ tmp, tmp.x;
...
...
@@ -698,7 +676,6 @@ CONST SHADER_OPCODE IWineD3DPixelShaderImpl_shader_ins[] = {
{
D3DSIO_ENDLOOP
,
"endloop"
,
GLNAME_REQUIRE_GLSL
,
0
,
pshader_endloop
,
0
,
0
},
{
D3DSIO_LABEL
,
"label"
,
GLNAME_REQUIRE_GLSL
,
1
,
pshader_label
,
0
,
0
},
{
D3DSIO_MOVA
,
"mova"
,
GLNAME_REQUIRE_GLSL
,
2
,
pshader_mova
,
0
,
0
},
{
D3DSIO_DEFB
,
"defb"
,
GLNAME_REQUIRE_GLSL
,
2
,
pshader_defb
,
0
,
0
},
{
D3DSIO_DEFI
,
"defi"
,
GLNAME_REQUIRE_GLSL
,
2
,
pshader_defi
,
0
,
0
},
...
...
@@ -743,7 +720,6 @@ CONST SHADER_OPCODE IWineD3DPixelShaderImpl_shader_ins[] = {
{
0
,
NULL
,
NULL
,
0
,
NULL
,
0
,
0
}
};
inline
static
const
SHADER_OPCODE
*
pshader_program_get_opcode
(
IWineD3DPixelShaderImpl
*
This
,
const
DWORD
code
)
{
DWORD
i
=
0
;
DWORD
version
=
This
->
baseShader
.
version
;
...
...
@@ -1236,7 +1212,6 @@ inline static VOID IWineD3DPixelShaderImpl_GenerateProgramArbHW(IWineD3DPixelSha
case
D3DSIO_MAX
:
case
D3DSIO_SLT
:
case
D3DSIO_SGE
:
case
D3DSIO_LIT
:
case
D3DSIO_DST
:
case
D3DSIO_FRC
:
case
D3DSIO_EXPP
:
...
...
dlls/wined3d/vertexshader.c
View file @
aea0b5d0
...
...
@@ -362,106 +362,12 @@ void vshader_abs(WINED3DSHADERVECTOR* d, WINED3DSHADERVECTOR* s0) {
}
/* Stubs */
void
vshader_texcoord
(
WINED3DSHADERVECTOR
*
d
)
{
FIXME
(
" : Stub
\n
"
);
}
void
vshader_texkill
(
WINED3DSHADERVECTOR
*
d
)
{
FIXME
(
" : Stub
\n
"
);
}
void
vshader_tex
(
WINED3DSHADERVECTOR
*
d
)
{
FIXME
(
" : Stub
\n
"
);
}
void
vshader_texld
(
WINED3DSHADERVECTOR
*
d
,
WINED3DSHADERVECTOR
*
s0
)
{
FIXME
(
" : Stub
\n
"
);
}
void
vshader_texbem
(
WINED3DSHADERVECTOR
*
d
,
WINED3DSHADERVECTOR
*
s0
)
{
FIXME
(
" : Stub
\n
"
);
}
void
vshader_texbeml
(
WINED3DSHADERVECTOR
*
d
,
WINED3DSHADERVECTOR
*
s0
)
{
FIXME
(
" : Stub
\n
"
);
}
void
vshader_texreg2ar
(
WINED3DSHADERVECTOR
*
d
,
WINED3DSHADERVECTOR
*
s0
)
{
FIXME
(
" : Stub
\n
"
);
}
void
vshader_texreg2gb
(
WINED3DSHADERVECTOR
*
d
,
WINED3DSHADERVECTOR
*
s0
)
{
FIXME
(
" : Stub
\n
"
);
}
void
vshader_texm3x2pad
(
WINED3DSHADERVECTOR
*
d
,
WINED3DSHADERVECTOR
*
s0
)
{
FIXME
(
" : Stub
\n
"
);
}
void
vshader_texm3x2tex
(
WINED3DSHADERVECTOR
*
d
,
WINED3DSHADERVECTOR
*
s0
)
{
FIXME
(
" : Stub
\n
"
);
}
void
vshader_texm3x3pad
(
WINED3DSHADERVECTOR
*
d
,
WINED3DSHADERVECTOR
*
s0
)
{
FIXME
(
" : Stub
\n
"
);
}
void
vshader_texm3x3tex
(
WINED3DSHADERVECTOR
*
d
,
WINED3DSHADERVECTOR
*
s0
)
{
FIXME
(
" : Stub
\n
"
);
}
void
vshader_texm3x3diff
(
WINED3DSHADERVECTOR
*
d
,
WINED3DSHADERVECTOR
*
s0
)
{
FIXME
(
" : Stub
\n
"
);
}
void
vshader_texm3x3spec
(
WINED3DSHADERVECTOR
*
d
,
WINED3DSHADERVECTOR
*
s0
,
WINED3DSHADERVECTOR
*
s1
)
{
FIXME
(
" : Stub
\n
"
);
}
void
vshader_texm3x3vspec
(
WINED3DSHADERVECTOR
*
d
,
WINED3DSHADERVECTOR
*
s0
)
{
FIXME
(
" : Stub
\n
"
);
}
void
vshader_cnd
(
WINED3DSHADERVECTOR
*
d
,
WINED3DSHADERVECTOR
*
s0
,
WINED3DSHADERVECTOR
*
s1
,
WINED3DSHADERVECTOR
*
s2
)
{
FIXME
(
" : Stub
\n
"
);
}
/* Def is C[n] = {n.nf, n.nf, n.nf, n.nf} */
void
vshader_def
(
WINED3DSHADERVECTOR
*
d
,
WINED3DSHADERVECTOR
*
s0
,
WINED3DSHADERVECTOR
*
s1
,
WINED3DSHADERVECTOR
*
s2
,
WINED3DSHADERVECTOR
*
s3
)
{
FIXME
(
" : Stub
\n
"
);
}
void
vshader_texreg2rgb
(
WINED3DSHADERVECTOR
*
d
,
WINED3DSHADERVECTOR
*
s0
)
{
FIXME
(
" : Stub
\n
"
);
}
void
vshader_texdp3tex
(
WINED3DSHADERVECTOR
*
d
,
WINED3DSHADERVECTOR
*
s0
)
{
FIXME
(
" : Stub
\n
"
);
}
void
vshader_texm3x2depth
(
WINED3DSHADERVECTOR
*
d
,
WINED3DSHADERVECTOR
*
s0
)
{
FIXME
(
" : Stub
\n
"
);
}
void
vshader_texdp3
(
WINED3DSHADERVECTOR
*
d
,
WINED3DSHADERVECTOR
*
s0
)
{
FIXME
(
" : Stub
\n
"
);
}
void
vshader_texm3x3
(
WINED3DSHADERVECTOR
*
d
,
WINED3DSHADERVECTOR
*
s0
)
{
FIXME
(
" : Stub
\n
"
);
}
void
vshader_texdepth
(
WINED3DSHADERVECTOR
*
d
)
{
FIXME
(
" : Stub
\n
"
);
}
void
vshader_cmp
(
WINED3DSHADERVECTOR
*
d
,
WINED3DSHADERVECTOR
*
s0
,
WINED3DSHADERVECTOR
*
s1
,
WINED3DSHADERVECTOR
*
s2
)
{
FIXME
(
" : Stub
\n
"
);
}
void
vshader_bem
(
WINED3DSHADERVECTOR
*
d
,
WINED3DSHADERVECTOR
*
s0
,
WINED3DSHADERVECTOR
*
s1
)
{
FIXME
(
" : Stub
\n
"
);
}
void
vshader_call
(
WINED3DSHADERVECTOR
*
d
)
{
FIXME
(
" : Stub
\n
"
);
}
...
...
@@ -554,18 +460,6 @@ void vshader_defi(WINED3DSHADERVECTOR* d) {
FIXME
(
" : Stub
\n
"
);
}
void
vshader_dp2add
(
WINED3DSHADERVECTOR
*
d
)
{
FIXME
(
" : Stub
\n
"
);
}
void
vshader_dsx
(
WINED3DSHADERVECTOR
*
d
)
{
FIXME
(
" : Stub
\n
"
);
}
void
vshader_dsy
(
WINED3DSHADERVECTOR
*
d
)
{
FIXME
(
" : Stub
\n
"
);
}
void
vshader_texldd
(
WINED3DSHADERVECTOR
*
d
)
{
FIXME
(
" : Stub
\n
"
);
}
...
...
@@ -651,47 +545,15 @@ CONST SHADER_OPCODE IWineD3DVertexShaderImpl_shader_ins[] = {
{
D3DSIO_MOVA
,
"mova"
,
GLNAME_REQUIRE_GLSL
,
2
,
vshader_mova
,
0
,
0
},
{
D3DSIO_DEFB
,
"defb"
,
GLNAME_REQUIRE_GLSL
,
2
,
vshader_defb
,
0
,
0
},
{
D3DSIO_DEFI
,
"defi"
,
GLNAME_REQUIRE_GLSL
,
2
,
vshader_defi
,
0
,
0
},
{
D3DSIO_TEXCOORD
,
"texcoord"
,
GLNAME_REQUIRE_GLSL
,
1
,
vshader_texcoord
,
D3DPS_VERSION
(
1
,
0
),
D3DPS_VERSION
(
1
,
3
)},
{
D3DSIO_TEXCOORD
,
"texcrd"
,
GLNAME_REQUIRE_GLSL
,
2
,
vshader_texcoord
,
D3DPS_VERSION
(
1
,
4
),
D3DPS_VERSION
(
1
,
4
)},
{
D3DSIO_TEXKILL
,
"texkill"
,
GLNAME_REQUIRE_GLSL
,
1
,
vshader_texkill
,
D3DPS_VERSION
(
1
,
0
),
D3DPS_VERSION
(
1
,
4
)},
{
D3DSIO_TEX
,
"tex"
,
GLNAME_REQUIRE_GLSL
,
1
,
vshader_tex
,
D3DPS_VERSION
(
1
,
0
),
D3DPS_VERSION
(
1
,
3
)},
{
D3DSIO_TEX
,
"texld"
,
GLNAME_REQUIRE_GLSL
,
2
,
vshader_texld
,
D3DPS_VERSION
(
1
,
4
),
D3DPS_VERSION
(
1
,
4
)},
{
D3DSIO_TEXBEM
,
"texbem"
,
GLNAME_REQUIRE_GLSL
,
2
,
vshader_texbem
,
D3DPS_VERSION
(
1
,
0
),
D3DPS_VERSION
(
1
,
3
)},
{
D3DSIO_TEXBEML
,
"texbeml"
,
GLNAME_REQUIRE_GLSL
,
2
,
vshader_texbeml
,
D3DPS_VERSION
(
1
,
0
),
D3DPS_VERSION
(
1
,
3
)},
{
D3DSIO_TEXREG2AR
,
"texreg2ar"
,
GLNAME_REQUIRE_GLSL
,
2
,
vshader_texreg2ar
,
D3DPS_VERSION
(
1
,
1
),
D3DPS_VERSION
(
1
,
3
)},
{
D3DSIO_TEXREG2GB
,
"texreg2gb"
,
GLNAME_REQUIRE_GLSL
,
2
,
vshader_texreg2gb
,
D3DPS_VERSION
(
1
,
2
),
D3DPS_VERSION
(
1
,
3
)},
{
D3DSIO_TEXM3x2PAD
,
"texm3x2pad"
,
GLNAME_REQUIRE_GLSL
,
2
,
vshader_texm3x2pad
,
D3DPS_VERSION
(
1
,
0
),
D3DPS_VERSION
(
1
,
3
)},
{
D3DSIO_TEXM3x2TEX
,
"texm3x2tex"
,
GLNAME_REQUIRE_GLSL
,
2
,
vshader_texm3x2tex
,
D3DPS_VERSION
(
1
,
0
),
D3DPS_VERSION
(
1
,
3
)},
{
D3DSIO_TEXM3x3DIFF
,
"texm3x3diff"
,
GLNAME_REQUIRE_GLSL
,
2
,
vshader_texm3x3diff
,
D3DPS_VERSION
(
0
,
0
),
D3DPS_VERSION
(
0
,
0
)},
{
D3DSIO_TEXM3x3SPEC
,
"texm3x3spec"
,
GLNAME_REQUIRE_GLSL
,
3
,
vshader_texm3x3spec
,
D3DPS_VERSION
(
1
,
0
),
D3DPS_VERSION
(
1
,
3
)},
{
D3DSIO_TEXM3x3VSPEC
,
"texm3x3vspe"
,
GLNAME_REQUIRE_GLSL
,
2
,
vshader_texm3x3vspec
,
D3DPS_VERSION
(
1
,
0
),
D3DPS_VERSION
(
1
,
3
)},
{
D3DSIO_EXPP
,
"expp"
,
"EXP"
,
2
,
vshader_expp
,
0
,
0
},
{
D3DSIO_LOGP
,
"logp"
,
"LOG"
,
2
,
vshader_logp
,
0
,
0
},
{
D3DSIO_CND
,
"cnd"
,
GLNAME_REQUIRE_GLSL
,
4
,
vshader_cnd
,
D3DPS_VERSION
(
1
,
1
),
D3DPS_VERSION
(
1
,
4
)},
/* def is a special operation */
{
D3DSIO_DEF
,
"def"
,
NULL
,
5
,
vshader_def
,
D3DPS_VERSION
(
1
,
0
),
D3DPS_VERSION
(
3
,
0
)},
{
D3DSIO_TEXREG2RGB
,
"texreg2rgb"
,
GLNAME_REQUIRE_GLSL
,
2
,
vshader_texreg2rgb
,
D3DPS_VERSION
(
1
,
2
),
D3DPS_VERSION
(
1
,
3
)},
{
D3DSIO_TEXDP3TEX
,
"texdp3tex"
,
GLNAME_REQUIRE_GLSL
,
2
,
vshader_texdp3tex
,
D3DPS_VERSION
(
1
,
2
),
D3DPS_VERSION
(
1
,
3
)},
{
D3DSIO_TEXM3x2DEPTH
,
"texm3x2depth"
,
GLNAME_REQUIRE_GLSL
,
2
,
vshader_texm3x2depth
,
D3DPS_VERSION
(
1
,
3
),
D3DPS_VERSION
(
1
,
3
)},
{
D3DSIO_TEXDP3
,
"texdp3"
,
GLNAME_REQUIRE_GLSL
,
2
,
vshader_texdp3
,
D3DPS_VERSION
(
1
,
2
),
D3DPS_VERSION
(
1
,
3
)},
{
D3DSIO_TEXM3x3
,
"texm3x3"
,
GLNAME_REQUIRE_GLSL
,
2
,
vshader_texm3x3
,
D3DPS_VERSION
(
1
,
2
),
D3DPS_VERSION
(
1
,
3
)},
{
D3DSIO_TEXDEPTH
,
"texdepth"
,
GLNAME_REQUIRE_GLSL
,
1
,
vshader_texdepth
,
D3DPS_VERSION
(
1
,
4
),
D3DPS_VERSION
(
1
,
4
)},
{
D3DSIO_CMP
,
"cmp"
,
GLNAME_REQUIRE_GLSL
,
4
,
vshader_cmp
,
D3DPS_VERSION
(
1
,
1
),
D3DPS_VERSION
(
3
,
0
)},
{
D3DSIO_BEM
,
"bem"
,
GLNAME_REQUIRE_GLSL
,
3
,
vshader_bem
,
D3DPS_VERSION
(
1
,
4
),
D3DPS_VERSION
(
1
,
4
)},
/* TODO: dp2add can be made out of multiple instuctions */
{
D3DSIO_DP2ADD
,
"dp2add"
,
GLNAME_REQUIRE_GLSL
,
2
,
vshader_dp2add
,
0
,
0
},
{
D3DSIO_DSX
,
"dsx"
,
GLNAME_REQUIRE_GLSL
,
2
,
vshader_dsx
,
0
,
0
},
{
D3DSIO_DSY
,
"dsy"
,
GLNAME_REQUIRE_GLSL
,
2
,
vshader_dsy
,
0
,
0
},
{
D3DSIO_TEXLDD
,
"texldd"
,
GLNAME_REQUIRE_GLSL
,
2
,
vshader_texldd
,
0
,
0
},
{
D3DSIO_DEF
,
"def"
,
NULL
,
5
,
vshader_def
,
0
,
0
},
{
D3DSIO_SETP
,
"setp"
,
GLNAME_REQUIRE_GLSL
,
2
,
vshader_setp
,
0
,
0
},
{
D3DSIO_TEXLDL
,
"texdl"
,
GLNAME_REQUIRE_GLSL
,
2
,
vshader_texldl
,
0
,
0
},
{
D3DSIO_PHASE
,
"phase"
,
GLNAME_REQUIRE_GLSL
,
0
,
vshader_nop
,
0
,
0
},
{
0
,
NULL
,
NULL
,
0
,
NULL
,
0
,
0
}
};
inline
static
const
SHADER_OPCODE
*
vshader_program_get_opcode
(
IWineD3DVertexShaderImpl
*
This
,
const
DWORD
code
)
{
DWORD
i
=
0
;
const
SHADER_OPCODE
*
shader_ins
=
This
->
baseShader
.
shader_ins
;
...
...
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