mesa.git
12 years agou2f_emit: Fix type parameter in LLVM call.
Olivier Galibert [Mon, 25 Jun 2012 16:50:13 +0000 (18:50 +0200)]
u2f_emit: Fix type parameter in LLVM call.

The type is the destination type (i.e. float vector) and not the
source type.  Fixes piglit fs-{in,de}crement-uint.

Signed-off-by: Olivier Galibert <galibert@pobox.com>
Signed-off-by: José Fonseca <jfonseca@vmware.com>
12 years agoi965/msaa: Set KILL_ENABLE when GL_ALPHA_TO_COVERAGE enabled.
Paul Berry [Mon, 25 Jun 2012 23:57:10 +0000 (16:57 -0700)]
i965/msaa: Set KILL_ENABLE when GL_ALPHA_TO_COVERAGE enabled.

i965 hardware needs to be informed of situations in which it's
possible for pixels (or samples) to be discarded for reasons other
than depth/stencil testing (e.g. due to an explicit "discard" in the
fragment shader).  One of these situations is when
GL_ALPHA_TO_COVERAGE is enabled, since that can cause samples to be
discarded by the color calculator when the pixel's alpha value is less
than 1.0.

Without this patch, GL_ALPHA_TO_COVERAGE does not take effect on depth
buffers.

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
12 years agoi965/msaa: Implement GL_SAMPLE_ALPHA_TO_{COVERAGE,ONE}.
Paul Berry [Sat, 23 Jun 2012 03:27:18 +0000 (20:27 -0700)]
i965/msaa: Implement GL_SAMPLE_ALPHA_TO_{COVERAGE,ONE}.

This patch enables the multisampling parameters
GL_SAMPLE_ALPHA_TO_COVERAGE and GL_SAMPLE_ALPHA_TO_ONE, which allow
the fragment shader's alpha output to be converted into a sample
coverage mask and ignored for blending.  i965 supports these
parameters through the BLEND_STATE structure.

The GL spec allows, but does not require, the implementation to dither
the conversion from alpha to a sample coverage mask, so that alpha
values that aren't a multiple of 1/num_samples result in the correct
proportion of samples being lit.  A bit exists in the BLEND_STATE
structure to enable this functionality, but according to the hardware
docs it must be disabled on Sandy Bridge (see the Sandy Bridge PRM,
Vol2, Part1, p379: AlphaToCoverage Dither Enable).  So it is enabled
for Gen7 only.

Fixes piglit tests
"EXT_framebuffer_multisample/sample-alpha-to-{coverage,one} {2,4}".

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
12 years agoi965/msaa: Implement glSampleCoverage.
Paul Berry [Sat, 23 Jun 2012 03:45:49 +0000 (20:45 -0700)]
i965/msaa: Implement glSampleCoverage.

This patch enables glSampleCoverage() functionality, which allows the
client program to specify that only a portion of the samples be lit up
when performing multisampled rendering.  i965 supports
glSampleCoverage() through the 3DSTATE_SAMPLE_MASK command packet,
which allows the driver to specify a bitfield indicating which samples
to light up.

Fixes piglit tests "EXT_framebuffer_multisample/sample-coverage {2,4}
{inverted,non-inverted}".

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
12 years agost/wgl: Add a few more comments.
José Fonseca [Tue, 26 Jun 2012 09:13:28 +0000 (10:13 +0100)]
st/wgl: Add a few more comments.

12 years agor600g: don't disable streamout if it hasn't been started
Marek Olšák [Tue, 26 Jun 2012 01:35:25 +0000 (03:35 +0200)]
r600g: don't disable streamout if it hasn't been started

12 years agou_blitter: disable streamout before rendering
Marek Olšák [Tue, 26 Jun 2012 01:33:16 +0000 (03:33 +0200)]
u_blitter: disable streamout before rendering

This fixes piglit EXT_transform_feedback tests:
- intervening-read output
- intervening-read prims_written

