From 814f31457e9ae83d4f1e39236f704721b279b73d Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Tue, 20 Oct 2015 18:26:02 +0200 Subject: gallium: add PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT This avoids a serious r600g bug leading to a GPU hang. The chances this bug will get fixed are pretty low now. I deeply regret listening to others and not pushing this patch, leaving other users with a GPU-crashing driver. Yes, it should be fixed in the compiler and it's ugly, but users couldn't care less about that. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86720 Cc: 11.0 10.6 Reviewed-by: Brian Paul --- src/gallium/drivers/vc4/vc4_screen.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/gallium/drivers/vc4/vc4_screen.c') diff --git a/src/gallium/drivers/vc4/vc4_screen.c b/src/gallium/drivers/vc4/vc4_screen.c index 3b12464a2f6..774ec095652 100644 --- a/src/gallium/drivers/vc4/vc4_screen.c +++ b/src/gallium/drivers/vc4/vc4_screen.c @@ -337,6 +337,8 @@ vc4_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader, return VC4_MAX_TEXTURE_SAMPLERS; case PIPE_SHADER_CAP_PREFERRED_IR: return PIPE_SHADER_IR_TGSI; + case PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT: + return 32; default: fprintf(stderr, "unknown shader param %d\n", param); return 0; -- cgit v1.2.3