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
7dadbc58
Commit
7dadbc58
authored
Mar 15, 2021
by
Henri Verbeet
Committed by
Alexandre Julliard
Mar 15, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Introduce wined3d_state_reset().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0ab3adf6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
12 deletions
+15
-12
cs.c
dlls/wined3d/cs.c
+1
-4
device.c
dlls/wined3d/device.c
+2
-4
wined3d_private.h
dlls/wined3d/wined3d_private.h
+12
-4
No files found.
dlls/wined3d/cs.c
View file @
7dadbc58
...
...
@@ -2079,11 +2079,8 @@ static void wined3d_cs_mt_push_constants(struct wined3d_device_context *context,
static
void
wined3d_cs_exec_reset_state
(
struct
wined3d_cs
*
cs
,
const
void
*
data
)
{
struct
wined3d_adapter
*
adapter
=
cs
->
c
.
device
->
adapter
;
state_cleanup
(
&
cs
->
state
);
memset
(
&
cs
->
state
,
0
,
sizeof
(
cs
->
state
));
state_init
(
&
cs
->
state
,
&
adapter
->
d3d_info
,
WINED3D_STATE_NO_REF
|
WINED3D_STATE_INIT_DEFAULT
);
wined3d_state_reset
(
&
cs
->
state
,
&
cs
->
c
.
device
->
adapter
->
d3d_info
);
}
void
wined3d_cs_emit_reset_state
(
struct
wined3d_cs
*
cs
)
...
...
dlls/wined3d/device.c
View file @
7dadbc58
...
...
@@ -1251,8 +1251,7 @@ void wined3d_device_uninit_3d(struct wined3d_device *device)
heap_free
(
device
->
swapchains
);
device
->
swapchains
=
NULL
;
memset
(
state
,
0
,
sizeof
(
*
state
));
state_init
(
state
,
&
device
->
adapter
->
d3d_info
,
WINED3D_STATE_INIT_DEFAULT
);
wined3d_state_reset
(
state
,
&
device
->
adapter
->
d3d_info
);
}
/* Enables thread safety in the wined3d device and its resources. Called by DirectDraw
...
...
@@ -5754,8 +5753,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
device
->
adapter
->
adapter_ops
->
adapter_uninit_3d
(
device
);
memset
(
state
,
0
,
sizeof
(
*
state
));
state_init
(
state
,
&
device
->
adapter
->
d3d_info
,
WINED3D_STATE_INIT_DEFAULT
);
wined3d_state_reset
(
state
,
&
device
->
adapter
->
d3d_info
);
device_init_swapchain_state
(
device
,
swapchain
);
if
(
wined3d_settings
.
logo
)
...
...
dlls/wined3d/wined3d_private.h
View file @
7dadbc58
...
...
@@ -3710,6 +3710,18 @@ struct wined3d_state
struct
wined3d_rasterizer_state
*
rasterizer_state
;
};
void
state_cleanup
(
struct
wined3d_state
*
state
)
DECLSPEC_HIDDEN
;
void
state_init
(
struct
wined3d_state
*
state
,
const
struct
wined3d_d3d_info
*
d3d_info
,
uint32_t
flags
)
DECLSPEC_HIDDEN
;
void
state_unbind_resources
(
struct
wined3d_state
*
state
)
DECLSPEC_HIDDEN
;
static
inline
void
wined3d_state_reset
(
struct
wined3d_state
*
state
,
const
struct
wined3d_d3d_info
*
d3d_info
)
{
uint32_t
flags
=
state
->
flags
;
memset
(
state
,
0
,
sizeof
(
*
state
));
state_init
(
state
,
d3d_info
,
flags
);
}
static
inline
bool
wined3d_state_uses_depth_buffer
(
const
struct
wined3d_state
*
state
)
{
if
(
!
state
->
depth_stencil_state
)
...
...
@@ -4639,10 +4651,6 @@ struct wined3d_light_info *wined3d_light_state_get_light(const struct wined3d_li
HRESULT
wined3d_light_state_set_light
(
struct
wined3d_light_state
*
state
,
DWORD
light_idx
,
const
struct
wined3d_light
*
params
,
struct
wined3d_light_info
**
light_info
)
DECLSPEC_HIDDEN
;
void
state_cleanup
(
struct
wined3d_state
*
state
)
DECLSPEC_HIDDEN
;
void
state_init
(
struct
wined3d_state
*
state
,
const
struct
wined3d_d3d_info
*
d3d_info
,
DWORD
flags
)
DECLSPEC_HIDDEN
;
void
state_unbind_resources
(
struct
wined3d_state
*
state
)
DECLSPEC_HIDDEN
;
enum
wined3d_cs_queue_id
{
WINED3D_CS_QUEUE_DEFAULT
=
0
,
...
...
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