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
02a8f744
Commit
02a8f744
authored
Aug 07, 2006
by
H. Verbeet
Committed by
Alexandre Julliard
Aug 07, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Add a couple of traces to the vertexdeclaration creation code.
parent
2886e9b0
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
72 additions
and
0 deletions
+72
-0
utils.c
dlls/wined3d/utils.c
+46
-0
vertexdeclaration.c
dlls/wined3d/vertexdeclaration.c
+14
-0
wined3d_private.h
dlls/wined3d/wined3d_private.h
+2
-0
wined3d_types.h
include/wine/wined3d_types.h
+10
-0
No files found.
dlls/wined3d/utils.c
View file @
02a8f744
...
@@ -269,6 +269,51 @@ const char* debug_d3dusagequery(DWORD usagequery) {
...
@@ -269,6 +269,51 @@ const char* debug_d3dusagequery(DWORD usagequery) {
}
}
}
}
const
char
*
debug_d3ddeclmethod
(
WINED3DDECLMETHOD
method
)
{
switch
(
method
)
{
#define WINED3DDECLMETHOD_TO_STR(u) case u: return #u
WINED3DDECLMETHOD_TO_STR
(
WINED3DDECLMETHOD_DEFAULT
);
WINED3DDECLMETHOD_TO_STR
(
WINED3DDECLMETHOD_PARTIALU
);
WINED3DDECLMETHOD_TO_STR
(
WINED3DDECLMETHOD_PARTIALV
);
WINED3DDECLMETHOD_TO_STR
(
WINED3DDECLMETHOD_CROSSUV
);
WINED3DDECLMETHOD_TO_STR
(
WINED3DDECLMETHOD_UV
);
WINED3DDECLMETHOD_TO_STR
(
WINED3DDECLMETHOD_LOOKUP
);
WINED3DDECLMETHOD_TO_STR
(
WINED3DDECLMETHOD_LOOKUPPRESAMPLED
);
#undef WINED3DDECLMETHOD_TO_STR
default:
FIXME
(
"Unrecognized %u declaration method!
\n
"
,
method
);
return
"unrecognized"
;
}
}
const
char
*
debug_d3ddecltype
(
WINED3DDECLTYPE
type
)
{
switch
(
type
)
{
#define WINED3DDECLTYPE_TO_STR(u) case u: return #u
WINED3DDECLTYPE_TO_STR
(
WINED3DDECLTYPE_FLOAT1
);
WINED3DDECLTYPE_TO_STR
(
WINED3DDECLTYPE_FLOAT2
);
WINED3DDECLTYPE_TO_STR
(
WINED3DDECLTYPE_FLOAT3
);
WINED3DDECLTYPE_TO_STR
(
WINED3DDECLTYPE_FLOAT4
);
WINED3DDECLTYPE_TO_STR
(
WINED3DDECLTYPE_D3DCOLOR
);
WINED3DDECLTYPE_TO_STR
(
WINED3DDECLTYPE_UBYTE4
);
WINED3DDECLTYPE_TO_STR
(
WINED3DDECLTYPE_SHORT2
);
WINED3DDECLTYPE_TO_STR
(
WINED3DDECLTYPE_SHORT4
);
WINED3DDECLTYPE_TO_STR
(
WINED3DDECLTYPE_UBYTE4N
);
WINED3DDECLTYPE_TO_STR
(
WINED3DDECLTYPE_SHORT2N
);
WINED3DDECLTYPE_TO_STR
(
WINED3DDECLTYPE_SHORT4N
);
WINED3DDECLTYPE_TO_STR
(
WINED3DDECLTYPE_USHORT2N
);
WINED3DDECLTYPE_TO_STR
(
WINED3DDECLTYPE_USHORT4N
);
WINED3DDECLTYPE_TO_STR
(
WINED3DDECLTYPE_UDEC3
);
WINED3DDECLTYPE_TO_STR
(
WINED3DDECLTYPE_DEC3N
);
WINED3DDECLTYPE_TO_STR
(
WINED3DDECLTYPE_FLOAT16_2
);
WINED3DDECLTYPE_TO_STR
(
WINED3DDECLTYPE_FLOAT16_4
);
WINED3DDECLTYPE_TO_STR
(
WINED3DDECLTYPE_UNUSED
);
#undef WINED3DDECLTYPE_TO_STR
default:
FIXME
(
"Unrecognized %u declaration type!
\n
"
,
type
);
return
"unrecognized"
;
}
}
const
char
*
debug_d3ddeclusage
(
BYTE
usage
)
{
const
char
*
debug_d3ddeclusage
(
BYTE
usage
)
{
switch
(
usage
)
{
switch
(
usage
)
{
#define WINED3DDECLUSAGE_TO_STR(u) case u: return #u
#define WINED3DDECLUSAGE_TO_STR(u) case u: return #u
...
@@ -600,6 +645,7 @@ const char* debug_d3dpool(WINED3DPOOL Pool) {
...
@@ -600,6 +645,7 @@ const char* debug_d3dpool(WINED3DPOOL Pool) {
return
"unrecognized"
;
return
"unrecognized"
;
}
}
}
}
/*****************************************************************************
/*****************************************************************************
* Useful functions mapping GL <-> D3D values
* Useful functions mapping GL <-> D3D values
*/
*/
...
...
dlls/wined3d/vertexdeclaration.c
View file @
02a8f744
...
@@ -170,6 +170,16 @@ typedef enum _D3DVSDT_TYPE {
...
@@ -170,6 +170,16 @@ typedef enum _D3DVSDT_TYPE {
#define D3DVSD_END() 0xFFFFFFFF
#define D3DVSD_END() 0xFFFFFFFF
#define D3DVSD_NOP() 0x00000000
#define D3DVSD_NOP() 0x00000000
static
void
dump_wined3dvertexelement
(
const
WINED3DVERTEXELEMENT
*
element
)
{
TRACE
(
" Stream: %d
\n
"
,
element
->
Stream
);
TRACE
(
" Offset: %d
\n
"
,
element
->
Offset
);
TRACE
(
" Type: %s (%#x)
\n
"
,
debug_d3ddecltype
(
element
->
Type
),
element
->
Type
);
TRACE
(
" Method: %s (%#x)
\n
"
,
debug_d3ddeclmethod
(
element
->
Method
),
element
->
Method
);
TRACE
(
" Usage: %s (%#x)
\n
"
,
debug_d3ddeclusage
(
element
->
Usage
),
element
->
Usage
);
TRACE
(
"Usage index: %d
\n
"
,
element
->
UsageIndex
);
TRACE
(
" Register: %d
\n
"
,
element
->
Reg
);
}
static
DWORD
IWineD3DVertexDeclarationImpl_ParseToken8
(
const
DWORD
*
pToken
)
{
static
DWORD
IWineD3DVertexDeclarationImpl_ParseToken8
(
const
DWORD
*
pToken
)
{
const
DWORD
token
=
*
pToken
;
const
DWORD
token
=
*
pToken
;
DWORD
tokenlen
=
1
;
DWORD
tokenlen
=
1
;
...
@@ -298,6 +308,8 @@ IWineD3DVertexDeclarationImpl *This = (IWineD3DVertexDeclarationImpl *)iface;
...
@@ -298,6 +308,8 @@ IWineD3DVertexDeclarationImpl *This = (IWineD3DVertexDeclarationImpl *)iface;
convToW
[
nTokens
].
Type
=
type
;
convToW
[
nTokens
].
Type
=
type
;
convToW
[
nTokens
].
Offset
=
offset
;
convToW
[
nTokens
].
Offset
=
offset
;
convToW
[
nTokens
].
Reg
=
reg
;
convToW
[
nTokens
].
Reg
=
reg
;
TRACE
(
"Adding element %ld:
\n
"
,
nTokens
);
dump_wined3dvertexelement
(
&
convToW
[
nTokens
]);
offset
+=
glTypeLookup
[
type
].
size
*
glTypeLookup
[
type
].
typesize
;
offset
+=
glTypeLookup
[
type
].
size
*
glTypeLookup
[
type
].
typesize
;
++
nTokens
;
++
nTokens
;
}
else
if
(
D3DVSD_TOKEN_STREAMDATA
==
tokentype
&&
0x10000000
&
tokentype
)
{
}
else
if
(
D3DVSD_TOKEN_STREAMDATA
==
tokentype
&&
0x10000000
&
tokentype
)
{
...
@@ -386,6 +398,8 @@ static HRESULT IWineD3DVertexDeclarationImpl_ParseDeclaration9(IWineD3DVertexDec
...
@@ -386,6 +398,8 @@ static HRESULT IWineD3DVertexDeclarationImpl_ParseDeclaration9(IWineD3DVertexDec
for
(
i
=
0
;
i
<
This
->
declaration9NumElements
;
++
i
)
{
for
(
i
=
0
;
i
<
This
->
declaration9NumElements
;
++
i
)
{
memcpy
(
This
->
pDeclarationWine
+
i
,
This
->
pDeclaration9
+
i
,
sizeof
(
D3DVERTEXELEMENT9
));
memcpy
(
This
->
pDeclarationWine
+
i
,
This
->
pDeclaration9
+
i
,
sizeof
(
D3DVERTEXELEMENT9
));
This
->
pDeclarationWine
[
i
].
Reg
=
-
1
;
This
->
pDeclarationWine
[
i
].
Reg
=
-
1
;
TRACE
(
"Adding element %d:
\n
"
,
i
);
dump_wined3dvertexelement
(
&
This
->
pDeclarationWine
[
i
]);
}
}
This
->
declarationWNumElements
=
This
->
declaration9NumElements
;
This
->
declarationWNumElements
=
This
->
declaration9NumElements
;
...
...
dlls/wined3d/wined3d_private.h
View file @
02a8f744
...
@@ -1216,6 +1216,8 @@ const char* debug_d3ddevicetype(D3DDEVTYPE devtype);
...
@@ -1216,6 +1216,8 @@ const char* debug_d3ddevicetype(D3DDEVTYPE devtype);
const
char
*
debug_d3dresourcetype
(
WINED3DRESOURCETYPE
res
);
const
char
*
debug_d3dresourcetype
(
WINED3DRESOURCETYPE
res
);
const
char
*
debug_d3dusage
(
DWORD
usage
);
const
char
*
debug_d3dusage
(
DWORD
usage
);
const
char
*
debug_d3dusagequery
(
DWORD
usagequery
);
const
char
*
debug_d3dusagequery
(
DWORD
usagequery
);
const
char
*
debug_d3ddeclmethod
(
WINED3DDECLMETHOD
method
);
const
char
*
debug_d3ddecltype
(
WINED3DDECLTYPE
type
);
const
char
*
debug_d3ddeclusage
(
BYTE
usage
);
const
char
*
debug_d3ddeclusage
(
BYTE
usage
);
const
char
*
debug_d3dprimitivetype
(
D3DPRIMITIVETYPE
PrimitiveType
);
const
char
*
debug_d3dprimitivetype
(
D3DPRIMITIVETYPE
PrimitiveType
);
const
char
*
debug_d3drenderstate
(
DWORD
state
);
const
char
*
debug_d3drenderstate
(
DWORD
state
);
...
...
include/wine/wined3d_types.h
View file @
02a8f744
...
@@ -893,6 +893,16 @@ typedef struct glDescriptor {
...
@@ -893,6 +893,16 @@ typedef struct glDescriptor {
int
/*GLenum*/
glType
;
int
/*GLenum*/
glType
;
}
glDescriptor
;
}
glDescriptor
;
typedef
enum
_WINED3DDECLMETHOD
{
WINED3DDECLMETHOD_DEFAULT
=
0
,
WINED3DDECLMETHOD_PARTIALU
=
1
,
WINED3DDECLMETHOD_PARTIALV
=
2
,
WINED3DDECLMETHOD_CROSSUV
=
3
,
WINED3DDECLMETHOD_UV
=
4
,
WINED3DDECLMETHOD_LOOKUP
=
5
,
WINED3DDECLMETHOD_LOOKUPPRESAMPLED
=
6
}
WINED3DDECLMETHOD
;
typedef
enum
_WINED3DDECLTYPE
{
typedef
enum
_WINED3DDECLTYPE
{
WINED3DDECLTYPE_FLOAT1
=
0
,
WINED3DDECLTYPE_FLOAT1
=
0
,
WINED3DDECLTYPE_FLOAT2
=
1
,
WINED3DDECLTYPE_FLOAT2
=
1
,
...
...
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