profile/ivi/mesa.git
17 years agoMerge branch 'vbo_0_1_branch' into vbo-0.2
Keith Whitwell [Tue, 16 Jan 2007 09:47:35 +0000 (09:47 +0000)]
Merge branch 'vbo_0_1_branch' into vbo-0.2

17 years agoMerge branch 'master-merge' into vbo-0.2
Keith Whitwell [Tue, 16 Jan 2007 09:47:26 +0000 (09:47 +0000)]
Merge branch 'master-merge' into vbo-0.2

17 years agoRemove unused index buffer.
Keith Whitwell [Mon, 15 Jan 2007 16:57:01 +0000 (16:57 +0000)]
Remove unused index buffer.

17 years agoDon't special-case FOG attribute initialization.
Keith Whitwell [Mon, 15 Jan 2007 14:30:16 +0000 (14:30 +0000)]
Don't special-case FOG attribute initialization.

Initial fog value was being set to {0,0,0,0}.  This results in vector
size 4, but isn't necessary.  The regular {0,0,0,1} works fine.

17 years agoCorrectly initialize current attribute sizes.
Keith Whitwell [Mon, 15 Jan 2007 14:20:21 +0000 (14:20 +0000)]
Correctly initialize current attribute sizes.

Some legacy attributes (eg color) have an initial value other than {0,0,0,1}
which means that their initial size != 1 either.

17 years agoRemove debug, reenable inplace splitting.
keithw [Mon, 15 Jan 2007 14:10:42 +0000 (14:10 +0000)]
Remove debug, reenable inplace splitting.

17 years agoSplit too-large draw commands.
Keith Whitwell [Mon, 15 Jan 2007 13:54:08 +0000 (13:54 +0000)]
Split too-large draw commands.

Use the vbo_split_ functionality to split incoming drawing command
to fit within the fixed-size buffers used by software t&l module.

17 years agoRemove special-case handling for index and edgeflag
Keith Whitwell [Mon, 15 Jan 2007 13:40:38 +0000 (13:40 +0000)]
Remove special-case handling for index and edgeflag

This isn't required with the changes to core mesa and the new
attribute layout.

17 years agoHook in split functionality
keithw [Mon, 15 Jan 2007 11:58:06 +0000 (11:58 +0000)]
Hook in split functionality

17 years agoAdd vbo_split files
keithw [Mon, 15 Jan 2007 11:54:40 +0000 (11:54 +0000)]
Add vbo_split files

17 years agoNew files to manage splitting drawing commands
keithw [Mon, 15 Jan 2007 11:52:58 +0000 (11:52 +0000)]
New files to manage splitting drawing commands

17 years agoDon't perform dangling attribute check on POS attribute. It can't by
Keith Whitwell [Mon, 20 Nov 2006 11:49:58 +0000 (11:49 +0000)]
Don't perform dangling attribute check on POS attribute.  It can't by
definition dangle (every vertex has a position).  However
save->currentsz isn't properly maintained for this attribute, as there
is no current position value to track.  Based on patch from Haihao Xiang.

17 years agoFix compiler warnings.
Keith Whitwell [Fri, 3 Nov 2006 13:04:08 +0000 (13:04 +0000)]
Fix compiler warnings.
Add missing code for translating non-GLuint elements.

17 years agoneed to call bind_arrays() in vbo_exec_DrawRangeElements.
Roland Scheidegger [Fri, 3 Nov 2006 12:33:29 +0000 (12:33 +0000)]
need to call bind_arrays() in vbo_exec_DrawRangeElements.

17 years agoremove remaining traces of r200FlushVertices...
Roland Scheidegger [Fri, 3 Nov 2006 12:30:55 +0000 (12:30 +0000)]
remove remaining traces of r200FlushVertices...

17 years agoMove r300 to new fbo interface based on Keith Whithwell.
Jerome Glisse [Thu, 2 Nov 2006 20:44:03 +0000 (20:44 +0000)]
Move r300 to new fbo interface based on Keith Whithwell.

