mesa.git
15 years agoutil: Make assert a no-op on non-debug builds.
José Fonseca [Sun, 4 Oct 2009 20:59:24 +0000 (21:59 +0100)]
util: Make assert a no-op on non-debug builds.

This ensures that an assertion like

  assert(expensive_test());

won't have any penalty on release builds. It also implies that no vital
code should be in assert expressions.

15 years agollvmpipe: Ensure tile cache transfers are mapped before flushing it.
José Fonseca [Sun, 4 Oct 2009 12:25:24 +0000 (13:25 +0100)]
llvmpipe: Ensure tile cache transfers are mapped before flushing it.

15 years agollvmpipe: Autogenerate lp_tile_soa.c from u_format.csv.
José Fonseca [Sun, 4 Oct 2009 12:04:08 +0000 (13:04 +0100)]
llvmpipe: Autogenerate lp_tile_soa.c from u_format.csv.

This is just a temporary change until we code generate the tile read/write
functions in runtime. The new code avoids an extra memcpy that exists in
u_tile.c functions, from which lp_tile_soa.c was originally based.

This achieves up to 5% improvement, particularly in frames with
little geometry overlap.

15 years agoutil: Fix cpuid invocation for x86_64.
José Fonseca [Sun, 4 Oct 2009 11:49:31 +0000 (12:49 +0100)]
util: Fix cpuid invocation for x86_64.

15 years agollvmpipe: Remove loop testing from format testing.
José Fonseca [Sun, 4 Oct 2009 10:36:42 +0000 (11:36 +0100)]
llvmpipe: Remove loop testing from format testing.

Loop building will be rewritten.

15 years agollvmpipe: Match header's protection macro with filename.
José Fonseca [Sun, 4 Oct 2009 10:35:50 +0000 (11:35 +0100)]
llvmpipe: Match header's protection macro with filename.

15 years agollvmpipe: Adjust format assertion.
José Fonseca [Sat, 3 Oct 2009 21:15:17 +0000 (22:15 +0100)]
llvmpipe: Adjust format assertion.

We support array layout too -- if it has a single channel.

15 years agor300g: xRGB and RGBx formats.
Corbin Simpson [Thu, 1 Oct 2009 02:44:38 +0000 (19:44 -0700)]
r300g: xRGB and RGBx formats.

We now have 48 GLX visuals. Pretty soon, we'll have 90+ visuals,
only five of which ever get tested. :3

15 years agointel: Suppress a compiler warning for an pointer->int cast
Chris Wilson [Sat, 3 Oct 2009 22:08:39 +0000 (23:08 +0100)]
intel: Suppress a compiler warning for an pointer->int cast

intel_pixel_read.c: In function ‘do_blit_readpixels’:
intel_pixel_read.c:221: warning: cast from pointer to integer of
different size

Cast via an intermediate (GLintptr) instead and hope the result fits
within GLuint... [It should as we simply do not support textures *that*
large!]

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
15 years agointel: Assert that relocation offsets are within the target
Chris Wilson [Fri, 2 Oct 2009 18:46:03 +0000 (19:46 +0100)]
intel: Assert that relocation offsets are within the target

This should catch the common programming error where we attempt to
emit a relocation to beyond the end of the target buffer.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
15 years agollvmpipe: Fetch tile only if a color buffer is bound.
José Fonseca [Sat, 3 Oct 2009 18:42:22 +0000 (19:42 +0100)]
llvmpipe: Fetch tile only if a color buffer is bound.

