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
Brian Paul
4676b6260f
don't use params passed to Clear()
2006-10-21 21:13:40 +00:00
Brian Paul
f614a61905
Move interpolate_texcoords() and interpolate_varying() calls into shade_texture_span().
...
Added some INLINE hints.
2006-10-21 00:20:16 +00:00
Brian Paul
61c89be313
Consolidate some code into shade_texture_span().
...
Clean up logic for deferred texturing/shading.
2006-10-19 22:27:44 +00:00
Brian Paul
cd5a623386
fixed Fixed/Int bug
2006-10-19 22:26:29 +00:00
Brian Paul
7c76028937
remove temp code
2006-10-19 22:13:31 +00:00
Brian Paul
79b5d3e539
remove some debug/test changes
2006-10-19 20:11:15 +00:00
Brian Paul
464fcd0dd8
New bin/minstall script - a minimal replacement for 'install'.
...
Correctly handles symlinks so we can get rid of the COPY_LIBS stuff.
2006-10-19 20:09:05 +00:00
Brian Paul
c351858de8
fix problem when CHAN_BITS == 32 (bug 8704), remove unneeded assertion
2006-10-19 14:02:42 +00:00
Michal Krol
a79d4e75c3
Fix nonportable pointer+unsigned arithmetic. Use pointer+int.
2006-10-19 08:07:00 +00:00
Brian Paul
31293910b4
added clamp_colors(), updated assertions
2006-10-18 23:14:02 +00:00
Brian Paul
ff07d6de4c
minor re-org, doxygen comments
2006-10-18 22:38:13 +00:00
Brian Paul
fee08575cd
Changed install filenames to libGL* and libOSMesa* so things work on Darwin
...
where GL_LIB_NAME = libGL.dylib but the other library name is libGL.1.dylib
Unlike other platforms, the version number is in the middle of the name,
not at the end.
See bug 8671
2006-10-18 22:05:13 +00:00
Ian Romanick
3beaff1e3c
Enable GLX_SGI_make_current_read for radeon.
...
Added code to track the drawable bound to the context for reading. In
addition, when a drawable is initially bound (for reading or drawing)
or when the size of the drawable changes, update the size of the
framebuffer object that back the drawable (for software fallbacks).
Deprecate the old GetBufferSize interface.
Bump the driver date.
These changes were tested with wincopy on both direct rendering and
accelerated indirect rendering (AIGLX).
2006-10-18 20:27:11 +00:00
Brian Paul
ec99e716a2
Don't use x/y/w/h params given to Clear().
2006-10-18 20:03:20 +00:00
Brian Paul
446972bc27
Want to stop passing x/y/width/height to Clear() function.
...
The coordinates need to be computed after we've got the hw lock.
Code updated to:
1. Ignore all/x/y/width/height/ params passed to Clear func.
2. Pass 0,0,0,0,0 to _swrast_Clear() until they're totally removed.
2006-10-18 20:02:42 +00:00
Brian Paul
ccb64bbb2a
Don't pass x/y/width/height to ctx->Driver.Accum().
...
Compute the region after we've locked (and possibly updated the buffer's size).
Same thing is needed for ctx->Driver.Clear().
2006-10-18 18:35:09 +00:00
Brian Paul
4e4c0bbef7
glDrawPixels, line clipping bug fixes
2006-10-18 18:03:54 +00:00
Brian Paul
a1a0a29a5a
Fix broken line clipping.
...
When both ends of the line were clipped, we were using the new v0 instead
of the original v0 when computing the location of the second vertex. Thus,
the second vertex's position was incorrect.
Thanks to Heath Feather for finding a test case.
2006-10-18 18:02:05 +00:00
Brian Paul
ff893a83f1
Fix a dangerous use of ASSERT in an else-clause not enclosed in braces.
...
We've been lucky if this hasn't been causing line rendering bugs.
2006-10-18 17:36:57 +00:00
Brian Paul
c3caaa3dd4
Always convert colors to float before running a fragment shader/program.
2006-10-17 22:23:32 +00:00
Brian Paul
32c3243e4d
fix fog color bug
2006-10-17 22:22:42 +00:00