mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-05 23:11:47 +00:00
d3d8: Disallow index buffers in the scratch pool.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
49e9fa376c
commit
28324c5be9
|
@ -573,6 +573,9 @@ HRESULT indexbuffer_init(struct d3d8_indexbuffer *buffer, struct d3d8_device *de
|
|||
struct wined3d_buffer_desc desc;
|
||||
HRESULT hr;
|
||||
|
||||
if (pool == D3DPOOL_SCRATCH)
|
||||
return D3DERR_INVALIDCALL;
|
||||
|
||||
desc.byte_width = size;
|
||||
desc.usage = (usage & WINED3DUSAGE_MASK) | WINED3DUSAGE_STATICDECL;
|
||||
if (pool == D3DPOOL_SCRATCH)
|
||||
|
|
|
@ -9132,7 +9132,7 @@ static void test_resource_access(void)
|
|||
|
||||
hr = IDirect3DDevice8_CreateIndexBuffer(device, 16, tests[i].usage,
|
||||
tests[i].format == FORMAT_COLOUR ? D3DFMT_INDEX32 : D3DFMT_INDEX16, tests[i].pool, &ib);
|
||||
todo_wine_if(tests[i].pool == D3DPOOL_SCRATCH || tests[i].usage & ~D3DUSAGE_DYNAMIC)
|
||||
todo_wine_if(tests[i].pool != D3DPOOL_SCRATCH && tests[i].usage & ~D3DUSAGE_DYNAMIC)
|
||||
ok(hr == (tests[i].pool == D3DPOOL_SCRATCH || (tests[i].usage & ~D3DUSAGE_DYNAMIC)
|
||||
? D3DERR_INVALIDCALL : D3D_OK), "Test %u: Got unexpected hr %#x.\n", i, hr);
|
||||
if (FAILED(hr))
|
||||
|
|
Loading…
Reference in a new issue