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
c0a83b1d
Commit
c0a83b1d
authored
Sep 26, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 26, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: wined3d_device_get_texture_stage_state() never fails.
parent
26c07140
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
27 deletions
+21
-27
device.c
dlls/d3d8/device.c
+2
-3
device.c
dlls/d3d9/device.c
+2
-3
device.c
dlls/ddraw/device.c
+8
-9
device.c
dlls/wined3d/device.c
+6
-9
wined3d.spec
dlls/wined3d/wined3d.spec
+1
-1
wined3d.h
include/wine/wined3d.h
+2
-2
No files found.
dlls/d3d8/device.c
View file @
c0a83b1d
...
...
@@ -1785,7 +1785,6 @@ static HRESULT WINAPI d3d8_device_GetTextureStageState(IDirect3DDevice8 *iface,
{
struct
d3d8_device
*
device
=
impl_from_IDirect3DDevice8
(
iface
);
const
struct
tss_lookup
*
l
;
HRESULT
hr
=
D3D_OK
;
TRACE
(
"iface %p, stage %u, state %#x, value %p.
\n
"
,
iface
,
stage
,
Type
,
value
);
...
...
@@ -1801,10 +1800,10 @@ static HRESULT WINAPI d3d8_device_GetTextureStageState(IDirect3DDevice8 *iface,
if
(
l
->
sampler_state
)
*
value
=
wined3d_device_get_sampler_state
(
device
->
wined3d_device
,
stage
,
l
->
state
);
else
hr
=
wined3d_device_get_texture_stage_state
(
device
->
wined3d_device
,
stage
,
l
->
state
,
valu
e
);
*
value
=
wined3d_device_get_texture_stage_state
(
device
->
wined3d_device
,
stage
,
l
->
stat
e
);
wined3d_mutex_unlock
();
return
hr
;
return
D3D_OK
;
}
static
HRESULT
WINAPI
d3d8_device_SetTextureStageState
(
IDirect3DDevice8
*
iface
,
...
...
dlls/d3d9/device.c
View file @
c0a83b1d
...
...
@@ -1752,7 +1752,6 @@ static HRESULT WINAPI d3d9_device_GetTextureStageState(IDirect3DDevice9Ex *iface
DWORD
stage
,
D3DTEXTURESTAGESTATETYPE
state
,
DWORD
*
value
)
{
struct
d3d9_device
*
device
=
impl_from_IDirect3DDevice9Ex
(
iface
);
HRESULT
hr
;
TRACE
(
"iface %p, stage %u, state %#x, value %p.
\n
"
,
iface
,
stage
,
state
,
value
);
...
...
@@ -1763,10 +1762,10 @@ static HRESULT WINAPI d3d9_device_GetTextureStageState(IDirect3DDevice9Ex *iface
}
wined3d_mutex_lock
();
hr
=
wined3d_device_get_texture_stage_state
(
device
->
wined3d_device
,
stage
,
tss_lookup
[
state
],
value
);
*
value
=
wined3d_device_get_texture_stage_state
(
device
->
wined3d_device
,
stage
,
tss_lookup
[
state
]
);
wined3d_mutex_unlock
();
return
hr
;
return
D3D_OK
;
}
static
HRESULT
WINAPI
d3d9_device_SetTextureStageState
(
IDirect3DDevice9Ex
*
iface
,
...
...
dlls/ddraw/device.c
View file @
c0a83b1d
...
...
@@ -2401,12 +2401,12 @@ static HRESULT WINAPI d3d_device3_GetRenderState(IDirect3DDevice3 *iface,
device
->
legacyTextureBlending
=
TRUE
;
wined3d_device_get_texture_stage_state
(
device
->
wined3d_device
,
0
,
WINED3D_TSS_COLOR_OP
,
&
colorop
);
wined3d_device_get_texture_stage_state
(
device
->
wined3d_device
,
0
,
WINED3D_TSS_COLOR_ARG1
,
&
colorarg
1
);
wined3d_device_get_texture_stage_state
(
device
->
wined3d_device
,
0
,
WINED3D_TSS_COLOR_ARG2
,
&
colorarg
2
);
wined3d_device_get_texture_stage_state
(
device
->
wined3d_device
,
0
,
WINED3D_TSS_ALPHA_OP
,
&
alphaop
);
wined3d_device_get_texture_stage_state
(
device
->
wined3d_device
,
0
,
WINED3D_TSS_ALPHA_ARG1
,
&
alphaarg
1
);
wined3d_device_get_texture_stage_state
(
device
->
wined3d_device
,
0
,
WINED3D_TSS_ALPHA_ARG2
,
&
alphaarg
2
);
colorop
=
wined3d_device_get_texture_stage_state
(
device
->
wined3d_device
,
0
,
WINED3D_TSS_COLOR_OP
);
colorarg1
=
wined3d_device_get_texture_stage_state
(
device
->
wined3d_device
,
0
,
WINED3D_TSS_COLOR_ARG
1
);
colorarg2
=
wined3d_device_get_texture_stage_state
(
device
->
wined3d_device
,
0
,
WINED3D_TSS_COLOR_ARG
2
);
alphaop
=
wined3d_device_get_texture_stage_state
(
device
->
wined3d_device
,
0
,
WINED3D_TSS_ALPHA_OP
);
alphaarg1
=
wined3d_device_get_texture_stage_state
(
device
->
wined3d_device
,
0
,
WINED3D_TSS_ALPHA_ARG
1
);
alphaarg2
=
wined3d_device_get_texture_stage_state
(
device
->
wined3d_device
,
0
,
WINED3D_TSS_ALPHA_ARG
2
);
if
(
colorop
==
WINED3D_TOP_SELECT_ARG1
&&
colorarg1
==
WINED3DTA_TEXTURE
&&
alphaop
==
WINED3D_TOP_SELECT_ARG1
&&
alphaarg1
==
WINED3DTA_TEXTURE
)
...
...
@@ -4543,7 +4543,6 @@ static HRESULT d3d_device7_GetTextureStageState(IDirect3DDevice7 *iface,
{
struct
d3d_device
*
device
=
impl_from_IDirect3DDevice7
(
iface
);
const
struct
tss_lookup
*
l
;
HRESULT
hr
=
D3D_OK
;
TRACE
(
"iface %p, stage %u, state %#x, value %p.
\n
"
,
iface
,
stage
,
state
,
value
);
...
...
@@ -4623,12 +4622,12 @@ static HRESULT d3d_device7_GetTextureStageState(IDirect3DDevice7 *iface,
}
else
{
hr
=
wined3d_device_get_texture_stage_state
(
device
->
wined3d_device
,
stage
,
l
->
state
,
valu
e
);
*
value
=
wined3d_device_get_texture_stage_state
(
device
->
wined3d_device
,
stage
,
l
->
stat
e
);
}
wined3d_mutex_unlock
();
return
hr
;
return
D3D_OK
;
}
static
HRESULT
WINAPI
d3d_device7_GetTextureStageState_FPUSetup
(
IDirect3DDevice7
*
iface
,
...
...
dlls/wined3d/device.c
View file @
c0a83b1d
...
...
@@ -3435,22 +3435,19 @@ void CDECL wined3d_device_set_texture_stage_state(struct wined3d_device *device,
device_invalidate_state
(
device
,
STATE_TEXTURESTAGE
(
stage
,
state
));
}
HRESULT
CDECL
wined3d_device_get_texture_stage_state
(
const
struct
wined3d_device
*
device
,
UINT
stage
,
enum
wined3d_texture_stage_state
state
,
DWORD
*
value
)
DWORD
CDECL
wined3d_device_get_texture_stage_state
(
const
struct
wined3d_device
*
device
,
UINT
stage
,
enum
wined3d_texture_stage_state
state
)
{
TRACE
(
"device %p, stage %u, state %s
, value %p
.
\n
"
,
device
,
stage
,
debug_d3dtexturestate
(
state
)
,
value
);
TRACE
(
"device %p, stage %u, state %s.
\n
"
,
device
,
stage
,
debug_d3dtexturestate
(
state
));
if
(
state
>
WINED3D_HIGHEST_TEXTURE_STATE
)
{
WARN
(
"Invalid state %#x passed.
\n
"
,
state
);
return
WINED3D_OK
;
return
0
;
}
*
value
=
device
->
updateStateBlock
->
state
.
texture_states
[
stage
][
state
];
TRACE
(
"Returning %#x.
\n
"
,
*
value
);
return
WINED3D_OK
;
return
device
->
updateStateBlock
->
state
.
texture_states
[
stage
][
state
];
}
HRESULT
CDECL
wined3d_device_set_texture
(
struct
wined3d_device
*
device
,
...
...
dlls/wined3d/wined3d.spec
View file @
c0a83b1d
...
...
@@ -86,7 +86,7 @@
@ cdecl wined3d_device_get_swapchain(ptr long)
@ cdecl wined3d_device_get_swapchain_count(ptr)
@ cdecl wined3d_device_get_texture(ptr long ptr)
@ cdecl wined3d_device_get_texture_stage_state(ptr long long
ptr
)
@ cdecl wined3d_device_get_texture_stage_state(ptr long long)
@ cdecl wined3d_device_get_transform(ptr long ptr)
@ cdecl wined3d_device_get_vertex_declaration(ptr)
@ cdecl wined3d_device_get_vertex_shader(ptr)
...
...
include/wine/wined3d.h
View file @
c0a83b1d
...
...
@@ -2160,8 +2160,8 @@ struct wined3d_swapchain * __cdecl wined3d_device_get_swapchain(const struct win
UINT
__cdecl
wined3d_device_get_swapchain_count
(
const
struct
wined3d_device
*
device
);
HRESULT
__cdecl
wined3d_device_get_texture
(
const
struct
wined3d_device
*
device
,
UINT
stage
,
struct
wined3d_texture
**
texture
);
HRESULT
__cdecl
wined3d_device_get_texture_stage_state
(
const
struct
wined3d_device
*
device
,
UINT
stage
,
enum
wined3d_texture_stage_state
state
,
DWORD
*
value
);
DWORD
__cdecl
wined3d_device_get_texture_stage_state
(
const
struct
wined3d_device
*
device
,
UINT
stage
,
enum
wined3d_texture_stage_state
state
);
void
__cdecl
wined3d_device_get_transform
(
const
struct
wined3d_device
*
device
,
enum
wined3d_transform_state
state
,
struct
wined3d_matrix
*
matrix
);
struct
wined3d_vertex_declaration
*
__cdecl
wined3d_device_get_vertex_declaration
(
const
struct
wined3d_device
*
device
);
...
...
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