[quake3-bugzilla] [Bug 4358] Vertex Buffer Object (VBO) code available

bugzilla-daemon at icculus.org bugzilla-daemon at icculus.org
Fri May 6 19:44:54 EDT 2011


https://bugzilla.icculus.org/show_bug.cgi?id=4358

Matt Turner <mattst88 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mattst88 at gmail.com

--- Comment #29 from Matt Turner <mattst88 at gmail.com> 2011-05-06 19:44:51 EDT ---
(In reply to comment #27)
> Created attachment 2663 [details]
> Version 14 of VBO and GLSL code from xreal, w/ changes
> 
> v14.
> 
> Little bit of speedup, but the main parts of this patch are normal mapping on
> md3 models, per-pixel dlights (on certain shaders), and cvars to turn off
> normal/specular/diffuse.

Since the renderer is being rewritten, now is a perfect time to repack the
structs to avoid unaligned accesses. Right now, they're fucking terrible. 

Consider:

typedef struct mdvModel_s
{
    int             numFrames;
    mdvFrame_t     *frames;

    int             numTags;
    mdvTag_t       *tags;
    mdvTagName_t   *tagNames;

    int             numSurfaces;
    mdvSurface_t   *surfaces;

    int             numVBOSurfaces;
    srfVBOMDVMesh_t  *vboSurfaces;

    int             numSkins;
} mdvModel_t;

on 64-bit platforms, *frames and *surfaces are unaligned. This causes some
performance loss on platforms that don't care too much (amd64), to terrible
performance loss on platforms that do care (alpha), and causes very strict
platforms to SIGBUS (sparc).

Is there a place you hang out that we could work? IRC? Is this just a straight
port of the XReal code? If so, I guess it'd be best to fix the unaligned
accesses upstream.

-- 
Configure bugmail: https://bugzilla.icculus.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the quake3-bugzilla mailing list