summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/trace/tr_dump_state.c4
-rw-r--r--src/gallium/include/pipe/p_state.h1
-rw-r--r--src/gallium/state_trackers/clover/core/kernel.cpp1
-rw-r--r--src/gallium/tests/trivial/compute.c1
4 files changed, 6 insertions, 1 deletions
diff --git a/src/gallium/drivers/trace/tr_dump_state.c b/src/gallium/drivers/trace/tr_dump_state.c
index 0627e5ab5d7..b53d7dbec2f 100644
--- a/src/gallium/drivers/trace/tr_dump_state.c
+++ b/src/gallium/drivers/trace/tr_dump_state.c
@@ -317,8 +317,10 @@ void trace_dump_compute_state(const struct pipe_compute_state *state)
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);
diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h
index 2e720ce25f3..5ab53728e82 100644
--- a/src/gallium/include/pipe/p_state.h
+++ b/src/gallium/include/pipe/p_state.h
@@ -727,6 +727,7 @@ struct pipe_llvm_program_header
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. */
diff --git a/src/gallium/state_trackers/clover/core/kernel.cpp b/src/gallium/state_trackers/clover/core/kernel.cpp
index c12755b0420..bce3b525b13 100644
--- a/src/gallium/state_trackers/clover/core/kernel.cpp
+++ b/src/gallium/state_trackers/clover/core/kernel.cpp
@@ -223,6 +223,7 @@ kernel::exec_context::bind(intrusive_ptr<command_queue> _q,
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();
diff --git a/src/gallium/tests/trivial/compute.c b/src/gallium/tests/trivial/compute.c
index 5d5e0b0b8c3..2ddfc42e9cd 100644
--- a/src/gallium/tests/trivial/compute.c
+++ b/src/gallium/tests/trivial/compute.c
@@ -144,6 +144,7 @@ static void init_prog(struct context *ctx, unsigned local_sz,
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,