mesa.git
19 years agomerge unichrome changes from branch
Keith Whitwell [Tue, 22 Mar 2005 14:25:55 +0000 (14:25 +0000)]
merge unichrome changes from branch

19 years agoRemove test for defined(DRM_USE_MALLOC) around definition of
Keith Whitwell [Tue, 22 Mar 2005 13:34:27 +0000 (13:34 +0000)]
Remove test for defined(DRM_USE_MALLOC) around definition of
drmSIGIOHandler().

19 years agoAdd more formats to test.
Keith Whitwell [Tue, 22 Mar 2005 13:32:35 +0000 (13:32 +0000)]
Add more formats to test.

19 years agoAdd DRM_USE_MALLOC flag
Keith Whitwell [Tue, 22 Mar 2005 13:31:35 +0000 (13:31 +0000)]
Add DRM_USE_MALLOC flag

19 years agoCalculate haveAccumBuffer, haveDepthBuffer and haveStencilBuffer in
Keith Whitwell [Tue, 22 Mar 2005 13:16:20 +0000 (13:16 +0000)]
Calculate haveAccumBuffer, haveDepthBuffer and haveStencilBuffer in
driFillInModes().

19 years agoAdd support for production version of ATI RN50/ES1000. (ATI Technologies
Michel Dänzer [Fri, 18 Mar 2005 23:05:07 +0000 (23:05 +0000)]
Add support for production version of ATI RN50/ES1000. (ATI Technologies
Inc.)

19 years agoMisc fixes.
Aapo Tahkola [Fri, 18 Mar 2005 14:44:27 +0000 (14:44 +0000)]
Misc fixes.

19 years agoupdate against 03-Feb-2005 release
Michal Krol [Fri, 18 Mar 2005 14:28:02 +0000 (14:28 +0000)]
update against 03-Feb-2005 release

19 years agoenable all 3dlabs front-end compiler sources
Michal Krol [Fri, 18 Mar 2005 14:21:07 +0000 (14:21 +0000)]
enable all 3dlabs front-end compiler sources

19 years agoa little program to change // comments to /* */ ones
Michal Krol [Fri, 18 Mar 2005 14:07:47 +0000 (14:07 +0000)]
a little program to change // comments to /* */ ones

19 years agoglslang flex and bison sources:
Michal Krol [Fri, 18 Mar 2005 12:18:00 +0000 (12:18 +0000)]
glslang flex and bison sources:
flex glslang.l
bison -t -v -d glslang.y
mv glslang.tab.c Gen_glslang_tab.cpp (shouldn't be .c?)
mv glslang.tab.h glslang_tab.h

19 years agoFix to get doom3 started.
Aapo Tahkola [Thu, 17 Mar 2005 22:28:06 +0000 (22:28 +0000)]
Fix to get doom3 started.

19 years agoxmllint fixes. Revert 'note_unflushed' changes that were accidetnally
Ian Romanick [Thu, 17 Mar 2005 22:01:39 +0000 (22:01 +0000)]
xmllint fixes.  Revert 'note_unflushed' changes that were accidetnally
committed in the last version.

19 years agoSimple TCL stage and ability to disable vps.
Aapo Tahkola [Thu, 17 Mar 2005 21:50:01 +0000 (21:50 +0000)]
Simple TCL stage and ability to disable vps.

19 years agoEnable the generation of server-side __glGetBooleanv_size and related
Ian Romanick [Thu, 17 Mar 2005 21:48:37 +0000 (21:48 +0000)]
Enable the generation of server-side __glGetBooleanv_size and related
functions.  There are two parts to this.  First, a size element with a name
"Get" is shorthand for having four separate size elements with names
"GetIntegerv", "GetDoublev", "GetFloatv", and "GetBooleanv".  Additionally,
a count of "?" is treated specially.  This causes a call to a handcoded
function named "__gl<base name>_variable_size".  This is *only* needed to
support GL_COMPRESSED_TEXTURE_FORMATS.  That enum can return a variable
number of values depending how many compressed texture formats are supported
by the implementation.

Fix a problem with glGetProgram{Local,Env}Parameter[df]vARB,
glAreProgramsResidentNV, and glGetVertexAttribivNV.  These changes only
affect code generated for the server-side.

The changes to enum.c are caused by enums added for the server-side
__glGetBooleanv_size functions.

19 years agoMinor refactoring and code tweaking. The only notable chage is that
Ian Romanick [Thu, 17 Mar 2005 20:56:13 +0000 (20:56 +0000)]
Minor refactoring and code tweaking.  The only notable chage is that
FilterGLAPISpecBase::xref is replaced by
FilterGLAPISpecBase::functions_by_name.  The notable difference between the
two is that ::functions_by_name includes all functions, whether they have an
assigned offset or not.  This feature will be useful (necessary) when more
server-side code is generated.

19 years agoMinor vertex array support tweaks. These are in preparation for the
Ian Romanick [Thu, 17 Mar 2005 20:36:20 +0000 (20:36 +0000)]
Minor vertex array support tweaks.  These are in preparation for the
(eventual) addition of support for ARB_vertex_buffer_object.  Elminitate the
need for array_state_vector::large_header.  Make some very minor tweaks to
the handling of the indices pointer in emit_DrawElements_old.

19 years agoMinor vertex array support tweaks. Most of these are in preparation for the
Ian Romanick [Thu, 17 Mar 2005 20:13:09 +0000 (20:13 +0000)]
Minor vertex array support tweaks.  Most of these are in preparation for the
(eventual) addition of support for ARB_vertex_buffer_object.

Move all the private vertex array data structures out of
indirect_vertex_array.c and into indirect_va_private.h.

Rename array_state_vector::enabled_array_count to
array_state_vector::enabled_client_array_count.

Make sure that both the GL extension string and the server GL version are
available when __glXInitVertexState is called.

Make sure that array_state::normalized is set correctly in the array's
gl*Pointer function.

19 years agoRefactored some of the code for PrintGlxReqSize_[ch]. This ensures that the
Ian Romanick [Thu, 17 Mar 2005 01:50:32 +0000 (01:50 +0000)]
Refactored some of the code for PrintGlxReqSize_[ch].  This ensures that the
same set of functions will be iterated for both the generated C-source file
and the generated header file.

19 years agoFix the handling of zero-sized output parameters (i.e., those with type
Ian Romanick [Thu, 17 Mar 2005 01:48:11 +0000 (01:48 +0000)]
Fix the handling of zero-sized output parameters (i.e., those with type
'GLvoid *').  This fixes the GLX protocol for glGetProgramStringARB.  This
fixes bugzilla #2747.

Remove the 'ignore="true"' from glVertexAttrib4bvARB.  This fixes bugzilla
#2746.

19 years agoHard-code the client-side maximum GL version. It turns out that there are
Ian Romanick [Thu, 17 Mar 2005 01:36:24 +0000 (01:36 +0000)]
Hard-code the client-side maximum GL version.  It turns out that there are
some flaws in the calculation code when the highest version listed in
known_gl_extensions is supported.  This code would also have some problems
with some of the new features (that don't have an associated extension) on
GL 2.0.

19 years agoProper VAP output configuration as R300_RS_ROUTE_0_COLOR became optional and broke...
Aapo Tahkola [Wed, 16 Mar 2005 22:32:48 +0000 (22:32 +0000)]
Proper VAP output configuration as R300_RS_ROUTE_0_COLOR became optional and broke arbvptorus(takes no input color but produces output color). Also removing some useless code.

19 years agoFixed some strangeness when mixing textured/flat primitives. Skipping texture units...
Ben Skeggs [Wed, 16 Mar 2005 00:54:09 +0000 (00:54 +0000)]
Fixed some strangeness when mixing textured/flat primitives.  Skipping texture units should render correctly also.  Aapo, I dont think I broke glxgears again on you...

19 years agoadd support for user-configurable brilinear filtering on r200
Roland Scheidegger [Tue, 15 Mar 2005 22:23:29 +0000 (22:23 +0000)]
add support for user-configurable brilinear filtering on r200

19 years agoFix to get glxgears display anything.
Aapo Tahkola [Tue, 15 Mar 2005 20:55:29 +0000 (20:55 +0000)]
Fix to get glxgears display anything.

19 years agoFor some reason the Makefile didn't commit..
Ben Skeggs [Tue, 15 Mar 2005 17:09:35 +0000 (17:09 +0000)]
For some reason the Makefile didn't commit..

19 years agoInitial multitexturing support. Old behaviour can be re-enabled by changing ifdefs...
Ben Skeggs [Tue, 15 Mar 2005 17:00:44 +0000 (17:00 +0000)]
Initial multitexturing support.  Old behaviour can be re-enabled by changing ifdefs in r300_setup_rs_unit and r300SetupPixelShader in r300_state.c\nRequires DRM update.

19 years agoIf setting GL_PACK_INVERT_MESA results in a GL error, log it.
Ian Romanick [Mon, 14 Mar 2005 22:09:31 +0000 (22:09 +0000)]
If setting GL_PACK_INVERT_MESA results in a GL error, log it.

19 years agoWhen timestamping textures, need to emit the event with SAVAGE_WAIT_3D
Felix Kuehling [Mon, 14 Mar 2005 21:52:46 +0000 (21:52 +0000)]
When timestamping textures, need to emit the event with SAVAGE_WAIT_3D
set. Otherwise the 3D engine may still be using a texture that is
being overwritten. In order to minimize the cost of waiting, timestamp
textures only when needed: when a texture image changes, when a
different texture is bound to a texture unit or when a texture unit is
disabled. (Used to be after flushing every command buffer.)

19 years agoStencil support
Peter Zubaj [Mon, 14 Mar 2005 20:35:00 +0000 (20:35 +0000)]
Stencil support
Reflex from mesa demos doesn't work
TODO - double side stencil
I hope that I didn't break anything

19 years agore-enable slang sources
Michal Krol [Mon, 14 Mar 2005 12:43:59 +0000 (12:43 +0000)]
re-enable slang sources

19 years agomake it compile under linux
Michal Krol [Mon, 14 Mar 2005 12:24:32 +0000 (12:24 +0000)]
make it compile under linux

19 years agomake it compile under gcc 3.3.2
Michal Krol [Mon, 14 Mar 2005 12:23:14 +0000 (12:23 +0000)]
make it compile under gcc 3.3.2

19 years agofix enum comma
Michal Krol [Mon, 14 Mar 2005 12:19:36 +0000 (12:19 +0000)]
fix enum comma

19 years agoReplacing alpha test bits with values that give desired results as compaired to softw...
Aapo Tahkola [Sun, 13 Mar 2005 12:23:08 +0000 (12:23 +0000)]
Replacing alpha test bits with values that give desired results as compaired to software rendering. Alpha test in textures is still completely broken as can be seen in progs/demos/fire and various games.

19 years agoUpdated savage_dri.h from Xorg CVS. This removes definitions that are
Felix Kuehling [Sun, 13 Mar 2005 00:20:03 +0000 (00:20 +0000)]
Updated savage_dri.h from Xorg CVS. This removes definitions that are
not part of the DDX->DRI interface and should never have been in this
file in the first place.

19 years agoRemoved savagedma.[ch]. They have been unused for a while and were only
Felix Kuehling [Sat, 12 Mar 2005 23:00:53 +0000 (23:00 +0000)]
Removed savagedma.[ch]. They have been unused for a while and were only
kept around for reference. Now that command DMA is implemented in the
DRM module they are no longer needed.

19 years agoUnlike radeon and r200 drivers r300AllocCmdBuf allocs dwords not bytes.
Aapo Tahkola [Sat, 12 Mar 2005 10:14:09 +0000 (10:14 +0000)]
Unlike radeon and r200 drivers r300AllocCmdBuf allocs dwords not bytes.

19 years agoAdd support for ARB_draw_buffers and ARB_occlusion_query. The GLX protocol
Ian Romanick [Fri, 11 Mar 2005 20:55:03 +0000 (20:55 +0000)]
Add support for ARB_draw_buffers and ARB_occlusion_query.  The GLX protocol
for these extensions (as well as ARB_vertex_program and ARB_matrix_palette)
was just approved by the ARB on 8-Mar-2005.  Now the only extension missing
for 1.5 support is ARB_vertex_buffer_object.

The opcodes for ARB_matrix_palette were also added to gl_API.xml.  Since
this extension isn't supported by Mesa, no code is generated for it.  Some
tabs were also converted to spaces in the comment for
GetCompressedTexImageARB.

19 years agoadd MAT_DIRTY_FLAGS in _math_matrix_mul_floats(), (bug 2696)
Brian Paul [Fri, 11 Mar 2005 14:54:51 +0000 (14:54 +0000)]
add MAT_DIRTY_FLAGS in _math_matrix_mul_floats(), (bug 2696)

19 years agoAdd suitable definitions for the _REV formats, plus a comment
Paul Mackerras [Fri, 11 Mar 2005 11:38:23 +0000 (11:38 +0000)]
Add suitable definitions for the _REV formats, plus a comment
explaining why they are the same as the non-REV formats now that
textures don't get byte-swapped on their way to the chip.
Fix the ARGB4444 and L8 formats.
Add entries for the A8 and RGB332 formats.

19 years ago- Flush before updating the timestamp of a texture heap from a bound texture.
Felix Kuehling [Thu, 10 Mar 2005 22:45:00 +0000 (22:45 +0000)]
- Flush before updating the timestamp of a texture heap from a bound texture.
- Flush before using a new texture or before disabling a texture unit,
  because savageFlushCmdBuf can only update the timestamp of the last
  used texture. This fixes corruption in quake2 with single-textured
  lighting.

19 years agoIf the texture image changed force emitting the texture address, even
Felix Kuehling [Wed, 9 Mar 2005 15:28:47 +0000 (15:28 +0000)]
If the texture image changed force emitting the texture address, even
if it didn't change. This seems to flush texture cashes. Fixes
multi-textured lighting in quake2.

19 years agoDon't use R200 texture constants - R300 fields are all different.
Vladimir Dergachev [Wed, 9 Mar 2005 05:31:31 +0000 (05:31 +0000)]
Don't use R200 texture constants - R300 fields are all different.

19 years agoDeal with texture formats in a more robust way.
Vladimir Dergachev [Wed, 9 Mar 2005 00:40:55 +0000 (00:40 +0000)]
Deal with texture formats in a more robust way.

19 years agoReplacing some RADEON cmd types with r300 counterparts.
Aapo Tahkola [Tue, 8 Mar 2005 22:29:45 +0000 (22:29 +0000)]
Replacing some RADEON cmd types with r300 counterparts.

19 years agoImproving Vladimirs alpha test fix a bit as it turns out r300Enable didnt correctly...
Aapo Tahkola [Tue, 8 Mar 2005 03:29:46 +0000 (03:29 +0000)]
Improving Vladimirs alpha test fix a bit as it turns out r300Enable didnt correctly disable alpha test. Vertex programs with high vertex count now run a lot faster as software fallback is no longer on. Also disabling 'temp to result'-instructions as they probably violate the spec and dont seem to be something thats needed.

19 years agoActually *use* the count_scale value associated with a parameter.
Ian Romanick [Sun, 6 Mar 2005 08:55:39 +0000 (08:55 +0000)]
Actually *use* the count_scale value associated with a parameter.

19 years agoDon't synchronize after each frame. Allow the GPU to be one frame
Felix Kuehling [Sun, 6 Mar 2005 03:52:01 +0000 (03:52 +0000)]
Don't synchronize after each frame. Allow the GPU to be one frame
ahead of the CPU for more parallelism of CPU and GPU. Unfortunately
there seems to be some broken hardware (like my ProSavageDDR) on which
status register updates are delayed sometimes. This leads to very
jerky animation if the hardware can buffer more than the current
frame. A new option "sync_frames" can be used as a remedy on such
broken hardware.

19 years ago- Fixed two bugs related to DMA buffer handling that showed up with the
Felix Kuehling [Sun, 6 Mar 2005 01:28:30 +0000 (01:28 +0000)]
- Fixed two bugs related to DMA buffer handling that showed up with the
  new DRM version 2.4 and command DMA.
- Flush less.
- Bumped the driver date.

19 years agoAdd format 15. It turned out to be X,X,X,X,X8.
Vladimir Dergachev [Sat, 5 Mar 2005 22:20:57 +0000 (22:20 +0000)]
Add format 15. It turned out to be X,X,X,X,X8.

19 years agoFixing memset on ia64 & other archs
Dave Airlie [Sat, 5 Mar 2005 06:38:59 +0000 (06:38 +0000)]
Fixing memset on ia64 & other archs
From: Stephane Marchesin

19 years agoEnable VB mode rendering by default. If anyone thinks this is wrong, *please* feel...
Vladimir Dergachev [Sat, 5 Mar 2005 06:31:36 +0000 (06:31 +0000)]
Enable VB mode rendering by default. If anyone thinks this is wrong, *please* feel free to change it back.

My reasons:

    * immediate mode is broken
    * vb mode is faster
    * vb mode is the right way to do it.

19 years agoDo properly initialize ALPHA_TEST register instead of carefully preserving bogus...
Vladimir Dergachev [Sat, 5 Mar 2005 06:10:09 +0000 (06:10 +0000)]
Do properly initialize ALPHA_TEST register instead of carefully preserving bogus value. This fixes many, many rendering issues which I wrongly blamed on texture programming or performance..

19 years agofix for solo to set the mode, and make solo gcc2 friendly...
Dave Airlie [Sat, 5 Mar 2005 04:00:09 +0000 (04:00 +0000)]
fix for solo to set the mode, and make solo gcc2 friendly...

From: Stephane Marchesin

19 years agoremove one of the two _tnl_isolate_materials function calls
Roland Scheidegger [Sat, 5 Mar 2005 00:04:20 +0000 (00:04 +0000)]
remove one of the two _tnl_isolate_materials function calls

19 years agoAdd preliminary EGL headers.
Adam Jackson [Fri, 4 Mar 2005 20:18:55 +0000 (20:18 +0000)]
Add preliminary EGL headers.

19 years agoImport fixes from X.org tree (Søren Sandmann <sandmann@redhat.com>).
Ian Romanick [Fri, 4 Mar 2005 17:53:24 +0000 (17:53 +0000)]
Import fixes from X.org tree (Søren Sandmann  <sandmann@redhat.com>).

19 years agoSet pipes for R420 cards. Gives a nice speedup. This needs to be tested on r420 cards...
Rune Petersen [Fri, 4 Mar 2005 15:48:40 +0000 (15:48 +0000)]
Set pipes for R420 cards. Gives a nice speedup. This needs to be tested on r420 cards with less than 16 pipes.

19 years agoAdd a couple of helper functions for completeness.
Vladimir Dergachev [Thu, 3 Mar 2005 23:18:19 +0000 (23:18 +0000)]
Add a couple of helper functions for completeness.

19 years agoFix some errors in the parameter descriptions in serveral vertex / fragment
Ian Romanick [Thu, 3 Mar 2005 21:22:46 +0000 (21:22 +0000)]
Fix some errors in the parameter descriptions in serveral vertex / fragment
program related functions.

19 years agoCheck for some common function parameter description errors in the
Ian Romanick [Thu, 3 Mar 2005 21:21:59 +0000 (21:21 +0000)]
Check for some common function parameter description errors in the
endElement handler for <function>.  This catches the errors as early as
possible and makes debugging other code easier.

19 years agoWhen building in the X-Server, attr.depth doesn't exist. Instead, use
Ian Romanick [Thu, 3 Mar 2005 19:56:11 +0000 (19:56 +0000)]
When building in the X-Server, attr.depth doesn't exist.  Instead, use
(XMesaDrawable)w)->depth in the error message.

19 years agochange gl_buffer_object's Size field to GLsizeiptrARB type
Brian Paul [Thu, 3 Mar 2005 02:05:33 +0000 (02:05 +0000)]
change gl_buffer_object's Size field to GLsizeiptrARB type

19 years agoAdded linux-x86-32 config to force building 32-bit objects in a 64-bit environment.
Brian Paul [Thu, 3 Mar 2005 01:44:42 +0000 (01:44 +0000)]
Added linux-x86-32 config to force building 32-bit objects in a 64-bit environment.

19 years agoif building 32-bit objects in 64-bit environment, use -m32 flag
Brian Paul [Thu, 3 Mar 2005 01:38:13 +0000 (01:38 +0000)]
if building 32-bit objects in 64-bit environment, use -m32 flag

19 years agouse COPY_CLEAN_4V macro to replace using both ASSIGN_4V & COPY_SZ_4V
Alan Hourihane [Wed, 2 Mar 2005 18:57:01 +0000 (18:57 +0000)]
use COPY_CLEAN_4V macro to replace using both ASSIGN_4V & COPY_SZ_4V

19 years agoAdded a bunch of new comments, minor code clean-ups.
Brian Paul [Wed, 2 Mar 2005 16:37:24 +0000 (16:37 +0000)]
Added a bunch of new comments, minor code clean-ups.

19 years agoUsing glColor3 commands to update materials could result in an undefined
Brian Paul [Wed, 2 Mar 2005 16:31:58 +0000 (16:31 +0000)]
Using glColor3 commands to update materials could result in an undefined
alpha value.  Fixed.

19 years agoadded stub functions for GLX_MESA_allocate_memory
Brian Paul [Tue, 1 Mar 2005 02:51:07 +0000 (02:51 +0000)]
added stub functions for GLX_MESA_allocate_memory

19 years agoClean-up some warnings caused by the addition of vertex / fragment program
Ian Romanick [Mon, 28 Feb 2005 19:37:10 +0000 (19:37 +0000)]
Clean-up some warnings caused by the addition of vertex / fragment program
protocol support (reported by Adam Jackson).  Added code to validate the
'type' parameter to the draw element functions.

19 years agoadditional parenthesis in TNL_CONTEXT macro (Nicolai Haehnle)
Brian Paul [Mon, 28 Feb 2005 17:45:11 +0000 (17:45 +0000)]
additional parenthesis in TNL_CONTEXT macro (Nicolai Haehnle)

19 years agofix for 'nasty bug' and some sanity checks to avoid buffer overruns. Bumping VSF_MAX_...
Aapo Tahkola [Mon, 28 Feb 2005 00:27:02 +0000 (00:27 +0000)]
fix for 'nasty bug' and some sanity checks to avoid buffer overruns. Bumping VSF_MAX_FRAGMENT_LENGTH as it seems a bit low otherwise.

19 years agosilence warnings
Brian Paul [Sun, 27 Feb 2005 16:23:41 +0000 (16:23 +0000)]
silence warnings

19 years agoAdded 0x4e51 - Saphire 9600 256MB
hmarson [Sun, 27 Feb 2005 12:12:25 +0000 (12:12 +0000)]
Added 0x4e51 - Saphire 9600 256MB
      0x4e71 - Saphire 9600 256MB - Second Head...

19 years agoprecedence precedence precedence.. add some brackets
Dave Airlie [Sun, 27 Feb 2005 07:43:18 +0000 (07:43 +0000)]
precedence precedence precedence.. add some brackets

19 years agoRename _mesa_update_buffers() to _mesa_update_draw_buffer_bounds() and do
Brian Paul [Sat, 26 Feb 2005 17:16:12 +0000 (17:16 +0000)]
Rename _mesa_update_buffers() to _mesa_update_draw_buffer_bounds() and do
additional checks.
Replace _mesa_init_buffers() with _mesa_init_scissor() and _mesa_init_multisample().

19 years agoAdd a dri config option to enable the max texture level hack
Dave Airlie [Sat, 26 Feb 2005 05:24:04 +0000 (05:24 +0000)]
Add a dri config option to enable the max texture level hack
make ycbcr depend on a CHIPSET define .. needs to be filled in though

19 years agouse girl2.rgb by default
Dave Airlie [Sat, 26 Feb 2005 04:56:25 +0000 (04:56 +0000)]
use girl2.rgb by default

19 years agoAdd glXAllocateMemoryMESA demo app using ycbcr...
Dave Airlie [Sat, 26 Feb 2005 04:51:47 +0000 (04:51 +0000)]
Add glXAllocateMemoryMESA demo app using ycbcr...
add girl2.rgb which is a slightly resized girl.rgb so client texturing works

19 years agobring over structs from Xorg glx.h to make Mesa glx.h the one true glx.h
Dave Airlie [Sat, 26 Feb 2005 03:55:44 +0000 (03:55 +0000)]
bring over structs from Xorg glx.h to make Mesa glx.h the one true glx.h

19 years agoAdd GLX_MESA_allocate_memory from Xorg glx.h
Dave Airlie [Sat, 26 Feb 2005 03:51:17 +0000 (03:51 +0000)]
Add GLX_MESA_allocate_memory from Xorg glx.h

19 years agoFairly significant changes to enums.c and the way it is generated. enums.c
Ian Romanick [Sat, 26 Feb 2005 01:09:35 +0000 (01:09 +0000)]
Fairly significant changes to enums.c and the way it is generated.  enums.c
now contains 3 static tables.  The first table is a single, large string of
all the enum names.  The second table is an array, sorted by enum name, of
indexes to the string table and the matching enum value.  The extra string
table is used to eliminate relocs (and save space) in the compiled file.
The third table is an array, sorted by enum value, of indexes into the
second table.

The [name, enum] table contains all of the enums, but the table sorted by
enum-value does not.  This table contains one entry per enum value.  For
enum values that have multiple names (e.g., 0x84C0 has GL_TEXTURE0_ARB and
GL_TEXTURE0), only an index to the "best" name will appear in the table.
gl_enums.py gives precedence to "core" GL versions of names, followed by ARB
versions, followed by EXT versions, followed, finally, by vendor versions
(i.e., anything that doesn't fall into one of the previous categories).  By
filtering the unneeded elements from this table, not only can we guarantee
determinism in the generated tables, but we save 364 elements in the table.

The optimizations outlined above reduced the size of the stripped enums.o
(on x86) from ~80KB to ~53KB.

The internal organization of gl_enums.py was also heavily modified.
Previously enums were stored in an unsorted list as [value, name] tuples
(basically).  This list was then sorted, using a user-specified compare
function (i.e., VERY slow in most Python implementations) to generate a
table sorted by enum value.  It was then sorted again, using another
user-specified compare function, to generate a table sorted by name.

Enums are now stored in a dictionary, called enum_table, with the enum value
as the key.  Each dictionary element is a list of [name, priority] pairs.
The priority is determined as described above.  The table sorted by enum
value is generated by sorting the keys of enum_table (i.e., very fast).  The
tables sorted by name are generated by creating a list, called name_table,
of [name, enum value] pairs.  This table can then be sorted by doing
name_table.sort() (i.e., very fast).

The result is a fair amount more Python code, but execution time was reduced
from ~14 seconds to ~2 seconds.

19 years agoAccidentally committed wrong version with the previous commit set.
Ian Romanick [Fri, 25 Feb 2005 23:02:33 +0000 (23:02 +0000)]
Accidentally committed wrong version with the previous commit set.

19 years agoAdd GLX protocol support for ARB_fragement_program,
Ian Romanick [Fri, 25 Feb 2005 22:46:30 +0000 (22:46 +0000)]
Add GLX protocol support for ARB_fragement_program,
ARB_fragment_program_shadow, ARB_vertex_program, NV_fragment_program,
NV_fragment_program_option, NV_fragment_program2, NV_vertex_program,
NV_vertex_program1_1, NV_vertex_program2, NV_vertex_program2_option,
NV_vertex_program3, and ATI_text_fragment_shader.

19 years agoConvert the static functions read_pixel_reply, read_reply,
Ian Romanick [Fri, 25 Feb 2005 01:48:25 +0000 (01:48 +0000)]
Convert the static functions read_pixel_reply, read_reply,
setup_single_request, and setup_vendor_request to the global functions
__glXReadPixelReply, __glXReadReply, __glXSetupSingleRequest, and
__glXSetupVendorRequest.  This will make it easier to add handcoded Single /
VendorPrivate / VendorPrivteWithReply functions.

19 years agoAnother nasty struct size bug found.
Aapo Tahkola [Thu, 24 Feb 2005 13:59:56 +0000 (13:59 +0000)]
Another nasty struct size bug found.

19 years agoMore GL_EXT_framebuffer_object: rename some things, added device driver hooks.
Brian Paul [Thu, 24 Feb 2005 05:47:06 +0000 (05:47 +0000)]
More GL_EXT_framebuffer_object: rename some things, added device driver hooks.

19 years agoDon't forget to update a heap's timestamp when a texture image is
Felix Kuehling [Wed, 23 Feb 2005 20:51:27 +0000 (20:51 +0000)]
Don't forget to update a heap's timestamp when a texture image is
changed. Other drivers don't need to do this because they're swapping
modified textures out of texture memory, which implies a timestamp
update.

19 years agoMissed the commit of glxext.c yesterday.
Ian Romanick [Wed, 23 Feb 2005 20:06:52 +0000 (20:06 +0000)]
Missed the commit of glxext.c yesterday.

Fixed a flow control problem in glGet*v that could result in the display
not being unlocked.  This also resulted in refactoring a lot more code
out of the glGet*v routines into get_array_data, which was renamed to
get_client_data.

19 years agoPut quotes around $(CC) and $(CXX) so that 'CC=cache gcc' will work.
Ian Romanick [Wed, 23 Feb 2005 19:24:30 +0000 (19:24 +0000)]
Put quotes around $(CC) and $(CXX) so that 'CC=cache gcc' will work.

19 years agominor changes to aid debugging, and a new comment
Brian Paul [Wed, 23 Feb 2005 16:54:18 +0000 (16:54 +0000)]
minor changes to aid debugging, and a new comment

19 years agoWith Savage DRM version 2.3.x or later use event counters for texture
Felix Kuehling [Wed, 23 Feb 2005 16:37:27 +0000 (16:37 +0000)]
With Savage DRM version 2.3.x or later use event counters for texture
heap aging, similar to the way it's done in the i810 and i855 drivers.
This avoids idling the engine on every texture upload.

19 years agoSort the enums in the Python code, instead of at runtime. (Zack Rusin)
Brian Paul [Wed, 23 Feb 2005 16:36:17 +0000 (16:36 +0000)]
Sort the enums in the Python code, instead of at runtime. (Zack Rusin)

19 years agoCorrected the value for X_GLrop_SecondaryColor3svEXT.
Ian Romanick [Wed, 23 Feb 2005 00:47:11 +0000 (00:47 +0000)]
Corrected the value for X_GLrop_SecondaryColor3svEXT.

19 years agoMissed the Makefile with the previous commit.
Ian Romanick [Wed, 23 Feb 2005 00:24:18 +0000 (00:24 +0000)]
Missed the Makefile with the previous commit.

19 years agoAdded __glExtensionBiIsEnabled and __GLXcontext::gl_extension_bits. This
Ian Romanick [Tue, 22 Feb 2005 22:36:31 +0000 (22:36 +0000)]
Added __glExtensionBiIsEnabled and __GLXcontext::gl_extension_bits.  This
enables libGL to query which extension are exported to applications.

Refactored array-query functionality (from glGet*v) in src/glx/x11/single2.c.

Massive re-write of indirect vertex array support.  The most noticable
effect is that glDrawElements now generates DrawArrays protocol.  The
side-effects (and the main reasons for the re-work) are that it is much
easier to add support for new arrays (e.g., GL_VERTEX_ATTRIB_ARRAY,
GL_WEIGHT_ARRAY_ARB, etc.) and it is much easier to add support for the new
DrawArrays protocol (required to support ARB_vertex_buffer_object).

These changes were primarilly tested with progs/demos/isosurf.

19 years agonow generated with Python script
Brian Paul [Tue, 22 Feb 2005 15:42:30 +0000 (15:42 +0000)]
now generated with Python script

19 years agogenerate enums.c file (Zack Rusin)
Brian Paul [Tue, 22 Feb 2005 15:39:46 +0000 (15:39 +0000)]
generate enums.c file (Zack Rusin)

19 years agoNew elt buffer code should be fairly stable.
Aapo Tahkola [Tue, 22 Feb 2005 05:16:42 +0000 (05:16 +0000)]
New elt buffer code should be fairly stable.