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
db68c436
Commit
db68c436
authored
Oct 09, 2013
by
Henri Verbeet
Committed by
Alexandre Julliard
Oct 09, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Send clip plane updates through the command stream.
parent
183f00cb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
8 deletions
+33
-8
cs.c
dlls/wined3d/cs.c
+29
-0
device.c
dlls/wined3d/device.c
+2
-8
wined3d_private.h
dlls/wined3d/wined3d_private.h
+2
-0
No files found.
dlls/wined3d/cs.c
View file @
db68c436
...
...
@@ -45,6 +45,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_SET_TEXTURE_STATE
,
WINED3D_CS_OP_SET_SAMPLER_STATE
,
WINED3D_CS_OP_SET_TRANSFORM
,
WINED3D_CS_OP_SET_CLIP_PLANE
,
};
struct
wined3d_cs_present
...
...
@@ -177,6 +178,13 @@ struct wined3d_cs_set_transform
const
struct
wined3d_matrix
*
matrix
;
};
struct
wined3d_cs_set_clip_plane
{
enum
wined3d_cs_op
opcode
;
UINT
plane_idx
;
const
struct
wined3d_vec4
*
plane
;
};
static
void
wined3d_cs_exec_present
(
struct
wined3d_cs
*
cs
,
const
void
*
data
)
{
const
struct
wined3d_cs_present
*
op
=
data
;
...
...
@@ -691,6 +699,26 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform
cs
->
ops
->
submit
(
cs
);
}
static
void
wined3d_cs_exec_set_clip_plane
(
struct
wined3d_cs
*
cs
,
const
void
*
data
)
{
const
struct
wined3d_cs_set_clip_plane
*
op
=
data
;
cs
->
state
.
clip_planes
[
op
->
plane_idx
]
=
*
op
->
plane
;
device_invalidate_state
(
cs
->
device
,
STATE_CLIPPLANE
(
op
->
plane_idx
));
}
void
wined3d_cs_emit_set_clip_plane
(
struct
wined3d_cs
*
cs
,
UINT
plane_idx
,
const
struct
wined3d_vec4
*
plane
)
{
struct
wined3d_cs_set_clip_plane
*
op
;
op
=
cs
->
ops
->
require_space
(
cs
,
sizeof
(
*
op
));
op
->
opcode
=
WINED3D_CS_OP_SET_CLIP_PLANE
;
op
->
plane_idx
=
plane_idx
;
op
->
plane
=
plane
;
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
,
...
...
@@ -712,6 +740,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_SET_TEXTURE_STATE */
wined3d_cs_exec_set_texture_state
,
/* WINED3D_CS_OP_SET_SAMPLER_STATE */
wined3d_cs_exec_set_sampler_state
,
/* WINED3D_CS_OP_SET_TRANSFORM */
wined3d_cs_exec_set_transform
,
/* WINED3D_CS_OP_SET_CLIP_PLANE */
wined3d_cs_exec_set_clip_plane
,
};
static
void
*
wined3d_cs_st_require_space
(
struct
wined3d_cs
*
cs
,
size_t
size
)
...
...
dlls/wined3d/device.c
View file @
db68c436
...
...
@@ -1734,14 +1734,8 @@ HRESULT CDECL wined3d_device_set_clip_plane(struct wined3d_device *device,
device
->
update_state
->
clip_planes
[
plane_idx
]
=
*
plane
;
/* Handle recording of state blocks. */
if
(
device
->
recording
)
{
TRACE
(
"Recording... not performing anything.
\n
"
);
return
WINED3D_OK
;
}
device_invalidate_state
(
device
,
STATE_CLIPPLANE
(
plane_idx
));
if
(
!
device
->
recording
)
wined3d_cs_emit_set_clip_plane
(
device
->
cs
,
plane_idx
,
plane
);
return
WINED3D_OK
;
}
...
...
dlls/wined3d/wined3d_private.h
View file @
db68c436
...
...
@@ -2485,6 +2485,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_clip_plane
(
struct
wined3d_cs
*
cs
,
UINT
plane_idx
,
const
struct
wined3d_vec4
*
plane
)
DECLSPEC_HIDDEN
;
void
wined3d_cs_emit_set_depth_stencil
(
struct
wined3d_cs
*
cs
,
struct
wined3d_surface
*
depth_stencil
)
DECLSPEC_HIDDEN
;
void
wined3d_cs_emit_set_geometry_shader
(
struct
wined3d_cs
*
cs
,
struct
wined3d_shader
*
shader
)
DECLSPEC_HIDDEN
;
void
wined3d_cs_emit_set_index_buffer
(
struct
wined3d_cs
*
cs
,
struct
wined3d_buffer
*
buffer
,
...
...
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