mesa.git
15 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

15 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'

15 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

15 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

15 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

15 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

15 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

15 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

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

15 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

15 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.

15 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.

15 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.

15 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.

15 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

15 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

15 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.

15 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

15 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}.

15 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.

15 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.

15 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.

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

15 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.

15 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.

15 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.)

15 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.

15 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.

15 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.

15 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.

15 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.

15 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.

15 years agor300g: Readd trace driver support
Jakob Bornecrantz [Thu, 2 Jul 2009 13:05:51 +0000 (15:05 +0200)]
r300g: Readd trace driver support

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

15 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.

15 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.

15 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.

15 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

15 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

15 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.

15 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.

15 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

15 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.

15 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.

15 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.

15 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.

15 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

15 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

15 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

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

15 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.

15 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...

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

15 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

15 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

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

15 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

15 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.

15 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.

15 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.

15 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

15 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.

15 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.

15 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.

15 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.

15 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.

15 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.

15 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.

15 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.

15 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

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

15 years agomesa: remove dead constant pointsize code from ffvertex_prog.c
Keith Whitwell [Mon, 1 Jun 2009 02:03:46 +0000 (19:03 -0700)]
mesa: remove dead constant pointsize code from ffvertex_prog.c

15 years agomesa: remove dead vertex fog 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

15 years agomesa: fix material inputs in 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.

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

15 years agogallium: remove the pipe_sampler_state::shadow_ambient field
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.

15 years agomesa: fix transform_points_3d_no_rot using undefined values in %xmm0
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>
15 years agoglx: plug a leak
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.

15 years agoglx: fix null pointer dereference segfault (bug 22546)
Brian Paul [Tue, 30 Jun 2009 14:27:28 +0000 (08:27 -0600)]
glx: fix null pointer dereference segfault (bug 22546)

15 years agoprogs/util: make sure function pointers are initialized
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.

15 years agomesa: Set FLUSH_EXPLICIT_BIT flags when calling FlushMappedBufferRange.
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.

15 years agoutil: Set PIPE_BUFFER_USAGE_FLUSH_EXPLICIT when calling buffer_flush_mapped_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.

15 years agogallium: New PIPE_BUFFER_USAGE_FLUSH_EXPLICIT flag for 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.

15 years agost/gl: Add stubs for CompressedTexSubImage[1D|3D]
Jakob Bornecrantz [Tue, 30 Jun 2009 11:59:45 +0000 (13:59 +0200)]
st/gl: Add stubs for CompressedTexSubImage[1D|3D]

15 years agost/gl: Add support for glCompressedTexSubImage
Jakob Bornecrantz [Tue, 30 Jun 2009 05:33:54 +0000 (07:33 +0200)]
st/gl: Add support for glCompressedTexSubImage

15 years agoprogs/tests: Add tests for glCompressedTexSubImage
Jakob Bornecrantz [Tue, 30 Jun 2009 11:34:55 +0000 (13:34 +0200)]
progs/tests: Add tests for glCompressedTexSubImage

15 years agoutil: Increase OutputDebugStringA to 4k.
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.

15 years agomesa: Unbind depth/stencil surface from pipe_framebuffer when none is attached.
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.

15 years agost/wgl: dummy implementation of wgl swapinterval extension
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.

15 years agogallium: fix the front face semantics
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.

15 years agowgl: Optimize wglGetProcAddress.
José Fonseca [Wed, 1 Jul 2009 09:03:59 +0000 (10:03 +0100)]
wgl: Optimize wglGetProcAddress.

Do linear search only if prefix matches.

15 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.
(cherry picked from commit 57a06d3a48c9af1067ec05e3ad96c58f4b9b99be)

15 years agoxdemos: Fix xdemos which default to using display :0.0 to default to $DISPLAY
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>
15 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.

15 years agoprogs/trivial: test case for dlist statechange elimination
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

15 years agomesa/dlist: restore missing SAVE_FLUSH_VERTICES in save_ShadeModel
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.

15 years agomesa/vbo: use _lookup_prim_by_nr for debugging
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

15 years agomesa: add debug printer for primitive name
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.

15 years agoprogs/glsl: link with GLEW library
Brian Paul [Mon, 29 Jun 2009 16:32:04 +0000 (10:32 -0600)]
progs/glsl: link with GLEW library
(cherry picked from commit b1f2f92d9b2d190d39fb1b5c919c59c9539a025a)

15 years agoidentity: Create a drm_api wrapper
Jakob Bornecrantz [Tue, 30 Jun 2009 09:57:29 +0000 (11:57 +0200)]
identity: Create a drm_api wrapper