mesa.git
14 years agoglx: assign per screen driver configs (DRI2)
RALOVICH, Kristóf [Thu, 23 Jul 2009 15:05:43 +0000 (17:05 +0200)]
glx: assign per screen driver configs (DRI2)

14 years agoglx: properly release DRI configs
RALOVICH, Kristóf [Thu, 23 Jul 2009 15:04:52 +0000 (17:04 +0200)]
glx: properly release DRI configs

Release per screen DRI driver configs during screen destruction.

14 years agoglx: cache DRI configs in __GLXscreenConfigsRec
RALOVICH, Kristóf [Thu, 23 Jul 2009 15:03:54 +0000 (17:03 +0200)]
glx: cache DRI configs in __GLXscreenConfigsRec

14 years agoprogs/trivial: add missing files to Makefile, .gitignore
Vinson Lee [Tue, 28 Jul 2009 14:54:14 +0000 (08:54 -0600)]
progs/trivial: add missing files to Makefile, .gitignore

14 years agointel: Fix leak of DRI option info due to using the wrong free routine.
Brian Paul [Mon, 27 Jul 2009 21:32:50 +0000 (15:32 -0600)]
intel: Fix leak of DRI option info due to using the wrong free routine.

(cherry picked from commit 6d66f23c50ebe8f973757b6fd1b81c9b7920c447)

14 years agointel: Clean up leak of driver context structure on context destroy.
Brian Paul [Mon, 27 Jul 2009 21:28:49 +0000 (15:28 -0600)]
intel: Clean up leak of driver context structure on context destroy.

(cherry picked from commit ddef7dc87b2001fbe117ee5f24a0c645ee95a03c)

14 years agost/mesa: silence warning
Brian Paul [Mon, 27 Jul 2009 21:10:28 +0000 (15:10 -0600)]
st/mesa: silence warning

14 years agomesa: separate some finite/pragma Watcom stuff
Brian Paul [Mon, 27 Jul 2009 21:09:56 +0000 (15:09 -0600)]
mesa: separate some finite/pragma Watcom stuff

14 years agosoftpipe: include sp_winsys.h to silence function prototype warning
Brian Paul [Mon, 27 Jul 2009 21:08:44 +0000 (15:08 -0600)]
softpipe: include sp_winsys.h to silence function prototype warning

14 years agointel: Use _mesa_warning() to report GEM warnings
Brian Paul [Mon, 27 Jul 2009 20:35:18 +0000 (14:35 -0600)]
intel: Use _mesa_warning() to report GEM warnings

14 years agowindows: updated VC8 project files
Karl Schultz [Mon, 27 Jul 2009 19:38:35 +0000 (13:38 -0600)]
windows: updated VC8 project files

See bug 22882.

14 years agodocs: 7.5 tarball md5sums
Brian Paul [Fri, 17 Jul 2009 22:58:27 +0000 (16:58 -0600)]
docs: 7.5 tarball md5sums

14 years agoutil: fix typo.
José Fonseca [Sun, 26 Jul 2009 19:31:11 +0000 (20:31 +0100)]
util: fix typo.

14 years agomesa: include glew headers in MesaDemos tarballs
Brian Paul [Fri, 24 Jul 2009 02:20:39 +0000 (20:20 -0600)]
mesa: include glew headers in MesaDemos tarballs

14 years agodocs: initial release notes for 7.5.1
Brian Paul [Wed, 22 Jul 2009 18:49:34 +0000 (12:49 -0600)]
docs: initial release notes for 7.5.1

14 years agomesa: bump version to 7.5.1
Brian Paul [Wed, 22 Jul 2009 18:46:53 +0000 (12:46 -0600)]
mesa: bump version to 7.5.1

14 years agomesa: include GLEW sources in MesaDemos tarball
Brian Paul [Wed, 22 Jul 2009 18:34:07 +0000 (12:34 -0600)]
mesa: include GLEW sources in MesaDemos tarball

14 years agointel: Fall back on glBitmap with fog enabled.
Eric Anholt [Fri, 3 Jul 2009 02:21:22 +0000 (19:21 -0700)]
intel: Fall back on glBitmap with fog enabled.

We would have to build the program with the appropriate fog mode, and
also supply the fog coordinate if appropriate.

Bug #19413.
(cherry picked from commit 8ae02a3919bf31bd33f86208472e100eedb58497)

