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
e6a4a866
Commit
e6a4a866
authored
Dec 11, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Dec 12, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Get rid of the WINED3DPRIMITIVETYPE typedef.
parent
b55b683b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
59 additions
and
59 deletions
+59
-59
device.c
dlls/d3d10core/device.c
+2
-2
device.c
dlls/wined3d/device.c
+25
-25
utils.c
dlls/wined3d/utils.c
+14
-14
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
wined3d.h
include/wine/wined3d.h
+17
-17
No files found.
dlls/d3d10core/device.c
View file @
e6a4a866
...
...
@@ -270,7 +270,7 @@ static void STDMETHODCALLTYPE d3d10_device_IASetPrimitiveTopology(ID3D10Device *
TRACE
(
"iface %p, topology %s
\n
"
,
iface
,
debug_d3d10_primitive_topology
(
topology
));
wined3d_device_set_primitive_type
(
This
->
wined3d_device
,
(
WINED3DPRIMITIVETYPE
)
topology
);
wined3d_device_set_primitive_type
(
This
->
wined3d_device
,
(
enum
wined3d_primitive_type
)
topology
);
}
static
void
STDMETHODCALLTYPE
d3d10_device_VSSetShaderResources
(
ID3D10Device
*
iface
,
...
...
@@ -490,7 +490,7 @@ static void STDMETHODCALLTYPE d3d10_device_IAGetPrimitiveTopology(ID3D10Device *
TRACE
(
"iface %p, topology %p
\n
"
,
iface
,
topology
);
wined3d_device_get_primitive_type
(
This
->
wined3d_device
,
(
WINED3DPRIMITIVETYPE
*
)
topology
);
wined3d_device_get_primitive_type
(
This
->
wined3d_device
,
(
enum
wined3d_primitive_type
*
)
topology
);
}
static
void
STDMETHODCALLTYPE
d3d10_device_VSGetShaderResources
(
ID3D10Device
*
iface
,
...
...
dlls/wined3d/device.c
View file @
e6a4a866
...
...
@@ -62,38 +62,38 @@ const float identity[] =
/* Note that except for WINED3DPT_POINTLIST and WINED3DPT_LINELIST these
* actually have the same values in GL and D3D. */
static
GLenum
gl_primitive_type_from_d3d
(
WINED3DPRIMITIVETYPE
primitive_type
)
static
GLenum
gl_primitive_type_from_d3d
(
enum
wined3d_primitive_type
primitive_type
)
{
switch
(
primitive_type
)
{
case
WINED3DPT_POINTLIST
:
case
WINED3D
_
PT_POINTLIST
:
return
GL_POINTS
;
case
WINED3DPT_LINELIST
:
case
WINED3D
_
PT_LINELIST
:
return
GL_LINES
;
case
WINED3DPT_LINESTRIP
:
case
WINED3D
_
PT_LINESTRIP
:
return
GL_LINE_STRIP
;
case
WINED3DPT_TRIANGLELIST
:
case
WINED3D
_
PT_TRIANGLELIST
:
return
GL_TRIANGLES
;
case
WINED3DPT_TRIANGLESTRIP
:
case
WINED3D
_
PT_TRIANGLESTRIP
:
return
GL_TRIANGLE_STRIP
;
case
WINED3DPT_TRIANGLEFAN
:
case
WINED3D
_
PT_TRIANGLEFAN
:
return
GL_TRIANGLE_FAN
;
case
WINED3DPT_LINELIST_ADJ
:
case
WINED3D
_
PT_LINELIST_ADJ
:
return
GL_LINES_ADJACENCY_ARB
;
case
WINED3DPT_LINESTRIP_ADJ
:
case
WINED3D
_
PT_LINESTRIP_ADJ
:
return
GL_LINE_STRIP_ADJACENCY_ARB
;
case
WINED3DPT_TRIANGLELIST_ADJ
:
case
WINED3D
_
PT_TRIANGLELIST_ADJ
:
return
GL_TRIANGLES_ADJACENCY_ARB
;
case
WINED3DPT_TRIANGLESTRIP_ADJ
:
case
WINED3D
_
PT_TRIANGLESTRIP_ADJ
:
return
GL_TRIANGLE_STRIP_ADJACENCY_ARB
;
default:
...
...
@@ -102,43 +102,43 @@ static GLenum gl_primitive_type_from_d3d(WINED3DPRIMITIVETYPE primitive_type)
}
}
static
WINED3DPRIMITIVETYPE
d3d_primitive_type_from_gl
(
GLenum
primitive_type
)
static
enum
wined3d_primitive_type
d3d_primitive_type_from_gl
(
GLenum
primitive_type
)
{
switch
(
primitive_type
)
{
case
GL_POINTS
:
return
WINED3DPT_POINTLIST
;
return
WINED3D
_
PT_POINTLIST
;
case
GL_LINES
:
return
WINED3DPT_LINELIST
;
return
WINED3D
_
PT_LINELIST
;
case
GL_LINE_STRIP
:
return
WINED3DPT_LINESTRIP
;
return
WINED3D
_
PT_LINESTRIP
;
case
GL_TRIANGLES
:
return
WINED3DPT_TRIANGLELIST
;
return
WINED3D
_
PT_TRIANGLELIST
;
case
GL_TRIANGLE_STRIP
:
return
WINED3DPT_TRIANGLESTRIP
;
return
WINED3D
_
PT_TRIANGLESTRIP
;
case
GL_TRIANGLE_FAN
:
return
WINED3DPT_TRIANGLEFAN
;
return
WINED3D
_
PT_TRIANGLEFAN
;
case
GL_LINES_ADJACENCY_ARB
:
return
WINED3DPT_LINELIST_ADJ
;
return
WINED3D
_
PT_LINELIST_ADJ
;
case
GL_LINE_STRIP_ADJACENCY_ARB
:
return
WINED3DPT_LINESTRIP_ADJ
;
return
WINED3D
_
PT_LINESTRIP_ADJ
;
case
GL_TRIANGLES_ADJACENCY_ARB
:
return
WINED3DPT_TRIANGLELIST_ADJ
;
return
WINED3D
_
PT_TRIANGLELIST_ADJ
;
case
GL_TRIANGLE_STRIP_ADJACENCY_ARB
:
return
WINED3DPT_TRIANGLESTRIP_ADJ
;
return
WINED3D
_
PT_TRIANGLESTRIP_ADJ
;
default:
FIXME
(
"Unhandled primitive type %s
\n
"
,
debug_d3dprimitivetype
(
primitive_type
));
return
WINED3DPT_UNDEFINED
;
return
WINED3D
_
PT_UNDEFINED
;
}
}
...
...
@@ -4045,7 +4045,7 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou
}
void
CDECL
wined3d_device_set_primitive_type
(
struct
wined3d_device
*
device
,
WINED3DPRIMITIVETYPE
primitive_type
)
enum
wined3d_primitive_type
primitive_type
)
{
TRACE
(
"device %p, primitive_type %s
\n
"
,
device
,
debug_d3dprimitivetype
(
primitive_type
));
...
...
@@ -4054,7 +4054,7 @@ void CDECL wined3d_device_set_primitive_type(struct wined3d_device *device,
}
void
CDECL
wined3d_device_get_primitive_type
(
const
struct
wined3d_device
*
device
,
WINED3DPRIMITIVETYPE
*
primitive_type
)
enum
wined3d_primitive_type
*
primitive_type
)
{
TRACE
(
"device %p, primitive_type %p
\n
"
,
device
,
primitive_type
);
...
...
dlls/wined3d/utils.c
View file @
e6a4a866
...
...
@@ -1993,25 +1993,25 @@ const char *debug_d3dresourcetype(WINED3DRESOURCETYPE res)
}
}
const
char
*
debug_d3dprimitivetype
(
WINED3DPRIMITIVETYPE
PrimitiveT
ype
)
const
char
*
debug_d3dprimitivetype
(
enum
wined3d_primitive_type
primitive_t
ype
)
{
switch
(
PrimitiveT
ype
)
switch
(
primitive_t
ype
)
{
#define PRIM_TO_STR(prim) case prim: return #prim
PRIM_TO_STR
(
WINED3DPT_UNDEFINED
);
PRIM_TO_STR
(
WINED3DPT_POINTLIST
);
PRIM_TO_STR
(
WINED3DPT_LINELIST
);
PRIM_TO_STR
(
WINED3DPT_LINESTRIP
);
PRIM_TO_STR
(
WINED3DPT_TRIANGLELIST
);
PRIM_TO_STR
(
WINED3DPT_TRIANGLESTRIP
);
PRIM_TO_STR
(
WINED3DPT_TRIANGLEFAN
);
PRIM_TO_STR
(
WINED3DPT_LINELIST_ADJ
);
PRIM_TO_STR
(
WINED3DPT_LINESTRIP_ADJ
);
PRIM_TO_STR
(
WINED3DPT_TRIANGLELIST_ADJ
);
PRIM_TO_STR
(
WINED3DPT_TRIANGLESTRIP_ADJ
);
PRIM_TO_STR
(
WINED3D
_
PT_UNDEFINED
);
PRIM_TO_STR
(
WINED3D
_
PT_POINTLIST
);
PRIM_TO_STR
(
WINED3D
_
PT_LINELIST
);
PRIM_TO_STR
(
WINED3D
_
PT_LINESTRIP
);
PRIM_TO_STR
(
WINED3D
_
PT_TRIANGLELIST
);
PRIM_TO_STR
(
WINED3D
_
PT_TRIANGLESTRIP
);
PRIM_TO_STR
(
WINED3D
_
PT_TRIANGLEFAN
);
PRIM_TO_STR
(
WINED3D
_
PT_LINELIST_ADJ
);
PRIM_TO_STR
(
WINED3D
_
PT_LINESTRIP_ADJ
);
PRIM_TO_STR
(
WINED3D
_
PT_TRIANGLELIST_ADJ
);
PRIM_TO_STR
(
WINED3D
_
PT_TRIANGLESTRIP_ADJ
);
#undef PRIM_TO_STR
default:
FIXME
(
"Unrecognized %u
WINED3DPRIMITIVETYPE!
\n
"
,
PrimitiveT
ype
);
FIXME
(
"Unrecognized %u
primitive type!
\n
"
,
primitive_t
ype
);
return
"unrecognized"
;
}
}
...
...
dlls/wined3d/wined3d_private.h
View file @
e6a4a866
...
...
@@ -2484,7 +2484,7 @@ const char *debug_d3dusage(DWORD usage) DECLSPEC_HIDDEN;
const
char
*
debug_d3dusagequery
(
DWORD
usagequery
)
DECLSPEC_HIDDEN
;
const
char
*
debug_d3ddeclmethod
(
WINED3DDECLMETHOD
method
)
DECLSPEC_HIDDEN
;
const
char
*
debug_d3ddeclusage
(
BYTE
usage
)
DECLSPEC_HIDDEN
;
const
char
*
debug_d3dprimitivetype
(
WINED3DPRIMITIVETYPE
PrimitiveT
ype
)
DECLSPEC_HIDDEN
;
const
char
*
debug_d3dprimitivetype
(
enum
wined3d_primitive_type
primitive_t
ype
)
DECLSPEC_HIDDEN
;
const
char
*
debug_d3drenderstate
(
WINED3DRENDERSTATETYPE
state
)
DECLSPEC_HIDDEN
;
const
char
*
debug_d3dsamplerstate
(
DWORD
state
)
DECLSPEC_HIDDEN
;
const
char
*
debug_d3dstate
(
DWORD
state
)
DECLSPEC_HIDDEN
;
...
...
include/wine/wined3d.h
View file @
e6a4a866
...
...
@@ -74,21 +74,20 @@ enum wined3d_light_type
WINED3D_LIGHT_GLSPOT
=
5
,
/* D3D7 */
};
typedef
enum
_WINED3DPRIMITIVETYPE
{
WINED3DPT_UNDEFINED
=
0
,
WINED3DPT_POINTLIST
=
1
,
WINED3DPT_LINELIST
=
2
,
WINED3DPT_LINESTRIP
=
3
,
WINED3DPT_TRIANGLELIST
=
4
,
WINED3DPT_TRIANGLESTRIP
=
5
,
WINED3DPT_TRIANGLEFAN
=
6
,
WINED3DPT_LINELIST_ADJ
=
10
,
WINED3DPT_LINESTRIP_ADJ
=
11
,
WINED3DPT_TRIANGLELIST_ADJ
=
12
,
WINED3DPT_TRIANGLESTRIP_ADJ
=
13
,
WINED3DPT_FORCE_DWORD
=
0x7fffffff
}
WINED3DPRIMITIVETYPE
;
enum
wined3d_primitive_type
{
WINED3D_PT_UNDEFINED
=
0
,
WINED3D_PT_POINTLIST
=
1
,
WINED3D_PT_LINELIST
=
2
,
WINED3D_PT_LINESTRIP
=
3
,
WINED3D_PT_TRIANGLELIST
=
4
,
WINED3D_PT_TRIANGLESTRIP
=
5
,
WINED3D_PT_TRIANGLEFAN
=
6
,
WINED3D_PT_LINELIST_ADJ
=
10
,
WINED3D_PT_LINESTRIP_ADJ
=
11
,
WINED3D_PT_TRIANGLELIST_ADJ
=
12
,
WINED3D_PT_TRIANGLESTRIP_ADJ
=
13
,
};
typedef
enum
_WINED3DDEVTYPE
{
...
...
@@ -2150,7 +2149,7 @@ HRESULT __cdecl wined3d_device_get_material(const struct wined3d_device *device,
float
__cdecl
wined3d_device_get_npatch_mode
(
const
struct
wined3d_device
*
device
);
struct
wined3d_shader
*
__cdecl
wined3d_device_get_pixel_shader
(
const
struct
wined3d_device
*
device
);
void
__cdecl
wined3d_device_get_primitive_type
(
const
struct
wined3d_device
*
device
,
WINED3DPRIMITIVETYPE
*
primitive_topology
);
enum
wined3d_primitive_type
*
primitive_topology
);
HRESULT
__cdecl
wined3d_device_get_ps_consts_b
(
const
struct
wined3d_device
*
device
,
UINT
start_register
,
BOOL
*
constants
,
UINT
bool_count
);
HRESULT
__cdecl
wined3d_device_get_ps_consts_f
(
const
struct
wined3d_device
*
device
,
...
...
@@ -2230,7 +2229,8 @@ HRESULT __cdecl wined3d_device_set_material(struct wined3d_device *device, const
void
__cdecl
wined3d_device_set_multithreaded
(
struct
wined3d_device
*
device
);
HRESULT
__cdecl
wined3d_device_set_npatch_mode
(
struct
wined3d_device
*
device
,
float
segments
);
HRESULT
__cdecl
wined3d_device_set_pixel_shader
(
struct
wined3d_device
*
device
,
struct
wined3d_shader
*
shader
);
void
__cdecl
wined3d_device_set_primitive_type
(
struct
wined3d_device
*
device
,
WINED3DPRIMITIVETYPE
primitive_topology
);
void
__cdecl
wined3d_device_set_primitive_type
(
struct
wined3d_device
*
device
,
enum
wined3d_primitive_type
primitive_topology
);
HRESULT
__cdecl
wined3d_device_set_ps_consts_b
(
struct
wined3d_device
*
device
,
UINT
start_register
,
const
BOOL
*
constants
,
UINT
bool_count
);
HRESULT
__cdecl
wined3d_device_set_ps_consts_f
(
struct
wined3d_device
*
device
,
...
...
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