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
1636bc1a
Commit
1636bc1a
authored
Feb 13, 2007
by
H. Verbeet
Committed by
Alexandre Julliard
Feb 14, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Always select the correct shader pair in the vertexdeclaration() state handler.
parent
fdf8c1a4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
14 deletions
+11
-14
state.c
dlls/wined3d/state.c
+11
-14
No files found.
dlls/wined3d/state.c
View file @
1636bc1a
...
...
@@ -2663,6 +2663,8 @@ static inline void handleStreams(IWineD3DStateBlockImpl *stateblock, BOOL useVer
static
void
vertexdeclaration
(
DWORD
state
,
IWineD3DStateBlockImpl
*
stateblock
,
WineD3DContext
*
context
)
{
BOOL
useVertexShaderFunction
=
FALSE
,
updateFog
=
FALSE
;
BOOL
usePixelShaderFunction
=
stateblock
->
wineD3DDevice
->
ps_selected_mode
!=
SHADER_NONE
&&
stateblock
->
pixelShader
&&
((
IWineD3DPixelShaderImpl
*
)
stateblock
->
pixelShader
)
->
baseShader
.
function
;
BOOL
transformed
;
/* Some stuff is in the device until we have per context tracking */
IWineD3DDeviceImpl
*
device
=
stateblock
->
wineD3DDevice
;
...
...
@@ -2758,24 +2760,19 @@ static void vertexdeclaration(DWORD state, IWineD3DStateBlockImpl *stateblock, W
IWineD3DVertexShader_CompileShader
(
stateblock
->
vertexShader
);
}
if
(
useVertexShaderFunction
||
context
->
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
(
context
,
STATE_PIXELSHADER
))
{
device
->
shader_backend
->
shader_select
((
IWineD3DDevice
*
)
device
,
usePixelShaderFunction
,
useVertexShaderFunction
);
/* Vertex and pixel shaders are applied together for now, so let the last dirty state do the
* application
*/
if
(
!
isStateDirty
(
context
,
STATE_PIXELSHADER
))
{
device
->
shader_backend
->
shader_select
((
IWineD3DDevice
*
)
device
,
usePixelShaderFunction
,
useVertexShaderFunction
);
if
(
!
isStateDirty
(
context
,
STATE_VERTEXSHADERCONSTANT
)
&&
(
useVertexShaderFunction
||
usePixelShaderFunction
))
{
shaderconstant
(
STATE_VERTEXSHADERCONSTANT
,
stateblock
,
context
);
}
if
(
!
isStateDirty
(
context
,
STATE_VERTEXSHADERCONSTANT
)
&&
(
useVertexShaderFunction
||
usePixelShaderFunction
))
{
shaderconstant
(
STATE_VERTEXSHADERCONSTANT
,
stateblock
,
context
);
}
context
->
last_was_vshader
=
useVertexShaderFunction
;
}
context
->
last_was_vshader
=
useVertexShaderFunction
;
if
(
updateFog
)
{
state_fog
(
STATE_RENDER
(
WINED3DRS_FOGENABLE
),
stateblock
,
context
);
}
...
...
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