15 years agoprog_parameter: Document the fact that Size may be > 4
Nicolai Hähnle [Sat, 3 Oct 2009 14:18:57 +0000 (16:18 +0200)]
prog_parameter: Document the fact that Size may be > 4

Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
15 years agor300g: Do not abort on fragment program compiler error
Nicolai Hähnle [Sat, 3 Oct 2009 17:20:31 +0000 (19:20 +0200)]
r300g: Do not abort on fragment program compiler error

Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
15 years agor300g: Fix memory leak in radeon_texture_from_shared_handle
Nicolai Hähnle [Sat, 3 Oct 2009 15:56:51 +0000 (17:56 +0200)]
r300g: Fix memory leak in radeon_texture_from_shared_handle

Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
15 years agor300g: Build in the trace and softpipe driver for xorg state tracker
Sedat Dilek [Sat, 3 Oct 2009 16:01:58 +0000 (18:01 +0200)]
r300g: Build in the trace and softpipe driver for xorg state tracker

Same as in src/gallium/winsys/drm/intel/xorg/Makefile

Thanks MrCooper for explanations on IRC

[ Summary amended by Michel Dänzer to clarify that this is related to the xorg
  state tracker ]

15 years agoradeon: Cope better with texture images with no miptrees.
Michel Dänzer [Sat, 3 Oct 2009 16:01:58 +0000 (18:01 +0200)]
radeon: Cope better with texture images with no miptrees.

Fixes crash with compiz magnifier plugin.

15 years agoswrast: Move up state validation in _swrast_ReadPixels.
Michel Dänzer [Sat, 3 Oct 2009 16:01:58 +0000 (18:01 +0200)]
swrast: Move up state validation in _swrast_ReadPixels.

This ensures the driver won't map the wrong set of textures.

15 years agometa: Make sure texImage->TexFormat is valid for CopyTex(Sub)Image.
Michel Dänzer [Sat, 3 Oct 2009 16:01:57 +0000 (18:01 +0200)]
meta: Make sure texImage->TexFormat is valid for CopyTex(Sub)Image.

15 years agor300g: Remove an unnecessarily created pipe buffer (and thus fix a leak)
Nicolai Hähnle [Sat, 3 Oct 2009 15:49:16 +0000 (17:49 +0200)]
r300g: Remove an unnecessarily created pipe buffer (and thus fix a leak)

Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
15 years agost/dri: Install APPLE_vertex_array_object functions
Nicolai Hähnle [Sat, 3 Oct 2009 15:39:32 +0000 (17:39 +0200)]
st/dri: Install APPLE_vertex_array_object functions

Besides from being necessary to use that extension, it also fixes a crash
when deleting the currently bound vertex array object.

Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
15 years agor300g: Reset vbo_offset after allocation of a new buffer
Nicolai Hähnle [Sat, 3 Oct 2009 15:24:04 +0000 (17:24 +0200)]
r300g: Reset vbo_offset after allocation of a new buffer

This fixes the glxgears bug, among other things.

Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
15 years agost/dri: Install ARB_vertex_array_object functions
Nicolai Hähnle [Sat, 3 Oct 2009 00:11:02 +0000 (02:11 +0200)]
st/dri: Install ARB_vertex_array_object functions

Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
15 years agomesa: optimized _mesa_meta_BlitFramebuffer() for src=texture case
Brian Paul [Fri, 2 Oct 2009 19:59:41 +0000 (13:59 -0600)]
mesa: optimized _mesa_meta_BlitFramebuffer() for src=texture case

If the src renderbuffer is actually a texture, we can directly use that
texture as the src and avoid a copy.

15 years agoi965: Use a little stack space to avoid a malloc in wm_get_binding_table.
Eric Anholt [Fri, 2 Oct 2009 17:53:56 +0000 (10:53 -0700)]
i965: Use a little stack space to avoid a malloc in wm_get_binding_table.

15 years agomesa: Remove another unexplained Flush call, this time from BindFramebuffer.
Eric Anholt [Fri, 2 Oct 2009 00:59:05 +0000 (17:59 -0700)]
mesa: Remove another unexplained Flush call, this time from BindFramebuffer.

Combined with the previous fix, it takes cairo-gl firefox-talos-gfx time
from 120 seconds to 90 seconds on my GM45.

15 years agoRevert "Flush driver, not just tnl module."
Eric Anholt [Thu, 1 Oct 2009 23:53:12 +0000 (16:53 -0700)]
Revert "Flush driver, not just tnl module."

