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
19516bf6
Commit
19516bf6
authored
Jan 28, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Jan 29, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Add some basic state table validation.
parent
9bbccb7f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
state.c
dlls/wined3d/state.c
+18
-0
No files found.
dlls/wined3d/state.c
View file @
19516bf6
...
...
@@ -5685,6 +5685,22 @@ static void multistate_apply_3(DWORD state, IWineD3DStateBlockImpl *stateblock,
stateblock
->
device
->
multistate_funcs
[
state
][
2
](
state
,
stateblock
,
context
);
}
static
void
validate_state_table
(
struct
StateEntry
*
state_table
)
{
unsigned
int
i
;
for
(
i
=
0
;
i
<
STATE_HIGHEST
+
1
;
++
i
)
{
DWORD
rep
=
state_table
[
i
].
representative
;
if
(
rep
&&
!
state_table
[
rep
].
representative
)
{
ERR
(
"State %s (%#x) has invalid representative %s (%#x).
\n
"
,
debug_d3dstate
(
i
),
i
,
debug_d3dstate
(
rep
),
rep
);
state_table
[
i
].
representative
=
0
;
}
}
}
HRESULT
compile_state_table
(
struct
StateEntry
*
StateTable
,
APPLYSTATEFUNC
**
dev_multistate_funcs
,
const
struct
wined3d_gl_info
*
gl_info
,
const
struct
StateEntryTemplate
*
vertex
,
const
struct
fragment_pipeline
*
fragment
,
const
struct
StateEntryTemplate
*
misc
)
...
...
@@ -5784,6 +5800,8 @@ HRESULT compile_state_table(struct StateEntry *StateTable, APPLYSTATEFUNC **dev_
}
}
validate_state_table
(
StateTable
);
return
WINED3D_OK
;
out_of_mem:
...
...
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