Commit aa748494 authored by Rhys Perry's avatar Rhys Perry Committed by Erik Faye-Lund
Browse files

spirv: implement MakePointerAvailable/MakePointerVisible for OpCopyMemory


Signed-off-by: Rhys Perry's avatarRhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Boris Brezillon's avatarBoris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jason Ekstrand's avatarJason Ekstrand <jason@jlekstrand.net>
Part-of: <mesa/mesa!6090>
parent 53b9e9f7
......@@ -2607,7 +2607,22 @@ vtn_handle_variables(struct vtn_builder *b, SpvOp opcode,
vtn_assert_types_equal(b, opcode, dest->type->deref, src->type->deref);
unsigned idx = 3, dest_alignment, src_alignment;
SpvMemoryAccessMask dest_access, src_access;
SpvScope dest_scope, src_scope;
vtn_get_mem_operands(b, w, count, &idx, &dest_access, &dest_alignment,
&dest_scope, &src_scope);
if (!vtn_get_mem_operands(b, w, count, &idx, &src_access, &src_alignment,
NULL, &src_scope)) {
src_alignment = dest_alignment;
src_access = dest_access;
}
vtn_emit_make_visible_barrier(b, src_access, src_scope, src->pointer->mode);
vtn_variable_copy(b, dest->pointer, src->pointer);
vtn_emit_make_available_barrier(b, dest_access, dest_scope, dest->pointer->mode);
break;
}
......
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