profile/ivi/mesa.git
13 years agoglsl/opt_cpe: Fix a crash when a kill kills for two reasons.
Eric Anholt [Fri, 8 Apr 2011 17:54:50 +0000 (07:54 -1000)]
glsl/opt_cpe: Fix a crash when a kill kills for two reasons.

Fixes glsl-copy-propagation-loop-2 when this optimization pass is
re-enabled.

Reported-by: David Lamparter <equinox@diac24.net>
13 years agoglsl/opt_cpe: Kill when the assignment isn't something we recognize.
Eric Anholt [Sun, 3 Apr 2011 03:17:17 +0000 (20:17 -0700)]
glsl/opt_cpe: Kill when the assignment isn't something we recognize.

A few GLES2 tests tripped over this when using array dereferences to
hit channels on the LHS (see piglit test
glsl-copy-propagation-vector-indexing).  We wouldn't find the
ir_dereference_variable, and assume that that meant that it wasn't an
assignment to a scalar/vector, and thus not notice that the variable
had been changed.

13 years agosvga: defined QSZ in terms of SVGA3D_MAX_DRAW_PRIMITIVE_RANGES
Brian Paul [Wed, 13 Apr 2011 15:50:48 +0000 (09:50 -0600)]
svga: defined QSZ in terms of SVGA3D_MAX_DRAW_PRIMITIVE_RANGES

13 years agosvga: define SVGA3D_MAX_DRAW_PRIMITIVE_RANGES and update comments
Brian Paul [Wed, 13 Apr 2011 15:52:16 +0000 (09:52 -0600)]
svga: define SVGA3D_MAX_DRAW_PRIMITIVE_RANGES and update comments

13 years agost/mesa: minor clean-ups in update_textures()
Brian Paul [Wed, 13 Apr 2011 13:37:03 +0000 (07:37 -0600)]
st/mesa: minor clean-ups in update_textures()

13 years agomesa: 80-column wrapping and whitespace fixes
Brian Paul [Wed, 13 Apr 2011 13:35:25 +0000 (07:35 -0600)]
mesa: 80-column wrapping and whitespace fixes

13 years agomesa: fix some comments in sampler object code
Brian Paul [Wed, 13 Apr 2011 13:35:25 +0000 (07:35 -0600)]
mesa: fix some comments in sampler object code

13 years agoi965: Change assertion condition from implicit to explicit
Chad Versace [Thu, 7 Apr 2011 16:09:38 +0000 (09:09 -0700)]
i965: Change assertion condition from implicit to explicit

... because grokking explicit assertions requires fewer neurons.

In brw_misc_state.c:emit_depthbuffer, change assertion condition
    tiling != I915_TILING_X && tiling != I915_TILING_NONE
to
    tiling == I915_TILING_Y

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Chad Versace <chad.versace@intel.com>
13 years agoi965: Define BRW_DEPTHFORMAT_D24_UNORM_X8_UINT
Chad Versace [Sun, 27 Mar 2011 15:44:50 +0000 (08:44 -0700)]
i965: Define BRW_DEPTHFORMAT_D24_UNORM_X8_UINT

This depth format was added in Gen5.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Chad Versace <chad.versace@intel.com>
13 years agoi965: Document brw_context.state.depth_region
Chad Versace [Thu, 7 Apr 2011 23:32:23 +0000 (16:32 -0700)]
i965: Document brw_context.state.depth_region

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Chad Versace <chad.versace@intel.com>
13 years agoi965: Remove unnecessary release/reference of brw_context.state.depth_region
Chad Versace [Thu, 7 Apr 2011 22:44:24 +0000 (15:44 -0700)]
i965: Remove unnecessary release/reference of brw_context.state.depth_region

Release the old depth region and reference the new one *only* if it has
changed.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Chad Versace <chad.versace@intel.com>
13 years agoi965: Add comments about URB size units and limits.
Kenneth Graunke [Tue, 12 Apr 2011 22:21:21 +0000 (15:21 -0700)]
i965: Add comments about URB size units and limits.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agoi965: Never enable the GS on Gen6.
Kenneth Graunke [Mon, 11 Apr 2011 18:00:03 +0000 (11:00 -0700)]
i965: Never enable the GS on Gen6.

Prior to Gen6, we use the GS for breaking down quads, quad-strips,
and line loops.  On Gen6, earlier stages already take care of this,
so we never need the GS.

Since this code is likely completely untested, remove it for now.
We can write new code when enabling real geometry shaders.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
13 years agoRevert "i965: Reinstate max-index paranoia"
Chris Wilson [Tue, 12 Apr 2011 18:13:22 +0000 (19:13 +0100)]
Revert "i965: Reinstate max-index paranoia"

This reverts commit b4cbd2b312d53a50603e2cda925711bc9def4517.

It looked like a safe sanity check. It missed the issue of the start of
the buffer not being at 0, but even that was not enough to explain why
setting the max vertex index caused glyphs to be dropped from the game
'Achron'.

Instead, the issue appears to be related to the use of the vertex bias
and so we would need to re-emit the max-index every time we adjusted the
bias, so re-emitting the relocations and defeating the original
optimisation.

Reported-and-tested-by: Thomas Jones <thomas.jones@utoronto.ca>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=35163
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agoegl/wayland: Update to per-surface frame events
Benjamin Franzke [Wed, 16 Mar 2011 12:49:38 +0000 (13:49 +0100)]
egl/wayland: Update to per-surface frame events

13 years agonouveau_vieux: fix build since sampler objects merge
Dave Airlie [Tue, 12 Apr 2011 11:20:48 +0000 (21:20 +1000)]
nouveau_vieux: fix build since sampler objects merge

13 years agost/wgl: Prevent spurious framebuffer sizes when the window is minimized.
José Fonseca [Thu, 7 Apr 2011 18:15:55 +0000 (19:15 +0100)]
st/wgl: Prevent spurious framebuffer sizes when the window is minimized.

When the window is minimized GetClientRect will return zeros.

Instead of creating a 1x1 framebuffer, simply preserve the current window
size, until the window is restored or maximized again.

13 years agost/wgl: Fix debug output format specifiers of stw_framebuffer_get_size().
José Fonseca [Thu, 7 Apr 2011 17:20:38 +0000 (18:20 +0100)]
st/wgl: Fix debug output format specifiers of stw_framebuffer_get_size().

13 years agosvga: Rebind framebuffer and tss bindings strictly when necessary.
José Fonseca [Thu, 7 Apr 2011 15:54:37 +0000 (16:54 +0100)]
svga: Rebind framebuffer and tss bindings strictly when necessary.

The earlier change to ensure rendertargets and textures are always
rebound at every command buffer start had the downside of making
successive flushes no longer no-ops, as a command buffer with merely
the rebinding commands were being unnecessarily sent to the vGPU.

This change only re-emits the bindings when necessary, by keeping track
of the need to rebind outside of the dirty state update mechanism.

13 years agotexstore: fix regression stricter check for memcpy path for unorm88 and unorm1616
Hans de Goede [Sun, 10 Apr 2011 20:21:03 +0000 (22:21 +0200)]
texstore: fix regression stricter check for memcpy path for unorm88 and unorm1616

According to https://bugs.freedesktop.org/show_bug.cgi?id=34280
commit 5d1387b2da3626326410804026f8b92f1a121fdc causes the font corruption
problems people have been seeing under various apps and gnome-shell on r200
cards.

This commit changed (loosened) the check for using the memcpy path in the
former al88 / al1616 texstore functions, which are now also used to
store rg texures. This patch restores the old strict check in case of
al textures. I've no idea why this fixes things, since I don't know the
code in question at all. But after seeing the bisect in bfdo34280 point
to this commit, I gave this fix a try and it fixes the font issues seen on
r200 cards.

[airlied:
r200 has no native working A8, so it does an internal storage format of AL88
however srcFormat == internalFormat == ALPHA when we get to this point,
so it copies, but it wants to store into an AL88 not ALPHA so fails,
I'll also push a piglit test for this on r200].

Many thanks to Nicolas Kaiser who did all the hard work of tracking this down!

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years ago ir_to_mesa: silence signed/unsigned comparison warnings
Brian Paul [Tue, 12 Apr 2011 03:29:06 +0000 (21:29 -0600)]
 ir_to_mesa: silence signed/unsigned comparison warnings

13 years agoconfigs: add r600 dir to DRI_DIRS
Brian Paul [Tue, 12 Apr 2011 03:23:14 +0000 (21:23 -0600)]
configs: add r600 dir to DRI_DIRS

13 years agor600: silence various compiler warnings
Brian Paul [Tue, 12 Apr 2011 03:22:54 +0000 (21:22 -0600)]
r600: silence various compiler warnings

13 years agoMerge branch 'arb_sampler_objects'
Brian Paul [Tue, 12 Apr 2011 03:19:41 +0000 (21:19 -0600)]
Merge branch 'arb_sampler_objects'

13 years agoRevert "i965: clear global offset to zero in m0.2 for VS DP read."
Zou Nan hai [Tue, 12 Apr 2011 02:52:50 +0000 (10:52 +0800)]
Revert "i965:   clear global offset to zero in m0.2 for VS DP read."

This reverts commit 66b66295d0bc856c69fdcccc22575580c7ecee16.
it was already fixed by commit 9d60a7ce08a67eb8b79c60f829d090ba4a37ed7e

13 years agoi965: Remove hint_gs_always and resulting dead code
Ian Romanick [Sat, 9 Apr 2011 01:06:35 +0000 (18:06 -0700)]
i965: Remove hint_gs_always and resulting dead code

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agointel: Fix ROUND_DOWN_TO macro
Ian Romanick [Fri, 8 Apr 2011 23:31:22 +0000 (16:31 -0700)]
intel: Fix ROUND_DOWN_TO macro

Previously the macro would (ALIGN(value - alignment - 1, alignment)).
At the very least, this was missing parenthesis around "alignment -
1".  As a result, if value was already aligned, it would be reduced by
alignment.  Condisder:

     x = ROUND_DOWN_TO(256, 128);

This becomes:

    x = ALIGN(256 - 128 - 1, 128);

Or:

    x = ALIGN(127, 128);

Which becomes:

    x = 128;

This macro is currently only used in brw_state_batch
(brw_state_batch.c).  It looks like the original version of this macro
would just use too much space in the batch buffer.  It's possible, but
not at all clear to me from the code, that the original behavior is
actually desired.

In any case, this patch does not cause any piglit regressions on my
Ironlake system.

I also think that ALIGN_FLOOR would be a better name for this macro,
but ROUND_DOWN_TO matches rounddown in the Linux kernel.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Whitwell <keithw@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agoglsl: Make GL_ARB_shader_stencil_export enable block be similar to other blocks
Ian Romanick [Fri, 8 Apr 2011 19:43:53 +0000 (12:43 -0700)]
glsl: Make GL_ARB_shader_stencil_export enable block be similar to other blocks

Tested-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agoglsl: Only let a shader enable GL_ARB_draw_instanced if the driver supports it
Ian Romanick [Fri, 8 Apr 2011 19:41:42 +0000 (12:41 -0700)]
glsl: Only let a shader enable GL_ARB_draw_instanced if the driver supports it

Also make the GL_ARB_draw_instanced block follow the same pattern as
the other blocks.

Tested-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agomesa: fixup r600 DRI driver for sampler object changes
Brian Paul [Mon, 11 Apr 2011 19:26:42 +0000 (13:26 -0600)]
mesa: fixup r600 DRI driver for sampler object changes

13 years agoi965: Move the SF VP from state caching to state streaming.
Eric Anholt [Wed, 9 Mar 2011 21:18:30 +0000 (13:18 -0800)]
i965: Move the SF VP from state caching to state streaming.

This is a 49.6% +/- 2.0% (n=9, IPS outlier removed) performance
improvement for the hacked-up-for-cache-misses scissor-many, and no
statistically significant performance difference for the
hacked-up-for-cache-hits version (n=9, IPS outlier removed).  No
statistically significant performance difference from ETQW (n=5) from
these last two commits.

13 years agoi965: Change the SF unit from state caching to state streaming.
Eric Anholt [Wed, 9 Mar 2011 19:11:04 +0000 (11:11 -0800)]
i965: Change the SF unit from state caching to state streaming.

This is a 28.1% +/- 1.4% (n=10) performance improvement for the
hacked-up-for-cache-misses scissor-many (n=10), and no statistically
significant wall-time performance difference for the
hacked-up-for-cache-hits version (n=9, first outlier in each removed
since IPS was warming up.  User time increased by about 4.7%, but
kernel time decreased equivalently).

13 years agoi965: Turn SF unit and viewport structs into pointers to prep for streaming.
Eric Anholt [Wed, 9 Mar 2011 18:51:52 +0000 (10:51 -0800)]
i965: Turn SF unit and viewport structs into pointers to prep for streaming.

I wanted to separate this mechanical change from the actual work.

13 years agou_vbuf_mgr: fixed vbo max_index calculation
pepp [Mon, 11 Apr 2011 15:16:45 +0000 (17:16 +0200)]
u_vbuf_mgr: fixed vbo max_index calculation

Signed-off-by: Marek Olšák <maraeo@gmail.com>
13 years agor600g: handle PIPE_CAP_FRAGMENT_COLOR_CLAMP_CONTROL in get_param
Marek Olšák [Mon, 11 Apr 2011 12:37:58 +0000 (14:37 +0200)]
r600g: handle PIPE_CAP_FRAGMENT_COLOR_CLAMP_CONTROL in get_param

13 years agodocs: GL_ARB_sampler_objects updates
Brian Paul [Sun, 10 Apr 2011 19:06:27 +0000 (13:06 -0600)]
docs: GL_ARB_sampler_objects updates

13 years agomesa: plug in new functions for GL_ARB_sampler_objects
Brian Paul [Sun, 10 Apr 2011 18:48:28 +0000 (12:48 -0600)]
mesa: plug in new functions for GL_ARB_sampler_objects

Build the new sources, plug the new functions into the dispatch table,
implement display list support.  And enable extension in the gallium
state tracker.

13 years agomesa: new code/functions for GL_ARB_sampler_objects
Brian Paul [Sun, 10 Apr 2011 18:47:47 +0000 (12:47 -0600)]
mesa: new code/functions for GL_ARB_sampler_objects

This implements the infrastructure for sampler objects and all the new
API functions.

13 years agomesa: alloc/free shared sampler objects
Brian Paul [Sun, 10 Apr 2011 18:47:00 +0000 (12:47 -0600)]
mesa: alloc/free shared sampler objects

13 years agomesa: new driver hooks for GL_ARB_sampler_objects
Brian Paul [Sun, 10 Apr 2011 18:46:32 +0000 (12:46 -0600)]
mesa: new driver hooks for GL_ARB_sampler_objects

13 years agomesa: add glGet for GL_ARB_sampler_objects
Brian Paul [Sun, 10 Apr 2011 18:46:15 +0000 (12:46 -0600)]
mesa: add glGet for GL_ARB_sampler_objects

13 years agomesa: move sampler state into new gl_sampler_object type
Brian Paul [Sun, 10 Apr 2011 18:44:46 +0000 (12:44 -0600)]
mesa: move sampler state into new gl_sampler_object type

gl_texture_object contains an instance of this type for the regular
texture object sampling state.  glGenSamplers() generates new instances
of gl_sampler_object which can override that state with glBindSampler().

13 years agoglapi: regenerated files for GL_ARB_sampler_objects
Brian Paul [Sun, 10 Apr 2011 18:42:24 +0000 (12:42 -0600)]
glapi: regenerated files for GL_ARB_sampler_objects

13 years agoglapi: interface for GL_ARB_sampler_objects
Brian Paul [Sun, 10 Apr 2011 18:41:39 +0000 (12:41 -0600)]
glapi: interface for GL_ARB_sampler_objects

13 years agoglx: Only remove the glx_display from the list after it's destroyed.
Henri Verbeet [Thu, 7 Apr 2011 21:48:28 +0000 (23:48 +0200)]
glx: Only remove the glx_display from the list after it's destroyed.

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
13 years agoglx: Destroy dri2Hash on DRI2 display destruction.
Henri Verbeet [Thu, 7 Apr 2011 21:48:28 +0000 (23:48 +0200)]
glx: Destroy dri2Hash on DRI2 display destruction.

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
13 years agomesa: Also update the color draw buffer if it's explicitly set to GL_NONE.
Henri Verbeet [Thu, 7 Apr 2011 21:48:28 +0000 (23:48 +0200)]
mesa: Also update the color draw buffer if it's explicitly set to GL_NONE.

NOTE: This is a candidate for the 7.10 branch.

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
13 years agodocs: fix typos in wayland spec
Nicolas Kaiser [Sun, 10 Apr 2011 12:04:44 +0000 (05:04 -0700)]
docs: fix typos in wayland spec

Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
Signed-off-by: Brian Paul <brianp@vmware.com>
13 years agodocs: fix typos in Mesa specs
Nicolas Kaiser [Sun, 10 Apr 2011 15:58:50 +0000 (09:58 -0600)]
docs: fix typos in Mesa specs

Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
Signed-off-by: Brian Paul <brianp@vmware.com>
13 years agonv50,nvc0: silence shader debug output
Christoph Bumiller [Sun, 10 Apr 2011 11:59:26 +0000 (13:59 +0200)]
nv50,nvc0: silence shader debug output

13 years agonvc0: make the card permit separate colour outputs
Christoph Bumiller [Sun, 10 Apr 2011 11:57:34 +0000 (13:57 +0200)]
nvc0: make the card permit separate colour outputs

13 years agonv50-nvc0: make use of COLOR_MASK,BLEND_ENABLE_COMMON
Christoph Bumiller [Sat, 9 Apr 2011 16:25:29 +0000 (18:25 +0200)]
nv50-nvc0: make use of COLOR_MASK,BLEND_ENABLE_COMMON

13 years agonvc0: shrink CSOs a little
Christoph Bumiller [Fri, 8 Apr 2011 13:32:18 +0000 (15:32 +0200)]
nvc0: shrink CSOs a little

13 years agonv50,nvc0: identify some line rasterization state
Christoph Bumiller [Thu, 31 Mar 2011 17:04:17 +0000 (19:04 +0200)]
nv50,nvc0: identify some line rasterization state

Fixes width of non-smooth (aliased) lines on nvc0.

13 years agonvc0: force perspective correction hint to nicest
Christoph Bumiller [Sun, 10 Apr 2011 11:55:01 +0000 (13:55 +0200)]
nvc0: force perspective correction hint to nicest

Fixes issues in e.g. nexuiz (desertfactory) or supertuxkart that
look like lighting bugs.

They're not visible with the software rasterizers because their
notion of linear interpolation seems to be different from that
of nv50/nvc0.

13 years agonv50,nvc0: don't insert instructions after the block terminator
Christoph Bumiller [Fri, 8 Apr 2011 13:51:48 +0000 (15:51 +0200)]
nv50,nvc0: don't insert instructions after the block terminator

13 years agoMake st_pipe_vertex_format return type in st_draw.h match st_draw.c
Alan Coopersmith [Fri, 8 Apr 2011 23:48:12 +0000 (16:48 -0700)]
Make st_pipe_vertex_format return type in st_draw.h match st_draw.c

Fixes compiler error from Sun compilers:
"state_tracker/st_draw.c", line 185: identifier redeclared: st_pipe_vertex_format
        current : function(unsigned int, unsigned int, unsigned int, unsigned char) returning enum pipe_format
        previous: function(unsigned int, unsigned int, unsigned int, unsigned char) returning unsigned int : "state_tracker/st_draw.h", line 73

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
13 years agoFix GET_PROGRAM_NAME() on Solaris to not try to modify a read-only string
Alan Coopersmith [Fri, 8 Apr 2011 20:03:16 +0000 (13:03 -0700)]
Fix GET_PROGRAM_NAME() on Solaris to not try to modify a read-only string

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
13 years agoRevert "r300g: handle DISCARD_WHOLE_RESOURCE for buffers"
Marek Olšák [Fri, 8 Apr 2011 21:19:53 +0000 (23:19 +0200)]
Revert "r300g: handle DISCARD_WHOLE_RESOURCE for buffers"

This reverts commit 437c748bf5072d2bded77a00c74c51cdb8b510e5.

The commit is wrong for several reasons. One of them is when we grab
a new buffer, we should update all the states it is bound in,
including all parallel contexts. I don't think this is even doable.

The correct solution would be upload data via a temporary buffer and
do resource_copy_region to the original one.

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

13 years agor300g: fix another crash with hyperz
Marek Olšák [Fri, 8 Apr 2011 21:16:17 +0000 (23:16 +0200)]
r300g: fix another crash with hyperz

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

13 years agoDisable direct rendering on Cygwin
Jon TURNEY [Mon, 14 Mar 2011 22:08:23 +0000 (22:08 +0000)]
Disable direct rendering on Cygwin

Add Cygwin platform-specific settings and drivers to build for dri driver:
- by default, disable direct rendering.
- if direct rendering is enabled, the swrast dridriver is the only one it's
sensible to try to build (this doesn't work at the moment as additional patches
are required to build a libGL which can load just swrast without the DRM headers,
even though there's no actual functional dependency)

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Julien Cristau <jcristau@debian.org>
13 years agoDisable direct rendering on GNU/Hurd
nobled [Mon, 14 Mar 2011 22:08:22 +0000 (22:08 +0000)]
Disable direct rendering on GNU/Hurd

The Hurd kernel doesn't have DRM yet.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-By: Jakob Bornecrantz <wallbraker@gmail.com>
13 years agoOnly require libdrm if direct rendering is actually enabled.
Samuel Thibault [Mon, 14 Mar 2011 22:08:21 +0000 (22:08 +0000)]
Only require libdrm if direct rendering is actually enabled.

Fix build when configured --with-driver=dri --disable-driglx-direct on targets
without drm e.g. GNU/Hurd and Cygwin

Based on the Debian patch file '05_hurd-ftbfs.diff' by Samuel Thibault.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-By: Jakob Bornecrantz <wallbraker@gmail.com>
13 years agor300g: fix crash when adding a new relocation
Marek Olšák [Fri, 8 Apr 2011 18:42:03 +0000 (20:42 +0200)]
r300g: fix crash when adding a new relocation

No idea why it's so hard to reproduce.
Broken with: c35572352e3e92683988ee8d151b47f4190d62f9

Thanks to Toni Spets for assistance.

13 years agor300g: emit US_FORMAT on R520 only
Marek Olšák [Fri, 8 Apr 2011 18:05:33 +0000 (20:05 +0200)]
r300g: emit US_FORMAT on R520 only

13 years agoi965/fs: Remove broken optimization for live intervals in loops.
Eric Anholt [Sun, 3 Apr 2011 04:11:32 +0000 (18:11 -1000)]
i965/fs: Remove broken optimization for live intervals in loops.

The theory here was to detect a temporary variable used within a loop,
and avoid considering it live across the entire loop.  However, it was
overeager and failed when the first definition of the variable
appeared within the loop but was only conditionally defined.

Fixes glsl-fs-loop-redundant-condition.

13 years agou_vbuf_mgr: fix crash with unsupported vertex format in hw VBOs
Marek Olšák [Fri, 8 Apr 2011 17:31:26 +0000 (19:31 +0200)]
u_vbuf_mgr: fix crash with unsupported vertex format in hw VBOs

13 years agor300g: fix crash with hyperz
Marek Olšák [Fri, 8 Apr 2011 11:27:14 +0000 (13:27 +0200)]
r300g: fix crash with hyperz

r300_update_hyperz_state is no longer required to be called here.

13 years agor300g: Properly take the sampler view's first_level into account when sampling.
Henri Verbeet [Mon, 17 Jan 2011 21:03:30 +0000 (22:03 +0100)]
r300g: Properly take the sampler view's first_level into account when sampling.

Signed-off-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Marek Olšák <maraeo@gmail.com>
13 years agollvmpipe: Take the sampler view's first_level into account when sampling.
Fabian Bieler [Thu, 31 Mar 2011 10:32:52 +0000 (12:32 +0200)]
llvmpipe: Take the sampler view's first_level into account when sampling.

13 years agosoftpipe: Take the sampler view's first_level into account when sampling.
Henri Verbeet [Mon, 17 Jan 2011 21:03:30 +0000 (22:03 +0100)]
softpipe: Take the sampler view's first_level into account when sampling.

Signed-off-by: Brian Paul <brianp@vmware.com>
13 years agost/mesa: Clamp min_lod to the max miplevel as well.
Henri Verbeet [Mon, 17 Jan 2011 21:03:30 +0000 (22:03 +0100)]
st/mesa: Clamp min_lod to the max miplevel as well.

Otherwise min_lod can potentially be larger than the clamped max_lod. The
code that follows will swap min_lod and max_lod in that case, resulting in a
max_lod larger than MAX_LEVEL.

Signed-off-by: Brian Paul <brianp@vmware.com>
13 years agost/mesa: Set samplers views' first_level.
Henri Verbeet [Mon, 17 Jan 2011 21:03:30 +0000 (22:03 +0100)]
st/mesa: Set samplers views' first_level.

Base level and min LOD aren't equivalent. In particular, min LOD has no
effect on image array selection for magnification and non-mipmapped
minification.

Signed-off-by: Brian Paul <brianp@vmware.com>
13 years agor300g: do not advertise R16F and RG16F on DRM < 2.8.0
Marek Olšák [Fri, 8 Apr 2011 02:37:19 +0000 (04:37 +0200)]
r300g: do not advertise R16F and RG16F on DRM < 2.8.0

13 years agor300g: fix texturing with sizes > 2048 on r500
Marek Olšák [Fri, 8 Apr 2011 01:11:22 +0000 (03:11 +0200)]
r300g: fix texturing with sizes > 2048 on r500

13 years agor300g: add 'radeon: ' prefix to error messages in winsys
Marek Olšák [Thu, 7 Apr 2011 21:36:18 +0000 (23:36 +0200)]
r300g: add 'radeon: ' prefix to error messages in winsys

13 years agomesa: fix dstRowDiff computation in RGTC texstore functions
Marek Olšák [Tue, 5 Apr 2011 23:23:51 +0000 (01:23 +0200)]
mesa: fix dstRowDiff computation in RGTC texstore functions

Copied from libtxc_dxtn, this fixes NPOT RGTC1 textures with r300g.
I also did the same for RGTC2.

13 years agoegl_dri2.c: Open drm device with O_CLOEXEC
Kristian Høgsberg [Thu, 7 Apr 2011 22:27:06 +0000 (18:27 -0400)]
egl_dri2.c: Open drm device with O_CLOEXEC

Not a good fd to leak.

13 years agor600g: Unreference framebuffer state on context destruction.
Henri Verbeet [Thu, 7 Apr 2011 20:21:20 +0000 (22:21 +0200)]
r600g: Unreference framebuffer state on context destruction.

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
13 years agor600g: Use symbolic names for NUMBER_TYPE.
Henri Verbeet [Thu, 7 Apr 2011 20:21:20 +0000 (22:21 +0200)]
r600g: Use symbolic names for NUMBER_TYPE.

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
13 years agodocs: replace llvmpipe/README with docs/llvmpipe.html
Brian Paul [Thu, 7 Apr 2011 19:56:45 +0000 (13:56 -0600)]
docs: replace llvmpipe/README with docs/llvmpipe.html

13 years agollvmpipe: document issue with LLVM 2.8 and earlier with AVX
Brian Paul [Thu, 7 Apr 2011 19:43:00 +0000 (13:43 -0600)]
llvmpipe: document issue with LLVM 2.8 and earlier with AVX

13 years agoutil: add cpu detection for sse 4.2 and avx
Brian Paul [Thu, 7 Apr 2011 19:41:52 +0000 (13:41 -0600)]
util: add cpu detection for sse 4.2 and avx

13 years agoutil: simplify bit shifting in util_cpu_detect()
Brian Paul [Thu, 7 Apr 2011 19:41:52 +0000 (13:41 -0600)]
util: simplify bit shifting in util_cpu_detect()

13 years agosvga: another tweak to adjust_x term (use -0.5)
Brian Paul [Thu, 7 Apr 2011 17:25:46 +0000 (11:25 -0600)]
svga: another tweak to adjust_x term (use -0.5)

13 years agomesa: Update _ElementSize in a few more places.
José Fonseca [Thu, 7 Apr 2011 12:35:25 +0000 (13:35 +0100)]
mesa: Update _ElementSize in a few more places.

13 years agomesa/st: Fix user buffer size computation when stride is zero.
José Fonseca [Thu, 7 Apr 2011 11:19:14 +0000 (12:19 +0100)]
mesa/st: Fix user buffer size computation when stride is zero.

Although for GL a zero stride means tightly packed elements, Mesa
internally uses zero strides for constant arrays.

Therefore user buffers need to be defined from

  buffer_offset + src_offset + min_index*stride

to

  buffer_offset + src_offset + max_index*stride + elem_size

Simplifying the later with (max_index + 1)*stride will give zero
sized buffers.

This change also aggregates the st_context's info about user buffers
into a single array.

13 years agomesa: Update _ElementSize.
Brian Paul [Thu, 7 Apr 2011 11:07:32 +0000 (12:07 +0100)]
mesa: Update _ElementSize.

13 years agomesa/st: Prevent 'end' < 'start' in vbo_exec_DrawRangeElementsBaseVertex()
José Fonseca [Wed, 6 Apr 2011 14:10:19 +0000 (15:10 +0100)]
mesa/st: Prevent 'end' < 'start' in vbo_exec_DrawRangeElementsBaseVertex()

We adjust 'end' to fit into _MaxElement, but that may result into a 'start'
value bigger than 'end' being passed downstream, causing havoc.

This could be seen with arb_robustness_draw-vbo-bounds, due to an
application bug.

13 years agomesa/st: Handle feedback draw when VBO offsets are not sorted in ascending order.
José Fonseca [Wed, 6 Apr 2011 13:38:26 +0000 (14:38 +0100)]
mesa/st: Handle feedback draw when VBO offsets are not sorted in ascending order.

Simply port the same logic from setup_interleaved_attribs().

Avoids overflow in mustpass.c and feedback.c conform tests.

13 years agoi965: clear global offset to zero in m0.2 for VS DP read.
Zou Nan hai [Thu, 7 Apr 2011 13:07:57 +0000 (21:07 +0800)]
i965:   clear global offset to zero in m0.2 for VS DP read.

Signed-off-by: Zou Nan hai <nanhai.zou@intel.com>
13 years agomesa: Fix allocation size of extension_indices array.
Vinson Lee [Wed, 6 Apr 2011 23:13:15 +0000 (16:13 -0700)]
mesa: Fix allocation size of extension_indices array.

Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agomesa: fix error message text
Brian Paul [Wed, 6 Apr 2011 20:22:39 +0000 (14:22 -0600)]
mesa: fix error message text

13 years agomesa: consolidate code in _mesa_update_array_max_element()
Brian Paul [Wed, 6 Apr 2011 20:16:57 +0000 (14:16 -0600)]
mesa: consolidate code in _mesa_update_array_max_element()

13 years agomesa: Add link to 7.10.2 release notes
Ian Romanick [Wed, 6 Apr 2011 20:46:58 +0000 (13:46 -0700)]
mesa: Add link to 7.10.2 release notes

13 years agodocs: update news.html with 7.10.2 release
Ian Romanick [Wed, 6 Apr 2011 20:41:43 +0000 (13:41 -0700)]
docs: update news.html with 7.10.2 release
(cherry picked from commit b0866f6cfdfcaf23686b1ae2a99627d468196db2)

13 years agoImport 7.10.2 release notes from 7.10 branch
Ian Romanick [Wed, 6 Apr 2011 20:46:20 +0000 (13:46 -0700)]
Import 7.10.2 release notes from 7.10 branch

13 years agor600g: Fix non-independent blend state.
Julian Adams [Wed, 6 Apr 2011 19:04:08 +0000 (21:04 +0200)]
r600g: Fix non-independent blend state.

This fixes piglit fbo/fbo-drawbuffers-blend-add.

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
13 years agomesa: init/release the default texture buffer object
Brian Paul [Wed, 6 Apr 2011 19:00:14 +0000 (13:00 -0600)]
mesa: init/release the default texture buffer object

13 years agomesa: fix popping of texture state for GL_TEXTURE_BUFFER
Brian Paul [Wed, 6 Apr 2011 18:45:21 +0000 (12:45 -0600)]
mesa: fix popping of texture state for GL_TEXTURE_BUFFER

Fixes http://bugs.freedesktop.org/show_bug.cgi?id=36032