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
438b6726
Commit
438b6726
authored
Oct 01, 2013
by
Henri Verbeet
Committed by
Alexandre Julliard
Oct 01, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Send render target binding updates through the command stream.
parent
0cc1c22d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
2 deletions
+33
-2
cs.c
dlls/wined3d/cs.c
+30
-0
device.c
dlls/wined3d/device.c
+1
-2
wined3d_private.h
dlls/wined3d/wined3d_private.h
+2
-0
No files found.
dlls/wined3d/cs.c
View file @
438b6726
...
...
@@ -30,6 +30,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_DRAW
,
WINED3D_CS_OP_SET_VIEWPORT
,
WINED3D_CS_OP_SET_SCISSOR_RECT
,
WINED3D_CS_OP_SET_RENDER_TARGET
,
};
struct
wined3d_cs_present
...
...
@@ -76,6 +77,13 @@ struct wined3d_cs_set_scissor_rect
const
RECT
*
rect
;
};
struct
wined3d_cs_set_render_target
{
enum
wined3d_cs_op
opcode
;
UINT
render_target_idx
;
struct
wined3d_surface
*
render_target
;
};
static
void
wined3d_cs_exec_present
(
struct
wined3d_cs
*
cs
,
const
void
*
data
)
{
const
struct
wined3d_cs_present
*
op
=
data
;
...
...
@@ -198,6 +206,27 @@ void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
cs
->
ops
->
submit
(
cs
);
}
static
void
wined3d_cs_exec_set_render_target
(
struct
wined3d_cs
*
cs
,
const
void
*
data
)
{
const
struct
wined3d_cs_set_render_target
*
op
=
data
;
cs
->
state
.
fb
->
render_targets
[
op
->
render_target_idx
]
=
op
->
render_target
;
device_invalidate_state
(
cs
->
device
,
STATE_FRAMEBUFFER
);
}
void
wined3d_cs_emit_set_render_target
(
struct
wined3d_cs
*
cs
,
UINT
render_target_idx
,
struct
wined3d_surface
*
render_target
)
{
struct
wined3d_cs_set_render_target
*
op
;
op
=
cs
->
ops
->
require_space
(
cs
,
sizeof
(
*
op
));
op
->
opcode
=
WINED3D_CS_OP_SET_RENDER_TARGET
;
op
->
render_target_idx
=
render_target_idx
;
op
->
render_target
=
render_target
;
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
,
...
...
@@ -205,6 +234,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_DRAW */
wined3d_cs_exec_draw
,
/* WINED3D_CS_OP_SET_VIEWPORT */
wined3d_cs_exec_set_viewport
,
/* WINED3D_CS_OP_SET_SCISSOR_RECT */
wined3d_cs_exec_set_scissor_rect
,
/* WINED3D_CS_OP_SET_RENDER_TARGET */
wined3d_cs_exec_set_render_target
,
};
static
void
*
wined3d_cs_st_require_space
(
struct
wined3d_cs
*
cs
,
size_t
size
)
...
...
dlls/wined3d/device.c
View file @
438b6726
...
...
@@ -4032,13 +4032,12 @@ HRESULT CDECL wined3d_device_set_render_target(struct wined3d_device *device,
if
(
render_target
)
wined3d_surface_incref
(
render_target
);
device
->
fb
.
render_targets
[
render_target_idx
]
=
render_target
;
wined3d_cs_emit_set_render_target
(
device
->
cs
,
render_target_idx
,
render_target
);
/* Release after the assignment, to prevent device_resource_released()
* from seeing the surface as still in use. */
if
(
prev
)
wined3d_surface_decref
(
prev
);
device_invalidate_state
(
device
,
STATE_FRAMEBUFFER
);
return
WINED3D_OK
;
}
...
...
dlls/wined3d/wined3d_private.h
View file @
438b6726
...
...
@@ -2486,6 +2486,8 @@ 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_set_render_target
(
struct
wined3d_cs
*
cs
,
UINT
render_target_idx
,
struct
wined3d_surface
*
render_target
)
DECLSPEC_HIDDEN
;
void
wined3d_cs_emit_set_scissor_rect
(
struct
wined3d_cs
*
cs
,
const
RECT
*
rect
)
DECLSPEC_HIDDEN
;
void
wined3d_cs_emit_set_viewport
(
struct
wined3d_cs
*
cs
,
const
struct
wined3d_viewport
*
viewport
)
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