14 years agoi965: Don't clip everything if FRONT_AND_BACK culling while culling disabled.
Eric Anholt [Tue, 21 Jul 2009 00:58:12 +0000 (17:58 -0700)]
i965: Don't clip everything if FRONT_AND_BACK culling while culling disabled.

Fixes everything-black with meta_clear_tris on quake4-mpdemo and doom3-demo.

Bug #18844, 22077.
(cherry picked from commit 81d555068408d4343d7627c8bedda5675f09bd21)

14 years agoradeon: With DRI1, if we have HW stencil, only expose fbconfigs with stencil.
Michel Dänzer [Mon, 20 Jul 2009 18:26:28 +0000 (20:26 +0200)]
radeon: With DRI1, if we have HW stencil, only expose fbconfigs with stencil.

Otherwise simple apps like glxgears pick up a DirectColor visual since the X
server mixes the depth 32 visual in with the other GLX visuals, and this seems
to result in a (mostly) black screen due to a bad ColorMap for a lot of people.

The bad ColorMap may be a bug in the apps, the X server or X driver, and
regardless of that I think the X server should ideally make the depth 32 GLX
visual separate from the rest again, but in the meantime this makes us cope.

(depth_bits is either 16 or 24, never 0)

14 years agoprogs/util: remove extfuncs.h (we use GLEW instead)
Brian Paul [Fri, 17 Jul 2009 20:43:29 +0000 (14:43 -0600)]
progs/util: remove extfuncs.h (we use GLEW instead)

14 years agoprogs/glsl: finish conversion to GLEW
Brian Paul [Fri, 17 Jul 2009 19:23:11 +0000 (13:23 -0600)]
progs/glsl: finish conversion to GLEW

This is a follow-on to b799af91d5ffbee1481161fec29eb4c92b161272.
Remove _func function suffix and unneeded #includes.

14 years agomesa: set version to 7.5
Brian Paul [Fri, 17 Jul 2009 18:40:48 +0000 (12:40 -0600)]
mesa: set version to 7.5

14 years agomesa: set version to 7.5
Brian Paul [Fri, 17 Jul 2009 18:40:44 +0000 (12:40 -0600)]
mesa: set version to 7.5

14 years agodocs: set date for 7.5 release
Brian Paul [Fri, 17 Jul 2009 18:40:24 +0000 (12:40 -0600)]
docs: set date for 7.5 release

14 years agodocs: news entry for 7.5 release
Brian Paul [Fri, 17 Jul 2009 15:40:45 +0000 (09:40 -0600)]
docs: news entry for 7.5 release

14 years agodocs: update links to Gallium wiki page on freedesktop.org
Brian Paul [Fri, 17 Jul 2009 15:40:28 +0000 (09:40 -0600)]
docs: update links to Gallium wiki page on freedesktop.org

14 years agopython/retrace: Process the call no passed to --to option inclusively.
José Fonseca [Thu, 16 Jul 2009 18:34:44 +0000 (19:34 +0100)]
python/retrace: Process the call no passed to --to option inclusively.

14 years agopython/retrace: Dump the surface copy contents.
José Fonseca [Thu, 16 Jul 2009 18:32:40 +0000 (19:32 +0100)]
python/retrace: Dump the surface copy contents.

14 years agopython/retrace: Flush stdout before calling the pipe driver.
José Fonseca [Thu, 16 Jul 2009 18:31:36 +0000 (19:31 +0100)]
python/retrace: Flush stdout before calling the pipe driver.

So that messages are in sync with stderr.

14 years agomesa: Fix logbase2.
José Fonseca [Thu, 16 Jul 2009 18:20:25 +0000 (19:20 +0100)]
mesa: Fix logbase2.

It was providing 1 too many for non power two values.

14 years agopython: Hack to prevent segmentation faults when python exits.
José Fonseca [Thu, 16 Jul 2009 10:21:12 +0000 (11:21 +0100)]
python: Hack to prevent segmentation faults when python exits.

14 years agowgl: Expose pipe_screen/pipe_context via an extension.
José Fonseca [Thu, 16 Jul 2009 10:20:12 +0000 (11:20 +0100)]
wgl: Expose pipe_screen/pipe_context via an extension.

