Commit Graph

1698 Commits

Author SHA1 Message Date
Brian Paul bb659f6e53 progs/tests: additional debug code 2009-10-01 16:43:22 -06:00
Brian Paul 15c57648cd objviewer: remove disabled code 2009-10-01 13:14:50 -06:00
Brian Paul 9745e26adb objviewer: mouse/keyboard info in README file 2009-10-01 13:14:50 -06:00
Brian Paul 8d93a4c639 objview: clean up drawing VBO code 2009-10-01 13:14:50 -06:00
Brian Paul c7c62521fb objview: set skybox texture filter 2009-10-01 13:14:50 -06:00
Brian Paul 336994e54c objview: check GL version/extension 2009-10-01 13:14:49 -06:00
Brian Paul ca1bda552d progs/objviewer: Wavefront .obj file loader/viewer demo
Adapted from code written by Nate Robins.  See README.txt.
2009-10-01 13:14:48 -06:00
Chia-I Wu e82b02c7e8 progs/egl: Make demo3 work again.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-09-30 08:15:30 -06:00
Chia-I Wu 28c2190336 progs/egl: Check EGL_MESA_screen_surface is supported in demo2.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-09-30 08:15:30 -06:00
Chia-I Wu e0b2848f4f progs/egl: Fix a crash in demo1.
The variable "configs" in main() is used without initialization.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-09-30 08:15:30 -06:00
Chia-I Wu fa8df0c40d progs/egl: Replace EGL_i915 by EGL_DEFAULT_DISPLAY.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-09-30 08:15:30 -06:00
Vinson Lee 6920a355c1 progs/perf: Include local headers before installed headers.
Fixes compilation errors on platforms with older installed GL headers.
2009-09-28 09:03:26 -06:00
Brian Paul 653ae04bea progs/tests: print usage info upon SPACE/u 2009-09-28 08:44:43 -06:00
Brian Paul c8de476189 progs/tests: re-indent mipmap_limits.c 2009-09-28 08:44:43 -06:00
Brian Paul 6c6896bd25 progs/tests: disable texturing before printing text 2009-09-27 18:02:02 -06:00
Jakob Bornecrantz bcca927562 progs/rbug: Link to math 2009-09-26 12:36:01 -07:00
Brian Paul c9ddd6f810 progs/perf: glGenerateMipmap() test 2009-09-24 19:38:04 -06:00
Keith Whitwell 09a23ac3c1 progs/perf: fix warnings in readpixels test 2009-09-24 16:52:14 +01:00
Keith Whitwell d93f022936 progs/perf: fix typo in sconscript 2009-09-24 16:50:27 +01:00
Keith Whitwell 6e0b56edf8 progs/perf: accept GL3.x also 2009-09-24 16:43:15 +01:00
Brian Paul fa0816b17c progs/perf: added glReadPixels benchmark 2009-09-23 14:05:05 -06:00
Brian Paul 489f8bc86f progs/perf: also request a stencil buffer 2009-09-23 14:05:05 -06:00
Michal Krol a0549f6634 progs/perf: Actually bind the newly created vbo. 2009-09-23 20:24:35 +02:00
Keith Whitwell 890679d432 Merge branch 'softpipe-opt'
Conflicts:
	progs/demos/cubemap.c
	src/gallium/drivers/softpipe/sp_tex_sample.c
	src/gallium/drivers/softpipe/sp_texture.c
