profile/ivi/mesa.git
12 years agodraw: Handle the case when there isn't a fragment shader.
Olivier Galibert [Thu, 21 Jun 2012 17:39:20 +0000 (19:39 +0200)]
draw: Handle the case when there isn't a fragment shader.

Signed-off-by: Olivier Galibert <galibert@pobox.com>
Signed-off-by: José Fonseca <jfonseca@vmware.com>
12 years agomesa: update the emacs indent files
Zack Rusin [Thu, 21 Jun 2012 21:25:09 +0000 (17:25 -0400)]
mesa: update the emacs indent files

dirvars package has been replaced by built-in functionality of
dir-locals. preserve the settings in the new infrastructure

12 years agor600g: Unify SURFACE_SYNC packet emission for 3D and compute
Tom Stellard [Thu, 7 Jun 2012 19:22:47 +0000 (15:22 -0400)]
r600g: Unify SURFACE_SYNC packet emission for 3D and compute

Drop the compute specific evergreen_set_buffer_sync() function and
instead use the r600_surface_sync_command atom for emitting SURFACE_SYNC
packets.

12 years agor600g: Enable reusing of compute state
Tom Stellard [Wed, 6 Jun 2012 23:44:09 +0000 (19:44 -0400)]
r600g: Enable reusing of compute state

12 years agor600g: Fix reading vtx instruction offset from bytestream
Tom Stellard [Wed, 6 Jun 2012 22:31:00 +0000 (18:31 -0400)]
r600g: Fix reading vtx instruction offset from bytestream

12 years agoradeon/llvm: Turn on the BitExtract peephole optimization
Tom Stellard [Wed, 20 Jun 2012 21:43:11 +0000 (17:43 -0400)]
radeon/llvm: Turn on the BitExtract peephole optimization

Thie BitExtract optimization folds a mask and shift operation together
into a single instruction (BFE_UINT).

12 years agoradeon/llvm: Lower ROTL to BIT_ALIGN
Tom Stellard [Wed, 20 Jun 2012 20:28:01 +0000 (16:28 -0400)]
radeon/llvm: Lower ROTL to BIT_ALIGN

12 years agoradeon/llvm: Use the VLIW Scheduler for R600->NI
Tom Stellard [Tue, 19 Jun 2012 22:47:18 +0000 (18:47 -0400)]
radeon/llvm: Use the VLIW Scheduler for R600->NI

It's not optimal, but it's better than the register pressure scheduler
that was previously being used.  The VLIW scheduler currently ignores
all the complicated instruction groups restrictions and just tries to
fill the instruction groups with as many instructions as possible.
Though, it does know enough not to put two trans only instructions in
the same group.

We are able to ignore the instruction group restrictions in the LLVM
backend, because the finalizer in r600_asm.c will fix any illegal
instruction groups the backend generates.

Enabling the VLIW scheduler improved the run time for a sha1 compute
shader by about 50%.  I'm not sure what the impact will be for graphics
shaders.  I tested Lightsmark with the VLIW scheduler enabled and the
framerate was about the same, but it might help apps that use really
big shaders.

12 years agomesa: set GL_ARB_uniform_buffer_object extension year to 2009
Brian Paul [Thu, 21 Jun 2012 19:08:34 +0000 (13:08 -0600)]
mesa: set GL_ARB_uniform_buffer_object extension year to 2009

12 years agomesa: Add a comment explaining my thoughts on glBindBufferBase().
Eric Anholt [Mon, 18 Jun 2012 23:20:11 +0000 (16:20 -0700)]
mesa: Add a comment explaining my thoughts on glBindBufferBase().

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agomesa: Add support for glGetIntegeri_v from GL_ARB_uniform_buffer_object.
Eric Anholt [Mon, 18 Jun 2012 22:59:13 +0000 (15:59 -0700)]
mesa: Add support for glGetIntegeri_v from GL_ARB_uniform_buffer_object.

Fixes piglit ARB_uniform_buffer_object/getintegeri_v.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agomesa: Add support for glBindBufferBase/Range on GL_UNIFORM_BUFFER.
Eric Anholt [Fri, 15 Jun 2012 02:48:02 +0000 (19:48 -0700)]
mesa: Add support for glBindBufferBase/Range on GL_UNIFORM_BUFFER.

