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
7bb6dc7b
Commit
7bb6dc7b
authored
Dec 29, 2022
by
Zebediah Figura
Committed by
Alexandre Julliard
Sep 26, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Remove invalid parameter checks from internal wined3d_device_set_*() functions.
parent
ae8b7109
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
31 deletions
+2
-31
stateblock.c
dlls/wined3d/stateblock.c
+2
-31
No files found.
dlls/wined3d/stateblock.c
View file @
7bb6dc7b
...
...
@@ -2398,30 +2398,22 @@ static void wined3d_device_set_light_enable(struct wined3d_device *device, unsig
wined3d_device_context_emit_set_light_enable
(
&
device
->
cs
->
c
,
light_idx
,
enable
);
}
static
HRESULT
wined3d_device_set_clip_plane
(
struct
wined3d_device
*
device
,
static
void
wined3d_device_set_clip_plane
(
struct
wined3d_device
*
device
,
unsigned
int
plane_idx
,
const
struct
wined3d_vec4
*
plane
)
{
struct
wined3d_vec4
*
clip_planes
=
device
->
cs
->
c
.
state
->
clip_planes
;
TRACE
(
"device %p, plane_idx %u, plane %p.
\n
"
,
device
,
plane_idx
,
plane
);
if
(
plane_idx
>=
device
->
adapter
->
d3d_info
.
limits
.
max_clip_distances
)
{
TRACE
(
"Application has requested clipplane this device doesn't support.
\n
"
);
return
WINED3DERR_INVALIDCALL
;
}
if
(
!
memcmp
(
&
clip_planes
[
plane_idx
],
plane
,
sizeof
(
*
plane
)))
{
TRACE
(
"Application is setting old values over, nothing to do.
\n
"
);
return
WINED3D_OK
;
return
;
}
clip_planes
[
plane_idx
]
=
*
plane
;
wined3d_device_context_emit_set_clip_plane
(
&
device
->
cs
->
c
,
plane_idx
,
plane
);
return
WINED3D_OK
;
}
static
void
resolve_depth_buffer
(
struct
wined3d_device
*
device
)
...
...
@@ -2446,12 +2438,6 @@ static void resolve_depth_buffer(struct wined3d_device *device)
static
void
wined3d_device_set_render_state
(
struct
wined3d_device
*
device
,
enum
wined3d_render_state
state
,
unsigned
int
value
)
{
if
(
state
>
WINEHIGHEST_RENDER_STATE
)
{
WARN
(
"Unhandled render state %#x.
\n
"
,
state
);
return
;
}
if
(
value
==
device
->
cs
->
c
.
state
->
render_states
[
state
])
{
TRACE
(
"Application is setting the old value over, nothing to do.
\n
"
);
...
...
@@ -2472,18 +2458,9 @@ static void wined3d_device_set_render_state(struct wined3d_device *device,
static
void
wined3d_device_set_texture_stage_state
(
struct
wined3d_device
*
device
,
unsigned
int
stage
,
enum
wined3d_texture_stage_state
state
,
uint32_t
value
)
{
const
struct
wined3d_d3d_info
*
d3d_info
=
&
device
->
adapter
->
d3d_info
;
TRACE
(
"device %p, stage %u, state %s, value %#x.
\n
"
,
device
,
stage
,
debug_d3dtexturestate
(
state
),
value
);
if
(
stage
>=
d3d_info
->
limits
.
ffp_blend_stages
)
{
WARN
(
"Attempting to set stage %u which is higher than the max stage %u, ignoring.
\n
"
,
stage
,
d3d_info
->
limits
.
ffp_blend_stages
-
1
);
return
;
}
if
(
value
==
device
->
cs
->
c
.
state
->
texture_states
[
stage
][
state
])
{
TRACE
(
"Application is setting the old value over, nothing to do.
\n
"
);
...
...
@@ -2519,12 +2496,6 @@ static void wined3d_device_set_texture(struct wined3d_device *device,
TRACE
(
"device %p, stage %u, texture %p.
\n
"
,
device
,
stage
,
texture
);
if
(
stage
>=
ARRAY_SIZE
(
state
->
textures
))
{
WARN
(
"Ignoring invalid stage %u.
\n
"
,
stage
);
return
;
}
prev
=
state
->
textures
[
stage
];
TRACE
(
"Previous texture %p.
\n
"
,
prev
);
...
...
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