On 02/28/2013 11:20 AM, Matt Turner wrote:
On Tue, Feb 26, 2013 at 9:51 AM, Kenneth Graunke <kenn...@whitecape.org> wrote:
diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp
b/src/mesa/drivers/dri/i965/brw_shader.cpp
index 9ab18cc..6965d72 100644
--- a/src/mesa/drivers/dri/i965/brw_shader.cpp
+++ b/src/mesa/drivers/dri/i965/brw_shader.cpp
@@ -156,7 +156,7 @@ brw_link_shader(struct gl_context *ctx, struct
gl_shader_program *shProg)
                          SUB_TO_ADD_NEG |
                          EXP_TO_EXP2 |
                          LOG_TO_LOG2 |
-                        LRP_TO_ARITH);
+                        (stage == MESA_SHADER_FRAGMENT ? 0 :
LRP_TO_ARITH));


Doesn't this need to include a gen check as well?  Perhaps:

Not really, since emit_lrp() has a gen check (and has to have it,
since emit_lrp() will be used for fragment program's OPCODE_LRP). For
GLSL, do we gain anything by lowering LRP on gen < 6 in the compiler
vs the backend, or vice versa?

Oh yeah, I didn't realize you made emit_lrp() handle both the LRP instruction and the raw math. So you're okay as is.

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to