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
d8f2d0c7
Commit
d8f2d0c7
authored
Mar 28, 2016
by
Henri Verbeet
Committed by
Alexandre Julliard
Mar 29, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Get resource info from the texture in surface_load_location().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8eeeb4d1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
surface.c
dlls/wined3d/surface.c
+6
-5
No files found.
dlls/wined3d/surface.c
View file @
d8f2d0c7
...
@@ -3239,11 +3239,12 @@ static void surface_load_renderbuffer(struct wined3d_surface *surface, struct wi
...
@@ -3239,11 +3239,12 @@ static void surface_load_renderbuffer(struct wined3d_surface *surface, struct wi
/* Context activation is done by the caller. Context may be NULL in ddraw-only mode. */
/* Context activation is done by the caller. Context may be NULL in ddraw-only mode. */
HRESULT
surface_load_location
(
struct
wined3d_surface
*
surface
,
struct
wined3d_context
*
context
,
DWORD
location
)
HRESULT
surface_load_location
(
struct
wined3d_surface
*
surface
,
struct
wined3d_context
*
context
,
DWORD
location
)
{
{
struct
wined3d_texture
*
texture
=
surface
->
container
;
HRESULT
hr
;
HRESULT
hr
;
TRACE
(
"surface %p, location %s.
\n
"
,
surface
,
wined3d_debug_location
(
location
));
TRACE
(
"surface %p, location %s.
\n
"
,
surface
,
wined3d_debug_location
(
location
));
if
(
surface
->
locations
&
location
&&
(
!
(
surfac
e
->
resource
.
usage
&
WINED3DUSAGE_DEPTHSTENCIL
)
if
(
surface
->
locations
&
location
&&
(
!
(
textur
e
->
resource
.
usage
&
WINED3DUSAGE_DEPTHSTENCIL
)
||
(
surface
->
ds_current_size
.
cx
==
surface
->
resource
.
width
||
(
surface
->
ds_current_size
.
cx
==
surface
->
resource
.
width
&&
surface
->
ds_current_size
.
cy
==
surface
->
resource
.
height
)))
&&
surface
->
ds_current_size
.
cy
==
surface
->
resource
.
height
)))
{
{
...
@@ -3254,9 +3255,9 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
...
@@ -3254,9 +3255,9 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
if
(
WARN_ON
(
d3d_surface
))
if
(
WARN_ON
(
d3d_surface
))
{
{
DWORD
required_access
=
resource_access_from_location
(
location
);
DWORD
required_access
=
resource_access_from_location
(
location
);
if
((
surfac
e
->
resource
.
access_flags
&
required_access
)
!=
required_access
)
if
((
textur
e
->
resource
.
access_flags
&
required_access
)
!=
required_access
)
WARN
(
"Operation requires %#x access, but surface only has %#x.
\n
"
,
WARN
(
"Operation requires %#x access, but surface only has %#x.
\n
"
,
required_access
,
surfac
e
->
resource
.
access_flags
);
required_access
,
textur
e
->
resource
.
access_flags
);
}
}
if
(
surface
->
locations
&
WINED3D_LOCATION_DISCARDED
)
if
(
surface
->
locations
&
WINED3D_LOCATION_DISCARDED
)
...
@@ -3275,7 +3276,7 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
...
@@ -3275,7 +3276,7 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
return
surface_load_location
(
surface
,
context
,
location
);
return
surface_load_location
(
surface
,
context
,
location
);
}
}
if
(
surfac
e
->
resource
.
usage
&
WINED3DUSAGE_DEPTHSTENCIL
)
if
(
textur
e
->
resource
.
usage
&
WINED3DUSAGE_DEPTHSTENCIL
)
{
{
if
((
location
==
WINED3D_LOCATION_TEXTURE_RGB
&&
surface
->
locations
&
WINED3D_LOCATION_DRAWABLE
)
if
((
location
==
WINED3D_LOCATION_TEXTURE_RGB
&&
surface
->
locations
&
WINED3D_LOCATION_DRAWABLE
)
||
(
location
==
WINED3D_LOCATION_DRAWABLE
&&
surface
->
locations
&
WINED3D_LOCATION_TEXTURE_RGB
))
||
(
location
==
WINED3D_LOCATION_DRAWABLE
&&
surface
->
locations
&
WINED3D_LOCATION_TEXTURE_RGB
))
...
@@ -3323,7 +3324,7 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
...
@@ -3323,7 +3324,7 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
done:
done:
surface_validate_location
(
surface
,
location
);
surface_validate_location
(
surface
,
location
);
if
(
surfac
e
->
resource
.
usage
&
WINED3DUSAGE_DEPTHSTENCIL
)
if
(
textur
e
->
resource
.
usage
&
WINED3DUSAGE_DEPTHSTENCIL
)
{
{
surface
->
ds_current_size
.
cx
=
surface
->
resource
.
width
;
surface
->
ds_current_size
.
cx
=
surface
->
resource
.
width
;
surface
->
ds_current_size
.
cy
=
surface
->
resource
.
height
;
surface
->
ds_current_size
.
cy
=
surface
->
resource
.
height
;
...
...
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