summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAxel Davy <[email protected]>2016-01-26 17:13:00 +0100
committerAxel Davy <[email protected]>2016-02-12 23:26:36 +0100
commitd973a525d387f1562e796ec598951ee5d2f02540 (patch)
treeb32f26e9bc02f07ebe5fc94e68ea14e4d0ebcb8a /src
parent36b4bb303cec3de59621f41a8dea3aaeca3d12c5 (diff)
st/nine: Clean useless code in texture9.c
This->base.base.resource is worth NULL for SYSTEMMEM textures. Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Patrick Rudolph <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/state_trackers/nine/texture9.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/gallium/state_trackers/nine/texture9.c b/src/gallium/state_trackers/nine/texture9.c
index 6d1f89754bb..0bc37d3d17e 100644
--- a/src/gallium/state_trackers/nine/texture9.c
+++ b/src/gallium/state_trackers/nine/texture9.c
@@ -48,7 +48,6 @@ NineTexture9_ctor( struct NineTexture9 *This,
{
struct pipe_screen *screen = pParams->device->screen;
struct pipe_resource *info = &This->base.base.info;
- struct pipe_resource *resource;
enum pipe_format pf;
unsigned *level_offsets;
unsigned l;
@@ -182,11 +181,6 @@ NineTexture9_ctor( struct NineTexture9 *This,
sfdesc.MultiSampleType = D3DMULTISAMPLE_NONE;
sfdesc.MultiSampleQuality = 0;
- if (Pool == D3DPOOL_SYSTEMMEM)
- resource = NULL;
- else
- resource = This->base.base.resource;
-
for (l = 0; l <= info->last_level; ++l) {
sfdesc.Width = u_minify(Width, l);
sfdesc.Height = u_minify(Height, l);
@@ -196,7 +190,7 @@ NineTexture9_ctor( struct NineTexture9 *This,
level_offsets[l] : NULL;
hr = NineSurface9_new(This->base.base.base.device, NineUnknown(This),
- resource, user_buffer_for_level,
+ This->base.base.resource, user_buffer_for_level,
D3DRTYPE_TEXTURE, l, 0,
&sfdesc, &This->surfaces[l]);
if (FAILED(hr))