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
916bd0e4
Commit
916bd0e4
authored
May 19, 2019
by
Henri Verbeet
Committed by
Alexandre Julliard
May 20, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Use wined3d_texture_get_level_box() in texture2d_load_texture().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6cd822c3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
surface.c
dlls/wined3d/surface.c
+5
-5
No files found.
dlls/wined3d/surface.c
View file @
916bd0e4
...
...
@@ -1548,9 +1548,7 @@ BOOL texture2d_load_texture(struct wined3d_texture *texture, unsigned int sub_re
}
level
=
sub_resource_idx
%
texture
->
level_count
;
width
=
wined3d_texture_get_level_width
(
texture
,
level
);
height
=
wined3d_texture_get_level_height
(
texture
,
level
);
wined3d_box_set
(
&
src_box
,
0
,
0
,
width
,
height
,
0
,
1
);
wined3d_texture_get_level_box
(
texture
,
level
,
&
src_box
);
if
(
!
depth
&&
sub_resource
->
locations
&
(
WINED3D_LOCATION_TEXTURE_SRGB
|
WINED3D_LOCATION_TEXTURE_RGB
)
&&
(
texture
->
resource
.
format_flags
&
WINED3DFMT_FLAG_FBO_ATTACHABLE_SRGB
)
...
...
@@ -1560,7 +1558,7 @@ BOOL texture2d_load_texture(struct wined3d_texture *texture, unsigned int sub_re
{
RECT
src_rect
;
SetRect
(
&
src_rect
,
0
,
0
,
width
,
height
);
SetRect
(
&
src_rect
,
src_box
.
left
,
src_box
.
top
,
src_box
.
right
,
src_box
.
bottom
);
if
(
srgb
)
texture2d_blt_fbo
(
device
,
context
,
WINED3D_TEXF_POINT
,
texture
,
sub_resource_idx
,
WINED3D_LOCATION_TEXTURE_RGB
,
&
src_rect
,
...
...
@@ -1581,7 +1579,7 @@ BOOL texture2d_load_texture(struct wined3d_texture *texture, unsigned int sub_re
DWORD
dst_location
=
srgb
?
WINED3D_LOCATION_TEXTURE_SRGB
:
WINED3D_LOCATION_TEXTURE_RGB
;
RECT
src_rect
;
SetRect
(
&
src_rect
,
0
,
0
,
width
,
height
);
SetRect
(
&
src_rect
,
src_box
.
left
,
src_box
.
top
,
src_box
.
right
,
src_box
.
bottom
);
if
(
fbo_blitter_supported
(
WINED3D_BLIT_OP_COLOR_BLIT
,
gl_info
,
&
texture
->
resource
,
src_location
,
&
texture
->
resource
,
dst_location
))
texture2d_blt_fbo
(
device
,
context
,
WINED3D_TEXF_POINT
,
texture
,
sub_resource_idx
,
...
...
@@ -1640,6 +1638,8 @@ BOOL texture2d_load_texture(struct wined3d_texture *texture, unsigned int sub_re
wined3d_texture_get_memory
(
texture
,
sub_resource_idx
,
&
data
,
sub_resource
->
locations
);
if
(
conversion
)
{
width
=
src_box
.
right
-
src_box
.
left
;
height
=
src_box
.
bottom
-
src_box
.
top
;
wined3d_format_calculate_pitch
(
format
,
device
->
surface_alignment
,
width
,
height
,
&
dst_row_pitch
,
&
dst_slice_pitch
);
...
...
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