Tested with progs/redbook/varray.

17 years agoFix type-conversion of incoming vertices.
Keith Whitwell [Thu, 2 Nov 2006 19:11:16 +0000 (19:11 +0000)]
Fix type-conversion of incoming vertices.
Fix mis-application of increment to pointer variable.

17 years agoFix typo in last commit
Keith Whitwell [Thu, 2 Nov 2006 19:02:04 +0000 (19:02 +0000)]
Fix typo in last commit

17 years agoSimilarly, fill in missing input slots in the vertex-array +
Keith Whitwell [Thu, 2 Nov 2006 18:02:17 +0000 (18:02 +0000)]
Similarly, fill in missing input slots in the vertex-array +
NV_vertex_program path.

17 years agoFill in missing input slots in the vertex-array + no-vertex-program
Keith Whitwell [Thu, 2 Nov 2006 18:00:43 +0000 (18:00 +0000)]
Fill in missing input slots in the vertex-array + no-vertex-program
path.

17 years agomerge current trunk into vbo branch
Alan Hourihane [Thu, 2 Nov 2006 12:02:13 +0000 (12:02 +0000)]
merge current trunk into vbo branch

17 years agoFix typo in display list attrib binding.
Keith Whitwell [Thu, 2 Nov 2006 11:40:56 +0000 (11:40 +0000)]
Fix typo in display list attrib binding.

17 years agoRespect array->Normalized flag.
Keith Whitwell [Thu, 2 Nov 2006 09:48:30 +0000 (09:48 +0000)]
Respect array->Normalized flag.

Import edgeflag attribute to array of GLbooleans as expected by
downstream code.

17 years agomissing file
Keith Whitwell [Thu, 2 Nov 2006 08:37:17 +0000 (08:37 +0000)]
missing file

17 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()

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

17 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.

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

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

17 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

17 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.

17 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.

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

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

17 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.

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

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

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

17 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.

17 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

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

17 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.

17 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.

17 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.

17 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.

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

17 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()

17 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.

17 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()

17 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

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

17 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().

17 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()

17 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.

17 years agoswitch remaining drivers over to vbo
Keith Whitwell [Tue, 31 Oct 2006 12:12:15 +0000 (12:12 +0000)]
switch remaining drivers over to vbo

17 years agodisable vtxfmt_a code, switch over to vbo
Keith Whitwell [Tue, 31 Oct 2006 12:11:56 +0000 (12:11 +0000)]
disable vtxfmt_a code, switch over to vbo

17 years agoremove vtxfmt code, switch over to vbo
Keith Whitwell [Tue, 31 Oct 2006 12:11:10 +0000 (12:11 +0000)]
remove vtxfmt code, switch over to vbo

17 years agopickup structs from vbo.h
Keith Whitwell [Tue, 31 Oct 2006 11:40:31 +0000 (11:40 +0000)]
pickup structs from vbo.h

17 years agomove public structure definitions to vbo.h
Keith Whitwell [Tue, 31 Oct 2006 11:39:57 +0000 (11:39 +0000)]
move public structure definitions to vbo.h

17 years agocleanup code, compiles with vbo changes
Keith Whitwell [Tue, 31 Oct 2006 11:28:45 +0000 (11:28 +0000)]
cleanup code, compiles with vbo changes

17 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.

17 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.

17 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.

17 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.

17 years agooops, get.c is autogenerated
Keith Whitwell [Mon, 30 Oct 2006 20:29:13 +0000 (20:29 +0000)]
oops, get.c is autogenerated

17 years agoMove edgeflag into the VERT_ATTRIB_SEVEN slot. This means that our
Keith Whitwell [Mon, 30 Oct 2006 20:16:35 +0000 (20:16 +0000)]
Move edgeflag into the VERT_ATTRIB_SEVEN slot.  This means that our
NV_vertex_program implementation has slightly incorrect aliasing
behaviour.  I think this is reasonable given the simplification and
the fact that the mainstream ARB_vp continues to have the correct
behaviour.

17 years agoRemove wakeup functions. This code is intended to be active all the
Keith Whitwell [Mon, 30 Oct 2006 17:12:05 +0000 (17:12 +0000)]
Remove wakeup functions.  This code is intended to be active all the
time.

17 years agoswitch several dri drivers over
Keith Whitwell [Mon, 30 Oct 2006 16:56:56 +0000 (16:56 +0000)]
switch several dri drivers over

17 years agobetter handling of current attributes. Trivial dlist and varray tests work
Keith Whitwell [Mon, 30 Oct 2006 16:44:13 +0000 (16:44 +0000)]
better handling of current attributes.  Trivial dlist and varray tests work

17 years agocheckpoint - remove dead files, otherwise untested
Keith Whitwell [Mon, 30 Oct 2006 16:43:39 +0000 (16:43 +0000)]
checkpoint - remove dead files, otherwise untested

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

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

17 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.

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

17 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.

17 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.

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

17 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.

17 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%.

17 years agoFix compiler warning
Keith Whitwell [Sun, 29 Oct 2006 09:54:17 +0000 (09:54 +0000)]
Fix compiler warning

17 years agoswitch over to vbo module
Keith Whitwell [Sun, 29 Oct 2006 09:52:36 +0000 (09:52 +0000)]
switch over to vbo module

17 years agoremove this module
Keith Whitwell [Sun, 29 Oct 2006 09:48:36 +0000 (09:48 +0000)]
remove this module

17 years agoChanges for new vbo-building module.
Keith Whitwell [Sun, 29 Oct 2006 09:48:15 +0000 (09:48 +0000)]
Changes for new vbo-building module.
- Removed all the old immediate, array and display list code.
- Remove references to the old array_cache module.
- Added a _tnl_draw_prims() entrypoint.
- Added a simplified data import facility for converting
non-floating point data as required.

Checkpoint commit - trivial/tri works.

17 years agoCheckpoint of new vbo-building code. Currently builds regular arrays
Keith Whitwell [Sun, 29 Oct 2006 09:46:11 +0000 (09:46 +0000)]
Checkpoint of new vbo-building code.  Currently builds regular arrays
rather than VBO's - VBOs are easy but need to look closer at the
driver interface.  The trivial/tri demo works.

17 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.

17 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()

17 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.

17 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.

17 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().

17 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.

17 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.

17 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).

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

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

17 years agowhitespace clean-up
Brian Paul [Tue, 24 Oct 2006 13:45:08 +0000 (13:45 +0000)]
whitespace clean-up

17 years agoEmit cliprects in the userspace driver as required, rather than
Keith Whitwell [Mon, 23 Oct 2006 08:43:26 +0000 (08:43 +0000)]
Emit cliprects in the userspace driver as required, rather than
passing them to the kernel.  This works because all drawing commands
in the 965 driver are emitted with the lock held and the batchbuffer
is always flushed prior to releasing the lock.  This allows multiple
cliprects to be dealt with, without replaying entire batchbuffers and
redundantly re-emitting state.

17 years agoassorted clean-ups
Brian Paul [Sun, 22 Oct 2006 23:21:45 +0000 (23:21 +0000)]
assorted clean-ups

17 years agodon't save color/z if fragment is killed
Brian Paul [Sun, 22 Oct 2006 22:58:42 +0000 (22:58 +0000)]
don't save color/z if fragment is killed

17 years agoadd minstall script to MAIN_FILES (bug 8720)
Brian Paul [Sun, 22 Oct 2006 22:37:30 +0000 (22:37 +0000)]
add minstall script to MAIN_FILES (bug 8720)

17 years agominor tweaks good for about 12% faster execution
Brian Paul [Sun, 22 Oct 2006 22:36:24 +0000 (22:36 +0000)]
minor tweaks good for about 12% faster execution