14 years agopython: Obtain pipe_screen/pipe_context from the system's OpenGL driver.
José Fonseca [Thu, 16 Jul 2009 10:19:06 +0000 (11:19 +0100)]
python: Obtain pipe_screen/pipe_context from the system's OpenGL driver.

14 years agosoftpipe: limit blend results to [0,1]
Luca Barbieri [Wed, 15 Jul 2009 17:34:36 +0000 (11:34 -0600)]
softpipe: limit blend results to [0,1]

14 years agoFix state flag dependencies for fixed function fragment program updates.
Brian Paul [Wed, 15 Jul 2009 17:12:05 +0000 (11:12 -0600)]
Fix state flag dependencies for fixed function fragment program updates.

I started looking into why _NEW_ARRAY punishes us, and while annotating
dependencies noticed that a bunch of dependencies were missing.

(cherry picked from master, commit e5f63c403b767f9974e8eb5d412c012b8a69287f)

14 years agopython/retrace: Interpret surface_copy.
José Fonseca [Wed, 15 Jul 2009 14:37:27 +0000 (15:37 +0100)]
python/retrace: Interpret surface_copy.

14 years agopython/samples: Use PIPE_FORMAT_Z16_UNORM instead of PIPE_FORMAT_Z32_UNORM.
José Fonseca [Wed, 15 Jul 2009 14:37:04 +0000 (15:37 +0100)]
python/samples: Use PIPE_FORMAT_Z16_UNORM instead of PIPE_FORMAT_Z32_UNORM.

More common. True fix would be to use whatever the screen supports though.

14 years agomesa: recognize and eliminate repeated error messages
Keith Whitwell [Wed, 15 Jul 2009 12:29:58 +0000 (13:29 +0100)]
mesa: recognize and eliminate repeated error messages

14 years agomesa: split out errorstring switch from _mesa_error
Keith Whitwell [Tue, 14 Jul 2009 15:28:08 +0000 (16:28 +0100)]
mesa: split out errorstring switch from _mesa_error

Move a chunk of code out of _mesa_error()

14 years agomesa: remove dead code in _mesa_error
Keith Whitwell [Tue, 14 Jul 2009 15:25:59 +0000 (16:25 +0100)]
mesa: remove dead code in _mesa_error

Remove early and unused snprintf and where[] string.

14 years agomesa: don't call getenv every time _mesa_error is called
Keith Whitwell [Tue, 14 Jul 2009 15:23:04 +0000 (16:23 +0100)]
mesa: don't call getenv every time _mesa_error is called

Buggy apps can generate thousands of mesa_error calls.  Don't need
to keep calling getenv to retreive the same MESA_DEBUG string each
time.

14 years agomesa: fix texture border color code for glPopAttrib()
Brian Paul [Tue, 14 Jul 2009 20:26:42 +0000 (14:26 -0600)]
mesa: fix texture border color code for glPopAttrib()

The texture object's border color used to be stored as GLchan but it's
been GLfloat for a while now.

14 years agoprogs/tests: Use compressed texture in mipmap_comp_tests
Jakob Bornecrantz [Sat, 4 Jul 2009 14:01:45 +0000 (16:01 +0200)]
progs/tests: Use compressed texture in mipmap_comp_tests

14 years agoprogs/tests: Tests more views in mipmap_comp_tests
Jakob Bornecrantz [Sat, 4 Jul 2009 05:40:34 +0000 (07:40 +0200)]
progs/tests: Tests more views in mipmap_comp_tests

14 years agoprogs/tests: Add yet another mipmap test
Jakob Bornecrantz [Sat, 13 Jun 2009 23:04:00 +0000 (01:04 +0200)]
progs/tests: Add yet another mipmap test

14 years agomesa: regenerated enums.c file
Brian Paul [Tue, 14 Jul 2009 13:58:22 +0000 (07:58 -0600)]
mesa: regenerated enums.c file

14 years agoscons: Monkey patch os.spawnve on Windows to become thread safe.
José Fonseca [Tue, 14 Jul 2009 10:09:23 +0000 (11:09 +0100)]
scons: Monkey patch os.spawnve on Windows to become thread safe.

See also:
- http://bugs.python.org/issue6476
- http://scons.tigris.org/issues/show_bug.cgi?id=2449

14 years agomesa: Report the true face number when flushing.
José Fonseca [Tue, 7 Jul 2009 16:56:12 +0000 (17:56 +0100)]
mesa: Report the true face number when flushing.

14 years agor128: fix two-sided lighting segfault seen in GLUT's olight demo
Peteri Andras [Mon, 13 Jul 2009 14:03:16 +0000 (08:03 -0600)]
r128: fix two-sided lighting segfault seen in GLUT's olight demo

14 years agointel: Bump driver data, add RC3 tag
Ian Romanick [Mon, 13 Jul 2009 04:07:38 +0000 (21:07 -0700)]
intel: Bump driver data, add RC3 tag

14 years agogallium: compare the actual register, not all the inputs
Zack Rusin [Sat, 11 Jul 2009 17:48:41 +0000 (13:48 -0400)]
gallium: compare the actual register, not all the inputs

otherwise we decrement indexes for all registers

14 years agotgsi: update some assertions
Brian Paul [Fri, 10 Jul 2009 22:26:09 +0000 (16:26 -0600)]
tgsi: update some assertions

14 years agotgsi: tgsi: add semantic_names[] string for TGSI_SEMANTIC_FACE
Brian Paul [Fri, 10 Jul 2009 21:44:48 +0000 (15:44 -0600)]
tgsi: tgsi: add semantic_names[] string for TGSI_SEMANTIC_FACE

Same story as in the tgsi_dump.c code (see prev commit).

14 years agotgsi: add semantic_names[] string for TGSI_SEMANTIC_FACE
Brian Paul [Fri, 10 Jul 2009 21:41:26 +0000 (15:41 -0600)]
tgsi: add semantic_names[] string for TGSI_SEMANTIC_FACE

Fixes TGSI dump output when front/back-face register is declared.

Also, add some assertions to make sure the semantic/interpolate string
arrays have as many elements as there are tokens in the p_shader_tokens.h
file.  That should catch problems like this in the future.

14 years agost/mesa: implement indirect addressing for destination registers
Brian Paul [Fri, 10 Jul 2009 19:07:45 +0000 (13:07 -0600)]
st/mesa: implement indirect addressing for destination registers

14 years agotgis: implement indirect addressing for destination registers
Brian Paul [Fri, 10 Jul 2009 19:07:16 +0000 (13:07 -0600)]
tgis: implement indirect addressing for destination registers

Includes the TGSI interpreter, but not the SSE/PPC/etc code generators.

14 years agovbo: fix vbo/dlist memory leak
Brian Paul [Fri, 10 Jul 2009 18:55:30 +0000 (12:55 -0600)]
vbo: fix vbo/dlist memory leak

Based on a patch by kristof.ralovich@gmail.com

14 years agodemos: set 4th component of texcoord to 1.0
Brian Paul [Thu, 9 Jul 2009 19:59:03 +0000 (13:59 -0600)]
demos: set 4th component of texcoord to 1.0

Avoid potential randomness in resulting texcoords.

14 years agoRemove stale reference to non-Gallium nouveau driver from configure.ac.
Michel Dänzer [Fri, 10 Jul 2009 12:49:46 +0000 (14:49 +0200)]
Remove stale reference to non-Gallium nouveau driver from configure.ac.

14 years agomesa: From float type modifier from values to large for singles
Ian Romanick [Tue, 23 Jun 2009 01:22:51 +0000 (18:22 -0700)]
mesa: From float type modifier from values to large for singles

The values 2147483648.0 and 4294967294.0 are too larget to be stored in single
precision floats.  Forcing these to be singles causes bits to be lost, which
results in errors in some pixel transfer tests.

This fixes bug #22344.
(cherry picked from commit 70e72070fce6aa1e0918dcc62c1949465cee69f7)

14 years agodocs: document gl_TextureMatrix[i][j] array indexing bug fix
Brian Paul [Thu, 9 Jul 2009 14:04:07 +0000 (08:04 -0600)]
docs: document gl_TextureMatrix[i][j] array indexing bug fix

14 years agoglsl: do const parameter optimization for array element actual parameters
Brian Paul [Thu, 9 Jul 2009 13:58:50 +0000 (07:58 -0600)]
glsl: do const parameter optimization for array element actual parameters

When a function parameter is const-qualified we can avoid making a copy
of the actual parameter (we basically do a search/replace when inlining).
This is now done for array element params too, resulting in better code
(fewer MOV instructions).

We should allow some other types of function arguments here but let's be
conservative for the moment.

14 years agoglsl: fix incorrect indexing for gl_TextureMatrix[i][j]
Brian Paul [Thu, 9 Jul 2009 13:57:29 +0000 (07:57 -0600)]
glsl: fix incorrect indexing for gl_TextureMatrix[i][j]

The two indexes were mixed up when accessing a row of a matrix in an array
of matrices.

14 years agodocs: document glMaterial/glShadeModel display list optimization
Brian Paul [Wed, 8 Jul 2009 20:14:03 +0000 (14:14 -0600)]
docs: document glMaterial/glShadeModel display list optimization

14 years agomesa: only use fallback texture when using shaders, not fixed-function (take two)
Brian Paul [Tue, 5 May 2009 22:21:20 +0000 (16:21 -0600)]
mesa: only use fallback texture when using shaders, not fixed-function (take two)

The semantics are a little different for shaders vs. fixed-function when
trying to use an incomplete texture.  The fallback texture returning
(0,0,0,1) should only be used with shaders.  For fixed function, the texture
unit is truly disabled/ignored.

Fixes glean fbo test regression.
(cherry picked from commit 01e16befd4809e3e93ee7855a4a5d7df9fe010d9)
(cherry picked from commit 51325f44d1e7e62b47795a79f8038d10dc5bc30b)
[anholt: squashed these two together from master, skipping the mess in between]

14 years agogallium: fixup register indexes for fog/frontface/point coord
Zack Rusin [Tue, 7 Jul 2009 19:48:50 +0000 (12:48 -0700)]
gallium: fixup register indexes for fog/frontface/point coord

14 years agogallium: Fixes for clobbering stencil values in combined depth/stencil textures.
Michel Dänzer [Tue, 7 Jul 2009 12:49:52 +0000 (14:49 +0200)]
gallium: Fixes for clobbering stencil values in combined depth/stencil textures.

Also fix one case where a 32 bit depth value was incorrectly converted to a
combined depth/stencil value.

14 years agoGLX/DRI1: Mark GLX visuals with depth != screen depth non-conformant.
Michel Dänzer [Tue, 7 Jul 2009 11:52:35 +0000 (13:52 +0200)]
GLX/DRI1: Mark GLX visuals with depth != screen depth non-conformant.

Such visuals are subject to automatic compositing in the X server, so DRI1
can't render to them properly.

14 years agogallium: Only set FRONT_STATUS_COPY_OF_BACK if there is a back buffer.
Michel Dänzer [Tue, 7 Jul 2009 10:17:04 +0000 (12:17 +0200)]
gallium: Only set FRONT_STATUS_COPY_OF_BACK if there is a back buffer.

Fixes potential crash when SwapBuffers is called but there's no back buffer.

14 years agogallium: more fog extraction fixes
Zack Rusin [Tue, 7 Jul 2009 01:33:56 +0000 (21:33 -0400)]
gallium: more fog extraction fixes

fix the cases when fog coord/front face/point coord are used in the same
shader.

14 years agodemos: Fix vsync checking in glxgears
Ian Romanick [Mon, 6 Jul 2009 18:36:17 +0000 (11:36 -0700)]
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.

14 years agowgl: Make the stw_framebuffer destructions threadsafe.
José Fonseca [Mon, 6 Jul 2009 17:23:37 +0000 (18:23 +0100)]
wgl: Make the stw_framebuffer destructions threadsafe.

Ensure no other thread is accessing a framebuffer when it is being destroyed by
acquiring both the global and per-framebuffer mutexes. Normal access only
needs the global lock to walk the linked list and acquire the per-framebuffer
mutex.

14 years agowgl: Check for multiple threads before GET_CURRENT_CONTEXT.
José Fonseca [Mon, 6 Jul 2009 16:40:08 +0000 (17:40 +0100)]
wgl: Check for multiple threads before GET_CURRENT_CONTEXT.

Fixes wglthreads -- the 2nd thread MakeCurrent call was trying to flush
the first thread context while still in use.

14 years agowgl: Listen to WM_WINDOWPOSCHANGED instead of WM_SIZE messages.
José Fonseca [Mon, 6 Jul 2009 16:08:37 +0000 (17:08 +0100)]
wgl: Listen to WM_WINDOWPOSCHANGED instead of WM_SIZE messages.

