[Mesa-dev] [PATCH 02/10] i965/fs: Add a width field to fs_inst

Jason Ekstrand jason at jlekstrand.net
Thu Sep 4 22:58:41 PDT 2014


On Sep 4, 2014 10:45 PM, "Matt Turner" <mattst88 at gmail.com> wrote:
>
> On Thu, Sep 4, 2014 at 10:19 PM, Jason Ekstrand <jason at jlekstrand.net>
wrote:
> > This will, eventually, allow us to manage execution widths of
instructions
> > in a much more natural way from the fs_visitor level.
> >
> > Signed-off-by: Jason Ekstrand <jason.ekstrand at intel.com>
>
> Adding a width field to fs_inst might be fine, but I don't think I
> like adding the parameter to every fs_inst constructor. It seems like
> it's something that's rarely going to be non-default. With other
> things like that we just set them after creating the instruction.

Unfortunately, there's no good way to set a default in fs_inst when the
constructor is unaware of the fs_visitor.  The default is provided by the
fs_visitor::emit functions.  This is admittedly a little painful for blorp,
but it works out OK for fs_visitor.

I tried making a value of 0 mean "choose a default for me" but that didn't
work well either.  The only other real option would be to guess based on
register widths but that gets us to a chicken-and-egg problem where
register width depends on instruction width and vice-versa.

> Also, am I correct that the width field isn't actually hooked up to
> anything at this point?

Yes, that's correct. Hooking it up comes later.
--Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140904/699ebdb3/attachment.html>


More information about the mesa-dev mailing list