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
2a309f50
Commit
2a309f50
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: Cleanup the pixelshader() state handler a little bit.
parent
1636bc1a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
22 deletions
+10
-22
state.c
dlls/wined3d/state.c
+10
-22
No files found.
dlls/wined3d/state.c
View file @
2a309f50
...
...
@@ -1905,9 +1905,11 @@ static void shaderconstant(DWORD state, IWineD3DStateBlockImpl *stateblock, Wine
}
static
void
pixelshader
(
DWORD
state
,
IWineD3DStateBlockImpl
*
stateblock
,
WineD3DContext
*
context
)
{
BOOL
use_ps
=
stateblock
->
pixelShader
&&
((
IWineD3DPixelShaderImpl
*
)
stateblock
->
pixelShader
)
->
baseShader
.
function
!=
NULL
;
BOOL
use_vs
=
stateblock
->
vertexShader
&&
((
IWineD3DVertexShaderImpl
*
)
stateblock
->
vertexShader
)
->
baseShader
.
function
!=
NULL
;
int
i
;
if
(
stateblock
->
pixelShader
&&
((
IWineD3DPixelShaderImpl
*
)
stateblock
->
pixelShader
)
->
baseShader
.
function
!=
NULL
)
{
if
(
use_ps
)
{
if
(
!
context
->
last_was_pshader
)
{
/* Former draw without a pixel shader, some samplers
* may be disabled because of WINED3DTSS_COLOROP = WINED3DTOP_DISABLE
...
...
@@ -1926,18 +1928,6 @@ static void pixelshader(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3D
/* Compile and bind the shader */
IWineD3DPixelShader_CompileShader
(
stateblock
->
pixelShader
);
if
(
!
isStateDirty
(
context
,
StateTable
[
STATE_VSHADER
].
representative
))
{
stateblock
->
wineD3DDevice
->
shader_backend
->
shader_select
(
(
IWineD3DDevice
*
)
stateblock
->
wineD3DDevice
,
TRUE
,
!
stateblock
->
vertexShader
?
FALSE
:
((
IWineD3DVertexShaderImpl
*
)
stateblock
->
vertexShader
)
->
baseShader
.
function
!=
NULL
);
if
(
!
isStateDirty
(
context
,
STATE_VERTEXSHADERCONSTANT
))
{
shaderconstant
(
STATE_VERTEXSHADERCONSTANT
,
stateblock
,
context
);
}
}
context
->
last_was_pshader
=
TRUE
;
}
else
{
/* Disabled the pixel shader - color ops weren't applied
* while it was enabled, so re-apply them.
...
...
@@ -1947,19 +1937,17 @@ static void pixelshader(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3D
tex_colorop
(
STATE_TEXTURESTAGE
(
i
,
WINED3DTSS_COLOROP
),
stateblock
,
context
);
}
}
context
->
last_was_pshader
=
FALSE
;
}
if
(
!
isStateDirty
(
context
,
StateTable
[
STATE_VSHADER
].
representative
))
{
stateblock
->
wineD3DDevice
->
shader_backend
->
shader_select
(
(
IWineD3DDevice
*
)
stateblock
->
wineD3DDevice
,
FALSE
,
!
stateblock
->
vertexShader
?
FALSE
:
((
IWineD3DVertexShaderImpl
*
)
stateblock
->
vertexShader
)
->
baseShader
.
function
!=
NULL
);
if
(
!
isStateDirty
(
context
,
StateTable
[
STATE_VSHADER
].
representative
))
{
stateblock
->
wineD3DDevice
->
shader_backend
->
shader_select
((
IWineD3DDevice
*
)
stateblock
->
wineD3DDevice
,
use_ps
,
use_vs
);
if
(
!
isStateDirty
(
context
,
STATE_VERTEXSHADERCONSTANT
))
{
shaderconstant
(
STATE_VERTEXSHADERCONSTANT
,
stateblock
,
context
);
}
if
(
!
isStateDirty
(
context
,
STATE_VERTEXSHADERCONSTANT
)
&&
(
use_vs
||
use_ps
))
{
shaderconstant
(
STATE_VERTEXSHADERCONSTANT
,
stateblock
,
context
);
}
}
context
->
last_was_pshader
=
use_ps
;
}
static
void
transform_world
(
DWORD
state
,
IWineD3DStateBlockImpl
*
stateblock
,
WineD3DContext
*
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