diff options
Diffstat (limited to 'src/gallium/state_trackers/nine/iunknown.c')
-rw-r--r-- | src/gallium/state_trackers/nine/iunknown.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/gallium/state_trackers/nine/iunknown.c b/src/gallium/state_trackers/nine/iunknown.c index d76d6447896..3835651f536 100644 --- a/src/gallium/state_trackers/nine/iunknown.c +++ b/src/gallium/state_trackers/nine/iunknown.c @@ -34,9 +34,21 @@ HRESULT NineUnknown_ctor( struct NineUnknown *This, struct NineUnknownParams *pParams ) { - This->refs = pParams->container ? 0 : 1; - This->bind = 0; - This->forward = !This->refs; + if (pParams->container) { + This->refs = 0; + This->forward = true; + This->bind = 0; + assert(!pParams->start_with_bind_not_ref); + } else if (pParams->start_with_bind_not_ref) { + This->refs = 0; + This->forward = false; + This->bind = 1; + } else { + This->refs = 1; + This->forward = false; + This->bind = 0; + } + This->container = pParams->container; This->device = pParams->device; if (This->refs && This->device) |