mesa.git
19 years agoFix build issues on x86-64 due to missing include path in
Ian Romanick [Fri, 2 Dec 2005 00:25:06 +0000 (00:25 +0000)]
Fix build issues on x86-64 due to missing include path in
glapi_x86-64.S.

Bug: #5602

19 years agoCall ProgramStringNotify after creating tnl programs.
Keith Whitwell [Thu, 1 Dec 2005 14:24:37 +0000 (14:24 +0000)]
Call ProgramStringNotify after creating tnl programs.

19 years agoRemove VB->LastClipped
Keith Whitwell [Thu, 1 Dec 2005 12:54:21 +0000 (12:54 +0000)]
Remove VB->LastClipped

19 years agoClean up clipping somewhat
Keith Whitwell [Thu, 1 Dec 2005 12:53:15 +0000 (12:53 +0000)]
Clean up clipping somewhat
- no need to update ClipMask on generated vertices
- remove the VB->LastClipped value

Line clipping algorithm changed and simplified somewhat.  The old one
was based on the triangle routine and probably wouldn't have recognized
lines that were clipped down to nothing (ie culled, but not by a single
plane).

19 years agoremove uintptr_t cast
Brian Paul [Thu, 1 Dec 2005 01:00:13 +0000 (01:00 +0000)]
remove uintptr_t cast

19 years agotry removing need for the uintptr_t casts
Brian Paul [Thu, 1 Dec 2005 00:59:51 +0000 (00:59 +0000)]
try removing need for the uintptr_t casts

19 years agoAdded FinishRenderTexture() device driver function to indicate when
Brian Paul [Thu, 1 Dec 2005 00:25:00 +0000 (00:25 +0000)]
Added FinishRenderTexture() device driver function to indicate when
rendering to a texture has likely completed.
Fixed refcount issue in texture renderbuffer wrapper.

19 years agoadded comment about glTexImage and renderbuffers
Brian Paul [Thu, 1 Dec 2005 00:18:49 +0000 (00:18 +0000)]
added comment about glTexImage and renderbuffers

19 years agoget depthBits from the current drawbuffer
Brian Paul [Thu, 1 Dec 2005 00:15:41 +0000 (00:15 +0000)]
get depthBits from the current drawbuffer

19 years agofxt1_decode_1() should not be static
Brian Paul [Wed, 30 Nov 2005 14:47:34 +0000 (14:47 +0000)]
fxt1_decode_1() should not be static

19 years agoThis is a major re-work of the __indirect_glInterleavedArrays routine. The
Ian Romanick [Wed, 30 Nov 2005 00:06:48 +0000 (00:06 +0000)]
This is a major re-work of the __indirect_glInterleavedArrays routine. The
big, ugly, error prone switch-statement is replaced with a compact table.
I also added numerous comments, including a comment explaining how the
format parameter is validated.

Explicitly pass GL_FLOAT as the type in the cases where that is the only
possible value (e.g., everywhere except the call to glColorPointer).

Validate that stride is >= 0.

Tested with all modes (including the two error modes) of
progs/tests/interleave.c.

Bug: #5001, #5058
Reviewed by: Brian Paul

19 years agoassorted fixes for server-side direct rendering (bug 5199)
Brian Paul [Tue, 29 Nov 2005 23:01:43 +0000 (23:01 +0000)]
assorted fixes for server-side direct rendering (bug 5199)

19 years agoremove dri_client/ dir from tarball
Brian Paul [Tue, 29 Nov 2005 22:41:23 +0000 (22:41 +0000)]
remove dri_client/ dir from tarball

19 years agouse the files from the drm tree/package
Brian Paul [Tue, 29 Nov 2005 22:37:19 +0000 (22:37 +0000)]
use the files from the drm tree/package

19 years agoIf the DDX driver didn't reserve any video RAM for textures, fall back to
Michel Dänzer [Tue, 29 Nov 2005 13:13:34 +0000 (13:13 +0000)]
If the DDX driver didn't reserve any video RAM for textures, fall back to
using only GART memory for textures instead of segfaulting in the texture
management code. (Bug 5115)

