mesa.git
18 years agoUse inlined uniform() helper function in all the glUniform*() function to
Brian Paul [Fri, 3 Nov 2006 21:30:16 +0000 (21:30 +0000)]
Use inlined uniform() helper function in all the glUniform*() function to
reduce duplicated code.
Finish up _program_ReadUniform() for non-float types.
Implement _mesa_GetUniformivARB().
Simplify the _program_WriteUniform() function a bit.

18 years agoplug in 2.0, 2.1 functions
Brian Paul [Fri, 3 Nov 2006 20:25:44 +0000 (20:25 +0000)]
plug in 2.0, 2.1 functions

18 years agoAdded OpenGL 2.1 entrypoints.
Brian Paul [Fri, 3 Nov 2006 20:20:28 +0000 (20:20 +0000)]
Added OpenGL 2.1 entrypoints.

18 years agoSet DO_DEBUG=0
Brian Paul [Fri, 3 Nov 2006 19:55:01 +0000 (19:55 +0000)]
Set DO_DEBUG=0

18 years agoonly enabled memcpy timing if DO_DEBUG=1
Brian Paul [Fri, 3 Nov 2006 19:54:40 +0000 (19:54 +0000)]
only enabled memcpy timing if DO_DEBUG=1

18 years agoreplace CONFIG_H with MESA_CONFIG_H_INCLUDED
Brian Paul [Fri, 3 Nov 2006 18:35:52 +0000 (18:35 +0000)]
replace CONFIG_H with MESA_CONFIG_H_INCLUDED

18 years agoadded 1.3/1.4 function mangling
Brian Paul [Fri, 3 Nov 2006 18:29:39 +0000 (18:29 +0000)]
added 1.3/1.4 function mangling

18 years agoassorted updates for 6.5.2
Brian Paul [Fri, 3 Nov 2006 17:43:20 +0000 (17:43 +0000)]
assorted updates for 6.5.2

18 years agoAdded OpenGL 2.1 glUniformMatrix* functions.
Brian Paul [Fri, 3 Nov 2006 17:29:31 +0000 (17:29 +0000)]
Added OpenGL 2.1 glUniformMatrix* functions.
Refactor the _mesa_UniformMatrix() functions to use a helper function.
Implement GetUniformfv function (might need more work someday).

18 years agoreformat comments in Doxygen style
Brian Paul [Fri, 3 Nov 2006 17:18:05 +0000 (17:18 +0000)]
reformat comments in Doxygen style

18 years agoreindent
Brian Paul [Fri, 3 Nov 2006 16:50:22 +0000 (16:50 +0000)]
reindent

18 years agoMinor changes to get ready for OpenGL 2.1.
Brian Paul [Fri, 3 Nov 2006 15:18:17 +0000 (15:18 +0000)]
Minor changes to get ready for OpenGL 2.1.

18 years agoenable generic arrays for r200 hw vertex programs by assigning unused color and textu...
Roland Scheidegger [Fri, 3 Nov 2006 12:48:18 +0000 (12:48 +0000)]
enable generic arrays for r200 hw vertex programs by assigning unused color and texture inputs to them. Not widely tested yet. This should eliminate all fallbacks due to vertex programs, except writes to back facing colors, or when exceeding a hw limit (12 temps, 12 attribs etc.).

18 years agoremove setting some driver funcs explicitly to NULL, as they are no longer set up...
Roland Scheidegger [Fri, 3 Nov 2006 02:07:34 +0000 (02:07 +0000)]
remove setting some driver funcs explicitly to NULL, as they are no longer set up later. Thix fixes a segfault in _mesa_Bitmap().

18 years agoadded fsligght
Brian Paul [Fri, 3 Nov 2006 00:16:12 +0000 (00:16 +0000)]
added fsligght

18 years agoyet another deriviative of the fplight.c demo for OpenGL 2.0 shading language
Brian Paul [Fri, 3 Nov 2006 00:04:06 +0000 (00:04 +0000)]
yet another deriviative of the fplight.c demo for OpenGL 2.0 shading language

18 years agoUpdate gl_API.xml with OpenGL 2.0 functions, regenerate derived files.
Brian Paul [Thu, 2 Nov 2006 23:58:27 +0000 (23:58 +0000)]
Update gl_API.xml with OpenGL 2.0 functions, regenerate derived files.

