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
451d85a7
Commit
451d85a7
authored
Jan 27, 2008
by
Stefan Dösinger
Committed by
Alexandre Julliard
Feb 05, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9: Some drivers allow non-aligned offsets.
parent
3d2aa7af
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
18 deletions
+22
-18
device.c
dlls/d3d9/tests/device.c
+22
-18
No files found.
dlls/d3d9/tests/device.c
View file @
451d85a7
...
...
@@ -1755,34 +1755,38 @@ static void test_set_stream_source(void)
hr
=
IDirect3DDevice9_CreateVertexBuffer
(
device
,
512
,
0
,
0
,
D3DPOOL_DEFAULT
,
&
pVertexBuffer
,
NULL
);
ok
(
hr
==
D3D_OK
,
"Failed to create a vertex buffer, hr = %s
\n
"
,
DXGetErrorString9
(
hr
));
if
(
SUCCEEDED
(
hr
))
{
hr
=
IDirect3DDevice9_SetStreamSource
(
device
,
0
,
pVertexBuffer
,
0
,
32
);
ok
(
hr
==
D3D_OK
,
"Failed to set the stream source, offset 0, hr = %s
\n
"
,
DXGetErrorString9
(
hr
));
hr
=
IDirect3DDevice9_SetStreamSource
(
device
,
0
,
pVertexBuffer
,
1
,
32
);
ok
(
hr
==
D3DERR_INVALIDCALL
,
"Unexpected result when setting the stream source, offset 1, hr = %s
\n
"
,
DXGetErrorString9
(
hr
));
hr
=
IDirect3DDevice9_SetStreamSource
(
device
,
0
,
pVertexBuffer
,
2
,
32
);
ok
(
hr
==
D3DERR_INVALIDCALL
,
"Unexpected result when setting the stream source, offset 2, hr = %s
\n
"
,
DXGetErrorString9
(
hr
));
hr
=
IDirect3DDevice9_SetStreamSource
(
device
,
0
,
pVertexBuffer
,
3
,
32
);
ok
(
hr
==
D3DERR_INVALIDCALL
,
"Unexpected result when setting the stream source, offset 3, hr = %s
\n
"
,
DXGetErrorString9
(
hr
));
hr
=
IDirect3DDevice9_SetStreamSource
(
device
,
0
,
pVertexBuffer
,
4
,
32
);
ok
(
hr
==
D3D_OK
,
"Failed to set the stream source, offset 4, hr = %s
\n
"
,
DXGetErrorString9
(
hr
));
/* Some cards(Geforce 7400 at least) accept non-aligned offsets, others(radeon 9000 verified) reject it,
* so accept both results. Wine currently rejects this to be able to optimize the vbo conversion, but writes
* a WARN
*/
hr
=
IDirect3DDevice9_SetStreamSource
(
device
,
0
,
pVertexBuffer
,
0
,
32
);
ok
(
hr
==
D3D_OK
,
"Failed to set the stream source, offset 0, hr = %s
\n
"
,
DXGetErrorString9
(
hr
));
hr
=
IDirect3DDevice9_SetStreamSource
(
device
,
0
,
pVertexBuffer
,
1
,
32
);
ok
(
hr
==
D3DERR_INVALIDCALL
||
hr
==
D3D_OK
,
"Unexpected result when setting the stream source, offset 1, hr = %s
\n
"
,
DXGetErrorString9
(
hr
));
hr
=
IDirect3DDevice9_SetStreamSource
(
device
,
0
,
pVertexBuffer
,
2
,
32
);
ok
(
hr
==
D3DERR_INVALIDCALL
||
hr
==
D3D_OK
,
"Unexpected result when setting the stream source, offset 2, hr = %s
\n
"
,
DXGetErrorString9
(
hr
));
hr
=
IDirect3DDevice9_SetStreamSource
(
device
,
0
,
pVertexBuffer
,
3
,
32
);
ok
(
hr
==
D3DERR_INVALIDCALL
||
hr
==
D3D_OK
,
"Unexpected result when setting the stream source, offset 3, hr = %s
\n
"
,
DXGetErrorString9
(
hr
));
hr
=
IDirect3DDevice9_SetStreamSource
(
device
,
0
,
pVertexBuffer
,
4
,
32
);
ok
(
hr
==
D3D_OK
,
"Failed to set the stream source, offset 4, hr = %s
\n
"
,
DXGetErrorString9
(
hr
));
}
/* Try to set the NULL buffer with an offset and stride 0 */
hr
=
IDirect3DDevice9_SetStreamSource
(
device
,
0
,
NULL
,
0
,
0
);
ok
(
hr
==
D3D_OK
,
"Failed to set the stream source, offset 0, hr = %s
\n
"
,
DXGetErrorString9
(
hr
));
hr
=
IDirect3DDevice9_SetStreamSource
(
device
,
0
,
NULL
,
1
,
0
);
ok
(
hr
==
D3DERR_INVALIDCALL
,
"Unexpected result when setting the stream source, offset 1, hr = %s
\n
"
,
ok
(
hr
==
D3DERR_INVALIDCALL
||
hr
==
D3D_OK
,
"Unexpected result when setting the stream source, offset 1, hr = %s
\n
"
,
DXGetErrorString9
(
hr
));
hr
=
IDirect3DDevice9_SetStreamSource
(
device
,
0
,
NULL
,
2
,
0
);
ok
(
hr
==
D3DERR_INVALIDCALL
,
"Unexpected result when setting the stream source, offset 2, hr = %s
\n
"
,
ok
(
hr
==
D3DERR_INVALIDCALL
||
hr
==
D3D_OK
,
"Unexpected result when setting the stream source, offset 2, hr = %s
\n
"
,
DXGetErrorString9
(
hr
));
hr
=
IDirect3DDevice9_SetStreamSource
(
device
,
0
,
NULL
,
3
,
0
);
ok
(
hr
==
D3DERR_INVALIDCALL
,
"Unexpected result when setting the stream source, offset 3, hr = %s
\n
"
,
ok
(
hr
==
D3DERR_INVALIDCALL
||
hr
==
D3D_OK
,
"Unexpected result when setting the stream source, offset 3, hr = %s
\n
"
,
DXGetErrorString9
(
hr
));
hr
=
IDirect3DDevice9_SetStreamSource
(
device
,
0
,
NULL
,
4
,
0
);
ok
(
hr
==
D3D_OK
,
"Failed to set the stream source, offset 4, hr = %s
\n
"
,
...
...
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