[Mesa-dev] [PATCH 2/2] i965/vec4/vp: Use vec4_visitor::CMP.

Kenneth Graunke kenneth at whitecape.org
Thu Feb 12 01:13:03 PST 2015


On Wednesday, February 11, 2015 06:17:23 PM Matt Turner wrote:
> ... instead of emit(BRW_OPCODE_CMP, ...). In commit 6b3a301f I changed
> vec4_visitor::CMP to set the destination's type to that of src0. In the
> following commit (2335153f) I removed an apparently now unnecessary work
> around for Gen8 that did the same thing.
> 
> But there was a single place that emitted a CMP instruction without
> using the vec4_visitor::CMP function. Use it there.
> 
> And change dst_null_d to dst_null_f for good measure, since ARB vp
> doesn't have integers.
> 
> Cc: "10.5" <mesa-stable at lists.freedesktop.org>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89032
> ---
>  src/mesa/drivers/dri/i965/brw_vec4_vp.cpp | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_vec4_vp.cpp b/src/mesa/drivers/dri/i965/brw_vec4_vp.cpp
> index a68cf66..ba3264d 100644
> --- a/src/mesa/drivers/dri/i965/brw_vec4_vp.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_vec4_vp.cpp
> @@ -43,8 +43,7 @@ vec4_visitor::emit_vp_sop(enum brw_conditional_mod conditional_mod,
>  {
>     vec4_instruction *inst;
>  
> -   inst = emit(BRW_OPCODE_CMP, dst_null_d(), src0, src1);
> -   inst->conditional_mod = conditional_mod;
> +   inst = emit(CMP(dst_null_f(), src0, src1, conditional_mod));
>  
>     inst = emit(BRW_OPCODE_SEL, dst, one, src_reg(0.0f));
>     inst->predicate = BRW_PREDICATE_NORMAL;
> 

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150212/2ad9f7bd/attachment.sig>


More information about the mesa-dev mailing list