diff options
author | Michel Dänzer <[email protected]> | 2012-08-08 15:35:42 +0200 |
---|---|---|
committer | Michel Dänzer <[email protected]> | 2012-08-08 15:33:38 +0200 |
commit | 82cd9c0fc2838a153006a646b0d356ed54b8680e (patch) | |
tree | 6e7665c1a14593555c74839da57b165cfe0dd994 /src/gallium/drivers/radeonsi/radeonsi_shader.c | |
parent | be42a45e023aed5fd82647719bb81bee49a9a2ac (diff) |
radeonsi: If pixel shader compilation fails, use a dummy shader.
Otherwise we're likely to hang the GPU.
Signed-off-by: Michel Dänzer <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/radeonsi_shader.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/radeonsi_shader.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeonsi/radeonsi_shader.c b/src/gallium/drivers/radeonsi/radeonsi_shader.c index 5313e5e6532..a05061765ef 100644 --- a/src/gallium/drivers/radeonsi/radeonsi_shader.c +++ b/src/gallium/drivers/radeonsi/radeonsi_shader.c @@ -627,7 +627,10 @@ int si_pipe_shader_create( 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); |