Commit Graph

6559 Commits

Author SHA1 Message Date
Brian Paul 6c06ce281a Use XAddExtension() to register an XCloseDisplay() callback function.
When the callback is called, free all Mesa's private visual and buffer
data structures which are tied to the display.
Fixes problems reported by Kitware.
2006-08-30 21:17:51 +00:00
Brian Paul 12a5f812fc init a local var to silence warning 2006-08-30 19:02:45 +00:00
Roland Scheidegger a974aaaa3e Minor r200 vertex program cleanups. Remove disabled leftovers from r300 vertex program code. Fix authors. Correct slightly wrong check to determine if ran out of temps. Simplify check to determine if ran out of max instructions. Correctly report used native temps. Always kick off program translation when ProgramStringNotify is called (otherwise the reported native resources used queried might be wrong). 2006-08-30 13:44:31 +00:00
Roland Scheidegger e6de1edaf0 fix initialization of native resource usage of vertex/fragment programs 2006-08-30 11:55:18 +00:00
Roland Scheidegger ef3f00f67e fix typo causing a segfault when a vertex program uses more than 96 parameters 2006-08-30 10:26:31 +00:00
Brian Paul 8334c8a216 Move call to _swrast_update_rasterflags() since it depends on the
results of _swrast_update_fog_state().
Fixes bug where first frame of progs/samples/fog.c does not show fog.
2006-08-29 22:32:31 +00:00
Brian Paul f7c4dc007f _mesa_debug() should be a no-op when not compiled with DEBUG defined. 2006-08-29 22:30:58 +00:00
Brian Paul 70c2d51230 remove assertion that referenced &glSetFenceNV for debug test 2006-08-29 21:54:01 +00:00
Brian Paul 0aab798a18 replace abort with _mesa_problem() 2006-08-29 19:09:57 +00:00
Ian Romanick 8d675aa637 Deprecate GL_EXT_vertex_weighting.
Nvidia no longer supports this extension, and they no longer export its
entry points from their libGL.  There's no reason for us to keep dragging it
around either.
2006-08-29 17:44:45 +00:00
Ian Romanick dfdd0b4f30 More static dispatch function removal.
Make functions for the following extensions available only via
glXGetProcAddress.  In cases where there are other aliases to the same
functions (e.g., between GL_EXT_histogram and GL_ARB_imaging), the alias
functions may still be statically exported.

    - GL_ATI_blend_equation_separate
    - GL_EXT_blend_equation_separate
    - GL_EXT_convolution
    - GL_EXT_color_sub_table
    - GL_EXT_cull_vertex
    - GL_EXT_depth_bounds_test
    - GL_EXT_framebuffer_blit
    - GL_EXT_histogram
    - GL_EXT_multisample
    - GL_EXT_stencil_two_side
    - GL_EXT_timer_query
    - GL_IBM_multimode_draw_arrays
    - GL_INGR_blend_func_separate
    - GL_NV_fence
    - GL_SGI_color_table
    - GL_SGIS_multisample
    - GL_SGIS_pixel_texture
    - GL_SGIS_point_parameters
    - GL_SGIX_pixel_texture
2006-08-29 16:43:44 +00:00
Ian Romanick fc5b57b713 Clean up GLX function exports.
Make functions for the following extensions only accessable via
glXGetProcAddress:

    - GLX_EXT_texture_from_pixmap
    - GLX_MESA_copy_sub_buffer
    - GLX_MESA_release_buffers
    - GLX_MESA_swap_control
    - GLX_MESA_swap_frame_usage
    - GLX_OML_sync_control
    - GLX_SGI_make_current_read
    - GLX_SGI_swap_control
    - GLX_SGI_video_sync
    - GLX_SGIX_swap_barrier
    - GLX_SGIX_swap_group

Removed all remnants of the following extensions:

    - GLX_MESA_set_3dfx_mode
    - GLX_SGI_cushion
    - GLX_SGIX_dmbuffer
    - GLX_SGIX_video_resize
    - GLX_SGIX_video_source
    - GLX_SUN_get_transparent_index
    -
