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
986e3eeb
Commit
986e3eeb
authored
Apr 06, 2017
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 07, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Implement partial support for 3D texture blits.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
26d7f991
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
82 additions
and
0 deletions
+82
-0
cs.c
dlls/wined3d/cs.c
+82
-0
No files found.
dlls/wined3d/cs.c
View file @
986e3eeb
...
@@ -1759,6 +1759,88 @@ static void wined3d_cs_exec_blt_sub_resource(struct wined3d_cs *cs, const void *
...
@@ -1759,6 +1759,88 @@ static void wined3d_cs_exec_blt_sub_resource(struct wined3d_cs *cs, const void *
&
src_rect
,
op
->
flags
,
&
op
->
fx
,
op
->
filter
)))
&
src_rect
,
op
->
flags
,
&
op
->
fx
,
op
->
filter
)))
FIXME
(
"Blit failed.
\n
"
);
FIXME
(
"Blit failed.
\n
"
);
}
}
else
if
(
op
->
dst_resource
->
type
==
WINED3D_RTYPE_TEXTURE_3D
)
{
struct
wined3d_texture
*
src_texture
,
*
dst_texture
;
unsigned
int
level
,
update_w
,
update_h
,
update_d
;
unsigned
int
row_pitch
,
slice_pitch
;
struct
wined3d_context
*
context
;
struct
wined3d_bo_address
addr
;
if
(
op
->
flags
)
{
FIXME
(
"Flags %#x not implemented for %s resources.
\n
"
,
op
->
flags
,
debug_d3dresourcetype
(
op
->
dst_resource
->
type
));
return
;
}
if
(
op
->
src_resource
->
format
!=
op
->
dst_resource
->
format
)
{
FIXME
(
"Format conversion not implemented for %s resources.
\n
"
,
debug_d3dresourcetype
(
op
->
dst_resource
->
type
));
return
;
}
update_w
=
op
->
dst_box
.
right
-
op
->
dst_box
.
left
;
update_h
=
op
->
dst_box
.
bottom
-
op
->
dst_box
.
top
;
update_d
=
op
->
dst_box
.
back
-
op
->
dst_box
.
front
;
if
(
op
->
src_box
.
right
-
op
->
src_box
.
left
!=
update_w
||
op
->
src_box
.
bottom
-
op
->
src_box
.
top
!=
update_h
||
op
->
src_box
.
back
-
op
->
src_box
.
front
!=
update_d
)
{
FIXME
(
"Stretching not implemented for %s resources.
\n
"
,
debug_d3dresourcetype
(
op
->
dst_resource
->
type
));
return
;
}
if
(
op
->
src_box
.
left
||
op
->
src_box
.
top
||
op
->
src_box
.
front
)
{
FIXME
(
"Source box %s not supported for %s resources.
\n
"
,
debug_box
(
&
op
->
src_box
),
debug_d3dresourcetype
(
op
->
dst_resource
->
type
));
return
;
}
dst_texture
=
texture_from_resource
(
op
->
dst_resource
);
src_texture
=
texture_from_resource
(
op
->
src_resource
);
context
=
context_acquire
(
cs
->
device
,
NULL
,
0
);
if
(
!
wined3d_texture_load_location
(
src_texture
,
op
->
src_sub_resource_idx
,
context
,
src_texture
->
resource
.
map_binding
))
{
ERR
(
"Failed to load source sub-resource into %s.
\n
"
,
wined3d_debug_location
(
src_texture
->
resource
.
map_binding
));
context_release
(
context
);
return
;
}
level
=
op
->
dst_sub_resource_idx
%
dst_texture
->
level_count
;
if
(
update_w
==
wined3d_texture_get_level_width
(
dst_texture
,
level
)
&&
update_h
==
wined3d_texture_get_level_height
(
dst_texture
,
level
)
&&
update_d
==
wined3d_texture_get_level_depth
(
dst_texture
,
level
))
{
wined3d_texture_prepare_texture
(
dst_texture
,
context
,
FALSE
);
}
else
if
(
!
wined3d_texture_load_location
(
dst_texture
,
op
->
dst_sub_resource_idx
,
context
,
WINED3D_LOCATION_TEXTURE_RGB
))
{
ERR
(
"Failed to load destination sub-resource.
\n
"
);
context_release
(
context
);
return
;
}
wined3d_texture_get_memory
(
src_texture
,
op
->
src_sub_resource_idx
,
&
addr
,
src_texture
->
resource
.
map_binding
);
wined3d_texture_get_pitch
(
src_texture
,
op
->
src_sub_resource_idx
%
src_texture
->
level_count
,
&
row_pitch
,
&
slice_pitch
);
wined3d_texture_bind_and_dirtify
(
dst_texture
,
context
,
FALSE
);
wined3d_texture_upload_data
(
dst_texture
,
op
->
dst_sub_resource_idx
,
context
,
&
op
->
dst_box
,
wined3d_const_bo_address
(
&
addr
),
row_pitch
,
slice_pitch
);
wined3d_texture_validate_location
(
dst_texture
,
op
->
dst_sub_resource_idx
,
WINED3D_LOCATION_TEXTURE_RGB
);
wined3d_texture_invalidate_location
(
dst_texture
,
op
->
dst_sub_resource_idx
,
~
WINED3D_LOCATION_TEXTURE_RGB
);
context_release
(
context
);
}
else
else
{
{
FIXME
(
"Not implemented for %s resources.
\n
"
,
debug_d3dresourcetype
(
op
->
dst_resource
->
type
));
FIXME
(
"Not implemented for %s resources.
\n
"
,
debug_d3dresourcetype
(
op
->
dst_resource
->
type
));
...
...
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