Fixes regression introduced by:
a179ea2e "st/nine: Use the texture memory helper"
The device is used on texture/surface dtor since this commit.
We need to early fill the device field in case of error.
Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Acked-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10160>
This, pParams, EdgeLength, Levels, Usage,
Format, Pool, pSharedHandle);
+ This->base.base.base.device = pParams->device; /* Early fill this field in case of failure */
+
user_assert(EdgeLength, D3DERR_INVALIDCALL);
/* user_assert(!pSharedHandle || Pool == D3DPOOL_DEFAULT, D3DERR_INVALIDCALL); */
/* Mark this as a special surface held by another internal resource. */
pParams->container = pContainer;
+ This->base.base.device = pParams->device; /* Early fill this field in case of failure */
/* Make sure there's a Desc */
assert(pDesc);
HRESULT hr;
struct nine_allocation *user_buffer = NULL, *user_buffer_for_level;
+ This->base.base.base.device = pParams->device; /* Early fill this field in case of failure */
+
DBG("(%p) Width=%u Height=%u Levels=%u Usage=%s Format=%s Pool=%s "
"pSharedHandle=%p\n", This, Width, Height, Levels,
nine_D3DUSAGE_to_str(Usage),