18 years agominor change in _mesa_ResizeBuffersMESA()
Brian Paul [Thu, 2 Nov 2006 23:56:08 +0000 (23:56 +0000)]
minor change in _mesa_ResizeBuffersMESA()

18 years agoinclude utils.h to silence warning
Brian Paul [Thu, 2 Nov 2006 23:43:22 +0000 (23:43 +0000)]
include utils.h to silence warning

18 years agos/GLuint/int/ to silence warnings
Brian Paul [Thu, 2 Nov 2006 23:41:37 +0000 (23:41 +0000)]
s/GLuint/int/ to silence warnings

18 years agocasting, type changes to silence warnings
Brian Paul [Thu, 2 Nov 2006 23:40:24 +0000 (23:40 +0000)]
casting, type changes to silence warnings

18 years agos/GLint/GLuint/ to fix sign warnings
Brian Paul [Thu, 2 Nov 2006 23:34:02 +0000 (23:34 +0000)]
s/GLint/GLuint/ to fix sign warnings

18 years agofix typo, silence warnings
Brian Paul [Thu, 2 Nov 2006 23:29:03 +0000 (23:29 +0000)]
fix typo, silence warnings

18 years agoFix GL_EXT_packed_depth_stencil crash, but shadowtex still broken
Brian Paul [Thu, 2 Nov 2006 23:16:18 +0000 (23:16 +0000)]
Fix GL_EXT_packed_depth_stencil crash, but shadowtex still broken

18 years agocomment about a valgrind error
Brian Paul [Thu, 2 Nov 2006 22:56:27 +0000 (22:56 +0000)]
comment about a valgrind error

18 years agos/GLchan/GLubyte/ in debug code
Brian Paul [Thu, 2 Nov 2006 22:55:59 +0000 (22:55 +0000)]
s/GLchan/GLubyte/ in debug code

18 years agoinit SecondaryRasterColor
Brian Paul [Thu, 2 Nov 2006 22:54:18 +0000 (22:54 +0000)]
init SecondaryRasterColor

18 years agoAdded GL_STENCIL_BACK_WRITEMASK
Brian Paul [Thu, 2 Nov 2006 22:53:32 +0000 (22:53 +0000)]
Added GL_STENCIL_BACK_WRITEMASK

18 years agocheck for shader extensions for OpenGL 2.0
Brian Paul [Thu, 2 Nov 2006 22:40:43 +0000 (22:40 +0000)]
check for shader extensions for OpenGL 2.0

18 years agoUndo some of yesterday's ATI_separate_stencil changes. The ATI extension
Brian Paul [Thu, 2 Nov 2006 22:39:29 +0000 (22:39 +0000)]
Undo some of yesterday's ATI_separate_stencil changes.  The ATI extension
doesn't exactly match OpenGL 2.0.

18 years agoFix fragment program fog problems found with Glean.
Brian Paul [Thu, 2 Nov 2006 21:43:06 +0000 (21:43 +0000)]
Fix fragment program fog problems found with Glean.
1. add PROGRAM_CONSTANT to switch() in src_vector().
2. use _mesa_append_fog_code() to handle fog options in i915ProgramStringNotify().
3. Re-enable some vertex attribute emit code that was previously disabled in i915ValidateFragmentProgram().

18 years agoCall _mesa_problem() from i915_program_error() so we get a nice error message.
Brian Paul [Thu, 2 Nov 2006 21:39:20 +0000 (21:39 +0000)]
Call _mesa_problem() from i915_program_error() so we get a nice error message.

18 years agoAdd requested size to r300RefillCurrentDmaRegion.
Jerome Glisse [Thu, 2 Nov 2006 20:02:26 +0000 (20:02 +0000)]
Add requested size to r300RefillCurrentDmaRegion.

This way we no longuer have the fixed RADEON_BUFFER_SIZE.
Anyway function calling AllocDmaRegion should check if this
succeed and fail gracefuly if not (see bug 8348).

18 years agoremove GetBufferSize = NULL; assignment
Brian Paul [Thu, 2 Nov 2006 19:23:41 +0000 (19:23 +0000)]
remove GetBufferSize = NULL; assignment

18 years agoFixes Glean vertex/fragment test failures. Those tests never called
Brian Paul [Thu, 2 Nov 2006 19:18:09 +0000 (19:18 +0000)]
Fixes Glean vertex/fragment test failures.  Those tests never called
glViewport so the viewport was 0 by 0 pixels.

18 years agoremove GetBufferSize code
Brian Paul [Thu, 2 Nov 2006 19:16:08 +0000 (19:16 +0000)]
remove GetBufferSize code

18 years agoalways load frag prog state params for now (see comments)
Brian Paul [Thu, 2 Nov 2006 18:35:19 +0000 (18:35 +0000)]
always load frag prog state params for now (see comments)

18 years agoremove unneeded extern declaration of lockMutex
Brian Paul [Thu, 2 Nov 2006 18:15:26 +0000 (18:15 +0000)]
remove unneeded extern declaration of lockMutex

18 years agobump driver date
Brian Paul [Thu, 2 Nov 2006 18:13:40 +0000 (18:13 +0000)]
bump driver date

18 years agoUse RGBA_LOGICOP_ENABLED() instead of ctx->Color._LogicOpEnabled since we often
Brian Paul [Thu, 2 Nov 2006 17:51:04 +0000 (17:51 +0000)]
Use RGBA_LOGICOP_ENABLED() instead of ctx->Color._LogicOpEnabled since we often
need to check for this condition before the later field has been computed.
Fixes logicop bug #8860.

18 years agonew RGBA_LOGICOP_ENABLED() macro
Brian Paul [Thu, 2 Nov 2006 17:49:47 +0000 (17:49 +0000)]
new RGBA_LOGICOP_ENABLED() macro

18 years agos/_mesa_IsProgram2/_mesa_IsProgram/
Brian Paul [Thu, 2 Nov 2006 16:21:04 +0000 (16:21 +0000)]
s/_mesa_IsProgram2/_mesa_IsProgram/

18 years agoRename _mesa_IsProgram() to _mesa_IsProgramARB() to avoid collision with the
Brian Paul [Thu, 2 Nov 2006 16:20:29 +0000 (16:20 +0000)]
Rename _mesa_IsProgram() to _mesa_IsProgramARB() to avoid collision with the
OpenGL 2.0 function of the same name.

18 years agoOpenGL 2.0 entrypoints
Brian Paul [Thu, 2 Nov 2006 16:11:31 +0000 (16:11 +0000)]
OpenGL 2.0 entrypoints

18 years agorun indent on the code
Brian Paul [Thu, 2 Nov 2006 16:09:10 +0000 (16:09 +0000)]
run indent on the code

18 years agotest OpenGL 2.0 stencil funcs
Brian Paul [Thu, 2 Nov 2006 15:47:30 +0000 (15:47 +0000)]
test OpenGL 2.0 stencil funcs

18 years agoAdd ATI_separate_stencil and use it in preference to EXT_stencil_two_side
Brian Paul [Thu, 2 Nov 2006 00:41:40 +0000 (00:41 +0000)]
Add ATI_separate_stencil and use it in preference to EXT_stencil_two_side
since the former is what's used for OpenGL 2.0.

18 years agoupdate _mesa_select_tex_image() and _mesa_get_tex_image()
Brian Paul [Wed, 1 Nov 2006 22:28:54 +0000 (22:28 +0000)]
update _mesa_select_tex_image() and _mesa_get_tex_image()

18 years agoupdate comments
Brian Paul [Wed, 1 Nov 2006 20:48:00 +0000 (20:48 +0000)]
update comments

18 years agoRemove x/y/width/height parameters from Clear functions.
Brian Paul [Wed, 1 Nov 2006 19:35:22 +0000 (19:35 +0000)]
Remove x/y/width/height parameters from Clear functions.

18 years agocomment-out unused var
Brian Paul [Wed, 1 Nov 2006 19:26:18 +0000 (19:26 +0000)]
comment-out unused var

18 years agoremove unused vars
Brian Paul [Wed, 1 Nov 2006 19:25:43 +0000 (19:25 +0000)]
remove unused vars

18 years agofix _mesa_select_tex_image() calls
Brian Paul [Wed, 1 Nov 2006 19:25:19 +0000 (19:25 +0000)]
fix _mesa_select_tex_image() calls

