aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/i915
diff options
context:
space:
mode:
authorAxel Davy <[email protected]>2013-08-15 12:47:58 +0200
committerKristian Høgsberg <[email protected]>2013-09-06 15:02:34 -0700
commite8f9195e5fb34a45783d6491d2e0305a0b137439 (patch)
tree604a81c82fc66e609d137ca28856e5d56fb9ffdd /src/gallium/drivers/i915
parent0a0f543082ce3bbee3d09425a912a9181128a257 (diff)
gallium, intel: Implements new __DRI_IMAGE_USE_LINEAR and PIPE_BIND_LINEAR flags to enforce no tiling.
Signed-off-by: Axel Davy <[email protected]>
Diffstat (limited to 'src/gallium/drivers/i915')
-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 *