Commit 22253e6b authored by Marek Olšák's avatar Marek Olšák Committed by Marge Bot

gallium: rename PIPE_TRANSFER_* -> PIPE_MAP_*

Acked-by: Eric Anholt's avatarEric Anholt <eric@anholt.net>
Part-of: <!5749>
parent 44f1b1be
...@@ -754,49 +754,49 @@ the last (partial) page requires a box that ends at the end of the buffer ...@@ -754,49 +754,49 @@ the last (partial) page requires a box that ends at the end of the buffer
.. _pipe_transfer: .. _pipe_transfer:
PIPE_TRANSFER PIPE_MAP
^^^^^^^^^^^^^ ^^^^^^^^^^^^^
These flags control the behavior of a transfer object. These flags control the behavior of a transfer object.
``PIPE_TRANSFER_READ`` ``PIPE_MAP_READ``
Resource contents read back (or accessed directly) at transfer create time. Resource contents read back (or accessed directly) at transfer create time.
``PIPE_TRANSFER_WRITE`` ``PIPE_MAP_WRITE``
Resource contents will be written back at transfer_unmap time (or modified Resource contents will be written back at transfer_unmap time (or modified
as a result of being accessed directly). as a result of being accessed directly).
``PIPE_TRANSFER_MAP_DIRECTLY`` ``PIPE_MAP_DIRECTLY``
a transfer should directly map the resource. May return NULL if not supported. a transfer should directly map the resource. May return NULL if not supported.
``PIPE_TRANSFER_DISCARD_RANGE`` ``PIPE_MAP_DISCARD_RANGE``
The memory within the mapped region is discarded. Cannot be used with The memory within the mapped region is discarded. Cannot be used with
``PIPE_TRANSFER_READ``. ``PIPE_MAP_READ``.
``PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE`` ``PIPE_MAP_DISCARD_WHOLE_RESOURCE``
Discards all memory backing the resource. It should not be used with Discards all memory backing the resource. It should not be used with
``PIPE_TRANSFER_READ``. ``PIPE_MAP_READ``.
``PIPE_TRANSFER_DONTBLOCK`` ``PIPE_MAP_DONTBLOCK``
Fail if the resource cannot be mapped immediately. Fail if the resource cannot be mapped immediately.
``PIPE_TRANSFER_UNSYNCHRONIZED`` ``PIPE_MAP_UNSYNCHRONIZED``
Do not synchronize pending operations on the resource when mapping. The Do not synchronize pending operations on the resource when mapping. The
interaction of any writes to the map and any operations pending on the interaction of any writes to the map and any operations pending on the
resource are undefined. Cannot be used with ``PIPE_TRANSFER_READ``. resource are undefined. Cannot be used with ``PIPE_MAP_READ``.
``PIPE_TRANSFER_FLUSH_EXPLICIT`` ``PIPE_MAP_FLUSH_EXPLICIT``
Written ranges will be notified later with :ref:`transfer_flush_region`. Written ranges will be notified later with :ref:`transfer_flush_region`.
Cannot be used with ``PIPE_TRANSFER_READ``. Cannot be used with ``PIPE_MAP_READ``.
``PIPE_TRANSFER_PERSISTENT`` ``PIPE_MAP_PERSISTENT``
Allows the resource to be used for rendering while mapped. Allows the resource to be used for rendering while mapped.
PIPE_RESOURCE_FLAG_MAP_PERSISTENT must be set when creating PIPE_RESOURCE_FLAG_MAP_PERSISTENT must be set when creating
the resource. the resource.
If COHERENT is not set, memory_barrier(PIPE_BARRIER_MAPPED_BUFFER) If COHERENT is not set, memory_barrier(PIPE_BARRIER_MAPPED_BUFFER)
must be called to ensure the device can see what the CPU has written. must be called to ensure the device can see what the CPU has written.
``PIPE_TRANSFER_COHERENT`` ``PIPE_MAP_COHERENT``
If PERSISTENT is set, this ensures any writes done by the device are If PERSISTENT is set, this ensures any writes done by the device are
immediately visible to the CPU and vice versa. immediately visible to the CPU and vice versa.
PIPE_RESOURCE_FLAG_MAP_COHERENT must be set when creating PIPE_RESOURCE_FLAG_MAP_COHERENT must be set when creating
...@@ -909,4 +909,4 @@ uploaded data, unless: ...@@ -909,4 +909,4 @@ uploaded data, unless:
mapping, memory_barrier(PIPE_BARRIER_MAPPED_BUFFER) should be called on the mapping, memory_barrier(PIPE_BARRIER_MAPPED_BUFFER) should be called on the
context that has mapped the resource. No flush is required. context that has mapped the resource. No flush is required.
* Mapping the resource with PIPE_TRANSFER_MAP_DIRECTLY. * Mapping the resource with PIPE_MAP_DIRECTLY.
...@@ -210,7 +210,7 @@ The integer capabilities: ...@@ -210,7 +210,7 @@ The integer capabilities:
hardware implements the SM5 features, component selection, hardware implements the SM5 features, component selection,
shadow comparison, and run-time offsets. shadow comparison, and run-time offsets.
* ``PIPE_CAP_BUFFER_MAP_PERSISTENT_COHERENT``: Whether * ``PIPE_CAP_BUFFER_MAP_PERSISTENT_COHERENT``: Whether
PIPE_TRANSFER_PERSISTENT and PIPE_TRANSFER_COHERENT are supported PIPE_MAP_PERSISTENT and PIPE_MAP_COHERENT are supported
for buffers. for buffers.
* ``PIPE_CAP_TEXTURE_QUERY_LOD``: Whether the ``LODQ`` instruction is * ``PIPE_CAP_TEXTURE_QUERY_LOD``: Whether the ``LODQ`` instruction is
supported. supported.
......
...@@ -272,7 +272,7 @@ rbug_texture_read(struct rbug_rbug *tr_rbug, struct rbug_header *header, uint32_ ...@@ -272,7 +272,7 @@ rbug_texture_read(struct rbug_rbug *tr_rbug, struct rbug_header *header, uint32_
tex = tr_tex->resource; tex = tr_tex->resource;
map = pipe_transfer_map(context, tex, map = pipe_transfer_map(context, tex,
gptr->level, gptr->face + gptr->zslice, gptr->level, gptr->face + gptr->zslice,
PIPE_TRANSFER_READ, PIPE_MAP_READ,
gptr->x, gptr->y, gptr->w, gptr->h, &t); gptr->x, gptr->y, gptr->w, gptr->h, &t);
rbug_send_texture_read_reply(tr_rbug->con, serial, rbug_send_texture_read_reply(tr_rbug->con, serial,
......
...@@ -1440,7 +1440,7 @@ trace_context_transfer_map(struct pipe_context *_context, ...@@ -1440,7 +1440,7 @@ trace_context_transfer_map(struct pipe_context *_context,
*transfer = trace_transfer_create(tr_context, resource, result); *transfer = trace_transfer_create(tr_context, resource, result);
if (map) { if (map) {
if (usage & PIPE_TRANSFER_WRITE) { if (usage & PIPE_MAP_WRITE) {
trace_transfer(*transfer)->map = map; trace_transfer(*transfer)->map = map;
} }
} }
......
...@@ -417,7 +417,7 @@ util_font_create_fixed_8x13(struct pipe_context *pipe, ...@@ -417,7 +417,7 @@ util_font_create_fixed_8x13(struct pipe_context *pipe,
return FALSE; return FALSE;
} }
map = pipe_transfer_map(pipe, tex, 0, 0, PIPE_TRANSFER_WRITE, 0, 0, map = pipe_transfer_map(pipe, tex, 0, 0, PIPE_MAP_WRITE, 0, 0,
tex->width0, tex->height0, &transfer); tex->width0, tex->height0, &transfer);
if (!map) { if (!map) {
pipe_resource_reference(&tex, NULL); pipe_resource_reference(&tex, NULL);
......
...@@ -130,7 +130,7 @@ util_primconvert_draw_vbo(struct primconvert_context *pc, ...@@ -130,7 +130,7 @@ util_primconvert_draw_vbo(struct primconvert_context *pc,
src = info->has_user_indices ? info->index.user : NULL; src = info->has_user_indices ? info->index.user : NULL;
if (!src) { if (!src) {
src = pipe_buffer_map(pc->pipe, info->index.resource, src = pipe_buffer_map(pc->pipe, info->index.resource,
PIPE_TRANSFER_READ, &src_transfer); PIPE_MAP_READ, &src_transfer);
} }
src = (const uint8_t *)src; src = (const uint8_t *)src;
} }
......
...@@ -256,7 +256,7 @@ pp_jimenezmlaa_init_run(struct pp_queue_t *ppq, unsigned int n, ...@@ -256,7 +256,7 @@ pp_jimenezmlaa_init_run(struct pp_queue_t *ppq, unsigned int n,
u_box_2d(0, 0, 165, 165, &box); u_box_2d(0, 0, 165, 165, &box);
ppq->p->pipe->texture_subdata(ppq->p->pipe, ppq->areamaptex, 0, ppq->p->pipe->texture_subdata(ppq->p->pipe, ppq->areamaptex, 0,
PIPE_TRANSFER_WRITE, &box, PIPE_MAP_WRITE, &box,
areamap, 165 * 2, sizeof(areamap)); areamap, 165 * 2, sizeof(areamap));
ppq->shaders[n][1] = pp_tgsi_to_state(ppq->p->pipe, offsetvs, true, ppq->shaders[n][1] = pp_tgsi_to_state(ppq->p->pipe, offsetvs, true,
......
...@@ -216,9 +216,9 @@ debug_flush_map(struct debug_flush_buf *fbuf, unsigned flags) ...@@ -216,9 +216,9 @@ debug_flush_map(struct debug_flush_buf *fbuf, unsigned flags)
return; return;
mtx_lock(&fbuf->mutex); mtx_lock(&fbuf->mutex);
map_sync = !(flags & PIPE_TRANSFER_UNSYNCHRONIZED); map_sync = !(flags & PIPE_MAP_UNSYNCHRONIZED);
persistent = !map_sync || fbuf->supports_persistent || persistent = !map_sync || fbuf->supports_persistent ||
!!(flags & PIPE_TRANSFER_PERSISTENT); !!(flags & PIPE_MAP_PERSISTENT);
/* Recursive maps are allowed if previous maps are persistent, /* Recursive maps are allowed if previous maps are persistent,
* or if the current map is unsync. In other cases we might flush * or if the current map is unsync. In other cases we might flush
......
...@@ -115,7 +115,7 @@ debug_dump_surface(struct pipe_context *pipe, ...@@ -115,7 +115,7 @@ debug_dump_surface(struct pipe_context *pipe,
data = pipe_transfer_map(pipe, texture, surface->u.tex.level, data = pipe_transfer_map(pipe, texture, surface->u.tex.level,
surface->u.tex.first_layer, surface->u.tex.first_layer,
PIPE_TRANSFER_READ, PIPE_MAP_READ,
0, 0, surface->width, surface->height, &transfer); 0, 0, surface->width, surface->height, &transfer);
if (!data) if (!data)
return; return;
...@@ -193,7 +193,7 @@ debug_dump_surface_bmp(struct pipe_context *pipe, ...@@ -193,7 +193,7 @@ debug_dump_surface_bmp(struct pipe_context *pipe,
void *ptr; void *ptr;
ptr = pipe_transfer_map(pipe, texture, surface->u.tex.level, ptr = pipe_transfer_map(pipe, texture, surface->u.tex.level,
surface->u.tex.first_layer, PIPE_TRANSFER_READ, surface->u.tex.first_layer, PIPE_MAP_READ,
0, 0, surface->width, surface->height, &transfer); 0, 0, surface->width, surface->height, &transfer);
debug_dump_transfer_bmp(pipe, filename, transfer, ptr); debug_dump_transfer_bmp(pipe, filename, transfer, ptr);
......
...@@ -150,7 +150,7 @@ util_draw_indirect(struct pipe_context *pipe, ...@@ -150,7 +150,7 @@ util_draw_indirect(struct pipe_context *pipe,
uint32_t *dc_param = pipe_buffer_map_range(pipe, uint32_t *dc_param = pipe_buffer_map_range(pipe,
info_in->indirect->indirect_draw_count, info_in->indirect->indirect_draw_count,
info_in->indirect->indirect_draw_count_offset, info_in->indirect->indirect_draw_count_offset,
4, PIPE_TRANSFER_READ, &dc_transfer); 4, PIPE_MAP_READ, &dc_transfer);
if (!dc_transfer) { if (!dc_transfer) {
debug_printf("%s: failed to map indirect draw count buffer\n", __FUNCTION__); debug_printf("%s: failed to map indirect draw count buffer\n", __FUNCTION__);
return; return;
...@@ -167,7 +167,7 @@ util_draw_indirect(struct pipe_context *pipe, ...@@ -167,7 +167,7 @@ util_draw_indirect(struct pipe_context *pipe,
info_in->indirect->buffer, info_in->indirect->buffer,
info_in->indirect->offset, info_in->indirect->offset,
(num_params * info_in->indirect->draw_count) * sizeof(uint32_t), (num_params * info_in->indirect->draw_count) * sizeof(uint32_t),
PIPE_TRANSFER_READ, PIPE_MAP_READ,
&transfer); &transfer);
if (!transfer) { if (!transfer) {
debug_printf("%s: failed to map indirect buffer\n", __FUNCTION__); debug_printf("%s: failed to map indirect buffer\n", __FUNCTION__);
......
...@@ -512,16 +512,16 @@ util_dump_query_value_type(FILE *stream, unsigned value) ...@@ -512,16 +512,16 @@ util_dump_query_value_type(FILE *stream, unsigned value)
static const char * const static const char * const
util_transfer_usage_names[] = { util_transfer_usage_names[] = {
"PIPE_TRANSFER_READ", "PIPE_MAP_READ",
"PIPE_TRANSFER_WRITE", "PIPE_MAP_WRITE",
"PIPE_TRANSFER_MAP_DIRECTLY", "PIPE_MAP_DIRECTLY",
"PIPE_TRANSFER_DISCARD_RANGE", "PIPE_MAP_DISCARD_RANGE",
"PIPE_TRANSFER_DONTBLOCK", "PIPE_MAP_DONTBLOCK",
"PIPE_TRANSFER_UNSYNCHRONIZED", "PIPE_MAP_UNSYNCHRONIZED",
"PIPE_TRANSFER_FLUSH_EXPLICIT", "PIPE_MAP_FLUSH_EXPLICIT",
"PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE", "PIPE_MAP_DISCARD_WHOLE_RESOURCE",
"PIPE_TRANSFER_PERSISTENT", "PIPE_MAP_PERSISTENT",
"PIPE_TRANSFER_COHERENT", "PIPE_MAP_COHERENT",
}; };
DEFINE_UTIL_DUMP_FLAGS_CONTINUOUS(transfer_usage) DEFINE_UTIL_DUMP_FLAGS_CONTINUOUS(transfer_usage)
...@@ -43,7 +43,7 @@ void util_shorten_ubyte_elts_to_userptr(struct pipe_context *context, ...@@ -43,7 +43,7 @@ void util_shorten_ubyte_elts_to_userptr(struct pipe_context *context,
in_map = info->index.user; in_map = info->index.user;
} else { } else {
in_map = pipe_buffer_map(context, info->index.resource, in_map = pipe_buffer_map(context, info->index.resource,
PIPE_TRANSFER_READ | PIPE_MAP_READ |
add_transfer_flags, add_transfer_flags,
&src_transfer); &src_transfer);
} }
...@@ -77,7 +77,7 @@ void util_rebuild_ushort_elts_to_userptr(struct pipe_context *context, ...@@ -77,7 +77,7 @@ void util_rebuild_ushort_elts_to_userptr(struct pipe_context *context,
in_map = info->index.user; in_map = info->index.user;
} else { } else {
in_map = pipe_buffer_map(context, info->index.resource, in_map = pipe_buffer_map(context, info->index.resource,
PIPE_TRANSFER_READ | PIPE_MAP_READ |
add_transfer_flags, add_transfer_flags,
&in_transfer); &in_transfer);
} }
...@@ -111,7 +111,7 @@ void util_rebuild_uint_elts_to_userptr(struct pipe_context *context, ...@@ -111,7 +111,7 @@ void util_rebuild_uint_elts_to_userptr(struct pipe_context *context,
in_map = info->index.user; in_map = info->index.user;
} else { } else {
in_map = pipe_buffer_map(context, info->index.resource, in_map = pipe_buffer_map(context, info->index.resource,
PIPE_TRANSFER_READ | PIPE_MAP_READ |
add_transfer_flags, add_transfer_flags,
&in_transfer); &in_transfer);
} }
......
...@@ -321,7 +321,7 @@ pipe_buffer_create_const0(struct pipe_screen *screen, ...@@ -321,7 +321,7 @@ pipe_buffer_create_const0(struct pipe_screen *screen,
* Map a range of a resource. * Map a range of a resource.
* \param offset start of region, in bytes * \param offset start of region, in bytes
* \param length size of region, in bytes * \param length size of region, in bytes
* \param access bitmask of PIPE_TRANSFER_x flags * \param access bitmask of PIPE_MAP_x flags
* \param transfer returns a transfer object * \param transfer returns a transfer object
*/ */
static inline void * static inline void *
...@@ -352,7 +352,7 @@ pipe_buffer_map_range(struct pipe_context *pipe, ...@@ -352,7 +352,7 @@ pipe_buffer_map_range(struct pipe_context *pipe,
/** /**
* Map whole resource. * Map whole resource.
* \param access bitmask of PIPE_TRANSFER_x flags * \param access bitmask of PIPE_MAP_x flags
* \param transfer returns a transfer object * \param transfer returns a transfer object
*/ */
static inline void * static inline void *
...@@ -405,7 +405,7 @@ pipe_buffer_write(struct pipe_context *pipe, ...@@ -405,7 +405,7 @@ pipe_buffer_write(struct pipe_context *pipe,
const void *data) const void *data)
{ {
/* Don't set any other usage bits. Drivers should derive them. */ /* Don't set any other usage bits. Drivers should derive them. */
pipe->buffer_subdata(pipe, buf, PIPE_TRANSFER_WRITE, offset, size, data); pipe->buffer_subdata(pipe, buf, PIPE_MAP_WRITE, offset, size, data);
} }
/** /**
...@@ -421,8 +421,8 @@ pipe_buffer_write_nooverlap(struct pipe_context *pipe, ...@@ -421,8 +421,8 @@ pipe_buffer_write_nooverlap(struct pipe_context *pipe,
const void *data) const void *data)
{ {
pipe->buffer_subdata(pipe, buf, pipe->buffer_subdata(pipe, buf,
(PIPE_TRANSFER_WRITE | (PIPE_MAP_WRITE |
PIPE_TRANSFER_UNSYNCHRONIZED), PIPE_MAP_UNSYNCHRONIZED),
offset, size, data); offset, size, data);
} }
...@@ -458,7 +458,7 @@ pipe_buffer_read(struct pipe_context *pipe, ...@@ -458,7 +458,7 @@ pipe_buffer_read(struct pipe_context *pipe,
map = (ubyte *) pipe_buffer_map_range(pipe, map = (ubyte *) pipe_buffer_map_range(pipe,
buf, buf,
offset, size, offset, size,
PIPE_TRANSFER_READ, PIPE_MAP_READ,
&src_transfer); &src_transfer);
if (!map) if (!map)
return; return;
...@@ -470,7 +470,7 @@ pipe_buffer_read(struct pipe_context *pipe, ...@@ -470,7 +470,7 @@ pipe_buffer_read(struct pipe_context *pipe,
/** /**
* Map a resource for reading/writing. * Map a resource for reading/writing.
* \param access bitmask of PIPE_TRANSFER_x flags * \param access bitmask of PIPE_MAP_x flags
*/ */
static inline void * static inline void *
pipe_transfer_map(struct pipe_context *context, pipe_transfer_map(struct pipe_context *context,
...@@ -493,7 +493,7 @@ pipe_transfer_map(struct pipe_context *context, ...@@ -493,7 +493,7 @@ pipe_transfer_map(struct pipe_context *context,
/** /**
* Map a 3D (texture) resource for reading/writing. * Map a 3D (texture) resource for reading/writing.
* \param access bitmask of PIPE_TRANSFER_x flags * \param access bitmask of PIPE_MAP_x flags
*/ */
static inline void * static inline void *
pipe_transfer_map_3d(struct pipe_context *context, pipe_transfer_map_3d(struct pipe_context *context,
......
...@@ -49,7 +49,7 @@ read_indirect_elements(struct pipe_context *context, struct pipe_draw_indirect_i ...@@ -49,7 +49,7 @@ read_indirect_elements(struct pipe_context *context, struct pipe_draw_indirect_i
map = pipe_buffer_map_range(context, indirect->buffer, map = pipe_buffer_map_range(context, indirect->buffer,
indirect->offset, indirect->offset,
read_size, read_size,
PIPE_TRANSFER_READ, PIPE_MAP_READ,
&transfer); &transfer);
assert(map); assert(map);
memcpy(&ret, map, read_size); memcpy(&ret, map, read_size);
...@@ -129,7 +129,7 @@ util_translate_prim_restart_ib(struct pipe_context *context, ...@@ -129,7 +129,7 @@ util_translate_prim_restart_ib(struct pipe_context *context,
/* Map new / dest index buffer */ /* Map new / dest index buffer */
dst_map = pipe_buffer_map(context, *dst_buffer, dst_map = pipe_buffer_map(context, *dst_buffer,
PIPE_TRANSFER_WRITE, &dst_transfer); PIPE_MAP_WRITE, &dst_transfer);
if (!dst_map) if (!dst_map)
goto error; goto error;
...@@ -140,7 +140,7 @@ util_translate_prim_restart_ib(struct pipe_context *context, ...@@ -140,7 +140,7 @@ util_translate_prim_restart_ib(struct pipe_context *context,
src_map = pipe_buffer_map_range(context, info->index.resource, src_map = pipe_buffer_map_range(context, info->index.resource,
start * src_index_size, start * src_index_size,
count * src_index_size, count * src_index_size,
PIPE_TRANSFER_READ, PIPE_MAP_READ,
&src_transfer); &src_transfer);
if (!src_map) if (!src_map)
goto error; goto error;
...@@ -248,7 +248,7 @@ util_draw_vbo_without_prim_restart(struct pipe_context *context, ...@@ -248,7 +248,7 @@ util_draw_vbo_without_prim_restart(struct pipe_context *context,
src_map = pipe_buffer_map_range(context, info->index.resource, src_map = pipe_buffer_map_range(context, info->index.resource,
info_start * info->index_size, info_start * info->index_size,
info_count * info->index_size, info_count * info->index_size,
PIPE_TRANSFER_READ, PIPE_MAP_READ,
&src_transfer); &src_transfer);
if (!src_map) { if (!src_map) {
return PIPE_ERROR_OUT_OF_MEMORY; return PIPE_ERROR_OUT_OF_MEMORY;
......
...@@ -70,7 +70,7 @@ util_pstipple_update_stipple_texture(struct pipe_context *pipe, ...@@ -70,7 +70,7 @@ util_pstipple_update_stipple_texture(struct pipe_context *pipe,
/* map texture memory */ /* map texture memory */
data = pipe_transfer_map(pipe, tex, 0, 0, data = pipe_transfer_map(pipe, tex, 0, 0,
PIPE_TRANSFER_WRITE, 0, 0, 32, 32, &transfer); PIPE_MAP_WRITE, 0, 0, 32, 32, &transfer);
/* /*
* Load alpha texture. * Load alpha texture.
......
...@@ -131,7 +131,7 @@ u_suballocator_alloc(struct u_suballocator *allocator, unsigned size, ...@@ -131,7 +131,7 @@ u_suballocator_alloc(struct u_suballocator *allocator, unsigned size,
} else { } else {
struct pipe_transfer *transfer = NULL; struct pipe_transfer *transfer = NULL;
void *ptr = pipe_buffer_map(pipe, allocator->buffer, void *ptr = pipe_buffer_map(pipe, allocator->buffer,
PIPE_TRANSFER_WRITE, &transfer); PIPE_MAP_WRITE, &transfer);
memset(ptr, 0, allocator->size); memset(ptr, 0, allocator->size);
pipe_buffer_unmap(pipe, transfer); pipe_buffer_unmap(pipe, transfer);
} }
......
...@@ -285,7 +285,7 @@ util_resource_copy_region(struct pipe_context *pipe, ...@@ -285,7 +285,7 @@ util_resource_copy_region(struct pipe_context *pipe,
src_map = pipe->transfer_map(pipe, src_map = pipe->transfer_map(pipe,
src, src,
src_level, src_level,
PIPE_TRANSFER_READ, PIPE_MAP_READ,
&src_box, &src_trans); &src_box, &src_trans);
assert(src_map); assert(src_map);
if (!src_map) { if (!src_map) {
...@@ -295,8 +295,8 @@ util_resource_copy_region(struct pipe_context *pipe, ...@@ -295,8 +295,8 @@ util_resource_copy_region(struct pipe_context *pipe,
dst_map = pipe->transfer_map(pipe, dst_map = pipe->transfer_map(pipe,
dst, dst,
dst_level, dst_level,
PIPE_TRANSFER_WRITE | PIPE_MAP_WRITE |
PIPE_TRANSFER_DISCARD_RANGE, &dst_box, PIPE_MAP_DISCARD_RANGE, &dst_box,
&dst_trans); &dst_trans);
assert(dst_map); assert(dst_map);
if (!dst_map) { if (!dst_map) {
...@@ -358,7 +358,7 @@ util_clear_color_texture(struct pipe_context *pipe, ...@@ -358,7 +358,7 @@ util_clear_color_texture(struct pipe_context *pipe,
dst_map = pipe_transfer_map_3d(pipe, dst_map = pipe_transfer_map_3d(pipe,
texture, texture,
level, level,
PIPE_TRANSFER_WRITE, PIPE_MAP_WRITE,
dstx, dsty, dstz, dstx, dsty, dstz,
width, height, depth, width, height, depth,
&dst_trans); &dst_trans);
...@@ -410,7 +410,7 @@ util_clear_render_target(struct pipe_context *pipe, ...@@ -410,7 +410,7 @@ util_clear_render_target(struct pipe_context *pipe,
dst_map = pipe_transfer_map(pipe, dst_map = pipe_transfer_map(pipe,
dst->texture, dst->texture,