12 years agoi965/fs: Fix conversions float->bool, int->bool
Chad Versace [Thu, 21 Jun 2012 18:35:03 +0000 (11:35 -0700)]
i965/fs: Fix conversions float->bool, int->bool

Fixes gles2conform GL.equal.equal_bvec2_frag.

This fixes brw_fs_visitor's translation of ir_unop_f2b.  It used CMP to
convert the float to one of 0 or ~0. However, the convention in the
compiler is that true is represented by 1, not ~0. This patch adds an AND
to convert ~0 to 1.

By inspection, a similar problem existed with ir_unop_i2b, with a similar
fix.

[v2 kayden]: eliminate extra temporary register.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=49621
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
12 years agost/wgl: 80-column wrapping
Brian Paul [Mon, 25 Jun 2012 20:57:41 +0000 (14:57 -0600)]
st/wgl: 80-column wrapping

12 years agodocs/lists: add piglit mailing list
Andreas Boll [Mon, 25 Jun 2012 19:54:13 +0000 (21:54 +0200)]
docs/lists: add piglit mailing list

Signed-off-by: Brian Paul <brianp@vmware.com>
12 years agodocs/helpwanted: update some info
Andreas Boll [Mon, 25 Jun 2012 19:54:08 +0000 (21:54 +0200)]
docs/helpwanted: update some info

Signed-off-by: Brian Paul <brianp@vmware.com>
12 years agodocs/sourcetree: update some info
Andreas Boll [Mon, 25 Jun 2012 19:54:03 +0000 (21:54 +0200)]
docs/sourcetree: update some info

Signed-off-by: Brian Paul <brianp@vmware.com>
12 years agodocs/devinfo: update release info
Andreas Boll [Mon, 25 Jun 2012 19:53:06 +0000 (21:53 +0200)]
docs/devinfo: update release info

Signed-off-by: Brian Paul <brianp@vmware.com>
12 years agodocs/systems: add some useful driver links
Andreas Boll [Mon, 25 Jun 2012 19:53:01 +0000 (21:53 +0200)]
docs/systems: add some useful driver links

Signed-off-by: Brian Paul <brianp@vmware.com>
12 years agodocs: update some broken/old links
Andreas Boll [Mon, 25 Jun 2012 19:52:51 +0000 (21:52 +0200)]
docs: update some broken/old links

Signed-off-by: Brian Paul <brianp@vmware.com>
12 years agodocs: whitespace cleanup
Andreas Boll [Mon, 25 Jun 2012 19:52:47 +0000 (21:52 +0200)]
docs: whitespace cleanup

Signed-off-by: Brian Paul <brianp@vmware.com>
12 years agodocs: escape html special char
Andreas Boll [Mon, 25 Jun 2012 19:52:10 +0000 (21:52 +0200)]
docs: escape html special char

Signed-off-by: Brian Paul <brianp@vmware.com>
12 years agodocs: add missing target attribute
Andreas Boll [Mon, 25 Jun 2012 19:51:53 +0000 (21:51 +0200)]
docs: add missing target attribute

target is needed for the frame based layout

Signed-off-by: Brian Paul <brianp@vmware.com>
12 years agodocs/shading: use proper markup
Andreas Boll [Mon, 25 Jun 2012 19:51:28 +0000 (21:51 +0200)]
docs/shading: use proper markup

use dl instead of ul

Signed-off-by: Brian Paul <brianp@vmware.com>
12 years agodocs: document the GALLIUM_LOG_FILE env var
Brian Paul [Mon, 25 Jun 2012 17:44:44 +0000 (11:44 -0600)]
docs: document the GALLIUM_LOG_FILE env var

12 years agomesa: new MESA_LOG_FILE env var to log errors, warnings, etc., to a file
Brian Paul [Mon, 25 Jun 2012 17:43:03 +0000 (11:43 -0600)]
mesa: new MESA_LOG_FILE env var to log errors, warnings, etc., to a file

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
12 years agodocs: update GL3.3 status
Marek Olšák [Mon, 25 Jun 2012 21:48:33 +0000 (23:48 +0200)]
docs: update GL3.3 status

