Zack Rusin [Tue, 23 Jun 2009 23:12:46 +0000 (19:12 -0400)]
gallium: rearrange some members to avoid memory holes/padding
plus it saves us a cacheline in the cso
Zack Rusin [Sun, 21 Jun 2009 01:36:40 +0000 (21:36 -0400)]
pipebuffer: handle possible null pointer dereference
reported by clang static analyzer
Zack Rusin [Sun, 21 Jun 2009 01:25:47 +0000 (21:25 -0400)]
cso: possible null pointer dereference
reported by clang static analyzer
Zack Rusin [Sun, 21 Jun 2009 01:19:57 +0000 (21:19 -0400)]
util: fix possible null pointer usage
found by the clang static analyzer
Zack Rusin [Mon, 8 Jun 2009 04:07:04 +0000 (00:07 -0400)]
exa: some infrastucture work for accelerating composite
Dave Airlie [Mon, 6 Jul 2009 10:35:15 +0000 (20:35 +1000)]
radeon: ensure cmdbuf space for state + AOS is available
The problem is if we find out later we don't have any cmdbuf space but
we've already written the arrays to the DMA buffer object, we end up
emitting the current cmdbuf which has references to the current DMA object
we then send that to the hw and we can't reference the arrays we just emitted
to the old DMA buffer. things go bad, crash boom.
This can probably be tuned further + swtcl probably needs some fixes
Dave Airlie [Mon, 6 Jul 2009 07:46:36 +0000 (17:46 +1000)]
r200: fix makefile
Dave Airlie [Mon, 6 Jul 2009 05:50:24 +0000 (15:50 +1000)]
radeon: fixup FBO depth 24 allocations to avoid assert
Dave Airlie [Mon, 6 Jul 2009 04:15:00 +0000 (14:15 +1000)]
radeon/r200/r300: port to new space checking code in libdrm
This moves a big chunk of the space checking code into libdrm so
it can be shared by the DDX.
Corbin Simpson [Sun, 5 Jul 2009 18:56:40 +0000 (11:56 -0700)]
radeon-gallium: Compile warning fix.
Fixes flush during validation, in case a buffer is double-validated.
Corbin Simpson [Sun, 5 Jul 2009 18:55:47 +0000 (11:55 -0700)]
radeon-gallium: Use FLINK to do proper global buffers.
Corbin Simpson [Sun, 5 Jul 2009 18:29:13 +0000 (11:29 -0700)]
radeon-gallium: Wait for BOs before mapping them.
Maciej Cencora [Mon, 29 Jun 2009 17:50:39 +0000 (19:50 +0200)]
r300: fix vertex limits
- don't limit vertex count if we are using indices
- max indices count is 65535 not 65536
- remove some comments that don't apply anymore
- remove unreachable code
Jakob Bornecrantz [Fri, 3 Jul 2009 16:53:58 +0000 (18:53 +0200)]
Merge branch 'mesa_7_5_branch'
Conflicts:
src/mesa/main/dlist.c
src/mesa/vbo/vbo_save_api.c
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.
Keith Whitwell [Fri, 3 Jul 2009 15:40:03 +0000 (16:40 +0100)]
progs: revert damage to progs/SConscript from recent compressed texture commit
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}.
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.
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.
Michel Dänzer [Fri, 3 Jul 2009 10:44:19 +0000 (12:44 +0200)]
radeon: Wait for BO idle if necessary before mapping it.
Fixes fighting between GPU and software rendering with TTM.
Michel Dänzer [Fri, 3 Jul 2009 10:44:02 +0000 (12:44 +0200)]
r300: Guard debugging output.
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.
Eric Anholt [Fri, 3 Jul 2009 01:02:44 +0000 (18:02 -0700)]
intel: Flush when mapping buffer objects so writes don't get reordered.
While GEM covers this for execution it knows about, it doesn't know about
the batchbuffer we're preparing. Fixes piglit vbo-map-remap.c testcase.
Corbin Simpson [Thu, 2 Jul 2009 23:31:24 +0000 (16:31 -0700)]
vbo: If MapBufferRange fails, try MapBuffer instead.
Fixes segfaults with radeon winsys.
(Probably libdrm_radeon doing something that it shouldn't.)
Corbin Simpson [Thu, 2 Jul 2009 16:21:56 +0000 (09:21 -0700)]
Nuke old trace-drm integration.
AFAICT nobody will miss it.
Eric Anholt [Thu, 2 Jul 2009 20:30:20 +0000 (13:30 -0700)]
intel: Fix leak of DRI option info due to using the wrong free routine.
Eric Anholt [Thu, 2 Jul 2009 20:19:11 +0000 (13:19 -0700)]
intel: Clean up leak of driver context structure on context destroy.
Eric Anholt [Thu, 2 Jul 2009 00:08:16 +0000 (17:08 -0700)]
intel: Init num_fences to clean up valgrind warning.
Valgrind doesn't know that a successful getparam sets the target of the
pointer, so just set the value beforehand.
José Fonseca [Thu, 2 Jul 2009 16:24:25 +0000 (17:24 +0100)]
mesa: Assume depth textures have a single level unless told otherwise.
Keith Whitwell [Thu, 2 Jul 2009 13:43:16 +0000 (14:43 +0100)]
mesa: s/TRUE/GL_TRUE
Fix compile breakage on Linux.
Jakob Bornecrantz [Thu, 2 Jul 2009 13:05:51 +0000 (15:05 +0200)]
r300g: Readd trace driver support
Jakob Bornecrantz [Thu, 2 Jul 2009 13:05:17 +0000 (15:05 +0200)]
i915g: Readd trace driver support
Jakob Bornecrantz [Thu, 2 Jul 2009 12:57:55 +0000 (14:57 +0200)]
trace: Add drm api integration
This is okay since drm_api.h doesn't have any external
dependancies, one could make it only compile on platforms
that support drm.
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.
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.
Dave Airlie [Thu, 2 Jul 2009 10:57:45 +0000 (20:57 +1000)]
radeon/r200/r300: drop radeon renderbuffer private width/height
half stealing the code without taking the intel regions
Dave Airlie [Thu, 2 Jul 2009 10:44:30 +0000 (20:44 +1000)]
radeon/r300: use base width/height.
I suspect this might break TFP in some way but it makes firecube run here
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.
Xiang, Haihao [Thu, 2 Jul 2009 08:32:19 +0000 (16:32 +0800)]
i965: fixes for JMPI
1. the data type of <src1> (JMPI offset) must be D
2. execution size must be 1
3. NoMask
4. instruction compression isn't allowed.
Corbin Simpson [Thu, 2 Jul 2009 06:25:47 +0000 (23:25 -0700)]
r300g: Fix recursive Draw flush.
Also just noticed that demos/copypix walks around the overlapping blit rules.
Bad, bad Mesa. :3
Corbin Simpson [Thu, 2 Jul 2009 06:09:18 +0000 (23:09 -0700)]
r300g: Use floats for surface_copy texcoords, use correct src and dest.
This makes demos/copypix better-looking. Horizontal dimensions are right now.
Corbin Simpson [Thu, 2 Jul 2009 05:33:17 +0000 (22:33 -0700)]
radeon-gallium: Adapt to drm_api changes.
Note that trace debugging is temporarily gone. I'll rework it later.
Eric Anholt [Wed, 1 Jul 2009 05:57:56 +0000 (22:57 -0700)]
intel: Avoid pointer arithmetic on void *.
Bug #22000.
Eric Anholt [Tue, 30 Jun 2009 21:26:06 +0000 (14:26 -0700)]
i965: Increase G4X default VS URB allocation to actually allow 32 threads.
This improves the performance of my GLSL demo by 30%. It also fixes the
VS deadlock that ut2004 had, for reasons I can't explain. Bug #21330.
Ian Romanick [Wed, 1 Jul 2009 00:29:14 +0000 (17:29 -0700)]
demos: Set the depth mask correctly to get the desired blending
Ben Skeggs [Tue, 30 Jun 2009 23:15:51 +0000 (09:15 +1000)]
nouveau: return some supported zeta formats
Ben Skeggs [Tue, 30 Jun 2009 22:56:46 +0000 (08:56 +1000)]
nouveau: deal with PIPE_CAP_TGSI_CONT_SUPPORTED
Ben Skeggs [Tue, 30 Jun 2009 22:50:24 +0000 (08:50 +1000)]
nouveau: fix build...
Jakob Bornecrantz [Tue, 30 Jun 2009 23:16:56 +0000 (01:16 +0200)]
drm/st: Remove drm_api struct from drivers
Remove the drm_api from the functions in the softpipe and
i915simple drivers. Create wrapper functions in the
backends instead.
Brian Paul [Tue, 30 Jun 2009 23:12:34 +0000 (17:12 -0600)]
i965: first attempt at handling URB overflow when there's too many vs outputs
If we can't fit all the VS outputs into the MRF, we need to overflow into
temporary GRF registers, then use some MOVs and a second brw_urb_WRITE()
instruction to place the overflow vertex results into the URB.
This is hit when a vertex/fragment shader pair has a large number of varying
variables (12 or more).
There's still something broken here, but it seems close...
Brian Paul [Tue, 30 Jun 2009 23:08:40 +0000 (17:08 -0600)]
i965: use BRW_MAX_MRF
Brian Paul [Tue, 30 Jun 2009 22:36:11 +0000 (16:36 -0600)]
i965: use BRW_MAX_GRF, BRW_MAX_MRF
Brian Paul [Tue, 30 Jun 2009 22:35:23 +0000 (16:35 -0600)]
i965: move BRW_MAX_GRF, define BRW_MAX_MRF
Brian Paul [Tue, 30 Jun 2009 22:33:09 +0000 (16:33 -0600)]
i965: defined BRW_MAX_MRF
Brian Paul [Tue, 30 Jun 2009 21:36:42 +0000 (15:36 -0600)]
i965: comments and a new assertion
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.
Eric Anholt [Tue, 30 Jun 2009 01:48:27 +0000 (18:48 -0700)]
i915: Fix assertion failure on remapping a non-BO-backed VBO.
Failure to set the obj->Pointer back to null tripped up the assertion.
Bug #22428.
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.
Keith Whitwell [Tue, 30 Jun 2009 17:35:17 +0000 (18:35 +0100)]
progs/trivial: add dlist-mat-tri.c
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.
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.
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.
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.
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.
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.
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.
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.
Keith Whitwell [Mon, 1 Jun 2009 02:07:21 +0000 (19:07 -0700)]
progs/isosurf: add materials mode for glVertex + TRISTRIP
Keith Whitwell [Mon, 1 Jun 2009 02:04:06 +0000 (19:04 -0700)]
mesa: remove whitespace
Keith Whitwell [Mon, 1 Jun 2009 02:03:46 +0000 (19:03 -0700)]
mesa: remove dead constant pointsize code from ffvertex_prog.c
Keith Whitwell [Mon, 1 Jun 2009 02:03:02 +0000 (19:03 -0700)]
mesa: remove dead vertex fog code from ffvertex_prog.c
Keith Whitwell [Mon, 1 Jun 2009 02:01:55 +0000 (19:01 -0700)]
mesa: fix material inputs in ffvertex_prog.c
Varying material inputs were not being picked up from the same slots
where the VBO code is currently placing them (GENERIC0 and above).
Most often they were just being ignored.
Brian Paul [Tue, 30 Jun 2009 14:56:53 +0000 (08:56 -0600)]
Merge branch 'mesa_7_5_branch'
Conflicts:
src/mesa/vbo/vbo_exec_draw.c
Brian Paul [Tue, 30 Jun 2009 14:51:32 +0000 (08:51 -0600)]
gallium: remove the pipe_sampler_state::shadow_ambient field
This was only present for the sake of GL_ARB_shadow_ambient which we
never implemented in Gallium. If we someday want GL_ARB_shadow_ambient
we can implement it in the state tracker by adding a MAD after the
relevant TEX instructions.
Arthur HUILLET [Tue, 30 Jun 2009 10:46:27 +0000 (12:46 +0200)]
mesa: fix transform_points_3d_no_rot using undefined values in %xmm0
Signed-off-by: Arthur HUILLET <arthur.huillet@free.fr>
Kristof Ralovich [Tue, 30 Jun 2009 14:31:18 +0000 (08:31 -0600)]
glx: plug a leak
Swrast was missing a free for the culmination of driConcatConfigs.
Use free(), not _mesa_free() since we shouldn't be calling any Mesa
functions from the GLX code. driConcatConfigs() should probably use
regular malloc/free to be consistant but the Mesa functions just wrap
the libc functions anyway.
Brian Paul [Tue, 30 Jun 2009 14:27:28 +0000 (08:27 -0600)]
glx: fix null pointer dereference segfault (bug 22546)
Keith Whitwell [Mon, 29 Jun 2009 15:07:14 +0000 (16:07 +0100)]
progs/util: make sure function pointers are initialized
Call Init() from CompileShaderFile, was previously only called for the
Text version of this function.
José Fonseca [Tue, 30 Jun 2009 14:09:34 +0000 (15:09 +0100)]
mesa: Set FLUSH_EXPLICIT_BIT flags when calling FlushMappedBufferRange.
As prescribed by ARB_map_buffer_range.
José Fonseca [Tue, 30 Jun 2009 14:07:54 +0000 (15:07 +0100)]
util: Set PIPE_BUFFER_USAGE_FLUSH_EXPLICIT when calling buffer_flush_mapped_range.
José Fonseca [Tue, 30 Jun 2009 14:07:10 +0000 (15:07 +0100)]
gallium: New PIPE_BUFFER_USAGE_FLUSH_EXPLICIT flag for buffer_flush_mapped_range.
When a buffer was mapped for write and no explicit flush range was provided
the existing semantics were that the whole buffer would be flushed, mostly
for backwards compatability with non map-buffer-range aware code.
However if the buffer was mapped/unmapped with nothing really written --
something that often happens with the vbo -- we were unnecessarily assuming
that the whole buffer was written.
The new PIPE_BUFFER_USAGE_FLUSH_EXPLICIT flag (based from ARB_map_buffer_range
's GL_MAP_FLUSH_EXPLICIT_BIT flag) allows to clearly distinguish the
legacy usage from the nothing written usage.
Jakob Bornecrantz [Tue, 30 Jun 2009 11:59:45 +0000 (13:59 +0200)]
st/gl: Add stubs for CompressedTexSubImage[1D|3D]
Jakob Bornecrantz [Tue, 30 Jun 2009 05:33:54 +0000 (07:33 +0200)]
st/gl: Add support for glCompressedTexSubImage
Jakob Bornecrantz [Tue, 30 Jun 2009 11:34:55 +0000 (13:34 +0200)]
progs/tests: Add tests for glCompressedTexSubImage
José Fonseca [Wed, 1 Jul 2009 18:09:44 +0000 (19:09 +0100)]
util: Increase OutputDebugStringA to 4k.
According to http://unixwiz.net/techtips/outputdebugstring.html that's
how big the buffer is.
The 512bytes limitation is in kernel mode.
José Fonseca [Wed, 1 Jul 2009 18:06:54 +0000 (19:06 +0100)]
mesa: Unbind depth/stencil surface from pipe_framebuffer when none is attached.
Keith Whitwell [Wed, 1 Jul 2009 16:34:38 +0000 (17:34 +0100)]
st/wgl: dummy implementation of wgl swapinterval extension
Required as some applications
retrieve and call these functions regardless of the fact that we
don't advertise the extension and further more the results of
wglGetProcAddress are NULL.
Zack Rusin [Wed, 1 Jul 2009 14:42:58 +0000 (10:42 -0400)]
gallium: fix the front face semantics
mesa allocates both frontface and pointcoord registers within the fog
coordinate register, by using swizzling. to make it cleaner and easier
for drivers we want each of them in its own register. so when doing
compilation from the mesa IR to tgsi allocate new registers for both
and add new semantics to the respective declarations.
José Fonseca [Wed, 1 Jul 2009 09:03:59 +0000 (10:03 +0100)]
wgl: Optimize wglGetProcAddress.
Do linear search only if prefix matches.
Eric Anholt [Tue, 30 Jun 2009 01:48:27 +0000 (18:48 -0700)]
i915: Fix assertion failure on remapping a non-BO-backed VBO.
Failure to set the obj->Pointer back to null tripped up the assertion.
Bug #22428.
(cherry picked from commit
57a06d3a48c9af1067ec05e3ad96c58f4b9b99be)
Jon TURNEY [Sun, 21 Jun 2009 10:58:25 +0000 (11:58 +0100)]
xdemos: Fix xdemos which default to using display :0.0 to default to $DISPLAY
Fix xdemos which default to using display :0.0 to default to $DISPLAY,
this is kind of irritating when testing on a display other than :0.0
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
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.
Keith Whitwell [Tue, 30 Jun 2009 11:20:24 +0000 (12:20 +0100)]
progs/trivial: test case for dlist statechange elimination
Creates a display list with redundant call to glShadeModel.
View dlist contents with MESA_VERBOSE=list
Keith Whitwell [Tue, 30 Jun 2009 11:19:11 +0000 (12:19 +0100)]
mesa/dlist: restore missing SAVE_FLUSH_VERTICES in save_ShadeModel
Reorganization of ShadeModel to avoid flushing vertices too often
ended up never flushing vertices due to omitted line of code.
Keith Whitwell [Tue, 30 Jun 2009 11:16:41 +0000 (12:16 +0100)]
mesa/vbo: use _lookup_prim_by_nr for debugging
Switch over to specialized enum lookup for primitives
Keith Whitwell [Tue, 30 Jun 2009 11:13:50 +0000 (12:13 +0100)]
mesa: add debug printer for primitive name
Add a simple version of _mesa_lookup_enum_by_nr() which expects a primitive
enum (GL_POINTS..GL_POLYGON). This avoids some annoying duplicates
when looking up primitives, such as the GL_FALSE/GL_POINTS clash.
Brian Paul [Mon, 29 Jun 2009 16:32:04 +0000 (10:32 -0600)]
progs/glsl: link with GLEW library
(cherry picked from commit
b1f2f92d9b2d190d39fb1b5c919c59c9539a025a)
Jakob Bornecrantz [Tue, 30 Jun 2009 09:57:29 +0000 (11:57 +0200)]
identity: Create a drm_api wrapper
Jakob Bornecrantz [Tue, 30 Jun 2009 09:49:43 +0000 (11:49 +0200)]
drm/st: Return drm_api struct from a function
Keith Whitwell [Tue, 30 Jun 2009 08:55:33 +0000 (09:55 +0100)]
mesa/dlist: shortcircuit some redundant statechanges at compile time
Currently, state-changes in mesa display lists are more or less
a verbatim recording of the GL calls made during compilation.
This change introduces a minor optimization to recognize and eliminate
cases where the application emits redundant state changes, eg:
glShadeModel( GL_FLAT );
glBegin( prim )
...
glEnd()
glShadeModel( GL_FLAT );
glBegin( prim )
...
glEnd()
The big win is when we can eliminate all the statechanges between two
primitive blocks and combine them into a single VBO node.
This commit implements state-change elimination for Material and ShadeModel
only. This is enough to make a start on debugging, etc.