This reverts commit df058298e1570eea8712f9bb051f674fab2eaf24.  It didn't
explain why it was required, doesnt appear to be required, and is a
significant performance penalty for cairo-gl firefox.

Conflicts:

src/mesa/main/fbobject.c

15 years agointel: Remove an unexplained flush from intelClearWithBlit.
Eric Anholt [Fri, 2 Oct 2009 01:07:57 +0000 (18:07 -0700)]
intel: Remove an unexplained flush from intelClearWithBlit.

15 years agor600: remove support for host-based ibs
Alex Deucher [Fri, 2 Oct 2009 18:25:52 +0000 (14:25 -0400)]
r600: remove support for host-based ibs

no longer used now that the hw supports this natively.

Also, clean up some formatting.

15 years agomesa/st: don't reuse vertex buffers for bitmap, clear quads
Keith Whitwell [Fri, 2 Oct 2009 14:36:47 +0000 (15:36 +0100)]
mesa/st: don't reuse vertex buffers for bitmap, clear quads

Currently using max_slots > 1 will cause synchronous rendering
if the driver flushes its command buffers between one bitmap and the
next.

Need to improve buffer_write to allow NO_WAIT (as well as no_flush)
updates to buffers where we know there is no conflict with previous
data.

15 years agost/xorg: Use PIPE_TRANSFER_MAP_DIRECTLY flag in EXA PrepareAccess hook.
Michel Dänzer [Fri, 2 Oct 2009 16:13:26 +0000 (18:13 +0200)]
st/xorg: Use PIPE_TRANSFER_MAP_DIRECTLY flag in EXA PrepareAccess hook.

Propagate NULL return value.

This also allows removing the DRM_MODE_FEATURE_DIRTYFB specific pixmap
management hacks.

15 years agogallium: Add PIPE_TRANSFER_MAP_DIRECTLY usage flag.
Michel Dänzer [Fri, 2 Oct 2009 16:13:26 +0000 (18:13 +0200)]
gallium: Add PIPE_TRANSFER_MAP_DIRECTLY usage flag.

Asks the driver to map the texture storage directly or return NULL if that's
not possible.

15 years agogallium: Preparations for adding more PIPE_TRANSFER_* usage flags.
Michel Dänzer [Fri, 2 Oct 2009 16:13:26 +0000 (18:13 +0200)]
gallium: Preparations for adding more PIPE_TRANSFER_* usage flags.

Always test for PIPE_TRANSFER_READ/WRITE using the bit-wise and operator, and
add a pipe_transfer_buffer_flags() helper for getting the buffer usage flags
corresponding to them.

15 years agointel: wrap _mesa_meta_GenerateMipmap()
Brian Paul [Fri, 2 Oct 2009 14:55:25 +0000 (08:55 -0600)]
intel: wrap _mesa_meta_GenerateMipmap()

Need to check if we'll take the software path so which requires mapping the
src texture image.

Fixes crash in piglit gen-compressed-teximage, bug 24219.  However, the
test still does not pass (it may never have).

15 years agomesa: added _mesa_meta_check_generate_mipmap_fallback()
Brian Paul [Fri, 2 Oct 2009 14:54:55 +0000 (08:54 -0600)]
mesa: added _mesa_meta_check_generate_mipmap_fallback()

15 years agog3dvl: Formatting.
Younes Manton [Fri, 2 Oct 2009 02:25:46 +0000 (22:25 -0400)]
g3dvl: Formatting.

15 years agog3dvl: Delete state_trackers/g3dvl, other unused files.
Younes Manton [Fri, 2 Oct 2009 02:17:47 +0000 (22:17 -0400)]
g3dvl: Delete state_trackers/g3dvl, other unused files.

15 years agog3dvl: Copyright blocks.
Younes Manton [Fri, 2 Oct 2009 02:16:10 +0000 (22:16 -0400)]
g3dvl: Copyright blocks.

