return PIPE_UNKNOWN_CONTEXT_RESET;
}
-static void r600_set_debug_callback(struct pipe_context *ctx,
- const struct pipe_debug_callback *cb)
-{
- struct r600_common_context *rctx = (struct r600_common_context *)ctx;
-
- if (cb)
- rctx->debug = *cb;
- else
- memset(&rctx->debug, 0, sizeof(rctx->debug));
-}
-
static void r600_set_device_reset_callback(struct pipe_context *ctx,
const struct pipe_device_reset_callback *cb)
{
rctx->b.texture_subdata = u_default_texture_subdata;
rctx->b.memory_barrier = r600_memory_barrier;
rctx->b.flush = r600_flush_from_st;
- rctx->b.set_debug_callback = r600_set_debug_callback;
rctx->b.create_fence_fd = r600_create_fence_fd;
rctx->b.fence_server_sync = r600_fence_server_sync;
rctx->dma_clear_buffer = r600_dma_clear_buffer_fallback;
bool query_active;
} dcc_stats[5];
- struct pipe_debug_callback debug;
struct pipe_device_reset_callback device_reset_callback;
struct u_log_context *log;
}
program->compiler_ctx_state.tm = sctx->tm;
- program->compiler_ctx_state.debug = sctx->b.debug;
+ program->compiler_ctx_state.debug = sctx->debug;
program->compiler_ctx_state.is_debug_context = sctx->is_debug;
p_atomic_inc(&sscreen->b.num_shaders_created);
util_queue_fence_init(&program->ready);
- if ((sctx->b.debug.debug_message && !sctx->b.debug.async) ||
+ if ((sctx->debug.debug_message && !sctx->debug.async) ||
sctx->is_debug ||
si_can_dump_shader(&sscreen->b, PIPE_SHADER_COMPUTE))
si_create_compute_state_async(program, -1);
si_shader_binary_read_config(&program->shader.binary,
&program->shader.config, 0);
}
- si_shader_dump(sctx->screen, &program->shader, &sctx->b.debug,
+ si_shader_dump(sctx->screen, &program->shader, &sctx->debug,
PIPE_SHADER_COMPUTE, stderr, true);
if (si_shader_binary_upload(sctx->screen, &program->shader) < 0) {
fprintf(stderr, "LLVM failed to upload shader\n");
return ac_create_target_machine(sscreen->b.family, tm_options);
}
+static void si_set_debug_callback(struct pipe_context *ctx,
+ const struct pipe_debug_callback *cb)
+{
+ struct si_context *sctx = (struct si_context *)ctx;
+
+ if (cb)
+ sctx->debug = *cb;
+ else
+ memset(&sctx->debug, 0, sizeof(sctx->debug));
+}
+
static void si_set_log_context(struct pipe_context *ctx,
struct u_log_context *log)
{
sctx->b.b.priv = NULL;
sctx->b.b.destroy = si_destroy_context;
sctx->b.b.emit_string_marker = si_emit_string_marker;
+ sctx->b.b.set_debug_callback = si_set_debug_callback;
sctx->b.b.set_log_context = si_set_log_context;
sctx->b.set_atom_dirty = (void *)si_set_atom_dirty;
sctx->screen = sscreen; /* Easy accessing of screen/winsys. */
void *vs_blit_color_layered;
void *vs_blit_texcoord;
struct si_screen *screen;
+ struct pipe_debug_callback debug;
LLVMTargetMachineRef tm; /* only non-threaded compilation */
struct si_shader_ctx_state fixed_func_tcs_shader;
struct r600_resource *wait_mem_scratch;
pipe_reference_init(&sel->reference, 1);
sel->screen = sscreen;
sel->compiler_ctx_state.tm = sctx->tm;
- sel->compiler_ctx_state.debug = sctx->b.debug;
+ sel->compiler_ctx_state.debug = sctx->debug;
sel->compiler_ctx_state.is_debug_context = sctx->is_debug;
sel->so = state->stream_output;
(void) mtx_init(&sel->mutex, mtx_plain);
util_queue_fence_init(&sel->ready);
- if ((sctx->b.debug.debug_message && !sctx->b.debug.async) ||
+ if ((sctx->debug.debug_message && !sctx->debug.async) ||
sctx->is_debug ||
si_can_dump_shader(&sscreen->b, sel->info.processor))
si_init_shader_selector_async(sel, -1);
int r;
compiler_state.tm = sctx->tm;
- compiler_state.debug = sctx->b.debug;
+ compiler_state.debug = sctx->debug;
compiler_state.is_debug_context = sctx->is_debug;
/* Update stages before GS. */