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
c9372782
Commit
c9372782
authored
Dec 13, 2008
by
Stefan Dösinger
Committed by
Alexandre Julliard
Dec 15, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Give ATIFS a pixel shader handler.
parent
b4467c73
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
ati_fragment_shader.c
dlls/wined3d/ati_fragment_shader.c
+25
-0
No files found.
dlls/wined3d/ati_fragment_shader.c
View file @
c9372782
...
...
@@ -881,6 +881,30 @@ static void textransform(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3
}
}
static
void
atifs_apply_pixelshader
(
DWORD
state
,
IWineD3DStateBlockImpl
*
stateblock
,
WineD3DContext
*
context
)
{
IWineD3DDeviceImpl
*
device
=
stateblock
->
wineD3DDevice
;
BOOL
use_vshader
=
use_vs
(
device
);
/* The ATIFS code does not support pixel shaders currently, but we have to provide a state handler
* to call shader_select to select a vertex shader if one is applied because the vertex shader state
* may defer calling the shader backend if the pshader state is dirty.
*
* In theory the application should not be able to mark the pixel shader dirty because it cannot
* create a shader, and thus has no way to set the state to something != NULL. However, a different
* pipeline part may link a different state to its pixelshader handler, thus a pshader state exists
* and can be dirtified. Also the pshader is always dirtified at startup, and blitting disables all
* shaders and dirtifies all shader states. If atifs can deal with this it keeps the rest of the code
* simpler.
*/
if
(
!
isStateDirty
(
context
,
device
->
StateTable
[
STATE_VSHADER
].
representative
))
{
device
->
shader_backend
->
shader_select
((
IWineD3DDevice
*
)
stateblock
->
wineD3DDevice
,
FALSE
,
use_vshader
);
if
(
!
isStateDirty
(
context
,
STATE_VERTEXSHADERCONSTANT
)
&&
use_vshader
)
{
device
->
StateTable
[
STATE_VERTEXSHADERCONSTANT
].
apply
(
STATE_VERTEXSHADERCONSTANT
,
stateblock
,
context
);
}
}
}
#undef GLINFO_LOCATION
static
const
struct
StateEntryTemplate
atifs_fragmentstate_template
[]
=
{
...
...
@@ -1005,6 +1029,7 @@ static const struct StateEntryTemplate atifs_fragmentstate_template[] = {
{
STATE_TEXTURESTAGE
(
5
,
WINED3DTSS_TEXTURETRANSFORMFLAGS
),{
STATE_TEXTURESTAGE
(
5
,
WINED3DTSS_TEXTURETRANSFORMFLAGS
),
textransform
},
0
},
{
STATE_TEXTURESTAGE
(
6
,
WINED3DTSS_TEXTURETRANSFORMFLAGS
),{
STATE_TEXTURESTAGE
(
6
,
WINED3DTSS_TEXTURETRANSFORMFLAGS
),
textransform
},
0
},
{
STATE_TEXTURESTAGE
(
7
,
WINED3DTSS_TEXTURETRANSFORMFLAGS
),{
STATE_TEXTURESTAGE
(
7
,
WINED3DTSS_TEXTURETRANSFORMFLAGS
),
textransform
},
0
},
{
STATE_PIXELSHADER
,
{
STATE_PIXELSHADER
,
atifs_apply_pixelshader
},
0
},
{
0
/* Terminate */
,
{
0
,
0
},
0
},
};
...
...
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