[Mesa-dev] [PATCH 3/4] i965/vec4: Combine all the math emitters.
Matt Turner
mattst88 at gmail.com
Wed Nov 12 21:57:30 PST 2014
On Wed, Nov 12, 2014 at 9:35 PM, Kenneth Graunke <kenneth at whitecape.org> wrote:
> +vec4_visitor::emit_math(enum opcode opcode,
> + dst_reg dst, src_reg src0, src_reg src1)
I think you can make the arguments const references too?
> + if (brw->gen == 6 && dst.writemask != WRITEMASK_XYZW) {
> + /* MATH on Gen6 must be align1, so we can't do writemasks. */
> + math->dst = dst_reg(this, glsl_type::vec4_type);
> + math->dst.type = dst.type;
> + math->dst.writemask = WRITEMASK_XYZW;
I don't think you need to set the writemask (XYZW is the default).
> + emit(MOV(dst, src_reg(math->dst)));
> + } else if (brw->gen < 6) {
> + math->base_mrf = 1;
> + math->mlen = src1.file == BAD_FILE ? 1 : 2;
> }
> }
Series is
Reviewed-by: Matt Turner <mattst88 at gmail.com>
More information about the mesa-dev
mailing list