15 years agost/xvmc: Set default CSC matrix to BT.601, no ProcAmp, full range RGB.
Younes Manton [Fri, 2 Oct 2009 02:01:18 +0000 (22:01 -0400)]
st/xvmc: Set default CSC matrix to BT.601, no ProcAmp, full range RGB.

15 years agog3dvl: Color space conv interface & vl impl.
Younes Manton [Fri, 2 Oct 2009 01:53:17 +0000 (21:53 -0400)]
g3dvl: Color space conv interface & vl impl.

Interface is pipe_video_context::set_csc_matrix().

vl_csc.h defines some helpers to generate CSC matrices based on one of
the color standard and a user defined ProcAmp (brightness, contrast,
saturation, hue).

15 years agoi915: Add stub ARB_occlusion_query support under a driconf debug option.
Eric Anholt [Wed, 29 Jul 2009 20:07:49 +0000 (13:07 -0700)]
i915: Add stub ARB_occlusion_query support under a driconf debug option.

This is useful for enabling our GLSL testcases using the 2.0 entrypoints
even though we don't have full GL 2.0.

15 years agoi915: Add optional support for ARB_fragment_shader under a driconf option.
Eric Anholt [Wed, 29 Jul 2009 20:00:09 +0000 (13:00 -0700)]
i915: Add optional support for ARB_fragment_shader under a driconf option.

Other vendors have enabled ARB_fragment_shader as part of OpenGL 2.0
enablement even on hardware like the 915 with no dynamic branching or
dFdx/dFdy support.  But for now we'll leave it disabled because we don't
do any flattening of ifs or loops, which is rather restrictive.

This support is not complete, and may be unstable depending on your shaders.
It passes 10/15 of the piglit glsl tests, but hangs on glean glsl1.

15 years agoi915: Add support or fallbacks for GLSL fragment shader opcodes.
Eric Anholt [Thu, 30 Jul 2009 03:44:39 +0000 (20:44 -0700)]
i915: Add support or fallbacks for GLSL fragment shader opcodes.

15 years agoi915: Add support for varying inputs.
Eric Anholt [Thu, 1 Oct 2009 21:00:28 +0000 (14:00 -0700)]
i915: Add support for varying inputs.

15 years agoi915: Enable ARB_vertex_shader for both i915 and i830.
Eric Anholt [Wed, 29 Jul 2009 19:15:14 +0000 (12:15 -0700)]
i915: Enable ARB_vertex_shader for both i915 and i830.

Since the TNL is all done in software anyway, it should be the same to
the user who's probably using ARB_vertex_program otherwise, but gives them
a nicer programming environment.

15 years agoi915: Increase maximum program size to the hardware limits.
Eric Anholt [Thu, 30 Jul 2009 07:03:21 +0000 (00:03 -0700)]
i915: Increase maximum program size to the hardware limits.

This fixes potential heap trashing if the program of choice exceeds limits,
and fixes the native instructions limit being lower than what can be
used by valid programs.

15 years agoi915: Update and translate the fragment program along with state updates.
Eric Anholt [Thu, 30 Jul 2009 06:37:04 +0000 (23:37 -0700)]
i915: Update and translate the fragment program along with state updates.

Previously, we were doing it in the midst of the pipeline run, which gave
an opportunity to enable/disable fallbacks, which is certainly the wrong
time to be doing so.  This manifested itself in a NULL dereference for PutRow
after transitioning out of a fallback during a run_pipeline in glean glsl1.

15 years agoRevert "i915: don't validate PS program when falling back to software"
Eric Anholt [Thu, 30 Jul 2009 05:46:14 +0000 (22:46 -0700)]
Revert "i915: don't validate PS program when falling back to software"

This reverts commit e7044d552c6d16389447880b8744a51de1cf0199.  It
prevented the driver from ever recovering from a software fallback due
to a program error.  The original bug it claimed to fix doesn't appear to
exist post-revert.

