nir/spirv: remove unused fields from vtn_builder
They were used for tracking whether SSA needed to be repaired, but now the repair is done for all functions with structured control flow. Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com> Signed-off-by: Andrii Simiklit <andrii.simiklit@globallogic.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7755>
This commit is contained in:

committed by
Marge Bot

parent
4220befb38
commit
c6232afde0
@@ -700,12 +700,10 @@ vtn_process_block(struct vtn_builder *b,
|
||||
return NULL;
|
||||
|
||||
case SpvOpKill:
|
||||
b->has_early_terminate = true;
|
||||
block->branch_type = vtn_branch_type_discard;
|
||||
return NULL;
|
||||
|
||||
case SpvOpTerminateInvocation:
|
||||
b->has_early_terminate = true;
|
||||
block->branch_type = vtn_branch_type_terminate_invocation;
|
||||
return NULL;
|
||||
|
||||
@@ -1170,8 +1168,6 @@ vtn_emit_cf_list_structured(struct vtn_builder *b, struct list_head *cf_list,
|
||||
nir_pop_if(&b->nb, cont_if);
|
||||
|
||||
nir_store_var(&b->nb, do_cont, nir_imm_true(&b->nb), 1);
|
||||
|
||||
b->has_loop_continue = true;
|
||||
}
|
||||
|
||||
nir_pop_loop(&b->nb, loop);
|
||||
@@ -1377,7 +1373,6 @@ vtn_function_emit(struct vtn_builder *b, struct vtn_function *func,
|
||||
b->func = func;
|
||||
b->nb.cursor = nir_after_cf_list(&impl->body);
|
||||
b->nb.exact = b->exact;
|
||||
b->has_loop_continue = false;
|
||||
b->phi_table = _mesa_pointer_hash_table_create(b);
|
||||
|
||||
if (b->shader->info.stage == MESA_SHADER_KERNEL || force_unstructured) {
|
||||
|
@@ -717,21 +717,6 @@ struct vtn_builder {
|
||||
/* Current function parameter index */
|
||||
unsigned func_param_idx;
|
||||
|
||||
bool has_loop_continue;
|
||||
|
||||
/** True if this shader has any early termination instructions like OpKill
|
||||
*
|
||||
* In the SPIR-V, the following instructions are block terminators:
|
||||
*
|
||||
* - OpKill
|
||||
* - OpTerminateInvocation
|
||||
*
|
||||
* However, in NIR, they're represented by regular intrinsics with no
|
||||
* control-flow semantics. This means that the SSA form from the SPIR-V
|
||||
* may not 100% match NIR and we have to fix it up at the end.
|
||||
*/
|
||||
bool has_early_terminate;
|
||||
|
||||
/* false by default, set to true by the ContractionOff execution mode */
|
||||
bool exact;
|
||||
|
||||
|
Reference in New Issue
Block a user