i965/brw_reg: struct constructor now needs explicit negate and abs values.
authorAndres Gomez <agomez@igalia.com>
Fri, 12 Dec 2014 16:19:07 +0000 (17:19 +0100)
committerMatt Turner <mattst88@gmail.com>
Mon, 15 Dec 2014 19:40:22 +0000 (11:40 -0800)
commit8517e665bc4c378e8e7523827090fd1b06abaecd
treef19e519173e9b66bdd071e207fc5d4f2b145fff7
parente108442bb10088607f2a67b648c42c0dece2e595
i965/brw_reg: struct constructor now needs explicit negate and abs values.

We were assuming, when constructing a new brw_reg struct, that the
negate and abs register modifiers would not be present by default in
the new register.

Now, we force explicitly setting these values when constructing a new
register.

This will avoid problems like forgetting to properly set them when we
are using a previous register to generate this new register, as it was
happening in the dFdx and dFdy generation functions.

Fixes piglit test shaders/glsl-deriv-varyings

Cc: "10.4 10.3" <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82991
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_fs_generator.cpp
src/mesa/drivers/dri/i965/brw_reg.h
src/mesa/drivers/dri/i965/brw_vec4.cpp