18 years agoWrite back gl_FragDepth to span->array->z.
Michal Krol [Wed, 1 Nov 2006 19:02:27 +0000 (19:02 +0000)]
Write back gl_FragDepth to span->array->z.

18 years agoDon't use the x/y/width/height params passed to Clear(). Get them
Brian Paul [Wed, 1 Nov 2006 18:51:43 +0000 (18:51 +0000)]
Don't use the x/y/width/height params passed to Clear().  Get them
after locking.  Next: remove the params altogether.

18 years agodisable debug printf
Brian Paul [Wed, 1 Nov 2006 18:49:41 +0000 (18:49 +0000)]
disable debug printf

18 years agodisable debug printfs
Brian Paul [Wed, 1 Nov 2006 18:48:28 +0000 (18:48 +0000)]
disable debug printfs

18 years agoCorrect a little bug, radeon->glCtx is a pointer.
Jerome Glisse [Wed, 1 Nov 2006 16:21:14 +0000 (16:21 +0000)]
Correct a little bug, radeon->glCtx is a pointer.

18 years agoRemove deprecated GetBufferSize interface.
Jerome Glisse [Wed, 1 Nov 2006 16:18:08 +0000 (16:18 +0000)]
Remove deprecated GetBufferSize interface.

18 years agorecent updates/fixes
Brian Paul [Wed, 1 Nov 2006 15:24:47 +0000 (15:24 +0000)]
recent updates/fixes

18 years agofix compiler warnings
Keith Whitwell [Wed, 1 Nov 2006 15:23:50 +0000 (15:23 +0000)]
fix compiler warnings

18 years agoPatch from <haihao.xiang@intel.com> -- pass program string
Keith Whitwell [Wed, 1 Nov 2006 15:20:23 +0000 (15:20 +0000)]
Patch from <haihao.xiang@intel.com> -- pass program string
notification callback through to tnl/ module, fixes glean crash.

18 years agomerge the (rest of) texmem branch
Keith Whitwell [Wed, 1 Nov 2006 14:26:10 +0000 (14:26 +0000)]
merge the (rest of) texmem branch

18 years agoMerge texmem-0-3-branch.
Keith Whitwell [Wed, 1 Nov 2006 14:21:57 +0000 (14:21 +0000)]
Merge texmem-0-3-branch.

18 years agoAdd LIT instruction to fragment program.
Jerome Glisse [Wed, 1 Nov 2006 12:03:36 +0000 (12:03 +0000)]
Add LIT instruction to fragment program.

18 years agoImport texmem i915 driver to its new location as i915tex.
Keith Whitwell [Wed, 1 Nov 2006 12:03:11 +0000 (12:03 +0000)]
Import texmem i915 driver to its new location as i915tex.

18 years agoAdd CMPH instruction to fragprog
Jerome Glisse [Wed, 1 Nov 2006 11:58:16 +0000 (11:58 +0000)]
Add CMPH instruction to fragprog

CMPH a0, a1, a2 -> if a2 > 0.5 return a1 else return a0
Guessed by examinating LIT instruction handling of FGLRX.

18 years agoPatch from <haihao.xiang@intel.com> -- pass program string
Keith Whitwell [Wed, 1 Nov 2006 09:35:26 +0000 (09:35 +0000)]
Patch from <haihao.xiang@intel.com> -- pass program string
notification callback through to tnl/ module, fixes glean crash.

18 years agochange DEBUG_FRAG conditions
Brian Paul [Wed, 1 Nov 2006 00:14:04 +0000 (00:14 +0000)]
change DEBUG_FRAG conditions

18 years agofix some bugs in interpolate_specular()
Brian Paul [Wed, 1 Nov 2006 00:13:16 +0000 (00:13 +0000)]
fix some bugs in interpolate_specular()

18 years agoAdded a few new ctx->Const. fields for shader-related limits.
Brian Paul [Wed, 1 Nov 2006 00:12:41 +0000 (00:12 +0000)]
Added a few new ctx->Const. fields for shader-related limits.

18 years agomake use of Parameters->StateFlags in _swrast_update_fragment_program()
Brian Paul [Tue, 31 Oct 2006 19:53:38 +0000 (19:53 +0000)]
make use of Parameters->StateFlags in _swrast_update_fragment_program()

18 years agominor clean-ups, simplifications and new comments
Brian Paul [Tue, 31 Oct 2006 19:53:03 +0000 (19:53 +0000)]
minor clean-ups, simplifications and new comments

