diff options
author | Eric Anholt <[email protected]> | 2010-11-09 20:17:25 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2010-11-09 20:20:00 -0800 |
commit | f289dcd849cdb790b745860f3e97b61b5ad98f19 (patch) | |
tree | b8f9b2f3d404c77203021fe1b3aa1f4ebb386a51 /src | |
parent | ad8cb131d8f73dee75e7be39dbc004783cd7f350 (diff) |
i965: Add support for math on constants in gen6 brw_wm_glsl.c path.
Fixes 10 piglit cases that were assertion failing.
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_wm_emit.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm_emit.c b/src/mesa/drivers/dri/i965/brw_wm_emit.c index d03756067a7..96fecc97ee2 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_emit.c +++ b/src/mesa/drivers/dri/i965/brw_wm_emit.c @@ -896,11 +896,12 @@ void emit_math1(struct brw_wm_compile *c, BRW_MATH_SATURATE_NONE); struct brw_reg src; - if (intel->gen >= 6 && arg0[0].hstride == BRW_HORIZONTAL_STRIDE_0) { - /* Gen6 math requires that source and dst horizontal stride be 1. - * + if (intel->gen >= 6 && (arg0[0].hstride == BRW_HORIZONTAL_STRIDE_0 || + arg0[0].file != BRW_GENERAL_REGISTER_FILE)) { + /* Gen6 math requires that source and dst horizontal stride be 1, + * and that the argument be in the GRF. */ - src = *dst; + src = dst[dst_chan]; brw_MOV(p, src, arg0[0]); } else { src = arg0[0]; |