12 years agor600g: inline r600_blit_push_depth and use resource_copy_region
Marek Olšák [Mon, 25 Jun 2012 20:53:21 +0000 (22:53 +0200)]
r600g: inline r600_blit_push_depth and use resource_copy_region

We are going to have a separate resource for depth texturing and transfers
and this is just a transfer thing.

12 years agor600g: split flushed depth texture creation and flushing
Marek Olšák [Mon, 25 Jun 2012 10:45:32 +0000 (12:45 +0200)]
r600g: split flushed depth texture creation and flushing

12 years agoi965/msaa: Add backend support for centroid interpolation.
Paul Berry [Mon, 18 Jun 2012 20:52:02 +0000 (13:52 -0700)]
i965/msaa: Add backend support for centroid interpolation.

This patch causes the fragment shader to be configured correctly (and
the correct code to be generated) for centroid interpolation.  This
required two changes: brw_compute_barycentric_interp_modes() needs to
determine when centroid barycentric coordinates need to be included in
the pixel shader thread payload, and
fs_visitor::emit_general_interpolation() needs to interpolate using
the correct set of barycentric coordinates.

Fixes piglit tests "EXT_framebuffer_multisample/interpolation {2,4}
centroid-edges" on i965.

Reviewed-by: Eric Anholt <eric@anholt.net>
12 years agoi965/fs: Refactor interpolation code to prepare for adding centroid support.
Paul Berry [Thu, 21 Jun 2012 18:33:22 +0000 (11:33 -0700)]
i965/fs: Refactor interpolation code to prepare for adding centroid support.

Reviewed-by: Eric Anholt <eric@anholt.net>
12 years agoi965/msaa: Adapt clip setup for centroid noperspective interpolation.
Paul Berry [Mon, 18 Jun 2012 18:23:01 +0000 (11:23 -0700)]
i965/msaa: Adapt clip setup for centroid noperspective interpolation.

To save time, we only instruct the clip stage of the pipeline to
compute noperspective barycentric coordinates if those coordinates are
needed by the fragment shader.  Previously, we would determine whether
the coordinates were needed by seeing whether the fragment shader used
the BRW_WM_NONPERSPECTIVE_PIXEL_BARYCENTRIC interpolation mode.

However, with MSAA, it's possible that the fragment shader might use
BRW_WM_NONPERSPECTIVE_CENTROID_BARYCENTRIC instead.  In the future,
when we support ARB_sample_shading, it might use
BRW_WM_NONPERSPECTIVE_SAMPLE_BARYCENTRIC.

This patch modifies the upload_clip_state() functions to check for all
three possible noperspective interpolation modes.

Reviewed-by: Eric Anholt <eric@anholt.net>
12 years agoglsl: Add IsCentroid bitfield to gl_fragment_program.
Paul Berry [Mon, 18 Jun 2012 19:10:13 +0000 (12:10 -0700)]
glsl: Add IsCentroid bitfield to gl_fragment_program.

This bitfield tells the back-ends which of a fragment shader's inputs
require centroid interpolation.  It is only set for GLSL fragment
shaders, since assembly fragment shaders don't support centroid
interpolation.

Reviewed-by: Eric Anholt <eric@anholt.net>
12 years agost/mesa: added some simple fbo debugging/helper code
Brian Paul [Mon, 25 Jun 2012 17:28:03 +0000 (11:28 -0600)]
st/mesa: added some simple fbo debugging/helper code

12 years agollvmpipe: fix the LP_NO_RAST debug option
Brian Paul [Fri, 22 Jun 2012 19:06:40 +0000 (13:06 -0600)]
llvmpipe: fix the LP_NO_RAST debug option

It was only no-oping the clear() function, not actual triangle
rasterization.  Move the no_rast field from lp_context down into
lp_rasterizer so it's accessible where it's needed.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
12 years agoscons: Add glsl/glcpp to the include path.
Vinson Lee [Tue, 19 Jun 2012 07:02:53 +0000 (00:02 -0700)]
scons: Add glsl/glcpp to the include path.

