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
3b61af63
Commit
3b61af63
authored
Aug 01, 2016
by
Henri Verbeet
Committed by
Alexandre Julliard
Aug 01, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Introduce wined3d_texture_load_location().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9b7ff40d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
8 deletions
+14
-8
texture.c
dlls/wined3d/texture.c
+14
-8
No files found.
dlls/wined3d/texture.c
View file @
3b61af63
...
...
@@ -174,6 +174,14 @@ void wined3d_texture_invalidate_location(struct wined3d_texture *texture,
sub_resource_idx
,
texture
);
}
/* Context activation is done by the caller. Context may be NULL in
* WINED3D_NO3D mode. */
static
BOOL
wined3d_texture_load_location
(
struct
wined3d_texture
*
texture
,
unsigned
int
sub_resource_idx
,
struct
wined3d_context
*
context
,
DWORD
location
)
{
return
texture
->
texture_ops
->
texture_load_location
(
texture
,
sub_resource_idx
,
context
,
location
);
}
/* Context activation is done by the caller. */
void
*
wined3d_texture_map_bo_address
(
const
struct
wined3d_bo_address
*
data
,
size_t
size
,
const
struct
wined3d_gl_info
*
gl_info
,
GLenum
binding
,
DWORD
flags
)
...
...
@@ -352,7 +360,7 @@ static void wined3d_texture_update_map_binding(struct wined3d_texture *texture)
for
(
i
=
0
;
i
<
sub_count
;
++
i
)
{
if
(
texture
->
sub_resources
[
i
].
locations
==
texture
->
resource
.
map_binding
&&
!
texture
->
texture_ops
->
texture_load_location
(
texture
,
i
,
context
,
map_binding
))
&&
!
wined3d_
texture_load_location
(
texture
,
i
,
context
,
map_binding
))
ERR
(
"Failed to load location %s.
\n
"
,
wined3d_debug_location
(
map_binding
));
if
(
texture
->
resource
.
map_binding
==
WINED3D_LOCATION_BUFFER
)
wined3d_texture_remove_buffer_object
(
texture
,
i
,
context
->
gl_info
);
...
...
@@ -914,7 +922,7 @@ void wined3d_texture_load(struct wined3d_texture *texture,
TRACE
(
"Reloading because of color key value change.
\n
"
);
for
(
i
=
0
;
i
<
sub_count
;
i
++
)
{
if
(
!
texture
->
texture_ops
->
texture_load_location
(
texture
,
i
,
context
,
texture
->
resource
.
map_binding
))
if
(
!
wined3d_
texture_load_location
(
texture
,
i
,
context
,
texture
->
resource
.
map_binding
))
ERR
(
"Failed to load location %s.
\n
"
,
wined3d_debug_location
(
texture
->
resource
.
map_binding
));
else
wined3d_texture_invalidate_location
(
texture
,
i
,
~
texture
->
resource
.
map_binding
);
...
...
@@ -932,7 +940,7 @@ void wined3d_texture_load(struct wined3d_texture *texture,
/* Reload the surfaces if the texture is marked dirty. */
for
(
i
=
0
;
i
<
sub_count
;
++
i
)
{
if
(
!
texture
->
texture_ops
->
texture_load_location
(
texture
,
i
,
context
,
if
(
!
wined3d_
texture_load_location
(
texture
,
i
,
context
,
srgb
?
WINED3D_LOCATION_TEXTURE_SRGB
:
WINED3D_LOCATION_TEXTURE_RGB
))
ERR
(
"Failed to load location (srgb %#x).
\n
"
,
srgb
);
}
...
...
@@ -1413,8 +1421,7 @@ HRESULT CDECL wined3d_texture_add_dirty_region(struct wined3d_texture *texture,
FIXME
(
"Ignoring dirty_region %s.
\n
"
,
debug_box
(
dirty_region
));
context
=
context_acquire
(
texture
->
resource
.
device
,
NULL
);
if
(
!
texture
->
texture_ops
->
texture_load_location
(
texture
,
sub_resource_idx
,
context
,
texture
->
resource
.
map_binding
))
if
(
!
wined3d_texture_load_location
(
texture
,
sub_resource_idx
,
context
,
texture
->
resource
.
map_binding
))
{
ERR
(
"Failed to load location %s.
\n
"
,
wined3d_debug_location
(
texture
->
resource
.
map_binding
));
context_release
(
context
);
...
...
@@ -1591,7 +1598,7 @@ static void wined3d_texture_unload(struct wined3d_resource *resource)
struct
wined3d_texture_sub_resource
*
sub_resource
=
&
texture
->
sub_resources
[
i
];
if
(
resource
->
pool
!=
WINED3D_POOL_DEFAULT
&&
texture
->
texture_ops
->
texture_load_location
(
texture
,
i
,
context
,
resource
->
map_binding
))
&&
wined3d_
texture_load_location
(
texture
,
i
,
context
,
resource
->
map_binding
))
{
wined3d_texture_invalidate_location
(
texture
,
i
,
~
resource
->
map_binding
);
}
...
...
@@ -1710,8 +1717,7 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
{
if
(
resource
->
usage
&
WINED3DUSAGE_DYNAMIC
)
WARN_
(
d3d_perf
)(
"Mapping a dynamic texture without WINED3D_MAP_DISCARD.
\n
"
);
ret
=
texture
->
texture_ops
->
texture_load_location
(
texture
,
sub_resource_idx
,
context
,
texture
->
resource
.
map_binding
);
ret
=
wined3d_texture_load_location
(
texture
,
sub_resource_idx
,
context
,
texture
->
resource
.
map_binding
);
}
if
(
!
ret
)
...
...
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