Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
27209c69
Commit
27209c69
authored
Apr 14, 2015
by
Stefan Dösinger
Committed by
Alexandre Julliard
Apr 15, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Call arbfp_blit_surface and ffp_blit_blit_surface through the blit interfaces.
parent
6b455e74
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
24 deletions
+23
-24
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+2
-3
surface.c
dlls/wined3d/surface.c
+17
-15
wined3d_private.h
dlls/wined3d/wined3d_private.h
+4
-6
No files found.
dlls/wined3d/arb_program_shader.c
View file @
27209c69
...
...
@@ -7870,7 +7870,7 @@ static BOOL arbfp_blit_supported(const struct wined3d_gl_info *gl_info,
}
}
HRESULT
arbfp_blit_surface
(
struct
wined3d_device
*
device
,
DWORD
filter
,
static
void
arbfp_blit_surface
(
struct
wined3d_device
*
device
,
DWORD
filter
,
struct
wined3d_surface
*
src_surface
,
const
RECT
*
src_rect_in
,
struct
wined3d_surface
*
dst_surface
,
const
RECT
*
dst_rect_in
,
const
struct
wined3d_color_key
*
color_key
)
...
...
@@ -7923,8 +7923,6 @@ HRESULT arbfp_blit_surface(struct wined3d_device *device, DWORD filter,
surface_validate_location
(
dst_surface
,
dst_surface
->
container
->
resource
.
draw_binding
);
surface_invalidate_location
(
dst_surface
,
~
dst_surface
->
container
->
resource
.
draw_binding
);
return
WINED3D_OK
;
}
static
HRESULT
arbfp_blit_color_fill
(
struct
wined3d_device
*
device
,
struct
wined3d_surface
*
dst_surface
,
...
...
@@ -7949,4 +7947,5 @@ const struct blit_shader arbfp_blit = {
arbfp_blit_supported
,
arbfp_blit_color_fill
,
arbfp_blit_depth_fill
,
arbfp_blit_surface
,
};
dlls/wined3d/surface.c
View file @
27209c69
...
...
@@ -4409,6 +4409,7 @@ const struct blit_shader ffp_blit = {
ffp_blit_supported
,
ffp_blit_color_fill
,
ffp_blit_depth_fill
,
ffp_blit_blit_surface
,
};
static
HRESULT
cpu_blit_alloc
(
struct
wined3d_device
*
device
)
...
...
@@ -5046,6 +5047,15 @@ static HRESULT cpu_blit_depth_fill(struct wined3d_device *device,
return
WINED3DERR_INVALIDCALL
;
}
static
void
cpu_blit_blit_surface
(
struct
wined3d_device
*
device
,
DWORD
filter
,
struct
wined3d_surface
*
src_surface
,
const
RECT
*
src_rect
,
struct
wined3d_surface
*
dst_surface
,
const
RECT
*
dst_rect
,
const
struct
wined3d_color_key
*
color_key
)
{
/* FIXME: Remove error returns from surface_blt_cpu. */
ERR
(
"Blit method not implemented by cpu_blit.
\n
"
);
}
const
struct
blit_shader
cpu_blit
=
{
cpu_blit_alloc
,
cpu_blit_free
,
...
...
@@ -5054,6 +5064,7 @@ const struct blit_shader cpu_blit = {
cpu_blit_supported
,
cpu_blit_color_fill
,
cpu_blit_depth_fill
,
cpu_blit_blit_surface
,
};
HRESULT
CDECL
wined3d_surface_blt
(
struct
wined3d_surface
*
dst_surface
,
const
RECT
*
dst_rect_in
,
...
...
@@ -5253,6 +5264,8 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
}
else
{
const
struct
blit_shader
*
blitter
;
/* In principle this would apply to depth blits as well, but we don't
* implement those in the CPU blitter at the moment. */
if
((
dst_surface
->
locations
&
dst_surface
->
resource
.
map_binding
)
...
...
@@ -5354,23 +5367,12 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
return
WINED3D_OK
;
}
if
(
arbfp_blit
.
blit_supported
(
&
device
->
adapter
->
gl_info
,
&
device
->
adapter
->
d3d_info
,
blit_op
,
blitter
=
wined3d_select_blitter
(
&
device
->
adapter
->
gl_info
,
&
device
->
adapter
->
d3d_info
,
blit_op
,
&
src_rect
,
src_surface
->
resource
.
usage
,
src_surface
->
resource
.
pool
,
src_surface
->
resource
.
format
,
&
dst_rect
,
dst_surface
->
resource
.
usage
,
dst_surface
->
resource
.
pool
,
dst_surface
->
resource
.
format
))
{
TRACE
(
"Using arbfp blit.
\n
"
);
if
(
SUCCEEDED
(
arbfp_blit_surface
(
device
,
filter
,
src_surface
,
&
src_rect
,
dst_surface
,
&
dst_rect
,
color_key
)))
return
WINED3D_OK
;
}
if
(
ffp_blit
.
blit_supported
(
&
device
->
adapter
->
gl_info
,
&
device
->
adapter
->
d3d_info
,
blit_op
,
&
src_rect
,
src_surface
->
resource
.
usage
,
src_surface
->
resource
.
pool
,
src_surface
->
resource
.
format
,
&
dst_rect
,
dst_surface
->
resource
.
usage
,
dst_surface
->
resource
.
pool
,
dst_surface
->
resource
.
format
))
&
dst_rect
,
dst_surface
->
resource
.
usage
,
dst_surface
->
resource
.
pool
,
dst_surface
->
resource
.
format
);
if
(
blitter
)
{
TRACE
(
"Using FFP blit.
\n
"
);
ffp_blit_blit_surface
(
device
,
filter
,
src_surface
,
&
src_rect
,
dst_surface
,
&
dst_rect
,
color_key
);
blitter
->
blit_surface
(
device
,
filter
,
src_surface
,
&
src_rect
,
dst_surface
,
&
dst_rect
,
color_key
);
return
WINED3D_OK
;
}
}
...
...
dlls/wined3d/wined3d_private.h
View file @
27209c69
...
...
@@ -1351,6 +1351,10 @@ struct blit_shader
const
RECT
*
dst_rect
,
const
struct
wined3d_color
*
color
);
HRESULT
(
*
depth_fill
)(
struct
wined3d_device
*
device
,
struct
wined3d_surface
*
surface
,
const
RECT
*
rect
,
float
depth
);
void
(
*
blit_surface
)(
struct
wined3d_device
*
device
,
DWORD
filter
,
struct
wined3d_surface
*
src_surface
,
const
RECT
*
src_rect
,
struct
wined3d_surface
*
dst_surface
,
const
RECT
*
dst_rect
,
const
struct
wined3d_color_key
*
color_key
);
};
extern
const
struct
blit_shader
ffp_blit
DECLSPEC_HIDDEN
;
...
...
@@ -1363,12 +1367,6 @@ const struct blit_shader *wined3d_select_blitter(const struct wined3d_gl_info *g
const
RECT
*
dst_rect
,
DWORD
dst_usage
,
enum
wined3d_pool
dst_pool
,
const
struct
wined3d_format
*
dst_format
)
DECLSPEC_HIDDEN
;
/* Temporary blit_shader helper functions */
HRESULT
arbfp_blit_surface
(
struct
wined3d_device
*
device
,
DWORD
filter
,
struct
wined3d_surface
*
src_surface
,
const
RECT
*
src_rect
,
struct
wined3d_surface
*
dst_surface
,
const
RECT
*
dst_rect
,
const
struct
wined3d_color_key
*
color_key
)
DECLSPEC_HIDDEN
;
struct
wined3d_context
*
context_acquire
(
const
struct
wined3d_device
*
device
,
struct
wined3d_surface
*
target
)
DECLSPEC_HIDDEN
;
void
context_alloc_event_query
(
struct
wined3d_context
*
context
,
...
...
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