15 years agoi915: Bail when the fragment program has too many total instructions.
Eric Anholt [Thu, 30 Jul 2009 05:39:15 +0000 (22:39 -0700)]
i915: Bail when the fragment program has too many total instructions.

Previously, we'd go trashing the heap.

15 years agoi915: Let i915_program_error take a format string, and don't use _mesa_problem.
Eric Anholt [Thu, 30 Jul 2009 19:32:40 +0000 (12:32 -0700)]
i915: Let i915_program_error take a format string, and don't use _mesa_problem.

It's misleading to report things like the program having too many native
instructions as a Mesa implementation error, when the program may just be
too big for the hardware.

15 years agoMerge branch 'mesa_7_6_branch'
Brian Paul [Thu, 1 Oct 2009 19:35:42 +0000 (13:35 -0600)]
Merge branch 'mesa_7_6_branch'

15 years agomesa: Return -FLT_MAX instead of 0 for LG2(0).
Vinson Lee [Thu, 1 Oct 2009 19:33:20 +0000 (13:33 -0600)]
mesa: Return -FLT_MAX instead of 0 for LG2(0).

lim x->0 log(x) = -inf so -FLT_MAX is a better approximation than 0
for LG2(0).

15 years agoobjviewer: remove disabled code
Brian Paul [Thu, 1 Oct 2009 19:14:16 +0000 (13:14 -0600)]
objviewer: remove disabled code

15 years agoobjviewer: mouse/keyboard info in README file
Brian Paul [Thu, 1 Oct 2009 19:13:28 +0000 (13:13 -0600)]
objviewer: mouse/keyboard info in README file

15 years agodocs: added objviewer to release notes
Brian Paul [Thu, 1 Oct 2009 19:11:38 +0000 (13:11 -0600)]
docs: added objviewer to release notes

15 years agomesa: add objviewer to PROGRAM_DIRS
Brian Paul [Thu, 1 Oct 2009 19:11:25 +0000 (13:11 -0600)]
mesa: add objviewer to PROGRAM_DIRS

15 years agomesa: add progs/objviewer to tarball list
Brian Paul [Thu, 1 Oct 2009 19:11:13 +0000 (13:11 -0600)]
mesa: add progs/objviewer to tarball list

15 years agoobjview: clean up drawing VBO code
Brian Paul [Thu, 1 Oct 2009 19:07:01 +0000 (13:07 -0600)]
objview: clean up drawing VBO code

15 years agoobjview: set skybox texture filter
Brian Paul [Thu, 1 Oct 2009 19:05:25 +0000 (13:05 -0600)]
objview: set skybox texture filter

15 years agoobjview: check GL version/extension
Brian Paul [Thu, 1 Oct 2009 19:05:13 +0000 (13:05 -0600)]
objview: check GL version/extension

15 years agoprogs/objviewer: Wavefront .obj file loader/viewer demo
Brian Paul [Thu, 1 Oct 2009 18:58:36 +0000 (12:58 -0600)]
progs/objviewer: Wavefront .obj file loader/viewer demo

Adapted from code written by Nate Robins.  See README.txt.

15 years agost/xorg: Check that ms->api->destroy is not NULL before calling it.
Michel Dänzer [Thu, 1 Oct 2009 14:45:11 +0000 (16:45 +0200)]
st/xorg: Check that ms->api->destroy is not NULL before calling it.

Fixes potential crash on X server shutdown.

15 years agoutil: Enable sockets on BSD
Robert Noland [Wed, 30 Sep 2009 17:14:38 +0000 (10:14 -0700)]
util: Enable sockets on BSD

I think this should be safe for all of the BSDs.

Signed-off-by: Robert Noland <rnoland@2hip.net>
Signed-off-by: Brian Paul <brianp@vmware.com>
15 years agoutil: define PIPE_OS_FREEBSD to correct u_cpu_detect on FreeBSD.
Robert Noland [Wed, 30 Sep 2009 16:36:18 +0000 (09:36 -0700)]
util: define PIPE_OS_FREEBSD to correct u_cpu_detect on FreeBSD.

