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
1424e7fd
Commit
1424e7fd
authored
Jan 27, 2008
by
Stefan Dösinger
Committed by
Alexandre Julliard
Feb 05, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Make Clear aware of the depth stencil sharing.
parent
451d85a7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
1 deletion
+24
-1
device.c
dlls/wined3d/device.c
+21
-0
drawprim.c
dlls/wined3d/drawprim.c
+1
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+2
-0
No files found.
dlls/wined3d/device.c
View file @
1424e7fd
...
...
@@ -4800,6 +4800,7 @@ HRESULT IWineD3DDeviceImpl_ClearSurface(IWineD3DDeviceImpl *This, IWineD3DSurfa
RECT
vp_rect
;
WINED3DVIEWPORT
*
vp
=
&
This
->
stateBlock
->
viewport
;
UINT
drawable_width
,
drawable_height
;
IWineD3DSurfaceImpl
*
depth_stencil
=
(
IWineD3DSurfaceImpl
*
)
This
->
stencilBufferTarget
;
/* When we're clearing parts of the drawable, make sure that the target surface is well up to date in the
* drawable. After the clear we'll mark the drawable up to date, so we have to make sure that this is true
...
...
@@ -4858,6 +4859,26 @@ HRESULT IWineD3DDeviceImpl_ClearSurface(IWineD3DDeviceImpl *This, IWineD3DSurfa
checkGLcall
(
"glClearDepth"
);
glMask
=
glMask
|
GL_DEPTH_BUFFER_BIT
;
IWineD3DDeviceImpl_MarkStateDirty
(
This
,
STATE_RENDER
(
WINED3DRS_ZWRITEENABLE
));
if
(
This
->
depth_copy_state
==
WINED3D_DCS_COPY
)
{
if
(
vp
->
X
!=
0
||
vp
->
Y
!=
0
||
vp
->
Width
<
depth_stencil
->
currentDesc
.
Width
||
vp
->
Height
<
depth_stencil
->
currentDesc
.
Height
)
{
depth_copy
((
IWineD3DDevice
*
)
This
);
}
else
if
(
This
->
stateBlock
->
renderState
[
WINED3DRS_SCISSORTESTENABLE
]
&&
(
This
->
stateBlock
->
scissorRect
.
left
>
0
||
This
->
stateBlock
->
scissorRect
.
top
>
0
||
This
->
stateBlock
->
scissorRect
.
right
<
depth_stencil
->
currentDesc
.
Width
||
This
->
stateBlock
->
scissorRect
.
bottom
<
depth_stencil
->
currentDesc
.
Height
))
{
depth_copy
((
IWineD3DDevice
*
)
This
);
}
else
if
(
Count
>
0
&&
pRects
&&
(
pRects
[
0
].
x1
>
0
||
pRects
[
0
].
y1
>
0
||
pRects
[
0
].
x2
<
depth_stencil
->
currentDesc
.
Width
||
pRects
[
0
].
y2
<
depth_stencil
->
currentDesc
.
Height
))
{
depth_copy
((
IWineD3DDevice
*
)
This
);
}
}
This
->
depth_copy_state
=
WINED3D_DCS_INITIAL
;
}
if
(
Flags
&
WINED3DCLEAR_TARGET
)
{
...
...
dlls/wined3d/drawprim.c
View file @
1424e7fd
...
...
@@ -757,7 +757,7 @@ static void depth_blt(IWineD3DDevice *iface, GLuint texture) {
This
->
shader_backend
->
shader_select
(
iface
,
use_ps
(
This
),
use_vs
(
This
));
}
static
void
depth_copy
(
IWineD3DDevice
*
iface
)
{
void
depth_copy
(
IWineD3DDevice
*
iface
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
IWineD3DSurfaceImpl
*
depth_stencil
=
(
IWineD3DSurfaceImpl
*
)
This
->
auto_depth_stencil_buffer
;
...
...
dlls/wined3d/wined3d_private.h
View file @
1424e7fd
...
...
@@ -411,6 +411,8 @@ extern glAttribFunc normal_funcs[WINED3DDECLTYPE_UNUSED];
#define GET_TEXCOORD_SIZE_FROM_FVF(d3dvtVertexType, tex_num) \
(((((d3dvtVertexType) >> (16 + (2 * (tex_num)))) + 1) & 0x03) + 1)
void
depth_copy
(
IWineD3DDevice
*
iface
);
/* Routines and structures related to state management */
typedef
struct
WineD3DContext
WineD3DContext
;
typedef
void
(
*
APPLYSTATEFUNC
)(
DWORD
state
,
IWineD3DStateBlockImpl
*
stateblock
,
WineD3DContext
*
ctx
);
...
...
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