summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r600/r700_fragprog.c
diff options
context:
space:
mode:
authorAndre Maasikas <amaasikas@gmail.com>2009-10-21 12:23:27 +0300
committerAndre Maasikas <amaasikas@gmail.com>2009-10-22 09:44:03 +0300
commita88c9296cb079ff42ef901113d0fe772228e6feb (patch)
tree9499cf6d0da0c8aba6094fc1bd22d17817698798 /src/mesa/drivers/dri/r600/r700_fragprog.c
parentb86302283b48654682e0580c53ece01bf095fa95 (diff)
r600: need to export something from PS
Also avoids empty shader for "END" - seems to be somewhat valid fp Maybe this can be done differently in the future (fake FRAG_RESULT_COLOR already in Map_Fragment_Program() or is there a way to program the chip to not hang in case of no exports.
Diffstat (limited to 'src/mesa/drivers/dri/r600/r700_fragprog.c')
-rw-r--r--src/mesa/drivers/dri/r600/r700_fragprog.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/r600/r700_fragprog.c b/src/mesa/drivers/dri/r600/r700_fragprog.c
index 62a1ea1a22a..3736bce11c4 100644
--- a/src/mesa/drivers/dri/r600/r700_fragprog.c
+++ b/src/mesa/drivers/dri/r600/r700_fragprog.c
@@ -251,7 +251,15 @@ GLboolean r700TranslateFragmentShader(struct r700_fragment_program *fp,
number_of_colors_exported--;
}
- fp->r700Shader.exportMode = number_of_colors_exported << 1 | z_enabled;
+ /* illegal to set this to 0 */
+ if(number_of_colors_exported || z_enabled)
+ {
+ fp->r700Shader.exportMode = number_of_colors_exported << 1 | z_enabled;
+ }
+ else
+ {
+ fp->r700Shader.exportMode = (1 << 1);
+ }
fp->translated = GL_TRUE;