Mesa (master): i965: Fix type of gl_FragData[] dereference for FB write.
Eric Anholt
anholt at kemper.freedesktop.org
Tue Nov 30 01:09:05 UTC 2010
Module: Mesa
Branch: master
Commit: 2927b6c21202fd0f9a661665e0093e7193c5df6e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2927b6c21202fd0f9a661665e0093e7193c5df6e
Author: Eric Anholt <eric at anholt.net>
Date: Mon Nov 29 16:16:38 2010 -0800
i965: Fix type of gl_FragData[] dereference for FB write.
Fixes glsl-fs-fragdata-1, and hopefully Eve Online where I noticed
this bug in the generated shader. Bug #31952.
---
src/mesa/drivers/dri/i965/brw_fs.cpp | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index edb02fa..7a8e981 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -2010,8 +2010,10 @@ fs_visitor::emit_fb_writes()
fs_reg color = reg_undef;
if (this->frag_color)
color = *(variable_storage(this->frag_color));
- else if (this->frag_data)
+ else if (this->frag_data) {
color = *(variable_storage(this->frag_data));
+ color.type = BRW_REGISTER_TYPE_F;
+ }
for (int target = 0; target < c->key.nr_color_regions; target++) {
this->current_annotation = talloc_asprintf(this->mem_ctx,
More information about the mesa-commit
mailing list