[Nouveau] [RFC/PATCH] Switch dri driver to use rules-ng-ng headers
Marcin Kościelnicki
koriakin at 0x04.net
Sun Oct 31 18:59:31 PDT 2010
> following patches make the dri driver use rules-ng-ng(rnn) generated
> register definitions instead of renouveau generated ones.
> First set of 5 patches is for mesa repository, second set of 4 patches
is
> for rnn and consists of changes ported from renouveau.
Applied the rnn stuff.
> One thing I do not understand is, why rnn does not generate
> NV20_3D_TEX_ENABLE__LEN(should be 4), so any pointers on what to
> do are welcome, as are any other comments, suggestions etc.
This is caused by the way TEX_ENABLE is defined...
<stripe length="4" stride="64">
<doc> Texture units. </doc>
<!-- ... -->
<reg32 offset="0x1b0c" name="TEX_ENABLE">
<!-- ... -->
</reg32>
</stripe>
TEX_ENABLE is actually a singular register defined within an anonymous
stripe with length 4. If TEX_ENABLE was itself an array-register,
NV20_3D_TEX_ENABLE__LEN would be its length. What you want is the length
of the stripe, which doesn't have a name, and hence doesn't have a define.
I'd suggest changing the stripe's name to TEX, and nuking TEX_ prefix from
the regs inside it: you'll end up with NV20_3D_TEX__LEN defined to 4, and
the effective names of stuff inside it will be unchanged.
Marcin Kościelnicki
More information about the Nouveau
mailing list