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
0d96be2c
Commit
0d96be2c
authored
Sep 18, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 19, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: wined3d_device_set_sampler_state() never fails.
parent
b0795aaf
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
21 deletions
+16
-21
device.c
dlls/d3d8/device.c
+2
-2
device.c
dlls/d3d9/device.c
+2
-3
device.c
dlls/ddraw/device.c
+7
-9
device.c
dlls/wined3d/device.c
+4
-6
wined3d.h
include/wine/wined3d.h
+1
-1
No files found.
dlls/d3d8/device.c
View file @
0d96be2c
...
...
@@ -1812,7 +1812,7 @@ static HRESULT WINAPI d3d8_device_SetTextureStageState(IDirect3DDevice8 *iface,
{
struct
d3d8_device
*
device
=
impl_from_IDirect3DDevice8
(
iface
);
const
struct
tss_lookup
*
l
;
HRESULT
hr
;
HRESULT
hr
=
D3D_OK
;
TRACE
(
"iface %p, stage %u, state %#x, value %#x.
\n
"
,
iface
,
stage
,
type
,
value
);
...
...
@@ -1826,7 +1826,7 @@ static HRESULT WINAPI d3d8_device_SetTextureStageState(IDirect3DDevice8 *iface,
wined3d_mutex_lock
();
if
(
l
->
sampler_state
)
hr
=
wined3d_device_set_sampler_state
(
device
->
wined3d_device
,
stage
,
l
->
state
,
value
);
wined3d_device_set_sampler_state
(
device
->
wined3d_device
,
stage
,
l
->
state
,
value
);
else
hr
=
wined3d_device_set_texture_stage_state
(
device
->
wined3d_device
,
stage
,
l
->
state
,
value
);
wined3d_mutex_unlock
();
...
...
dlls/d3d9/device.c
View file @
0d96be2c
...
...
@@ -1809,15 +1809,14 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH d3d9_device_SetSamplerState(IDirect3DDev
DWORD
sampler
,
D3DSAMPLERSTATETYPE
state
,
DWORD
value
)
{
struct
d3d9_device
*
device
=
impl_from_IDirect3DDevice9Ex
(
iface
);
HRESULT
hr
;
TRACE
(
"iface %p, sampler %u, state %#x, value %#x.
\n
"
,
iface
,
sampler
,
state
,
value
);
wined3d_mutex_lock
();
hr
=
wined3d_device_set_sampler_state
(
device
->
wined3d_device
,
sampler
,
state
,
value
);
wined3d_device_set_sampler_state
(
device
->
wined3d_device
,
sampler
,
state
,
value
);
wined3d_mutex_unlock
();
return
hr
;
return
D3D_OK
;
}
static
HRESULT
WINAPI
d3d9_device_ValidateDevice
(
IDirect3DDevice9Ex
*
iface
,
DWORD
*
pass_count
)
...
...
dlls/ddraw/device.c
View file @
0d96be2c
...
...
@@ -2509,7 +2509,7 @@ static HRESULT d3d_device7_SetRenderState(IDirect3DDevice7 *iface,
D3DRENDERSTATETYPE
state
,
DWORD
value
)
{
struct
d3d_device
*
device
=
impl_from_IDirect3DDevice7
(
iface
);
HRESULT
hr
;
HRESULT
hr
=
D3D_OK
;
TRACE
(
"iface %p, state %#x, value %#x.
\n
"
,
iface
,
state
,
value
);
...
...
@@ -2552,7 +2552,7 @@ static HRESULT d3d_device7_SetRenderState(IDirect3DDevice7 *iface,
break
;
}
hr
=
wined3d_device_set_sampler_state
(
device
->
wined3d_device
,
0
,
WINED3D_SAMP_MAG_FILTER
,
tex_mag
);
wined3d_device_set_sampler_state
(
device
->
wined3d_device
,
0
,
WINED3D_SAMP_MAG_FILTER
,
tex_mag
);
break
;
}
...
...
@@ -2597,7 +2597,7 @@ static HRESULT d3d_device7_SetRenderState(IDirect3DDevice7 *iface,
wined3d_device_set_sampler_state
(
device
->
wined3d_device
,
0
,
WINED3D_SAMP_MIP_FILTER
,
tex_mip
);
hr
=
wined3d_device_set_sampler_state
(
device
->
wined3d_device
,
wined3d_device_set_sampler_state
(
device
->
wined3d_device
,
0
,
WINED3D_SAMP_MIN_FILTER
,
tex_min
);
break
;
}
...
...
@@ -2607,11 +2607,11 @@ static HRESULT d3d_device7_SetRenderState(IDirect3DDevice7 *iface,
0
,
WINED3D_SAMP_ADDRESS_V
,
value
);
/* Drop through */
case
D3DRENDERSTATE_TEXTUREADDRESSU
:
hr
=
wined3d_device_set_sampler_state
(
device
->
wined3d_device
,
wined3d_device_set_sampler_state
(
device
->
wined3d_device
,
0
,
WINED3D_SAMP_ADDRESS_U
,
value
);
break
;
case
D3DRENDERSTATE_TEXTUREADDRESSV
:
hr
=
wined3d_device_set_sampler_state
(
device
->
wined3d_device
,
wined3d_device_set_sampler_state
(
device
->
wined3d_device
,
0
,
WINED3D_SAMP_ADDRESS_V
,
value
);
break
;
...
...
@@ -2630,7 +2630,6 @@ static HRESULT d3d_device7_SetRenderState(IDirect3DDevice7 *iface,
case
D3DRENDERSTATE_ZBIAS
:
wined3d_device_set_render_state
(
device
->
wined3d_device
,
WINED3D_RS_DEPTHBIAS
,
value
);
hr
=
D3D_OK
;
break
;
default:
...
...
@@ -2643,7 +2642,6 @@ static HRESULT d3d_device7_SetRenderState(IDirect3DDevice7 *iface,
}
wined3d_device_set_render_state
(
device
->
wined3d_device
,
state
,
value
);
hr
=
D3D_OK
;
break
;
}
wined3d_mutex_unlock
();
...
...
@@ -4728,7 +4726,7 @@ static HRESULT d3d_device7_SetTextureStageState(IDirect3DDevice7 *iface,
{
struct
d3d_device
*
device
=
impl_from_IDirect3DDevice7
(
iface
);
const
struct
tss_lookup
*
l
;
HRESULT
hr
;
HRESULT
hr
=
D3D_OK
;
TRACE
(
"iface %p, stage %u, state %#x, value %#x.
\n
"
,
iface
,
stage
,
state
,
value
);
...
...
@@ -4806,7 +4804,7 @@ static HRESULT d3d_device7_SetTextureStageState(IDirect3DDevice7 *iface,
break
;
}
hr
=
wined3d_device_set_sampler_state
(
device
->
wined3d_device
,
stage
,
l
->
state
,
value
);
wined3d_device_set_sampler_state
(
device
->
wined3d_device
,
stage
,
l
->
state
,
value
);
}
else
{
...
...
dlls/wined3d/device.c
View file @
0d96be2c
...
...
@@ -2325,7 +2325,7 @@ DWORD CDECL wined3d_device_get_render_state(const struct wined3d_device *device,
return
device
->
stateBlock
->
state
.
render_states
[
state
];
}
HRESULT
CDECL
wined3d_device_set_sampler_state
(
struct
wined3d_device
*
device
,
void
CDECL
wined3d_device_set_sampler_state
(
struct
wined3d_device
*
device
,
UINT
sampler_idx
,
enum
wined3d_sampler_state
state
,
DWORD
value
)
{
DWORD
old_value
;
...
...
@@ -2340,7 +2340,7 @@ HRESULT CDECL wined3d_device_set_sampler_state(struct wined3d_device *device,
/
sizeof
(
*
device
->
stateBlock
->
state
.
sampler_states
))
{
WARN
(
"Invalid sampler %u.
\n
"
,
sampler_idx
);
return
WINED3D_OK
;
/* Windows accepts overflowing this array ... we do not. */
return
;
/* Windows accepts overflowing this array ... we do not. */
}
old_value
=
device
->
stateBlock
->
state
.
sampler_states
[
sampler_idx
][
state
];
...
...
@@ -2351,18 +2351,16 @@ HRESULT CDECL wined3d_device_set_sampler_state(struct wined3d_device *device,
if
(
device
->
isRecordingState
)
{
TRACE
(
"Recording... not performing anything.
\n
"
);
return
WINED3D_OK
;
return
;
}
if
(
old_value
==
value
)
{
TRACE
(
"Application is setting the old value over, nothing to do.
\n
"
);
return
WINED3D_OK
;
return
;
}
device_invalidate_state
(
device
,
STATE_SAMPLER
(
sampler_idx
));
return
WINED3D_OK
;
}
HRESULT
CDECL
wined3d_device_get_sampler_state
(
const
struct
wined3d_device
*
device
,
...
...
include/wine/wined3d.h
View file @
0d96be2c
...
...
@@ -2223,7 +2223,7 @@ 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
);
HRESULT
__cdecl
wined3d_device_set_sampler_state
(
struct
wined3d_device
*
device
,
void
__cdecl
wined3d_device_set_sampler_state
(
struct
wined3d_device
*
device
,
UINT
sampler_idx
,
enum
wined3d_sampler_state
state
,
DWORD
value
);
HRESULT
__cdecl
wined3d_device_set_scissor_rect
(
struct
wined3d_device
*
device
,
const
RECT
*
rect
);
HRESULT
__cdecl
wined3d_device_set_software_vertex_processing
(
struct
wined3d_device
*
device
,
BOOL
software
);
...
...
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