Fixes piglits:
GL_ARB_uniform_buffer_object/bindbuffer-general-point.
GL_ARB_uniform_buffer_object/negative-bindbuffer-buffer
GL_ARB_uniform_buffer_object/negative-bindbuffer-index
GL_ARB_uniform_buffer_object/negative-bindbuffer-target
GL_ARB_uniform_buffer_object/negative-bindbufferrange-range

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agomesa: Move glBindBufferBase and glBindBufferRange() to bufferobj.
Eric Anholt [Thu, 14 Jun 2012 23:55:56 +0000 (16:55 -0700)]
mesa: Move glBindBufferBase and glBindBufferRange() to bufferobj.

The rest of the TFB implementation remains in transformfeedback.c, and
this will be shared with UBOs.

v2: Move the size/offset checks shared with UBOs to common code as
    well. (Kenneth's review)

Reviewed-by: Brian Paul <brianp@vmware.com> (v1)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agomesa: Move buffer object dispatch setup to bufferobj.c.
Eric Anholt [Thu, 14 Jun 2012 23:47:39 +0000 (16:47 -0700)]
mesa: Move buffer object dispatch setup to bufferobj.c.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agomesa: Add indexed binding points for uniform buffer objects.
Eric Anholt [Thu, 14 Jun 2012 23:37:22 +0000 (16:37 -0700)]
mesa: Add indexed binding points for uniform buffer objects.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agomesa: Add support for the GL_UNIFORM_BUFFER general binding point.
Eric Anholt [Mon, 18 Jun 2012 18:17:04 +0000 (11:17 -0700)]
mesa: Add support for the GL_UNIFORM_BUFFER general binding point.

Fixes piglit ARB_uniform_buffer_object/buffer-targets.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agomesa: Add state and getters for the GL_ARB_uniform_buffer_object maximums.
Eric Anholt [Thu, 14 Jun 2012 16:55:26 +0000 (09:55 -0700)]
mesa: Add state and getters for the GL_ARB_uniform_buffer_object maximums.

Fixes piglit GL_ARB_uniform_buffer_object/minmax.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoglapi: Add uniform buffer object API
Vincent Lejeune [Sun, 25 Dec 2011 18:17:01 +0000 (19:17 +0100)]
glapi: Add uniform buffer object API

v2: Fix a typo spotted by Eric Anholt.
v3: Fix missing "GL" on types, fix style, fix Studly_Caps extension name,
    drop commented code duplicated with GL3x.xml [anholt]

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agodricore: Turn it into a normal library.
Eric Anholt [Tue, 12 Jun 2012 20:37:58 +0000 (13:37 -0700)]
dricore: Turn it into a normal library.

Our intention is still that it's not abi stable, so make the package
version number get included in the library name.  Now you can parallel
install dricore-using drivers from multiple mesa versions.  We can put
it into lib now that we're following library versioning rules
(assuming that ABIs don't change within a single Mesa point release).

LD_LIBRARY_PATH still doesn't work with a non-/, non-/usr prefix
because libtool uses rpath instead of runpath for nonstandard
prefixes.

12 years agoautomake: Convert Mesa built sources generation to automake.
Eric Anholt [Tue, 12 Jun 2012 20:10:08 +0000 (13:10 -0700)]
automake: Convert Mesa built sources generation to automake.

12 years agomesa: Move GL header installation to automake.
Eric Anholt [Tue, 12 Jun 2012 19:51:32 +0000 (12:51 -0700)]
mesa: Move GL header installation to automake.

This cuts some cruft related to osmesa where we were being careful to
not install headers twice.

12 years agoautomake: Move mesa subdirs processing to automake.
Eric Anholt [Tue, 12 Jun 2012 19:29:44 +0000 (12:29 -0700)]
automake: Move mesa subdirs processing to automake.

12 years agoautomake: Move .pc installation to automake.
Eric Anholt [Tue, 12 Jun 2012 19:13:32 +0000 (12:13 -0700)]
automake: Move .pc installation to automake.

12 years agoautomake: Move the master Mesa makefile to Makefile.old.
Eric Anholt [Tue, 12 Jun 2012 19:10:58 +0000 (12:10 -0700)]
automake: Move the master Mesa makefile to Makefile.old.

This will let me incrementally move stuff to automake without
converting libmesa.a all at once.

12 years agoautomake: Convert osmesa.pc to be generated by configure.
Eric Anholt [Tue, 15 May 2012 19:47:58 +0000 (12:47 -0700)]
automake: Convert osmesa.pc to be generated by configure.

12 years agomesa: Convert gl.pc to be generated by configure.
Eric Anholt [Tue, 15 May 2012 19:23:00 +0000 (12:23 -0700)]
mesa: Convert gl.pc to be generated by configure.

This saves a step of mashing variables around in our Makefile.

12 years agoautomake: Convert src/mesa/drivers/x11/Makefile to automake.
Eric Anholt [Tue, 12 Jun 2012 18:38:19 +0000 (11:38 -0700)]
automake: Convert src/mesa/drivers/x11/Makefile to automake.

The weird versioning of the libGL where the package version was sort
of expressed as a big integer is dropped.  libtool didn't like the 0
prefix, and it didn't really make sense anyway -- if you interpret it
as an integer version number, old Mesa 071200 was bigger than current
Mesa 08100.  Instead, just bump the minor version and drop the
patchlevel.

12 years agoautomake: Convert src/gallium/Makefile to automake.
Eric Anholt [Mon, 11 Jun 2012 20:07:03 +0000 (13:07 -0700)]
automake: Convert src/gallium/Makefile to automake.

12 years agoautomake: Convert src/mapi/glapi/gen to silent build.
Eric Anholt [Mon, 11 Jun 2012 20:04:56 +0000 (13:04 -0700)]
automake: Convert src/mapi/glapi/gen to silent build.

12 years agoautomake: Convert src/mapi/glapi/gen/Makefile to automake.
Eric Anholt [Mon, 11 Jun 2012 19:59:21 +0000 (12:59 -0700)]
automake: Convert src/mapi/glapi/gen/Makefile to automake.

12 years agoautomake: Convert src/mesa/drivers/Makefile to automake.
Eric Anholt [Mon, 11 Jun 2012 17:53:09 +0000 (10:53 -0700)]
automake: Convert src/mesa/drivers/Makefile to automake.

12 years agoautomake: Directly generate configs/current instead of symlinking from it.
Eric Anholt [Mon, 11 Jun 2012 17:49:38 +0000 (10:49 -0700)]
automake: Directly generate configs/current instead of symlinking from it.

12 years agoautomake: Convert gen_matypes building to automake.
Eric Anholt [Mon, 11 Jun 2012 17:19:36 +0000 (10:19 -0700)]
automake: Convert gen_matypes building to automake.

12 years agomake: Drop HOST_CC and HOST_CFLAGS.
Eric Anholt [Mon, 11 Jun 2012 16:46:02 +0000 (09:46 -0700)]
make: Drop HOST_CC and HOST_CFLAGS.

Except for the deleted linux-cell target, these were just the target
cc/cflags.  The only usage was for gen_matypes, which wants the
target's structure packing, not the host, anyway.

12 years agomake: Fold ASM_CFLAGS into DEFINES.
Eric Anholt [Mon, 11 Jun 2012 17:25:05 +0000 (10:25 -0700)]
make: Fold ASM_CFLAGS into DEFINES.

Every place that uses ASM_FLAGS already uses DEFINES.  Not including
it in DEFINES is just a way to screw up potential users, as I've done
several times while working on the build system.

12 years agoautomake: Convert src/egl/Makefile to automake.
Eric Anholt [Mon, 11 Jun 2012 16:34:22 +0000 (09:34 -0700)]
automake: Convert src/egl/Makefile to automake.

12 years agoautomake: Don't warn on gmake portability issues.
Eric Anholt [Mon, 11 Jun 2012 19:59:48 +0000 (12:59 -0700)]
automake: Don't warn on gmake portability issues.

Even pre-automake, we rely on gmake features for pattern
substitutions, and replacing those with reams more make code is not
interesting.  This will let us turn the old Makefiles using pattern
substitutions into automake without spewing warnings.

Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
12 years agonv50: fix buffer reuse issues
Marcin Slusarz [Tue, 19 Jun 2012 21:38:34 +0000 (23:38 +0200)]
nv50: fix buffer reuse issues

1) We need to insert a barrier between consecutive transform feedback calls.
2) VBO cache needs to be flushed when TFB output is used as VBO draw input.