18 years agofix MINGW32 problems
Brian Paul [Tue, 31 Oct 2006 19:14:27 +0000 (19:14 +0000)]
fix MINGW32 problems

18 years agoWe need to call _mesa_load_state_parameters() whenever a fragment program
Brian Paul [Tue, 31 Oct 2006 16:02:56 +0000 (16:02 +0000)]
We need to call _mesa_load_state_parameters() whenever a fragment program
is enabled and we've changed any GL state that might be referenced by a
fragment program (such as state.fog.params).  Do this during swrast
validation, not in _swrast_exec_fragment_program().

18 years agosignal _NEW_LIGHT in _tnl_copy_to_current()
Brian Paul [Tue, 31 Oct 2006 16:01:11 +0000 (16:01 +0000)]
signal _NEW_LIGHT in _tnl_copy_to_current()

18 years agoIn TEX instructions, use precomputed lambda only if using fragment.texcoord[k]
Brian Paul [Tue, 31 Oct 2006 14:29:01 +0000 (14:29 +0000)]
In TEX instructions, use precomputed lambda only if using fragment.texcoord[k]
to sample texture[k].  Use zero otherwise.  Not foolproof, but a good
compromise.

18 years agoFor TEX instructions use lambda=0. When sampling from texture unit K we
Brian Paul [Tue, 31 Oct 2006 01:22:38 +0000 (01:22 +0000)]
For TEX instructions use lambda=0.  When sampling from texture unit K we
were using the partial derivatives of texcoord[K] but the coordinate used
for texture sampling may be something totally different (and texcoord[K]
might not be a real texture coord at all).  Net result was a bogus LOD is
sometimes used, often resulting in using the smallest mipmap level (a
constant color).
Just use zero for now (undef LAMBDA_ZERO to override).
Plus, some additional debug code.

18 years agoFix bug #8799.
Ian Romanick [Mon, 30 Oct 2006 23:44:54 +0000 (23:44 +0000)]
Fix bug #8799.

Properly resize bith the drawable and the readable in mgaUpdateRects.
Eliminate the use of the deprecated GetBufferSize interface.  Bump
driver date.

18 years agoRefactor mgaXMesaSetFrontClipRects and mgaXMesaSetBackClipRects.
Ian Romanick [Mon, 30 Oct 2006 22:17:39 +0000 (22:17 +0000)]
Refactor mgaXMesaSetFrontClipRects and mgaXMesaSetBackClipRects.

Combine mgaXMesaSetFrontClipRects and mgaXMesaSetBackClipRects into a
single new function called mga_set_cliprects.  This enables a small
refactor in mgaDDDrawBuffer.

18 years agoGet DRI drawable from framebuffer object.
Ian Romanick [Mon, 30 Oct 2006 22:07:00 +0000 (22:07 +0000)]
Get DRI drawable from framebuffer object.

In the software rasterization fallbacks, get the __DRIdrawablePrivate
pointer from the driRenderbuffer that is passed in.  This eliminates
the need for the mesa_drawable pointer in MGA context structure.

This partially fixes bug #8799.  wincopy no longer produces a black
window for the destination window, but it does produce incorrect
results if the destination window is resized.

18 years agocode tweaks, remove old comments
Brian Paul [Mon, 30 Oct 2006 00:22:28 +0000 (00:22 +0000)]
code tweaks, remove old comments

18 years agofix _mesa_problem() text
Brian Paul [Mon, 30 Oct 2006 00:13:31 +0000 (00:13 +0000)]
fix _mesa_problem() text

18 years agoMove gl_vertex_program_machine struct out of mtypes.h and put into nvvertexec.h.
Brian Paul [Mon, 30 Oct 2006 00:12:05 +0000 (00:12 +0000)]
Move gl_vertex_program_machine struct out of mtypes.h and put into nvvertexec.h.
Massage nvvertexec.c code to work more like s_nvfragprog.c - another step
toward unifying vertex/fragment program execution.

18 years agoremove debug code
Brian Paul [Mon, 30 Oct 2006 00:07:22 +0000 (00:07 +0000)]
remove debug code

