Commit Graph

138 Commits

Author SHA1 Message Date
Nicolai Hähnle
736e1ae42f r300: Fix handling of NV_vertex_program parameters
The handling is a bit inefficient, unfortunately, but I don't want to make
any intrusive changes for Mesa 7.6.

Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
2009-09-21 12:56:16 +02:00
Brian Paul
dd528f0ec1 mesa: additional instruction field size assertions 2009-08-26 12:02:24 -06:00
Brian Paul
516d20fd26 mesa: silence warning 2009-06-17 09:58:29 -06:00
Brian Paul
ec6ad7ba3c mesa: added _mesa_postprocess_program() to aid shader debugging 2009-06-17 09:58:29 -06:00
Brian Paul
c5af2ed60f mesa: add switch case for GL_VERTEX_STATE_PROGRAM_NV in _mesa_new_program()
Fixes bug seen in progs/tests/vptest1.c
2009-04-18 10:08:54 -06:00
Brian Paul
8d475822e6 mesa: rename, reorder FRAG_RESULT_x tokens
s/FRAG_RESULT_DEPR/FRAG_RESULT_DEPTH/
s/FRAG_RESULT_COLR/FRAG_RESULT/COLOR/
Remove FRAG_RESULT_COLH (NV half-precision) output since we never used it.
Next, we might merge the COLOR and DATA outputs (COLOR0, COLOR1, etc).
2009-02-28 11:49:46 -07:00
Brian Paul
5b2f8dc013 mesa: increase MAX_UNIFORMS to 1024 (of vec4 type)
Old limit was 256.  Note that no arrays are declared to this size.
The only place we have to be careful about raising this limit is the
prog_src/dst_register Index bitfields.  These have been bumped up too.

Added assertions to check we don't exceed the bitfield in the future too.
2009-02-18 13:15:13 -07:00
Brian Paul
5273a5f0d7 mesa: fix off-by-one bug in _mesa_delete_instructions() 2009-01-09 11:16:40 +00:00
Keith Whitwell
3a3801c143 Merge commit 'origin/master' into gallium-0.2
Conflicts:

	src/mesa/glapi/descrip.mms
	src/mesa/shader/grammar/descrip.mms
2008-10-10 15:26:28 +01:00
Keith Whitwell
d7f1cb5b5a Merge commit 'origin/gallium-0.1' into gallium-0.2
Conflicts:

	src/gallium/auxiliary/gallivm/instructionssoa.cpp
	src/gallium/auxiliary/gallivm/soabuiltins.c
	src/gallium/auxiliary/rtasm/rtasm_x86sse.c
	src/gallium/auxiliary/rtasm/rtasm_x86sse.h
	src/mesa/main/texenvprogram.c
	src/mesa/shader/arbprogparse.c
	src/mesa/shader/prog_statevars.c
	src/mesa/state_tracker/st_draw.c
	src/mesa/vbo/vbo_exec_draw.c
2008-10-10 15:23:36 +01:00
Brian Paul
5c4bd76cb6 mesa: in _mesa_combine_programs() take new STATE_CURRENT_ATTRIB color into account
Commit 1680ef8696 changed the texenv program
to get color from a state register instead of a constant-valued vertex
attribute.  This broke program concatenation (so glDraw/CopyPixels broke).
Now check if the second program get's color from a constant register and
handle that case appropriately.
2008-10-08 14:02:24 -06:00
Brian Paul
4bc39c58eb mesa: fix assertion in _mesa_reference_program() 2008-09-26 07:40:45 -06:00
Keith Whitwell
dace236c5f Merge branch 'master' into gallium-0.2
Conflicts:

	src/mesa/glapi/glapi.h
	src/mesa/main/api_exec.c
	src/mesa/main/attrib.c
	src/mesa/main/clear.c
	src/mesa/main/context.c
	src/mesa/main/mfeatures.h
	src/mesa/main/mipmap.c
	src/mesa/main/mipmap.h
	src/mesa/main/readpix.c
	src/mesa/main/sources
	src/mesa/main/state.c
	src/mesa/main/texformat.c
	src/mesa/main/texparam.c
	src/mesa/main/texstate.c
	src/mesa/vbo/vbo_context.c
	src/mesa/x86/common_x86_asm.S
