mesa.git
14 years agoMerge branch 'mesa_7_5_branch'
Jakob Bornecrantz [Sun, 5 Jul 2009 02:14:41 +0000 (04:14 +0200)]
Merge branch 'mesa_7_5_branch'

14 years agodemos: indentation fix
Brian Paul [Wed, 8 Jul 2009 19:59:03 +0000 (13:59 -0600)]
demos: indentation fix

14 years agodemos: use glEnable/DisableClientState() for vertex arrays
Brian Paul [Wed, 8 Jul 2009 19:58:30 +0000 (13:58 -0600)]
demos: use glEnable/DisableClientState() for vertex arrays

14 years agoglx: death to RCS tag
RALOVICH, Kristóf [Sun, 5 Jul 2009 14:29:44 +0000 (16:29 +0200)]
glx: death to RCS tag

14 years agor300g: Remove VAP_CNTL_STATUS from invariant state.
Corbin Simpson [Wed, 8 Jul 2009 18:59:56 +0000 (11:59 -0700)]
r300g: Remove VAP_CNTL_STATUS from invariant state.

Seriously.

14 years agor300g: Disable MSPOS registers for glisse's CS security checker.
Corbin Simpson [Wed, 8 Jul 2009 18:55:27 +0000 (11:55 -0700)]
r300g: Disable MSPOS registers for glisse's CS security checker.

These will come back in someday, when we can properly use them.

14 years agor300-gallium: Unify sampler and texture emit.
Corbin Simpson [Tue, 19 May 2009 00:06:42 +0000 (17:06 -0700)]
r300-gallium: Unify sampler and texture emit.

They have to cross into each other's registers.

14 years agor300-gallium: Mipmap setup.
Corbin Simpson [Wed, 8 Jul 2009 18:30:59 +0000 (11:30 -0700)]
r300-gallium: Mipmap setup.
(cherry picked from commit 88c01a15da5639dd68a6a0133724994cb66f1316)

14 years agor300g: Add endian fix to vertex fetcher setup.
Corbin Simpson [Wed, 8 Jul 2009 18:27:26 +0000 (11:27 -0700)]
r300g: Add endian fix to vertex fetcher setup.

As reported and initially tested by MrCooper.

14 years agogallium: Add endian detection to p_config.
Corbin Simpson [Wed, 8 Jul 2009 18:26:52 +0000 (11:26 -0700)]
gallium: Add endian detection to p_config.

14 years agor300: fix regression introduced by ca13937ef97c7779f639dcfc95b3798a11de01bd
Maciej Cencora [Sat, 4 Jul 2009 09:33:47 +0000 (11:33 +0200)]
r300: fix regression introduced by ca13937ef97c7779f639dcfc95b3798a11de01bd

Stride == 0 means that we value for first vertex should be copied to every other vertices (e.g. constant color).

This fixes glean/vertProg1 and sauerbraten with enabled shaders.

14 years agoradeon: fix copy and paste typo
Maciej Cencora [Sun, 5 Jul 2009 14:17:12 +0000 (16:17 +0200)]
radeon: fix copy and paste typo

14 years agomesa/vbo: always recalculate min_index and max_index when splitting vertices
Maciej Cencora [Sun, 5 Jul 2009 13:00:42 +0000 (15:00 +0200)]
mesa/vbo: always recalculate min_index and max_index when splitting vertices

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 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 agointel: Fix flipped Y for glDrawPixels(GL_STENCIL_INDEX) to window system.
Eric Anholt [Tue, 7 Jul 2009 22:10:21 +0000 (15:10 -0700)]
intel: Fix flipped Y for glDrawPixels(GL_STENCIL_INDEX) to window system.

Even after fixing bugs in this code, it doesn't make me feel any cleaner.
Fixes piglit stencil-drawpixels.

14 years agointel: Fall back on glCopyPixels(GL_DEPTH) or GL_STENCIL.
Eric Anholt [Tue, 7 Jul 2009 20:39:29 +0000 (13:39 -0700)]
intel: Fall back on glCopyPixels(GL_DEPTH) or GL_STENCIL.

14 years agoi965: Remove BRW_NEW_INPUT_VARYING
Eric Anholt [Mon, 6 Jul 2009 23:47:57 +0000 (16:47 -0700)]
i965: Remove BRW_NEW_INPUT_VARYING

This state flag has been unused since the ffvertex_prog move to core.

14 years agoCap array elements at 0 when passed an invalid pointer for an array object.
Eric Anholt [Wed, 25 Feb 2009 19:57:44 +0000 (11:57 -0800)]
Cap array elements at 0 when passed an invalid pointer for an array object.

Otherwise, a pointer greater than the size would underflow and give a large
maximum element.

Reviewed-by: Brian Paul <brianp@vmware.com> (previous version)
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 agoMerge branch 'mesa_7_5_branch'
Jakob Bornecrantz [Sat, 4 Jul 2009 05:43:01 +0000 (07:43 +0200)]
Merge branch 'mesa_7_5_branch'

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 agoMerge commit 'origin/openvg-1.0'
Zack Rusin [Tue, 7 Jul 2009 01:43:26 +0000 (21:43 -0400)]
Merge commit 'origin/openvg-1.0'

14 years agogallium: rearrange some members to avoid memory holes/padding
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

14 years agopipebuffer: handle possible null pointer dereference
Zack Rusin [Sun, 21 Jun 2009 01:36:40 +0000 (21:36 -0400)]
pipebuffer: handle possible null pointer dereference

reported by clang static analyzer

14 years agocso: possible null pointer dereference
Zack Rusin [Sun, 21 Jun 2009 01:25:47 +0000 (21:25 -0400)]
cso: possible null pointer dereference

reported by clang static analyzer

