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
294d9dae
Commit
294d9dae
authored
Apr 26, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 27, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Simply pass an IWineD3DSurfaceImpl pointer to surface_set_texture_name().
parent
d977e91b
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
24 deletions
+23
-24
cubetexture.c
dlls/wined3d/cubetexture.c
+7
-7
surface.c
dlls/wined3d/surface.c
+8
-9
texture.c
dlls/wined3d/texture.c
+7
-7
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
No files found.
dlls/wined3d/cubetexture.c
View file @
294d9dae
...
...
@@ -118,7 +118,7 @@ static void cubetexture_cleanup(IWineD3DCubeTextureImpl *This)
for
(
i
=
0
;
i
<
sub_count
;
++
i
)
{
IWineD3DSurface
*
surface
=
(
IWineD3DSurface
*
)
This
->
baseTexture
.
sub_resources
[
i
];
IWineD3DSurface
Impl
*
surface
=
(
IWineD3DSurfaceImpl
*
)
This
->
baseTexture
.
sub_resources
[
i
];
if
(
surface
)
{
...
...
@@ -126,9 +126,9 @@ static void cubetexture_cleanup(IWineD3DCubeTextureImpl *This)
* surface doesn't try and release it. */
surface_set_texture_name
(
surface
,
0
,
TRUE
);
surface_set_texture_name
(
surface
,
0
,
FALSE
);
surface_set_texture_target
(
surface
,
0
);
IWineD3DSurface_SetContainer
(
surface
,
NULL
);
IWineD3DSurface_Release
(
surface
);
surface_set_texture_target
(
(
IWineD3DSurface
*
)
surface
,
0
);
IWineD3DSurface_SetContainer
(
(
IWineD3DSurface
*
)
surface
,
NULL
);
IWineD3DSurface_Release
(
(
IWineD3DSurface
*
)
surface
);
}
}
basetexture_cleanup
((
IWineD3DBaseTexture
*
)
This
);
...
...
@@ -216,9 +216,9 @@ static void WINAPI IWineD3DCubeTextureImpl_UnLoad(IWineD3DCubeTexture *iface)
for
(
i
=
0
;
i
<
sub_count
;
++
i
)
{
IWineD3DSurface
*
surface
=
(
IWineD3DSurface
*
)
This
->
baseTexture
.
sub_resources
[
i
];
IWineD3DSurface
Impl
*
surface
=
(
IWineD3DSurfaceImpl
*
)
This
->
baseTexture
.
sub_resources
[
i
];
IWineD3DSurface_UnLoad
(
surface
);
IWineD3DSurface_UnLoad
(
(
IWineD3DSurface
*
)
surface
);
surface_set_texture_name
(
surface
,
0
,
TRUE
);
surface_set_texture_name
(
surface
,
0
,
FALSE
);
}
...
...
@@ -287,7 +287,7 @@ static HRESULT WINAPI IWineD3DCubeTextureImpl_BindTexture(IWineD3DCubeTexture *i
for
(
i
=
0
;
i
<
sub_count
;
++
i
)
{
IWineD3DSurface
*
surface
=
(
IWineD3DSurface
*
)
This
->
baseTexture
.
sub_resources
[
i
];
IWineD3DSurface
Impl
*
surface
=
(
IWineD3DSurfaceImpl
*
)
This
->
baseTexture
.
sub_resources
[
i
];
if
(
This
->
baseTexture
.
is_srgb
)
surface_set_texture_name
(
surface
,
This
->
baseTexture
.
texture_srgb
.
name
,
TRUE
);
...
...
dlls/wined3d/surface.c
View file @
294d9dae
...
...
@@ -468,36 +468,35 @@ static void surface_force_reload(IWineD3DSurfaceImpl *surface)
surface
->
Flags
&=
~
(
SFLAG_ALLOCATED
|
SFLAG_SRGBALLOCATED
);
}
void
surface_set_texture_name
(
IWineD3DSurface
*
i
face
,
GLuint
new_name
,
BOOL
srgb
)
void
surface_set_texture_name
(
IWineD3DSurface
Impl
*
sur
face
,
GLuint
new_name
,
BOOL
srgb
)
{
IWineD3DSurfaceImpl
*
This
=
(
IWineD3DSurfaceImpl
*
)
iface
;
GLuint
*
name
;
DWORD
flag
;
TRACE
(
"surface %p, new_name %u, srgb %#x.
\n
"
,
surface
,
new_name
,
srgb
);
if
(
srgb
)
{
name
=
&
This
->
texture_name_srgb
;
name
=
&
surface
->
texture_name_srgb
;
flag
=
SFLAG_INSRGBTEX
;
}
else
{
name
=
&
This
->
texture_name
;
name
=
&
surface
->
texture_name
;
flag
=
SFLAG_INTEXTURE
;
}
TRACE
(
"(%p) : setting texture name %u
\n
"
,
This
,
new_name
);
if
(
!*
name
&&
new_name
)
{
/* FIXME: We shouldn't need to remove SFLAG_INTEXTURE if the
* surface has no texture name yet. See if we can get rid of this. */
if
(
This
->
Flags
&
flag
)
if
(
surface
->
Flags
&
flag
)
ERR
(
"Surface has SFLAG_INTEXTURE set, but no texture name
\n
"
);
IWineD3DSurface_ModifyLocation
(
i
face
,
flag
,
FALSE
);
IWineD3DSurface_ModifyLocation
(
(
IWineD3DSurface
*
)
sur
face
,
flag
,
FALSE
);
}
*
name
=
new_name
;
surface_force_reload
(
This
);
surface_force_reload
(
surface
);
}
void
surface_set_texture_target
(
IWineD3DSurface
*
iface
,
GLenum
target
)
...
...
dlls/wined3d/texture.c
View file @
294d9dae
...
...
@@ -111,16 +111,16 @@ static void texture_cleanup(IWineD3DTextureImpl *This)
for
(
i
=
0
;
i
<
This
->
baseTexture
.
level_count
;
++
i
)
{
IWineD3DSurface
*
surface
=
(
IWineD3DSurface
*
)
This
->
baseTexture
.
sub_resources
[
i
];
IWineD3DSurface
Impl
*
surface
=
(
IWineD3DSurfaceImpl
*
)
This
->
baseTexture
.
sub_resources
[
i
];
if
(
surface
)
{
/* Clean out the texture name we gave to the surface so that the
* surface doesn't try and release it */
surface_set_texture_name
(
surface
,
0
,
TRUE
);
surface_set_texture_name
(
surface
,
0
,
FALSE
);
surface_set_texture_target
(
surface
,
0
);
IWineD3DSurface_SetContainer
(
surface
,
NULL
);
IWineD3DSurface_Release
(
surface
);
surface_set_texture_target
(
(
IWineD3DSurface
*
)
surface
,
0
);
IWineD3DSurface_SetContainer
(
(
IWineD3DSurface
*
)
surface
,
NULL
);
IWineD3DSurface_Release
(
(
IWineD3DSurface
*
)
surface
);
}
}
...
...
@@ -208,8 +208,8 @@ static void WINAPI IWineD3DTextureImpl_UnLoad(IWineD3DTexture *iface) {
*/
for
(
i
=
0
;
i
<
This
->
baseTexture
.
level_count
;
++
i
)
{
IWineD3DSurface
*
surface
=
(
IWineD3DSurface
*
)
This
->
baseTexture
.
sub_resources
[
i
];
IWineD3DSurface_UnLoad
(
surface
);
IWineD3DSurface
Impl
*
surface
=
(
IWineD3DSurfaceImpl
*
)
This
->
baseTexture
.
sub_resources
[
i
];
IWineD3DSurface_UnLoad
(
(
IWineD3DSurface
*
)
surface
);
surface_set_texture_name
(
surface
,
0
,
FALSE
);
/* Delete rgb name */
surface_set_texture_name
(
surface
,
0
,
TRUE
);
/* delete srgb name */
}
...
...
@@ -282,7 +282,7 @@ static HRESULT WINAPI IWineD3DTextureImpl_BindTexture(IWineD3DTexture *iface, BO
for
(
i
=
0
;
i
<
This
->
baseTexture
.
level_count
;
++
i
)
{
IWineD3DSurface
*
surface
=
(
IWineD3DSurface
*
)
This
->
baseTexture
.
sub_resources
[
i
];
IWineD3DSurface
Impl
*
surface
=
(
IWineD3DSurfaceImpl
*
)
This
->
baseTexture
.
sub_resources
[
i
];
surface_set_texture_name
(
surface
,
gl_tex
->
name
,
This
->
baseTexture
.
is_srgb
);
}
...
...
dlls/wined3d/wined3d_private.h
View file @
294d9dae
...
...
@@ -2680,7 +2680,7 @@ void surface_load_ds_location(IWineD3DSurfaceImpl *surface,
void
surface_modify_ds_location
(
IWineD3DSurfaceImpl
*
surface
,
DWORD
location
)
DECLSPEC_HIDDEN
;
void
surface_set_compatible_renderbuffer
(
IWineD3DSurfaceImpl
*
surface
,
unsigned
int
width
,
unsigned
int
height
)
DECLSPEC_HIDDEN
;
void
surface_set_texture_name
(
IWineD3DSurface
*
i
face
,
GLuint
name
,
BOOL
srgb_name
)
DECLSPEC_HIDDEN
;
void
surface_set_texture_name
(
IWineD3DSurface
Impl
*
sur
face
,
GLuint
name
,
BOOL
srgb_name
)
DECLSPEC_HIDDEN
;
void
surface_set_texture_target
(
IWineD3DSurface
*
iface
,
GLenum
target
)
DECLSPEC_HIDDEN
;
BOOL
getColorBits
(
const
struct
wined3d_format_desc
*
format_desc
,
...
...
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