[Mesa-dev] [PATCH] Drop the "neutral" tnl module
Chia-I Wu
olvaffe at gmail.com
Wed Oct 13 21:18:48 PDT 2010
2010/10/14 Kristian Høgsberg <krh at bitplanet.net>:
> 2010/10/13 Kristian Høgsberg <krh at bitplanet.net>:
>> Just always check for FLUSH_UPDATE_CURRENT and call Driver.BeginVertices
>> when necessary. By using the unlikely() macros, this ends up as
>> a 10% performance improvement (for isosurf, anyway) over the old,
>> complicated function pointer swapping.
>> ---
>
> I should say that this also fixes the bug we discussed a few weeks back:
>
> http://lists.freedesktop.org/archives/mesa-dev/2010-September/002950.html
>
> The root cause, it turns out, was that I forgot to set up the neutral
> tnl module in case of a DRI driver that supports both GL and GLES (ie
> has FEATURE_beginend set) but is used for a GLES2 context. That would
> have been a more minimal patch, but this gets rid of the pointer
> swapping and is faster.
Nice work. This looks great to me.
Regarding GLES2 context with DRI drivers, there are other spots that
need to do run time checks (on ctx->API) instead of compile time ones.
OpenGL ES started out as an overlay and I tried to keep the changes to
the core minimal. But since it is now integrated, and there are
extensions such as GLX_EXT_create_context_es2_profile, it would be
good to reconsider the best way to support these variant APIs or
profiles, longer term.
--
olv at LunarG.com
More information about the mesa-dev
mailing list