2006-08-29 15:38:19 +00:00
Brian Paul b5a2fc1255 Check mesa_vp->Base.NumInstructions == 0 instead of mesa_vp->Base.String to
determine if we actually have a program.  See "[r300] TCL fallback with Quake3".
2006-08-28 19:42:41 +00:00
Ian Romanick 258751f4a0 Add two new gl_function methods. dispatch_name returns the name of
the true static dispatch name (either the glFooBar name or the
gl_dispatch_stub_XXX name).  static_name returns the name of the
static function for a specific alias of a GL function.

Adding (and using) these two functions corrects some problems in the
generated code related to functions with multiple aliases where some
of the aliases have true static dispatch functions and some don't.  I
have verified that everything under progs, except xdemos/xdemo,
correctly link.  I did this by doing 'make linux-dri-x86-64
PROGRAM_DIRS="demos redbook samples xdemos tests"'.
2006-08-28 17:40:45 +00:00
Ian Romanick 0bb27c084d Add dependencies for all API XML files. 2006-08-28 17:35:54 +00:00
Brian Paul e5bc35dd97 remove unused var 2006-08-28 15:16:49 +00:00
Brian Paul e365b82be1 fix the check for force_s3tc_enable (bug 8042) 2006-08-28 15:16:36 +00:00
Aapo Tahkola 9cb82f7917 close #6318 2006-08-27 13:24:36 +00:00
Sean D'Epagnier a38aef93ab The colormap code is now simpler, 15bpp works where it did not before.
The input is fixed so that delete reports '\b' and backspace 127

The vt switching works both right and left.
2006-08-27 01:16:09 +00:00
Ian Romanick 7e9737b370 Explicitly store the names for each function that should have a static
entry point generated.  This allows us to do things like generate a
static entry point for glPointParameterfvARB but not for
glPointParameterfvSGIS.
2006-08-26 21:26:55 +00:00
Alan Hourihane 092d14be92 Fix bug 8010 - locking issues. 2006-08-26 21:21:34 +00:00
Aapo Tahkola 2fd72a7844 fix #8008 2006-08-26 16:24:04 +00:00
Brian Paul 6827cf4d9a include texobj.h to silence warning 2006-08-25 22:08:43 +00:00
Brian Paul 4277ea4c0b Error detection/reporting was broken in several places. 2006-08-25 22:06:02 +00:00
Ian Romanick 3fea5910b9 Add a couple of the missing GL 2.0 functions. Enable GLX protocol for
glBlendEquationSeparateEXT.  Add missing enum "get" information for
GL_EXT_texture_filter_anisotropic.
2006-08-25 19:57:37 +00:00
Brian Paul 58d080b025 Free vertex program TnlData, if any. Fixes a mem leak. 2006-08-25 19:46:31 +00:00
Brian Paul 473f1aca7f clamp result.depth to [0,1] if written to 2006-08-25 19:45:31 +00:00
Brian Paul 439d59926a Remove XFree86 CVS keyword. 2006-08-25 18:07:49 +00:00
Brian Paul a360bc31da Rearrange glBindProgram() code to do all error checking before changing
the binding.  Prevent a potential dangling pointer error.  SF Bug 1544507.
2006-08-25 17:18:56 +00:00
Brian Paul 4bae9a48ec In _save_End(), set CurrentExecPrimitive = PRIM_OUTSIDE_BEGIN_END if
we're in GL_COMPILE_AND_EXECUTE mode.
This fixes bug 7984.
2006-08-25 15:44:09 +00:00
Brian Paul f38ac5fbac improved comments 2006-08-25 15:42:37 +00:00
Brian Paul 3c54e8376d Rename _mesa_append_modelview_code() to _mesa_insert_mvp_code().
The four DP4 instructions are now inserted at the top of the program
instead of appended to tail.
2006-08-25 15:15:24 +00:00
Brian Paul 383c39e58e use _mesa_alloc_instructions() 2006-08-25 15:14:25 +00:00
Brian Paul 9983a27cbe added _mesa_alloc_instructions() utility function 2006-08-25 15:13:25 +00:00
Ian Romanick a574c804a0 Add missing enums for GL_SGI_color_table. 2006-08-25 00:56:34 +00:00
Brian Paul 6211a14137 update MAX_INSTRUCTIONS limit 2006-08-24 23:37:13 +00:00
Brian Paul ebf58ea3a3 According to GL_NV_fragment_program, max frag prog length is 1024 instructions.
Updated MAX_NV_FRAGMENT_PROGRAM_INSTRUCTIONS to 1024.
2006-08-24 23:28:01 +00:00
Brian Paul 77427a1e52 Cg tries to bind NV fragment programs to the GL_FRAGMENT_PROGRAM_ARB target
with glBindProgramARB().  I guess the GL_ARB_fragment_program specification
allows that, but Mesa didn't.
Relaxed the check with a new predicate function: compatible_program_targets().
2006-08-24 23:11:39 +00:00
Brian Paul e6940f0a33 scalar sources such as 'time.x' weren't accepted by parser 2006-08-24 23:08:01 +00:00
Brian Paul c6511ab950 Functions for vertex/fragment program transformations, optimizations, etc. 2006-08-24 22:11:40 +00:00
Brian Paul beb32c4a59 fix bad casts, carry over r200 fix to check for null program string in r300_translate_vertex_shader() 2006-08-24 22:05:35 +00:00
Brian Paul 94ff996cae Check for NULL program string in r200_translate_vertex_program().
Fixes bug reported by Chris Rankin.
Added some new comments.
2006-08-24 22:03:38 +00:00
Brian Paul a75439093c use _mesa_realloc_instructions() 2006-08-24 21:58:32 +00:00
Brian Paul 3b9b8de9b0 Added _mesa_realloc_instructions() utility function.
Fixed/updated comments for parameter list functions.
2006-08-24 21:57:36 +00:00
Ian Romanick a5f2206077 GL_EXT_paletted_texture functions should alias GL_SGI_color_table functions.
The functions for GL_EXT_paletted_texture that do not share GLX
protocol with GL_ARB_imaging are supposed to alias the similar
functions from GL_SGI_color_table.  They didn't.  This patch corrects
this problem and enables GLX protocol for both extensions.