2009-09-23 17:37:28 +01:00
Brian Paul aae77319c0 progs/perf: set TexSubImage4=FALSE 2009-09-23 08:06:37 -06:00
Brian Paul d04fa73cec progs/perf: added glCopyTex[Sub]Image2D test 2009-09-22 15:39:05 -06:00
Brian Paul da0e4e557b progs/perf: test glGetTexImage() also 2009-09-22 12:26:12 -06:00
Brian Paul 67d7021ae0 progs/perf: add missing texture enable in fbobind.c 2009-09-22 11:15:11 -06:00
Brian Paul ed113da12e progs/perf: added fbobind.c test to test FBO binding speed 2009-09-22 11:15:11 -06:00
Brian Paul cfb0f2489d progs/perf: added PerfExtensionSupported() helper 2009-09-22 11:15:11 -06:00
Keith Whitwell 0ec26cce36 teximage: add more tests, image formats
Add a test which creates a new texture from scratch before uploading.
Add more image formats.
Don't run all tests on all image formats.
2009-09-22 18:00:11 +01:00
Brian Paul bae2d58827 progs/perf: add another VBO test for Create/Draw/Destroy pattern
Report both MB/sec and draw/sec.
2009-09-22 09:53:35 -06:00
Brian Paul 7e5004b298 progs/perf: simplify the code 2009-09-22 09:43:08 -06:00
Brian Paul aa80851e16 progs/perf: fix comment 2009-09-22 09:29:27 -06:00
Brian Paul 32979ae15f progs/perf: updated comments 2009-09-22 07:50:12 -06:00
Keith Whitwell 6a09c9d2d8 progs/perf: make teximage results easier to read, more reproducible
Always run the same tests on different drivers, give zero results
where test image is too big for driver.

Add a newline between groups of tests.
2009-09-22 12:35:56 +01:00
Keith Whitwell 89f2799dac progs/perf: reset row_length after subimage test
Also test fewer sizes in teximage generally.
2009-09-22 11:58:09 +01:00
Keith Whitwell bf014d03fe progs/perf: clean up swapbuffers test a bit 2009-09-22 11:27:18 +01:00
Keith Whitwell ac6a5107e2 progs/perf: break up long runs of fullscreen quads
Not all drivers cope gracefully with command-buffers with zillions of
fullscreen quads.
2009-09-22 11:21:10 +01:00
Keith Whitwell a7b2659f02 progs/perf: add first attempt at a swapbuffers rate test
This is pretty ugly as the original framework assumed you'd set
a single window size at startup and keep it throughout, but for
swapbuffers you want to test the rate at various window sizes.

With luck a nicer solution can be found, but this at least lays out
a marker.
2009-09-22 11:21:09 +01:00
Brian Paul 9297e6968a progs/perf: added fill-rate test
Many more fill modes could be tested, but this hits the basics including
blending, texturing and shaders.
2009-09-21 12:17:49 -06:00
Brian Paul 05bce08980 progs/perf: added helpers for creating simple textures and shader programs 2009-09-21 11:58:03 -06:00
Brian Paul 83fbee6e0b progs/perf: offsetof() should be defined in stddef.h, include it
If this breaks mingw, feel free to revert this.
2009-09-21 11:09:47 -06:00
Keith Whitwell 7ce0421fb7 progs/perf: a few more vbo upload modes
Some tests, eg small SubData are probably overwhelmed by the cost of
performing the draw after each upload.  Add a varient which does a lot
of subdata uploads and then a single draw.

Also try to avoid cache-artifacts in the upload timings.
2009-09-21 15:57:14 +01:00
Keith Whitwell 25a580c841 progs/perf: human-readable drawoverhead output 2009-09-21 15:57:14 +01:00
Keith Whitwell 6ab7c127f7 progs/perf: human-format vertexrate output 2009-09-21 15:57:14 +01:00
Keith Whitwell ed63bd62d8 progs/perf: add human-readable float formatter 2009-09-21 15:57:13 +01:00
Vinson Lee d17af7d1e1 progs/glsl: Include local headers before installed headers during compilation.
Fixes compilation errors on platforms with insufficient older installed
GL headers.
2009-09-21 08:44:56 -06:00
Keith Whitwell 2884c31d94 progs/perf: convert some DOS line-endings
It seems like some of these files were committed with CRLF initially.
2009-09-17 12:09:16 +01:00
Keith Whitwell e95a3a23dc progs/perf: add scons support, get working under mingw 2009-09-17 12:08:04 +01:00
Brian Paul 9abbedad09 progs/perf: initial set of simple performance test programs
Initial tests include:
  drawoverhead - measure overhead of state changes w.r.t drawing commands
  teximage - measure glTexImage2D() and glTexSubImage2D() speed
  vbo - measure glBufferData() and glBufferSubData() speed
  vertexrate - measure vertex rate for immediate mode, glDrawArrays, VBOs, etc.
