summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick Rudolph <[email protected]>2016-09-11 11:05:01 +0200
committerAxel Davy <[email protected]>2016-10-10 23:43:50 +0200
commit6a1cce20b605aee4f8787b6d5ad59ee25ac7550f (patch)
treebb43e4282d34885c5789a26516102832812f0f10 /src
parent851e4b8d8ab13752693ea7b1d59f11355ae56f7a (diff)
st/nine: Move assert in NineSurface9_ctor
Move assert to function entry. Signed-off-by: Patrick Rudolph <[email protected]> Reviewed-by: Axel Davy <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/state_trackers/nine/surface9.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/nine/surface9.c b/src/gallium/state_trackers/nine/surface9.c
index 4d54309ece3..45a37f4cd51 100644
--- a/src/gallium/state_trackers/nine/surface9.c
+++ b/src/gallium/state_trackers/nine/surface9.c
@@ -76,6 +76,8 @@ NineSurface9_ctor( struct NineSurface9 *This,
/* The only way we can have !pContainer is being created
* from create_zs_or_rt_surface with params 0 0 0 */
assert(pContainer || (Level == 0 && Layer == 0 && TextureType == 0));
+ /* Make sure no resource is passed for pool systemmem */
+ assert(pDesc->Pool != D3DPOOL_SYSTEMMEM || !pResource);
This->data = (uint8_t *)user_buffer;
@@ -135,8 +137,6 @@ NineSurface9_ctor( struct NineSurface9 *This,
return E_OUTOFMEMORY;
}
- assert(pDesc->Pool != D3DPOOL_SYSTEMMEM || !pResource);
-
if (pResource && (pDesc->Usage & D3DUSAGE_DYNAMIC))
pResource->flags |= NINE_RESOURCE_FLAG_LOCKABLE;