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
91c3a5ea
Commit
91c3a5ea
authored
May 12, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
May 13, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Directly call basetexture_apply_state_changes().
All the implementations of IWineD3DBaseTexture::ApplyStateChanges() forward to basetexture_apply_state_changes().
parent
4bd4812b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
6 additions
and
34 deletions
+6
-34
basetexture.c
dlls/wined3d/basetexture.c
+3
-1
cubetexture.c
dlls/wined3d/cubetexture.c
+0
-9
state.c
dlls/wined3d/state.c
+3
-2
texture.c
dlls/wined3d/texture.c
+0
-8
volumetexture.c
dlls/wined3d/volumetexture.c
+0
-10
wined3d.idl
include/wine/wined3d.idl
+0
-4
No files found.
dlls/wined3d/basetexture.c
View file @
91c3a5ea
...
...
@@ -322,13 +322,15 @@ void basetexture_apply_state_changes(IWineD3DBaseTexture *iface,
GLint
textureDimensions
=
IWineD3DBaseTexture_GetTextureDimensions
(
iface
);
BOOL
cond_np2
=
IWineD3DBaseTexture_IsCondNP2
(
iface
);
TRACE
(
"iface %p, textureStates %p, samplerStates %p
\n
"
,
iface
,
textureStates
,
samplerStates
);
if
(
This
->
baseTexture
.
is_srgb
)
{
states
=
This
->
baseTexture
.
srgbstates
;
}
else
{
states
=
This
->
baseTexture
.
states
;
}
/*
ApplyStateChanges
relies on the correct texture being bound and loaded. */
/*
This function
relies on the correct texture being bound and loaded. */
if
(
samplerStates
[
WINED3DSAMP_ADDRESSU
]
!=
states
[
WINED3DTEXSTA_ADDRESSU
])
{
state
=
samplerStates
[
WINED3DSAMP_ADDRESSU
];
...
...
dlls/wined3d/cubetexture.c
View file @
91c3a5ea
...
...
@@ -257,14 +257,6 @@ static BOOL WINAPI IWineD3DCubeTextureImpl_IsCondNP2(IWineD3DCubeTexture *iface)
return
FALSE
;
}
static
void
WINAPI
IWineD3DCubeTextureImpl_ApplyStateChanges
(
IWineD3DCubeTexture
*
iface
,
const
DWORD
textureStates
[
WINED3D_HIGHEST_TEXTURE_STATE
+
1
],
const
DWORD
samplerStates
[
WINED3D_HIGHEST_SAMPLER_STATE
+
1
])
{
TRACE
(
"(%p) : relay to BaseTexture
\n
"
,
iface
);
basetexture_apply_state_changes
((
IWineD3DBaseTexture
*
)
iface
,
textureStates
,
samplerStates
);
}
/* *******************************************
IWineD3DCubeTexture IWineD3DCubeTexture parts follow
******************************************* */
...
...
@@ -399,7 +391,6 @@ const IWineD3DCubeTextureVtbl IWineD3DCubeTexture_Vtbl =
IWineD3DCubeTextureImpl_BindTexture
,
IWineD3DCubeTextureImpl_GetTextureDimensions
,
IWineD3DCubeTextureImpl_IsCondNP2
,
IWineD3DCubeTextureImpl_ApplyStateChanges
,
/* IWineD3DCubeTexture */
IWineD3DCubeTextureImpl_Destroy
,
IWineD3DCubeTextureImpl_GetLevelDesc
,
...
...
dlls/wined3d/state.c
View file @
91c3a5ea
...
...
@@ -3308,7 +3308,7 @@ static void sampler_texmatrix(DWORD state, IWineD3DStateBlockImpl *stateblock, W
if
(
!
texture
)
return
;
/* The fixed function np2 texture emulation uses the texture matrix to fix up the coordinates
*
IWineD3DBaseTexture::ApplyStateChanges
multiplies the set matrix with a fixup matrix. Before the
*
basetexture_apply_state_changes()
multiplies the set matrix with a fixup matrix. Before the
* scaling is reapplied or removed, the texture matrix has to be reapplied
*
* The mapped stage is already active because the sampler() function below, which is part of the
...
...
@@ -3356,7 +3356,8 @@ static void sampler(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DCont
IWineD3DBaseTextureImpl
*
tex_impl
=
(
IWineD3DBaseTextureImpl
*
)
stateblock
->
textures
[
sampler
];
tex_impl
->
baseTexture
.
internal_preload
(
stateblock
->
textures
[
sampler
],
srgb
?
SRGB_SRGB
:
SRGB_RGB
);
IWineD3DBaseTexture_BindTexture
(
stateblock
->
textures
[
sampler
],
srgb
);
IWineD3DBaseTexture_ApplyStateChanges
(
stateblock
->
textures
[
sampler
],
stateblock
->
textureState
[
sampler
],
stateblock
->
samplerState
[
sampler
]);
basetexture_apply_state_changes
(
stateblock
->
textures
[
sampler
],
stateblock
->
textureState
[
sampler
],
stateblock
->
samplerState
[
sampler
]);
if
(
GL_SUPPORT
(
EXT_TEXTURE_LOD_BIAS
))
{
tmpvalue
.
d
=
stateblock
->
samplerState
[
sampler
][
WINED3DSAMP_MIPMAPLODBIAS
];
...
...
dlls/wined3d/texture.c
View file @
91c3a5ea
...
...
@@ -271,13 +271,6 @@ static BOOL WINAPI IWineD3DTextureImpl_IsCondNP2(IWineD3DTexture *iface) {
return
This
->
cond_np2
;
}
static
void
WINAPI
IWineD3DTextureImpl_ApplyStateChanges
(
IWineD3DTexture
*
iface
,
const
DWORD
textureStates
[
WINED3D_HIGHEST_TEXTURE_STATE
+
1
],
const
DWORD
samplerStates
[
WINED3D_HIGHEST_SAMPLER_STATE
+
1
])
{
TRACE
(
"(%p) : relay to BaseTexture
\n
"
,
iface
);
basetexture_apply_state_changes
((
IWineD3DBaseTexture
*
)
iface
,
textureStates
,
samplerStates
);
}
/* *******************************************
IWineD3DTexture IWineD3DTexture parts follow
******************************************* */
...
...
@@ -401,7 +394,6 @@ const IWineD3DTextureVtbl IWineD3DTexture_Vtbl =
IWineD3DTextureImpl_BindTexture
,
IWineD3DTextureImpl_GetTextureDimensions
,
IWineD3DTextureImpl_IsCondNP2
,
IWineD3DTextureImpl_ApplyStateChanges
,
/* IWineD3DTexture */
IWineD3DTextureImpl_Destroy
,
IWineD3DTextureImpl_GetLevelDesc
,
...
...
dlls/wined3d/volumetexture.c
View file @
91c3a5ea
...
...
@@ -211,15 +211,6 @@ static BOOL WINAPI IWineD3DVolumeTextureImpl_IsCondNP2(IWineD3DVolumeTexture *if
return
FALSE
;
}
static
void
WINAPI
IWineD3DVolumeTextureImpl_ApplyStateChanges
(
IWineD3DVolumeTexture
*
iface
,
const
DWORD
textureStates
[
WINED3D_HIGHEST_TEXTURE_STATE
+
1
],
const
DWORD
samplerStates
[
WINED3D_HIGHEST_SAMPLER_STATE
+
1
])
{
IWineD3DVolumeTextureImpl
*
This
=
(
IWineD3DVolumeTextureImpl
*
)
iface
;
TRACE
(
"(%p) : nothing to do, passing to base texture
\n
"
,
This
);
basetexture_apply_state_changes
((
IWineD3DBaseTexture
*
)
iface
,
textureStates
,
samplerStates
);
}
/* *******************************************
IWineD3DVolumeTexture IWineD3DVolumeTexture parts follow
******************************************* */
...
...
@@ -330,7 +321,6 @@ const IWineD3DVolumeTextureVtbl IWineD3DVolumeTexture_Vtbl =
IWineD3DVolumeTextureImpl_BindTexture
,
IWineD3DVolumeTextureImpl_GetTextureDimensions
,
IWineD3DVolumeTextureImpl_IsCondNP2
,
IWineD3DVolumeTextureImpl_ApplyStateChanges
,
/* volume texture */
IWineD3DVolumeTextureImpl_Destroy
,
IWineD3DVolumeTextureImpl_GetLevelDesc
,
...
...
include/wine/wined3d.idl
View file @
91c3a5ea
...
...
@@ -2616,10 +2616,6 @@ interface IWineD3DBaseTexture : IWineD3DResource
)
;
BOOL
IsCondNP2
(
)
;
void
ApplyStateChanges
(
const
DWORD
texture_states
[
WINED3D_HIGHEST_TEXTURE_STATE
+
1
]
,
const
DWORD
sampler_states
[
WINED3D_HIGHEST_SAMPLER_STATE
+
1
]
)
;
}
[
...
...
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