Felix K�hling wrote:
On Wed, 06 Oct 2004 15:28:21 -0700
Eric Anholt <[EMAIL PROTECTED]> wrote:


On Wed, 2004-10-06 at 13:09, Felix K�hling wrote:

On Wed, 6 Oct 2004 22:03:40 +0200
Felix K�hling <[EMAIL PROTECTED]> wrote:

[snip]

You're right. Thanks for catching this. I tried to understand what
force_emit in the i830 driver was for, now I understand. An updated
patch is attached. I'm going to commit that.

Still wrong. Sorry. :-/ I can't just use the index because the vertex format also depends on the number of texture coordinates which is not reflected in the index. I could go abuse some more unused texture bits, but I think I'll come up with my own savage-specific bit field. I should get some sleep before I trying to fix any more bugs.

Ouch. Indeed. I wonder how expensive tnl_install_attrs is -- might we want to just always do it?


The attached patch is what I committed. When I looked at the diff I
stumbled over this definition, which looks the same in r128 and i830:

#define EMIT_PAD( N )                                                   \
do {                                                                    \
   imesa->vertex_attrs[imesa->vertex_attr_count].attrib = 0;            \
   imesa->vertex_attrs[imesa->vertex_attr_count].format = EMIT_PAD;     \
   imesa->vertex_attrs[imesa->vertex_attr_count].offset = (N);          \
   imesa->vertex_attr_count++;                                          \
} while (0)

It looks like EMIT_PAD is overloaded here, once as a macro with argument
and once without. I didn't know cpp supports overloading. Is this a
gcc-extension or are we just lucky that it works?

Good catch - even though it works, it would be better to avoid this & give the macro a new name.


Keith


------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl -- _______________________________________________ Dri-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to