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
83ff5b50
Commit
83ff5b50
authored
Sep 02, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 03, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Handle D3DRENDERSTATE_TEXTUREHANDLE and D3DRENDERSTATE_TEXTUREMAPBLEND in d3d7.
parent
fa3a72c6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
20 deletions
+22
-20
device.c
dlls/ddraw/device.c
+12
-0
d3d.c
dlls/ddraw/tests/d3d.c
+10
-20
No files found.
dlls/ddraw/device.c
View file @
83ff5b50
...
...
@@ -2492,6 +2492,12 @@ IDirect3DDeviceImpl_7_GetRenderState(IDirect3DDevice7 *iface,
hr
=
E_NOTIMPL
;
break
;
case
D3DRENDERSTATE_TEXTUREHANDLE
:
case
D3DRENDERSTATE_TEXTUREMAPBLEND
:
WARN
(
"Render state %#x is invalid in d3d7.
\n
"
,
RenderStateType
);
hr
=
DDERR_INVALIDPARAMS
;
break
;
default:
if
(
RenderStateType
>=
D3DRENDERSTATE_STIPPLEPATTERN00
&&
RenderStateType
<=
D3DRENDERSTATE_STIPPLEPATTERN31
)
...
...
@@ -2802,6 +2808,12 @@ IDirect3DDeviceImpl_7_SetRenderState(IDirect3DDevice7 *iface,
hr
=
E_NOTIMPL
;
break
;
case
D3DRENDERSTATE_TEXTUREHANDLE
:
case
D3DRENDERSTATE_TEXTUREMAPBLEND
:
WARN
(
"Render state %#x is invalid in d3d7.
\n
"
,
RenderStateType
);
hr
=
DDERR_INVALIDPARAMS
;
break
;
default:
if
(
RenderStateType
>=
D3DRENDERSTATE_STIPPLEPATTERN00
&&
RenderStateType
<=
D3DRENDERSTATE_STIPPLEPATTERN31
)
...
...
dlls/ddraw/tests/d3d.c
View file @
83ff5b50
...
...
@@ -1818,28 +1818,18 @@ out:
static
void
D3D7_OldRenderStateTest
(
void
)
{
HRESULT
rc
;
HRESULT
hr
;
DWORD
val
;
/* Test reaction to some deprecated states in D3D7.
* IDirect3DDevice7 in Wine currently relays such states to wined3d where they are do-nothing and return 0, instead
* of INVALIDPARAMS. Unless an app is found which cares this is probably ok. What this test shows is that these states
* need not to be handled in D3D7.
*/
todo_wine
{
rc
=
IDirect3DDevice7_SetRenderState
(
lpD3DDevice
,
D3DRENDERSTATE_TEXTUREHANDLE
,
0
);
ok
(
rc
==
DDERR_INVALIDPARAMS
,
"IDirect3DDevice7_SetRenderState returned %08x
\n
"
,
rc
);
rc
=
IDirect3DDevice7_GetRenderState
(
lpD3DDevice
,
D3DRENDERSTATE_TEXTUREHANDLE
,
&
val
);
ok
(
rc
==
DDERR_INVALIDPARAMS
,
"IDirect3DDevice7_GetRenderState returned %08x
\n
"
,
rc
);
rc
=
IDirect3DDevice7_SetRenderState
(
lpD3DDevice
,
D3DRENDERSTATE_TEXTUREMAPBLEND
,
D3DTBLEND_MODULATE
);
ok
(
rc
==
DDERR_INVALIDPARAMS
,
"IDirect3DDevice7_SetRenderState returned %08x
\n
"
,
rc
);
rc
=
IDirect3DDevice7_GetRenderState
(
lpD3DDevice
,
D3DRENDERSTATE_TEXTUREMAPBLEND
,
&
val
);
ok
(
rc
==
DDERR_INVALIDPARAMS
,
"IDirect3DDevice7_GetRenderState returned %08x
\n
"
,
rc
);
}
/* Test reaction to some deprecated states in D3D7. */
hr
=
IDirect3DDevice7_SetRenderState
(
lpD3DDevice
,
D3DRENDERSTATE_TEXTUREHANDLE
,
0
);
ok
(
hr
==
DDERR_INVALIDPARAMS
,
"IDirect3DDevice7_SetRenderState returned %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice7_GetRenderState
(
lpD3DDevice
,
D3DRENDERSTATE_TEXTUREHANDLE
,
&
val
);
ok
(
hr
==
DDERR_INVALIDPARAMS
,
"IDirect3DDevice7_GetRenderState returned %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice7_SetRenderState
(
lpD3DDevice
,
D3DRENDERSTATE_TEXTUREMAPBLEND
,
D3DTBLEND_MODULATE
);
ok
(
hr
==
DDERR_INVALIDPARAMS
,
"IDirect3DDevice7_SetRenderState returned %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice7_GetRenderState
(
lpD3DDevice
,
D3DRENDERSTATE_TEXTUREMAPBLEND
,
&
val
);
ok
(
hr
==
DDERR_INVALIDPARAMS
,
"IDirect3DDevice7_GetRenderState returned %#x.
\n
"
,
hr
);
}
#define IS_VALUE_NEAR(a, b) ( ((a) == (b)) || ((a) == (b) - 1) || ((a) == (b) + 1) )
...
...
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