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
07760604
Commit
07760604
authored
Sep 30, 2013
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 30, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Send scissor rect updates through the command stream.
parent
8a7744b0
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
3 deletions
+31
-3
cs.c
dlls/wined3d/cs.c
+27
-0
device.c
dlls/wined3d/device.c
+3
-3
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-0
No files found.
dlls/wined3d/cs.c
View file @
07760604
...
...
@@ -29,6 +29,7 @@ enum wined3d_cs_op
WINED3D_CS_OP_CLEAR
,
WINED3D_CS_OP_DRAW
,
WINED3D_CS_OP_SET_VIEWPORT
,
WINED3D_CS_OP_SET_SCISSOR_RECT
,
};
struct
wined3d_cs_present
...
...
@@ -69,6 +70,12 @@ struct wined3d_cs_set_viewport
const
struct
wined3d_viewport
*
viewport
;
};
struct
wined3d_cs_set_scissor_rect
{
enum
wined3d_cs_op
opcode
;
const
RECT
*
rect
;
};
static
void
wined3d_cs_exec_present
(
struct
wined3d_cs
*
cs
,
const
void
*
data
)
{
const
struct
wined3d_cs_present
*
op
=
data
;
...
...
@@ -172,12 +179,32 @@ void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_vi
cs
->
ops
->
submit
(
cs
);
}
static
void
wined3d_cs_exec_set_scissor_rect
(
struct
wined3d_cs
*
cs
,
const
void
*
data
)
{
const
struct
wined3d_cs_set_scissor_rect
*
op
=
data
;
cs
->
state
.
scissor_rect
=
*
op
->
rect
;
device_invalidate_state
(
cs
->
device
,
STATE_SCISSORRECT
);
}
void
wined3d_cs_emit_set_scissor_rect
(
struct
wined3d_cs
*
cs
,
const
RECT
*
rect
)
{
struct
wined3d_cs_set_scissor_rect
*
op
;
op
=
cs
->
ops
->
require_space
(
cs
,
sizeof
(
*
op
));
op
->
opcode
=
WINED3D_CS_OP_SET_SCISSOR_RECT
;
op
->
rect
=
rect
;
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
,
/* WINED3D_CS_OP_CLEAR */
wined3d_cs_exec_clear
,
/* 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
,
};
static
void
*
wined3d_cs_st_require_space
(
struct
wined3d_cs
*
cs
,
size_t
size
)
...
...
dlls/wined3d/device.c
View file @
07760604
...
...
@@ -2060,7 +2060,7 @@ void CDECL wined3d_device_set_scissor_rect(struct wined3d_device *device, const
return
;
}
device_invalidate_state
(
device
,
STATE_SCISSORRECT
);
wined3d_cs_emit_set_scissor_rect
(
device
->
cs
,
rect
);
}
void
CDECL
wined3d_device_get_scissor_rect
(
const
struct
wined3d_device
*
device
,
RECT
*
rect
)
...
...
@@ -4021,7 +4021,7 @@ HRESULT CDECL wined3d_device_set_render_target(struct wined3d_device *device,
state
->
scissor_rect
.
left
=
0
;
state
->
scissor_rect
.
right
=
render_target
->
resource
.
width
;
state
->
scissor_rect
.
bottom
=
render_target
->
resource
.
height
;
device_invalidate_state
(
device
,
STATE_SCISSORRECT
);
wined3d_cs_emit_set_scissor_rect
(
device
->
cs
,
&
state
->
scissor_rect
);
}
...
...
@@ -4728,7 +4728,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
state
->
scissor_rect
.
left
=
0
;
state
->
scissor_rect
.
right
=
rt
->
resource
.
width
;
state
->
scissor_rect
.
bottom
=
rt
->
resource
.
height
;
device_invalidate_state
(
device
,
STATE_SCISSORRECT
);
wined3d_cs_emit_set_scissor_rect
(
device
->
cs
,
&
state
->
scissor_rect
);
}
swapchain_update_render_to_fbo
(
swapchain
);
...
...
dlls/wined3d/wined3d_private.h
View file @
07760604
...
...
@@ -2486,6 +2486,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_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
;
/* Direct3D terminology with little modifications. We do not have an issued state
...
...
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