On 06/30/2014 10:11 AM, Matt Turner wrote:
> Setting a couple of bits is the same cost or less as conditionally
> setting a couple of bits.
> ---
>  src/mesa/drivers/dri/i965/brw_vec4_generator.cpp | 9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp 
> b/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
> index 8f5b205..509c32c 100644
> --- a/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
> @@ -1266,12 +1266,9 @@ vec4_generator::generate_code(exec_list *instructions)
>  
>           brw_inst *last = &p->store[pre_emit_nr_insn];
>  
> -         if (inst->conditional_mod)
> -            brw_inst_set_cond_modifier(brw, last, inst->conditional_mod);
> -         if (inst->no_dd_clear)
> -            brw_inst_set_no_dd_clear(brw, last, true);
> -         if (inst->no_dd_check)
> -            brw_inst_set_no_dd_check(brw, last, true);
> +         brw_inst_set_cond_modifier(brw, last, inst->conditional_mod);
> +         brw_inst_set_no_dd_clear(brw, last, inst->no_dd_clear);
> +         brw_inst_set_no_dd_check(brw, last, inst->no_dd_check);

The old code will only set the bits.  The new code might also clear the
bits, right?  Is that potentially a problem?

>        }
>     }
>  

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to