19 years agoadded _EGLExtensions typedef
Brian Paul [Tue, 29 Nov 2005 04:44:33 +0000 (04:44 +0000)]
added _EGLExtensions typedef

19 years agoPut extension flags, string into separate struct.
Brian Paul [Tue, 29 Nov 2005 04:43:37 +0000 (04:43 +0000)]
Put extension flags, string into separate struct.

19 years agoclean up the drmGetMap/drmMap code
Brian Paul [Tue, 29 Nov 2005 04:18:38 +0000 (04:18 +0000)]
clean up the drmGetMap/drmMap code

19 years agoapparently need to load colormap after setting the mode to make it work reliably
Brian Paul [Tue, 29 Nov 2005 03:00:02 +0000 (03:00 +0000)]
apparently need to load colormap after setting the mode to make it work reliably

19 years agoRemove the many aliases for 'struct mem_block' in mm.h
Keith Whitwell [Mon, 28 Nov 2005 13:17:15 +0000 (13:17 +0000)]
Remove the many aliases for 'struct mem_block' in mm.h

19 years agoCorrect author attribution of mm.h
Keith Whitwell [Mon, 28 Nov 2005 12:05:29 +0000 (12:05 +0000)]
Correct author attribution of mm.h

19 years agocheck for driver_modes == NULL. Don't need driver_modes for EGL driver
Brian Paul [Mon, 28 Nov 2005 00:04:35 +0000 (00:04 +0000)]
check for driver_modes == NULL.  Don't need driver_modes for EGL driver

19 years agorearrange some code to put in more logical order, misc clean-ups
Brian Paul [Mon, 28 Nov 2005 00:02:06 +0000 (00:02 +0000)]
rearrange some code to put in more logical order, misc clean-ups

19 years agoLots of fixes, clean-ups, new comments, etc.
Brian Paul [Mon, 28 Nov 2005 00:00:08 +0000 (00:00 +0000)]
Lots of fixes, clean-ups, new comments, etc.
To set the FBdev video mode, need to add a \n char to the string.

19 years agoRedo _eglInitSurface() so it can be used with all surface types.
Brian Paul [Sun, 27 Nov 2005 23:57:19 +0000 (23:57 +0000)]
Redo _eglInitSurface() so it can be used with all surface types.
Redo _eglInitContext() to do error checking, attribute list parsing, etc.

19 years agoinclude stdint.h for BSD
Brian Paul [Sun, 27 Nov 2005 23:46:55 +0000 (23:46 +0000)]
include stdint.h for BSD

19 years agouse ADD_POINTERS macro instead of (uintptr_t) cast
Brian Paul [Fri, 25 Nov 2005 17:07:10 +0000 (17:07 +0000)]
use ADD_POINTERS macro instead of (uintptr_t) cast

19 years agoUse _mesa_exec_free for fp->func.
Keith Whitwell [Thu, 24 Nov 2005 10:59:10 +0000 (10:59 +0000)]
Use _mesa_exec_free for fp->func.

19 years agouse new _egl_api struct
Brian Paul [Thu, 24 Nov 2005 04:06:51 +0000 (04:06 +0000)]
use new _egl_api struct

19 years agouse _egl_api struct, make some functions static
Brian Paul [Thu, 24 Nov 2005 04:05:27 +0000 (04:05 +0000)]
use _egl_api struct, make some functions static

19 years agoMove all the EGL API function pointers into a new _egl_api struct.
Brian Paul [Thu, 24 Nov 2005 04:02:16 +0000 (04:02 +0000)]
Move all the EGL API function pointers into a new _egl_api struct.

19 years agoreport error token in message printed in _eglError()
Brian Paul [Thu, 24 Nov 2005 03:53:46 +0000 (03:53 +0000)]
report error token in message printed in _eglError()

19 years agochange error test in _eglParseConfigAttribs()
Brian Paul [Thu, 24 Nov 2005 03:48:19 +0000 (03:48 +0000)]
change error test in _eglParseConfigAttribs()

19 years agoinit attribs to EGL_DONT_CARE in _eglParseConfigAttribs()
Brian Paul [Thu, 24 Nov 2005 03:41:56 +0000 (03:41 +0000)]
init attribs to EGL_DONT_CARE in _eglParseConfigAttribs()

19 years agoCouple changes that were missed.
Aapo Tahkola [Wed, 23 Nov 2005 13:02:25 +0000 (13:02 +0000)]
Couple changes that were missed.

19 years agocheck/print EGL_SCREEN_BIT_MESA, fix eglGetDisplay() call
Brian Paul [Wed, 23 Nov 2005 01:45:25 +0000 (01:45 +0000)]
check/print EGL_SCREEN_BIT_MESA, fix eglGetDisplay() call

19 years agoChoose the display mode / surface size in an intelligent way.
Brian Paul [Wed, 23 Nov 2005 01:44:38 +0000 (01:44 +0000)]
Choose the display mode / surface size in an intelligent way.
Fix // comments.
More error checking, etc.

19 years agoupdate some comments
Brian Paul [Wed, 23 Nov 2005 01:42:40 +0000 (01:42 +0000)]
update some comments

19 years agofixed wrong return value in radeonShowSurfaceMESA()
Brian Paul [Wed, 23 Nov 2005 01:39:56 +0000 (01:39 +0000)]
fixed wrong return value in radeonShowSurfaceMESA()

19 years agochange error message
Brian Paul [Wed, 23 Nov 2005 01:38:30 +0000 (01:38 +0000)]
change error message

19 years agouse _eglLog()
Brian Paul [Wed, 23 Nov 2005 01:38:12 +0000 (01:38 +0000)]
use _eglLog()

19 years agoNew _eglLog() function to replace fprintf/printf calls for debug/info.
Brian Paul [Wed, 23 Nov 2005 01:37:30 +0000 (01:37 +0000)]
New _eglLog() function to replace fprintf/printf calls for debug/info.

19 years agoreference bug 5131 in comment in _tnl_free_vertices()
Brian Paul [Tue, 22 Nov 2005 23:29:27 +0000 (23:29 +0000)]
reference bug 5131 in comment in _tnl_free_vertices()

19 years agodisable freeing of fp->func, see comment (bug 5131)
Brian Paul [Tue, 22 Nov 2005 23:27:27 +0000 (23:27 +0000)]
disable freeing of fp->func, see comment (bug 5131)

19 years agoUse correct enums for program output variables. Fixes
Keith Whitwell [Tue, 22 Nov 2005 12:20:03 +0000 (12:20 +0000)]
Use correct enums for program output variables.  Fixes
fp/tri-depthwrite.

19 years agotrack state flags which might invalidate parameter lists
Keith Whitwell [Tue, 22 Nov 2005 12:12:17 +0000 (12:12 +0000)]
track state flags which might invalidate parameter lists

19 years agoMake sure tnl->_DoVertexFog is kept uptodate. Fixes fog in i915
Keith Whitwell [Tue, 22 Nov 2005 10:58:05 +0000 (10:58 +0000)]
Make sure tnl->_DoVertexFog is kept uptodate.  Fixes fog in i915
driver.

19 years agobit 31 of this inserts a nop after the current instruction
Dave Airlie [Mon, 21 Nov 2005 11:39:49 +0000 (11:39 +0000)]
bit 31 of this inserts a nop after the current instruction

19 years agoget rid of some of those unknowns figured out from reg dumper
Dave Airlie [Mon, 21 Nov 2005 11:35:36 +0000 (11:35 +0000)]
get rid of some of those unknowns figured out from reg dumper

19 years agomove _mesa_init_instruction() to program.c
Brian Paul [Sun, 20 Nov 2005 17:57:22 +0000 (17:57 +0000)]
move _mesa_init_instruction() to program.c

19 years agos/Saturate/SaturateMode/
Brian Paul [Sun, 20 Nov 2005 17:54:29 +0000 (17:54 +0000)]
s/Saturate/SaturateMode/

19 years agoMake Saturate a 2-bit field again, renamed to SaturateMode with three
Brian Paul [Sun, 20 Nov 2005 17:52:40 +0000 (17:52 +0000)]
Make Saturate a 2-bit field again, renamed to SaturateMode with three
possible values: SATURATE_OFF, SATURATE_ZERO_ONE and SATURATE_PLUS_MINUS_ONE.

19 years agoadditional clean-ups and improvements
Brian Paul [Sat, 19 Nov 2005 23:45:10 +0000 (23:45 +0000)]
additional clean-ups and improvements

19 years agoremove incorrect cast
Brian Paul [Sat, 19 Nov 2005 23:29:18 +0000 (23:29 +0000)]
remove incorrect cast

19 years agoSaturate is a 1-bit boolean field
Brian Paul [Sat, 19 Nov 2005 23:28:55 +0000 (23:28 +0000)]
Saturate is a 1-bit boolean field

19 years agoBunch of little fixes:
Brian Paul [Sat, 19 Nov 2005 23:12:20 +0000 (23:12 +0000)]
Bunch of little fixes:
Fix mem leaks in _mesa_TexEnvProgramCacheDestroy().
Check if ctx->Driver.BindProgram is non-null before calling.
s/unsigned/GLuint/
Use MAX_INSTRUCTIONS instead of magic 100, check program length after it's made.
Use _mesa_init_instruction() instead of _mesa_memset().

19 years agocall gluDeleteQuadric() to fix mem leak
Brian Paul [Sat, 19 Nov 2005 23:09:14 +0000 (23:09 +0000)]
call gluDeleteQuadric() to fix mem leak

19 years agoin run_texnorm_stage() check if the texture unit is really enabled before trying...
Brian Paul [Sat, 19 Nov 2005 17:08:15 +0000 (17:08 +0000)]
in run_texnorm_stage() check if the texture unit is really enabled before trying to normalize the texcoords

19 years agoupdate some vars
Brian Paul [Sat, 19 Nov 2005 16:50:36 +0000 (16:50 +0000)]
update some vars

19 years agoNo longer derive 'ati_fragment_shader' from 'program' class. Only the
Brian Paul [Sat, 19 Nov 2005 16:43:04 +0000 (16:43 +0000)]
No longer derive 'ati_fragment_shader' from 'program' class.  Only the
program->Id and program->RefCount fields were used and ATI fragment shaders
didn't have too much in common with ARB/NV vertex/fragment programs anyway.

19 years agoremove #include arbfragparse.h
Brian Paul [Sat, 19 Nov 2005 15:44:53 +0000 (15:44 +0000)]
remove #include arbfragparse.h

19 years agoremove #include arbfragparse.h, s/PI/M_PI/
Brian Paul [Sat, 19 Nov 2005 15:42:39 +0000 (15:42 +0000)]
remove #include arbfragparse.h, s/PI/M_PI/

19 years agoremoved arbfragparse.[ch] arbvertparse.[ch]
Brian Paul [Sat, 19 Nov 2005 15:37:00 +0000 (15:37 +0000)]
removed arbfragparse.[ch] arbvertparse.[ch]

19 years agoRemove the _mesa_parse_arb_vertex/fragment_program() functions into
Brian Paul [Sat, 19 Nov 2005 15:36:28 +0000 (15:36 +0000)]
Remove the _mesa_parse_arb_vertex/fragment_program() functions into
arbprogparse.c and remove arbvertparse.[ch] and arbfragparse.[ch].
Clean up quite a bit of the arb parsing code.
Rewrite parser extension code to avoid a mess of string operations every
time the parser was used.

19 years agoupdate comments, remove ^M chars
Brian Paul [Sat, 19 Nov 2005 14:57:47 +0000 (14:57 +0000)]
update comments, remove ^M chars

19 years agomove a bunch of gl2/shading language structs from mtypes.h to shaderobjects.h
Brian Paul [Sat, 19 Nov 2005 14:49:25 +0000 (14:49 +0000)]
move a bunch of gl2/shading language structs from mtypes.h to shaderobjects.h

19 years agoTry to detect when native support to given texture width is not available.
Aapo Tahkola [Fri, 18 Nov 2005 20:53:50 +0000 (20:53 +0000)]
Try to detect when native support to given texture width is not available.

19 years agoFix typo causing secondary color not to work properly.
Aapo Tahkola [Fri, 18 Nov 2005 18:05:19 +0000 (18:05 +0000)]
Fix typo causing secondary color not to work properly.

19 years agoReduce stderr noise.
Aapo Tahkola [Fri, 18 Nov 2005 17:57:27 +0000 (17:57 +0000)]
Reduce stderr noise.

19 years agoIn _mesa_RenderbufferStorageEXT(), try to avoid needless reallocation.
Brian Paul [Fri, 18 Nov 2005 02:24:14 +0000 (02:24 +0000)]
In _mesa_RenderbufferStorageEXT(), try to avoid needless reallocation.
Simplify _mesa_GetRenderbufferParameterivEXT() queries.

19 years agomove _mesa_update_state() calls before error tests that depend on framebuffer complet...
Brian Paul [Thu, 17 Nov 2005 05:01:26 +0000 (05:01 +0000)]
move _mesa_update_state() calls before error tests that depend on framebuffer completeness

19 years agooptimize drawing GL_DEPTH_STENCIL pixels into a GL_DEPTH_STENCIL renderbuffer
Brian Paul [Thu, 17 Nov 2005 05:00:17 +0000 (05:00 +0000)]
optimize drawing GL_DEPTH_STENCIL pixels into a GL_DEPTH_STENCIL renderbuffer

19 years agos/MEMCPY/_mesa_memcpy/ and fix typo
Brian Paul [Thu, 17 Nov 2005 04:51:56 +0000 (04:51 +0000)]
s/MEMCPY/_mesa_memcpy/ and fix typo

19 years agooptimize case of reading GL_DEPTH_STENCIL pixels from GL_DEPTH_STENCIL renderbuffer
Brian Paul [Thu, 17 Nov 2005 04:51:08 +0000 (04:51 +0000)]
optimize case of reading GL_DEPTH_STENCIL pixels from GL_DEPTH_STENCIL renderbuffer

19 years agodelete frame/renderbuffers upon exit, more error checking
Brian Paul [Thu, 17 Nov 2005 02:08:10 +0000 (02:08 +0000)]
delete frame/renderbuffers upon exit, more error checking

19 years agoimproved error checking in error_check_format_type()
Brian Paul [Thu, 17 Nov 2005 02:05:42 +0000 (02:05 +0000)]
improved error checking in error_check_format_type()

19 years agoFixes for x86_64 Unichrome.
Thomas Hellström [Wed, 16 Nov 2005 19:24:00 +0000 (19:24 +0000)]
Fixes for x86_64 Unichrome.

19 years agoBring in last minute 6_4 branch changes to the unichrome driver
Thomas Hellström [Wed, 16 Nov 2005 17:24:26 +0000 (17:24 +0000)]
Bring in last minute 6_4 branch changes to the unichrome driver
to the trunk.

19 years agoadded -ds option to test GL_EXT_packed_depth_stencil with framebuffer objects
Brian Paul [Wed, 16 Nov 2005 14:48:11 +0000 (14:48 +0000)]
added -ds option to test GL_EXT_packed_depth_stencil with framebuffer objects

19 years agoadditional comments about GL_DEPTH_STENCIL buffers
Brian Paul [Wed, 16 Nov 2005 04:17:20 +0000 (04:17 +0000)]
additional comments about GL_DEPTH_STENCIL buffers

19 years agoadded depthstencil.[ch]
Brian Paul [Wed, 16 Nov 2005 04:12:08 +0000 (04:12 +0000)]
added depthstencil.[ch]

19 years agoUse new gl_framebuffer _Depth/_StencilBuffer fields instead of
Brian Paul [Wed, 16 Nov 2005 04:09:26 +0000 (04:09 +0000)]
Use new gl_framebuffer _Depth/_StencilBuffer fields instead of
Attachment[BUFFER_DEPTH/STENCIL].Renderbuffer.  The former may be wrappers
around combined depth/stencil renderbuffers attached at the later points.

19 years agoadded depthstencil.c
Brian Paul [Wed, 16 Nov 2005 04:06:32 +0000 (04:06 +0000)]
added depthstencil.c

19 years agoSupport for combined depth/stencil renderbuffers (GL_EXT_packed_depth_stencil).
Brian Paul [Wed, 16 Nov 2005 04:05:54 +0000 (04:05 +0000)]
Support for combined depth/stencil renderbuffers (GL_EXT_packed_depth_stencil).
depthstencil.c provides wrappers for treating depth/stencil buffers either
as regular depth or stencil renderbuffers.

