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
63ef9788
Commit
63ef9788
authored
Apr 19, 2006
by
Ivan Gyurdiev
Committed by
Alexandre Julliard
Apr 20, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Trace corrections/improvements.
parent
d2f59fe4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
73 additions
and
22 deletions
+73
-22
pixelshader.c
dlls/wined3d/pixelshader.c
+39
-13
vertexshader.c
dlls/wined3d/vertexshader.c
+34
-9
No files found.
dlls/wined3d/pixelshader.c
View file @
63ef9788
...
...
@@ -1591,8 +1591,8 @@ inline static void pshader_program_dump_ins_modifiers(const DWORD output) {
case
14
:
TRACE
(
"_d4"
);
break
;
case
15
:
TRACE
(
"_d2"
);
break
;
case
1
:
TRACE
(
"_x2"
);
break
;
case
3
:
TRACE
(
"_x4"
);
break
;
case
7
:
TRACE
(
"_x8"
);
break
;
case
2
:
TRACE
(
"_x4"
);
break
;
case
3
:
TRACE
(
"_x8"
);
break
;
default:
TRACE
(
"_unhandled_shift(%ld)"
,
shift
);
break
;
}
...
...
@@ -1628,7 +1628,7 @@ inline static void pshader_program_dump_ps_param(const DWORD param, int input) {
TRACE
(
"1-"
);
}
switch
(
regtype
/* << D3DSP_REGTYPE_SHIFT (I don't know why this was here)*/
)
{
switch
(
regtype
)
{
case
D3DSPR_TEMP
:
TRACE
(
"r%lu"
,
reg
);
break
;
...
...
@@ -1663,7 +1663,11 @@ inline static void pshader_program_dump_ps_param(const DWORD param, int input) {
case
D3DSPR_LOOP
:
TRACE
(
"aL%s%lu"
,
(
param
&
D3DVS_ADDRMODE_RELATIVE
)
?
"a0.x + "
:
""
,
reg
);
break
;
case
D3DSPR_SAMPLER
:
TRACE
(
"s%lu"
,
reg
);
break
;
default:
TRACE
(
"unhandled_rtype(%lx)"
,
regtype
);
break
;
}
...
...
@@ -1725,11 +1729,32 @@ inline static void pshader_program_dump_ps_param(const DWORD param, int input) {
}
}
inline
static
void
pshader_program_dump_decl_usage
(
IWineD3DPixelShaderImpl
*
This
,
DWORD
token
)
{
inline
static
void
pshader_program_dump_decl_usage
(
IWineD3DPixelShaderImpl
*
This
,
DWORD
decl
,
DWORD
param
)
{
DWORD
regtype
=
((
param
&
D3DSP_REGTYPE_MASK
)
>>
D3DSP_REGTYPE_SHIFT
)
|
((
param
&
D3DSP_REGTYPE_MASK2
)
>>
D3DSP_REGTYPE_SHIFT2
);
TRACE
(
"dcl_"
);
switch
(
token
&
0xFFFF
)
{
if
(
regtype
==
D3DSPR_SAMPLER
)
{
DWORD
ttype
=
decl
&
D3DSP_TEXTURETYPE_MASK
;
switch
(
ttype
)
{
case
D3DSTT_2D
:
TRACE
(
"2d "
);
break
;
case
D3DSTT_CUBE
:
TRACE
(
"cube "
);
break
;
case
D3DSTT_VOLUME
:
TRACE
(
"volume "
);
break
;
default:
TRACE
(
"unknown_ttype(%08lx) "
,
ttype
);
}
}
else
{
DWORD
usage
=
decl
&
D3DSP_DCL_USAGE_MASK
;
DWORD
idx
=
(
decl
&
D3DSP_DCL_USAGEINDEX_MASK
)
>>
D3DSP_DCL_USAGEINDEX_SHIFT
;
switch
(
usage
)
{
case
D3DDECLUSAGE_POSITION
:
TRACE
(
"%s%ld "
,
"position"
,
(
token
&
0xF0000
)
>>
16
);
TRACE
(
"%s%ld "
,
"position"
,
idx
);
break
;
case
D3DDECLUSAGE_BLENDINDICES
:
TRACE
(
"%s "
,
"blend"
);
...
...
@@ -1738,20 +1763,20 @@ inline static void pshader_program_dump_decl_usage(IWineD3DPixelShaderImpl *This
TRACE
(
"%s "
,
"weight"
);
break
;
case
D3DDECLUSAGE_NORMAL
:
TRACE
(
"%s%ld "
,
"normal"
,
(
token
&
0xF0000
)
>>
16
);
TRACE
(
"%s%ld "
,
"normal"
,
idx
);
break
;
case
D3DDECLUSAGE_PSIZE
:
TRACE
(
"%s "
,
"psize"
);
break
;
case
D3DDECLUSAGE_COLOR
:
if
(
(
token
&
0xF0000
)
>>
16
==
0
)
{
if
(
idx
==
0
)
{
TRACE
(
"%s "
,
"color"
);
}
else
{
TRACE
(
"%s%ld "
,
"specular"
,
(
(
token
&
0xF0000
)
>>
16
)
-
1
);
TRACE
(
"%s%ld "
,
"specular"
,
(
idx
-
1
)
);
}
break
;
case
D3DDECLUSAGE_TEXCOORD
:
TRACE
(
"%s%ld "
,
"texture"
,
(
token
&
0xF0000
)
>>
16
);
TRACE
(
"%s%ld "
,
"texture"
,
idx
);
break
;
case
D3DDECLUSAGE_TANGENT
:
TRACE
(
"%s "
,
"tangent"
);
...
...
@@ -1763,7 +1788,7 @@ inline static void pshader_program_dump_decl_usage(IWineD3DPixelShaderImpl *This
TRACE
(
"%s "
,
"tessfactor"
);
break
;
case
D3DDECLUSAGE_POSITIONT
:
TRACE
(
"%s%ld "
,
"positionT"
,
(
token
&
0xF0000
)
>>
16
);
TRACE
(
"%s%ld "
,
"positionT"
,
idx
);
break
;
case
D3DDECLUSAGE_FOG
:
TRACE
(
"%s "
,
"fog"
);
...
...
@@ -1775,7 +1800,8 @@ inline static void pshader_program_dump_decl_usage(IWineD3DPixelShaderImpl *This
TRACE
(
"%s "
,
"sample"
);
break
;
default:
FIXME
(
"Unrecognised dcl %08lx"
,
token
&
0xFFFF
);
FIXME
(
"Unrecognised dcl %08lx"
,
usage
);
}
}
}
...
...
@@ -1824,7 +1850,7 @@ HRESULT WINAPI IWineD3DPixelShaderImpl_SetFunction(IWineD3DPixelShader *iface, C
}
else
{
if
(
curOpcode
->
opcode
==
D3DSIO_DCL
)
{
pshader_program_dump_decl_usage
(
This
,
*
pToken
);
pshader_program_dump_decl_usage
(
This
,
*
pToken
,
*
(
pToken
+
1
)
);
++
pToken
;
++
len
;
pshader_program_dump_ps_param
(
*
pToken
,
0
);
...
...
dlls/wined3d/vertexshader.c
View file @
63ef9788
...
...
@@ -830,6 +830,9 @@ inline static void vshader_program_dump_vs_param(const DWORD param, int input) {
case
D3DSPR_LOOP
:
TRACE
(
"aL%s%lu"
,
(
param
&
D3DVS_ADDRMODE_RELATIVE
)
?
"a0.x + "
:
""
,
reg
);
break
;
case
D3DSPR_SAMPLER
:
TRACE
(
"s%lu"
,
reg
);
break
;
default:
FIXME
(
"Unknown %lu reg %lu
\n
"
,
regtype
,
reg
);
break
;
...
...
@@ -870,11 +873,32 @@ inline static void vshader_program_dump_vs_param(const DWORD param, int input) {
}
}
inline
static
void
vshader_program_dump_decl_usage
(
IWineD3DVertexShaderImpl
*
This
,
DWORD
token
)
{
inline
static
void
vshader_program_dump_decl_usage
(
IWineD3DVertexShaderImpl
*
This
,
DWORD
decl
,
DWORD
param
)
{
DWORD
regtype
=
((
param
&
D3DSP_REGTYPE_MASK
)
>>
D3DSP_REGTYPE_SHIFT
)
|
((
param
&
D3DSP_REGTYPE_MASK2
)
>>
D3DSP_REGTYPE_SHIFT2
);
TRACE
(
"dcl_"
);
switch
(
token
&
0xFFFF
)
{
if
(
regtype
==
D3DSPR_SAMPLER
)
{
DWORD
ttype
=
decl
&
D3DSP_TEXTURETYPE_MASK
;
switch
(
ttype
)
{
case
D3DSTT_2D
:
TRACE
(
"2d "
);
break
;
case
D3DSTT_CUBE
:
TRACE
(
"cube "
);
break
;
case
D3DSTT_VOLUME
:
TRACE
(
"volume "
);
break
;
default:
TRACE
(
"unknown_ttype(%08lx) "
,
ttype
);
}
}
else
{
DWORD
usage
=
decl
&
D3DSP_DCL_USAGE_MASK
;
DWORD
idx
=
(
decl
&
D3DSP_DCL_USAGEINDEX_MASK
)
>>
D3DSP_DCL_USAGEINDEX_SHIFT
;
switch
(
usage
)
{
case
D3DDECLUSAGE_POSITION
:
TRACE
(
"%s%ld "
,
"position"
,
(
token
&
0xF0000
)
>>
16
);
TRACE
(
"%s%ld "
,
"position"
,
idx
);
break
;
case
D3DDECLUSAGE_BLENDINDICES
:
TRACE
(
"%s "
,
"blend"
);
...
...
@@ -883,20 +907,20 @@ inline static void vshader_program_dump_decl_usage(IWineD3DVertexShaderImpl *Thi
TRACE
(
"%s "
,
"weight"
);
break
;
case
D3DDECLUSAGE_NORMAL
:
TRACE
(
"%s%ld "
,
"normal"
,
(
token
&
0xF0000
)
>>
16
);
TRACE
(
"%s%ld "
,
"normal"
,
idx
);
break
;
case
D3DDECLUSAGE_PSIZE
:
TRACE
(
"%s "
,
"psize"
);
break
;
case
D3DDECLUSAGE_COLOR
:
if
(
(
token
&
0xF0000
)
>>
16
==
0
)
{
if
(
idx
==
0
)
{
TRACE
(
"%s "
,
"color"
);
}
else
{
TRACE
(
"%s "
,
"specular"
);
}
break
;
case
D3DDECLUSAGE_TEXCOORD
:
TRACE
(
"%s%ld "
,
"texture"
,
(
token
&
0xF0000
)
>>
16
);
TRACE
(
"%s%ld "
,
"texture"
,
idx
);
break
;
case
D3DDECLUSAGE_TANGENT
:
TRACE
(
"%s "
,
"tangent"
);
...
...
@@ -908,7 +932,7 @@ inline static void vshader_program_dump_decl_usage(IWineD3DVertexShaderImpl *Thi
TRACE
(
"%s "
,
"tessfactor"
);
break
;
case
D3DDECLUSAGE_POSITIONT
:
TRACE
(
"%s%ld "
,
"positionT"
,
(
token
&
0xF0000
)
>>
16
);
TRACE
(
"%s%ld "
,
"positionT"
,
idx
);
break
;
case
D3DDECLUSAGE_FOG
:
TRACE
(
"%s "
,
"fog"
);
...
...
@@ -920,7 +944,8 @@ inline static void vshader_program_dump_decl_usage(IWineD3DVertexShaderImpl *Thi
TRACE
(
"%s "
,
"sample"
);
break
;
default:
FIXME
(
"Unrecognised dcl %08lx"
,
token
&
0xFFFF
);
FIXME
(
"Unrecognised dcl %08lx"
,
usage
);
}
}
}
...
...
@@ -2157,7 +2182,7 @@ HRESULT WINAPI IWineD3DVertexShaderImpl_SetFunction(IWineD3DVertexShader *iface,
}
else
{
if
(
curOpcode
->
opcode
==
D3DSIO_DCL
)
{
vshader_program_dump_decl_usage
(
This
,
*
pToken
);
vshader_program_dump_decl_usage
(
This
,
*
pToken
,
*
(
pToken
+
1
)
);
++
pToken
;
++
len
;
vshader_program_dump_vs_param
(
*
pToken
,
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