st/nine: Track managed textures

Signed-off-by: Axel Davy <axel.davy@ens.fr>
This commit is contained in:
Axel Davy
2015-05-07 00:03:21 +02:00
parent 41f54040e2
commit 4c126f0b58
4 changed files with 10 additions and 2 deletions
@@ -85,6 +85,9 @@ NineBaseTexture9_ctor( struct NineBaseTexture9 *This,
util_format_has_depth(util_format_description(This->base.info.format));
list_inithead(&This->list);
list_inithead(&This->list2);
if (Pool == D3DPOOL_MANAGED)
list_add(&This->list2, &This->base.base.device->managed_textures);
return D3D_OK;
}
@@ -98,7 +101,9 @@ NineBaseTexture9_dtor( struct NineBaseTexture9 *This )
pipe_sampler_view_reference(&This->view[1], NULL);
if (This->list.prev != NULL && This->list.next != NULL)
list_del(&This->list),
list_del(&This->list);
if (This->list2.prev != NULL && This->list2.next != NULL)
list_del(&This->list2);
NineResource9_dtor(&This->base);
}
@@ -30,7 +30,8 @@
struct NineBaseTexture9
{
struct NineResource9 base;
struct list_head list;
struct list_head list; /* for update_textures */
struct list_head list2; /* for managed_textures */
/* g3d */
struct pipe_context *pipe;
@@ -186,6 +186,7 @@ NineDevice9_ctor( struct NineDevice9 *This,
if (FAILED(hr)) { return hr; }
list_inithead(&This->update_textures);
list_inithead(&This->managed_textures);
This->screen = pScreen;
This->caps = *pCaps;
@@ -69,6 +69,7 @@ struct NineDevice9
struct nine_state state; /* device state */
struct list_head update_textures;
struct list_head managed_textures;
boolean is_recording;
boolean in_scene;