2009-09-16 19:33:01 -06:00
Brian Paul 4df2f7af5e progs/glsl: minor Makefile clean-ups 2009-09-16 19:28:55 -06:00
Brian Paul 0b0fc4072f progs/demos: use non-default texobj in cubemap.c 2009-09-15 18:17:42 -06:00
Brian Paul 7f86da6c60 progs/demos: create a texture object in lodbias.c
Before, we were using the default texture object (name=0).  This caused
the intel_generate_mipmap() path to fail since passing texture=0 to
glFramebufferTexture2DEXT() causes us to _unbind_ the texture if present.
2009-09-15 18:17:42 -06:00
Brian Paul 41bbc83951 Merge branch 'mesa_7_6_branch' 2009-09-15 09:47:35 -06:00
Brian Paul 5d526ed21a Merge branch 'mesa_7_5_branch' into mesa_7_6_branch 2009-09-15 09:45:18 -06:00
Brian Paul 799631acb1 progs/vp: print program and error info when program does not compile 2009-09-14 17:48:17 -06:00
Brian Paul 284d3b2d9c progs/tests: exercise display lists and pixelstore 2009-09-14 12:42:17 -06:00
Keith Whitwell 66a7eedaa2 tgsi: handle some src/dst aliasing in tgsi_sse2.c
Src/Dst aliasing (aka SOA dependencies) requires some care to ensure
intermediate results do not overwrite yet-to-be read source registers.

This change ensures that MOV/SWZ handle this correctly, which is poor but
no worse than the current tgsi_exec.c path.  Remove the fallback as there
is nothing to be gained correctness-wise between the two implementations now.

Fixing this properly looks like a bit of work in this code, but might be
easily achieved by sending destination writes to temporary storage.
2009-09-13 11:59:24 -07:00
Keith Whitwell 18e5f1cee4 tgsi: implement saturation
Fix recent performance regression.
2009-09-12 18:33:46 -07:00
Brian Paul 8947cf6728 progs/tests: added Z invert option 2009-09-08 16:47:30 -06:00
Brian Paul 079ae4c38c progs/demos: added RGB invert option 2009-09-08 16:45:07 -06:00
Peter Hutterer bf19638a00 prog/glsl: fix Makefile for samplers_array.
The rule added in 488b3c4d1b does not use the
right INCDIR, breaking the build when GL isn't installed in the default include
paths.