14 years agoutil: fix possible null pointer usage
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

14 years agoexa: some infrastucture work for accelerating composite
Zack Rusin [Mon, 8 Jun 2009 04:07:04 +0000 (00:07 -0400)]
exa: some infrastucture work for accelerating composite

14 years agoradeon: ensure cmdbuf space for state + AOS is available
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

14 years agor200: fix makefile
Dave Airlie [Mon, 6 Jul 2009 07:46:36 +0000 (17:46 +1000)]
r200: fix makefile

14 years agoradeon: fixup FBO depth 24 allocations to avoid assert
Dave Airlie [Mon, 6 Jul 2009 05:50:24 +0000 (15:50 +1000)]
radeon: fixup FBO depth 24 allocations to avoid assert

14 years agoradeon/r200/r300: port to new space checking code in libdrm
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.

14 years agoradeon-gallium: Compile warning fix.
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.

14 years agoradeon-gallium: Use FLINK to do proper global buffers.
Corbin Simpson [Sun, 5 Jul 2009 18:55:47 +0000 (11:55 -0700)]
radeon-gallium: Use FLINK to do proper global buffers.

14 years agoradeon-gallium: Wait for BOs before mapping them.
Corbin Simpson [Sun, 5 Jul 2009 18:29:13 +0000 (11:29 -0700)]
radeon-gallium: Wait for BOs before mapping them.

14 years agor300: fix vertex limits
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

14 years agoMerge branch 'mesa_7_5_branch'
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

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 agoradeon: Wait for BO idle if necessary before mapping it.
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.

14 years agor300: Guard debugging output.
Michel Dänzer [Fri, 3 Jul 2009 10:44:02 +0000 (12:44 +0200)]
r300: Guard debugging output.

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.

14 years agointel: Flush when mapping buffer objects so writes don't get reordered.
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.

14 years agovbo: If MapBufferRange fails, try MapBuffer instead.
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.)

14 years agoNuke old trace-drm integration.
Corbin Simpson [Thu, 2 Jul 2009 16:21:56 +0000 (09:21 -0700)]
Nuke old trace-drm integration.

AFAICT nobody will miss it.

14 years agointel: Fix leak of DRI option info due to using the wrong free routine.
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.

14 years agointel: Clean up leak of driver context structure on context destroy.
Eric Anholt [Thu, 2 Jul 2009 20:19:11 +0000 (13:19 -0700)]
intel: Clean up leak of driver context structure on context destroy.

14 years agointel: Init num_fences to clean up valgrind warning.
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.

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 agor300g: Readd trace driver support
Jakob Bornecrantz [Thu, 2 Jul 2009 13:05:51 +0000 (15:05 +0200)]
r300g: Readd trace driver support

14 years agoi915g: Readd trace driver support
Jakob Bornecrantz [Thu, 2 Jul 2009 13:05:17 +0000 (15:05 +0200)]
i915g: Readd trace driver support

14 years agotrace: Add drm api integration
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.

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 agoradeon/r200/r300: drop radeon renderbuffer private width/height
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

14 years agoradeon/r300: use base width/height.
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

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 agoi965: fixes for JMPI
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.

14 years agor300g: Fix recursive Draw flush.
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

14 years agor300g: Use floats for surface_copy texcoords, use correct src and dest.
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.

14 years agoradeon-gallium: Adapt to drm_api changes.
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.

14 years agointel: Avoid pointer arithmetic on void *.
Eric Anholt [Wed, 1 Jul 2009 05:57:56 +0000 (22:57 -0700)]
intel: Avoid pointer arithmetic on void *.

Bug #22000.

14 years agoi965: Increase G4X default VS URB allocation to actually allow 32 threads.
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.

14 years agodemos: Set the depth mask correctly to get the desired blending
Ian Romanick [Wed, 1 Jul 2009 00:29:14 +0000 (17:29 -0700)]
demos: Set the depth mask correctly to get the desired blending

14 years agonouveau: return some supported zeta formats
Ben Skeggs [Tue, 30 Jun 2009 23:15:51 +0000 (09:15 +1000)]
nouveau: return some supported zeta formats

14 years agonouveau: deal with PIPE_CAP_TGSI_CONT_SUPPORTED
Ben Skeggs [Tue, 30 Jun 2009 22:56:46 +0000 (08:56 +1000)]
nouveau: deal with PIPE_CAP_TGSI_CONT_SUPPORTED

14 years agonouveau: fix build...
Ben Skeggs [Tue, 30 Jun 2009 22:50:24 +0000 (08:50 +1000)]
nouveau: fix build...

14 years agodrm/st: Remove drm_api struct from drivers
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.

14 years agoi965: first attempt at handling URB overflow when there's too many vs outputs
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...

14 years agoi965: use BRW_MAX_MRF
Brian Paul [Tue, 30 Jun 2009 23:08:40 +0000 (17:08 -0600)]
i965: use BRW_MAX_MRF

14 years agoi965: use BRW_MAX_GRF, BRW_MAX_MRF
Brian Paul [Tue, 30 Jun 2009 22:36:11 +0000 (16:36 -0600)]
i965: use BRW_MAX_GRF, BRW_MAX_MRF

14 years agoi965: move BRW_MAX_GRF, define 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

14 years agoi965: defined BRW_MAX_MRF
Brian Paul [Tue, 30 Jun 2009 22:33:09 +0000 (16:33 -0600)]
i965: defined BRW_MAX_MRF

14 years agoi965: comments and a new assertion
Brian Paul [Tue, 30 Jun 2009 21:36:42 +0000 (15:36 -0600)]
i965: comments and a new assertion

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 agoi915: Fix assertion failure on remapping a non-BO-backed VBO.
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.

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.