[Mesa-dev] [PATCH V2 4/7] i965: fs: expand IMM math arguments to a temp too

Chris Forbes chrisf at ijw.co.nz
Wed Nov 28 12:08:28 PST 2012


Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
---
 src/mesa/drivers/dri/i965/brw_fs.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index e81eb60..0144741 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -873,7 +873,7 @@ static fs_reg fix_operand_for_gen6_math(fs_visitor * v, fs_reg src) {
     * The hardware ignores source modifiers (negate and abs) on math
     * instructions, so we also move to a temp to set those up.
     */
-   if (src.file == UNIFORM || src.abs || src.negate) {
+   if (src.file == UNIFORM || src.file == IMM || src.abs || src.negate) {
       fs_reg expanded = fs_reg(v, glsl_type::float_type);
       expanded.type = src.type;
       v->emit(BRW_OPCODE_MOV, expanded, src);
-- 
1.8.0.1



More information about the mesa-dev mailing list