aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/nine/resource9.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers/nine/resource9.c')
-rw-r--r--src/gallium/state_trackers/nine/resource9.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/nine/resource9.c b/src/gallium/state_trackers/nine/resource9.c
index 8f535580bbf..c82180be37c 100644
--- a/src/gallium/state_trackers/nine/resource9.c
+++ b/src/gallium/state_trackers/nine/resource9.c
@@ -38,9 +38,11 @@
HRESULT
NineResource9_ctor( struct NineResource9 *This,
struct NineUnknownParams *pParams,
+ struct pipe_resource *initResource,
BOOL Allocate,
D3DRESOURCETYPE Type,
- D3DPOOL Pool )
+ D3DPOOL Pool,
+ DWORD Usage)
{
struct pipe_screen *screen;
HRESULT hr;
@@ -50,8 +52,11 @@ NineResource9_ctor( struct NineResource9 *This,
return hr;
This->info.screen = screen = This->base.device->screen;
+ if (initResource)
+ pipe_resource_reference(&This->resource, initResource);
if (Allocate) {
+ assert(!initResource);
DBG("(%p) Creating pipe_resource.\n", This);
This->resource = screen->resource_create(screen, &This->info);
if (!This->resource)
@@ -61,6 +66,7 @@ NineResource9_ctor( struct NineResource9 *This,
This->data = NULL; /* FIXME remove, rather set it to null in surface9.c*/
This->type = Type;
This->pool = Pool;
+ This->usage = Usage;
This->priority = 0;
This->pdata = util_hash_table_create(ht_guid_hash, ht_guid_compare);