mesa/st: Set PIPE_MAP_DISCARD_RANGE in fallback_copy_image
Enables some drivers to avoid reading from the destination when mapping it. Acked-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18257>
This commit is contained in:
@@ -615,10 +615,11 @@ fallback_copy_image(struct st_context *st,
|
||||
st_MapTextureImage(
|
||||
st->ctx, dst_image, dst_z,
|
||||
dst_x, dst_y, dst_w, dst_h,
|
||||
GL_MAP_WRITE_BIT, &dst, &dst_stride);
|
||||
GL_MAP_WRITE_BIT | GL_MAP_INVALIDATE_RANGE_BIT,
|
||||
&dst, &dst_stride);
|
||||
} else {
|
||||
dst = pipe_texture_map(st->pipe, dst_res, 0, dst_z,
|
||||
PIPE_MAP_WRITE,
|
||||
PIPE_MAP_WRITE | PIPE_MAP_DISCARD_RANGE,
|
||||
dst_x, dst_y, dst_w, dst_h,
|
||||
&dst_transfer);
|
||||
dst_stride = dst_transfer->stride;
|
||||
|
Reference in New Issue
Block a user