Since the various BSDs use some different features here,
define PIPE_OS_OPENBSD and PIPE_OS_NETBSD as well

Signed-off-by: Robert Noland <rnoland@2hip.net>
15 years agomesa: better debug message
Brian Paul [Wed, 30 Sep 2009 15:30:27 +0000 (09:30 -0600)]
mesa: better debug message

15 years agogallium: remove depth.occlusion_count flag
Keith Whitwell [Thu, 1 Oct 2009 13:34:23 +0000 (14:34 +0100)]
gallium: remove depth.occlusion_count flag

This was redundant as drivers can just keep track of whether they are
inside a begin/end query pair.  We want to add more query types later
and also support nested queries, none of which map well onto a flag like
this.  No driver appeared to be using the flag.

15 years agost/mesa: fix non-mipmap lastLevel calculation.
Cooper Yuan [Thu, 1 Oct 2009 09:54:27 +0000 (17:54 +0800)]
st/mesa: fix non-mipmap lastLevel calculation.

reviewed by Brian Paul.

15 years agoglx: fix glXQueryContext(GLX_RENDER_TYPE)
Brian Paul [Tue, 29 Sep 2009 16:24:27 +0000 (10:24 -0600)]
glx: fix glXQueryContext(GLX_RENDER_TYPE)

The renderType parameter to CreateContext() was never used.  Also, it
was often passed as zero.  Now when it's zero we check if the context
is RGBA or CI mode and set it accordingly.

Fixes bug 24211.

15 years agoi965: Fix massive memory allocation for streaming texture usage.
Eric Anholt [Thu, 12 Feb 2009 11:54:58 +0000 (03:54 -0800)]
i965: Fix massive memory allocation for streaming texture usage.

Once we've freed a miptree, we won't see any more state cache requests
that would hit the things that pointed at it until we've let the miptree
get released back into the BO cache to be reused.  By leaving those
surface state and binding table pointers that pointed at it around, we
would end up with up to (500 * texture size) in memory uselessly consumed
by the state cache.

Bug #20057
Bug #23530

15 years agost/xorg: Fix debug option function call typo.
Michel Dänzer [Wed, 30 Sep 2009 16:01:46 +0000 (18:01 +0200)]
st/xorg: Fix debug option function call typo.

15 years agomesa/main: New feature FEATURE_beginend.
Chia-I Wu [Sat, 12 Sep 2009 10:59:13 +0000 (18:59 +0800)]
mesa/main: New feature FEATURE_beginend.

This feature corresponds to the Begin/End paradigm.  Disabling this
feature also eliminates the use of GLvertexformat completely.

15 years agomesa/main: Make FEATURE_dlist follow feature conventions.
Chia-I Wu [Wed, 9 Sep 2009 07:00:08 +0000 (15:00 +0800)]
mesa/main: Make FEATURE_dlist follow feature conventions.

As shown in mfeatures.h, this allows users of dlist.h to work without
knowing if the feature is available.

15 years agomesa/main: Make FEATURE_evaluators follow feature conventions.
Chia-I Wu [Tue, 8 Sep 2009 02:25:22 +0000 (10:25 +0800)]
mesa/main: Make FEATURE_evaluators follow feature conventions.

As shown in mfeatures.h, this allows users of eval.h to work without
knowing if the feature is available.

15 years agomesa/main: New feature FEATURE_queryobj.
Chia-I Wu [Tue, 8 Sep 2009 09:45:59 +0000 (17:45 +0800)]
mesa/main: New feature FEATURE_queryobj.

It merges FEATURE_ARB_occlusion_query and FEATURE_EXT_timer_query, and
follows the feature conventions.

15 years agomesa/main: New feature FEATURE_arrayelt.
Chia-I Wu [Tue, 8 Sep 2009 06:32:08 +0000 (14:32 +0800)]
mesa/main: New feature FEATURE_arrayelt.

