summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_vec4.h
diff options
context:
space:
mode:
authorFrancisco Jerez <currojerez@riseup.net>2015-07-13 15:52:28 +0300
committerFrancisco Jerez <currojerez@riseup.net>2015-07-21 17:54:00 +0300
commitfadf34773527779eef4622b2586d87ec00476c0f (patch)
tree5d898957c4ac0875bd344201864a93ec793dcadd /src/mesa/drivers/dri/i965/brw_vec4.h
parent9383664a9cbc5bc4858fc50d7fa565f43028d779 (diff)
downloadexternal_mesa3d-fadf34773527779eef4622b2586d87ec00476c0f.zip
external_mesa3d-fadf34773527779eef4622b2586d87ec00476c0f.tar.gz
external_mesa3d-fadf34773527779eef4622b2586d87ec00476c0f.tar.bz2
i965: Fix stride field for the result of emit_uniformize().
This is essentially the same problem fixed in an earlier patch for immediates. Setting the stride to zero will be particularly useful for my future SIMD lowering pass, because we will be able to just check whether the stride of a source register is zero and skip emitting the copies required to unzip it in that case. Instead of setting stride to zero in every caller of emit_uniformize() I've changed the function to return the result as its return value (previously it was being written into a caller-provided destination register), because this way we can enforce that the result is used with the correct regioning from the function itself. The changes to the prototype of its VEC4 counterpart are mainly for the sake of symmetry, VEC4 registers don't have stride. Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_vec4.h')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.h b/src/mesa/drivers/dri/i965/brw_vec4.h
index 3643651..7bf027a 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.h
+++ b/src/mesa/drivers/dri/i965/brw_vec4.h
@@ -293,8 +293,11 @@ public:
void emit_lrp(const dst_reg &dst,
const src_reg &x, const src_reg &y, const src_reg &a);
- /** Copy any live channel from \p src to the first channel of \p dst. */
- void emit_uniformize(const dst_reg &dst, const src_reg &src);
+ /**
+ * Copy any live channel from \p src to the first channel of the
+ * result.
+ */
+ src_reg emit_uniformize(const src_reg &src);
void emit_block_move(dst_reg *dst, src_reg *src,
const struct glsl_type *type, brw_predicate predicate);