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
937eb7e6
Commit
937eb7e6
authored
Sep 15, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 15, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Move the scissor rect to wined3d_state.
parent
1ef4f075
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
17 deletions
+17
-17
device.c
dlls/wined3d/device.c
+10
-9
state.c
dlls/wined3d/state.c
+1
-1
stateblock.c
dlls/wined3d/stateblock.c
+4
-4
wined3d_private.h
dlls/wined3d/wined3d_private.h
+2
-3
No files found.
dlls/wined3d/device.c
View file @
937eb7e6
...
@@ -567,7 +567,7 @@ void device_get_draw_rect(IWineD3DDeviceImpl *device, RECT *rect)
...
@@ -567,7 +567,7 @@ void device_get_draw_rect(IWineD3DDeviceImpl *device, RECT *rect)
if
(
stateblock
->
state
.
render_states
[
WINED3DRS_SCISSORTESTENABLE
])
if
(
stateblock
->
state
.
render_states
[
WINED3DRS_SCISSORTESTENABLE
])
{
{
IntersectRect
(
rect
,
rect
,
&
stateblock
->
s
cissorR
ect
);
IntersectRect
(
rect
,
rect
,
&
stateblock
->
s
tate
.
scissor_r
ect
);
}
}
}
}
...
@@ -3138,11 +3138,12 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetScissorRect(IWineD3DDevice *iface, C
...
@@ -3138,11 +3138,12 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetScissorRect(IWineD3DDevice *iface, C
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
This
->
updateStateBlock
->
changed
.
scissorRect
=
TRUE
;
This
->
updateStateBlock
->
changed
.
scissorRect
=
TRUE
;
if
(
EqualRect
(
&
This
->
updateStateBlock
->
scissorRect
,
pRect
))
{
if
(
EqualRect
(
&
This
->
updateStateBlock
->
state
.
scissor_rect
,
pRect
))
TRACE
(
"App is setting the old scissor rectangle over, nothing to do
\n
"
);
{
TRACE
(
"App is setting the old scissor rectangle over, nothing to do.
\n
"
);
return
WINED3D_OK
;
return
WINED3D_OK
;
}
}
CopyRect
(
&
This
->
updateStateBlock
->
s
cissorR
ect
,
pRect
);
CopyRect
(
&
This
->
updateStateBlock
->
s
tate
.
scissor_r
ect
,
pRect
);
if
(
This
->
isRecordingState
)
{
if
(
This
->
isRecordingState
)
{
TRACE
(
"Recording... not performing anything
\n
"
);
TRACE
(
"Recording... not performing anything
\n
"
);
...
@@ -3157,7 +3158,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetScissorRect(IWineD3DDevice *iface, C
...
@@ -3157,7 +3158,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetScissorRect(IWineD3DDevice *iface, C
static
HRESULT
WINAPI
IWineD3DDeviceImpl_GetScissorRect
(
IWineD3DDevice
*
iface
,
RECT
*
pRect
)
{
static
HRESULT
WINAPI
IWineD3DDeviceImpl_GetScissorRect
(
IWineD3DDevice
*
iface
,
RECT
*
pRect
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
*
pRect
=
This
->
updateStateBlock
->
s
cissorR
ect
;
*
pRect
=
This
->
updateStateBlock
->
s
tate
.
scissor_r
ect
;
TRACE
(
"(%p)Returning a Scissor Rect of %d:%d-%d:%d
\n
"
,
This
,
pRect
->
left
,
pRect
->
top
,
pRect
->
right
,
pRect
->
bottom
);
TRACE
(
"(%p)Returning a Scissor Rect of %d:%d-%d:%d
\n
"
,
This
,
pRect
->
left
,
pRect
->
top
,
pRect
->
right
,
pRect
->
bottom
);
return
WINED3D_OK
;
return
WINED3D_OK
;
}
}
...
@@ -5759,10 +5760,10 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderTarget(IWineD3DDevice *iface,
...
@@ -5759,10 +5760,10 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderTarget(IWineD3DDevice *iface,
device
->
stateBlock
->
viewport
.
MinZ
=
0
.
0
f
;
device
->
stateBlock
->
viewport
.
MinZ
=
0
.
0
f
;
IWineD3DDeviceImpl_MarkStateDirty
(
device
,
STATE_VIEWPORT
);
IWineD3DDeviceImpl_MarkStateDirty
(
device
,
STATE_VIEWPORT
);
device
->
stateBlock
->
s
cissorR
ect
.
top
=
0
;
device
->
stateBlock
->
s
tate
.
scissor_r
ect
.
top
=
0
;
device
->
stateBlock
->
s
cissorR
ect
.
left
=
0
;
device
->
stateBlock
->
s
tate
.
scissor_r
ect
.
left
=
0
;
device
->
stateBlock
->
s
cissorR
ect
.
right
=
device
->
stateBlock
->
viewport
.
Width
;
device
->
stateBlock
->
s
tate
.
scissor_r
ect
.
right
=
device
->
stateBlock
->
viewport
.
Width
;
device
->
stateBlock
->
s
cissorR
ect
.
bottom
=
device
->
stateBlock
->
viewport
.
Height
;
device
->
stateBlock
->
s
tate
.
scissor_r
ect
.
bottom
=
device
->
stateBlock
->
viewport
.
Height
;
IWineD3DDeviceImpl_MarkStateDirty
(
device
,
STATE_SCISSORRECT
);
IWineD3DDeviceImpl_MarkStateDirty
(
device
,
STATE_SCISSORRECT
);
}
}
...
...
dlls/wined3d/state.c
View file @
937eb7e6
...
@@ -4880,7 +4880,7 @@ static void light(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3
...
@@ -4880,7 +4880,7 @@ static void light(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3
static
void
scissorrect
(
DWORD
state
,
IWineD3DStateBlockImpl
*
stateblock
,
struct
wined3d_context
*
context
)
static
void
scissorrect
(
DWORD
state
,
IWineD3DStateBlockImpl
*
stateblock
,
struct
wined3d_context
*
context
)
{
{
IWineD3DSurfaceImpl
*
target
=
stateblock
->
device
->
render_targets
[
0
];
IWineD3DSurfaceImpl
*
target
=
stateblock
->
device
->
render_targets
[
0
];
RECT
*
pRect
=
&
stateblock
->
s
cissorR
ect
;
RECT
*
pRect
=
&
stateblock
->
s
tate
.
scissor_r
ect
;
UINT
height
;
UINT
height
;
UINT
width
;
UINT
width
;
...
...
dlls/wined3d/stateblock.c
View file @
937eb7e6
...
@@ -755,12 +755,12 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface)
...
@@ -755,12 +755,12 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface)
This
->
viewport
=
targetStateBlock
->
viewport
;
This
->
viewport
=
targetStateBlock
->
viewport
;
}
}
if
(
This
->
changed
.
scissorRect
if
(
This
->
changed
.
scissorRect
&&
memcmp
(
&
targetStateBlock
->
state
.
scissor_rect
,
&
&
memcmp
(
&
targetStateBlock
->
scissorRect
,
&
This
->
scissorRect
,
sizeof
(
This
->
scissorR
ect
)))
&
This
->
state
.
scissor_rect
,
sizeof
(
This
->
state
.
scissor_r
ect
)))
{
{
TRACE
(
"Updating scissor rect.
\n
"
);
TRACE
(
"Updating scissor rect.
\n
"
);
This
->
s
cissorRect
=
targetStateBlock
->
scissorR
ect
;
This
->
s
tate
.
scissor_rect
=
targetStateBlock
->
state
.
scissor_r
ect
;
}
}
map
=
This
->
changed
.
streamSource
;
map
=
This
->
changed
.
streamSource
;
...
@@ -1000,7 +1000,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Apply(IWineD3DStateBlock *iface)
...
@@ -1000,7 +1000,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Apply(IWineD3DStateBlock *iface)
if
(
This
->
changed
.
scissorRect
)
if
(
This
->
changed
.
scissorRect
)
{
{
IWineD3DDevice_SetScissorRect
(
device
,
&
This
->
s
cissorR
ect
);
IWineD3DDevice_SetScissorRect
(
device
,
&
This
->
s
tate
.
scissor_r
ect
);
}
}
map
=
This
->
changed
.
streamSource
;
map
=
This
->
changed
.
streamSource
;
...
...
dlls/wined3d/wined3d_private.h
View file @
937eb7e6
...
@@ -2349,6 +2349,8 @@ struct wined3d_stream_state
...
@@ -2349,6 +2349,8 @@ struct wined3d_stream_state
struct
wined3d_state
struct
wined3d_state
{
{
RECT
scissor_rect
;
DWORD
render_states
[
WINEHIGHEST_RENDER_STATE
+
1
];
DWORD
render_states
[
WINEHIGHEST_RENDER_STATE
+
1
];
};
};
...
@@ -2425,9 +2427,6 @@ struct IWineD3DStateBlockImpl
...
@@ -2425,9 +2427,6 @@ struct IWineD3DStateBlockImpl
/* Sampler States */
/* Sampler States */
DWORD
samplerState
[
MAX_COMBINED_SAMPLERS
][
WINED3D_HIGHEST_SAMPLER_STATE
+
1
];
DWORD
samplerState
[
MAX_COMBINED_SAMPLERS
][
WINED3D_HIGHEST_SAMPLER_STATE
+
1
];
/* Scissor test rectangle */
RECT
scissorRect
;
/* Contained state management */
/* Contained state management */
DWORD
contained_render_states
[
WINEHIGHEST_RENDER_STATE
+
1
];
DWORD
contained_render_states
[
WINEHIGHEST_RENDER_STATE
+
1
];
unsigned
int
num_contained_render_states
;
unsigned
int
num_contained_render_states
;
...
...
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