summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2015-10-20 18:26:02 +0200
committerEmil Velikov <[email protected]>2015-10-21 14:23:22 +0100
commit54a30ed94fa74ed6e3a1b6824df882fc38c6a08c (patch)
tree87db8c5a15444115ee3523532fb10ffde84e3f00 /src/mesa
parent6f48b8957ef2b3231aa0e099f3b6801b7e13ae3e (diff)
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 <[email protected]> Reviewed-by: Brian Paul <[email protected]> (cherry picked from commit 814f31457e9ae83d4f1e39236f704721b279b73d)
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_extensions.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index 884761c6c30..d97dfde3f6d 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -249,6 +249,9 @@ void st_init_limits(struct pipe_screen *screen,
if (options->EmitNoLoops)
options->MaxUnrollIterations = MIN2(screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_INSTRUCTIONS), 65536);
+ else
+ options->MaxUnrollIterations = screen->get_shader_param(screen, sh,
+ PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT);
options->LowerClipDistance = true;
}