const char *spirv_capability_to_string(SpvCapability cap);
const char *spirv_decoration_to_string(SpvDecoration dec);
+const char *spirv_executionmode_to_string(SpvExecutionMode mode);
const char *spirv_op_to_string(SpvOp op);
#endif /* SPIRV_INFO_H */
info = [
collect_data(spirv_info, "Capability"),
collect_data(spirv_info, "Decoration"),
+ collect_data(spirv_info, "ExecutionMode"),
collect_opcodes(spirv_info),
]
break;
case SpvExecutionModeVecTypeHint:
- case SpvExecutionModeContractionOff:
break; /* OpenCL */
+ case SpvExecutionModeContractionOff:
+ if (b->shader->info.stage != MESA_SHADER_KERNEL)
+ vtn_warn("ExectionMode only allowed for CL-style kernels: %s",
+ spirv_executionmode_to_string(mode->exec_mode));
+ else
+ b->exact = true;
+ break;
+
case SpvExecutionModeStencilRefReplacingEXT:
vtn_assert(b->shader->info.stage == MESA_SHADER_FRAGMENT);
break;
if (glsl_type_is_matrix(vtn_src[0]->type) ||
(num_inputs >= 2 && glsl_type_is_matrix(vtn_src[1]->type))) {
vtn_handle_matrix_alu(b, opcode, val, vtn_src[0], vtn_src[1]);
- b->nb.exact = false;
+ b->nb.exact = b->exact;
return;
}
} /* default */
}
- b->nb.exact = false;
+ b->nb.exact = b->exact;
}
b->func->impl = nir_function_impl_create(func);
nir_builder_init(&b->nb, func->impl);
b->nb.cursor = nir_before_cf_list(&b->func->impl->body);
+ b->nb.exact = b->exact;
b->func_param_idx = 0;
nir_builder_init(&b->nb, func->impl);
b->func = func;
b->nb.cursor = nir_after_cf_list(&func->impl->body);
+ b->nb.exact = b->exact;
b->has_loop_continue = false;
b->phi_table = _mesa_pointer_hash_table_create(b);
unsigned func_param_idx;
bool has_loop_continue;
+
+ /* false by default, set to true by the ContractionOff execution mode */
+ bool exact;
};
nir_ssa_def *