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
4d93adf7
Commit
4d93adf7
authored
Jan 09, 2014
by
Henri Verbeet
Committed by
Alexandre Julliard
Jan 09, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Reset the command stream state as well in wined3d_device_reset().
parent
cdc9eff5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
0 deletions
+31
-0
cs.c
dlls/wined3d/cs.c
+29
-0
device.c
dlls/wined3d/device.c
+1
-0
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-0
No files found.
dlls/wined3d/cs.c
View file @
4d93adf7
...
...
@@ -48,6 +48,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_SET_TRANSFORM
,
WINED3D_CS_OP_SET_CLIP_PLANE
,
WINED3D_CS_OP_SET_MATERIAL
,
WINED3D_CS_OP_RESET_STATE
,
};
struct
wined3d_cs_present
...
...
@@ -218,6 +219,11 @@ struct wined3d_cs_set_material
const
struct
wined3d_material
*
material
;
};
struct
wined3d_cs_reset_state
{
enum
wined3d_cs_op
opcode
;
};
static
void
wined3d_cs_exec_present
(
struct
wined3d_cs
*
cs
,
const
void
*
data
)
{
const
struct
wined3d_cs_present
*
op
=
data
;
...
...
@@ -814,6 +820,28 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma
cs
->
ops
->
submit
(
cs
);
}
static
void
wined3d_cs_exec_reset_state
(
struct
wined3d_cs
*
cs
,
const
void
*
data
)
{
struct
wined3d_adapter
*
adapter
=
cs
->
device
->
adapter
;
HRESULT
hr
;
state_cleanup
(
&
cs
->
state
);
memset
(
&
cs
->
state
,
0
,
sizeof
(
cs
->
state
));
if
(
FAILED
(
hr
=
state_init
(
&
cs
->
state
,
&
cs
->
fb
,
&
adapter
->
gl_info
,
&
adapter
->
d3d_info
,
WINED3D_STATE_NO_REF
|
WINED3D_STATE_INIT_DEFAULT
)))
ERR
(
"Failed to initialize CS state, hr %#x.
\n
"
,
hr
);
}
void
wined3d_cs_emit_reset_state
(
struct
wined3d_cs
*
cs
)
{
struct
wined3d_cs_reset_state
*
op
;
op
=
cs
->
ops
->
require_space
(
cs
,
sizeof
(
*
op
));
op
->
opcode
=
WINED3D_CS_OP_RESET_STATE
;
cs
->
ops
->
submit
(
cs
);
}
static
void
(
*
const
wined3d_cs_op_handlers
[])(
struct
wined3d_cs
*
cs
,
const
void
*
data
)
=
{
/* WINED3D_CS_OP_PRESENT */
wined3d_cs_exec_present
,
...
...
@@ -838,6 +866,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_SET_TRANSFORM */
wined3d_cs_exec_set_transform
,
/* WINED3D_CS_OP_SET_CLIP_PLANE */
wined3d_cs_exec_set_clip_plane
,
/* WINED3D_CS_OP_SET_MATERIAL */
wined3d_cs_exec_set_material
,
/* WINED3D_CS_OP_RESET_STATE */
wined3d_cs_exec_reset_state
,
};
static
void
*
wined3d_cs_st_require_space
(
struct
wined3d_cs
*
cs
,
size_t
size
)
...
...
dlls/wined3d/device.c
View file @
4d93adf7
...
...
@@ -4406,6 +4406,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
wined3d_stateblock_decref
(
device
->
recording
);
device
->
recording
=
NULL
;
}
wined3d_cs_emit_reset_state
(
device
->
cs
);
state_cleanup
(
&
device
->
state
);
if
(
device
->
d3d_initialized
)
...
...
dlls/wined3d/wined3d_private.h
View file @
4d93adf7
...
...
@@ -2473,6 +2473,7 @@ void wined3d_cs_emit_draw(struct wined3d_cs *cs, UINT start_idx, UINT index_coun
void
wined3d_cs_emit_present
(
struct
wined3d_cs
*
cs
,
struct
wined3d_swapchain
*
swapchain
,
const
RECT
*
src_rect
,
const
RECT
*
dst_rect
,
HWND
dst_window_override
,
const
RGNDATA
*
dirty_region
,
DWORD
flags
)
DECLSPEC_HIDDEN
;
void
wined3d_cs_emit_reset_state
(
struct
wined3d_cs
*
cs
)
DECLSPEC_HIDDEN
;
void
wined3d_cs_emit_set_clip_plane
(
struct
wined3d_cs
*
cs
,
UINT
plane_idx
,
const
struct
wined3d_vec4
*
plane
)
DECLSPEC_HIDDEN
;
void
wined3d_cs_emit_set_constant_buffer
(
struct
wined3d_cs
*
cs
,
enum
wined3d_shader_type
type
,
...
...
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