This will allow us to send shader debug info via the context's debug callback.
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> (v1)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
ctx->screen->has_compressed_msaa_texturing);
bc->type = TGSI_PROCESSOR_COMPUTE;
bc->isa = ctx->isa;
- r600_llvm_compile(mod, ctx->b.family, bc, &use_kill, dump);
+ r600_llvm_compile(mod, ctx->b.family, bc, &use_kill, dump, &ctx->b.debug);
if (dump && !sb_disasm) {
r600_bytecode_disasm(bc);
enum radeon_family family,
struct r600_bytecode *bc,
boolean *use_kill,
- unsigned dump)
+ unsigned dump,
+ struct pipe_debug_callback *debug)
{
unsigned r;
struct radeon_shader_binary binary;
const char * gpu_family = r600_get_llvm_processor_name(family);
memset(&binary, 0, sizeof(struct radeon_shader_binary));
- r = radeon_llvm_compile(mod, &binary, gpu_family, dump, dump, NULL);
+ r = radeon_llvm_compile(mod, &binary, gpu_family, dump, dump, NULL, debug);
r = r600_create_shader(bc, &binary, use_kill);
#include "radeon/radeon_llvm.h"
#include <llvm-c/Core.h>
+struct pipe_debug_callback;
struct r600_bytecode;
struct r600_shader_ctx;
struct radeon_llvm_context;
enum radeon_family family,
struct r600_bytecode *bc,
boolean *use_kill,
- unsigned dump);
+ unsigned dump,
+ struct pipe_debug_callback *debug);
unsigned r600_create_shader(struct r600_bytecode *bc,
const struct radeon_shader_binary *binary,
ctx.shader->has_txq_cube_array_z_comp = radeon_llvm_ctx.has_txq_cube_array_z_comp;
ctx.shader->uses_tex_buffers = radeon_llvm_ctx.uses_tex_buffers;
- if (r600_llvm_compile(mod, rscreen->b.family, ctx.bc, &use_kill, dump)) {
+ if (r600_llvm_compile(mod, rscreen->b.family, ctx.bc, &use_kill,
+ dump, &rctx->b.debug)) {
radeon_llvm_dispose(&radeon_llvm_ctx);
use_llvm = 0;
fprintf(stderr, "R600 LLVM backend failed to compile "
* Authors: Tom Stellard <thomas.stellard@amd.com>
*
*/
+
#include "radeon_llvm_emit.h"
#include "radeon_elf_util.h"
#include "c11/threads.h"
#include "gallivm/lp_bld_misc.h"
+#include "util/u_debug.h"
#include "util/u_memory.h"
#include "pipe/p_shader_tokens.h"
*/
unsigned radeon_llvm_compile(LLVMModuleRef M, struct radeon_shader_binary *binary,
const char *gpu_family, bool dump_ir, bool dump_asm,
- LLVMTargetMachineRef tm)
+ LLVMTargetMachineRef tm,
+ struct pipe_debug_callback *debug)
{
-
char cpu[CPU_STRING_LEN];
char fs[FS_STRING_LEN];
char *err;
#include <llvm-c/TargetMachine.h>
#include <stdbool.h>
+struct pipe_debug_callback;
struct radeon_shader_binary;
void radeon_llvm_shader_type(LLVMValueRef F, unsigned type);
unsigned radeon_llvm_compile(LLVMModuleRef M, struct radeon_shader_binary *binary,
const char *gpu_family, bool dump_ir, bool dump_asm,
- LLVMTargetMachineRef tm);
+ LLVMTargetMachineRef tm,
+ struct pipe_debug_callback *debug);
#endif /* RADEON_LLVM_EMIT_H */
if (!si_replace_shader(count, &shader->binary)) {
r = radeon_llvm_compile(mod, &shader->binary,
- r600_get_llvm_processor_name(sscreen->b.family), dump_ir, dump_asm, tm);
+ r600_get_llvm_processor_name(sscreen->b.family), dump_ir, dump_asm, tm,
+ debug);
if (r)
return r;
}