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
32b4aa7b
Commit
32b4aa7b
authored
Apr 27, 2022
by
Stefan Dösinger
Committed by
Alexandre Julliard
May 31, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Prepare sysmem LOCATION_CLEARED handling for non-zero colors.
Signed-off-by:
Stefan Dösinger
<
stefan@codeweavers.com
>
parent
e1386f7b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
texture.c
dlls/wined3d/texture.c
+12
-4
No files found.
dlls/wined3d/texture.c
View file @
32b4aa7b
...
...
@@ -815,7 +815,6 @@ BOOL wined3d_texture_load_location(struct wined3d_texture *texture,
{
struct
wined3d_bo_address
source
,
destination
;
struct
wined3d_range
range
;
void
*
map_ptr
;
if
(
!
wined3d_texture_prepare_location
(
texture
,
sub_resource_idx
,
context
,
location
))
return
FALSE
;
...
...
@@ -824,12 +823,21 @@ BOOL wined3d_texture_load_location(struct wined3d_texture *texture,
range
.
size
=
texture
->
sub_resources
[
sub_resource_idx
].
size
;
if
(
current
&
WINED3D_LOCATION_CLEARED
)
{
static
const
struct
wined3d_color
black
;
unsigned
int
level_idx
=
sub_resource_idx
%
texture
->
level_count
;
struct
wined3d_map_desc
map
;
struct
wined3d_box
box
;
wined3d_texture_get_pitch
(
texture
,
level_idx
,
&
map
.
row_pitch
,
&
map
.
slice_pitch
);
if
(
destination
.
buffer_object
)
map
_ptr
=
wined3d_context_map_bo_address
(
context
,
&
destination
,
range
.
size
,
map
.
data
=
wined3d_context_map_bo_address
(
context
,
&
destination
,
range
.
size
,
WINED3D_MAP_WRITE
|
WINED3D_MAP_DISCARD
);
else
map_ptr
=
destination
.
addr
;
memset
(
map_ptr
,
0
,
range
.
size
);
map
.
data
=
destination
.
addr
;
wined3d_texture_get_level_box
(
texture
,
level_idx
,
&
box
);
wined3d_resource_memory_colour_fill
(
&
texture
->
resource
,
&
map
,
&
black
,
&
box
,
true
);
if
(
destination
.
buffer_object
)
wined3d_context_unmap_bo_address
(
context
,
&
destination
,
1
,
&
range
);
}
...
...
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