d3d9: Don't expose wined3d internal flags to the application.

This commit is contained in:
Henri Verbeet 2012-01-09 21:40:48 +01:00 committed by Alexandre Julliard
parent ef9be113e2
commit bd3b0ba697
7 changed files with 11 additions and 9 deletions

View File

@ -245,7 +245,7 @@ static HRESULT WINAPI d3d9_vertexbuffer_GetDesc(IDirect3DVertexBuffer9 *iface,
wined3d_mutex_unlock();
desc->Format = D3DFMT_VERTEXDATA;
desc->Usage = wined3d_desc.usage;
desc->Usage = wined3d_desc.usage & WINED3DUSAGE_MASK;
desc->Pool = wined3d_desc.pool;
desc->Size = wined3d_desc.size;
desc->Type = D3DRTYPE_VERTEXBUFFER;
@ -540,7 +540,7 @@ static HRESULT WINAPI d3d9_indexbuffer_GetDesc(IDirect3DIndexBuffer9 *iface,
wined3d_mutex_unlock();
desc->Format = d3dformat_from_wined3dformat(buffer->format);
desc->Usage = wined3d_desc.usage;
desc->Usage = wined3d_desc.usage & WINED3DUSAGE_MASK;
desc->Pool = wined3d_desc.pool;
desc->Size = wined3d_desc.size;
desc->Type = D3DRTYPE_INDEXBUFFER;

View File

@ -311,7 +311,7 @@ static HRESULT WINAPI IDirect3DCubeTexture9Impl_GetLevelDesc(IDirect3DCubeTextur
wined3d_resource_get_desc(sub_resource, &wined3d_desc);
desc->Format = d3dformat_from_wined3dformat(wined3d_desc.format);
desc->Type = wined3d_desc.resource_type;
desc->Usage = wined3d_desc.usage;
desc->Usage = wined3d_desc.usage & WINED3DUSAGE_MASK;
desc->Pool = wined3d_desc.pool;
desc->MultiSampleType = wined3d_desc.multisample_type;
desc->MultiSampleQuality = wined3d_desc.multisample_quality;

View File

@ -275,7 +275,7 @@ static HRESULT WINAPI IDirect3DSurface9Impl_GetDesc(IDirect3DSurface9 *iface, D3
desc->Format = d3dformat_from_wined3dformat(wined3d_desc.format);
desc->Type = wined3d_desc.resource_type;
desc->Usage = wined3d_desc.usage;
desc->Usage = wined3d_desc.usage & WINED3DUSAGE_MASK;
desc->Pool = wined3d_desc.pool;
desc->MultiSampleType = wined3d_desc.multisample_type;
desc->MultiSampleQuality = wined3d_desc.multisample_quality;

View File

@ -305,7 +305,7 @@ static HRESULT WINAPI IDirect3DTexture9Impl_GetLevelDesc(IDirect3DTexture9 *ifac
wined3d_resource_get_desc(sub_resource, &wined3d_desc);
desc->Format = d3dformat_from_wined3dformat(wined3d_desc.format);
desc->Type = wined3d_desc.resource_type;
desc->Usage = wined3d_desc.usage;
desc->Usage = wined3d_desc.usage & WINED3DUSAGE_MASK;
desc->Pool = wined3d_desc.pool;
desc->MultiSampleType = wined3d_desc.multisample_type;
desc->MultiSampleQuality = wined3d_desc.multisample_quality;

View File

@ -206,7 +206,7 @@ static HRESULT WINAPI IDirect3DVolume9Impl_GetDesc(IDirect3DVolume9 *iface, D3DV
desc->Format = d3dformat_from_wined3dformat(wined3d_desc.format);
desc->Type = wined3d_desc.resource_type;
desc->Usage = wined3d_desc.usage;
desc->Usage = wined3d_desc.usage & WINED3DUSAGE_MASK;
desc->Pool = wined3d_desc.pool;
desc->Width = wined3d_desc.width;
desc->Height = wined3d_desc.height;

View File

@ -304,7 +304,7 @@ static HRESULT WINAPI IDirect3DVolumeTexture9Impl_GetLevelDesc(IDirect3DVolumeTe
wined3d_resource_get_desc(sub_resource, &wined3d_desc);
desc->Format = d3dformat_from_wined3dformat(wined3d_desc.format);
desc->Type = wined3d_desc.resource_type;
desc->Usage = wined3d_desc.usage;
desc->Usage = wined3d_desc.usage & WINED3DUSAGE_MASK;
desc->Pool = wined3d_desc.pool;
desc->Width = wined3d_desc.width;
desc->Height = wined3d_desc.height;

View File

@ -328,7 +328,8 @@ static void compare_mesh(const char *name, ID3DXMesh *d3dxmesh, struct mesh *mes
name, index_buffer_description.Format, D3DFMT_INDEX16);
ok(index_buffer_description.Type == D3DRTYPE_INDEXBUFFER, "Test %s, result %x, expected %x (D3DRTYPE_INDEXBUFFER)\n",
name, index_buffer_description.Type, D3DRTYPE_INDEXBUFFER);
todo_wine ok(index_buffer_description.Usage == 0, "Test %s, result %x, expected %x\n", name, index_buffer_description.Usage, 0);
ok(index_buffer_description.Usage == 0, "Test %s, result %#x, expected %#x.\n",
name, index_buffer_description.Usage, 0);
ok(index_buffer_description.Pool == D3DPOOL_MANAGED, "Test %s, result %x, expected %x (D3DPOOL_MANAGED)\n",
name, index_buffer_description.Pool, D3DPOOL_MANAGED);
expected = number_of_faces * sizeof(WORD) * 3;
@ -3676,7 +3677,8 @@ static void compare_text_outline_mesh(const char *name, ID3DXMesh *d3dxmesh, str
name, index_buffer_description.Format, D3DFMT_INDEX16);
ok(index_buffer_description.Type == D3DRTYPE_INDEXBUFFER, "Test %s, result %x, expected %x (D3DRTYPE_INDEXBUFFER)\n",
name, index_buffer_description.Type, D3DRTYPE_INDEXBUFFER);
todo_wine ok(index_buffer_description.Usage == 0, "Test %s, result %x, expected %x\n", name, index_buffer_description.Usage, 0);
ok(index_buffer_description.Usage == 0, "Test %s, result %#x, expected %#x.\n",
name, index_buffer_description.Usage, 0);
ok(index_buffer_description.Pool == D3DPOOL_MANAGED, "Test %s, result %x, expected %x (D3DPOOL_MANAGED)\n",
name, index_buffer_description.Pool, D3DPOOL_MANAGED);
expected = number_of_faces * sizeof(WORD) * 3;