+/* Apitrace profiling:
+ * 1) qapitrace : Tools -> Profile: Measure CPU & GPU times
+ * 2) In the middle panel, zoom in (mouse wheel) on some bad draw call
+ * and remember its number.
+ * 3) In Mesa, enable queries and performance counters around that draw
+ * call and print the results.
+ * 4) glretrace --benchmark --markers ..
+ */
+static void si_emit_string_marker(struct pipe_context *ctx,
+ const char *string, int len)
+{
+ struct si_context *sctx = (struct si_context *)ctx;
+
+ dd_parse_apitrace_marker(string, len, &sctx->apitrace_call_number);
+}
+
+static LLVMTargetMachineRef
+si_create_llvm_target_machine(struct si_screen *sscreen)
+{
+ const char *triple = "amdgcn--";
+
+ return LLVMCreateTargetMachine(radeon_llvm_get_r600_target(triple), triple,
+ r600_get_llvm_processor_name(sscreen->b.family),
+#if HAVE_LLVM >= 0x0308
+ sscreen->b.debug_flags & DBG_SI_SCHED ?
+ SI_LLVM_DEFAULT_FEATURES ",+si-scheduler" :
+#endif
+ SI_LLVM_DEFAULT_FEATURES,
+ LLVMCodeGenLevelDefault,
+ LLVMRelocDefault,
+ LLVMCodeModelDefault);
+}
+