summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/i915/i915_resource_buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/i915/i915_resource_buffer.c')
-rw-r--r--src/gallium/drivers/i915/i915_resource_buffer.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gallium/drivers/i915/i915_resource_buffer.c b/src/gallium/drivers/i915/i915_resource_buffer.c
index 77c03450b3a..c54e481698e 100644
--- a/src/gallium/drivers/i915/i915_resource_buffer.c
+++ b/src/gallium/drivers/i915/i915_resource_buffer.c
@@ -68,8 +68,13 @@ i915_get_transfer(struct pipe_context *pipe,
const struct pipe_box *box)
{
struct i915_context *i915 = i915_context(pipe);
- struct pipe_transfer *transfer = util_slab_alloc(&i915->transfer_pool);
+ struct pipe_transfer *transfer;
+ if (usage & PIPE_TRANSFER_MAP_PERMANENTLY) {
+ return NULL;
+ }
+
+ transfer = util_slab_alloc(&i915->transfer_pool);
if (transfer == NULL)
return NULL;