From 69019afa67d66cf3e5d2b4d5b286bf2ac1bd87af Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Sun, 11 Apr 2010 10:15:12 +0200 Subject: r300g: use a dummy replacement fragment shader if the shader compilation fails Better than killing an application. --- src/gallium/drivers/r300/r300_fs.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src/gallium/drivers/r300/r300_fs.h') diff --git a/src/gallium/drivers/r300/r300_fs.h b/src/gallium/drivers/r300/r300_fs.h index 40ce874353c..0feba154bbf 100644 --- a/src/gallium/drivers/r300/r300_fs.h +++ b/src/gallium/drivers/r300/r300_fs.h @@ -31,6 +31,16 @@ #include "r300_shader_semantics.h" struct r300_fragment_shader_code { + struct tgsi_shader_info info; + struct r300_shader_semantics inputs; + + /* Whether the shader was replaced by a dummy one due to a shader + * compilation failure. */ + boolean dummy; + + /* Bits 0-15: TRUE if it's a shadow sampler, FALSE otherwise. */ + unsigned shadow_samplers; + struct r300_fragment_program_external_state compare_state; struct rX00_fragment_program_code code; @@ -41,10 +51,8 @@ struct r300_fragment_shader { /* Parent class */ struct pipe_shader_state state; - struct tgsi_shader_info info; - struct r300_shader_semantics inputs; - - /* Bits 0-15: TRUE if it's a shadow sampler, FALSE otherwise. */ + /* Bits 0-15: TRUE if it's a shadow sampler, FALSE otherwise. + * Initialized from the first compiled FS. */ unsigned shadow_samplers; /* Currently-bound fragment shader. */ -- cgit v1.2.3