return E_OUTOFMEMORY;
}
- if (pDesc->Pool == D3DPOOL_SYSTEMMEM) {
- This->base.info.usage = PIPE_USAGE_STAGING;
- assert(!pResource);
- } else {
- if (pResource && (pDesc->Usage & D3DUSAGE_DYNAMIC))
- pResource->flags |= NINE_RESOURCE_FLAG_LOCKABLE;
- }
+ assert(pDesc->Pool != D3DPOOL_SYSTEMMEM || !pResource);
+
+ if (pResource && (pDesc->Usage & D3DUSAGE_DYNAMIC))
+ pResource->flags |= NINE_RESOURCE_FLAG_LOCKABLE;
hr = NineResource9_ctor(&This->base, pParams, pResource, FALSE, D3DRTYPE_SURFACE,
pDesc->Pool, pDesc->Usage);
if (pSharedHandle)
info->bind |= PIPE_BIND_SHARED;
- if (Pool == D3DPOOL_SYSTEMMEM)
- info->usage = PIPE_USAGE_STAGING;
-
if (pSharedHandle && *pSharedHandle) { /* Pool == D3DPOOL_SYSTEMMEM */
user_buffer = (void *)*pSharedHandle;
level_offsets = alloca(sizeof(unsigned) * (info->last_level + 1));
This->layer_stride = util_format_get_2d_size(This->info.format,
This->stride, pDesc->Height);
- if (pDesc->Pool == D3DPOOL_SYSTEMMEM)
- This->info.usage = PIPE_USAGE_STAGING;
-
if (!This->resource) {
hr = NineVolume9_AllocateData(This);
if (FAILED(hr))