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
8b54093b
Commit
8b54093b
authored
Sep 27, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 27, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Pass a wined3d_state structure to record_lights().
parent
f4ef2d6e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
stateblock.c
dlls/wined3d/stateblock.c
+7
-6
No files found.
dlls/wined3d/stateblock.c
View file @
8b54093b
...
...
@@ -540,14 +540,15 @@ static ULONG WINAPI IWineD3DStateBlockImpl_Release(IWineD3DStateBlock *iface) {
/**********************************************************
* IWineD3DStateBlockImpl parts follows
**********************************************************/
static
void
record_lights
(
IWineD3DStateBlockImpl
*
This
,
const
IWineD3DStateBlockImpl
*
targetStateBlock
)
static
void
record_lights
(
IWineD3DStateBlockImpl
*
This
,
const
struct
wined3d_state
*
state
)
{
UINT
i
;
/* Lights... For a recorded state block, we just had a chain of actions to perform,
* so we need to walk that chain and update any actions which differ
*/
for
(
i
=
0
;
i
<
LIGHTMAP_SIZE
;
i
++
)
{
for
(
i
=
0
;
i
<
LIGHTMAP_SIZE
;
++
i
)
{
struct
list
*
e
,
*
f
;
LIST_FOR_EACH
(
e
,
&
This
->
state
.
light_map
[
i
])
{
...
...
@@ -555,7 +556,7 @@ static void record_lights(IWineD3DStateBlockImpl *This, const IWineD3DStateBlock
struct
wined3d_light_info
*
src
=
LIST_ENTRY
(
e
,
struct
wined3d_light_info
,
entry
),
*
realLight
;
/* Look up the light in the destination */
LIST_FOR_EACH
(
f
,
&
targetStateBlock
->
state
.
light_map
[
i
])
LIST_FOR_EACH
(
f
,
&
state
->
light_map
[
i
])
{
realLight
=
LIST_ENTRY
(
f
,
struct
wined3d_light_info
,
entry
);
if
(
realLight
->
OriginalIndex
==
src
->
OriginalIndex
)
...
...
@@ -582,8 +583,8 @@ static void record_lights(IWineD3DStateBlockImpl *This, const IWineD3DStateBlock
{
/* This can happen if the light was originally created as a
* default light for SetLightEnable() while recording. */
WARN
(
"Light %u in stateblock %p does not exist in device state
block
%p.
\n
"
,
src
->
OriginalIndex
,
This
,
targetStateBlock
);
WARN
(
"Light %u in stateblock %p does not exist in device state %p.
\n
"
,
src
->
OriginalIndex
,
This
,
state
);
src
->
OriginalParms
=
WINED3D_default_light
;
if
(
src
->
glIndex
!=
-
1
)
...
...
@@ -887,7 +888,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface)
This
->
state
.
pixel_shader
=
targetStateBlock
->
state
.
pixel_shader
;
}
record_lights
(
This
,
targetStateBlock
);
record_lights
(
This
,
&
targetStateBlock
->
state
);
TRACE
(
"(%p) : Updated state block %p ------------------^
\n
"
,
targetStateBlock
,
This
);
...
...
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