diff options
author | Axel Davy <[email protected]> | 2016-01-26 17:02:53 +0100 |
---|---|---|
committer | Axel Davy <[email protected]> | 2016-02-12 23:26:36 +0100 |
commit | 77a5871c1dfcc2cf3032e873a5c7e4a2e7093889 (patch) | |
tree | 1dad77eaa8f82ac97513a2a987d16b07d72842e5 /src/gallium/state_trackers/nine/surface9.c | |
parent | 9675fb6c681bf3441ee1d25e18b38faea5144524 (diff) |
st/nine: Do not set resource usage for SYSTEMMEM
We do not create a resource for SYSTEMMEM textures,
thus we do not need to set resource usage.
The only exception is vertexbuffer SYSTEMMEM, since
we do use a pipe resource for them.
Signed-off-by: Axel Davy <[email protected]>
Reviewed-by: Patrick Rudolph <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/nine/surface9.c')
-rw-r--r-- | src/gallium/state_trackers/nine/surface9.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/gallium/state_trackers/nine/surface9.c b/src/gallium/state_trackers/nine/surface9.c index f88b75c3dd7..ce0f74ceabb 100644 --- a/src/gallium/state_trackers/nine/surface9.c +++ b/src/gallium/state_trackers/nine/surface9.c @@ -116,13 +116,10 @@ NineSurface9_ctor( struct NineSurface9 *This, 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); |