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
fdb62cba
Commit
fdb62cba
authored
Jan 06, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
Jan 08, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Do not activate vertex shaders needlessly.
parent
09ab812e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
state.c
dlls/wined3d/state.c
+7
-4
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-0
No files found.
dlls/wined3d/state.c
View file @
fdb62cba
...
...
@@ -2675,20 +2675,23 @@ static void vertexdeclaration(DWORD state, IWineD3DStateBlockImpl *stateblock) {
IWineD3DVertexShader_CompileShader
(
stateblock
->
vertexShader
);
}
/* Vertex and pixel shaders are applied together for now, so let the last dirty state do the
* application
*/
if
(
!
isStateDirty
(
device
,
STATE_PIXELSHADER
))
{
if
(
useVertexShaderFunction
||
device
->
last_was_vshader
)
{
BOOL
usePixelShaderFunction
=
device
->
ps_selected_mode
!=
SHADER_NONE
&&
stateblock
->
pixelShader
&&
((
IWineD3DPixelShaderImpl
*
)
stateblock
->
pixelShader
)
->
baseShader
.
function
;
/* Vertex and pixel shaders are applied together for now, so let the last dirty state do the
* application
*/
if
(
!
isStateDirty
(
device
,
STATE_PIXELSHADER
))
{
device
->
shader_backend
->
shader_select
((
IWineD3DDevice
*
)
device
,
usePixelShaderFunction
,
useVertexShaderFunction
);
if
(
!
isStateDirty
(
stateblock
->
wineD3DDevice
,
STATE_VERTEXSHADERCONSTANT
)
&&
(
useVertexShaderFunction
||
usePixelShaderFunction
))
{
shaderconstant
(
STATE_VERTEXSHADERCONSTANT
,
stateblock
);
}
}
device
->
last_was_vshader
=
useVertexShaderFunction
;
}
if
(
updateFog
)
{
state_fog
(
STATE_RENDER
(
WINED3DRS_FOGENABLE
),
stateblock
);
...
...
dlls/wined3d/wined3d_private.h
View file @
fdb62cba
...
...
@@ -583,6 +583,7 @@ typedef struct IWineD3DDeviceImpl
BOOL
last_was_notclipped
;
BOOL
untransformed
;
BOOL
last_was_pshader
;
BOOL
last_was_vshader
;
BOOL
last_was_foggy_shader
;
BOOL
namedArraysLoaded
,
numberedArraysLoaded
;
...
...
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