7.5 branch only fix, already fixed in master by rewriting the Makefile
(ceb9459ed5)

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-07 12:37:54 +10:00
Brian Paul 375a6b4c4a progs/tests: re-enable exit() call
See bug 21267.
2009-09-03 16:07:45 -06:00
Dave Airlie ea26f28c8f tests/texcmp: glewInit in wrong place 2009-09-03 11:33:53 +10:00
Brian Paul d9b7d7875b progs/tests: re-enable exit() call
See bug 21267.
2009-09-01 08:53:34 -06:00
Brian Paul d762b5459b progs/samples: added test/debug code for culling 2009-08-31 19:34:47 -06:00
Brian Paul b3232e9280 progs/tests: disable depth test for second glDrawPixels
We don't want to z-test that glDrawPixels.  Also, set the raster color to
red when drawing GL_DEPTH_COMPONENT image to aid in debugging.
2009-08-31 19:34:47 -06:00
Brian Paul 7dd6fa12e1 progs/util: minor updates to glutskel.c 2009-08-30 09:10:36 -06:00
Chia-I Wu 8d0bdfa433 progs: EGL/X progs should link to libX11.
Since 5a459d58fc, libEGL no longer links
to libX11.  Add the dependency to affected progs and cleanup
prog/egl/Makefile.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-27 08:08:30 -06:00
Younes Manton cefe9c4f39 mesa: gitignore 2009-08-26 20:15:00 -04:00
Brian Paul 7205221051 progs/glsl: asst. changes in shtest.c 2009-08-26 12:16:18 -06:00
Brian Paul 476290946e Merge branch 'mesa_7_5_branch' 2009-08-26 12:01:23 -06:00
Brian Paul 2bcf787de1 progs/glsl: handle window resizes in texaaline.c 2009-08-26 11:56:56 -06:00
Brian Paul 488b3c4d1b progs/glsl: add special Makefile rule for samplers_array 2009-08-26 11:55:15 -06:00
Brian Paul f6d34c2058 progs/glsl: change samplers.c to better test sampler/texture indexing
Now the left half is yellow and the right half is red, with the gradients
going in opposite directions.
2009-08-26 11:53:25 -06:00
Brian Paul 42675ff0e3 progs/glsl: call ValidateShaderProgram() 2009-08-25 17:46:11 -06:00
Brian Paul fa6299cb31 progs/util: added ValidateShaderProgram() to shaderutil.c 2009-08-25 17:46:10 -06:00
Keith Whitwell 75312b6555 progs/demos: add fps output to cubemap 2009-08-23 23:53:41 +01:00
Brian Paul a215da5e9c progs/glsl: report compile/link times in shtest.c 2009-08-20 14:43:32 -06:00
Brian Paul f300db379e progs/util: added GetShaderCompile/LinkTime() to get compilation/link times 2009-08-20 14:43:32 -06:00
Brian Paul 8a883d1657 progs/glsl: update multitex.shtest for new texture syntax 2009-08-20 14:43:32 -06:00
Brian Paul 0062bd68b3 progs/glsl: update shtest.c to handle 1D/3D/CUBE/RECT textures 2009-08-20 14:43:32 -06:00
Brian Paul 174054c973 progs/glsl: tweaks to shtest.c
1. Larger sphere to match cube size
2. Allow -geometry option to override window size
3. Cube samplers
2009-08-20 14:43:32 -06:00
Brian Paul 94d14f6cd2 progs/glsl: more comments in shtest.c 2009-08-20 10:52:13 -06:00
Brian Paul 0259a2ad69 progs/xdemos: add multictx to .gitignore 2009-08-19 08:58:38 -06:00
Brian Paul 73fc09a7bf Merge branch 'mesa_7_5_branch' 2009-08-18 17:55:27 -06:00
Chia-I Wu e3734e4685 egl: Make lookup functions static inline.
progs/egl/demo3.c is also changed since it uses an internal function.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-18 08:50:00 -06:00
Brian Paul 680df529a3 demos/glsl: remove glutInitWindowPosition() calls 2009-08-17 17:13:17 -06:00
Pauli Nieminen 57f55af219 mesa: Add 2 new demos to .gitignore. 2009-08-15 13:30:15 -06:00
Brian Paul e8957f4800 progs/demos: print more info in fbotexture.c 2009-08-14 17:30:32 -06:00
Ian Romanick 8b0b33530c demos/cubemap: Add support for GL_ARB_seamless_cube_map 2009-08-14 16:28:51 -07:00
Brian Paul d09a19bf6e Merge branch 'mesa_7_5_branch' 2009-08-14 11:27:51 -06:00
Dave Airlie ceb9459ed5 glsl: re-write Makefile after I called it bad. 2009-08-14 10:05:10 +10:00
Brian Paul 0c717bcd5d progs/glsl: added multitex.shtest config file 2009-08-13 17:03:57 -06:00
Brian Paul 08ecd863ee progs/glsl: set generic vertex attribute values 2009-08-13 17:03:56 -06:00
Brian Paul 62d1132160 progs/glsl: add type field to shtest config files
Plus, texture loading.
2009-08-13 17:03:56 -06:00
Dave Airlie 25cd4dc1d6 glsl/tests: skinning.o
worst Makefile ever. not sure what is going on here, hopefully
this fixes tinderbox
2009-08-14 08:35:49 +10:00
Brian Paul 6d55fd705d progs/tests: hack a PBO/dlist test 2009-08-13 14:07:25 -06:00
Brian Paul 741869d73a progs/util: ignore pre-defined uniforms in SetUniformValues() 2009-08-13 12:53:20 -06:00
Brian Paul ae99e4c67e progs/glsl: new shtest program, a simple shader test harness app
This commit includes some sample config files (*.shtest)
2009-08-13 12:52:13 -06:00
Brian Paul fdfb0d4b0e progs/glsl: change uniform_info::type field to use GLSL vector types 2009-08-12 17:28:45 -06:00
Brian Paul af3d7f6889 demos: call SetUniformValues() 2009-08-12 17:28:45 -06:00
Brian Paul 684049d97d demos: rename InitUniforms() to SetUniformValues()
And call new PrintUniforms() in demos.
2009-08-12 17:28:45 -06:00
Brian Paul 378bff0edd progs/util: added more shader utility functions 2009-08-12 17:28:45 -06:00
Eric Anholt 74504c48ad demos: Fix the VBO usage in glsl/multitex.
The fix for 965 to be noisy when apps sent pointers instead of VBO offsets
caught this app in the act of doing exactly that.

