unsigned char ** inst_bytes,
unsigned * inst_byte_count,
enum radeon_family family,
- unsigned *ngpr,
- unsigned *stack_size,
+ struct r600_bytecode *bc,
unsigned dump)
{
unsigned r;
r = radeon_llvm_compile(mod, &binary, gpu_family, dump);
*inst_bytes = binary.code;
*inst_byte_count = binary.code_size;
- *ngpr = util_le32_to_cpu(*(uint32_t*)binary.config);
- *stack_size = util_le32_to_cpu(*(uint32_t*)binary.config + 4);
+ bc->ngpr = util_le32_to_cpu(*(uint32_t*)binary.config);
+ bc->nstack = util_le32_to_cpu(*(uint32_t*)(binary.config + 4));
return r;
}
#include "radeon_llvm.h"
#include <llvm-c/Core.h>
+struct r600_bytecode;
struct r600_shader_ctx;
struct radeon_llvm_context;
enum radeon_family;
unsigned char ** inst_bytes,
unsigned * inst_byte_count,
enum radeon_family family,
- unsigned *ngpr,
- unsigned *stack_size,
+ struct r600_bytecode *bc,
unsigned dump);
#endif /* defined R600_USE_LLVM || defined HAVE_OPENCL */
shader_ctx.bc->type = TGSI_PROCESSOR_COMPUTE;
shader_ctx.bc->isa = r600_ctx->isa;
r600_llvm_compile(mod, &bytes, &byte_count, r600_ctx->family,
- &shader_ctx.bc->ngpr, dump);
+ shader_ctx.bc, dump);
r600_bytecode_from_byte_stream(&shader_ctx, bytes, byte_count);
if (shader_ctx.bc->chip_class == CAYMAN) {
cm_bytecode_add_cf_end(shader_ctx.bc);
mod = r600_tgsi_llvm(&radeon_llvm_ctx, tokens);
if (r600_llvm_compile(mod, &inst_bytes, &inst_byte_count,
- rscreen->family, &ctx.bc->ngpr, &ctx.bc->nstack, dump)) {
+ rscreen->family, ctx.bc, dump)) {
FREE(inst_bytes);
radeon_llvm_dispose(&radeon_llvm_ctx);
use_llvm = 0;