summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/nine
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers/nine')
-rw-r--r--src/gallium/state_trackers/nine/surface9.c11
-rw-r--r--src/gallium/state_trackers/nine/texture9.c3
-rw-r--r--src/gallium/state_trackers/nine/volume9.c3
3 files changed, 4 insertions, 13 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);
diff --git a/src/gallium/state_trackers/nine/texture9.c b/src/gallium/state_trackers/nine/texture9.c
index ada08cea90a..a11dad41e9c 100644
--- a/src/gallium/state_trackers/nine/texture9.c
+++ b/src/gallium/state_trackers/nine/texture9.c
@@ -143,9 +143,6 @@ NineTexture9_ctor( struct NineTexture9 *This,
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));
diff --git a/src/gallium/state_trackers/nine/volume9.c b/src/gallium/state_trackers/nine/volume9.c
index f6988923caa..5ef11414f3e 100644
--- a/src/gallium/state_trackers/nine/volume9.c
+++ b/src/gallium/state_trackers/nine/volume9.c
@@ -116,9 +116,6 @@ NineVolume9_ctor( struct NineVolume9 *This,
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))