According to
http://blogs.msdn.com/oldnewthing/archive/2008/01/15/7113860.aspx
WM_SIZE is generated from WM_WINDOWPOSCHANGED by DefWindowProc so it
can be masked out by the application.

Also there were some weird bogus WM_SIZE 0x0 messages when starting
sharedtex_mt which we don't get like this.

14 years agoi965: fix fetching constants from constant buffer in glsl path
Roland Scheidegger [Fri, 26 Jun 2009 18:38:07 +0000 (20:38 +0200)]
i965: fix fetching constants from constant buffer in glsl path

the driver used to overwrite grf0 then use implicit move by send instruction
to move contents of grf0 to mrf1. However, we must not overwrite grf0 since
it's still used later for fb write.
Instead, do the move directly do mrf1 (we could use implicit move from another
grf reg to mrf1 but since we need a mov to encode the data anyway it doesn't
seem to make sense).
I think the dp_READ/WRITE_16 functions may suffer from the same issue.
While here also remove unnecessary msg_reg_nr parameter from the dataport
functions since always message register 1 is used.

14 years agoi965: Remove bad constant buffer constant-reg-already-loaded optimization.
Eric Anholt [Thu, 7 May 2009 04:44:13 +0000 (21:44 -0700)]
i965: Remove bad constant buffer constant-reg-already-loaded optimization.

Thanks to branching, the state of c->current_const[i].index at the point
of emitting constant loads for this instruction may not match the actual
constant currently loaded in the reg at runtime.  Fixes a regression in my
GLSL program for idr's class since b58b3a786aa38dcc9d72144c2cc691151e46e3d5.

14 years agointel: Also update stencil bits in intel_update_wrapper().
Michel Dänzer [Fri, 3 Jul 2009 15:50:15 +0000 (17:50 +0200)]
intel: Also update stencil bits in intel_update_wrapper().

Fixes assertion failure when binding depth/stencil texture to FBO stencil
attachment.

14 years agoprogs: revert damage to progs/SConscript from recent compressed texture commit
Keith Whitwell [Fri, 3 Jul 2009 15:40:03 +0000 (16:40 +0100)]
progs: revert damage to progs/SConscript from recent compressed texture commit

14 years agomesa/shaders: fix gl_NormalMatrix state parameters
Keith Whitwell [Fri, 3 Jul 2009 13:26:26 +0000 (14:26 +0100)]
mesa/shaders: fix gl_NormalMatrix state parameters

gl_NormalMatrix is the inverse transpose of the modelview matrix, but
as every matrix here needs to be transposed, we end up with
{MODELVIEW_MATRIX, INVERSE}.

14 years agost/wgl: don't advertise WGL_EXT_swap_interval string
Keith Whitwell [Fri, 3 Jul 2009 09:37:14 +0000 (10:37 +0100)]
st/wgl: don't advertise WGL_EXT_swap_interval string

This is a tweak to a previous fix -- it's not necessary to actually
advertise this extension to prevent these games from crashing -- they
ignore the extension string anyway. It's sufficient to just have
GetProcAddress return some dummy function addresses for SwapInterval.

Given we don't really implement this funcitonality, this is a better
fix.

14 years agowgl: Lookup framebuffers by HWND whenever possible.
José Fonseca [Fri, 3 Jul 2009 13:21:55 +0000 (14:21 +0100)]
wgl: Lookup framebuffers by HWND whenever possible.

Some applications create several HDCs for the same window, so spite the WGL
API is geared towards HDCs it is not reliable searching by HDC.

14 years agomesa: Assume depth textures have a single level unless told otherwise.
José Fonseca [Thu, 2 Jul 2009 16:24:25 +0000 (17:24 +0100)]
mesa: Assume depth textures have a single level unless told otherwise.

14 years agomesa: s/TRUE/GL_TRUE
Keith Whitwell [Thu, 2 Jul 2009 13:43:16 +0000 (14:43 +0100)]
mesa: s/TRUE/GL_TRUE

Fix compile breakage on Linux.

14 years agoglapi: ensure _mesa_lookup_prim_by_nr() is not clobbered on regeneration
Keith Whitwell [Thu, 2 Jul 2009 12:28:20 +0000 (13:28 +0100)]
glapi: ensure _mesa_lookup_prim_by_nr() is not clobbered on regeneration

Propogate changes to enums.c back up to the python source.

