Commit 563ca458 authored by Keith Whitwell's avatar Keith Whitwell

i915: hook up userbuffer create

parent b5095b48
......@@ -47,4 +47,5 @@ i915_init_screen_resource_functions(struct i915_screen *is)
is->base.resource_from_handle = i915_resource_from_handle;
is->base.resource_get_handle = u_resource_get_handle_vtbl;
is->base.resource_destroy = u_resource_destroy_vtbl;
is->base.user_buffer_create = i915_user_buffer_create;
}
......@@ -662,7 +662,6 @@ i915_texture_transfer_map(struct pipe_context *pipe,
enum pipe_format format = resource->format;
unsigned offset;
char *map;
boolean write = FALSE;
if (resource->target == PIPE_TEXTURE_CUBE) {
offset = tex->image_offset[sr.level][sr.face];
......@@ -676,10 +675,9 @@ i915_texture_transfer_map(struct pipe_context *pipe,
assert(box->z == 0);
}
if (transfer->usage & PIPE_TRANSFER_WRITE)
write = TRUE;
map = iws->buffer_map(iws, tex->buffer, write);
map = iws->buffer_map(iws,
tex->buffer,
(transfer->usage & PIPE_TRANSFER_WRITE) ? TRUE : FALSE);
if (map == NULL)
return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment