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
ed417a6f
Commit
ed417a6f
authored
Jan 17, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
Jan 18, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Get rid of the WINED3DSTATEBLOCKTYPE typedef.
parent
ae2e5d65
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
25 additions
and
26 deletions
+25
-26
device.c
dlls/d3d8/device.c
+1
-1
stateblock.c
dlls/d3d9/stateblock.c
+1
-1
ddraw.c
dlls/ddraw/ddraw.c
+1
-1
device.c
dlls/wined3d/device.c
+3
-3
stateblock.c
dlls/wined3d/stateblock.c
+10
-10
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
wined3d.h
include/wine/wined3d.h
+8
-9
No files found.
dlls/d3d8/device.c
View file @
ed417a6f
...
...
@@ -1622,7 +1622,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CreateStateBlock(IDirect3DDevice8 *if
}
wined3d_mutex_lock
();
hr
=
wined3d_stateblock_create
(
This
->
wined3d_device
,
(
WINED3DSTATEBLOCKTYPE
)
Type
,
&
stateblock
);
hr
=
wined3d_stateblock_create
(
This
->
wined3d_device
,
(
enum
wined3d_stateblock_type
)
Type
,
&
stateblock
);
if
(
FAILED
(
hr
))
{
wined3d_mutex_unlock
();
...
...
dlls/d3d9/stateblock.c
View file @
ed417a6f
...
...
@@ -150,7 +150,7 @@ HRESULT stateblock_init(IDirect3DStateBlock9Impl *stateblock, IDirect3DDevice9Im
{
wined3d_mutex_lock
();
hr
=
wined3d_stateblock_create
(
device
->
wined3d_device
,
(
WINED3DSTATEBLOCKTYPE
)
type
,
&
stateblock
->
wined3d_stateblock
);
(
enum
wined3d_stateblock_type
)
type
,
&
stateblock
->
wined3d_stateblock
);
wined3d_mutex_unlock
();
if
(
FAILED
(
hr
))
{
...
...
dlls/ddraw/ddraw.c
View file @
ed417a6f
...
...
@@ -922,7 +922,7 @@ static HRESULT WINAPI ddraw7_SetCooperativeLevel(IDirectDraw7 *iface, HWND hwnd,
{
restore_state
=
TRUE
;
if
(
FAILED
(
hr
=
wined3d_stateblock_create
(
This
->
wined3d_device
,
WINED3DSBT_ALL
,
&
stateblock
)))
if
(
FAILED
(
hr
=
wined3d_stateblock_create
(
This
->
wined3d_device
,
WINED3D
_
SBT_ALL
,
&
stateblock
)))
{
ERR
(
"Failed to create stateblock, hr %#x.
\n
"
,
hr
);
wined3d_mutex_unlock
();
...
...
dlls/wined3d/device.c
View file @
ed417a6f
...
...
@@ -3915,7 +3915,7 @@ HRESULT CDECL wined3d_device_begin_stateblock(struct wined3d_device *device)
if
(
device
->
isRecordingState
)
return
WINED3DERR_INVALIDCALL
;
hr
=
wined3d_stateblock_create
(
device
,
WINED3DSBT_RECORDED
,
&
stateblock
);
hr
=
wined3d_stateblock_create
(
device
,
WINED3D
_
SBT_RECORDED
,
&
stateblock
);
if
(
FAILED
(
hr
))
return
hr
;
...
...
@@ -5609,7 +5609,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
}
/* Note: No parent needed for initial internal stateblock */
hr
=
wined3d_stateblock_create
(
device
,
WINED3DSBT_INIT
,
&
device
->
stateBlock
);
hr
=
wined3d_stateblock_create
(
device
,
WINED3D
_
SBT_INIT
,
&
device
->
stateBlock
);
if
(
FAILED
(
hr
))
ERR
(
"Resetting the stateblock failed with error %#x.
\n
"
,
hr
);
else
...
...
@@ -5902,7 +5902,7 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d,
}
device
->
blitter
=
adapter
->
blitter
;
hr
=
wined3d_stateblock_create
(
device
,
WINED3DSBT_INIT
,
&
device
->
stateBlock
);
hr
=
wined3d_stateblock_create
(
device
,
WINED3D
_
SBT_INIT
,
&
device
->
stateBlock
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to create stateblock.
\n
"
);
...
...
dlls/wined3d/stateblock.c
View file @
ed417a6f
...
...
@@ -924,8 +924,8 @@ HRESULT CDECL wined3d_stateblock_apply(const struct wined3d_stateblock *stateblo
unsigned
int
i
;
DWORD
map
;
TRACE
(
"Applying stateblock %p
to device %p.
\n
"
,
stateblock
,
device
);
TRACE
(
"Blocktype: %#x.
\n
"
,
stateblock
->
blockTyp
e
);
TRACE
(
"Applying stateblock %p
of type %#x to device %p.
\n
"
,
stateblock
,
stateblock
->
blockType
,
devic
e
);
if
(
stateblock
->
changed
.
vertexShader
)
wined3d_device_set_vertex_shader
(
device
,
stateblock
->
state
.
vertex_shader
);
...
...
@@ -1105,7 +1105,7 @@ void stateblock_init_default_state(struct wined3d_stateblock *stateblock)
TRACE
(
"stateblock %p.
\n
"
,
stateblock
);
stateblock
->
blockType
=
WINED3DSBT_INIT
;
stateblock
->
blockType
=
WINED3D
_
SBT_INIT
;
memset
(
stateblock
->
changed
.
pixelShaderConstantsF
,
0
,
device
->
d3d_pshader_constantF
*
sizeof
(
BOOL
));
memset
(
stateblock
->
changed
.
vertexShaderConstantsF
,
0
,
device
->
d3d_vshader_constantF
*
sizeof
(
BOOL
));
...
...
@@ -1337,7 +1337,7 @@ void stateblock_init_default_state(struct wined3d_stateblock *stateblock)
}
static
HRESULT
stateblock_init
(
struct
wined3d_stateblock
*
stateblock
,
struct
wined3d_device
*
device
,
WINED3DSTATEBLOCKTYPE
type
)
struct
wined3d_device
*
device
,
enum
wined3d_stateblock_type
type
)
{
unsigned
int
i
;
HRESULT
hr
;
...
...
@@ -1354,26 +1354,26 @@ static HRESULT stateblock_init(struct wined3d_stateblock *stateblock,
hr
=
stateblock_allocate_shader_constants
(
stateblock
);
if
(
FAILED
(
hr
))
return
hr
;
/* The WINED3DSBT_INIT stateblock type is used during initialization to
/* The WINED3D
_
SBT_INIT stateblock type is used during initialization to
* produce a placeholder stateblock so other functions called can update a
* state block. */
if
(
type
==
WINED3D
SBT_INIT
||
type
==
WINED3D
SBT_RECORDED
)
return
WINED3D_OK
;
if
(
type
==
WINED3D
_SBT_INIT
||
type
==
WINED3D_
SBT_RECORDED
)
return
WINED3D_OK
;
TRACE
(
"Updating changed flags appropriate for type %#x.
\n
"
,
type
);
switch
(
type
)
{
case
WINED3DSBT_ALL
:
case
WINED3D
_
SBT_ALL
:
stateblock_init_lights
(
stateblock
,
device
->
stateBlock
->
state
.
light_map
);
stateblock_savedstates_set_all
(
&
stateblock
->
changed
,
device
->
d3d_vshader_constantF
,
device
->
d3d_pshader_constantF
);
break
;
case
WINED3D
SBT_PIXEL
STATE
:
case
WINED3D
_SBT_PIXEL_
STATE
:
stateblock_savedstates_set_pixel
(
&
stateblock
->
changed
,
device
->
d3d_pshader_constantF
);
break
;
case
WINED3D
SBT_VERTEX
STATE
:
case
WINED3D
_SBT_VERTEX_
STATE
:
stateblock_init_lights
(
stateblock
,
device
->
stateBlock
->
state
.
light_map
);
stateblock_savedstates_set_vertex
(
&
stateblock
->
changed
,
device
->
d3d_vshader_constantF
);
break
;
...
...
@@ -1390,7 +1390,7 @@ static HRESULT stateblock_init(struct wined3d_stateblock *stateblock,
}
HRESULT
CDECL
wined3d_stateblock_create
(
struct
wined3d_device
*
device
,
WINED3DSTATEBLOCKTYPE
type
,
struct
wined3d_stateblock
**
stateblock
)
enum
wined3d_stateblock_type
type
,
struct
wined3d_stateblock
**
stateblock
)
{
struct
wined3d_stateblock
*
object
;
HRESULT
hr
;
...
...
dlls/wined3d/wined3d_private.h
View file @
ed417a6f
...
...
@@ -2310,7 +2310,7 @@ struct wined3d_stateblock
{
LONG
ref
;
/* Note: Ref counting not required */
struct
wined3d_device
*
device
;
WINED3DSTATEBLOCKTYPE
blockType
;
enum
wined3d_stateblock_type
blockType
;
/* Array indicating whether things have been set or changed */
struct
wined3d_saved_states
changed
;
...
...
include/wine/wined3d.h
View file @
ed417a6f
...
...
@@ -710,15 +710,14 @@ enum wined3d_query_type
#define WINED3DISSUE_END (1 << 0)
#define WINED3DGETDATA_FLUSH (1 << 0)
typedef
enum
_WINED3DSTATEBLOCKTYPE
enum
wined3d_stateblock_type
{
WINED3DSBT_INIT
=
0
,
WINED3DSBT_ALL
=
1
,
WINED3DSBT_PIXELSTATE
=
2
,
WINED3DSBT_VERTEXSTATE
=
3
,
WINED3DSBT_RECORDED
=
4
,
/* WineD3D private */
WINED3DSBT_FORCE_DWORD
=
0xffffffff
}
WINED3DSTATEBLOCKTYPE
;
WINED3D_SBT_INIT
=
0
,
WINED3D_SBT_ALL
=
1
,
WINED3D_SBT_PIXEL_STATE
=
2
,
WINED3D_SBT_VERTEX_STATE
=
3
,
WINED3D_SBT_RECORDED
=
4
,
/* WineD3D private */
};
typedef
enum
_WINED3DDECLMETHOD
{
...
...
@@ -2292,7 +2291,7 @@ HRESULT __cdecl wined3d_shader_set_local_constants_float(struct wined3d_shader *
HRESULT
__cdecl
wined3d_stateblock_apply
(
const
struct
wined3d_stateblock
*
stateblock
);
HRESULT
__cdecl
wined3d_stateblock_capture
(
struct
wined3d_stateblock
*
stateblock
);
HRESULT
__cdecl
wined3d_stateblock_create
(
struct
wined3d_device
*
device
,
WINED3DSTATEBLOCKTYPE
type
,
struct
wined3d_stateblock
**
stateblock
);
enum
wined3d_stateblock_type
type
,
struct
wined3d_stateblock
**
stateblock
);
ULONG
__cdecl
wined3d_stateblock_decref
(
struct
wined3d_stateblock
*
stateblock
);
ULONG
__cdecl
wined3d_stateblock_incref
(
struct
wined3d_stateblock
*
stateblock
);
...
...
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