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
b7496eba
Commit
b7496eba
authored
Jan 29, 2018
by
Henri Verbeet
Committed by
Alexandre Julliard
Jan 29, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Use the resource access flags in ffp_blit_supported().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
36f20ec5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
12 deletions
+11
-12
surface.c
dlls/wined3d/surface.c
+11
-12
No files found.
dlls/wined3d/surface.c
View file @
b7496eba
...
...
@@ -2664,18 +2664,19 @@ static void ffp_blitter_destroy(struct wined3d_blitter *blitter, struct wined3d_
HeapFree
(
GetProcessHeap
(),
0
,
blitter
);
}
static
BOOL
ffp_blit_supported
(
const
struct
wined3d_gl_info
*
gl_info
,
const
struct
wined3d_d3d_info
*
d3d_info
,
enum
wined3d_blit_op
blit_op
,
DWORD
src_usage
,
enum
wined3d_pool
src_pool
,
const
struct
wined3d_format
*
src_format
,
DWORD
src_location
,
DWORD
dst_usage
,
enum
wined3d_pool
dst_pool
,
const
struct
wined3d_format
*
dst_format
,
DWORD
dst_location
)
static
BOOL
ffp_blit_supported
(
enum
wined3d_blit_op
blit_op
,
const
struct
wined3d_context
*
context
,
const
struct
wined3d_resource
*
src_resource
,
DWORD
src_location
,
const
struct
wined3d_resource
*
dst_resource
,
DWORD
dst_location
)
{
const
struct
wined3d_format
*
src_format
=
src_resource
->
format
;
const
struct
wined3d_format
*
dst_format
=
dst_resource
->
format
;
BOOL
decompress
;
decompress
=
src_format
&&
(
src_format
->
flags
[
WINED3D_GL_RES_TYPE_TEX_2D
]
&
WINED3DFMT_FLAG_COMPRESSED
)
&&
!
(
dst_format
->
flags
[
WINED3D_GL_RES_TYPE_TEX_2D
]
&
WINED3DFMT_FLAG_COMPRESSED
);
if
(
!
decompress
&&
(
src_pool
==
WINED3D_POOL_SYSTEM_MEM
||
dst_pool
==
WINED3D_POOL_SYSTEM_MEM
))
if
(
!
decompress
&&
!
(
src_resource
->
access
&
dst_resource
->
access
&
WINED3D_RESOURCE_ACCESS_GPU
))
{
TRACE
(
"Source or destination
is in system memory
.
\n
"
);
TRACE
(
"Source or destination
resource is not GPU accessible
.
\n
"
);
return
FALSE
;
}
...
...
@@ -2690,14 +2691,14 @@ static BOOL ffp_blit_supported(const struct wined3d_gl_info *gl_info,
switch
(
blit_op
)
{
case
WINED3D_BLIT_OP_COLOR_BLIT_CKEY
:
if
(
d3d_info
->
shader_color_key
)
if
(
context
->
d3d_info
->
shader_color_key
)
{
TRACE
(
"Color keying requires converted textures.
\n
"
);
return
FALSE
;
}
case
WINED3D_BLIT_OP_COLOR_BLIT
:
case
WINED3D_BLIT_OP_COLOR_BLIT_ALPHATEST
:
if
(
!
gl_info
->
supported
[
WINED3D_GL_LEGACY_CONTEXT
])
if
(
!
context
->
gl_info
->
supported
[
WINED3D_GL_LEGACY_CONTEXT
])
return
FALSE
;
if
(
TRACE_ON
(
d3d
))
...
...
@@ -2722,7 +2723,7 @@ static BOOL ffp_blit_supported(const struct wined3d_gl_info *gl_info,
}
}
if
(
!
(
dst_usage
&
WINED3DUSAGE_RENDERTARGET
))
if
(
!
(
dst_
resource
->
usage
&
WINED3DUSAGE_RENDERTARGET
))
{
TRACE
(
"Can only blit to render targets.
\n
"
);
return
FALSE
;
...
...
@@ -2821,9 +2822,7 @@ static DWORD ffp_blitter_blit(struct wined3d_blitter *blitter, enum wined3d_blit
dst_resource
=
&
dst_texture
->
resource
;
device
=
dst_resource
->
device
;
if
(
!
ffp_blit_supported
(
&
device
->
adapter
->
gl_info
,
&
device
->
adapter
->
d3d_info
,
op
,
src_resource
->
usage
,
src_resource
->
pool
,
src_resource
->
format
,
src_location
,
dst_resource
->
usage
,
dst_resource
->
pool
,
dst_resource
->
format
,
dst_location
))
if
(
!
ffp_blit_supported
(
op
,
context
,
src_resource
,
src_location
,
dst_resource
,
dst_location
))
{
if
((
next
=
blitter
->
next
))
return
next
->
ops
->
blitter_blit
(
next
,
op
,
context
,
src_surface
,
src_location
,
...
...
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