trace_dump_struct_begin("pipe_compute_state");
+ trace_dump_member(uint, state, ir_type);
+
trace_dump_member_begin("prog");
- if (state->prog) {
+ if (state->prog && state->ir_type == PIPE_SHADER_IR_TGSI) {
static char str[64 * 1024];
tgsi_dump_str(state->prog, 0, str, sizeof(str));
trace_dump_string(str);
struct pipe_compute_state
{
+ enum pipe_shader_ir ir_type; /**< IR type contained in prog. */
const void *prog; /**< Compute program to be executed. */
unsigned req_local_mem; /**< Required size of the LOCAL resource. */
unsigned req_private_mem; /**< Required size of the PRIVATE resource. */
if (st)
_q->pipe->delete_compute_state(_q->pipe, st);
+ cs.ir_type = q->device().ir_format();
cs.prog = &(msec.data[0]);
cs.req_local_mem = mem_local;
cs.req_input_mem = input.size();
struct pipe_context *pipe = ctx->pipe;
struct tgsi_token prog[1024];
struct pipe_compute_state cs = {
+ .ir_type = PIPE_SHADER_IR_TGSI,
.prog = prog,
.req_local_mem = local_sz,
.req_private_mem = private_sz,
st_translate_program_common(st, &stcp->Base.Base, stcp->glsl_to_tgsi, ureg,
TGSI_PROCESSOR_COMPUTE, &prog);
+ stcp->tgsi.ir_type = PIPE_SHADER_IR_TGSI;
stcp->tgsi.prog = prog.tokens;
stcp->tgsi.req_local_mem = stcp->Base.SharedSize;
stcp->tgsi.req_private_mem = 0;