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
abbc595f
Commit
abbc595f
authored
Sep 26, 2013
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 26, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Initialize the fb state pointer in state_init().
parent
6793fa71
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
7 deletions
+9
-7
device.c
dlls/wined3d/device.c
+2
-2
stateblock.c
dlls/wined3d/stateblock.c
+5
-4
wined3d_private.h
dlls/wined3d/wined3d_private.h
+2
-1
No files found.
dlls/wined3d/device.c
View file @
abbc595f
...
...
@@ -4708,7 +4708,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
if
(
device
->
d3d_initialized
)
delete_opengl_contexts
(
device
,
swapchain
);
if
(
FAILED
(
hr
=
state_init
(
&
device
->
state
,
&
device
->
adapter
->
d3d_info
)))
if
(
FAILED
(
hr
=
state_init
(
&
device
->
state
,
&
device
->
fb
,
&
device
->
adapter
->
d3d_info
)))
ERR
(
"Failed to initialize device state, hr %#x.
\n
"
,
hr
);
state_init_default
(
&
device
->
state
,
device
);
device
->
update_state
=
&
device
->
state
;
...
...
@@ -4972,7 +4972,7 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d,
device
->
blitter
=
adapter
->
blitter
;
if
(
FAILED
(
hr
=
state_init
(
&
device
->
state
,
&
adapter
->
d3d_info
)))
if
(
FAILED
(
hr
=
state_init
(
&
device
->
state
,
&
device
->
fb
,
&
adapter
->
d3d_info
)))
{
ERR
(
"Failed to initialize device state, hr %#x.
\n
"
,
hr
);
for
(
i
=
0
;
i
<
sizeof
(
device
->
multistate_funcs
)
/
sizeof
(
device
->
multistate_funcs
[
0
]);
++
i
)
...
...
dlls/wined3d/stateblock.c
View file @
abbc595f
...
...
@@ -598,10 +598,13 @@ void state_cleanup(struct wined3d_state *state)
HeapFree
(
GetProcessHeap
(),
0
,
state
->
ps_consts_f
);
}
HRESULT
state_init
(
struct
wined3d_state
*
state
,
const
struct
wined3d_d3d_info
*
d3d_info
)
HRESULT
state_init
(
struct
wined3d_state
*
state
,
struct
wined3d_fb_state
*
fb
,
const
struct
wined3d_d3d_info
*
d3d_info
)
{
unsigned
int
i
;
state
->
fb
=
fb
;
for
(
i
=
0
;
i
<
LIGHTMAP_SIZE
;
i
++
)
{
list_init
(
&
state
->
light_map
[
i
]);
...
...
@@ -1199,8 +1202,6 @@ void state_init_default(struct wined3d_state *state, struct wined3d_device *devi
state
->
transforms
[
WINED3D_TS_WORLD_MATRIX
(
i
)]
=
identity
;
}
state
->
fb
=
&
device
->
fb
;
TRACE
(
"Render states
\n
"
);
/* Render states: */
state
->
render_states
[
WINED3D_RS_ZENABLE
]
=
WINED3D_ZB_TRUE
;
...
...
@@ -1386,7 +1387,7 @@ static HRESULT stateblock_init(struct wined3d_stateblock *stateblock,
stateblock
->
ref
=
1
;
stateblock
->
device
=
device
;
if
(
FAILED
(
hr
=
state_init
(
&
stateblock
->
state
,
d3d_info
)))
if
(
FAILED
(
hr
=
state_init
(
&
stateblock
->
state
,
NULL
,
d3d_info
)))
return
hr
;
if
(
FAILED
(
hr
=
stateblock_allocate_shader_constants
(
stateblock
)))
...
...
dlls/wined3d/wined3d_private.h
View file @
abbc595f
...
...
@@ -2447,7 +2447,8 @@ struct wined3d_stateblock
void
stateblock_init_contained_states
(
struct
wined3d_stateblock
*
stateblock
)
DECLSPEC_HIDDEN
;
void
state_cleanup
(
struct
wined3d_state
*
state
)
DECLSPEC_HIDDEN
;
HRESULT
state_init
(
struct
wined3d_state
*
state
,
const
struct
wined3d_d3d_info
*
d3d_info
)
DECLSPEC_HIDDEN
;
HRESULT
state_init
(
struct
wined3d_state
*
state
,
struct
wined3d_fb_state
*
fb
,
const
struct
wined3d_d3d_info
*
d3d_info
)
DECLSPEC_HIDDEN
;
void
state_init_default
(
struct
wined3d_state
*
state
,
struct
wined3d_device
*
device
)
DECLSPEC_HIDDEN
;
void
state_unbind_resources
(
struct
wined3d_state
*
state
)
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