Brian Paul
90fcf6ccc3
Added a few new ctx->Const. fields for shader-related limits.
2006-11-01 00:12:41 +00:00
Brian Paul
5050b565de
make use of Parameters->StateFlags in _swrast_update_fragment_program()
2006-10-31 19:53:38 +00:00
Brian Paul
ef987aa1d7
minor clean-ups, simplifications and new comments
2006-10-31 19:53:03 +00:00
Brian Paul
7e75f51b27
fix MINGW32 problems
2006-10-31 19:14:27 +00:00
Brian Paul
4e9e0aff79
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().
2006-10-31 16:02:56 +00:00
Brian Paul
72f49657e8
signal _NEW_LIGHT in _tnl_copy_to_current()
2006-10-31 16:01:11 +00:00
Brian Paul
ecd1743a0c
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.
2006-10-31 14:29:01 +00:00
Keith Whitwell
35ee4affc5
switch remaining drivers over to vbo
2006-10-31 12:12:15 +00:00
Keith Whitwell
851d15ef3a
disable vtxfmt_a code, switch over to vbo
2006-10-31 12:11:56 +00:00
Keith Whitwell
80c88304fc
remove vtxfmt code, switch over to vbo
2006-10-31 12:11:10 +00:00
Keith Whitwell
70dd0126bd
pickup structs from vbo.h
2006-10-31 11:40:31 +00:00
Keith Whitwell
1f07439fe8
move public structure definitions to vbo.h
2006-10-31 11:39:57 +00:00
Keith Whitwell
f2eb6434ab
cleanup code, compiles with vbo changes
2006-10-31 11:28:45 +00:00
Brian Paul
256c96136c
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.
2006-10-31 01:22:38 +00:00
Ian Romanick
b14bae8466
Fix bug #8799 .
...
Properly resize bith the drawable and the readable in mgaUpdateRects.
Eliminate the use of the deprecated GetBufferSize interface. Bump
driver date.
2006-10-30 23:44:54 +00:00
Ian Romanick
86a465412d
Refactor mgaXMesaSetFrontClipRects and mgaXMesaSetBackClipRects.
...
Combine mgaXMesaSetFrontClipRects and mgaXMesaSetBackClipRects into a
single new function called mga_set_cliprects. This enables a small
refactor in mgaDDDrawBuffer.
2006-10-30 22:17:39 +00:00
Ian Romanick
5af5260f3c
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.
2006-10-30 22:07:00 +00:00
Keith Whitwell
a1a8a2c024
oops, get.c is autogenerated
2006-10-30 20:29:13 +00:00
Keith Whitwell
fd2756006a
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.
2006-10-30 20:16:35 +00:00
Keith Whitwell
e8abd098b3
Remove wakeup functions. This code is intended to be active all the
...
time.
2006-10-30 17:12:05 +00:00
Keith Whitwell
48f5deab94
switch several dri drivers over
2006-10-30 16:56:56 +00:00
Keith Whitwell
99efde461d
better handling of current attributes. Trivial dlist and varray tests work
2006-10-30 16:44:13 +00:00
Keith Whitwell
efef291dc7
checkpoint - remove dead files, otherwise untested
2006-10-30 16:43:39 +00:00
Brian Paul
075fae5200
code tweaks, remove old comments
2006-10-30 00:22:28 +00:00
Brian Paul
0f8405365f
fix _mesa_problem() text
2006-10-30 00:13:31 +00:00
Brian Paul
a23e668d40
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.
2006-10-30 00:12:05 +00:00
Brian Paul
0781339b39
remove debug code
2006-10-30 00:07:22 +00:00
Brian Paul
e998c34647
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.
2006-10-29 21:17:18 +00:00
Brian Paul
ebcedd2d89
New _mesa_exec_vertex_state_program() function. Start of some re-org.
2006-10-29 18:33:14 +00:00
Brian Paul
abb1430c79
fix wrong inequality
2006-10-29 18:14:00 +00:00
Brian Paul
d6272e0617
Change _mesa_init_instruction() to initialize an array of instructions.
2006-10-29 18:03:16 +00:00
Brian Paul
efd95c1084
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%.
2006-10-29 17:55:16 +00:00
Keith Whitwell
a3c86828ed
Fix compiler warning
2006-10-29 09:54:17 +00:00
Keith Whitwell
0a0fb5e0b3
switch over to vbo module
2006-10-29 09:52:36 +00:00
Keith Whitwell
72b68455eb
remove this module
2006-10-29 09:48:36 +00:00
Keith Whitwell
b1f176039a
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.
2006-10-29 09:48:15 +00:00
Keith Whitwell
fd12b37dba
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.
2006-10-29 09:46:11 +00:00
Brian Paul
a90ab5290c
Added PROGRAM_CONSTANT to get_register_pointer().
...
More DEBUG_FRAG code.
2006-10-28 23:10:17 +00:00
Brian Paul
8ed319796f
special case END in _mesa_print_instruction()
2006-10-28 23:08:07 +00:00
Brian Paul
f5eea0cc7a
Implement _mesa_append_fog_code() for fragment program fog options.
2006-10-28 17:14:47 +00:00
Brian Paul
db5529573f
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.
2006-10-26 20:54:28 +00:00
Roland Scheidegger
b55a0ab7ab
remove code for inserting mvp transform into position-invariant vertex progs and instead use _mesa_insert_mvp_code().
2006-10-26 12:09:07 +00:00
Brian Paul
fe457474d4
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.
2006-10-25 23:10:14 +00:00
Roland Scheidegger
e9b923182e
change some bogus comments regarding the base e exponential function used for fog in vertex programs.
2006-10-25 12:14:26 +00:00
Roland Scheidegger
fc606f7db9
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).
2006-10-24 22:37:51 +00:00
Ian Romanick
e4298b9492
Add missing call to glutInit.
2006-10-24 20:50:08 +00:00
Brian Paul
6340d6bf22
s/GLchan/GLubyte/
2006-10-24 13:46:39 +00:00
Brian Paul
59e1f3ddd8
whitespace clean-up
2006-10-24 13:45:08 +00:00
Keith Whitwell
759facb4d8
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.
2006-10-23 08:43:26 +00:00
Brian Paul
b9786cfaae
assorted clean-ups
2006-10-22 23:21:45 +00:00