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
b51a6576
Commit
b51a6576
authored
Feb 02, 2012
by
Matteo Bruni
Committed by
Alexandre Julliard
Feb 02, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Use a separate flag for discarded surfaces.
parent
fc0d21aa
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
7 deletions
+8
-7
device.c
dlls/wined3d/device.c
+1
-1
surface.c
dlls/wined3d/surface.c
+5
-5
swapchain.c
dlls/wined3d/swapchain.c
+1
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-0
No files found.
dlls/wined3d/device.c
View file @
b51a6576
...
...
@@ -4862,7 +4862,7 @@ HRESULT CDECL wined3d_device_set_depth_stencil(struct wined3d_device *device, st
if
(
device
->
swapchains
[
0
]
->
desc
.
flags
&
WINED3DPRESENTFLAG_DISCARD_DEPTHSTENCIL
||
prev
->
flags
&
SFLAG_DISCARD
)
{
surface_modify_ds_location
(
prev
,
SFLAG_
LOST
,
surface_modify_ds_location
(
prev
,
SFLAG_
DISCARDED
,
prev
->
resource
.
width
,
prev
->
resource
.
height
);
if
(
prev
==
device
->
onscreen_depth_stencil
)
{
...
...
dlls/wined3d/surface.c
View file @
b51a6576
...
...
@@ -762,7 +762,7 @@ static HRESULT surface_private_setup(struct wined3d_surface *surface)
}
if
(
surface
->
resource
.
usage
&
WINED3DUSAGE_DEPTHSTENCIL
)
surface
->
flags
|=
SFLAG_
LOST
;
surface
->
flags
|=
SFLAG_
DISCARDED
;
return
WINED3D_OK
;
}
...
...
@@ -5599,7 +5599,7 @@ void surface_modify_ds_location(struct wined3d_surface *surface,
{
TRACE
(
"surface %p, new location %#x, w %u, h %u.
\n
"
,
surface
,
location
,
w
,
h
);
if
(
location
&
~
(
SFLAG_LOCATIONS
|
SFLAG_
LOST
))
if
(
location
&
~
(
SFLAG_LOCATIONS
|
SFLAG_
DISCARDED
))
FIXME
(
"Invalid location (%#x) specified.
\n
"
,
location
);
if
(((
surface
->
flags
&
SFLAG_INTEXTURE
)
&&
!
(
location
&
SFLAG_INTEXTURE
))
...
...
@@ -5614,7 +5614,7 @@ void surface_modify_ds_location(struct wined3d_surface *surface,
surface
->
ds_current_size
.
cx
=
w
;
surface
->
ds_current_size
.
cy
=
h
;
surface
->
flags
&=
~
(
SFLAG_LOCATIONS
|
SFLAG_
LOST
);
surface
->
flags
&=
~
(
SFLAG_LOCATIONS
|
SFLAG_
DISCARDED
);
surface
->
flags
|=
location
;
}
...
...
@@ -5655,7 +5655,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
return
;
}
if
(
surface
->
flags
&
SFLAG_
LOST
)
if
(
surface
->
flags
&
SFLAG_
DISCARDED
)
{
TRACE
(
"Surface was discarded, no need copy data.
\n
"
);
switch
(
location
)
...
...
@@ -5672,7 +5672,7 @@ void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_co
default:
FIXME
(
"Unhandled location %#x
\n
"
,
location
);
}
surface
->
flags
&=
~
SFLAG_
LOST
;
surface
->
flags
&=
~
SFLAG_
DISCARDED
;
surface
->
flags
|=
location
;
surface
->
ds_current_size
.
cx
=
surface
->
resource
.
width
;
surface
->
ds_current_size
.
cy
=
surface
->
resource
.
height
;
...
...
dlls/wined3d/swapchain.c
View file @
b51a6576
...
...
@@ -668,7 +668,7 @@ static HRESULT swapchain_gl_present(struct wined3d_swapchain *swapchain, const R
if
(
swapchain
->
desc
.
flags
&
WINED3DPRESENTFLAG_DISCARD_DEPTHSTENCIL
||
fb
->
depth_stencil
->
flags
&
SFLAG_DISCARD
)
{
surface_modify_ds_location
(
fb
->
depth_stencil
,
SFLAG_
LOST
,
surface_modify_ds_location
(
fb
->
depth_stencil
,
SFLAG_
DISCARDED
,
fb
->
depth_stencil
->
resource
.
width
,
fb
->
depth_stencil
->
resource
.
height
);
if
(
fb
->
depth_stencil
==
swapchain
->
device
->
onscreen_depth_stencil
)
...
...
dlls/wined3d/wined3d_private.h
View file @
b51a6576
...
...
@@ -2155,6 +2155,7 @@ void flip_surface(struct wined3d_surface *front, struct wined3d_surface *back) D
#define SFLAG_INRB_MULTISAMPLE 0x00200000
/* The multisample renderbuffer is current. */
#define SFLAG_INRB_RESOLVED 0x00400000
/* The resolved renderbuffer is current. */
#define SFLAG_PIN_SYSMEM 0x02000000
/* Keep the surface in sysmem, at the same address. */
#define SFLAG_DISCARDED 0x04000000
/* Surface was discarded, allocating new location is enough. */
/* In some conditions the surface memory must not be freed:
* SFLAG_CONVERTED: Converting the data back would take too long
...
...
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