This allows the removal of AEcontext.

15 years agomesa/main: Make FEATURE_texgen follow feature conventions.
Chia-I Wu [Tue, 8 Sep 2009 03:01:19 +0000 (11:01 +0800)]
mesa/main: Make FEATURE_texgen follow feature conventions.

As shown in mfeatures.h, this allows users of texgen.h to work without
knowing if the feature is available.

15 years agomesa/main: Make FEATURE_feedback follow feature conventions.
Chia-I Wu [Tue, 8 Sep 2009 02:52:01 +0000 (10:52 +0800)]
mesa/main: Make FEATURE_feedback follow feature conventions.

As shown in mfeatures.h, this allows users of feedback.h to work without
knowing if the feature is available.

15 years agomesa/main: Make FEATURE_drawpix follow feature conventions.
Chia-I Wu [Tue, 8 Sep 2009 02:15:06 +0000 (10:15 +0800)]
mesa/main: Make FEATURE_drawpix follow feature conventions.

As shown in mfeatures.h, this allows users of drawpix.h to work
without knowing if the feature is available.

15 years agomesa/main: New feature FEATURE_rastpos.
Chia-I Wu [Tue, 8 Sep 2009 02:05:36 +0000 (10:05 +0800)]
mesa/main: New feature FEATURE_rastpos.

It is separated from FEATURE_drawpix and made to follow the feature
conventions.

15 years agomesa/main: Make FEATURE_histogram follow feature conventions.
Chia-I Wu [Mon, 7 Sep 2009 10:06:00 +0000 (18:06 +0800)]
mesa/main: Make FEATURE_histogram follow feature conventions.

As shown in mfeatures.h, this allows users of histogram.h to work without
knowing if the feature is available.

15 years agomesa/main: Make FEATURE_attrib_stack follow feature conventions.
Chia-I Wu [Mon, 7 Sep 2009 10:20:10 +0000 (18:20 +0800)]
mesa/main: Make FEATURE_attrib_stack follow feature conventions.

As shown in mfeatures.h, this allows users of attrib.h to work without
knowing if the feature is available.

15 years agomesa/main: Make FEATURE_accum follow feature conventions.
Chia-I Wu [Mon, 7 Sep 2009 09:51:42 +0000 (17:51 +0800)]
mesa/main: Make FEATURE_accum follow feature conventions.

As shown in mfeatures.h, this allows users of accum.h to work without
knowing if the feature is available.

15 years agoprogs/egl: Make demo3 work again.
Chia-I Wu [Wed, 30 Sep 2009 04:32:22 +0000 (12:32 +0800)]
progs/egl: Make demo3 work again.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
15 years agoprogs/egl: Check EGL_MESA_screen_surface is supported in demo2.
Chia-I Wu [Wed, 30 Sep 2009 04:13:34 +0000 (12:13 +0800)]
progs/egl: Check EGL_MESA_screen_surface is supported in demo2.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
15 years agoprogs/egl: Fix a crash in demo1.
Chia-I Wu [Wed, 30 Sep 2009 04:28:01 +0000 (12:28 +0800)]
progs/egl: Fix a crash in demo1.

The variable "configs" in main() is used without initialization.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
15 years agost/egl: Fix a double free in drm_destroy_context.
Chia-I Wu [Wed, 30 Sep 2009 03:36:01 +0000 (11:36 +0800)]
st/egl: Fix a double free in drm_destroy_context.

st_destroy_context has destroyed the pipe context for us.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
15 years agost/egl: Fix a crash when unbinding current context.
Chia-I Wu [Wed, 30 Sep 2009 03:32:36 +0000 (11:32 +0800)]
st/egl: Fix a crash when unbinding current context.