Fixes Piglit test EXT_transform_feedback/immediate-reuse.

Thanks to Christoph Bumiller for pointing out bugs in previous versions
of this patch.

12 years agost/mesa: fix transform feedback of unsubscripted gl_ClipDistance array
Marcin Slusarz [Sat, 16 Jun 2012 18:30:14 +0000 (20:30 +0200)]
st/mesa: fix transform feedback of unsubscripted gl_ClipDistance array

gl_ClipDistance needs special treatment in form of lowering pass
which transforms gl_ClipDistance representation from float[] to
vec4[]. There are 2 implementations - at glsl linker level (enabled
by LowerClipDistance option) and at glsl_to_tgsi level (enabled
unconditionally for gallium drivers). Second implementation is
incomplete - it does not take into account transform feedback (see
commit 642e5b413e0890b2070ba78fde42db381eaf02e5 "mesa: Fix transform
feedback of unsubscripted gl_ClipDistance array" for details).

There are 2 possible fixes:
- adding transform feedback support into glsl_to_tgsi version
- ripping gl_ClipDistance support from glsl_to_tgsi and enabling
  gl_ClipDistance lowering on glsl linker side

This patch implements 2nd option. All it does is:
- reverts most of the commit 59be691638200797583bce39a83f641d30d97492
  "st/mesa: add support for gl_ClipDistance"
- changes LowerClipDistance to true

Fixes Piglit tests "EXT_transform_feedback/builtin-varyings
gl_ClipDistance[{2,3,4,5,6,7,8}]-no-subscript" at least on nv50
and evergreen cards.

12 years agoglx/tests: Fix signed/unsigned comparison warnings.
Paul Berry [Wed, 20 Jun 2012 18:38:22 +0000 (11:38 -0700)]
glx/tests: Fix signed/unsigned comparison warnings.

12 years agoi965/msaa: Only do multisample rasterization if GL_MULTISAMPLE enabled.
Paul Berry [Sat, 16 Jun 2012 18:32:04 +0000 (11:32 -0700)]
i965/msaa: Only do multisample rasterization if GL_MULTISAMPLE enabled.

From the GL 3.0 spec (p.116):

    "Multisample rasterization is enabled or disabled by calling
    Enable or Disable with the symbolic constant MULTISAMPLE."

Elsewhere in the spec, where multisample rasterization is described
(sections 3.4.3, 3.5.4, and 3.6.6), the following text is consistently
used:

    "If MULTISAMPLE is enabled, and the value of SAMPLE_BUFFERS is
    one, then..."

So, in other words, disabling GL_MULTISAMPLE should prevent
multisample rasterization from occurring, even if the draw framebuffer
is multisampled.  This patch implements that behaviour by setting the
WM and SF stage's "multisample rasterization mode" to
MSRAST_ON_PATTERN only when the draw framebuffer is multisampled *and*
GL_MULTISAMPLE is enabled.

Fixes piglit test spec/EXT_framebuffer_multisample/enable-flag.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoi965/msaa: Disable unsupported formats.
Paul Berry [Fri, 15 Jun 2012 17:49:58 +0000 (10:49 -0700)]
i965/msaa: Disable unsupported formats.

Due to hardware limitations, MSAA is unsupported on Gen6 for formats
containing >64 bits of data per pixel.  From the Sandy Bridge PRM,
vol4 part1, p72 ("Surface Format"):

    If Number of Multisamples is set to a value other than
    MULTISAMPLECOUNT_1, this field cannot be set to the following
    formats:
    - any format with greater than 64 bits per element
    - any compressed texture format (BC*)
    - any YCRCB* format

Gen7 has a similar, but less stringent limitation: formats with >64
bits of data per pixel only support 4x MSAA.

This patch causes the unsupported formats to report
GL_FRAMEBUFFER_UNSUPPORTED.

Fixes piglit "multisample-formats" tests on Gen6.

Acked-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agomesa: remove obsolete confdiff.sh
Andreas Boll [Tue, 19 Jun 2012 17:49:25 +0000 (19:49 +0200)]
mesa: remove obsolete confdiff.sh

this script is obsolete since
0cc216676c96efacb0e1eb82457e6a83920ae704

12 years agost/vdpau: use template size as default for source_rect.
Christian König [Thu, 14 Jun 2012 15:52:20 +0000 (17:52 +0200)]
st/vdpau: use template size as default for source_rect.

Fixes alignment problems with flash player.

Signed-off-by: Christian König <deathsimple@vodafone.de>
12 years agost/vdpau: clear Cb&Cr with 0.5f
Christian König [Sat, 9 Jun 2012 13:33:28 +0000 (15:33 +0200)]
st/vdpau: clear Cb&Cr with 0.5f

That makes the output black in case of decoding errors.

Signed-off-by: Christian König <deathsimple@vodafone.de>
12 years agoi965: Don't set brw_wm_prog_key::iz_lookup on Gen6+.
Kenneth Graunke [Sat, 16 Jun 2012 23:34:50 +0000 (16:34 -0700)]
i965: Don't set brw_wm_prog_key::iz_lookup on Gen6+.

Sandy Bridge and later don't use this field, so there's no point in
setting it.  It can only cause harmful state-based recompiles.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
12 years agollvmpipe: Add vertex id support.
Olivier Galibert [Tue, 19 Jun 2012 18:51:21 +0000 (20:51 +0200)]
llvmpipe: Add vertex id support.

Signed-off-by: Olivier Galibert <galibert@pobox.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agollvmpipe: Simplify and fix system variables fetch.
Olivier Galibert [Tue, 19 Jun 2012 18:51:20 +0000 (20:51 +0200)]
llvmpipe: Simplify and fix system variables fetch.

The system array values concept doesn't really because it expects the
system values to be fixed per call, which is wrong for gl_VertexID and
iffy for gl_SampleID.  So this patch does two things:

- kill the array, have emit_fetch_system_value directly pick the
  values it needs (only gl_InstanceID for now, as the previous code)

- correctly handle the expected type in emit_fetch_system_value

Signed-off-by: Olivier Galibert <galibert@pobox.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agodraw: fix flat shading and screen-space linear interpolation in clipper
Olivier Galibert [Tue, 19 Jun 2012 18:51:19 +0000 (20:51 +0200)]
draw: fix flat shading and screen-space linear interpolation in clipper

This includes:
- picking up correctly which attributes are flatshaded and which are
  noperspective

- copying the flatshaded attributes when needed, including the
  non-built-in ones

- correctly interpolating the noperspective attributes in screen-space
  instead than in a 3d-correct fashion.

Signed-off-by: Olivier Galibert <galibert@pobox.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agosoftpipe: Offset is not to be applied to the layer parameter of array texture fetches.
Olivier Galibert [Tue, 19 Jun 2012 18:51:18 +0000 (20:51 +0200)]
softpipe: Offset is not to be applied to the layer parameter of array texture fetches.

Signed-off-by: Olivier Galibert <galibert@pobox.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agost/mesa: clamp glDrawPixels size to max texture size
Brian Paul [Tue, 19 Jun 2012 15:39:54 +0000 (09:39 -0600)]
st/mesa: clamp glDrawPixels size to max texture size

12 years agost/mesa: move st_validate_state() call earlier in st_DrawPixels()
Brian Paul [Tue, 19 Jun 2012 15:40:32 +0000 (09:40 -0600)]
st/mesa: move st_validate_state() call earlier in st_DrawPixels()

12 years agor600g: fix z/stencil texture creation v2
Jerome Glisse [Fri, 15 Jun 2012 17:01:49 +0000 (13:01 -0400)]
r600g: fix z/stencil texture creation v2

z or stencil texture should not be created with the z/stencil
flags for surface creation as they are intended to be bound
as texture.

v2: remove broken code

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
12 years agoradeon/llvm: Fix CR/LF in Processors.td
Török Edwin [Tue, 19 Jun 2012 15:06:33 +0000 (11:06 -0400)]
radeon/llvm: Fix CR/LF in Processors.td

Signed-off-by: Tom Stellard <thomas.stellard@amd.com>
12 years agoradeon/llvm: Fix sin/cos codegen on R700
Török Edwin [Mon, 18 Jun 2012 18:20:58 +0000 (21:20 +0300)]
radeon/llvm: Fix sin/cos codegen on R700

Based on https://bugs.freedesktop.org/show_bug.cgi?id=50317#c4

Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=50316
https://bugs.freedesktop.org/show_bug.cgi?id=50317

Signed-off-by: Tom Stellard <thomas.stellard@amd.com>
12 years agodocs: update GL3.txt for ARB_base_instance
Fredrik Höglund [Mon, 18 Jun 2012 20:50:04 +0000 (22:50 +0200)]
docs: update GL3.txt for ARB_base_instance

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agost/mesa: Add support for GL_ARB_base_instance
Fredrik Höglund [Mon, 18 Jun 2012 20:50:03 +0000 (22:50 +0200)]
st/mesa: Add support for GL_ARB_base_instance

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agogallium: Add PIPE_CAP_START_INSTANCE
Fredrik Höglund [Mon, 18 Jun 2012 20:50:02 +0000 (22:50 +0200)]
gallium: Add PIPE_CAP_START_INSTANCE

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agomesa: Add support for GL_ARB_base_instance
Fredrik Höglund [Mon, 18 Jun 2012 20:50:01 +0000 (22:50 +0200)]
mesa: Add support for GL_ARB_base_instance

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoscons: Do not build svga if using Solaris Studio C compiler.
Vinson Lee [Sat, 16 Jun 2012 17:55:20 +0000 (10:55 -0700)]
scons: Do not build svga if using Solaris Studio C compiler.

Solaris Studio C compiler does not support anonymous structs and
anonymous unions.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoi965: Fix brw_swap_cmod() for LE/GE comparisons.
Kenneth Graunke [Sat, 16 Jun 2012 09:08:13 +0000 (02:08 -0700)]
i965: Fix brw_swap_cmod() for LE/GE comparisons.

The idea here is to rewrite comparisons like 2 >= x with x <= 2; we want
to simply exchange arguments, not negate the condition.  If equality was
part of the original comparison, it should remain part of the swapped
version.

This is the true cause of bug #50298.  It didn't manifest itself on
Sandybridge because we embed the conditional modifier in the IF
instruction rather than emitting a CMP.  All other platforms use CMP.

It also didn't manifest itself on the master branch because commit
be5f27a84d ("glsl: Refine the loop instruction counting.") papered over
the problem.

NOTE: This is a candidate for stable release branches.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50298
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
12 years agodocs: start release notes file for 8.1
Brian Paul [Mon, 18 Jun 2012 18:38:34 +0000 (12:38 -0600)]
docs: start release notes file for 8.1

12 years agoradeon/llvm: Update comment in AMDGPU.td
Tom Stellard [Mon, 18 Jun 2012 22:07:34 +0000 (18:07 -0400)]
radeon/llvm: Update comment in AMDGPU.td

12 years agoradeon/llvm: Remove unused AMDIL TableGen definitons
Tom Stellard [Thu, 7 Jun 2012 00:27:47 +0000 (20:27 -0400)]
radeon/llvm: Remove unused AMDIL TableGen definitons

12 years agoradeon/llvm: Eliminate getRegClassFromType() function
Tom Stellard [Fri, 15 Jun 2012 21:36:42 +0000 (17:36 -0400)]
radeon/llvm: Eliminate getRegClassFromType() function

We can use TargetLowering::getRegClassFor() instead.

12 years agoradeon/llvm: Remove deadcode from AMDILISelLowering.cpp
Tom Stellard [Fri, 15 Jun 2012 21:34:13 +0000 (17:34 -0400)]
radeon/llvm: Remove deadcode from AMDILISelLowering.cpp

12 years agogallium: Add support for Solaris Studio C++ compiler.
Vinson Lee [Sun, 17 Jun 2012 08:11:39 +0000 (01:11 -0700)]
gallium: Add support for Solaris Studio C++ compiler.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agollvmpipe: Implement cylindrical wrapping.
James Benton [Mon, 18 Jun 2012 16:31:39 +0000 (17:31 +0100)]
llvmpipe: Implement cylindrical wrapping.

Tested against mesa demos cylwrap and dx9 DCT address.exe which now passes 100%.

Signed-off-by: José Fonseca <jfonseca@vmware.com>
12 years agost/glx: Do not undefine _R, _G, and _B.
Vinson Lee [Mon, 18 Jun 2012 05:07:28 +0000 (22:07 -0700)]
st/glx: Do not undefine _R, _G, and _B.

Fixes build error on Cygwin and Solaris. _R, _G, and _B are used in
ctype.h on those platforms.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agosvga: fix synchronization bug between sampler views and surfaces
Brian Paul [Mon, 18 Jun 2012 16:22:06 +0000 (10:22 -0600)]
svga: fix synchronization bug between sampler views and surfaces

This fixes a bug where a sampler view was using stale texture/resource
data when the texture was modified through a surface (render to texture).
Bumping the texture and layer ages triggers sampler view revalidation.

Fixes piglit fbo-blit failure.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
12 years agogles2: Add GL_NV_read_buffer extension
Kristian Høgsberg [Fri, 15 Jun 2012 13:40:41 +0000 (09:40 -0400)]
gles2: Add GL_NV_read_buffer extension

This lets us select the front buffer for reading under GLES2.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoget.c: Rename EXTRA_VERSION_ES2 to EXTRA_API_ES2
Kristian Høgsberg [Fri, 15 Jun 2012 13:38:59 +0000 (09:38 -0400)]
get.c: Rename EXTRA_VERSION_ES2 to EXTRA_API_ES2

This extra condition checks the API not the version of the API, so rename
to reflect that.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agodocs/relnotes: comment out bug template
Andreas Boll [Sat, 16 Jun 2012 08:51:20 +0000 (10:51 +0200)]
docs/relnotes: comment out bug template

Signed-off-by: Brian Paul <brianp@vmware.com>
12 years agodocs/relnotes: replace tbd with release date
Andreas Boll [Sat, 16 Jun 2012 08:51:17 +0000 (10:51 +0200)]
docs/relnotes: replace tbd with release date

Signed-off-by: Brian Paul <brianp@vmware.com>
12 years agodocs/relnotes: fix validation errors
Andreas Boll [Sat, 16 Jun 2012 08:51:14 +0000 (10:51 +0200)]
docs/relnotes: fix validation errors

Signed-off-by: Brian Paul <brianp@vmware.com>
12 years agodocs/relnotes: consolidate html header
Andreas Boll [Sat, 16 Jun 2012 08:51:06 +0000 (10:51 +0200)]
docs/relnotes: consolidate html header

Signed-off-by: Brian Paul <brianp@vmware.com>
12 years agodraw: Ensure that the vertex_header type size matches expectation.
José Fonseca [Fri, 15 Jun 2012 13:02:31 +0000 (14:02 +0100)]
draw: Ensure that the vertex_header type size matches expectation.

This is failing sometimes, probably because TargetData keeps a structure layout
cache, which can becomes bogus, ever since the InvalidateStructLayoutInfo API
was removed in LLVM r135245.

This change merely makes the problem easier to diagnose (an assertion
failure instead of a random crash).

12 years agor600g: enable streamout by default on r7xx and DRM 2.17.0
Marek Olšák [Sun, 17 Jun 2012 15:54:38 +0000 (17:54 +0200)]
r600g: enable streamout by default on r7xx and DRM 2.17.0

Now that it's in Linus's tree.

Has anyone had a chance to test streamout on Cayman recently?

12 years agost/mesa: properly allocate MSAA renderbuffers
Marek Olšák [Fri, 15 Jun 2012 16:52:28 +0000 (18:52 +0200)]
st/mesa: properly allocate MSAA renderbuffers

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agost/mesa: make unsupported renderbuffer formats always fail as FBO incomplete
Marek Olšák [Fri, 15 Jun 2012 00:00:36 +0000 (02:00 +0200)]
st/mesa: make unsupported renderbuffer formats always fail as FBO incomplete

instead of failing to allocate a renderbuffer.

This also fixes piglit/get-renderbuffer-internalformat with non-renderable
formats.

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agost/mesa: separate sw renderbuffer allocation from hw one
Marek Olšák [Fri, 15 Jun 2012 15:58:35 +0000 (17:58 +0200)]
st/mesa: separate sw renderbuffer allocation from hw one

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agomesa: if AllocStorage doesn't choose a format, report FRAMEBUFFER_UNSUPPORTED
Marek Olšák [Fri, 15 Jun 2012 15:21:05 +0000 (17:21 +0200)]
mesa: if AllocStorage doesn't choose a format, report FRAMEBUFFER_UNSUPPORTED

This allows drivers not to do any allocation in AllocStorage if the storage
cannot be allocated because of an unsupported internalformat + samples combo.

The little ugliness is that AllocStorage is expected to return TRUE in this
case.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoi915g: More ops commute.
Stéphane Marchesin [Wed, 13 Jun 2012 17:00:57 +0000 (10:00 -0700)]
i915g: More ops commute.

This allows using the optimizations more broadly.

12 years agor600g: fix lockups with streamout on r7xx
Marek Olšák [Thu, 14 Jun 2012 20:32:51 +0000 (22:32 +0200)]
r600g: fix lockups with streamout on r7xx

This requires the latest streamout kernel patches.

Streamout is disabled by default on r7xx, so this patch is safe for regular
users.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
12 years agor600g: compute CS space for streamout correctly, add comments
Marek Olšák [Thu, 14 Jun 2012 20:25:50 +0000 (22:25 +0200)]
r600g: compute CS space for streamout correctly, add comments

SET_CONTEXT_REG was not counted in.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
12 years agor600g: set SMX_ACTION_ENA to fix streamout cache flushes on some chipsets
Marek Olšák [Thu, 14 Jun 2012 20:23:05 +0000 (22:23 +0200)]
r600g: set SMX_ACTION_ENA to fix streamout cache flushes on some chipsets

It helps on R7xx.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
12 years agoclover: Fix build with LLVM libs installed to non-standard directories
Alexey Shvetsov [Mon, 4 Jun 2012 13:30:48 +0000 (09:30 -0400)]
clover: Fix build with LLVM libs installed to non-standard directories

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Tom Stellard <thomas.stellard@amd.com>
12 years agost/mesa: don't do srgb->linear conversion in decompress_with_blit
Marek Olšák [Fri, 15 Jun 2012 03:13:02 +0000 (05:13 +0200)]
st/mesa: don't do srgb->linear conversion in decompress_with_blit

This fixes piglit/getteximage-formats on r600g.

NOTE: This is a candidate for stable branches.

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoglsl: Use ir_unop_f2u to convert floats to uints.
Paul Berry [Wed, 13 Jun 2012 22:50:23 +0000 (15:50 -0700)]
glsl: Use ir_unop_f2u to convert floats to uints.

Fixes piglit tests
spec/glsl-1.30/execution/{vs,fs}-float-uint-conversion on i965.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agogallium: Add TGSI_OPCODE_F2U to gallivm backend.
Paul Berry [Wed, 13 Jun 2012 22:46:27 +0000 (15:46 -0700)]
gallium: Add TGSI_OPCODE_F2U to gallivm backend.

Note: for the moment TGSI_OPCODE_F2U is implemented using
lp_build_itrunc() (the same function used to implement
TGSI_OPCODE_F2I).  In the long run, we should create an
lp_build_utrunc() function to do the proper conversion.  But this
should allow us to limp along with mostly correct behaviour for now.

12 years agogallium: Add support for ir_unop_f2u to tgsi backend.
Paul Berry [Wed, 13 Jun 2012 22:50:06 +0000 (15:50 -0700)]
gallium: Add support for ir_unop_f2u to tgsi backend.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoir_to_mesa: Add support for ir_unop_f2u to ir_to_mesa backend.
Paul Berry [Wed, 13 Jun 2012 22:49:46 +0000 (15:49 -0700)]
ir_to_mesa: Add support for ir_unop_f2u to ir_to_mesa backend.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoi965: Add support for ir_unop_f2u to i965 backend.
Paul Berry [Wed, 13 Jun 2012 22:49:25 +0000 (15:49 -0700)]
i965: Add support for ir_unop_f2u to i965 backend.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoglsl: Add support for ir_unop_f2u to constant folding.
Paul Berry [Wed, 13 Jun 2012 22:48:56 +0000 (15:48 -0700)]
glsl: Add support for ir_unop_f2u to constant folding.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoglsl: Add unary operation ir_unop_f2u.
Paul Berry [Wed, 13 Jun 2012 22:47:45 +0000 (15:47 -0700)]
glsl: Add unary operation ir_unop_f2u.

Previously, we performed conversions from float->uint by a two step
process: float->int->uint.  However, on platforms that use saturating
conversions (e.g. i965), this didn't work, because if the source value
was larger than the maximum representable int (0x7fffffff), then
converting it to an int would clamp it to 0x7fffffff.

This patch just adds the new opcode; further patches will adapt
optimization passes and back-ends to use it, and then finally the
ast_to_hir logic will be modified to emit the new opcode.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoi965/blorp: Implement source clipping.
Paul Berry [Tue, 12 Jun 2012 17:44:10 +0000 (10:44 -0700)]
i965/blorp: Implement source clipping.

This patch modifies blorp blits (which are used for MSAA) to properly
account for clipping of source coordinates.  Previously, if we
detected the possibility of source clipping, we would fall back to the
blit meta-op, which doesn't support MSAA and is very slow for depth
and stencil buffers.

Fixes piglit tests
"EXT_framebuffer_multisample/clip-and-scissor-blit" on i965/Gen6+.

Also substantially speeds up the Humble Bundle V game "Psychonauts" on
Gen6+ (without this patch, the game's depth buffer blits use the slow
blit meta-op).

Reviewed-by: Carl Worth <cworth@cworth.org>
12 years agoscons: add st_atom_array.c to the build
Brian Paul [Fri, 15 Jun 2012 15:31:15 +0000 (09:31 -0600)]
scons: add st_atom_array.c to the build

12 years agowinsys/radeon: enable IB submission to compute rings v2
Christian König [Mon, 21 May 2012 15:51:52 +0000 (17:51 +0200)]
winsys/radeon: enable IB submission to compute rings v2

This allows to submit things to the compute only
rings on cayman+

v2: rebased on current master and actually make use
    of the new flag in evergreen_compute.c

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
12 years agost/mesa: atomize vertex array state
Marek Olšák [Sat, 12 May 2012 13:52:40 +0000 (15:52 +0200)]
st/mesa: atomize vertex array state

This moves the state validation to where all the other states are validated.

12 years agowinsys/radeon: Remove unnecessary pipe_thread_destroy in radeon_drm_cs_destroy
Maarten Lankhorst [Tue, 22 May 2012 10:25:55 +0000 (12:25 +0200)]
winsys/radeon: Remove unnecessary pipe_thread_destroy in radeon_drm_cs_destroy

Fixes crash bug introduced with 210ddf0819b5 fd.o #49198
pthread_detach after a pthread_join is unneeded.

Signed-off-by: Maarten Lankhorst <m.b.lankhorst@gmail.com>
Signed-off-by: Marek Olšák <maraeo@gmail.com>