[Mesa-dev] [PATCH v02 06/37] genxml: Add alias for MOCS.
Rafael Antognolli
rafael.antognolli at intel.com
Mon Apr 24 23:08:20 UTC 2017
On Mon, Apr 24, 2017 at 03:59:07PM -0700, Kenneth Graunke wrote:
> On Monday, April 24, 2017 3:19:01 PM PDT Rafael Antognolli wrote:
> > Use an alias, so we can set the same value as the #define's.
> >
> > Signed-off-by: Rafael Antognolli <rafael.antognolli at intel.com>
> > ---
> > src/intel/genxml/gen8.xml | 1 +
> > src/intel/genxml/gen9.xml | 1 +
> > 2 files changed, 2 insertions(+)
> >
> > diff --git a/src/intel/genxml/gen8.xml b/src/intel/genxml/gen8.xml
> > index 408d241..2908082 100644
> > --- a/src/intel/genxml/gen8.xml
> > +++ b/src/intel/genxml/gen8.xml
> > @@ -2064,6 +2064,7 @@
> > <field name="SO Buffer Enable" start="63" end="63" type="bool"/>
> > <field name="SO Buffer Index" start="61" end="62" type="uint"/>
> > <field name="SO Buffer Object Control State" start="54" end="60" type="MEMORY_OBJECT_CONTROL_STATE"/>
> > + <field name="MOCS" start="54" end="60" type="uint"/>
> > <field name="Stream Offset Write Enable" start="53" end="53" type="bool"/>
> > <field name="Stream Output Buffer Offset Address Enable" start="52" end="52" type="bool"/>
> > <field name="Surface Base Address" start="66" end="111" type="address"/>
> > diff --git a/src/intel/genxml/gen9.xml b/src/intel/genxml/gen9.xml
> > index 59daa31..09b9464 100644
> > --- a/src/intel/genxml/gen9.xml
> > +++ b/src/intel/genxml/gen9.xml
> > @@ -2246,6 +2246,7 @@
> > <field name="SO Buffer Enable" start="63" end="63" type="bool"/>
> > <field name="SO Buffer Index" start="61" end="62" type="uint"/>
> > <field name="SO Buffer Object Control State" start="54" end="60" type="MEMORY_OBJECT_CONTROL_STATE"/>
> > + <field name="MOCS" start="54" end="60" type="uint"/>
> > <field name="Stream Offset Write Enable" start="53" end="53" type="bool"/>
> > <field name="Stream Output Buffer Offset Address Enable" start="52" end="52" type="bool"/>
> > <field name="Surface Base Address" start="66" end="111" type="address"/>
> >
>
> This seems a bit strange...we're only changing this in the stream out
> packets, and only on Gen8-9?
I only changed this where we were actually going to use it. I don't know
why, but we don't set MOCS for gen7 on stream out packets (or maybe it
was just 0). I'll double check this, and see what we are supposed to
set.
> I've wondered whether we should just use a uint everywhere. On Gen9+
> it's just an index into the kernel tables, with no hardware-mandated
> meaning. On earlier platforms, it changed for every piece of hardware.
>
> I feel like a macro to construct MOCS values on earlier platforms
> would work as well as genxml. *shrug*
Either way works for me.
More information about the mesa-dev
mailing list