14 years agoMerge commit 'origin/dlist-statechange-shortcircuit' into mesa_7_5_branch
Keith Whitwell [Thu, 2 Jul 2009 12:29:46 +0000 (13:29 +0100)]
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.

14 years agomesa: ensure UsesFogFragCoord value is set for non-glsl shaders
Keith Whitwell [Thu, 2 Jul 2009 10:28:56 +0000 (11:28 +0100)]
mesa: ensure UsesFogFragCoord value is set for non-glsl shaders

With recent changes to support frontfacing in glsl, it is necessary
to ensure that the UsesFogFragCoord value is accurate in all shaders.
We were previously not setting it for fixed-function and ARB_fs shaders.

14 years agomesa/vbo: fix compile and replay of nodes ending in a FALLBACK
Keith Whitwell [Tue, 30 Jun 2009 18:52:44 +0000 (19:52 +0100)]
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.

14 years agomesa/dlist: fixes and improvements for material caching
Keith Whitwell [Tue, 30 Jun 2009 17:40:20 +0000 (18:40 +0100)]
mesa/dlist: fixes and improvements for material caching

Only short-circuit material call if *all* statechanges from this call
are cached.  Some material calls (eg with FRONT_AND_BACK) change more
than one piece of state -- need to check all of them before returning.

Also, Material calls are legal inside begin/end pairs, so don't need
to be as careful about begin/end state as with regular statechanges
(like ShadeModel) when caching.  Take advantage of this and do better
caching.

14 years agoprogs/trivial: add dlist-mat-tri.c
Keith Whitwell [Tue, 30 Jun 2009 17:35:17 +0000 (18:35 +0100)]
progs/trivial: add dlist-mat-tri.c

14 years agoprogs/trivial: add test case for short-circuiting material changes
Keith Whitwell [Tue, 30 Jun 2009 17:17:39 +0000 (18:17 +0100)]
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.

14 years agomesa/dlist: don't cache state which may not be replayed on CallList
Keith Whitwell [Tue, 30 Jun 2009 16:10:56 +0000 (17:10 +0100)]
mesa/dlist: don't cache state which may not be replayed on CallList

Statechanges which occur before the first End in a display list may
not be replayed when the list is called, in particular if it is called
from within a begin/end pair.

Recognize vulnerable statechanges and do not use them to fill in the
state cache.

14 years agoprogs/trivial: add dlist-flat-tri.c
Keith Whitwell [Tue, 30 Jun 2009 16:06:50 +0000 (17:06 +0100)]
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.

14 years agomesa/dlist: invalidate cached dlist compile state after CallList
Keith Whitwell [Tue, 30 Jun 2009 16:04:11 +0000 (17:04 +0100)]
mesa/dlist: invalidate cached dlist compile state after CallList

When compiling a display list containing a CallList, it is necessary to
invalidate any assumption about the GL state after the recursive call
completes.

14 years agoprogs/trivial: add dlist-recursive-call
Keith Whitwell [Tue, 30 Jun 2009 16:02:16 +0000 (17:02 +0100)]
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.

14 years agodlist-tri-flat-tri: make tri render differently if flatshade not enabled
Keith Whitwell [Tue, 30 Jun 2009 15:57:21 +0000 (16:57 +0100)]
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.

14 years agoMerge branch 'mesa_7_5_branch' into dlist-statechange-shortcircuit
Keith Whitwell [Tue, 30 Jun 2009 15:28:37 +0000 (16:28 +0100)]
Merge branch 'mesa_7_5_branch' into dlist-statechange-shortcircuit

Need this to pick up fixes for per-vertex materials.

14 years agoprogs/trivial: add test case for lighting plus per-vertex materials
Keith Whitwell [Tue, 30 Jun 2009 15:19:23 +0000 (16:19 +0100)]
progs/trivial: add test case for lighting plus per-vertex materials

Exercise material-within-begin/end case.

14 years agoprogs/isosurf: add materials mode for glVertex + TRISTRIP
Keith Whitwell [Mon, 1 Jun 2009 02:07:21 +0000 (19:07 -0700)]
progs/isosurf: add materials mode for glVertex + TRISTRIP

14 years agomesa: remove whitespace
Keith Whitwell [Mon, 1 Jun 2009 02:04:06 +0000 (19:04 -0700)]
mesa: remove whitespace