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
45ee728d
Commit
45ee728d
authored
May 16, 2023
by
Paul Gofman
Committed by
Alexandre Julliard
May 23, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Only set changed.lights if wined3d_light_state_enable_light() changed state.
parent
3a59a4d1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
12 deletions
+14
-12
cs.c
dlls/wined3d/cs.c
+1
-2
device.c
dlls/wined3d/device.c
+2
-2
stateblock.c
dlls/wined3d/stateblock.c
+10
-7
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
No files found.
dlls/wined3d/cs.c
View file @
45ee728d
...
...
@@ -2057,8 +2057,7 @@ static void wined3d_cs_exec_set_light_enable(struct wined3d_cs *cs, const void *
}
prev_idx
=
light_info
->
glIndex
;
wined3d_light_state_enable_light
(
&
cs
->
state
.
light_state
,
&
device
->
adapter
->
d3d_info
,
light_info
,
op
->
enable
);
if
(
light_info
->
glIndex
!=
prev_idx
)
if
(
wined3d_light_state_enable_light
(
&
cs
->
state
.
light_state
,
&
device
->
adapter
->
d3d_info
,
light_info
,
op
->
enable
))
{
device_invalidate_state
(
device
,
STATE_LIGHT_TYPE
);
device_invalidate_state
(
device
,
STATE_ACTIVELIGHT
(
op
->
enable
?
light_info
->
glIndex
:
prev_idx
));
...
...
dlls/wined3d/device.c
View file @
45ee728d
...
...
@@ -1695,8 +1695,8 @@ static void wined3d_device_set_light_enable(struct wined3d_device *device, UINT
}
}
wined3d_light_state_enable_light
(
light_state
,
&
device
->
adapter
->
d3d_info
,
light_info
,
enable
);
wined3d_device_context_emit_set_light_enable
(
&
device
->
cs
->
c
,
light_idx
,
enable
);
if
(
wined3d_light_state_enable_light
(
light_state
,
&
device
->
adapter
->
d3d_info
,
light_info
,
enable
))
wined3d_device_context_emit_set_light_enable
(
&
device
->
cs
->
c
,
light_idx
,
enable
);
}
static
HRESULT
wined3d_device_set_clip_plane
(
struct
wined3d_device
*
device
,
...
...
dlls/wined3d/stateblock.c
View file @
45ee728d
...
...
@@ -634,7 +634,7 @@ HRESULT wined3d_light_state_set_light(struct wined3d_light_state *state, DWORD l
return
WINED3D_OK
;
}
void
wined3d_light_state_enable_light
(
struct
wined3d_light_state
*
state
,
const
struct
wined3d_d3d_info
*
d3d_info
,
bool
wined3d_light_state_enable_light
(
struct
wined3d_light_state
*
state
,
const
struct
wined3d_d3d_info
*
d3d_info
,
struct
wined3d_light_info
*
light_info
,
BOOL
enable
)
{
unsigned
int
light_count
,
i
;
...
...
@@ -644,18 +644,18 @@ void wined3d_light_state_enable_light(struct wined3d_light_state *state, const s
if
(
light_info
->
glIndex
==
-
1
)
{
TRACE
(
"Light already disabled, nothing to do.
\n
"
);
return
;
return
false
;
}
state
->
lights
[
light_info
->
glIndex
]
=
NULL
;
light_info
->
glIndex
=
-
1
;
return
;
return
true
;
}
if
(
light_info
->
glIndex
!=
-
1
)
{
TRACE
(
"Light already enabled, nothing to do.
\n
"
);
return
;
return
false
;
}
/* Find a free light. */
...
...
@@ -667,7 +667,7 @@ void wined3d_light_state_enable_light(struct wined3d_light_state *state, const s
state
->
lights
[
i
]
=
light_info
;
light_info
->
glIndex
=
i
;
return
;
return
true
;
}
/* Our tests show that Windows returns D3D_OK in this situation, even with
...
...
@@ -677,6 +677,7 @@ void wined3d_light_state_enable_light(struct wined3d_light_state *state, const s
*
* TODO: Test how this affects rendering. */
WARN
(
"Too many concurrently active lights.
\n
"
);
return
false
;
}
static
void
wined3d_state_record_lights
(
struct
wined3d_light_state
*
dst_state
,
...
...
@@ -1616,8 +1617,10 @@ HRESULT CDECL wined3d_stateblock_set_light_enable(struct wined3d_stateblock *sta
if
(
FAILED
(
hr
=
wined3d_light_state_set_light
(
light_state
,
light_idx
,
&
WINED3D_default_light
,
&
light_info
)))
return
hr
;
}
wined3d_light_state_enable_light
(
light_state
,
&
stateblock
->
device
->
adapter
->
d3d_info
,
light_info
,
enable
);
stateblock
->
changed
.
lights
=
1
;
if
(
wined3d_light_state_enable_light
(
light_state
,
&
stateblock
->
device
->
adapter
->
d3d_info
,
light_info
,
enable
))
stateblock
->
changed
.
lights
=
1
;
return
S_OK
;
}
...
...
dlls/wined3d/wined3d_private.h
View file @
45ee728d
...
...
@@ -5049,7 +5049,7 @@ void wined3d_stateblock_state_init(struct wined3d_stateblock_state *state,
const
struct
wined3d_device
*
device
,
uint32_t
flags
)
DECLSPEC_HIDDEN
;
void
wined3d_stateblock_state_cleanup
(
struct
wined3d_stateblock_state
*
state
)
DECLSPEC_HIDDEN
;
void
wined3d_light_state_enable_light
(
struct
wined3d_light_state
*
state
,
const
struct
wined3d_d3d_info
*
d3d_info
,
bool
wined3d_light_state_enable_light
(
struct
wined3d_light_state
*
state
,
const
struct
wined3d_d3d_info
*
d3d_info
,
struct
wined3d_light_info
*
light_info
,
BOOL
enable
)
DECLSPEC_HIDDEN
;
struct
wined3d_light_info
*
wined3d_light_state_get_light
(
const
struct
wined3d_light_state
*
state
,
unsigned
int
idx
)
DECLSPEC_HIDDEN
;
...
...
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