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
75cec973
Commit
75cec973
authored
Sep 11, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 11, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: wined3d_device_set_render_state() never fails.
parent
d2fdeaa4
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
21 deletions
+14
-21
device.c
dlls/d3d8/device.c
+5
-11
device.c
dlls/d3d9/device.c
+2
-3
device.c
dlls/ddraw/device.c
+4
-2
device.c
dlls/wined3d/device.c
+2
-4
wined3d.h
include/wine/wined3d.h
+1
-1
No files found.
dlls/d3d8/device.c
View file @
75cec973
...
...
@@ -600,7 +600,7 @@ static HRESULT WINAPI d3d8_device_Reset(IDirect3DDevice8 *iface,
wined3d_swapchain_desc_from_present_parameters
(
&
swapchain_desc
,
present_parameters
);
if
(
SUCCEEDED
(
hr
=
wined3d_device_reset
(
device
->
wined3d_device
,
&
swapchain_desc
,
NULL
,
reset_enum_callback
)))
{
hr
=
wined3d_device_set_render_state
(
device
->
wined3d_device
,
WINED3D_RS_POINTSIZE_MIN
,
0
);
wined3d_device_set_render_state
(
device
->
wined3d_device
,
WINED3D_RS_POINTSIZE_MIN
,
0
);
device
->
lost
=
FALSE
;
}
else
...
...
@@ -1453,7 +1453,6 @@ static HRESULT WINAPI d3d8_device_SetRenderState(IDirect3DDevice8 *iface,
D3DRENDERSTATETYPE
state
,
DWORD
value
)
{
struct
d3d8_device
*
device
=
impl_from_IDirect3DDevice8
(
iface
);
HRESULT
hr
;
TRACE
(
"iface %p, state %#x, value %#x.
\n
"
,
iface
,
state
,
value
);
...
...
@@ -1461,15 +1460,15 @@ static HRESULT WINAPI d3d8_device_SetRenderState(IDirect3DDevice8 *iface,
switch
(
state
)
{
case
D3DRS_ZBIAS
:
hr
=
wined3d_device_set_render_state
(
device
->
wined3d_device
,
WINED3D_RS_DEPTHBIAS
,
value
);
wined3d_device_set_render_state
(
device
->
wined3d_device
,
WINED3D_RS_DEPTHBIAS
,
value
);
break
;
default:
hr
=
wined3d_device_set_render_state
(
device
->
wined3d_device
,
state
,
value
);
wined3d_device_set_render_state
(
device
->
wined3d_device
,
state
,
value
);
}
wined3d_mutex_unlock
();
return
hr
;
return
D3D_OK
;
}
static
HRESULT
WINAPI
d3d8_device_GetRenderState
(
IDirect3DDevice8
*
iface
,
...
...
@@ -3038,13 +3037,8 @@ HRESULT device_init(struct d3d8_device *device, struct d3d8 *parent, struct wine
return
hr
;
}
hr
=
wined3d_device_set_render_state
(
device
->
wined3d_device
,
WINED3D_RS_POINTSIZE_MIN
,
0
);
wined3d_device_set_render_state
(
device
->
wined3d_device
,
WINED3D_RS_POINTSIZE_MIN
,
0
);
wined3d_mutex_unlock
();
if
(
FAILED
(
hr
))
{
ERR
(
"Failed to set minimum pointsize, hr %#x.
\n
"
,
hr
);
goto
err
;
}
present_parameters_from_wined3d_swapchain_desc
(
parameters
,
&
swapchain_desc
);
...
...
dlls/d3d9/device.c
View file @
75cec973
...
...
@@ -1519,15 +1519,14 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH d3d9_device_SetRenderState(IDirect3DDevi
D3DRENDERSTATETYPE
state
,
DWORD
value
)
{
struct
d3d9_device
*
device
=
impl_from_IDirect3DDevice9Ex
(
iface
);
HRESULT
hr
;
TRACE
(
"iface %p, state %#x, value %#x.
\n
"
,
iface
,
state
,
value
);
wined3d_mutex_lock
();
hr
=
wined3d_device_set_render_state
(
device
->
wined3d_device
,
state
,
value
);
wined3d_device_set_render_state
(
device
->
wined3d_device
,
state
,
value
);
wined3d_mutex_unlock
();
return
hr
;
return
D3D_OK
;
}
static
HRESULT
WINAPI
d3d9_device_GetRenderState
(
IDirect3DDevice9Ex
*
iface
,
...
...
dlls/ddraw/device.c
View file @
75cec973
...
...
@@ -2627,7 +2627,8 @@ static HRESULT d3d_device7_SetRenderState(IDirect3DDevice7 *iface,
break
;
case
D3DRENDERSTATE_ZBIAS
:
hr
=
wined3d_device_set_render_state
(
device
->
wined3d_device
,
WINED3D_RS_DEPTHBIAS
,
value
);
wined3d_device_set_render_state
(
device
->
wined3d_device
,
WINED3D_RS_DEPTHBIAS
,
value
);
hr
=
D3D_OK
;
break
;
default:
...
...
@@ -2639,7 +2640,8 @@ static HRESULT d3d_device7_SetRenderState(IDirect3DDevice7 *iface,
break
;
}
hr
=
wined3d_device_set_render_state
(
device
->
wined3d_device
,
state
,
value
);
wined3d_device_set_render_state
(
device
->
wined3d_device
,
state
,
value
);
hr
=
D3D_OK
;
break
;
}
wined3d_mutex_unlock
();
...
...
dlls/wined3d/device.c
View file @
75cec973
...
...
@@ -2317,7 +2317,7 @@ void CDECL wined3d_device_get_viewport(const struct wined3d_device *device, stru
*
viewport
=
device
->
stateBlock
->
state
.
viewport
;
}
HRESULT
CDECL
wined3d_device_set_render_state
(
struct
wined3d_device
*
device
,
void
CDECL
wined3d_device_set_render_state
(
struct
wined3d_device
*
device
,
enum
wined3d_render_state
state
,
DWORD
value
)
{
DWORD
old_value
=
device
->
stateBlock
->
state
.
render_states
[
state
];
...
...
@@ -2331,7 +2331,7 @@ HRESULT CDECL wined3d_device_set_render_state(struct wined3d_device *device,
if
(
device
->
isRecordingState
)
{
TRACE
(
"Recording... not performing anything.
\n
"
);
return
WINED3D_OK
;
return
;
}
/* Compared here and not before the assignment to allow proper stateblock recording. */
...
...
@@ -2339,8 +2339,6 @@ HRESULT CDECL wined3d_device_set_render_state(struct wined3d_device *device,
TRACE
(
"Application is setting the old value over, nothing to do.
\n
"
);
else
device_invalidate_state
(
device
,
STATE_RENDER
(
state
));
return
WINED3D_OK
;
}
HRESULT
CDECL
wined3d_device_get_render_state
(
const
struct
wined3d_device
*
device
,
...
...
include/wine/wined3d.h
View file @
75cec973
...
...
@@ -2220,7 +2220,7 @@ HRESULT __cdecl wined3d_device_set_ps_consts_f(struct wined3d_device *device,
UINT
start_register
,
const
float
*
constants
,
UINT
vector4f_count
);
HRESULT
__cdecl
wined3d_device_set_ps_consts_i
(
struct
wined3d_device
*
device
,
UINT
start_register
,
const
int
*
constants
,
UINT
vector4i_count
);
HRESULT
__cdecl
wined3d_device_set_render_state
(
struct
wined3d_device
*
device
,
void
__cdecl
wined3d_device_set_render_state
(
struct
wined3d_device
*
device
,
enum
wined3d_render_state
state
,
DWORD
value
);
HRESULT
__cdecl
wined3d_device_set_render_target
(
struct
wined3d_device
*
device
,
UINT
render_target_idx
,
struct
wined3d_surface
*
render_target
,
BOOL
set_viewport
);
...
...
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