[Mesa-dev] [Intel-gfx] [PATCH] i965: Revert absolute mode for constant buffer pointers.
kenneth at whitecape.org
Wed Oct 25 17:31:14 UTC 2017
On Wednesday, October 25, 2017 7:33:41 AM PDT Jason Ekstrand wrote:
> On October 25, 2017 06:05:16 Joonas Lahtinen wrote:
> > There indeed seems to be quite a lot of missing registers from the i915
> > driver where the context is initialized. (Psst. You can read that as:
> > "all the 33 non-privileged registers we could quickly list, are
> > missing").
> We probably don't need *all* of them initialized. For instance, the
> initial values of the ALU registers or the indirect draw parameter
> registers will probably never matter. However, if you want to just
> initialized them all, that's fine.
I agree - I think we can cut down the list substantially, if you like.
Here's my breakdown of Skylake's non-privileged register list:
Should be initialized by the kernel. Several of these can severely
break unsuspecting userspace, and we'd like to be able to rely on a
The kernel can skip these if you like. Statistics registers just count
things, and userspace always calculates (end counter - start counter)
deltas, so the initial value doesn't really matter.
The kernel can skip these if you like, IMO. These registers are only
used when enabling an optional feature - stream out (SO_WRITE_*),
indirect compute dispatch (GPGPU_*), predicated draws (MI_PREDICATE_*),
indirect draws (3DPRIM_*). Userspace has to explicitly opt in to each
of these features by enabling a flag, so there isn't a cross-context
contamination problem. If userspace opts in to these features, it can
be responsible for programming the registers correctly.
CS_GPR (1-16) 0x2600
The kernel can skip these if you like. They're temporary storage when
using the MI_MATH instruction. Example usage: load values into CS_GPR1
and CS_GPR2, add them, store the result in CS_GPR3. Store to memory.
Nobody should be doing math on register values without setting them.
That's clearly a userspace bug.
OA CONTROL 0x2B00
I don't know about these.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 833 bytes
Desc: This is a digitally signed message part.
More information about the mesa-dev