summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon
diff options
context:
space:
mode:
authorTom Stellard <[email protected]>2013-10-03 17:39:59 -0400
committerTom Stellard <[email protected]>2013-10-03 17:29:54 -0700
commitb280516e114776c8d34c2d6fe0174762f3c85c0e (patch)
tree1b83520ec5b81119d6b106241bcbd377318a8c88 /src/gallium/drivers/radeon
parentb181be626634cea2dab5d3b298a8f2e7fbbfa643 (diff)
radeonsi/compute: Fix segfault caused by recent refactoring
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon')
-rw-r--r--src/gallium/drivers/radeon/r600_pipe_common.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c
index dd4856f3b4e..f83c7e42a9e 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.c
+++ b/src/gallium/drivers/radeon/r600_pipe_common.c
@@ -247,6 +247,10 @@ static unsigned tgsi_get_processor_type(const struct tgsi_token *tokens)
bool r600_can_dump_shader(struct r600_common_screen *rscreen,
const struct tgsi_token *tokens)
{
+ /* Compute shader don't have tgsi_tokens */
+ if (!tokens)
+ return (rscreen->debug_flags & DBG_CS) != 0;
+
switch (tgsi_get_processor_type(tokens)) {
case TGSI_PROCESSOR_VERTEX:
return (rscreen->debug_flags & DBG_VS) != 0;