Michał Król wrote:
On 06/04/06, Brian Paul <[EMAIL PROTECTED]> wrote:
I think the arbitrary-length bitset type is overkill. We really just
need a 64-bit bitfield for the foreseeable future, right?
These macros in bitset.h are pretty "heavy" if all the bitsets are
just 64 bits or less.
[...]
The code would be far more efficient this way. What do you think?
I still need to review the rest of the patch in more detail. Maybe
this evening - I've got other things I need to work on.
The specialization given above is okay, but to make it future proof,
I would suggest the following.
1) Leave the generic bitset macros as they are.
2) Suffix 64-bit versions with "64", e.g. BITSET64_COPY.
3) In "t_context.h", where DECLARE_RENDER_INPUTS is declared,
also define macro names for operations, not just declarations, e.g.
#define RENDERINPUTS_COPY(x,y) BITSET64_COPY(x,y)
...
and then use them in drivers and mesa core, in place of BITSET_*
as it is now, in the patch.
I could live with that. The key thing is to use simple types and
native 64-bit types whenever possible and avoid the memcpy(), etc.
This way we can do transition to, say, 128-bit flags without touching
drivers. Also, this reduces the overall burden, when more bit-fields
will need multi-word handling. This will happen to swrast, when more
than 64 varyings are needed.
Before we get to that point, I'd like to reconsider a few things in
the code. Specifically, the way the tnl and swrast modules interface
in terms of vertex attributes. The span_arrays struct is getting
pretty big (over 800KB now) and the s_tritemp.h code is becoming
unwieldy. There's got to be a better way of handling all the
interpolants and use less memory.
For now, I just need a confirmation that my changes will not
break compilation of drivers. Then I can safely apply your proposals
in my next cvs commit.
There's a few things that didn't work.
First, the patch didn't apply cleanly the the CVS trunk. I had to
manually apply a few of the patches. t_vb_arbshader.c was the main one.
In r300_state.c you need to replace "r300_outputs_written" with "union
r300_outputs_written". In C++ you don't need the 'union', but you do
for C.
In savetris.c you need to replace _TNL_BIT_TEX1 with _TNL_ATTRIB_TEX1
at line 880.
BTW, I'd still like to see the code re-indented to the Mesa standard
someday (3-space indentation, etc) and filtered to remove the carriage
return chars.
-Brian
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev