Keith Whitwell
48e6fff3a9
merge the (rest of) texmem branch
2006-11-01 14:26:10 +00:00
Keith Whitwell
5ac93f8621
Merge texmem-0-3-branch.
2006-11-01 14:21:57 +00:00
Jerome Glisse
232a489b41
Add LIT instruction to fragment program.
2006-11-01 12:03:36 +00:00
Keith Whitwell
6b9e31f3eb
Import texmem i915 driver to its new location as i915tex.
2006-11-01 12:03:11 +00:00
Jerome Glisse
3c6e99ce95
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.
2006-11-01 11:58:16 +00:00
Keith Whitwell
fd60b2d536
Patch from <haihao.xiang@intel.com> -- pass program string
...
notification callback through to tnl/ module, fixes glean crash.
2006-11-01 09:35:26 +00:00
Brian Paul
d106195ad2
change DEBUG_FRAG conditions
2006-11-01 00:14:04 +00:00
Brian Paul
e6f47d1855
fix some bugs in interpolate_specular()
2006-11-01 00:13:16 +00:00
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
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
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
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
Brian Paul
49a5a09ada
don't save color/z if fragment is killed
2006-10-22 22:58:42 +00:00
Brian Paul
73dd09fdd3
add minstall script to MAIN_FILES (bug 8720)
2006-10-22 22:37:30 +00:00
Brian Paul
a632128ffa
minor tweaks good for about 12% faster execution
2006-10-22 22:36:24 +00:00
Brian Paul
ec9bbac7c7
silence used var warnings
2006-10-22 22:25:46 +00:00
Brian Paul
0b26e826bd
Color clamping fixes.
2006-10-22 17:18:50 +00:00
Brian Paul
919cd2c3ba
move/improve comments, clean up code in a few places
2006-10-21 23:21:35 +00:00
Brian Paul
ed324db249
fix another logic error in computing deferredTexture
2006-10-21 22:56:21 +00:00
Brian Paul
bb19e64d12
For deferredTexture, need to check if the fragment program/shader writes
...
the fragment Z.
2006-10-21 22:43:15 +00:00
Brian Paul
828d15a6e0
move interpolate_varying() call
2006-10-21 21:14:20 +00:00