Bug #23203
2009-08-10 15:53:47 -07:00
Robert Ellison 2caec748ad tests: have getprocaddress return a return code
These minor changes allow getprocaddress to return an error code
in the case of test failure.  This allows the program to be integrated
into the piglit test suite.
2009-08-07 12:23:19 -06:00
Robert Ellison 99d5139078 mesa: improve getprocaddress test
- Allow the getprocaddress test to test extensions not supported by
  Mesa.  The original getprocaddress.py script only included OpenGL
  extension functions that were in Mesa dispatch tables.  Now all
  known extension functions (as detailed in gl_API.xml) are included.
  As the test does not link against any extension function symbols
  (i.e. it uses glXGetProcAddress() for all extension functions),
  it still compiles and links against Mesa; but now the same
  binary can be used to test extensions not yet supported by Mesa.

- Extend the list of tested extension functions.  The last revision
  of this test exercised 16 extension functions; this revision adds
  support for 95 more.
2009-08-07 12:06:17 -06:00
Brian Paul c02b38d169 progs/xdemos: added multictx.c (multi-context rendering demo)
Create one window and render into it with two GLX contexts.  Setup the
rendering state differently for each context to be sure there's no state
"bleeding" between contexts.
2009-08-07 09:52:18 -06:00
Brian Paul 84e67330e1 glxgears: make functions static, update comments 2009-08-07 09:50:38 -06:00
Chia-I Wu e179ab2815 progs/egl: Add xeglbindtex, really.
Missed this file in the earlier commit.
2009-08-06 08:40:03 -06:00
Chia-I Wu 246f58d922 progs/egl: Add xeglbindtex.
This is a simple demo for eglBindTexImage.  It uses a OpenGL context,
instead of the required OpenGL ES one.  But it still suffices the demo
and test purpose.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-05 16:08:48 -06:00
Brian Paul 1f71305993 Merge branch 'mesa_7_5_branch'
Conflicts:

	src/mesa/main/state.c
2009-08-05 14:13:48 -06:00
Roland Scheidegger 0abc9e7565 tests: also test xoffset in texcompsub test
use glCompressedTexSubImage2DARB also with xoffset by splitting into 3 calls
in total. Dunno if the top/bottom reversal is intentional but leave as is.
2009-08-05 01:13:21 +02:00
Brian Paul cd7a8225e8 tests/getteximage: test more texture sizes, including npot 2009-08-04 16:17:09 -06:00
Pauli Nieminen fb7cf731f9 xdemo/glxswapcontrol: Move get_framge_usage after the swap.
This fixes the problem that first frame would report bogus usage values.
Problem was caused because get_frame_usage returned data from previous buffer
swap.

Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
2009-08-03 13:42:05 -06:00
Pauli Nieminen b59eb3b8b1 xdemos/glxcontexts: Don't leak visual info when choosing visual again.
Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
2009-08-03 11:55:29 -06:00
Ian Romanick 9f26f801dc progs/vp: Correct the PARAM array sizes in arl-*.txt 2009-07-30 14:08:53 -07:00
Brian Paul 783a93a2c3 tests: glGetTexImage() test 2009-07-30 09:46:57 -06:00
Brian Paul d2f6d6ce49 Merge branch 'mesa_7_5_branch'
Conflicts:

	Makefile
	configs/default
	docs/relnotes.html
	src/mesa/main/version.h
2009-07-28 08:58:25 -06:00
Vinson Lee bc60b88411 progs/trivial: add missing files to Makefile, .gitignore 2009-07-28 08:54:48 -06:00
Brian Paul b96ae1b2c4 Merge branch 'mesa_7_5_branch'
Conflicts:

	Makefile
	progs/glsl/multitex.c
	src/mesa/main/enums.c
	src/mesa/main/state.c
	src/mesa/main/texenvprogram.c
	src/mesa/main/version.h
2009-07-17 22:00:47 -06:00
Brian Paul cd10996d4f progs/util: remove extfuncs.h (we use GLEW instead) 2009-07-17 14:43:29 -06:00
Brian Paul ee0b1bc7d3 progs/glsl: finish conversion to GLEW
This is a follow-on to b799af91d5.
Remove _func function suffix and unneeded #includes.
2009-07-17 13:23:11 -06:00
Chia-I Wu 30bccf8ea9 xeglthreads: Check current context for EGL per-thread support.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-07-17 11:56:32 -06:00
Chia-I Wu 721f80b82a egl: Add xeglthreads
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-07-16 08:29:57 -06:00
Jakob Bornecrantz 26e58a42b0 progs/tests: Use compressed texture in mipmap_comp_tests 2009-07-14 17:11:07 +01:00
Jakob Bornecrantz b0a17581e2 progs/tests: Tests more views in mipmap_comp_tests 2009-07-14 17:11:05 +01:00
Jakob Bornecrantz a36b9987cd progs/tests: Add yet another mipmap test 2009-07-14 17:11:01 +01:00
Brian Paul 9615daa932 Merge branch 'mesa_7_5_branch' 2009-07-13 08:47:37 -06:00
Brian Paul 6ff1a5385e demos: set 4th component of texcoord to 1.0
Avoid potential randomness in resulting texcoords.
2009-07-10 13:09:09 -06:00
Ian Romanick 7fb4becf98 demos: Fix vsync checking in glxgears
Of course glXGetVideoSyncSGI doesn't return the swap interval.  The feature
only exists in the Mesa extension... which is the whole reason I created the
Mesa extension!  Note that the Mesa extension allows drivers to default to a
swap interval of 0.  If the Mesa extension exists, use its value.  Only
consider the SGI extension when the Mesa extension is not available.

