diff options
author | Axel Davy <[email protected]> | 2015-02-19 20:55:42 +0100 |
---|---|---|
committer | Axel Davy <[email protected]> | 2015-04-29 08:28:11 +0200 |
commit | 7a7758c5525fa90bf7c546acc58a9ea41f7d320b (patch) | |
tree | 328e0f15b70ae3f909fffc1456ec2ef55a3ba7c4 | |
parent | ec411d9b74f9aca941b27fafeae1416df0f9eaec (diff) |
st/nine: D3DUSAGE_AUTOGENMIPMAP is forbidden for volumes
Signed-off-by: Axel Davy <[email protected]>
-rw-r--r-- | src/gallium/state_trackers/nine/volume9.c | 3 | ||||
-rw-r--r-- | src/gallium/state_trackers/nine/volumetexture9.c | 14 |
2 files changed, 1 insertions, 16 deletions
diff --git a/src/gallium/state_trackers/nine/volume9.c b/src/gallium/state_trackers/nine/volume9.c index 8c9f148373b..b34ee07dce9 100644 --- a/src/gallium/state_trackers/nine/volume9.c +++ b/src/gallium/state_trackers/nine/volume9.c @@ -169,9 +169,6 @@ NineVolume9_MarkContainerDirty( struct NineVolume9 *This ) assert(tex); if (This->desc.Pool == D3DPOOL_MANAGED) tex->managed.dirty = TRUE; - else - if (This->desc.Usage & D3DUSAGE_AUTOGENMIPMAP) - tex->dirty_mip = TRUE; BASETEX_REGISTER_UPDATE(tex); } diff --git a/src/gallium/state_trackers/nine/volumetexture9.c b/src/gallium/state_trackers/nine/volumetexture9.c index 8f1de13ce5f..1193e12f34c 100644 --- a/src/gallium/state_trackers/nine/volumetexture9.c +++ b/src/gallium/state_trackers/nine/volumetexture9.c @@ -51,14 +51,10 @@ NineVolumeTexture9_ctor( struct NineVolumeTexture9 *This, /* An IDirect3DVolume9 cannot be bound as a render target can it ? */ user_assert(!(Usage & (D3DUSAGE_RENDERTARGET | D3DUSAGE_DEPTHSTENCIL)), D3DERR_INVALIDCALL); - user_assert(!(Usage & D3DUSAGE_AUTOGENMIPMAP) || - (Pool != D3DPOOL_SYSTEMMEM && Levels <= 1), D3DERR_INVALIDCALL); + user_assert(!(Usage & D3DUSAGE_AUTOGENMIPMAP), D3DERR_INVALIDCALL); user_assert(!pSharedHandle, D3DERR_INVALIDCALL); /* TODO */ - if (Usage & D3DUSAGE_AUTOGENMIPMAP) - Levels = 0; - pf = d3d9_to_pipe_format_checked(screen, Format, PIPE_TEXTURE_3D, 0, PIPE_BIND_SAMPLER_VIEW, FALSE); if (pf == PIPE_FORMAT_NONE) @@ -145,8 +141,6 @@ NineVolumeTexture9_GetLevelDesc( struct NineVolumeTexture9 *This, D3DVOLUME_DESC *pDesc ) { user_assert(Level <= This->base.base.info.last_level, D3DERR_INVALIDCALL); - user_assert(Level == 0 || !(This->base.base.usage & D3DUSAGE_AUTOGENMIPMAP), - D3DERR_INVALIDCALL); *pDesc = This->volumes[Level]->desc; @@ -159,8 +153,6 @@ NineVolumeTexture9_GetVolumeLevel( struct NineVolumeTexture9 *This, IDirect3DVolume9 **ppVolumeLevel ) { user_assert(Level <= This->base.base.info.last_level, D3DERR_INVALIDCALL); - user_assert(Level == 0 || !(This->base.base.usage & D3DUSAGE_AUTOGENMIPMAP), - D3DERR_INVALIDCALL); NineUnknown_AddRef(NineUnknown(This->volumes[Level])); *ppVolumeLevel = (IDirect3DVolume9 *)This->volumes[Level]; @@ -179,8 +171,6 @@ NineVolumeTexture9_LockBox( struct NineVolumeTexture9 *This, This, Level, pLockedVolume, pBox, Flags); user_assert(Level <= This->base.base.info.last_level, D3DERR_INVALIDCALL); - user_assert(Level == 0 || !(This->base.base.usage & D3DUSAGE_AUTOGENMIPMAP), - D3DERR_INVALIDCALL); return NineVolume9_LockBox(This->volumes[Level], pLockedVolume, pBox, Flags); @@ -204,8 +194,6 @@ NineVolumeTexture9_AddDirtyBox( struct NineVolumeTexture9 *This, DBG("This=%p pDirtybox=%p\n", This, pDirtyBox); if (This->base.base.pool != D3DPOOL_MANAGED) { - if (This->base.base.usage & D3DUSAGE_AUTOGENMIPMAP) - This->base.dirty_mip = TRUE; return D3D_OK; } This->base.managed.dirty = TRUE; |