mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 13:10:10 +01:00
zink: add spirv_builder function for emitting a 3word literal exec mode
used by compute Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8781>
This commit is contained in:
parent
813c361fe0
commit
a5ff286992
2 changed files with 15 additions and 0 deletions
|
|
@ -159,6 +159,18 @@ spirv_builder_emit_exec_mode_literal(struct spirv_builder *b, SpvId entry_point,
|
|||
spirv_buffer_emit_word(&b->exec_modes, param);
|
||||
}
|
||||
|
||||
void
|
||||
spirv_builder_emit_exec_mode_literal3(struct spirv_builder *b, SpvId entry_point,
|
||||
SpvExecutionMode exec_mode, uint32_t param[3])
|
||||
{
|
||||
spirv_buffer_prepare(&b->exec_modes, b->mem_ctx, 6);
|
||||
spirv_buffer_emit_word(&b->exec_modes, SpvOpExecutionMode | (6 << 16));
|
||||
spirv_buffer_emit_word(&b->exec_modes, entry_point);
|
||||
spirv_buffer_emit_word(&b->exec_modes, exec_mode);
|
||||
for (unsigned i = 0; i < 3; i++)
|
||||
spirv_buffer_emit_word(&b->exec_modes, param[i]);
|
||||
}
|
||||
|
||||
void
|
||||
spirv_builder_emit_exec_mode(struct spirv_builder *b, SpvId entry_point,
|
||||
SpvExecutionMode exec_mode)
|
||||
|
|
|
|||
|
|
@ -144,6 +144,9 @@ void
|
|||
spirv_builder_emit_exec_mode_literal(struct spirv_builder *b, SpvId entry_point,
|
||||
SpvExecutionMode exec_mode, uint32_t param);
|
||||
void
|
||||
spirv_builder_emit_exec_mode_literal3(struct spirv_builder *b, SpvId entry_point,
|
||||
SpvExecutionMode exec_mode, uint32_t param[3]);
|
||||
void
|
||||
spirv_builder_emit_exec_mode(struct spirv_builder *b, SpvId entry_point,
|
||||
SpvExecutionMode exec_mode);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue