mesa.git
12 years agointel: add null src pointer check in intel_region_reference()
Brian Paul [Thu, 7 Jul 2011 23:29:28 +0000 (17:29 -0600)]
intel: add null src pointer check in intel_region_reference()

Fixes segfault when running cubemap demo on i945.  This happened
when intel_region_reference() was called in i915_set_draw_region()
with depth_region=NULL.

Reviewed-by: Eric Anholt <eric@anholt.net>
12 years agoglsl: use casts to silence warning
Brian Paul [Thu, 7 Jul 2011 22:47:59 +0000 (16:47 -0600)]
glsl: use casts to silence warning

12 years agoscons: Generate libGL.so.1.5 and libGL.so.1 symlinks.
José Fonseca [Thu, 7 Jul 2011 22:41:06 +0000 (23:41 +0100)]
scons: Generate libGL.so.1.5 and libGL.so.1 symlinks.

In build/xxx/src/gallium/targets/libgl-xlib/SConscript

12 years agointel: Fix use of freed buffer if glBitmap is called after a swap.
Eric Anholt [Wed, 6 Jul 2011 18:31:00 +0000 (11:31 -0700)]
intel: Fix use of freed buffer if glBitmap is called after a swap.

Regions looked up from the framebuffer are invalid after
intel_prepare_render().

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=30266
Tested-by: Thomas Jones <thomas.jones@utoronto.ca>
12 years agointel: Remove dead comment about software clears -- it's handled just above.
Eric Anholt [Thu, 7 Jul 2011 15:59:07 +0000 (08:59 -0700)]
intel: Remove dead comment about software clears -- it's handled just above.

12 years agoi915: Fix leak of ViewportMatrix data on context destroy.
John [Wed, 29 Jun 2011 18:45:04 +0000 (11:45 -0700)]
i915: Fix leak of ViewportMatrix data on context destroy.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=30217

12 years agointel: Remove gratuitous context checks in intel_delete_renderbuffer().
Eric Anholt [Wed, 29 Jun 2011 18:37:35 +0000 (11:37 -0700)]
intel: Remove gratuitous context checks in intel_delete_renderbuffer().

Even if we don't have a current context, if we're freeing the rb we
should free its region (and BO).  The renderbuffer unreference checks
appear to be just cargo-cult from the region unreference code.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=30217
Reviewed-by: Chad Versace <chad@chad-versace.us>
12 years agointel: Remove now trivial intel_renderbuffer_set_{hiz_,}region().
Eric Anholt [Wed, 29 Jun 2011 18:26:32 +0000 (11:26 -0700)]
intel: Remove now trivial intel_renderbuffer_set_{hiz_,}region().

As a result of this cleanup, a bug in
intel_process_dri2_buffer_no_separate_stencil() became quite apparent.
We were associating the NULL pointer after an unreference with the
STENCIL attachment -- clarify the logic and attach the right region.

Reviewed-by: Chad Versace <chad@chad-versace.us>
12 years agointel: Rely on intel_region_reference()'s support of *dst != NULL.
Eric Anholt [Wed, 29 Jun 2011 18:14:23 +0000 (11:14 -0700)]
intel: Rely on intel_region_reference()'s support of *dst != NULL.

Reviewed-by: Chad Versace <chad@chad-versace.us>
12 years agointel: Allow intel_region_reference() with *dst != NULL.
Eric Anholt [Wed, 29 Jun 2011 18:09:49 +0000 (11:09 -0700)]
intel: Allow intel_region_reference() with *dst != NULL.

This should help us avoid leaking regions in region reference code by
making the API more predictable.

Reviewed-by: Chad Versace <chad@chad-versace.us>
12 years agointel: Mark MESA_FORMAT_X8_Z24 as always supported.
Eric Anholt [Wed, 15 Jun 2011 19:02:12 +0000 (12:02 -0700)]
intel: Mark MESA_FORMAT_X8_Z24 as always supported.

This prevents developer surprise at seeing a GL_DEPTH_COMPONENT
texture have stencil bits, and avoids the metaops path accidentally
copying stencil bits around in glCopyTexImage(GL_DEPTH_COMPONENT) (and
being broken because swrast's glReadPixels(GL_UNSIGNED_INT_24_8) is
broken).

Acked-by: Chad Versace <chad@chad-versace.us>
12 years agoi965: Remove unused structures for command packets.
Kenneth Graunke [Thu, 30 Jun 2011 07:15:34 +0000 (00:15 -0700)]
i965: Remove unused structures for command packets.

We simply emit these using OUT_BATCH and bitshifting, as it results in
better compiled code than packed structures.  Since our documentation
is public, it's not terribly useful to keep these around for reference.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
12 years agoi965: Convert system instruction pointer to OUT_BATCH style.
Kenneth Graunke [Thu, 30 Jun 2011 07:11:39 +0000 (00:11 -0700)]
i965: Convert system instruction pointer to OUT_BATCH style.

Also rename it from CMD_STATE_INSN_POINTER to CMD_STATE_SIP to match the
documentation.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
12 years agoi965: Convert PIPELINE_SELECT to OUT_BATCH style.
Kenneth Graunke [Thu, 30 Jun 2011 07:05:49 +0000 (00:05 -0700)]
i965: Convert PIPELINE_SELECT to OUT_BATCH style.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
12 years agoi965: Emit 3DSTATE_VF_STATISTICS in OUT_BATCH style.
Kenneth Graunke [Thu, 30 Jun 2011 07:00:36 +0000 (00:00 -0700)]
i965: Emit 3DSTATE_VF_STATISTICS in OUT_BATCH style.

This is a little different from most because it's a single DWord;
there's no length field.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
12 years agoi965: Convert 3DSTATE_GLOBAL_DEPTH_OFFSET_CLAMP to OUT_BATCH style.
Kenneth Graunke [Thu, 30 Jun 2011 06:50:05 +0000 (23:50 -0700)]
i965: Convert 3DSTATE_GLOBAL_DEPTH_OFFSET_CLAMP to OUT_BATCH style.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
12 years agomesa: Fix the BindSampler unit limit.
Henri Verbeet [Sun, 3 Jul 2011 22:57:43 +0000 (00:57 +0200)]
mesa: Fix the BindSampler unit limit.

I'm not sure about this one. The current code actually follows the spec, but
considering the spec is supposed to be written against GL 3.2 I'd say the spec
is broken. I filled out a spec feedback form over a month ago, but either the
form is broken, or nobody cares.

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomesa: Fix a couple of TexEnv unit limits.
Henri Verbeet [Sun, 3 Jul 2011 22:57:42 +0000 (00:57 +0200)]
mesa: Fix a couple of TexEnv unit limits.

NOTE: This is a candidate for the 7.11 branch.

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomesa: Use the Elements macro for the sampler index assert in validate_samplers().
Henri Verbeet [Sun, 3 Jul 2011 22:57:42 +0000 (00:57 +0200)]
mesa: Use the Elements macro for the sampler index assert in validate_samplers().

This is probably nicer if the array size ever changes.

NOTE: This is a candidate for the 7.11 branch.

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomesa: Allow sampling from units >= MAX_TEXTURE_UNITS in shaders.
Henri Verbeet [Sun, 3 Jul 2011 22:57:42 +0000 (00:57 +0200)]
mesa: Allow sampling from units >= MAX_TEXTURE_UNITS in shaders.

The total number of units used by a shader is limited to MAX_TEXTURE_UNITS,
but the actual indices are only limited by MAX_COMBINED_TEXTURE_IMAGE_UNITS,
since they're shared between vertex and fragment shaders.

NOTE: This is a candidate for the 7.11 branch.

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomesa: Check the texture against all units in unbind_texobj_from_texunits().
Henri Verbeet [Sun, 3 Jul 2011 22:57:42 +0000 (00:57 +0200)]
mesa: Check the texture against all units in unbind_texobj_from_texunits().

NOTE: This is a candidate for the 7.11 branch.

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agonv50,nvc0: use screen instead of context for flush notifier
Christoph Bumiller [Thu, 7 Jul 2011 12:58:29 +0000 (14:58 +0200)]
nv50,nvc0: use screen instead of context for flush notifier

Context may become NULL and we still have to be able to flush
pending fences.

12 years agonv50: more formats for nv50_resource_copy_region conversion path
Christoph Bumiller [Tue, 28 Jun 2011 14:06:56 +0000 (16:06 +0200)]
nv50: more formats for nv50_resource_copy_region conversion path

It's not supposed to do conversion, but st sometimes asks us to.
Sometimes conversion is even wrong (e.g. between UNORM and SRGB).

This should now include all formats the 2D engine supports.

12 years agoi915g: Apply optimization to ADDS/MUL and only if we're not saturating.
Stéphane Marchesin [Thu, 7 Jul 2011 07:15:05 +0000 (00:15 -0700)]
i915g: Apply optimization to ADDS/MUL and only if we're not saturating.

12 years agost/xa: Fix up error reporting. Disable component alpha.
Thomas Hellstrom [Thu, 7 Jul 2011 08:18:24 +0000 (10:18 +0200)]
st/xa: Fix up error reporting. Disable component alpha.

Component alpha is temporarily disabled since it seems a bit buggy.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
12 years agost/xa: Fix render to xa_format_a8, which is backed by a gallium L8 texture
Thomas Hellstrom [Wed, 6 Jul 2011 19:58:33 +0000 (21:58 +0200)]
st/xa: Fix render to xa_format_a8, which is backed by a gallium L8 texture

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
12 years agoi915g: move code after declaration
Brian Paul [Wed, 6 Jul 2011 23:18:32 +0000 (17:18 -0600)]
i915g: move code after declaration

12 years agolinker: Assign locations for fragment shader output
Ian Romanick [Tue, 28 Jun 2011 00:59:58 +0000 (17:59 -0700)]
linker: Assign locations for fragment shader output

Fixes an assertion failure in the piglib out-01.frag
ARB_explicit_attrib_location test.  The locations set via the layout
qualifier in fragment shader were not being applied to the shader
outputs.  As a result all of these variables still had a location of
-1 set.

This may need some more work for pre-3.0 contexts.  The problem is
dealing with generic outputs that lack a layout qualifier.  There is
no way for the application to specify a location
(glBindFragDataLocation is not supported) or query the location
assigned by the linker (glGetFragDataLocation is not supported).

NOTE: This is a candidate for the 7.10 and 7.11 branches.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38624
Reviewed-by: Eric Anholt <eric@anholt.net>
Cc: Kenneth Graunke <kenneth@whitecape.org>
Cc: Vinson Lee <vlee@vmware.com>
12 years agoglsl: Don't choke when printing an anonymous function parameter
Ian Romanick [Sat, 25 Jun 2011 00:30:41 +0000 (17:30 -0700)]
glsl: Don't choke when printing an anonymous function parameter

NOTE: This is a candidate for the 7.10 and 7.11 branches.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38584
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoir_to_mesa: Allocate temporary instructions on the visitor's ralloc context
Ian Romanick [Sat, 25 Jun 2011 00:12:31 +0000 (17:12 -0700)]
ir_to_mesa: Allocate temporary instructions on the visitor's ralloc context

And don't delete them.  Let ralloc clean them up.  Deleting the
temporary IR leaves dangling references in the prog_instruction.  That
results in a bad dereference when printing the IR with MESA_GLSL=dump.

NOTE: This is a candidate for the 7.10 and 7.11 branches.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38584
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoglsl: Track initial mask in constant propagation live set
Ian Romanick [Mon, 27 Jun 2011 23:33:13 +0000 (16:33 -0700)]
glsl: Track initial mask in constant propagation live set

The set of values initially available (before any kills) must be
tracked with each constant in the set.  Otherwise the wrong component
can be selected after earlier components have been killed.

NOTE: This is a candidate for the 7.10 and 7.11 branches.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=37383
Reviewed-by: Eric Anholt <eric@anholt.net>
Cc: Kenneth Graunke <kenneth@whitecape.org>
Cc: Matthias Bentrup <matthias.bentrup@googlemail.com>
12 years agoi915g: Fix optimize so that it actually gets used.
Stéphane Marchesin [Wed, 6 Jul 2011 21:10:51 +0000 (14:10 -0700)]
i915g: Fix optimize so that it actually gets used.

12 years agomesa: fix texstore addressing bugs for depth/stencil formats
Brian Paul [Wed, 6 Jul 2011 21:04:17 +0000 (15:04 -0600)]
mesa: fix texstore addressing bugs for depth/stencil formats

Using GLuint pointers worked when the pixel size was four bytes
or the row stride was a multiple of four but was otherwise broken.
Fixes failures found with the piglit fbo-stencil test.

This helps to fix https://bugs.freedesktop.org/show_bug.cgi?id=38729

NOTE: This is a candidate for the 7.11 branch.

12 years agosoftpipe: add missing stencil format case in convert_quad_stencil()
Brian Paul [Wed, 6 Jul 2011 21:02:58 +0000 (15:02 -0600)]
softpipe: add missing stencil format case in convert_quad_stencil()

Part of the fix for https://bugs.freedesktop.org/show_bug.cgi?id=38729

NOTE: This is a candidate for the 7.11 branch

12 years agotgsi: add some debug/print code in exec_tex(), disabled
Brian Paul [Wed, 6 Jul 2011 21:02:25 +0000 (15:02 -0600)]
tgsi: add some debug/print code in exec_tex(), disabled

12 years agosoftpipe: minor clean-ups in sp_quad_depth_test.c
Brian Paul [Wed, 6 Jul 2011 18:15:10 +0000 (12:15 -0600)]
softpipe: minor clean-ups in sp_quad_depth_test.c

12 years agoi915g: Fix optimization, also make it more generic.
Stéphane Marchesin [Wed, 6 Jul 2011 18:44:19 +0000 (11:44 -0700)]
i915g: Fix optimization, also make it more generic.

12 years agomesa: Don't error on glFeedbackBuffer(size = 0, buffer = NULL)
Eric Anholt [Tue, 28 Jun 2011 23:39:15 +0000 (16:39 -0700)]
mesa: Don't error on glFeedbackBuffer(size = 0, buffer = NULL)

The existing error result doesn't appear in the GL 2.1 or 3.2
compatibility specs, and triggers an unexpected GL error in Intel's
oglconform when it tries to reset the feedback state after usage so
that the "diff the state at error time vs. context init time" code
doesn't generate spurious diffs.  The unexpected GL error then
translates into testcase failure.  Brian wants the safety check on
buffer = NULL, though, so that people can't as easily set up a broken
buffer.

12 years agomesa: Don't skip glGetProgramLocalParam4dvARB if there was already an error.
Eric Anholt [Tue, 28 Jun 2011 22:04:22 +0000 (15:04 -0700)]
mesa: Don't skip glGetProgramLocalParam4dvARB if there was already an error.

Like the previous commit, but fixes
ARB_vertex_program/getlocal4d-with-error.

v2: Move the success case line into the conditional, use ASSIGN_4V more.

12 years agomesa: Don't skip glGetProgramEnvParam4dvARB if there was already an error.
Eric Anholt [Tue, 28 Jun 2011 20:55:44 +0000 (13:55 -0700)]
mesa: Don't skip glGetProgramEnvParam4dvARB if there was already an error.

Fixes a bug caught by oglconform, and now piglit
ARB_vertex_program/getenv4d-with-error.  The wrapping of an existing
GL function made it so that we couldn't distinguish an error in
looking up our arguments from an existing error.  Instead, make a
helper function to choose the param, and use it from multiple callers.

v2: Move the success case line into the conditional, use COPY_4V more.

12 years agoglsl: Suppress warning from matching_signature change.
Eric Anholt [Wed, 6 Jul 2011 05:02:33 +0000 (22:02 -0700)]
glsl: Suppress warning from matching_signature change.

gcc isn't smart enough to see that we only look at matched_score after
we've initialized it (because match != NULL happens at the same time)

12 years agoglsl: Fix make clean for dricore.
Eric Anholt [Wed, 6 Jul 2011 04:59:33 +0000 (21:59 -0700)]
glsl: Fix make clean for dricore.

12 years agoi965/fs: Fix message register allocation in FB writes.
Kenneth Graunke [Wed, 29 Jun 2011 23:47:30 +0000 (16:47 -0700)]
i965/fs: Fix message register allocation in FB writes.

Commit 6750226e6d915742ebf96bae2cfcdd287b85db35 bumped the base MRF to
m2 instead of m0, but failed to adjust inst->mlen, which was being set
to the highest MRF.  Subtracting the base MRF solves the issue.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
12 years agoFixes for leaks reported by cppcheck.
Völgyes Dávid [Wed, 6 Jul 2011 14:10:20 +0000 (10:10 -0400)]
Fixes for leaks reported by cppcheck.

12 years agoi915g: Improve flushing using heuristics.
Stéphane Marchesin [Wed, 6 Jul 2011 09:19:48 +0000 (02:19 -0700)]
i915g: Improve flushing using heuristics.

12 years agoi915g: introduce the tiny shader optimizer.
Stéphane Marchesin [Tue, 5 Jul 2011 03:21:37 +0000 (20:21 -0700)]
i915g: introduce the tiny shader optimizer.

12 years agoi915g: Add comment about DDX/DDY.
Stéphane Marchesin [Mon, 4 Jul 2011 02:44:02 +0000 (19:44 -0700)]
i915g: Add comment about DDX/DDY.

12 years agoi915g: Move back to the old method for target format fixup.
Stéphane Marchesin [Mon, 4 Jul 2011 02:43:19 +0000 (19:43 -0700)]
i915g: Move back to the old method for target format fixup.

12 years agor600g: fix buffer overflow check in r600_query_begin
Vadim Girlin [Mon, 4 Jul 2011 14:30:42 +0000 (18:30 +0400)]
r600g: fix buffer overflow check in r600_query_begin

12 years agor600g: fix bo map usage flags in r600_query_begin
Vadim Girlin [Mon, 4 Jul 2011 14:30:41 +0000 (18:30 +0400)]
r600g: fix bo map usage flags in r600_query_begin

12 years agor600g: reduce flushes for queries
Vadim Girlin [Mon, 4 Jul 2011 14:30:40 +0000 (18:30 +0400)]
r600g: reduce flushes for queries

12 years agor600g: fix buffer offset in r600_query_begin
Vadim Girlin [Mon, 4 Jul 2011 14:30:39 +0000 (18:30 +0400)]
r600g: fix buffer offset in r600_query_begin

12 years agor600g: Get rid of the state_inlines headers.
Henri Verbeet [Mon, 4 Jul 2011 23:58:47 +0000 (01:58 +0200)]
r600g: Get rid of the state_inlines headers.

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
12 years agor600g: Get rid of an unused include in r600_texture.c.
Henri Verbeet [Mon, 4 Jul 2011 23:58:46 +0000 (01:58 +0200)]
r600g: Get rid of an unused include in r600_texture.c.

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
12 years agor600g: Get rid of some unused functions.
Henri Verbeet [Mon, 4 Jul 2011 23:58:46 +0000 (01:58 +0200)]
r600g: Get rid of some unused functions.

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
12 years agor600g: Use the actual Evergreen functions to query format support on Evergreen.
Henri Verbeet [Mon, 4 Jul 2011 23:58:46 +0000 (01:58 +0200)]
r600g: Use the actual Evergreen functions to query format support on Evergreen.

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
12 years agor600g: Get rid of the unused "family" parameter to r600_is_vertex_format_supported().
Henri Verbeet [Mon, 4 Jul 2011 23:58:46 +0000 (01:58 +0200)]
r600g: Get rid of the unused "family" parameter to r600_is_vertex_format_supported().

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
12 years agodraw: Fix fetch_max calculation.
José Fonseca [Mon, 4 Jul 2011 11:31:30 +0000 (12:31 +0100)]
draw: Fix fetch_max calculation.

It should be

 max_index = start + count - 1

instead of

 max_index = count - 1

12 years agoMerge branch 'xa_branch'
Thomas Hellstrom [Mon, 4 Jul 2011 08:21:35 +0000 (10:21 +0200)]
Merge branch 'xa_branch'

Conflicts:
configure.ac

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
12 years agost/glx: Fix endless loop in drawable validation
Thomas Hellstrom [Sat, 2 Jul 2011 08:37:17 +0000 (10:37 +0200)]
st/glx: Fix endless loop in drawable validation

This fixes a regression introduced with commit

"st-api: Rework how drawables are invalidated v3"

where the glx state tracker manager would invalidate a drawable each time it
checks the drawable dimensions, even during a validate call, which
resulted in an endless loop, since the state tracker would immediately
detect the new invalidation and rerun the validate...

This change marks the drawable invalid only if the drawable dimensions actually
changed during the validate, which will result in at most a single
unnecessary validate by the context running a validate during which the
dimensions changed.

To avoid unnecessary validates altogether, we need to implement yet another
st-api change: Returning the current time stamp from the validate function,
as suggested by Chia-I Wu. The glx state tracker manager could then return
the stamp resulting from the last drawable dimension check.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
12 years agost/xa: Fix crosscompile builds with nonstandard ld locations
Thomas Hellstrom [Mon, 4 Jul 2011 07:26:27 +0000 (09:26 +0200)]
st/xa: Fix crosscompile builds with nonstandard ld locations

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
12 years agoxa-vmwgfx: Remove unnecessary include
Thomas Hellstrom [Mon, 4 Jul 2011 07:24:19 +0000 (09:24 +0200)]
xa-vmwgfx: Remove unnecessary include

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
12 years agor600g: Support the PIPE_FORMAT_R16_FLOAT colorformat.
Henri Verbeet [Sun, 3 Jul 2011 20:29:34 +0000 (22:29 +0200)]
r600g: Support the PIPE_FORMAT_R16_FLOAT colorformat.

NOTE: This is a candidate for the 7.11 branch.

12 years agoconfigure: Require libudev for drm & wayland egl platforms
Benjamin Franzke [Sat, 2 Jul 2011 11:46:42 +0000 (13:46 +0200)]
configure: Require libudev for drm & wayland egl platforms

NOTE: This is a candidate for the 7.11 branch.

12 years agoconfigure: Fix typo in gbm check for egl drm platform
Benjamin Franzke [Sat, 2 Jul 2011 11:46:09 +0000 (13:46 +0200)]
configure: Fix typo in gbm check for egl drm platform

NOTE: This is a candidate for the 7.11 branch.

12 years agoconfigure: Enable st/gbm if st/egl has drm platform
Benjamin Franzke [Sat, 2 Jul 2011 11:45:14 +0000 (13:45 +0200)]
configure: Enable st/gbm if st/egl has drm platform

NOTE: This is a candidate for the 7.11 branch.

12 years agoegl_dri2: Fix compilation if udev devel files are not installed
Benjamin Franzke [Sat, 2 Jul 2011 11:41:35 +0000 (13:41 +0200)]
egl_dri2: Fix compilation if udev devel files are not installed

NOTE: This is a candidate for the 7.11 branch.

12 years agoegl: add copyright notices
Chia-I Wu [Sat, 2 Jul 2011 08:57:30 +0000 (17:57 +0900)]
egl: add copyright notices

The list of copyright holders could be incomplete.  Please update
directly or notify me if your name is missing.

12 years agoautoconf: swrast does not require libdrm
Chia-I Wu [Sat, 2 Jul 2011 00:49:17 +0000 (09:49 +0900)]
autoconf: swrast does not require libdrm

This fixes

  $ ./configure --disable-driglx-direct \
                --with-dri-drivers=swrast \
                --with-gallium-drivers=

12 years agoscons: Disable saving options automatically.
José Fonseca [Fri, 1 Jul 2011 18:04:57 +0000 (19:04 +0100)]
scons: Disable saving options automatically.

It makes things too random, as settings for temporary trials get stored
permannently, and it make difficult to build several platforms from the
same tree.

So disable it, again.

12 years agosvga: Use the correct element size.
José Fonseca [Fri, 1 Jul 2011 16:06:58 +0000 (17:06 +0100)]
svga: Use the correct element size.

Instead of always using the first element's size.

This fixes flashing floor on CINEBENCH R10.

12 years agou_upload_mgr: Use pipe_buffer_map_range istead of pipe_buffer_map.
José Fonseca [Fri, 1 Jul 2011 16:05:30 +0000 (17:05 +0100)]
u_upload_mgr: Use pipe_buffer_map_range istead of pipe_buffer_map.

pipe_buffer_map_range makes stricter assertions, and would have saved us
grief detecting a bug in svga user buffer uploads.

12 years agoGallium: fix buffer overflow
Micael Dias [Thu, 30 Jun 2011 02:33:47 +0000 (03:33 +0100)]
Gallium: fix buffer overflow

Signed-off-by: José Fonseca <jfonseca@vmware.com>
12 years agodriclient: Remove
Kristian Høgsberg [Fri, 1 Jul 2011 13:34:34 +0000 (09:34 -0400)]
driclient: Remove

Not used or maintained.  We talked about removing it a few releases ago,
there were no objections but it just never happened.  Now it's gone.

12 years agoscons: Actually add src/glx/SConscript.
José Fonseca [Fri, 1 Jul 2011 12:51:18 +0000 (13:51 +0100)]
scons: Actually add src/glx/SConscript.

12 years agosvga: Fix multiple uploads of the same user-buffer.
Thomas Hellstrom [Thu, 30 Jun 2011 06:52:19 +0000 (08:52 +0200)]
svga: Fix multiple uploads of the same user-buffer.

If a user-buffer was referenced twice by a draw command, the affected ranges
were uploaded separately, with only the last one being referenced by the
hardware. Make sure we upload only a single range.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
12 years agosvga: Ignore redefine_user_buffer calls
Thomas Hellstrom [Wed, 29 Jun 2011 11:17:02 +0000 (13:17 +0200)]
svga: Ignore redefine_user_buffer calls

We currently always treat contents of user-buffers as volatile so
we don't need to take any particular action when the state tracker
announces that the contents has changed.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
12 years agosvga: fix incorrect user buffer size computation for instance divisor case
Brian Paul [Thu, 16 Jun 2011 16:31:53 +0000 (10:31 -0600)]
svga: fix incorrect user buffer size computation for instance divisor case

See preceeding commit for more info.

12 years agosvga: fix incorrect user buffer size computation
Brian Paul [Wed, 15 Jun 2011 22:41:13 +0000 (16:41 -0600)]
svga: fix incorrect user buffer size computation

Viewperf uses some unusual vertex arrays where the stride is less
than the element size.  In this case, the stride was 4 while the
element size was 12.  The difference of 8 bytes causes us to miss
uploading the tail bit of the array data.

Typically the stride is >= the element size so there was no problem
with other apps.

12 years agosvga: Handle null buffers in svga_buffer_is_user_buffer().
José Fonseca [Tue, 31 May 2011 12:33:34 +0000 (13:33 +0100)]
svga: Handle null buffers in svga_buffer_is_user_buffer().

12 years agogallium/svga: Upload only parts of user-buffers that we actually use
Thomas Hellstrom [Thu, 17 Mar 2011 20:09:38 +0000 (21:09 +0100)]
gallium/svga: Upload only parts of user-buffers that we actually use

Stream user buffer contents rather than trying to maintain persistent
host / hardware copies.
Resulting negative array offsets are not allowed by the hardware,
(well, at least not according to header files), so adjust index bias
to make all array offsets positive.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
12 years agogallium/svga: Make use of u_upload_flush().
Thomas Hellstrom [Thu, 17 Mar 2011 14:09:48 +0000 (15:09 +0100)]
gallium/svga: Make use of u_upload_flush().

This enables us to pack more data into single upload buffers.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
12 years agogallium/util: Upload manager optimizations
Thomas Hellstrom [Thu, 10 Mar 2011 13:53:46 +0000 (14:53 +0100)]
gallium/util: Upload manager optimizations

Make sure that the upload manager doesn't upload data that's not
dirty. This speeds up the viewperf test proe-04/1 a factor 5 or so on svga.

Also introduce an u_upload_unmap() function that can be used
instead of u_upload_flush() so that we can pack
even more data in upload buffers. With this we can basically reuse the
upload buffer across flushes.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
12 years agosvga: Flush when switching between HW to SW TNL, after updating need_swtnl.
José Fonseca [Thu, 17 Mar 2011 16:08:21 +0000 (16:08 +0000)]
svga: Flush when switching between HW to SW TNL, after updating need_swtnl.

Also, only flush when going from HW TNL to SW TNL, given it is impossible
for the buffers resulting from SWTNL to be ever referred by HW TNL path.

12 years agoegl: fix a compiler warning
Chia-I Wu [Fri, 1 Jul 2011 09:12:16 +0000 (18:12 +0900)]
egl: fix a compiler warning

12 years agost/egl: fix a typo
Chia-I Wu [Fri, 1 Jul 2011 09:13:38 +0000 (18:13 +0900)]
st/egl: fix a typo

Wrong goto labels.

12 years agost/egl: remove unused header
Chia-I Wu [Fri, 1 Jul 2011 09:19:31 +0000 (18:19 +0900)]
st/egl: remove unused header

12 years agoautoconf: fix --disable-glx
Chia-I Wu [Mon, 27 Jun 2011 00:19:02 +0000 (09:19 +0900)]
autoconf: fix --disable-glx

libdrm is used in multiple places.  Always check for it and set
have_libdrm.  Each user can then check the variable.

This is useful when only EGL and DRI drivers are needed.

12 years agoautoconf: fix --disable-dri
Chia-I Wu [Mon, 27 Jun 2011 04:06:39 +0000 (13:06 +0900)]
autoconf: fix --disable-dri

Define GLX_INDIRECT_RENDERING and GLX_DIRECT_RENDERING when $enable_glx,
not $enable_dri.

12 years agoautoconf: add --enable-{dri,glx,osmesa}
Chia-I Wu [Sun, 26 Jun 2011 04:24:32 +0000 (13:24 +0900)]
autoconf: add --enable-{dri,glx,osmesa}

The idea is that DRI driver, libGL and libOSMesa are libraries that can
be independently enabled, yet --with-driver does not allow us to easily
do that, if not impossible.  This also matches what
--enable-{egl,xorg,d3d1x} do for the respective libraries.

There are two libGL providers: Xlib-based and DRI-based.  They cannot
coexist.  To be able to choose between them, --enable-xlib-glx is also
added.

With this commit, --with-driver=dri can be replaced by

  $ ./configure --enable-dri --enable-glx --disable-osmesa

--with-driver=xlib can be replaced by

  $ ./configure --disable-dri --enable-glx --enable-osmesa \
                --enable-xlib-glx

and --with-driver=osmesa can be replaced by

  $ ./configure --disable-dri --disable-glx --enable-osmesa

Some combinations that cannot be supported with --with-driver will
produce errors at the moment.  But in the future, we would like to
support, for example,

  $ ./configure --enable-dri --disable-glx --enable-egl
  (build libEGL and DRI drivers, but not libGL)

Note that this commit still keeps --with-driver for transitional
purpose.

12 years agogallivm: Pass in CPU name to createTargetMachine when on llvm-3.0.
Vinson Lee [Thu, 30 Jun 2011 22:48:41 +0000 (15:48 -0700)]
gallivm: Pass in CPU name to createTargetMachine when on llvm-3.0.

llvm-3.0svn revision 134127 changed createTargetMachine to take in
an additional argument of the CPU name.

12 years agogallivm: Rename TargetInstrDesc to MCInstrDesc when using llvm-3.0.
Vinson Lee [Thu, 30 Jun 2011 22:07:57 +0000 (15:07 -0700)]
gallivm: Rename TargetInstrDesc to MCInstrDesc when using llvm-3.0.

llvm-3.0svn revision 134021 renamed TargetInstrDesc to MCInstrDesc.

12 years agodocs: add GL3 GLX todo
Marek Olšák [Thu, 30 Jun 2011 20:53:13 +0000 (22:53 +0200)]
docs: add GL3 GLX todo

12 years agor600g: fix check for empty cs
Vadim Girlin [Wed, 29 Jun 2011 12:29:18 +0000 (16:29 +0400)]
r600g: fix check for empty cs

12 years agodocs: update GL3 status - vertex textures
Marek Olšák [Thu, 30 Jun 2011 19:27:46 +0000 (21:27 +0200)]
docs: update GL3 status - vertex textures

They work fine on r600g.

12 years agoscons: Expose pkg-config in a simpler manner.
José Fonseca [Thu, 30 Jun 2011 16:36:37 +0000 (17:36 +0100)]
scons: Expose pkg-config in a simpler manner.

12 years agoscons: Buid libGL.so (WIP).
José Fonseca [Fri, 17 Jun 2011 19:12:18 +0000 (20:12 +0100)]
scons: Buid libGL.so (WIP).

12 years agoscons: Make declaration-after-statement and pointer-arith just warnings.
José Fonseca [Thu, 30 Jun 2011 09:43:57 +0000 (10:43 +0100)]
scons: Make declaration-after-statement and pointer-arith just warnings.

Necessary, in order to build the whole tree.

12 years agoi915g: Implement surface format fixup without adding an extra instruction.
Stéphane Marchesin [Thu, 30 Jun 2011 09:05:50 +0000 (02:05 -0700)]
i915g: Implement surface format fixup without adding an extra instruction.

We also avoid writing output color twice, which might not work when we run out of phases.

12 years agoi915g: update TODO.
Stéphane Marchesin [Thu, 30 Jun 2011 04:59:01 +0000 (21:59 -0700)]
i915g: update TODO.