[Mesa-dev] [PATCH 12/14] i965: Make sure gl_fragment_program::UsesKill is set for GLSL shaders

Ian Romanick idr at freedesktop.org
Fri Jan 6 16:50:03 PST 2012


From: Ian Romanick <ian.d.romanick at intel.com>

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
 src/mesa/drivers/dri/i965/brw_fs.h           |    2 +-
 src/mesa/drivers/dri/i965/brw_fs_visitor.cpp |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h
index 24bf7bb..33e9332 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.h
+++ b/src/mesa/drivers/dri/i965/brw_fs.h
@@ -549,7 +549,7 @@ public:
    int implied_mrf_writes(fs_inst *inst);
 
    struct brw_context *brw;
-   const struct gl_fragment_program *fp;
+   struct gl_fragment_program *fp;
    struct intel_context *intel;
    struct gl_context *ctx;
    struct brw_wm_compile *c;
diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
index 9f8a44a..b2d88e2 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
@@ -1292,6 +1292,7 @@ fs_visitor::visit(ir_discard *ir)
 
    emit(FS_OPCODE_DISCARD);
    kill_emitted = true;
+   this->fp->UsesKill = true;
 }
 
 void
-- 
1.7.6.4



More information about the mesa-dev mailing list