diff options
author | Francisco Jerez <[email protected]> | 2016-02-26 17:04:38 -0800 |
---|---|---|
committer | Francisco Jerez <[email protected]> | 2016-03-06 12:22:39 -0800 |
commit | 537d3df97466835ad6438fe2c9121283e0da1bcd (patch) | |
tree | 74e9f472803b137a9b73bdfb9ed89b492993ae8a /src/mesa/drivers/dri/i965/brw_clip_unfilled.c | |
parent | ff085d014ed8ccce230769575e50924561218d98 (diff) |
i965: Pass symbolic swizzle to brw_swizzle() as a single argument.
And replace brw_swizzle1() with brw_swizzle(). Seems slightly cleaner
and will allow reusing brw_swizzle() in the vec4 back-end more easily.
Reviewed-by: Iago Toral Quiroga <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_clip_unfilled.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_clip_unfilled.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_clip_unfilled.c b/src/mesa/drivers/dri/i965/brw_clip_unfilled.c index 3c18858abf1..d333d10d299 100644 --- a/src/mesa/drivers/dri/i965/brw_clip_unfilled.c +++ b/src/mesa/drivers/dri/i965/brw_clip_unfilled.c @@ -85,8 +85,10 @@ static void compute_tri_direction( struct brw_clip_compile *c ) /* Take their crossproduct: */ brw_set_default_access_mode(p, BRW_ALIGN_16); - brw_MUL(p, vec4(brw_null_reg()), brw_swizzle(e, 1,2,0,3), brw_swizzle(f,2,0,1,3)); - brw_MAC(p, vec4(e), negate(brw_swizzle(e, 2,0,1,3)), brw_swizzle(f,1,2,0,3)); + brw_MUL(p, vec4(brw_null_reg()), brw_swizzle(e, BRW_SWIZZLE_YZXW), + brw_swizzle(f, BRW_SWIZZLE_ZXYW)); + brw_MAC(p, vec4(e), negate(brw_swizzle(e, BRW_SWIZZLE_ZXYW)), + brw_swizzle(f, BRW_SWIZZLE_YZXW)); brw_set_default_access_mode(p, BRW_ALIGN_1); brw_MUL(p, c->reg.dir, c->reg.dir, vec4(e)); |