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
bd1afdb3
Commit
bd1afdb3
authored
Oct 07, 2014
by
Henri Verbeet
Committed by
Alexandre Julliard
Oct 07, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Get rid of surface_prepare_texture_internal().
parent
6da1cff5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
27 deletions
+22
-27
surface.c
dlls/wined3d/surface.c
+22
-27
No files found.
dlls/wined3d/surface.c
View file @
bd1afdb3
...
...
@@ -3217,50 +3217,45 @@ void surface_load_fb_texture(struct wined3d_surface *surface, BOOL srgb)
}
/* Context activation is done by the caller. */
static
void
surface_prepare_texture_internal
(
struct
wined3d_surface
*
surface
,
struct
wined3d_context
*
context
,
BOOL
srgb
)
void
surface_prepare_texture
(
struct
wined3d_surface
*
surface
,
struct
wined3d_context
*
context
,
BOOL
srgb
)
{
const
struct
wined3d_format
*
format
=
surface
->
container
->
resource
.
format
;
struct
wined3d_texture
*
texture
=
surface
->
container
;
DWORD
alloc_flag
=
srgb
?
SFLAG_SRGBALLOCATED
:
SFLAG_ALLOCATED
;
const
struct
wined3d_format
*
format
=
texture
->
resource
.
format
;
UINT
sub_count
=
texture
->
level_count
*
texture
->
layer_count
;
const
struct
wined3d_color_key_conversion
*
conversion
;
BOOL
converted
=
FALSE
;
UINT
i
;
if
(
surface
->
flags
&
alloc_flag
)
return
;
TRACE
(
"surface %p is a subresource of texture %p.
\n
"
,
surface
,
texture
)
;
if
(
format
->
convert
)
{
surface
->
flags
|=
SFLAG_CONVERTED
;
converted
=
TRUE
;
}
else
if
((
conversion
=
d3dfmt_get_conv
(
surface
->
container
,
TRUE
)))
else
if
((
conversion
=
d3dfmt_get_conv
(
texture
,
TRUE
)))
{
surface
->
flags
|=
SFLAG_CONVERTED
;
converted
=
TRUE
;
format
=
wined3d_get_format
(
context
->
gl_info
,
conversion
->
dst_format
);
}
else
{
surface
->
flags
&=
~
SFLAG_CONVERTED
;
}
wined3d_texture_bind_and_dirtify
(
surface
->
container
,
context
,
srgb
);
surface_allocate_surface
(
surface
,
context
->
gl_info
,
format
,
srgb
);
surface
->
flags
|=
alloc_flag
;
}
/* Context activation is done by the caller. */
void
surface_prepare_texture
(
struct
wined3d_surface
*
surface
,
struct
wined3d_context
*
context
,
BOOL
srgb
)
{
struct
wined3d_texture
*
texture
=
surface
->
container
;
UINT
sub_count
=
texture
->
level_count
*
texture
->
layer_count
;
UINT
i
;
TRACE
(
"surface %p is a subresource of texture %p.
\n
"
,
surface
,
texture
);
wined3d_texture_bind_and_dirtify
(
texture
,
context
,
srgb
);
for
(
i
=
0
;
i
<
sub_count
;
++
i
)
{
struct
wined3d_surface
*
s
=
surface_from_resource
(
texture
->
sub_resources
[
i
]);
surface_prepare_texture_internal
(
s
,
context
,
srgb
);
}
return
;
if
(
s
->
flags
&
alloc_flag
)
continue
;
if
(
converted
)
s
->
flags
|=
SFLAG_CONVERTED
;
else
s
->
flags
&=
~
SFLAG_CONVERTED
;
surface_allocate_surface
(
s
,
context
->
gl_info
,
format
,
srgb
);
s
->
flags
|=
alloc_flag
;
}
}
void
surface_prepare_rb
(
struct
wined3d_surface
*
surface
,
const
struct
wined3d_gl_info
*
gl_info
,
BOOL
multisample
)
...
...
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