19 years agoadded _mesa_new_depthstencil_renderbuffer() for combined depth/stencil buffers
Brian Paul [Wed, 16 Nov 2005 04:00:31 +0000 (04:00 +0000)]
added _mesa_new_depthstencil_renderbuffer() for combined depth/stencil buffers

19 years agoAdded error checking in _tnl_Begin to detect incomplete framebuffer.
Brian Paul [Wed, 16 Nov 2005 02:47:16 +0000 (02:47 +0000)]
Added error checking in _tnl_Begin to detect incomplete framebuffer.
Set new tnl->DiscardPrimitive field to true when such error is
detected to discard the glBegin/End primitive when flushing.
Added some new comments.

19 years agochange an assertion
Brian Paul [Wed, 16 Nov 2005 02:00:34 +0000 (02:00 +0000)]
change an assertion

19 years agoReplace GL_POLYGON+1 with PRIM_OUTSIDE_BEGIN_END
Brian Paul [Wed, 16 Nov 2005 01:58:19 +0000 (01:58 +0000)]
Replace GL_POLYGON+1 with PRIM_OUTSIDE_BEGIN_END

19 years agoadd GL_INVALID_FRAMEBUFFER_OPERATION_EXT in _mesa_error()
Brian Paul [Wed, 16 Nov 2005 01:11:06 +0000 (01:11 +0000)]
add GL_INVALID_FRAMEBUFFER_OPERATION_EXT in _mesa_error()

19 years agofix color interpolation problem reported on VMS
Brian Paul [Tue, 15 Nov 2005 15:08:03 +0000 (15:08 +0000)]
fix color interpolation problem reported on VMS

19 years agocheck for ctx==NULL, bug 4087
Brian Paul [Tue, 15 Nov 2005 14:50:55 +0000 (14:50 +0000)]
check for ctx==NULL, bug 4087

19 years agoFix problem in stencil_and_ztest_span() when using h/w stencil buffer.
Brian Paul [Tue, 15 Nov 2005 04:01:29 +0000 (04:01 +0000)]
Fix problem in stencil_and_ztest_span() when using h/w stencil buffer.
Fix a comment typo.
Remove some unneeded #includes.

19 years agoTwo subtle things missed on the previous commit.
Ian Romanick [Tue, 15 Nov 2005 01:55:46 +0000 (01:55 +0000)]
Two subtle things missed on the previous commit.

19 years agoAdd the ability for interleave to test passing invalid format enums
Ian Romanick [Tue, 15 Nov 2005 01:46:49 +0000 (01:46 +0000)]
Add the ability for interleave to test passing invalid format enums
and invalid stride values (see bugzilla #5058).

19 years agoSimple test of glInterleavedArrays functionality.
Ian Romanick [Mon, 14 Nov 2005 23:31:05 +0000 (23:31 +0000)]
Simple test of glInterleavedArrays functionality.

19 years agoremove unneeded RasterPosValid check
Brian Paul [Mon, 14 Nov 2005 18:23:56 +0000 (18:23 +0000)]
remove unneeded RasterPosValid check

19 years agoImprove _mesa_print_program().
Brian Paul [Sat, 12 Nov 2005 23:25:49 +0000 (23:25 +0000)]
Improve _mesa_print_program().
Added make_state_string() to produce a string from a GL state vector.

19 years agofix comment for TexSrcTarget
Brian Paul [Sat, 12 Nov 2005 23:24:32 +0000 (23:24 +0000)]
fix comment for TexSrcTarget

19 years agoAdded _mesa_light() helper function so we can avoid transforming then
Brian Paul [Sat, 12 Nov 2005 18:58:12 +0000 (18:58 +0000)]
Added _mesa_light() helper function so we can avoid transforming then
un-transforming light positions and spot directions when popping light
state off the attribute stack.

19 years agoAdded OSMesaColorClamp(), bug 4917
Brian Paul [Sat, 12 Nov 2005 18:44:29 +0000 (18:44 +0000)]
Added OSMesaColorClamp(), bug 4917