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
5fd1b5c0
Commit
5fd1b5c0
authored
Oct 01, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Oct 01, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Also pass the destination state directly to wined3d_state_record_lights().
parent
545dc012
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
15 deletions
+12
-15
stateblock.c
dlls/wined3d/stateblock.c
+12
-15
No files found.
dlls/wined3d/stateblock.c
View file @
5fd1b5c0
...
@@ -537,26 +537,23 @@ static ULONG WINAPI IWineD3DStateBlockImpl_Release(IWineD3DStateBlock *iface) {
...
@@ -537,26 +537,23 @@ static ULONG WINAPI IWineD3DStateBlockImpl_Release(IWineD3DStateBlock *iface) {
return
refCount
;
return
refCount
;
}
}
/**********************************************************
static
void
wined3d_state_record_lights
(
struct
wined3d_state
*
dst_state
,
const
struct
wined3d_state
*
src_state
)
* IWineD3DStateBlockImpl parts follows
**********************************************************/
static
void
record_lights
(
IWineD3DStateBlockImpl
*
This
,
const
struct
wined3d_state
*
state
)
{
{
UINT
i
;
UINT
i
;
/* Lights... For a recorded state block, we just had a chain of actions
to perform,
/* Lights... For a recorded state block, we just had a chain of actions
*
so we need to walk that chain and update any actions which differ
*
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
;
struct
list
*
e
,
*
f
;
LIST_FOR_EACH
(
e
,
&
This
->
state
.
light_map
[
i
])
LIST_FOR_EACH
(
e
,
&
dst_state
->
light_map
[
i
])
{
{
BOOL
updated
=
FALSE
;
BOOL
updated
=
FALSE
;
struct
wined3d_light_info
*
src
=
LIST_ENTRY
(
e
,
struct
wined3d_light_info
,
entry
),
*
realLight
;
struct
wined3d_light_info
*
src
=
LIST_ENTRY
(
e
,
struct
wined3d_light_info
,
entry
),
*
realLight
;
/* Look up the light in the destination */
/* Look up the light in the destination */
LIST_FOR_EACH
(
f
,
&
state
->
light_map
[
i
])
LIST_FOR_EACH
(
f
,
&
s
rc_s
tate
->
light_map
[
i
])
{
{
realLight
=
LIST_ENTRY
(
f
,
struct
wined3d_light_info
,
entry
);
realLight
=
LIST_ENTRY
(
f
,
struct
wined3d_light_info
,
entry
);
if
(
realLight
->
OriginalIndex
==
src
->
OriginalIndex
)
if
(
realLight
->
OriginalIndex
==
src
->
OriginalIndex
)
...
@@ -566,12 +563,12 @@ static void record_lights(IWineD3DStateBlockImpl *This, const struct wined3d_sta
...
@@ -566,12 +563,12 @@ static void record_lights(IWineD3DStateBlockImpl *This, const struct wined3d_sta
if
(
realLight
->
glIndex
==
-
1
&&
src
->
glIndex
!=
-
1
)
if
(
realLight
->
glIndex
==
-
1
&&
src
->
glIndex
!=
-
1
)
{
{
/* Light disabled */
/* Light disabled */
This
->
state
.
lights
[
src
->
glIndex
]
=
NULL
;
dst_state
->
lights
[
src
->
glIndex
]
=
NULL
;
}
}
else
if
(
realLight
->
glIndex
!=
-
1
&&
src
->
glIndex
==
-
1
)
else
if
(
realLight
->
glIndex
!=
-
1
&&
src
->
glIndex
==
-
1
)
{
{
/* Light enabled */
/* Light enabled */
This
->
state
.
lights
[
realLight
->
glIndex
]
=
src
;
dst_state
->
lights
[
realLight
->
glIndex
]
=
src
;
}
}
src
->
glIndex
=
realLight
->
glIndex
;
src
->
glIndex
=
realLight
->
glIndex
;
updated
=
TRUE
;
updated
=
TRUE
;
...
@@ -583,13 +580,13 @@ static void record_lights(IWineD3DStateBlockImpl *This, const struct wined3d_sta
...
@@ -583,13 +580,13 @@ static void record_lights(IWineD3DStateBlockImpl *This, const struct wined3d_sta
{
{
/* This can happen if the light was originally created as a
/* This can happen if the light was originally created as a
* default light for SetLightEnable() while recording. */
* default light for SetLightEnable() while recording. */
WARN
(
"Light %u in
stateblock %p does not exist in device
state %p.
\n
"
,
WARN
(
"Light %u in
dst_state %p does not exist in src_
state %p.
\n
"
,
src
->
OriginalIndex
,
This
,
state
);
src
->
OriginalIndex
,
dst_state
,
src_
state
);
src
->
OriginalParms
=
WINED3D_default_light
;
src
->
OriginalParms
=
WINED3D_default_light
;
if
(
src
->
glIndex
!=
-
1
)
if
(
src
->
glIndex
!=
-
1
)
{
{
This
->
state
.
lights
[
src
->
glIndex
]
=
NULL
;
dst_state
->
lights
[
src
->
glIndex
]
=
NULL
;
src
->
glIndex
=
-
1
;
src
->
glIndex
=
-
1
;
}
}
}
}
...
@@ -879,7 +876,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface)
...
@@ -879,7 +876,7 @@ static HRESULT WINAPI IWineD3DStateBlockImpl_Capture(IWineD3DStateBlock *iface)
This
->
state
.
pixel_shader
=
src_state
->
pixel_shader
;
This
->
state
.
pixel_shader
=
src_state
->
pixel_shader
;
}
}
record_lights
(
This
,
src_state
);
wined3d_state_record_lights
(
&
This
->
state
,
src_state
);
TRACE
(
"Captue done.
\n
"
);
TRACE
(
"Captue done.
\n
"
);
...
...
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