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
19470fc8
Commit
19470fc8
authored
Jun 18, 2019
by
Henri Verbeet
Committed by
Alexandre Julliard
Jun 18, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Use wined3d_texture_gl_load_sysmem() in texture3d_load_location().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
578e7cd5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
43 deletions
+4
-43
texture.c
dlls/wined3d/texture.c
+4
-43
No files found.
dlls/wined3d/texture.c
View file @
19470fc8
...
...
@@ -3266,6 +3266,7 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in
struct
wined3d_context
*
context
,
DWORD
location
)
{
struct
wined3d_texture_sub_resource
*
sub_resource
=
&
texture
->
sub_resources
[
sub_resource_idx
];
struct
wined3d_texture_gl
*
texture_gl
=
wined3d_texture_gl
(
texture
);
struct
wined3d_context_gl
*
context_gl
=
wined3d_context_gl
(
context
);
unsigned
int
row_pitch
,
slice_pitch
;
...
...
@@ -3282,8 +3283,7 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in
struct
wined3d_box
src_box
;
data
.
addr
+=
sub_resource
->
offset
;
wined3d_texture_gl_bind_and_dirtify
(
wined3d_texture_gl
(
texture
),
context_gl
,
location
==
WINED3D_LOCATION_TEXTURE_SRGB
);
wined3d_texture_gl_bind_and_dirtify
(
texture_gl
,
context_gl
,
location
==
WINED3D_LOCATION_TEXTURE_SRGB
);
wined3d_texture_get_pitch
(
texture
,
sub_resource_idx
,
&
row_pitch
,
&
slice_pitch
);
wined3d_texture_get_level_box
(
texture
,
sub_resource_idx
%
texture
->
level_count
,
&
src_box
);
wined3d_texture_upload_data
(
texture
,
sub_resource_idx
,
context
,
texture
->
resource
.
format
,
...
...
@@ -3294,8 +3294,7 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in
struct
wined3d_const_bo_address
data
=
{
sub_resource
->
buffer_object
,
NULL
};
struct
wined3d_box
src_box
;
wined3d_texture_gl_bind_and_dirtify
(
wined3d_texture_gl
(
texture
),
context_gl
,
location
==
WINED3D_LOCATION_TEXTURE_SRGB
);
wined3d_texture_gl_bind_and_dirtify
(
texture_gl
,
context_gl
,
location
==
WINED3D_LOCATION_TEXTURE_SRGB
);
wined3d_texture_get_pitch
(
texture
,
sub_resource_idx
,
&
row_pitch
,
&
slice_pitch
);
wined3d_texture_get_level_box
(
texture
,
sub_resource_idx
%
texture
->
level_count
,
&
src_box
);
wined3d_texture_upload_data
(
texture
,
sub_resource_idx
,
context
,
texture
->
resource
.
format
,
...
...
@@ -3317,46 +3316,8 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in
break
;
case
WINED3D_LOCATION_SYSMEM
:
if
(
sub_resource
->
locations
&
(
WINED3D_LOCATION_TEXTURE_RGB
|
WINED3D_LOCATION_TEXTURE_SRGB
))
{
struct
wined3d_bo_address
data
=
{
0
,
texture
->
resource
.
heap_memory
};
data
.
addr
+=
sub_resource
->
offset
;
if
(
sub_resource
->
locations
&
WINED3D_LOCATION_TEXTURE_RGB
)
wined3d_texture_gl_bind_and_dirtify
(
wined3d_texture_gl
(
texture
),
context_gl
,
FALSE
);
else
wined3d_texture_gl_bind_and_dirtify
(
wined3d_texture_gl
(
texture
),
context_gl
,
TRUE
);
wined3d_texture_download_data
(
texture
,
sub_resource_idx
,
context
,
&
data
);
++
texture
->
download_count
;
}
else
{
FIXME
(
"Implement WINED3D_LOCATION_SYSMEM loading from %s.
\n
"
,
wined3d_debug_location
(
sub_resource
->
locations
));
return
FALSE
;
}
break
;
case
WINED3D_LOCATION_BUFFER
:
if
(
sub_resource
->
locations
&
(
WINED3D_LOCATION_TEXTURE_RGB
|
WINED3D_LOCATION_TEXTURE_SRGB
))
{
struct
wined3d_bo_address
data
=
{
sub_resource
->
buffer_object
,
NULL
};
if
(
sub_resource
->
locations
&
WINED3D_LOCATION_TEXTURE_RGB
)
wined3d_texture_gl_bind_and_dirtify
(
wined3d_texture_gl
(
texture
),
context_gl
,
FALSE
);
else
wined3d_texture_gl_bind_and_dirtify
(
wined3d_texture_gl
(
texture
),
context_gl
,
TRUE
);
wined3d_texture_download_data
(
texture
,
sub_resource_idx
,
context
,
&
data
);
}
else
{
FIXME
(
"Implement WINED3D_LOCATION_BUFFER loading from %s.
\n
"
,
wined3d_debug_location
(
sub_resource
->
locations
));
return
FALSE
;
}
break
;
return
wined3d_texture_gl_load_sysmem
(
texture_gl
,
sub_resource_idx
,
context_gl
,
location
);
default:
FIXME
(
"Implement %s loading from %s.
\n
"
,
wined3d_debug_location
(
location
),
...
...
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