mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-14 14:28:08 +02:00
zink: add spirv_builder support for is_helper_invocation
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18272>
This commit is contained in:
parent
332ff54425
commit
7a48657a06
2 changed files with 17 additions and 0 deletions
|
|
@ -765,6 +765,20 @@ spirv_builder_emit_demote(struct spirv_builder *b)
|
||||||
spirv_buffer_emit_word(&b->instructions, SpvOpDemoteToHelperInvocation | (1 << 16));
|
spirv_buffer_emit_word(&b->instructions, SpvOpDemoteToHelperInvocation | (1 << 16));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SpvId
|
||||||
|
spirv_is_helper_invocation(struct spirv_builder *b)
|
||||||
|
{
|
||||||
|
SpvId result = spirv_builder_new_id(b);
|
||||||
|
SpvId result_type = spirv_builder_type_bool(b);
|
||||||
|
|
||||||
|
int words = 3;
|
||||||
|
spirv_buffer_prepare(&b->instructions, b->mem_ctx, words);
|
||||||
|
spirv_buffer_emit_word(&b->instructions, SpvOpIsHelperInvocationEXT | (words << 16));
|
||||||
|
spirv_buffer_emit_word(&b->instructions, result_type);
|
||||||
|
spirv_buffer_emit_word(&b->instructions, result);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
SpvId
|
SpvId
|
||||||
spirv_builder_emit_vote(struct spirv_builder *b, SpvOp op, SpvId src)
|
spirv_builder_emit_vote(struct spirv_builder *b, SpvOp op, SpvId src)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -271,6 +271,9 @@ spirv_builder_emit_kill(struct spirv_builder *b);
|
||||||
void
|
void
|
||||||
spirv_builder_emit_demote(struct spirv_builder *b);
|
spirv_builder_emit_demote(struct spirv_builder *b);
|
||||||
|
|
||||||
|
SpvId
|
||||||
|
spirv_is_helper_invocation(struct spirv_builder *b);
|
||||||
|
|
||||||
SpvId
|
SpvId
|
||||||
spirv_builder_emit_vote(struct spirv_builder *b, SpvOp op, SpvId src);
|
spirv_builder_emit_vote(struct spirv_builder *b, SpvOp op, SpvId src);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue