diff options
author | Marek Olšák <[email protected]> | 2010-04-11 10:15:12 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2010-04-11 19:29:30 +0200 |
commit | 69019afa67d66cf3e5d2b4d5b286bf2ac1bd87af (patch) | |
tree | 437d663675d9c2ef38488b95938e0eb007bb6cf9 /src/gallium/drivers/r300/r300_fs.h | |
parent | bd09fce27119548cb91cc2aa9ced6a7347aefc3a (diff) |
r300g: use a dummy replacement fragment shader if the shader compilation fails
Better than killing an application.
Diffstat (limited to 'src/gallium/drivers/r300/r300_fs.h')
-rw-r--r-- | src/gallium/drivers/r300/r300_fs.h | 16 |
1 files changed, 12 insertions, 4 deletions
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. */ |