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
d6ef8b07
Commit
d6ef8b07
authored
Apr 24, 2020
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 24, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Introduce a Vulkan GPU blitter.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0aee4d9a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
82 additions
and
0 deletions
+82
-0
adapter_vk.c
dlls/wined3d/adapter_vk.c
+1
-0
texture.c
dlls/wined3d/texture.c
+80
-0
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-0
No files found.
dlls/wined3d/adapter_vk.c
View file @
d6ef8b07
...
...
@@ -675,6 +675,7 @@ static HRESULT adapter_vk_init_3d(struct wined3d_device *device)
wined3d_context_vk_cleanup
(
context_vk
);
return
E_FAIL
;
}
wined3d_vk_blitter_create
(
&
device_vk
->
d
.
blitter
);
wined3d_device_create_default_samplers
(
device
,
&
context_vk
->
c
);
...
...
dlls/wined3d/texture.c
View file @
d6ef8b07
...
...
@@ -5725,3 +5725,83 @@ void wined3d_raw_blitter_create(struct wined3d_blitter **next, const struct wine
blitter
->
next
=
*
next
;
*
next
=
blitter
;
}
static
void
vk_blitter_destroy
(
struct
wined3d_blitter
*
blitter
,
struct
wined3d_context
*
context
)
{
struct
wined3d_blitter
*
next
;
TRACE
(
"blitter %p, context %p.
\n
"
,
blitter
,
context
);
if
((
next
=
blitter
->
next
))
next
->
ops
->
blitter_destroy
(
next
,
context
);
heap_free
(
blitter
);
}
static
void
vk_blitter_clear
(
struct
wined3d_blitter
*
blitter
,
struct
wined3d_device
*
device
,
unsigned
int
rt_count
,
const
struct
wined3d_fb_state
*
fb
,
unsigned
int
rect_count
,
const
RECT
*
clear_rects
,
const
RECT
*
draw_rect
,
DWORD
flags
,
const
struct
wined3d_color
*
colour
,
float
depth
,
DWORD
stencil
)
{
struct
wined3d_blitter
*
next
;
TRACE
(
"blitter %p, device %p, rt_count %u, fb %p, rect_count %u, clear_rects %p, "
"draw_rect %s, flags %#x, colour %s, depth %.8e, stencil %#x.
\n
"
,
blitter
,
device
,
rt_count
,
fb
,
rect_count
,
clear_rects
,
wine_dbgstr_rect
(
draw_rect
),
flags
,
debug_color
(
colour
),
depth
,
stencil
);
if
(
!
(
next
=
blitter
->
next
))
{
ERR
(
"No blitter to handle clear.
\n
"
);
return
;
}
TRACE
(
"Forwarding to blitter %p.
\n
"
,
next
);
next
->
ops
->
blitter_clear
(
next
,
device
,
rt_count
,
fb
,
rect_count
,
clear_rects
,
draw_rect
,
flags
,
colour
,
depth
,
stencil
);
}
static
DWORD
vk_blitter_blit
(
struct
wined3d_blitter
*
blitter
,
enum
wined3d_blit_op
op
,
struct
wined3d_context
*
context
,
struct
wined3d_texture
*
src_texture
,
unsigned
int
src_sub_resource_idx
,
DWORD
src_location
,
const
RECT
*
src_rect
,
struct
wined3d_texture
*
dst_texture
,
unsigned
int
dst_sub_resource_idx
,
DWORD
dst_location
,
const
RECT
*
dst_rect
,
const
struct
wined3d_color_key
*
colour_key
,
enum
wined3d_texture_filter_type
filter
)
{
struct
wined3d_blitter
*
next
;
TRACE
(
"blitter %p, op %#x, context %p, src_texture %p, src_sub_resource_idx %u, src_location %s, src_rect %s, "
"dst_texture %p, dst_sub_resource_idx %u, dst_location %s, dst_rect %s, colour_key %p, filter %s.
\n
"
,
blitter
,
op
,
context
,
src_texture
,
src_sub_resource_idx
,
wined3d_debug_location
(
src_location
),
wine_dbgstr_rect
(
src_rect
),
dst_texture
,
dst_sub_resource_idx
,
wined3d_debug_location
(
dst_location
),
wine_dbgstr_rect
(
dst_rect
),
colour_key
,
debug_d3dtexturefiltertype
(
filter
));
if
(
!
(
next
=
blitter
->
next
))
{
ERR
(
"No blitter to handle blit op %#x.
\n
"
,
op
);
return
dst_location
;
}
TRACE
(
"Forwarding to blitter %p.
\n
"
,
next
);
return
next
->
ops
->
blitter_blit
(
next
,
op
,
context
,
src_texture
,
src_sub_resource_idx
,
src_location
,
src_rect
,
dst_texture
,
dst_sub_resource_idx
,
dst_location
,
dst_rect
,
colour_key
,
filter
);
}
static
const
struct
wined3d_blitter_ops
vk_blitter_ops
=
{
.
blitter_destroy
=
vk_blitter_destroy
,
.
blitter_clear
=
vk_blitter_clear
,
.
blitter_blit
=
vk_blitter_blit
,
};
void
wined3d_vk_blitter_create
(
struct
wined3d_blitter
**
next
)
{
struct
wined3d_blitter
*
blitter
;
if
(
!
(
blitter
=
heap_alloc
(
sizeof
(
*
blitter
))))
return
;
TRACE
(
"Created blitter %p.
\n
"
,
blitter
);
blitter
->
ops
=
&
vk_blitter_ops
;
blitter
->
next
=
*
next
;
*
next
=
blitter
;
}
dlls/wined3d/wined3d_private.h
View file @
d6ef8b07
...
...
@@ -2436,6 +2436,7 @@ struct wined3d_blitter *wined3d_glsl_blitter_create(struct wined3d_blitter **nex
const
struct
wined3d_device
*
device
)
DECLSPEC_HIDDEN
;
void
wined3d_raw_blitter_create
(
struct
wined3d_blitter
**
next
,
const
struct
wined3d_gl_info
*
gl_info
)
DECLSPEC_HIDDEN
;
void
wined3d_vk_blitter_create
(
struct
wined3d_blitter
**
next
)
DECLSPEC_HIDDEN
;
BOOL
wined3d_clip_blit
(
const
RECT
*
clip_rect
,
RECT
*
clipped
,
RECT
*
other
)
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