zink: add spirv_builder wrapper for vote intrinsics
these are all going to use the same mechanics, so we can simplify a bit Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8950>
This commit is contained in:
parent
cf6901809e
commit
e35612e45f
|
@ -701,6 +701,13 @@ spirv_builder_emit_kill(struct spirv_builder *b)
|
|||
spirv_buffer_emit_word(&b->instructions, SpvOpKill | (1 << 16));
|
||||
}
|
||||
|
||||
SpvId
|
||||
spirv_builder_emit_vote(struct spirv_builder *b, SpvOp op, SpvId src)
|
||||
{
|
||||
return spirv_builder_emit_binop(b, op, spirv_builder_type_bool(b),
|
||||
spirv_builder_const_uint(b, 32, SpvScopeWorkgroup), src);
|
||||
}
|
||||
|
||||
SpvId
|
||||
spirv_builder_emit_image_sample(struct spirv_builder *b,
|
||||
SpvId result_type,
|
||||
|
|
|
@ -256,6 +256,8 @@ spirv_builder_set_phi_operand(struct spirv_builder *b, size_t position,
|
|||
void
|
||||
spirv_builder_emit_kill(struct spirv_builder *b);
|
||||
|
||||
SpvId
|
||||
spirv_builder_emit_vote(struct spirv_builder *b, SpvOp op, SpvId src);
|
||||
|
||||
SpvId
|
||||
spirv_builder_emit_image_sample(struct spirv_builder *b,
|
||||
|
|
Loading…
Reference in New Issue