18 years agoRather than always allocating 100 instructions, put instructions into a
Brian Paul [Sun, 29 Oct 2006 21:17:18 +0000 (21:17 +0000)]
Rather than always allocating 100 instructions, put instructions into a
temporary buffer, then copy into a malloc'd array of the correct size.
According to Glean texCombine, we never need more than 21 instructions.

18 years agoNew _mesa_exec_vertex_state_program() function. Start of some re-org.
Brian Paul [Sun, 29 Oct 2006 18:33:14 +0000 (18:33 +0000)]
New _mesa_exec_vertex_state_program() function.  Start of some re-org.

18 years agofix wrong inequality
Brian Paul [Sun, 29 Oct 2006 18:14:00 +0000 (18:14 +0000)]
fix wrong inequality

18 years agoChange _mesa_init_instruction() to initialize an array of instructions.
Brian Paul [Sun, 29 Oct 2006 18:03:16 +0000 (18:03 +0000)]
Change _mesa_init_instruction() to initialize an array of instructions.

18 years agoProgram instructions are initialized before parsing so no need to set
Brian Paul [Sun, 29 Oct 2006 17:55:16 +0000 (17:55 +0000)]
Program instructions are initialized before parsing so no need to set
Abs, NegateAbs, CondMask and CondSwizzle fields to defaults here.
CondMask was getting mis-set.  Removing the incorrect assignment improves
fragment program speed by 15%.

18 years agoAdded PROGRAM_CONSTANT to get_register_pointer().
Brian Paul [Sat, 28 Oct 2006 23:10:17 +0000 (23:10 +0000)]
Added PROGRAM_CONSTANT to get_register_pointer().
More DEBUG_FRAG code.

18 years agospecial case END in _mesa_print_instruction()
Brian Paul [Sat, 28 Oct 2006 23:08:07 +0000 (23:08 +0000)]
special case END in _mesa_print_instruction()

18 years agoImplement _mesa_append_fog_code() for fragment program fog options.
Brian Paul [Sat, 28 Oct 2006 17:14:47 +0000 (17:14 +0000)]
Implement _mesa_append_fog_code() for fragment program fog options.

18 years agoIf DEBUG, check that all array indices really do fall in [start,end] in
Brian Paul [Thu, 26 Oct 2006 20:54:28 +0000 (20:54 +0000)]
If DEBUG, check that all array indices really do fall in [start,end] in
the DrawRangeElements() call.  Warn the user if that's not true.

18 years agoremove code for inserting mvp transform into position-invariant vertex progs and...
Roland Scheidegger [Thu, 26 Oct 2006 12:09:07 +0000 (12:09 +0000)]
remove code for inserting mvp transform into position-invariant vertex progs and instead use _mesa_insert_mvp_code().

18 years agoPreviously, if a fragment program referenced fragment.fogcoord but the
Brian Paul [Wed, 25 Oct 2006 23:10:14 +0000 (23:10 +0000)]
Previously, if a fragment program referenced fragment.fogcoord but the
program didn't use the ARB_fog_linear option, the fragment program's
fragment.fogcoord register wasn't loaded properly.

18 years agochange some bogus comments regarding the base e exponential function used for fog...
Roland Scheidegger [Wed, 25 Oct 2006 12:14:26 +0000 (12:14 +0000)]
change some bogus comments regarding the base e exponential function used for fog in vertex programs.

18 years agofix (per-vertex) fog when using ARB_vp by incorporating fog factor computation into...
Roland Scheidegger [Tue, 24 Oct 2006 22:37:51 +0000 (22:37 +0000)]
fix (per-vertex) fog when using ARB_vp by incorporating fog factor computation into the vertex program (not yet fixed for swtnl). Simplify (and correct) the VTX_TCL_OUTPUT_VTXFMT handling when using vertex programs, turns out it's solely driven by the needs of the past-vertex stage of the pipeline, this should fix lockups with ill-specified applications using vertex programs (for instance applications enabling fog but not writing to fog coord output will now get (conformant) undefined results instead of lockups).

18 years agoAdd missing call to glutInit.
Ian Romanick [Tue, 24 Oct 2006 20:50:08 +0000 (20:50 +0000)]
Add missing call to glutInit.

18 years agos/GLchan/GLubyte/
Brian Paul [Tue, 24 Oct 2006 13:46:39 +0000 (13:46 +0000)]
s/GLchan/GLubyte/