radeonsi: If pixel shader compilation fails, use a dummy shader.

Otherwise we're likely to hang the GPU.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
diff --git a/src/gallium/drivers/radeonsi/radeonsi_shader.c b/src/gallium/drivers/radeonsi/radeonsi_shader.c
index 5313e5e..a050617 100644
--- a/src/gallium/drivers/radeonsi/radeonsi_shader.c
+++ b/src/gallium/drivers/radeonsi/radeonsi_shader.c
@@ -627,7 +627,10 @@
 		tgsi_dump(shader->tokens, 0);
 	}
 
-	lp_build_tgsi_llvm(bld_base, shader->tokens);
+	if (!lp_build_tgsi_llvm(bld_base, shader->tokens)) {
+		fprintf(stderr, "Failed to translate shader from TGSI to LLVM\n");
+		return -EINVAL;
+	}
 
 	radeon_llvm_finalize_module(&si_shader_ctx.radeon_bld);