Fixes this build failure on Solaris.

  Compiling build/sunos-debug/glsl/glcpp/glcpp-lex.c ...
"src/glsl/glcpp/glcpp-lex.l", line 30: cannot find include file: "glcpp-parse.h"

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoautomake: add missing inclusion of GL headers
Laurent Carlier [Fri, 22 Jun 2012 13:03:49 +0000 (15:03 +0200)]
automake: add missing inclusion of GL headers

Building fail when GL headers are not installed in the system,
so add inclusion of these headers.

Signed-off-by: Brian Paul <brianp@vmware.com>
12 years agomesa: #define fprintf to be __mingw_fprintf() on Mingw32
Brian Paul [Fri, 22 Jun 2012 16:16:25 +0000 (10:16 -0600)]
mesa: #define fprintf to be __mingw_fprintf() on Mingw32

So that formats such as "%llx" are understood.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agosvga: init pointer to NULL to silence MSVC warning
Brian Paul [Fri, 22 Jun 2012 15:43:18 +0000 (09:43 -0600)]
svga: init pointer to NULL to silence MSVC warning

12 years agoclover: Add --with-clang-libdir option and verify CLANG_RESOURCE_DIR
Tom Stellard [Fri, 15 Jun 2012 20:52:16 +0000 (16:52 -0400)]
clover: Add --with-clang-libdir option and verify CLANG_RESOURCE_DIR

$CLANG_RESOURCE_DIR is the directory that contains all resources
needed by clang to compile programs.  When clover uses clang to
compile kernels it needs to specify a resource dir, so that clang
can find its internal headers (e.g. stddef.h).

clang defines $CLANG_RESOURCE_DIR as $CLANG_LIBDIR/clang/$CLANG_VERSION

This patch adds the --with-clang-libdir option in order to accommodate
clang intalls to non-standard locations, and it also adds a check
to the configure script to verify that $CLANG_RESOURCE_DIR/include
contains the necessary header files.

12 years agoi965: Compute dFdy() correctly for FBOs.
Paul Berry [Wed, 20 Jun 2012 20:40:45 +0000 (13:40 -0700)]
i965: Compute dFdy() correctly for FBOs.

On i965, dFdx() and dFdy() are computed by taking advantage of the
fact that each consecutive set of 4 pixels dispatched to the fragment
shader always constitutes a contiguous 2x2 block of pixels in a fixed
arrangement known as a "sub-span".  So we calculate dFdx() by taking
the difference between the values computed for the left and right
halves of the sub-span, and we calculate dFdy() by taking the
difference between the values computed for the top and bottom halves
of the sub-span.

However, there's a subtlety when FBOs are in use: since FBOs use a
coordinate system where the origin is at the upper left, and window
system framebuffers use a coordinate system where the origin is at the
lower left, the computation of dFdy() needs to be negated for FBOs.

This patch modifies the fragment shader back-ends to negate the value
of dFdy() when an FBO is in use.  It also modifies the code that
populates the program key (brw_wm_populate_key() and
brw_fs_precompile()) so that they always record in the program key
whether we are rendering to an FBO or to a window system framebuffer;
this ensures that the fragment shader will get recompiled when
switching between FBO and non-FBO use.

This will result in unnecessary recompiles of fragment shaders that
don't use dFdy().  To fix that, we will need to adapt the GLSL and
NV_fragment_program front-ends to record whether or not a given shader
uses dFdy().  I plan to implement this in a future patch series; I've
left FIXME comments in the code as a reminder.

Fixes Piglit test "fbo-deriv".

NOTE: This is a candidate for stable release branches.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agomesa: minor transform feedback comments
Brian Paul [Fri, 22 Jun 2012 14:48:45 +0000 (08:48 -0600)]
mesa: minor transform feedback comments

12 years agomesa: fix comments on UBO buffer binding functions
Brian Paul [Fri, 22 Jun 2012 14:43:58 +0000 (08:43 -0600)]
mesa: fix comments on UBO buffer binding functions

The old comments were for transform feedback.

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