summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2015-09-10 18:31:33 +0200
committerMarek Olšák <marek.olsak@amd.com>2015-09-24 19:51:43 +0200
commit9b6d9dd7d8d2779e2bd08787c26f51512b84f6d2 (patch)
tree5dc337fcadd7c90ba04538981ba0d73b1d12a753 /src/gallium
parent5dbadb02572f875f5d2f22327eab6b93de61337c (diff)
downloadexternal_mesa3d-9b6d9dd7d8d2779e2bd08787c26f51512b84f6d2.zip
external_mesa3d-9b6d9dd7d8d2779e2bd08787c26f51512b84f6d2.tar.gz
external_mesa3d-9b6d9dd7d8d2779e2bd08787c26f51512b84f6d2.tar.bz2
radeonsi: handle fixed-func TCS shader create failure
Cc: 11.0 <mesa-stable@lists.freedesktop.org> Acked-by: Christian König <christian.koenig@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/radeonsi/si_state_shaders.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c
index 74e1136..43d2e88 100644
--- a/src/gallium/drivers/radeonsi/si_state_shaders.c
+++ b/src/gallium/drivers/radeonsi/si_state_shaders.c
@@ -1351,7 +1351,6 @@ static void si_generate_fixed_func_tcs(struct si_context *sctx)
sctx->fixed_func_tcs_shader =
ureg_create_shader_and_destroy(ureg, &sctx->b.b);
- assert(sctx->fixed_func_tcs_shader);
}
static void si_update_vgt_shader_config(struct si_context *sctx)
@@ -1420,8 +1419,12 @@ bool si_update_shaders(struct si_context *sctx)
si_shader_select(ctx, sctx->tcs_shader);
si_pm4_bind_state(sctx, hs, sctx->tcs_shader->current->pm4);
} else {
- if (!sctx->fixed_func_tcs_shader)
+ if (!sctx->fixed_func_tcs_shader) {
si_generate_fixed_func_tcs(sctx);
+ if (!sctx->fixed_func_tcs_shader)
+ return false;
+ }
+
si_shader_select(ctx, sctx->fixed_func_tcs_shader);
si_pm4_bind_state(sctx, hs,
sctx->fixed_func_tcs_shader->current->pm4);