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
efb3993a
Commit
efb3993a
authored
Apr 18, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 19, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Simply pass an IWineD3DSurfaceImpl pointer to surface_modify_ds_location().
parent
ae46589f
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
15 deletions
+13
-15
device.c
dlls/wined3d/device.c
+3
-3
drawprim.c
dlls/wined3d/drawprim.c
+1
-1
surface.c
dlls/wined3d/surface.c
+7
-9
swapchain.c
dlls/wined3d/swapchain.c
+1
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
No files found.
dlls/wined3d/device.c
View file @
efb3993a
...
...
@@ -4513,7 +4513,7 @@ HRESULT IWineD3DDeviceImpl_ClearSurface(IWineD3DDeviceImpl *This, IWineD3DSurfac
if
(
Flags
&
WINED3DCLEAR_ZBUFFER
)
{
/* Note that WINED3DCLEAR_ZBUFFER implies a depth stencil exists on the device */
DWORD
location
=
context
->
render_offscreen
?
SFLAG_DS_OFFSCREEN
:
SFLAG_DS_ONSCREEN
;
surface_modify_ds_location
(
This
->
stencilBufferTarget
,
location
);
surface_modify_ds_location
(
depth_stencil
,
location
);
}
LEAVE_GL
();
...
...
@@ -5920,11 +5920,11 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetDepthStencilSurface(IWineD3DDevice *
if
(
This
->
stencilBufferTarget
)
{
if
(((
IWineD3DSwapChainImpl
*
)
This
->
swapchains
[
0
])
->
presentParms
.
Flags
&
WINED3DPRESENTFLAG_DISCARD_DEPTHSTENCIL
||
((
IWineD3DSurfaceImpl
*
)
This
->
stencilBufferTarget
)
->
Flags
&
SFLAG_DISCARD
)
{
surface_modify_ds_location
(
This
->
stencilBufferTarget
,
SFLAG_DS_DISCARDED
);
surface_modify_ds_location
(
(
IWineD3DSurfaceImpl
*
)
This
->
stencilBufferTarget
,
SFLAG_DS_DISCARDED
);
}
else
{
struct
wined3d_context
*
context
=
context_acquire
(
This
,
This
->
render_targets
[
0
],
CTXUSAGE_RESOURCELOAD
);
surface_load_ds_location
((
IWineD3DSurfaceImpl
*
)
This
->
stencilBufferTarget
,
context
,
SFLAG_DS_OFFSCREEN
);
surface_modify_ds_location
(
This
->
stencilBufferTarget
,
SFLAG_DS_OFFSCREEN
);
surface_modify_ds_location
(
(
IWineD3DSurfaceImpl
*
)
This
->
stencilBufferTarget
,
SFLAG_DS_OFFSCREEN
);
context_release
(
context
);
}
}
...
...
dlls/wined3d/drawprim.c
View file @
efb3993a
...
...
@@ -614,7 +614,7 @@ void drawPrimitive(IWineD3DDevice *iface, UINT index_count, UINT StartIdx, UINT
||
This
->
stateBlock
->
renderState
[
WINED3DRS_ZENABLE
])
surface_load_ds_location
((
IWineD3DSurfaceImpl
*
)
This
->
stencilBufferTarget
,
context
,
location
);
if
(
This
->
stateBlock
->
renderState
[
WINED3DRS_ZWRITEENABLE
])
surface_modify_ds_location
(
This
->
stencilBufferTarget
,
location
);
surface_modify_ds_location
(
(
IWineD3DSurfaceImpl
*
)
This
->
stencilBufferTarget
,
location
);
}
/* Ok, we will be updating the screen from here onwards so grab the lock */
...
...
dlls/wined3d/surface.c
View file @
efb3993a
...
...
@@ -4054,17 +4054,15 @@ static void surface_depth_blt(IWineD3DSurfaceImpl *This, const struct wined3d_gl
device
->
shader_backend
->
shader_deselect_depth_blt
((
IWineD3DDevice
*
)
device
);
}
void
surface_modify_ds_location
(
IWineD3DSurface
*
iface
,
DWORD
location
)
{
IWineD3DSurfaceImpl
*
This
=
(
IWineD3DSurfaceImpl
*
)
iface
;
TRACE
(
"(%p) New location %#x
\n
"
,
This
,
location
);
void
surface_modify_ds_location
(
IWineD3DSurfaceImpl
*
surface
,
DWORD
location
)
{
TRACE
(
"surface %p, new location %#x.
\n
"
,
surface
,
location
);
if
(
location
&
~
SFLAG_DS_LOCATIONS
)
{
FIXME
(
"(%p) Invalid location (%#x) specified
\n
"
,
This
,
location
);
}
if
(
location
&
~
SFLAG_DS_LOCATIONS
)
FIXME
(
"Invalid location (%#x) specified.
\n
"
,
location
);
This
->
Flags
&=
~
SFLAG_DS_LOCATIONS
;
This
->
Flags
|=
location
;
surface
->
Flags
&=
~
SFLAG_DS_LOCATIONS
;
surface
->
Flags
|=
location
;
}
/* Context activation is done by the caller. */
...
...
dlls/wined3d/swapchain.c
View file @
efb3993a
...
...
@@ -464,7 +464,7 @@ static HRESULT WINAPI IWineD3DSwapChainImpl_Present(IWineD3DSwapChain *iface, CO
if
(
This
->
presentParms
.
Flags
&
WINED3DPRESENTFLAG_DISCARD_DEPTHSTENCIL
||
((
IWineD3DSurfaceImpl
*
)
This
->
device
->
stencilBufferTarget
)
->
Flags
&
SFLAG_DISCARD
)
{
surface_modify_ds_location
(
This
->
device
->
stencilBufferTarget
,
SFLAG_DS_DISCARDED
);
surface_modify_ds_location
(
(
IWineD3DSurfaceImpl
*
)
This
->
device
->
stencilBufferTarget
,
SFLAG_DS_DISCARDED
);
}
}
...
...
dlls/wined3d/wined3d_private.h
View file @
efb3993a
...
...
@@ -2679,7 +2679,7 @@ void surface_add_dirty_rect(IWineD3DSurface *iface, const RECT *dirty_rect) DECL
GLenum
surface_get_gl_buffer
(
IWineD3DSurface
*
iface
)
DECLSPEC_HIDDEN
;
void
surface_load_ds_location
(
IWineD3DSurfaceImpl
*
surface
,
struct
wined3d_context
*
context
,
DWORD
location
)
DECLSPEC_HIDDEN
;
void
surface_modify_ds_location
(
IWineD3DSurface
*
i
face
,
DWORD
location
)
DECLSPEC_HIDDEN
;
void
surface_modify_ds_location
(
IWineD3DSurface
Impl
*
sur
face
,
DWORD
location
)
DECLSPEC_HIDDEN
;
void
surface_set_compatible_renderbuffer
(
IWineD3DSurface
*
iface
,
unsigned
int
width
,
unsigned
int
height
)
DECLSPEC_HIDDEN
;
void
surface_set_texture_name
(
IWineD3DSurface
*
iface
,
GLuint
name
,
BOOL
srgb_name
)
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