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
9308c549
Commit
9308c549
authored
Apr 22, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 25, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Make sure all texture levels are allocated in surface_prepare_texture().
This fixes a regression introduced by commit
af7dfcd3
.
parent
958b5237
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
1 deletion
+27
-1
surface.c
dlls/wined3d/surface.c
+27
-1
No files found.
dlls/wined3d/surface.c
View file @
9308c549
...
...
@@ -1563,7 +1563,8 @@ static void read_from_framebuffer_texture(IWineD3DSurfaceImpl *This, BOOL srgb)
}
/* Context activation is done by the caller. */
void
surface_prepare_texture
(
IWineD3DSurfaceImpl
*
surface
,
const
struct
wined3d_gl_info
*
gl_info
,
BOOL
srgb
)
static
void
surface_prepare_texture_internal
(
IWineD3DSurfaceImpl
*
surface
,
const
struct
wined3d_gl_info
*
gl_info
,
BOOL
srgb
)
{
DWORD
alloc_flag
=
srgb
?
SFLAG_SRGBALLOCATED
:
SFLAG_ALLOCATED
;
CONVERT_TYPES
convert
;
...
...
@@ -1580,6 +1581,31 @@ void surface_prepare_texture(IWineD3DSurfaceImpl *surface, const struct wined3d_
surface
->
Flags
|=
alloc_flag
;
}
/* Context activation is done by the caller. */
void
surface_prepare_texture
(
IWineD3DSurfaceImpl
*
surface
,
const
struct
wined3d_gl_info
*
gl_info
,
BOOL
srgb
)
{
IWineD3DBaseTextureImpl
*
texture
;
if
(
SUCCEEDED
(
IWineD3DSurface_GetContainer
((
IWineD3DSurface
*
)
surface
,
&
IID_IWineD3DBaseTexture
,
(
void
**
)
&
texture
)))
{
UINT
sub_count
=
texture
->
baseTexture
.
level_count
*
texture
->
baseTexture
.
layer_count
;
UINT
i
;
TRACE
(
"surface %p is a subresource of texture %p.
\n
"
,
surface
,
texture
);
for
(
i
=
0
;
i
<
sub_count
;
++
i
)
{
IWineD3DSurfaceImpl
*
s
=
(
IWineD3DSurfaceImpl
*
)
texture
->
baseTexture
.
sub_resources
[
i
];
surface_prepare_texture_internal
(
s
,
gl_info
,
srgb
);
}
IWineD3DBaseTexture_Release
((
IWineD3DBaseTexture
*
)
texture
);
}
surface_prepare_texture_internal
(
surface
,
gl_info
,
srgb
);
}
static
void
surface_prepare_system_memory
(
IWineD3DSurfaceImpl
*
This
)
{
IWineD3DDeviceImpl
*
device
=
This
->
resource
.
device
;
...
...
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