Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
84258723
Commit
84258723
authored
Mar 09, 2008
by
Stefan Dösinger
Committed by
Alexandre Julliard
Mar 25, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Make the state table a property of the shader backend.
parent
1e9acad3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
15 additions
and
12 deletions
+15
-12
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+2
-2
baseshader.c
dlls/wined3d/baseshader.c
+2
-1
context.c
dlls/wined3d/context.c
+0
-0
device.c
dlls/wined3d/device.c
+2
-2
glsl_shader.c
dlls/wined3d/glsl_shader.c
+2
-1
state.c
dlls/wined3d/state.c
+4
-4
wined3d_private.h
dlls/wined3d/wined3d_private.h
+3
-2
No files found.
dlls/wined3d/arb_program_shader.c
View file @
84258723
...
...
@@ -1883,6 +1883,6 @@ const shader_backend_t arb_program_shader_backend = {
&
shader_arb_destroy
,
&
shader_arb_alloc
,
&
shader_arb_free
,
&
shader_arb_dirty_const
&
shader_arb_dirty_const
,
FFPStateTable
};
dlls/wined3d/baseshader.c
View file @
84258723
...
...
@@ -1109,7 +1109,8 @@ const shader_backend_t none_shader_backend = {
&
shader_none_destroy
,
&
shader_none_alloc
,
&
shader_none_free
,
&
shader_none_dirty_const
&
shader_none_dirty_const
,
FFPStateTable
};
/* *******************************************
...
...
dlls/wined3d/context.c
View file @
84258723
This diff is collapsed.
Click to expand it.
dlls/wined3d/device.c
View file @
84258723
...
...
@@ -4411,7 +4411,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetTextureStageState(IWineD3DDevice *if
}
if
(
Stage
>
This
->
stateBlock
->
lowest_disabled_stage
&&
StateTable
[
STATE_TEXTURESTAGE
(
0
,
Type
)].
representative
==
STATE_TEXTURESTAGE
(
0
,
WINED3DTSS_COLOROP
))
{
This
->
shader_backend
->
StateTable
[
STATE_TEXTURESTAGE
(
0
,
Type
)].
representative
==
STATE_TEXTURESTAGE
(
0
,
WINED3DTSS_COLOROP
))
{
/* Colorop change above lowest disabled stage? That won't change anything in the gl setup
* Changes in other states are important on disabled stages too
*/
...
...
@@ -7778,7 +7778,7 @@ const DWORD SavedVertexStates_S[NUM_SAVEDVERTEXSTATES_S] = {
};
void
IWineD3DDeviceImpl_MarkStateDirty
(
IWineD3DDeviceImpl
*
This
,
DWORD
state
)
{
DWORD
rep
=
StateTable
[
state
].
representative
;
DWORD
rep
=
This
->
shader_backend
->
StateTable
[
state
].
representative
;
DWORD
idx
;
BYTE
shift
;
UINT
i
;
...
...
dlls/wined3d/glsl_shader.c
View file @
84258723
...
...
@@ -3372,5 +3372,6 @@ const shader_backend_t glsl_shader_backend = {
&
shader_glsl_destroy
,
&
shader_glsl_alloc
,
&
shader_glsl_free
,
&
shader_glsl_dirty_const
&
shader_glsl_dirty_const
,
FFPStateTable
};
dlls/wined3d/state.c
View file @
84258723
...
...
@@ -435,7 +435,7 @@ static void state_blend(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3D
/* colorkey fixup for stage 0 alphaop depends on WINED3DRS_ALPHABLENDENABLE state,
so it may need updating */
if
(
stateblock
->
renderState
[
WINED3DRS_COLORKEYENABLE
])
{
StateTable
[
STATE_TEXTURESTAGE
(
0
,
WINED3DTSS_ALPHAOP
)].
apply
(
STATE_TEXTURESTAGE
(
0
,
WINED3DTSS_ALPHAOP
),
stateblock
,
context
);
FFP
StateTable
[
STATE_TEXTURESTAGE
(
0
,
WINED3DTSS_ALPHAOP
)].
apply
(
STATE_TEXTURESTAGE
(
0
,
WINED3DTSS_ALPHAOP
),
stateblock
,
context
);
}
}
...
...
@@ -484,7 +484,7 @@ static void state_alpha(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3D
}
if
(
enable_ckey
||
context
->
last_was_ckey
)
{
StateTable
[
STATE_TEXTURESTAGE
(
0
,
WINED3DTSS_ALPHAOP
)].
apply
(
STATE_TEXTURESTAGE
(
0
,
WINED3DTSS_ALPHAOP
),
stateblock
,
context
);
FFP
StateTable
[
STATE_TEXTURESTAGE
(
0
,
WINED3DTSS_ALPHAOP
)].
apply
(
STATE_TEXTURESTAGE
(
0
,
WINED3DTSS_ALPHAOP
),
stateblock
,
context
);
}
context
->
last_was_ckey
=
enable_ckey
;
...
...
@@ -2605,7 +2605,7 @@ static void pixelshader(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3D
update_fog
=
TRUE
;
}
if
(
!
isStateDirty
(
context
,
StateTable
[
STATE_VSHADER
].
representative
))
{
if
(
!
isStateDirty
(
context
,
FFP
StateTable
[
STATE_VSHADER
].
representative
))
{
device
->
shader_backend
->
shader_select
((
IWineD3DDevice
*
)
stateblock
->
wineD3DDevice
,
use_pshader
,
use_vshader
);
if
(
!
isStateDirty
(
context
,
STATE_VERTEXSHADERCONSTANT
)
&&
(
use_vshader
||
use_pshader
))
{
...
...
@@ -3915,7 +3915,7 @@ static void frontface(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DCo
}
}
const
struct
StateEntry
StateTable
[]
=
const
struct
StateEntry
FFP
StateTable
[]
=
{
/* State name representative, apply function */
{
/* 0, Undefined */
0
,
state_undefined
},
...
...
dlls/wined3d/wined3d_private.h
View file @
84258723
...
...
@@ -260,6 +260,7 @@ typedef struct {
HRESULT
(
*
shader_alloc_private
)(
IWineD3DDevice
*
iface
);
void
(
*
shader_free_private
)(
IWineD3DDevice
*
iface
);
BOOL
(
*
shader_dirtifyable_constants
)(
IWineD3DDevice
*
iface
);
const
struct
StateEntry
*
StateTable
;
}
shader_backend_t
;
extern
const
shader_backend_t
glsl_shader_backend
;
...
...
@@ -543,8 +544,8 @@ struct StateEntry
APPLYSTATEFUNC
apply
;
};
/*
Global
state table */
extern
const
struct
StateEntry
StateTable
[];
/*
"Base"
state table */
extern
const
struct
StateEntry
FFP
StateTable
[];
/* The new context manager that should deal with onscreen and offscreen rendering */
struct
WineD3DContext
{
...
...
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