2008-09-21 22:30:55 -07:00
Brian Paul
93c90d34d1 mesa: set point state
(cherry picked from commit af3d9dba56)
2008-09-21 22:13:57 -07:00
José Fonseca
457d7218b8 mesa: Use appropriate unsigned/signed, float/integer types. 2008-09-21 22:13:56 -07:00
Keith Whitwell
32ef6e7583 mesa: move fixed function vertex program builder from tnl to core mesa
Also unify caching of fragment and vertex programs in shader/prog_cache.c`

Brought across from gallium-0.2
2008-09-21 09:46:00 -07:00
Brian Paul
bbd287103d mesa: prefix a bunch of #include lines with "main/".
This is another step toward removing a whole bunch of -I flags from
the cc commands.  Still need to address driver code...
2008-09-18 12:26:54 -06:00
Keith Whitwell
0397b2bb41 Merge branch 'gallium-0.1' into gallium-0.2
A first attempt at moving gallium onto a branch directly off master...

It will be interesting to see how much work this takes to get running.

Have resolved the conflicts semi-arbitarily, not compiled or tested.

Conflicts:

	.gitignore
	Makefile
	configs/config.mgw
	configs/darwin
	configs/darwin-x86ppc
	configs/default
	configs/freebsd-dri
	configs/linux-dri
	configs/linux-dri-xcb
	configs/linux-fbdev
	configs/linux-static
	configs/linux-x86-64-static
	configs/linux-x86-static
	doxygen/Makefile
	include/GL/gl.h
	progs/demos/Makefile
	progs/demos/descrip.mms
	progs/demos/texenv.c
	progs/egl/.gitignore
	progs/egl/Makefile
	progs/glsl/.gitignore
	progs/glsl/Makefile
	progs/glsl/convolutions.c
	progs/samples/Makefile.mgw
	progs/tests/.gitignore
	progs/trivial/.gitignore
	progs/trivial/point-param.c
	progs/trivial/tri.c
	progs/xdemos/.gitignore
	progs/xdemos/glthreads.c
	src/egl/drivers/demo/Makefile
	src/egl/drivers/dri/Makefile
	src/egl/main/Makefile
	src/glu/Makefile
	src/glu/sgi/Makefile
	src/glu/sgi/Makefile.mgw
	src/glut/glx/Makefile.mgw
	src/glut/os2/WarpWin.cpp
	src/glut/os2/glut_cindex.cpp
	src/glut/os2/glut_gamemode.cpp
	src/glut/os2/glut_win.cpp
	src/glut/os2/glut_winmisc.cpp
	src/glut/os2/os2_glx.cpp
	src/glut/os2/os2_menu.cpp
	src/glut/os2/os2_winproc.cpp
	src/glw/Makefile
	src/glx/x11/dri_glx.c
	src/glx/x11/glxext.c
	src/mesa/Makefile
	src/mesa/Makefile.mgw
	src/mesa/descrip.mms
	src/mesa/drivers/beos/Makefile
	src/mesa/drivers/common/descrip.mms
	src/mesa/drivers/common/driverfuncs.c
	src/mesa/drivers/directfb/Makefile
	src/mesa/drivers/dri/Makefile.template
	src/mesa/drivers/dri/common/dri_bufmgr.c
	src/mesa/drivers/dri/common/dri_bufmgr.h
	src/mesa/drivers/dri/common/dri_util.c
	src/mesa/drivers/dri/common/extension_helper.h
	src/mesa/drivers/dri/common/mmio.h
	src/mesa/drivers/dri/common/utils.c
	src/mesa/drivers/dri/common/utils.h
	src/mesa/drivers/dri/glcore/Makefile
	src/mesa/drivers/dri/i810/i810screen.c
	src/mesa/drivers/dri/i915/intel_ioctl.c
	src/mesa/drivers/dri/i915/intel_ioctl.h
	src/mesa/drivers/dri/i915/intel_screen.c
	src/mesa/drivers/dri/i915/server/i830_common.h
	src/mesa/drivers/dri/i915/server/i830_dri.h
	src/mesa/drivers/dri/i965/intel_screen.c
	src/mesa/drivers/dri/i965/server/i830_common.h
	src/mesa/drivers/dri/i965/server/i830_dri.h
	src/mesa/drivers/dri/mach64/mach64_screen.c
	src/mesa/drivers/dri/nouveau/nouveau_context.h
	src/mesa/drivers/dri/nouveau/nouveau_fifo.c
	src/mesa/drivers/dri/nouveau/nouveau_fifo.h
	src/mesa/drivers/dri/nouveau/nouveau_screen.c
	src/mesa/drivers/dri/nouveau/nouveau_screen.h
	src/mesa/drivers/dri/r128/r128_tex.h
	src/mesa/drivers/dri/savage/savageioctl.h
	src/mesa/drivers/fbdev/Makefile
	src/mesa/drivers/osmesa/Makefile
	src/mesa/drivers/osmesa/descrip.mms
	src/mesa/drivers/x11/Makefile
	src/mesa/drivers/x11/descrip.mms
	src/mesa/drivers/x11/xm_dd.c
	src/mesa/glapi/glapi.c
	src/mesa/glapi/glthread.c
	src/mesa/main/api_validate.c
	src/mesa/main/attrib.c
	src/mesa/main/bufferobj.c
	src/mesa/main/bufferobj.h
	src/mesa/main/buffers.c
	src/mesa/main/config.h
	src/mesa/main/context.c
	src/mesa/main/descrip.mms
	src/mesa/main/drawpix.c
	src/mesa/main/enums.c
	src/mesa/main/fbobject.c
	src/mesa/main/glheader.h
	src/mesa/main/imports.c
	src/mesa/main/mipmap.c
	src/mesa/main/mm.c
	src/mesa/main/mm.h
	src/mesa/main/mtypes.h
	src/mesa/main/points.c
	src/mesa/main/sources
	src/mesa/main/state.c
	src/mesa/main/texcompress_fxt1.c
	src/mesa/main/texenvprogram.c
	src/mesa/main/texobj.c
	src/mesa/main/texstate.c
	src/mesa/main/texstore.c
	src/mesa/math/descrip.mms
	src/mesa/shader/arbprogram.c
	src/mesa/shader/descrip.mms
	src/mesa/shader/prog_execute.c
	src/mesa/shader/prog_statevars.c
	src/mesa/shader/prog_statevars.h
	src/mesa/shader/prog_uniform.c
	src/mesa/shader/program.c
	src/mesa/shader/program.h
	src/mesa/shader/shader_api.c
	src/mesa/shader/slang/descrip.mms
	src/mesa/shader/slang/library/slang_vertex_builtin_gc.h
	src/mesa/sources
	src/mesa/swrast/descrip.mms
	src/mesa/swrast/s_drawpix.c
	src/mesa/swrast/s_fragprog.c
	src/mesa/swrast/s_readpix.c
	src/mesa/swrast/s_span.c
	src/mesa/swrast_setup/descrip.mms
	src/mesa/tnl/descrip.mms
	src/mesa/tnl/t_context.h
	src/mesa/tnl/t_vp_build.c
	src/mesa/tnl/tnl.h
	src/mesa/vbo/descrip.mms
	src/mesa/vbo/vbo_context.c
	src/mesa/vbo/vbo_exec_array.c
	src/mesa/x86-64/xform4.S
	src/mesa/x86/rtasm/x86sse.c
	src/mesa/x86/rtasm/x86sse.h
	windows/VC6/progs/glut/glut.dsp
	windows/VC7/mesa/gdi/gdi.vcproj
	windows/VC7/mesa/glu/glu.vcproj
	windows/VC7/mesa/mesa.sln
	windows/VC7/mesa/mesa/mesa.vcproj
	windows/VC7/mesa/osmesa/osmesa.vcproj
	windows/VC7/progs/glut/glut.vcproj
	windows/VC8/mesa/gdi/gdi.vcproj
	windows/VC8/mesa/glu/glu.vcproj
	windows/VC8/mesa/mesa.sln
	windows/VC8/mesa/mesa/mesa.vcproj
	windows/VC8/progs/glut/glut.vcproj
2008-09-11 16:05:15 +01:00
Brian Paul
af3d9dba56 mesa: set point state 2008-08-12 10:00:36 -06:00
Brian Paul
b7eea9a1ce mesa: refactor: move _mesa_Bind/Gen/DeleteProgram() to arbprogram.c
No API-level functions now in program.c.
2008-07-29 17:19:25 -06:00
José Fonseca
101d1a658a mesa: Prefix main includes with dir to avoid conflicts.
Some of the headers in src/mesa/main have pretty common names which
easily conflict with third-party code, e.g. config.h
2008-07-24 21:24:10 +09:00
Brian
e3ca92aa28 mesa: refactor: move _mesa_Bind/Gen/DeleteProgram() to arbprogram.c
No API-level functions now in program.c.
2008-07-21 20:33:42 -06:00
Nicolai Haehnle
d8d086c20b r500: Add "Not quite SSA" and dead code elimination pass
In addition, this pass fixes non-native swizzles.
2008-07-12 09:36:02 +02:00
Nicolai Haehnle
82635aad42 _mesa_clone_program: Copy ShadowSamplers 2008-07-05 18:04:04 +02:00
José Fonseca
18ec140ef2 mesa: Use appropriate unsigned/signed, float/integer types. 2008-06-24 11:34:46 +09:00
Brian Paul
65075da8c3 fix tempReg test in _mesa_combine_programs() 2008-05-19 16:07:10 -06:00
Brian Paul
e469d78d33 fix tempReg test in _mesa_combine_programs() 2008-05-19 16:03:43 -06:00
Brian Paul
0c78c766e4 fixes to _mesa_combine_programs(), from gallium-0.1 2008-05-18 15:46:26 -06:00
Brian Paul
a3e86d43e6 minor changes to aid debugging 2008-05-16 15:16:06 -06:00
Brian Paul
eb4271ea8b remove stray, left-over RefCount++ 2008-05-16 15:16:06 -06:00
Brian Paul
6ca948a303 added _mesa_combine_parameter_lists()
cherry-picked from gallium-0.1
2008-05-14 12:53:03 -06:00
Brian Paul
b256273689 fix some additional program refcounting bugs
cherry-picked from master
2008-05-14 12:47:29 -06:00
Brian Paul
19ad9cf774 mesa: added _mesa_insert_instructions()
Also, use new _mesa_free_instructions() in a few places.

cherry-picked from gallium-0.1
2008-05-14 12:39:41 -06:00
Brian Paul
57e222d6e5 fix some additional program refcounting bugs 2008-05-14 12:11:17 -06:00
Brian Paul
b4e75d6c41 disable debug printfs 2008-05-08 10:59:31 -06:00
Brian Paul
5b5c931527 fix refcounting bugs in tnl/tex program caches 2008-05-07 18:51:44 -06:00
Brian Paul
a56a59ce74 gallium: implement full reference counting for vertex/fragment programs
Use _mesa_reference_vert/fragprog() wherever we assign program pointers.
Fixes a memory corruption bug found with glean/api2 test.
Another memory bug involving shaders yet to be fixed...

Picked from gallium-0.1
2008-05-07 08:55:33 -06:00
Brian
df43fb661b implement full reference counting for vertex/fragment programs
Use _mesa_reference_vert/fragprog() wherever we assign program pointers.
Fixes a memory corruption bug found with glean/api2 test.
2008-05-06 23:08:51 -06:00
Alan Hourihane
eec20c359d small cleanups 2008-04-22 20:30:38 +01:00
Brian
5d1e73028a mesa: added _mesa_insert_instructions()
Also, use new _mesa_free_instructions() in a few places.
2008-04-07 11:23:43 -06:00
Brian Paul
72f2c55069 gallium: make sure to set the SamplersUsed field for bitmap/drawpixels shaders
Also, make sure that field is copied/updated in the program clone and combine functions.
Without this we weren't getting SAMP declarations in the TGSI shaders.
2008-04-04 11:20:44 -06:00
Brian Paul
cf7daba791 mesa: fix some issues in _mesa_combine_programs()
Use a temporay register to connect outputs of first program to inputs of
second program.
Also, fix bug in replace_registers(): didn't search/replace DstReg.
2008-03-25 12:30:05 -06:00
Brian
f8acc3965e use ctx->Driver.DeleteProgram() in a few more places 2008-03-22 10:27:55 -06:00
Brian
dc6fab90b4 use ctx->Driver.DeleteProgram() in a few more places 2008-03-22 10:27:03 -06:00
Brian
27cff4402e copy UsesKill state in _mesa_combine_programs() 2008-01-16 13:54:32 -07:00
Brian
1631a9513d free program caches 2008-01-01 10:21:21 -07:00
Brian
351a83163a remove dead code in _mesa_new_program() 2007-11-01 09:00:26 -06:00
Brian
b26aae67f5 alloc caches for fixed-func vertex/fragment progs 2007-10-31 12:02:55 -06:00
Brian
fb9cf48259 fix InputsRead bug in _mesa_combine_programs() 2007-10-30 18:26:34 -06:00
Brian
1203f54686 make _mesa_combine_programs() params const 2007-10-30 11:32:52 -06:00