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
9bbccb7f
Commit
9bbccb7f
authored
Jan 28, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Jan 29, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Add a debug function for state names.
parent
3df59ccf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
0 deletions
+48
-0
utils.c
dlls/wined3d/utils.c
+45
-0
wined3d_private.h
dlls/wined3d/wined3d_private.h
+3
-0
No files found.
dlls/wined3d/utils.c
View file @
9bbccb7f
...
...
@@ -1786,6 +1786,51 @@ const char* debug_d3dtstype(WINED3DTRANSFORMSTATETYPE tstype) {
}
}
const
char
*
debug_d3dstate
(
DWORD
state
)
{
if
(
STATE_IS_RENDER
(
state
))
return
wine_dbg_sprintf
(
"STATE_RENDER(%s)"
,
debug_d3drenderstate
(
state
-
STATE_RENDER
(
0
)));
if
(
STATE_IS_TEXTURESTAGE
(
state
))
{
DWORD
texture_stage
=
(
state
-
STATE_TEXTURESTAGE
(
0
,
0
))
/
(
WINED3D_HIGHEST_TEXTURE_STATE
+
1
);
DWORD
texture_state
=
state
-
STATE_TEXTURESTAGE
(
texture_stage
,
0
);
return
wine_dbg_sprintf
(
"STATE_TEXTURESTAGE(%#x, %s)"
,
texture_stage
,
debug_d3dtexturestate
(
texture_state
));
}
if
(
STATE_IS_SAMPLER
(
state
))
return
wine_dbg_sprintf
(
"STATE_SAMPLER(%#x)"
,
state
-
STATE_SAMPLER
(
0
));
if
(
STATE_IS_PIXELSHADER
(
state
))
return
"STATE_PIXELSHADER"
;
if
(
STATE_IS_TRANSFORM
(
state
))
return
wine_dbg_sprintf
(
"STATE_TRANSFORM(%s)"
,
debug_d3dtstype
(
state
-
STATE_TRANSFORM
(
0
)));
if
(
STATE_IS_STREAMSRC
(
state
))
return
"STATE_STREAMSRC"
;
if
(
STATE_IS_INDEXBUFFER
(
state
))
return
"STATE_INDEXBUFFER"
;
if
(
STATE_IS_VDECL
(
state
))
return
"STATE_VDECL"
;
if
(
STATE_IS_VSHADER
(
state
))
return
"STATE_VSHADER"
;
if
(
STATE_IS_VIEWPORT
(
state
))
return
"STATE_VIEWPORT"
;
if
(
STATE_IS_VERTEXSHADERCONSTANT
(
state
))
return
"STATE_VERTEXSHADERCONSTANT"
;
if
(
STATE_IS_PIXELSHADERCONSTANT
(
state
))
return
"STATE_PIXELSHADERCONSTANT"
;
if
(
STATE_IS_ACTIVELIGHT
(
state
))
return
wine_dbg_sprintf
(
"STATE_ACTIVELIGHT(%#x)"
,
state
-
STATE_ACTIVELIGHT
(
0
));
if
(
STATE_IS_SCISSORRECT
(
state
))
return
"STATE_SCISSORRECT"
;
if
(
STATE_IS_CLIPPLANE
(
state
))
return
wine_dbg_sprintf
(
"STATE_CLIPPLANE(%#x)"
,
state
-
STATE_CLIPPLANE
(
0
));
if
(
STATE_IS_MATERIAL
(
state
))
return
"STATE_MATERIAL"
;
if
(
STATE_IS_FRONTFACE
(
state
))
return
"STATE_FRONTFACE"
;
return
wine_dbg_sprintf
(
"UNKNOWN_STATE(%#x)"
,
state
);
}
const
char
*
debug_d3dpool
(
WINED3DPOOL
Pool
)
{
switch
(
Pool
)
{
#define POOL_TO_STR(p) case p: return #p
...
...
dlls/wined3d/wined3d_private.h
View file @
9bbccb7f
...
...
@@ -994,8 +994,10 @@ extern glMultiTexCoordFunc multi_texcoord_funcs[WINED3D_FFP_EMIT_COUNT] DECLSPEC
#define STATE_IS_CLIPPLANE(a) ((a) >= STATE_CLIPPLANE(0) && (a) <= STATE_CLIPPLANE(MAX_CLIPPLANES - 1))
#define STATE_MATERIAL (STATE_CLIPPLANE(MAX_CLIPPLANES))
#define STATE_IS_MATERIAL(a) ((a) == STATE_MATERIAL)
#define STATE_FRONTFACE (STATE_MATERIAL + 1)
#define STATE_IS_FRONTFACE(a) ((a) == STATE_FRONTFACE)
#define STATE_HIGHEST (STATE_FRONTFACE)
...
...
@@ -2506,6 +2508,7 @@ const char *debug_d3ddeclusage(BYTE usage) DECLSPEC_HIDDEN;
const
char
*
debug_d3dprimitivetype
(
WINED3DPRIMITIVETYPE
PrimitiveType
)
DECLSPEC_HIDDEN
;
const
char
*
debug_d3drenderstate
(
DWORD
state
)
DECLSPEC_HIDDEN
;
const
char
*
debug_d3dsamplerstate
(
DWORD
state
)
DECLSPEC_HIDDEN
;
const
char
*
debug_d3dstate
(
DWORD
state
)
DECLSPEC_HIDDEN
;
const
char
*
debug_d3dtexturefiltertype
(
WINED3DTEXTUREFILTERTYPE
filter_type
)
DECLSPEC_HIDDEN
;
const
char
*
debug_d3dtexturestate
(
DWORD
state
)
DECLSPEC_HIDDEN
;
const
char
*
debug_d3dtstype
(
WINED3DTRANSFORMSTATETYPE
tstype
)
DECLSPEC_HIDDEN
;
...
...
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