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
b830439b
Commit
b830439b
authored
Apr 21, 2003
by
Jason Edmeades
Committed by
Alexandre Julliard
Apr 21, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't reapply all the texture states if the texture we are replacing
is the same as the texture there already and the texture is not 'dirty'.
parent
21ee3295
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
device.c
dlls/d3d8/device.c
+12
-5
No files found.
dlls/d3d8/device.c
View file @
b830439b
...
...
@@ -2966,6 +2966,7 @@ HRESULT WINAPI IDirect3DDevice8Impl_GetTexture(LPDIRECT3DDEVICE8 iface, DWORD
HRESULT
WINAPI
IDirect3DDevice8Impl_SetTexture
(
LPDIRECT3DDEVICE8
iface
,
DWORD
Stage
,
IDirect3DBaseTexture8
*
pTexture
)
{
IDirect3DBaseTexture8
*
oldTxt
;
BOOL
reapplyStates
=
TRUE
;
ICOM_THIS
(
IDirect3DDevice8Impl
,
iface
);
D3DRESOURCETYPE
textureType
;
...
...
@@ -2996,7 +2997,6 @@ HRESULT WINAPI IDirect3DDevice8Impl_SetTexture(LPDIRECT3DDEVICE8 iface, DWORD
}
/* Decrement the count of the previous texture */
/* FIXME PERF: If old == new and not dirty then skip all this */
if
(
oldTxt
!=
NULL
)
{
IDirect3DBaseTexture8Impl_Release
(
oldTxt
);
}
...
...
@@ -3008,8 +3008,13 @@ HRESULT WINAPI IDirect3DDevice8Impl_SetTexture(LPDIRECT3DDEVICE8 iface, DWORD
textureType
=
IDirect3DBaseTexture8Impl_GetType
(
pTexture
);
if
(
textureType
==
D3DRTYPE_TEXTURE
)
{
IDirect3DTexture8Impl
*
pTexture2
=
(
IDirect3DTexture8Impl
*
)
pTexture
;
int
i
;
IDirect3DTexture8Impl
*
pTexture2
=
(
IDirect3DTexture8Impl
*
)
pTexture
;
int
i
;
if
(
oldTxt
==
pTexture2
&&
pTexture2
->
Dirty
==
FALSE
)
{
TRACE
(
"Skipping setting texture as old == new
\n
"
);
reapplyStates
=
FALSE
;
}
else
{
/* Standard 2D texture */
TRACE
(
"Standard 2d texture
\n
"
);
...
...
@@ -3062,7 +3067,7 @@ HRESULT WINAPI IDirect3DDevice8Impl_SetTexture(LPDIRECT3DDEVICE8 iface, DWORD
}
}
}
}
else
if
(
textureType
==
D3DRTYPE_VOLUMETEXTURE
)
{
IDirect3DVolumeTexture8Impl
*
pTexture2
=
(
IDirect3DVolumeTexture8Impl
*
)
pTexture
;
int
i
;
...
...
@@ -3132,7 +3137,9 @@ HRESULT WINAPI IDirect3DDevice8Impl_SetTexture(LPDIRECT3DDEVICE8 iface, DWORD
/* Even if the texture has been set to null, reapply the stages as a null texture to directx requires
a dummy texture in opengl, and we always need to ensure the current view of the TextureStates apply */
setupTextureStates
(
iface
,
Stage
);
if
(
reapplyStates
)
{
setupTextureStates
(
iface
,
Stage
);
}
return
D3D_OK
;
}
...
...
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