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
dffcc36d
Commit
dffcc36d
authored
Oct 06, 2014
by
Henri Verbeet
Committed by
Alexandre Julliard
Oct 06, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Don't abuse conv_byte_count for color-key conversions.
parent
b0ce89d8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
surface.c
dlls/wined3d/surface.c
+4
-7
No files found.
dlls/wined3d/surface.c
View file @
dffcc36d
...
...
@@ -1653,7 +1653,7 @@ static void d3dfmt_get_conv(const struct wined3d_texture *texture, BOOL need_alp
format
->
rtInternal
=
dst_format
->
rtInternal
;
format
->
glFormat
=
dst_format
->
glFormat
;
format
->
glType
=
dst_format
->
glType
;
format
->
conv_
byte_count
=
dst_format
->
byte_count
;
format
->
byte_count
=
dst_format
->
byte_count
;
}
}
...
...
@@ -4611,8 +4611,8 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
/* This code is entered for texture formats which need a fixup. */
UINT
height
=
surface
->
resource
.
height
;
/* Stick to the alignment for the converted surface too, makes it easier to load the surface */
dst_pitch
=
wi
dth
*
format
.
conv_byte_count
;
format
.
byte_count
=
format
.
conv_byte_count
;
dst_pitch
=
wi
ned3d_format_calculate_pitch
(
&
format
,
width
)
;
dst_pitch
=
(
dst_pitch
+
device
->
surface_alignment
-
1
)
&
~
(
device
->
surface_alignment
-
1
);
if
(
!
(
mem
=
HeapAlloc
(
GetProcessHeap
(),
0
,
dst_pitch
*
height
)))
...
...
@@ -4623,7 +4623,6 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
}
format
.
convert
(
data
.
addr
,
mem
,
src_pitch
,
src_pitch
*
height
,
dst_pitch
,
dst_pitch
*
height
,
width
,
height
,
1
);
format
.
byte_count
=
format
.
conv_byte_count
;
src_pitch
=
dst_pitch
;
data
.
addr
=
mem
;
}
...
...
@@ -4632,8 +4631,7 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
/* This code is only entered for color keying fixups */
UINT
height
=
surface
->
resource
.
height
;
/* Stick to the alignment for the converted surface too, makes it easier to load the surface */
dst_pitch
=
width
*
format
.
conv_byte_count
;
dst_pitch
=
wined3d_format_calculate_pitch
(
&
format
,
width
);
dst_pitch
=
(
dst_pitch
+
device
->
surface_alignment
-
1
)
&
~
(
device
->
surface_alignment
-
1
);
if
(
!
(
mem
=
HeapAlloc
(
GetProcessHeap
(),
0
,
dst_pitch
*
height
)))
...
...
@@ -4644,7 +4642,6 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface,
}
d3dfmt_convert_surface
(
data
.
addr
,
mem
,
src_pitch
,
width
,
height
,
dst_pitch
,
convert
,
surface
);
format
.
byte_count
=
format
.
conv_byte_count
;
src_pitch
=
dst_pitch
;
data
.
addr
=
mem
;
}
...
...
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