Since this removes 3 entries from the dispatch table, this change
creates a lot of changes in the generated files.
2006-08-24 21:42:38 +00:00
Ian Romanick bf83e652f6 Add a new offset mode to the GL API XML. This mode, called "assign,"
tells the scripts to assign an available offset to the function.  The
important changes are in src/mesa/glapi/gl_XML.py and
src/mesa/glapi/*.xml.

Since the DRI drivers only depend on functions required by the ABI
(e.g., GL 1.2 + ARB_multitexture) having fixed offsets, all functions
not in the ABI use "assign" mode.  This has caused the offset of
basically every function outside the ABI to change.  I have verified
that a libGL with this patch works with a DRI driver without the patch.

Futher, several function were removed from the dispatch tables
altogether.  These are the functions for the following extensions:

	GL_SGIS_texture_filter4
	GL_SGIS_texture4D
	GL_SGIS_detail_texture
	GL_SGIS_sharpen_texture
	GL_SGIX_sprite
	GL_SGIX_instruments
	GL_SGIX_framezoom
	GL_SGIX_tag_sample_buffer
	GL_SGIX_reference_plane
	GL_SGIX_flush_raster
	GL_SGIX_list_priority
	GL_SGIX_fragment_lighting
	GL_PGI_misc_hints
	GL_EXT_index_material
	GL_EXT_index_func
	GL_3DFX_tbuffer

This removes 50 functions from the dispatch table.
2006-08-24 20:14:45 +00:00
Brian Paul 5947f8fd63 fix fragment.position initialization bug 2006-08-24 19:06:02 +00:00
Brian Paul 116411d5f0 Check if mesa_vp->Base.Parameters is null before dereferencing (bug report
from Chris Rankin).
Also, fix some bad casts.
2006-08-24 15:57:12 +00:00
Ian Romanick 4169c220bd Fix some problems with the generation of the size tables. Enable
generation of protocol tables for Render.
2006-08-24 00:26:47 +00:00
Brian Paul a95d5f0f58 silence warning 2006-08-23 23:18:39 +00:00