Fixes bug #22604.
2009-07-06 11:42:12 -07:00
Brian Paul f742f2c0b3 demos: indentation fix 2009-07-08 13:59:03 -06:00
Brian Paul 820436f978 demos: use glEnable/DisableClientState() for vertex arrays 2009-07-08 13:58:30 -06:00
Jakob Bornecrantz eb33c0ab8b progs/tests: Use compressed texture in mipmap_comp_tests 2009-07-04 16:01:45 +02:00
Jakob Bornecrantz 28471cfa97 Merge branch 'mesa_7_5_branch' 2009-07-04 07:43:01 +02:00
Jakob Bornecrantz 9982821cda progs/tests: Tests more views in mipmap_comp_tests 2009-07-04 07:41:40 +02:00
Zack Rusin edb0267170 Merge commit 'origin/openvg-1.0' 2009-07-06 21:43:26 -04:00
Jakob Bornecrantz 862488075c Merge branch 'mesa_7_5_branch'
Conflicts:
	src/mesa/main/dlist.c
	src/mesa/vbo/vbo_save_api.c
2009-07-03 18:53:58 +02:00
Keith Whitwell f580494bef progs: revert damage to progs/SConscript from recent compressed texture commit 2009-07-03 16:40:03 +01:00
Keith Whitwell 1668a679c4 Merge commit 'origin/dlist-statechange-shortcircuit' into mesa_7_5_branch
Conflicts:
	progs/trivial/Makefile

Pull in a minimal version of statechange shortcircuiting in display
list compilation.  This affects only glMaterial and glShadeModel state,
and includes quite a few tests to exercise various tricky cases.

If this goes well, will consider extending to all state in the future.
2009-07-02 13:29:46 +01:00
Ian Romanick f359165a82 demos: Set the depth mask correctly to get the desired blending 2009-06-30 17:29:52 -07:00
Keith Whitwell 1fa4cde757 mesa/vbo: fix compile and replay of nodes ending in a FALLBACK
Where vbo save nodes are terminated with a call to DO_FALLBACK(), as in
the case of a recursive CallList which is itself within a Begin/End pair,
there two problems:
1) The display list node's primitive information was incorrect, stating
the cut-off prim had zero vertices
2) On replay, we would get confused by a primitive that started in a
node, but was terminated by individual opcodes.

This change fixes the first problem by correctly terminating the last
primitive on fallback, and the second by forcing the display list to
use the Loopback path, converting all nodes into immediate-mode rendering.

The loopback fix is a performance hit, but avoiding this would require
a fairly large rework of this code.
2009-06-30 19:52:44 +01:00
Keith Whitwell c48c01c9e7 progs/trivial: add dlist-mat-tri.c 2009-06-30 18:37:34 +01:00
Keith Whitwell 1ca836f0de progs/trivial: add test case for short-circuiting material changes
Similar to dlist-tri-flat-tri, but using glMaterial calls, which
have the extra property of being legal within Begin/End calls.
2009-06-30 18:17:39 +01:00
Keith Whitwell 09a3a28fc8 progs/trivial: add dlist-flat-tri.c
State-change functions which precede the first call to glEnd() in
a compiled list are vulnerable to not being executed when that list
is called.

In particular this can happen if a list is invoked from within a
begin/end pair, as in this example.
2009-06-30 17:06:50 +01:00
Keith Whitwell 2e570be852 progs/trivial: add dlist-recursive-call
When one display list calls another display list, it is possible
that the calling display list makes state-changes or other actions which
invalidate any attempt at caching or state-change elimination in the
calling list.

This test exercises one such case, where the called list consists of just
a single glShadeModel() call.
2009-06-30 17:02:16 +01:00
Keith Whitwell 1730eaa2a2 dlist-tri-flat-tri: make tri render differently if flatshade not enabled
When testing flat-shading, it helps to specify per-vertex colors so
that you can distinguish between flat & smooth shading.
2009-06-30 16:57:21 +01:00
Keith Whitwell 4147bb24d4 Merge branch 'mesa_7_5_branch' into dlist-statechange-shortcircuit
Need this to pick up fixes for per-vertex materials.
2009-06-30 16:28:54 +01:00
Keith Whitwell 6af783bea0 progs/trivial: add test case for lighting plus per-vertex materials
Exercise material-within-begin/end case.
2009-06-30 16:19:23 +01:00