This fixes a NULL-pointer dereference when
eglMakeCurrent(dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT)
is called.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
15 years agoprogs/egl: Replace EGL_i915 by EGL_DEFAULT_DISPLAY.
Chia-I Wu [Wed, 30 Sep 2009 03:13:16 +0000 (11:13 +0800)]
progs/egl: Replace EGL_i915 by EGL_DEFAULT_DISPLAY.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
15 years agodocs: document GLSL sqrt(0) fix
Brian Paul [Wed, 30 Sep 2009 01:05:04 +0000 (19:05 -0600)]
docs: document GLSL sqrt(0) fix

15 years agoglsl: regenerated file
Brian Paul [Wed, 30 Sep 2009 00:59:37 +0000 (18:59 -0600)]
glsl: regenerated file

15 years agoglsl: rewrite sqrt(x) intrinsic to handle x=0
Brian Paul [Wed, 30 Sep 2009 00:57:13 +0000 (18:57 -0600)]
glsl: rewrite sqrt(x) intrinsic to handle x=0

Since sqrt() is basically implemented in terms of RSQ/RCP we'll do a
divide by zero if x=0 and wind up with unpredictable results.
Now use CMP instruction to test for x<=0 and return zero in that case.

15 years agoglsl: add support for CMP instruction
Brian Paul [Wed, 30 Sep 2009 00:51:49 +0000 (18:51 -0600)]
glsl: add support for CMP instruction

15 years agodocs: fixed glXQueryContext(GLX_RENDER_TYPE)
Brian Paul [Tue, 29 Sep 2009 18:18:41 +0000 (12:18 -0600)]
docs: fixed glXQueryContext(GLX_RENDER_TYPE)

15 years agogallium/xlib: fix GLX_RENDER_TYPE query
Brian Paul [Tue, 29 Sep 2009 18:17:11 +0000 (12:17 -0600)]
gallium/xlib: fix GLX_RENDER_TYPE query

Return GLX_RGBA_TYPE or GLX_COLOR_INDEX_TYPE.

15 years agomesa/xlib: fix GLX_RENDER_TYPE query
Brian Paul [Tue, 29 Sep 2009 18:16:12 +0000 (12:16 -0600)]
mesa/xlib: fix GLX_RENDER_TYPE query

Return GLX_RGBA_TYPE or GLX_COLOR_INDEX_TYPE.

15 years agomesa: added nopfrag/nopvert options for MESA_GLSL
Brian Paul [Tue, 29 Sep 2009 16:22:32 +0000 (10:22 -0600)]
mesa: added nopfrag/nopvert options for MESA_GLSL

These options can be used to force vertex/fragment shaders to be no-op
shaders (actually, simple pass-through shaders).  For debug/test purposes.

15 years agomesa: added _mesa_nop_vertex/fragment_program()
Brian Paul [Mon, 28 Sep 2009 21:26:12 +0000 (15:26 -0600)]
mesa: added _mesa_nop_vertex/fragment_program()

For debug/test purposes.

15 years agollvmpipe: Workaround for bug in llvm 2.5.
José Fonseca [Tue, 29 Sep 2009 16:26:20 +0000 (17:26 +0100)]
llvmpipe: Workaround for bug in llvm 2.5.

The combination of fptosi
and sitofp (necessary for trunc/floor/ceil/round implementation)
somehow becomes invalid code.

Skip the instruction combining pass when SSE4.1 is not available.

15 years agollvmpipe: First verify LLVM IR, only then run optimizing passes.
José Fonseca [Tue, 29 Sep 2009 16:22:39 +0000 (17:22 +0100)]
llvmpipe: First verify LLVM IR, only then run optimizing passes.

15 years agollvmpipe: Runtime cpu checks for lp_build_min_simple too.
José Fonseca [Tue, 29 Sep 2009 16:21:34 +0000 (17:21 +0100)]
llvmpipe: Runtime cpu checks for lp_build_min_simple too.

15 years agollvmpipe: Implement non SSE4.1 versions of floor and round.
José Fonseca [Tue, 29 Sep 2009 15:59:13 +0000 (16:59 +0100)]
llvmpipe: Implement non SSE4.1 versions of floor and round.