summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/i915/i915_resource.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/i915/i915_resource.c')
-rw-r--r--src/gallium/drivers/i915/i915_resource.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/drivers/i915/i915_resource.c b/src/gallium/drivers/i915/i915_resource.c
index 314ebe9551e..627ed2b4445 100644
--- a/src/gallium/drivers/i915/i915_resource.c
+++ b/src/gallium/drivers/i915/i915_resource.c
@@ -12,8 +12,12 @@ i915_resource_create(struct pipe_screen *screen,
if (template->target == PIPE_BUFFER)
return i915_buffer_create(screen, template);
else
- return i915_texture_create(screen, template, FALSE);
-
+ {
+ if (!(template->bind & PIPE_BIND_LINEAR))
+ return i915_texture_create(screen, template, FALSE);
+ else
+ return i915_texture_create(screen, template, TRUE);
+ }
}
static struct pipe_resource *