mesa.git
11 years agoi965: Use swizzles to force alpha to 1.0 for RED, RG, or RGB textures.
Carl Worth [Tue, 22 Jan 2013 21:25:37 +0000 (13:25 -0800)]
i965: Use swizzles to force alpha to 1.0 for RED, RG, or RGB textures.

We may be using a texture with actual RGBA storage for these formats, so force
the alpha value read to 1.0.

This commit fixes the following piglit (sub) tests:

ARB_texture_float/fb-blending-formats
GL_RGB16F_ARB
EXT_framebuffer_object/fbo-blending-formats
                GL_RGB10
GL_RGB12
        GL_RGB16
EXT_texture_snorm/fbo-blending-formats
GL_RGB16_SNORM
GL_RGB8_SNORM
GL_RGB_SNORM

These test improvements depend on the previous commit as well. That commit
smashes alpha to 1.0 for the case of ReadPixels (so fixes "FBO testing" as
reported by this test), while this commit smashes alpha to 1.0 for the case of
texturing (fixed the "window testing" as reported by this test).

Note: Haswell bypasses this swizzle code, so may require an independent fix
for this bug.

Reviewed-by: Eric Anholt <eric@anholt.net>
11 years agoReadPixels: Force ALPHA to 1 while rebasing RGBA values for GL_RGB format
Carl Worth [Mon, 21 Jan 2013 20:16:27 +0000 (12:16 -0800)]
ReadPixels: Force ALPHA to 1 while rebasing RGBA values for GL_RGB format

When performing a ReadPixels operation, we may be reading from a buffer that
stores alpha values, but that is actually representing a buffer with no alpha
channel. In this case, while rebasing the values, touch up all alpha values
read to 1.0.

This commit fixes the following piglit (sub) tests:

ARB_texture_float/fbo-colormask-formats
GL_RBG16F_ARB
EXT_texture_snorm/fbo-colormask-formats
GL_RGB16_SNORM
GL_RGB8_SNORM
GL_RGB_SNORM

It likely improves the results of other tests as well, but a PASS remains
elusive due to additional bugs.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
11 years agoi965: Examine _BaseFormat when deciding to perform xRGB_alpha fixups
Carl Worth [Mon, 21 Jan 2013 20:18:02 +0000 (12:18 -0800)]
i965: Examine _BaseFormat when deciding to perform xRGB_alpha fixups

The renderbuffer's Format field may have an alpha channel even when the
underlying _BaseFormat does not. This can happen when mesa chooses to use
RGBA16 for an RGB16 format, for example.

So look at _BaseFormat when deciding whether to fixup the blend factors.

This test improves the results of at least the following piglit tests:

EXT_frambebuffer_object/fbo-blending-formats
         {GL_RGB10, GL_RGB12, GL_RGB16}
EXT_texture_snorm/fbo-blending-formats
{GL_RGB16_SNORM, GLRGB8_SNORM, GL_RGB_SNORM}

But none of these actually change from FAIL to PASS yet. The R, G, and B probe
values are fixed with this commit, but the tests still fail because the alpha
values are still wrong.

Reviewed-by: Eric Anholt <eric@anholt.net>
11 years agoscons: Fix source lists parsing on Windows.
José Fonseca [Tue, 22 Jan 2013 20:54:17 +0000 (20:54 +0000)]
scons: Fix source lists parsing on Windows.

/ vs \ mismatch was causing .objs to be put in the source tree, causing
breakeage when doing different build types in the same tree (eg., debug
vs release).

Fix this by normalizing everything to / slashes.

It's probably a good idea to purge all .objs from source tree to prevent
issues completely.

11 years agoGL3.txt: i965 supports ARB_base_instance
Matt Turner [Wed, 23 Jan 2013 05:34:25 +0000 (21:34 -0800)]
GL3.txt: i965 supports ARB_base_instance

Added in commit cdd3f549.

11 years agowmesa: include api_exec.h to fix compilation
Brian Paul [Tue, 22 Jan 2013 23:42:54 +0000 (16:42 -0700)]
wmesa: include api_exec.h to fix compilation

11 years agodraw: fix MSVC divide-by-zero compilation error
Brian Paul [Tue, 22 Jan 2013 23:41:56 +0000 (16:41 -0700)]
draw: fix MSVC divide-by-zero compilation error

Kind of lame, but it works.

11 years agoi965: Implement the GL_ARB_base_instance extension.
Kenneth Graunke [Fri, 18 Jan 2013 19:11:10 +0000 (11:11 -0800)]
i965: Implement the GL_ARB_base_instance extension.

Thanks to Fredrik Höglund, all the hard work was already done.

Tested using a modified oglconform (that actually runs these tests on
our driver); it looks like there may be some bugs when using client
arrays.  All applicable non-compatibility tests passed.

For now, only enable it in core profiles.

Reviewed-by: Eric Anholt <eric@anholt.net>
Tested-by: Ian Romanick <idr@freedesktop.org>
11 years agoglsl/build: Build libglcpp and libglslcore in builtin_compiler
Matt Turner [Fri, 18 Jan 2013 07:51:04 +0000 (23:51 -0800)]
glsl/build: Build libglcpp and libglslcore in builtin_compiler

And reuse them if not cross compiling.

Tested-by: Andreas Boll <andreas.boll.dev@gmail.com>
11 years agoglsl/Makefile.sources: Correct BUILTIN_COMPILER_CXX_FILES
Matt Turner [Fri, 18 Jan 2013 07:28:42 +0000 (23:28 -0800)]
glsl/Makefile.sources: Correct BUILTIN_COMPILER_CXX_FILES

Squashed with two reverts:

Revert "android: Update for builtin_stubs.cpp move"

This reverts commit c0def90ede1e939173041b8785303de90f8fdc6c.

Revert "scons: Update for builtin_stubs.cpp"

This reverts commit 8ac4b82699ad0a59ae6ae6d3415702eaa5d4fe3b.

Tested-by: Andreas Boll <andreas.boll.dev@gmail.com>
Tested-on-Android-by: Chad Versace <chad.versace@linux.intel.com>
11 years agobuild: Use AX_PROG_FLEX
Matt Turner [Mon, 1 Oct 2012 20:28:51 +0000 (13:28 -0700)]
build: Use AX_PROG_FLEX

Tested-by: Andreas Boll <andreas.boll.dev@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=47248

11 years agobuild: Use AX_PROG_BISON
Matt Turner [Mon, 1 Oct 2012 20:11:30 +0000 (13:11 -0700)]
build: Use AX_PROG_BISON

No one tests yacc/byacc. Let's just request bison specifically.

Tested-by: Andreas Boll <andreas.boll.dev@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=46815

11 years agobuiltin_compiler/build: Use generated parser files
Matt Turner [Thu, 17 Jan 2013 22:40:21 +0000 (14:40 -0800)]
builtin_compiler/build: Use generated parser files

... instead of generating them again.

Tested-by: Andreas Boll <andreas.boll.dev@gmail.com>
11 years agoglsl/build: Build tests via the glsl Makefile
Matt Turner [Tue, 15 Jan 2013 19:45:40 +0000 (11:45 -0800)]
glsl/build: Build tests via the glsl Makefile

Tested-by: Andreas Boll <andreas.boll.dev@gmail.com>
11 years agoglsl/build: Build glcpp via the glsl Makefile
Matt Turner [Tue, 15 Jan 2013 06:00:08 +0000 (22:00 -0800)]
glsl/build: Build glcpp via the glsl Makefile

Removing the subdirectory recursion provides a small speed up.

Tested-by: Andreas Boll <andreas.boll.dev@gmail.com>
11 years agoglsl/build: Don't build builtin_compiler separately if not cross compiling
Matt Turner [Tue, 15 Jan 2013 00:16:00 +0000 (16:16 -0800)]
glsl/build: Don't build builtin_compiler separately if not cross compiling

Reduces the number of times that src/glsl/ is compiled when not cross
compiling.

Tested-by: Andreas Boll <andreas.boll.dev@gmail.com>
11 years agoglsl/build: Don't build glsl_compiler
Matt Turner [Mon, 14 Jan 2013 22:24:17 +0000 (14:24 -0800)]
glsl/build: Don't build glsl_compiler

Use glslparsertest from piglit instead.

Tested-by: Andreas Boll <andreas.boll.dev@gmail.com>
11 years agodraw: fix problem in screen-space interpolation clip code
Brian Paul [Mon, 21 Jan 2013 18:41:02 +0000 (11:41 -0700)]
draw: fix problem in screen-space interpolation clip code

I don't see how this could have ever worked right.

The screen-space interpolation code uses the vertex->data[pos_attr]
position which contain window coords.  But window coords are only
computed for the unclipped vertices; the clipped vertices have
undefined window coords (see draw_cliptest_tmp.h).

Use the vertex clip coords instead which are always defined.

Fixes http://bugs.freedesktop.org/show_bug.cgi?id=55476
(piglit fbo-blit-stretch failure on softpipe)

Note: This is a candidate for the 9.0 branch.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
11 years agodraw: improve the clipper debug/printf code
Brian Paul [Mon, 21 Jan 2013 18:37:07 +0000 (11:37 -0700)]
draw: improve the clipper debug/printf code

Reviewed-by: José Fonseca <jfonseca@vmware.com>
11 years agodraw: add new debug code and comments in clip code template
Brian Paul [Mon, 21 Jan 2013 18:32:49 +0000 (11:32 -0700)]
draw: add new debug code and comments in clip code template

In debug builds, set clipped vertex window coordinates to NaN values
to help debugging.  Otherwise, we're just leaving the coordinate in clip
space and it's invalid to use it later expecting it to be a window coord.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
11 years agoswrast: fix blit code's nearest/linear coordinate arithmetic
Brian Paul [Mon, 21 Jan 2013 15:59:25 +0000 (08:59 -0700)]
swrast: fix blit code's nearest/linear coordinate arithmetic

Fixes piglit's fbo-blit-stretch test.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
11 years agoswrast: fix incorrect width for direct/nearest blit
Brian Paul [Mon, 21 Jan 2013 15:59:25 +0000 (08:59 -0700)]
swrast: fix incorrect width for direct/nearest blit

Reviewed-by: José Fonseca <jfonseca@vmware.com>
11 years agoswrast: move resampleRow setup code in blit_nearest()
Brian Paul [Mon, 21 Jan 2013 15:59:25 +0000 (08:59 -0700)]
swrast: move resampleRow setup code in blit_nearest()

The resampleRow setup depends on pixelSize.  For color buffers,
we don't know the pixelSize until we're in the buffer loop.  Move
that code inside the loop.

Fixes: http://bugs.freedesktop.org/show_bug.cgi?id=59541
Reviewed-by: José Fonseca <jfonseca@vmware.com>
11 years agodocs: import release notes for 9.0.2, add news item
Andreas Boll [Tue, 22 Jan 2013 20:21:09 +0000 (21:21 +0100)]
docs: import release notes for 9.0.2, add news item

11 years agoscons: Disable frame pointer omission for all build types except release.
José Fonseca [Tue, 8 Mar 2011 13:18:56 +0000 (13:18 +0000)]
scons: Disable frame pointer omission for all build types except release.

In particular for checked builds, where debug_backtrace_capture relies
on it.

11 years agonouveau/build: Fix build failures when drm is not in /usr/include.
José Fonseca [Tue, 22 Jan 2013 18:35:13 +0000 (18:35 +0000)]
nouveau/build: Fix build failures when drm is not in /usr/include.

Fixes failures to include libdrm/nouveau.h when drm is not installed in
/usr/include.

Reviewed-by: Matt Turner <mattst88@gmail.com>
11 years agoradeon/llvm: Handle LP_CHAN_ALL in emit_fetch_immediate().
Michel Dänzer [Mon, 21 Jan 2013 18:08:24 +0000 (19:08 +0100)]
radeon/llvm: Handle LP_CHAN_ALL in emit_fetch_immediate().

Fixes piglit spec/ARB_sampler_objects/sampler-incomplete and
spec/EXT_texture_swizzle/depth_texture_mode_and_swizzle.

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
11 years agobuild: Fix build on systems where /usr/bin/python isn't python 2.
Kenneth Graunke [Mon, 21 Jan 2013 18:42:50 +0000 (10:42 -0800)]
build: Fix build on systems where /usr/bin/python isn't python 2.

configure.ac sets up a PYTHON2 variable, which is what we want
AX_PYTHON_MODULE to use (since we only use Python 2 for now).

NOTE: This is a candidate for the 9.0 branch.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=31598
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>
11 years agomesa/es3: Apply stricter multisample blit rules for ES3.
Ian Romanick [Sat, 19 Jan 2013 01:29:37 +0000 (17:29 -0800)]
mesa/es3: Apply stricter multisample blit rules for ES3.

Fixes gles3conform
framebuffer_blit_error_blitframebuffer_multisampled_read_buffer_different_origins.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
11 years agomesa/es3: Disallow FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE query of DEPTH_STENCIL_ATTAC...
Ian Romanick [Sat, 19 Jan 2013 01:25:57 +0000 (17:25 -0800)]
mesa/es3: Disallow FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE query of DEPTH_STENCIL_ATTACHMENT

This error was added in the 3.0.1 update to the OpenGL ES 3.0 spec.
Fixes the updated gles3conform packed_depth_stencil_parameters test.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
11 years agomesa: Don't allow blits to / from the same buffer in OpenGL ES 3.0
Ian Romanick [Thu, 17 Jan 2013 21:37:53 +0000 (13:37 -0800)]
mesa: Don't allow blits to / from the same buffer in OpenGL ES 3.0

Fixes gles3conform test CoverageES30.  It temporarily regresses some
framebuffer_blit tests, but the failing subcases have been determined to
be invalid for OpenGL ES 3.0.

v2: Fix typo in depth (and stencil) RB checking.  Noticed by Ken.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
11 years agomesa: Remove exec thunks from the dlist.c module.
Eric Anholt [Fri, 18 Jan 2013 21:44:58 +0000 (13:44 -0800)]
mesa: Remove exec thunks from the dlist.c module.

These were introduced in 2000 during a rework of the TNL module (commit
cab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290), though I'm having a hard time
finding an instance there of one of these Exec functions being changed
at runtime.

Regardless, as far as I can tell now, these functions don't get changed,
by grepping for calls to SET_* to change the dispatch table (we do change
functions in GLvertexformat at runtime, but those don't overlap with
this set of functions).  Remove them and just let them be initialized to
the same functions as are in the Exec table.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
11 years agomesa: Initially populate the display list with the exec list.
Eric Anholt [Fri, 18 Jan 2013 00:39:27 +0000 (16:39 -0800)]
mesa: Initially populate the display list with the exec list.

This cuts out a ton of code to make functions not set to a save_ variant
match.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
11 years agomesa: Delay display list save dispatch setup until Exec is set up.
Eric Anholt [Fri, 18 Jan 2013 00:58:49 +0000 (16:58 -0800)]
mesa: Delay display list save dispatch setup until Exec is set up.

This will let us copy from the Exec dispatch to deal with our commands that
don't get compiled into display lists.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
11 years agomesa: Make the drivers call a non-code-generated dispatch table setup.
Eric Anholt [Fri, 18 Jan 2013 00:49:57 +0000 (16:49 -0800)]
mesa: Make the drivers call a non-code-generated dispatch table setup.

I want to drive the Save dispatch table setup from this same function.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
11 years agomesa: Remove the size argument from _mesa_alloc_dispatch_table().
Eric Anholt [Fri, 18 Jan 2013 00:53:31 +0000 (16:53 -0800)]
mesa: Remove the size argument from _mesa_alloc_dispatch_table().

All callers are in Mesa core and all use _gloffset_COUNT, so just rely on
the already baked-in use of _gloffset_COUNT in the function.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
11 years agomesa: Remove two of the now unused ASSERT_OUTSIDE_BEGIN_END macros.
Eric Anholt [Thu, 17 Jan 2013 21:37:03 +0000 (13:37 -0800)]
mesa: Remove two of the now unused ASSERT_OUTSIDE_BEGIN_END macros.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
11 years agomesa: Drop manual checks for outside begin/end.
Eric Anholt [Thu, 17 Jan 2013 00:20:38 +0000 (16:20 -0800)]
mesa: Drop manual checks for outside begin/end.

We now have a separate dispatch table for begin/end that prevent these
functions from being entered during that time.  The
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVALs are left because I don't want to
change any return values or introduce new error-only stubs at this
point.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
11 years agomesa: Install a minimal dispatch table during glBegin()/glEnd().
Eric Anholt [Wed, 16 Jan 2013 23:20:45 +0000 (15:20 -0800)]
mesa: Install a minimal dispatch table during glBegin()/glEnd().

This is a step toward getting rid of ASSERT_OUTSIDE_BEGIN_END() in Mesa.

v2: Finish create_beginend_table() comment, move loopback API init into it,
    and add a const flag. (suggestions by Brian)

Reviewed-by: Brian Paul <brianp@vmware.com> (v1)
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> (v1)
11 years agomesa: Remove the dead PrepareExecBegin() driver hook.
Eric Anholt [Wed, 16 Jan 2013 23:07:31 +0000 (15:07 -0800)]
mesa: Remove the dead PrepareExecBegin() driver hook.

This was used in i965 for a while, but no more.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
11 years agomesa: Use an early return to unindent most of vbo_exec_Begin/End().
Eric Anholt [Wed, 16 Jan 2013 23:01:10 +0000 (15:01 -0800)]
mesa: Use an early return to unindent most of vbo_exec_Begin/End().

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
11 years agomesa: Improve a glTexEnv error message by looking up the enum.
Eric Anholt [Wed, 16 Jan 2013 21:32:11 +0000 (13:32 -0800)]
mesa: Improve a glTexEnv error message by looking up the enum.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
11 years agomesa: Fix regression in dlist save primitive tracking.
Eric Anholt [Wed, 16 Jan 2013 18:40:06 +0000 (10:40 -0800)]
mesa: Fix regression in dlist save primitive tracking.

My change 7ca4f07b5b77ccac0a9b60dc5ac9082906b5947e caused errors to not
be thrown when they should, because the new if statement for ExecuteFlag
made the CurrentSavePrimitive not get set.  And on further review, we
shouldn't be validating our primitive in GL_COMPILE mode, since the
command shouldn't be executed yet.

Partially fixes piglit gl-1.0-beginend-coverage.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
11 years agovl: round next_msc to integer frame, and kill skew_msc
Maarten Lankhorst [Sat, 19 Jan 2013 22:03:53 +0000 (23:03 +0100)]
vl: round next_msc to integer frame, and kill skew_msc

This reduces jitter slightly in a cleaner way, without desynchronizing mplayer2 as badly
when falling behind.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
11 years agoscons: Fix dependencies of generated headers.
José Fonseca [Mon, 21 Jan 2013 17:47:51 +0000 (17:47 +0000)]
scons: Fix dependencies of generated headers.

It appears that scons implicit dependency scanners fail to chain
dependencies of generated headers when these are outside the build tree.

This patch ensures generated source files are _always_ put in the build
tree. I'm not 100% this will fix all depency issues, but from my
experiments it does seem to fix this.

NOTE: For this to be effective it is necessary to clean the source tree
from generated header/source files.

Reviewed-by: Brian Paul <brianp@vmware.com>
11 years agointel: Don't expose XRGB8888 visuals any more
Ian Romanick [Mon, 21 Jan 2013 01:39:54 +0000 (20:39 -0500)]
intel: Don't expose XRGB8888 visuals any more

There really isn't any point.  There is no resource savings, and we have
to do gymnastics in the driver to make it work.

There are also bad interactions with multisampling and OpenGL ES 3.0.
In ES3, a multisample-to-singlesample blit must have identical source
and destination format.  This means a multisample RGBA8 to singlesample
RGB8 (window) blit will generate an error.  Also in ES3, RGB8 is not a
renderable format.  This means that the application CANNOT make an RGB8
multisample renderbuffer.

As a result, if an application gets an RGB8 window and wants to do
multisample FBO rendering, it will probably break.

"Fixes" gles3conform
framebuffer_blit_functionality_multisampled_to_singlesampled_blit test
on RGB8 visuals.

v2: Fix 'formats' array size.  Suggested by Ken.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Eric Anholt <eric@anholt.net>
11 years agoi965: Enable floating-point textures always
Ian Romanick [Tue, 21 Aug 2012 22:53:27 +0000 (15:53 -0700)]
i965: Enable floating-point textures always

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Eric Anholt <eric@anholt.net>
11 years agor300g: add a workaround for the AA colorbuffer addressing bug on R500
Marek Olšák [Sun, 20 Jan 2013 17:09:58 +0000 (18:09 +0100)]
r300g: add a workaround for the AA colorbuffer addressing bug on R500

11 years agor300g: allow resolutions up to 1280x1024 with AA optimizations on 1-pipe cards
Marek Olšák [Sun, 20 Jan 2013 15:52:17 +0000 (16:52 +0100)]
r300g: allow resolutions up to 1280x1024 with AA optimizations on 1-pipe cards

because single-pipe cards have bigger CMASK RAM

11 years agor300g: enable AA optimizations for the RGBA16F format
Marek Olšák [Tue, 15 Jan 2013 20:41:34 +0000 (21:41 +0100)]
r300g: enable AA optimizations for the RGBA16F format

11 years agoradeonsi: More assorted depth/stencil changes ported from r600g.
Marek Olšák [Thu, 17 Jan 2013 18:36:41 +0000 (19:36 +0100)]
radeonsi: More assorted depth/stencil changes ported from r600g.

[ Squashed port of the following r600g commits: - Michel Dänzer ]

commit 428e37c2da420f7dc14a2ea265f2387270f9bee1
Author: Marek Olšák <maraeo@gmail.com>
Date:   Tue Oct 2 22:02:54 2012 +0200

    r600g: add in-place DB decompression and texturing with DB tiling

    The decompression is done in-place and only the compressed tiles are
    decompressed. Note: R6xx-R7xx can do that only with Z16 and Z32F.

    The texture unit is programmed to use non-displayable tiling and depth
    ordering of samples, so that it can fetch the texture in the native DB format.

    The latest version of the libdrm surface allocator is required for stencil
    texturing to work. The old one didn't create the mipmap tree correctly.
    We need a separate mipmap tree for stencil, because the stencil mipmap
    offsets are not really depth offsets/4.

    There are still some known bugs, but this should save some memory and it also
    improves performance a little bit in Lightsmark (especially with low
    resolutions; tested with Radeon HD 5000).

    The DB->CB copy is still used for transfers.

commit e2f623f1d6da9bc987582ff68d0471061ae44030
Author: Marek Olšák <maraeo@gmail.com>
Date:   Sat Jul 28 13:55:59 2012 +0200

    r600g: don't decompress depth or stencil if there isn't any

commit 43e226b6efb77db2247741cc2057d9625a2cfa05
Author: Marek Olšák <maraeo@gmail.com>
Date:   Wed Jul 18 00:32:50 2012 +0200

    r600g: optimize uploading depth textures

    Make it only copy the portion of a depth texture being uploaded and
    not the whole 2D layer.

    There is also a little code cleanup.

commit b242adbe5cfa165b252064a1ea36f802d8251ef1
Author: Marek Olšák <maraeo@gmail.com>
Date:   Wed Jul 18 00:17:46 2012 +0200

    r600g: remove needless wrapper r600_texture_depth_flush

commit 611dd529425281d73f1f0ad2000362d4a5525a25
Author: Marek Olšák <maraeo@gmail.com>
Date:   Wed Jul 18 00:05:14 2012 +0200

    r600g: init_flushed_depth_texture should be able to report errors

commit 80755ff56317446a8c89e611edc1fdf320d6779b
Author: Marek Olšák <maraeo@gmail.com>
Date:   Sat Jul 14 17:06:27 2012 +0200

    r600g: properly track which textures are depth

    This fixes the issue with have_depth_texture never being set to false.

commit fe1fd675565231b49d3ac53d0b4bec39d8bc6781
Author: Marek Olšák <maraeo@gmail.com>
Date:   Sun Jul 8 03:10:37 2012 +0200

    r600g: don't flush depth textures set as colorbuffers

    The only case a depth buffer can be set as a color buffer is when flushing.

    That wasn't always the case, but now this code isn't required anymore.

commit 5a17d8318ec2c20bf86275044dc8f715105a88e7
Author: Marek Olšák <maraeo@gmail.com>
Date:   Sun Jul 8 02:14:18 2012 +0200

    r600g: flush depth textures bound to vertex shaders

    This was missing/broken. There are also minor code cleanups.

commit dee58f94af833906863b0ff2955b20f3ab407e63
Author: Marek Olšák <maraeo@gmail.com>
Date:   Sun Jul 8 01:54:24 2012 +0200

    r600g: do fine-grained depth texture flushing

    - maintain a mask of which mipmap levels are dirty (instead of one big flag)
    - only flush what was requested at a given point and not the whole resource
      (most often only one level and one layer has to be flushed)

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
11 years agoradeonsi: improve flushed depth texture handling
Vadim Girlin [Tue, 15 Jan 2013 18:36:32 +0000 (19:36 +0100)]
radeonsi: improve flushed depth texture handling

Use r600_resource_texture::flished_depth_texture for GPU access, and
allocate it in the VRAM. For transfers we'll allocate texture in the GTT
and store it in the r600_transfer::staging.

Improves performance when flushed depth texture is frequently used by the
GPU, e.g. in Lightsmark

[ Ported from r600g commit 37708479608af877986b76302a9c92611d1e23d0 ]

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
11 years agoradeonsi: Assorted depth/stencil changes ported from r600g.
Marek Olšák [Tue, 15 Jan 2013 18:04:13 +0000 (19:04 +0100)]
radeonsi: Assorted depth/stencil changes ported from r600g.

[ Squashed port of the following r600g commits: - Michel Dänzer ]

commit c1e8c845ea9c6f843cc5bba5974668c007799bbc
Author: Marek Olšák <maraeo@gmail.com>
Date:   Sat Jul 7 19:10:00 2012 +0200

    r600g: inline r600_hw_copy_region

commit 4891c5dc64ccd8cf2bf8a8550ae23e1a61806a7d
Author: Marek Olšák <maraeo@gmail.com>
Date:   Mon Jun 25 22:53:21 2012 +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.

commit da98bb6fc105e1a2f688a1713ca9e50f0ac8fbed
Author: Marek Olšák <maraeo@gmail.com>
Date:   Mon Jun 25 12:45:32 2012 +0200

    r600g: split flushed depth texture creation and flushing

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
11 years agoradeonsi: Enable 1D tiling for non-depth resources as well.
Michel Dänzer [Thu, 17 Jan 2013 18:16:49 +0000 (19:16 +0100)]
radeonsi: Enable 1D tiling for non-depth resources as well.

No piglit regressions anymore thanks to fixes in libdrm_radeon and here.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
11 years agoradeonsi: Fix 1D tiling mode index for non-scanout resources.
Michel Dänzer [Thu, 17 Jan 2013 18:15:15 +0000 (19:15 +0100)]
radeonsi: Fix 1D tiling mode index for non-scanout resources.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
11 years agobuild: Remove dead SHARED_GLAPI variable
Matt Turner [Sat, 19 Jan 2013 07:18:14 +0000 (23:18 -0800)]
build: Remove dead SHARED_GLAPI variable

The static Makefiles used it.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>
11 years agoglsl/build: Build glsl_test only on make check
Matt Turner [Mon, 14 Jan 2013 22:21:41 +0000 (14:21 -0800)]
glsl/build: Build glsl_test only on make check

Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>
11 years agoglsl/build: Remove dead LIBRARY_* variables
Matt Turner [Mon, 14 Jan 2013 22:26:40 +0000 (14:26 -0800)]
glsl/build: Remove dead LIBRARY_* variables

Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>
11 years agoxmlpool/build: generate options.h via BUILT_SOURCES
Matt Turner [Mon, 14 Jan 2013 22:18:02 +0000 (14:18 -0800)]
xmlpool/build: generate options.h via BUILT_SOURCES

Fixes missing options.h when doing 'make check' in dri/common before
'make' has been run.

Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>
11 years agofbobject: add additional fbo completeness checks for GLES
Jordan Justen [Thu, 27 Dec 2012 21:34:44 +0000 (13:34 -0800)]
fbobject: add additional fbo completeness checks for GLES

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
11 years agoframebuffer: update allowed implementation format/type
Jordan Justen [Sat, 12 Jan 2013 09:11:21 +0000 (01:11 -0800)]
framebuffer: update allowed implementation format/type

Allow additional format/type combinations based on the
color render buffer to fix failures with gles3-gtf.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
11 years agoreadpix: allow implementation format/type
Jordan Justen [Sat, 12 Jan 2013 09:05:44 +0000 (01:05 -0800)]
readpix: allow implementation format/type

For GLES2/3 allow reading of pixels with format/type based on:
 * GL_IMPLEMENTATION_COLOR_READ_FORMAT
 * GL_IMPLEMENTATION_COLOR_READ_TYPE

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
11 years agoextensions: enable EXT_color_buffer_float for ES3
Jordan Justen [Fri, 11 Jan 2013 01:29:27 +0000 (17:29 -0800)]
extensions: enable EXT_color_buffer_float for ES3

[mattst88] v2: Enable only for ES3 per spec.
[mattst88] v3: Use _mesa_is_gles3 since EXT_color_buffer_float is
       ES3-only.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
11 years agoextensions: Add ES3-only extension support
Matt Turner [Fri, 18 Jan 2013 23:16:10 +0000 (15:16 -0800)]
extensions: Add ES3-only extension support

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
11 years agoreadpix: check FBO completeness before trying to access the read-buffer
Jordan Justen [Fri, 28 Dec 2012 19:27:04 +0000 (11:27 -0800)]
readpix: check FBO completeness before trying to access the read-buffer

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
11 years agoreadpix: add error checking for GLES3
Jordan Justen [Fri, 28 Dec 2012 19:24:37 +0000 (11:24 -0800)]
readpix: add error checking for GLES3

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
11 years agocopyteximage: update error checking for GLES3
Jordan Justen [Sun, 13 Jan 2013 04:11:00 +0000 (20:11 -0800)]
copyteximage: update error checking for GLES3

Changes based on GTF/gles3 conformance test suite.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
11 years agocopyteximage: check that sRGB usage is valid for GLES3 / GL
Jordan Justen [Fri, 28 Dec 2012 19:00:50 +0000 (11:00 -0800)]
copyteximage: check that sRGB usage is valid for GLES3 / GL

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
11 years agointel: Enable GL_OES_depth_texture_cube_map
Ian Romanick [Fri, 18 Jan 2013 23:44:38 +0000 (15:44 -0800)]
intel: Enable GL_OES_depth_texture_cube_map

For now I'm just enabling this on the same subset of hardware that has
OpenGL 3.0 enabled.  This same functionality is part of OpenGL 3.0, and
there is no matching desktop extension.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agomesa/es3: Allow unsized depth and depth-stencil formats in ES3
Ian Romanick [Fri, 18 Jan 2013 23:43:38 +0000 (15:43 -0800)]
mesa/es3: Allow unsized depth and depth-stencil formats in ES3

They're part of GL_OES_depth_texture_cube_map, and we'll always enable
that extension in ES3 contexts.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agomesa/es2: Allow depth component cube maps in ES2 if the extension is enabled
Ian Romanick [Fri, 18 Jan 2013 23:43:08 +0000 (15:43 -0800)]
mesa/es2: Allow depth component cube maps in ES2 if the extension is enabled

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agomesa: Add extension bit tracking for GL_OES_depth_texture_cube_map
Ian Romanick [Fri, 18 Jan 2013 23:41:50 +0000 (15:41 -0800)]
mesa: Add extension bit tracking for GL_OES_depth_texture_cube_map

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agogallium: Remove ppc asm backend
Adam Jackson [Wed, 2 Jan 2013 17:44:49 +0000 (12:44 -0500)]
gallium: Remove ppc asm backend

The vs part hasn't been wired up since tgsi_sse2 was disabled in:

    commit 4eb3225b38ce12cb34ab3d90804c9683bd7b4ed3
    Author: José Fonseca <jose.r.fonseca@gmail.com>
    Date:   Tue Nov 8 00:10:47 2011 +0000

Remove tgsi_sse2.

And it would certainly not work correctly in its current state:

draw/draw_vs_ppc.c: In function ‘draw_create_vs_ppc’:
draw/draw_vs_ppc.c:190:24: warning: assignment from incompatible pointer
type [enabled by default]

As with the sse2 backend, this should be done in llvm anyway.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
11 years agobuild: require python module libxml2
Andreas Boll [Fri, 18 Jan 2013 14:31:57 +0000 (15:31 +0100)]
build: require python module libxml2

configure should warn if libxml2 is not found.
libxml2 is needed by glapi/gen.

Fixes error during build in src/mapi/glapi/gen:
ImportError: No module named libxml2

NOTE: This is a candidate for the 9.0 branch.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=31598
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agor600g/llvm: Fixes addressspace of basevectors for clipvertex
Vincent Lejeune [Sat, 19 Jan 2013 21:27:16 +0000 (22:27 +0100)]
r600g/llvm: Fixes addressspace of basevectors for clipvertex

11 years agonv50/ir: add definitions of Target and CodeEmitter dtors
Christoph Bumiller [Sat, 19 Jan 2013 21:08:01 +0000 (22:08 +0100)]
nv50/ir: add definitions of Target and CodeEmitter dtors

I really did build test, my compiler just doesn't seem to care.

11 years agonouveau: fix undefined behaviour when testing sample_count
Christoph Bumiller [Sat, 19 Jan 2013 19:53:22 +0000 (20:53 +0100)]
nouveau: fix undefined behaviour when testing sample_count

NOTE: This is a candidate for the 9.0 branch.

11 years agonv50/ir: fix a couple of warnings
Christoph Bumiller [Sat, 12 Jan 2013 16:37:34 +0000 (17:37 +0100)]
nv50/ir: fix a couple of warnings

11 years agomesa: Array uniform name length includes length of [0]
Ian Romanick [Sat, 15 Dec 2012 03:00:32 +0000 (19:00 -0800)]
mesa: Array uniform name length includes length of [0]

This is required by OpenGL ES 3.0 and desktop OpenGL 4.2.  Previous
version were ambiguous.  This also matches the behavior of NVIDIA's
closed-source driver (version 304.64).

Fixed gles3conformance test uniform_buffer_object_getactiveuniformsiv
and uniform_buffer_object_structure_and_array_element_names (on my
in-progress branch that fixes a bunch of other stuff...YMMV).

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agomesa: Array uniform names are supposed to have [0] appended
Ian Romanick [Fri, 14 Dec 2012 23:01:48 +0000 (15:01 -0800)]
mesa: Array uniform names are supposed to have [0] appended

This is required by OpenGL ES 3.0 and desktop OpenGL 4.2.  Previous
version were ambiguous.  This also matches the behavior of NVIDIA's
closed-source driver (version 304.64).

Fixed gles3conformance test uniform_buffer_object_getactiveuniform.

Several piglit tests expect glGetActiveUniform to *not* include the [0]
on the end.  These tests were already failing on NVIDIA, and this change
regresses them on Mesa.  Patches have been sent to the piglit mailing
list to fix the tests.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agomesa: Refactor getting a uniform's name to a helper function
Ian Romanick [Fri, 14 Dec 2012 22:59:11 +0000 (14:59 -0800)]
mesa: Refactor getting a uniform's name to a helper function

We currently have a bug in this code, and I don't want to fix it in two
places.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoglsl: Eliminate link_update_uniform_buffer_variables return value
Ian Romanick [Wed, 12 Dec 2012 00:51:02 +0000 (16:51 -0800)]
glsl: Eliminate link_update_uniform_buffer_variables return value

It always returns true, so there's no point in having a return value.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoglsl: Remove unused loc parameter from generate_call
Ian Romanick [Tue, 11 Dec 2012 20:54:02 +0000 (12:54 -0800)]
glsl: Remove unused loc parameter from generate_call

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agomesa: Remove unused field gl_uniform_buffer_variable::Buffer
Ian Romanick [Thu, 13 Dec 2012 10:22:24 +0000 (02:22 -0800)]
mesa: Remove unused field gl_uniform_buffer_variable::Buffer

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agolinker: Use helper variable sh
Ian Romanick [Thu, 13 Dec 2012 20:42:02 +0000 (12:42 -0800)]
linker: Use helper variable sh

This looks like a copy-and-paste left over.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoglsl: Remove stale comment
Ian Romanick [Thu, 13 Dec 2012 20:14:47 +0000 (12:14 -0800)]
glsl: Remove stale comment

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoglsl: Track UBO block names in the symbol table.
Kenneth Graunke [Wed, 28 Nov 2012 08:18:02 +0000 (00:18 -0800)]
glsl: Track UBO block names in the symbol table.

The GLSL 1.40 spec says:

    "Uniform block names and variable names declared within uniform
    blocks are scoped at the program level."

Track the block name in the symbol table and emit errors when conflicts
exist.

Fixes es3conform's uniform_buffer_object_block_name_conflict test, and
fixes the piglit block-name-clashes-with-{variable,function,struct}.vert
tests.

NOTE: This is a candidate for the 9.0 branch.

v2: Fix bad constructor initialization.  Noticed by Topi Pohjolainen.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
11 years agoglsl: Reject row_major and column_major on non-matrix types
Ian Romanick [Wed, 16 Jan 2013 20:01:50 +0000 (12:01 -0800)]
glsl: Reject row_major and column_major on non-matrix types

About both row_major and column_major layout qualifiers, the GLSL spec
says:

    "It only affects the layout of matrices."

However, the OpenGL ES 3.0 conformance tests have taken this to mean it
is an error use it elsewhere.  This seems logical given that
'layout(row_major) vec4 foo' is probably not what the programmer meant.

The only catch is dealing with structures that contain matrices.  Layout
qualifiers cannot be applied directly to fields of structures, so the
only way to affect the layout of the fields is to apply a qualifier to
the structure declaration itself.  There is ongoing debate about this
within Khronos, and it seems to be settling in favor of allowing the
qualifiers on structures.  I light of this, I have chosen to allow the
qualifiers on structures but emit a warning since the usage may not be
portable.

Fixes gles3conform test
uniform_buffer_object_layouts_not_for_matrix_type and causes no
regressions.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agomesa: Skip updating texgen when not doing fixed function.
Eric Anholt [Tue, 8 Jan 2013 19:09:49 +0000 (11:09 -0800)]
mesa: Skip updating texgen when not doing fixed function.

Between the previous commit and this one, improves GLBenchmark 2.1
offscreen performance by 0.48% +/- 0.24% (n=22, throttling outliers
removed).

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
11 years agomesa: Don't bother updating ff texture state if we have a fragment shader.
Eric Anholt [Tue, 8 Jan 2013 17:56:24 +0000 (09:56 -0800)]
mesa: Don't bother updating ff texture state if we have a fragment shader.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
11 years agomesa: Drop a comment about ff vertex shading and texturing.
Eric Anholt [Tue, 8 Jan 2013 00:58:58 +0000 (16:58 -0800)]
mesa: Drop a comment about ff vertex shading and texturing.

It's never going to have texture fetches.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
11 years agomesa: Fix out of bounds writes when uncompressing non-block-aligned ETC1.
Eric Anholt [Fri, 11 Jan 2013 01:48:16 +0000 (17:48 -0800)]
mesa: Fix out of bounds writes when uncompressing non-block-aligned ETC1.

Fixes a crash in GLB2.1 offscreen on the glthread branch.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi965: Add support for GL_ARB_texture_buffer_object_rgb32.
Eric Anholt [Thu, 10 Jan 2013 22:53:12 +0000 (14:53 -0800)]
i965: Add support for GL_ARB_texture_buffer_object_rgb32.

Tested with piglit ARB_texture_buffer_object/formats.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agoi965: Add support for MESA_FORMAT_RGB_FLOAT32 surfaces.
Eric Anholt [Fri, 11 Jan 2013 00:11:26 +0000 (16:11 -0800)]
i965: Add support for MESA_FORMAT_RGB_FLOAT32 surfaces.

This is for GL_ARB_texture_buffer_object_rgb32 support, but it also
causes the format to get used for float32 rgb textures as well on
Ironlake and later.  Since that came with some surprises, separate
the change from the enable commit.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agointel: Make intel_region's pitch be bytes instead of pixels.
Eric Anholt [Thu, 10 Jan 2013 23:11:28 +0000 (15:11 -0800)]
intel: Make intel_region's pitch be bytes instead of pixels.

We almost never want a stride in pixels -- if you're doing anything with
a stride, you're specifying an offset or incrementing a pointer, and in
both cases you had to multiply by cpp to get the bytes value you wanted.
But worse, on the way to creating a region from a new tiled BO, we
divided by cpp to get pitch in pixels, and for an RGB32 buffer (an
upcoming change) the pitch wouldn't divide exactly, and we'd end up with
a wrong stride in our region.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agointel: Make intel_blit.c take pitches in bytes.
Eric Anholt [Thu, 10 Jan 2013 23:22:12 +0000 (15:22 -0800)]
intel: Make intel_blit.c take pitches in bytes.

As we gain support for NPOT cpp, a pitch may not divide by cpp cleanly.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
11 years agor600g/llvm: tgsi to llvm emits store.swizzle intrinsic for vs/fs output
Vincent Lejeune [Fri, 11 Jan 2013 18:48:29 +0000 (19:48 +0100)]
r600g/llvm: tgsi to llvm emits store.swizzle intrinsic for vs/fs output

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
11 years agor600g/llvm: tgsi to llvm emits stream output intrinsics.
Vincent Lejeune [Fri, 11 Jan 2013 18:48:28 +0000 (19:48 +0100)]
r600g/llvm: tgsi to llvm emits stream output intrinsics.

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
11 years agor600g/llvm:translate ARL opcode to a simple cast
Vincent Lejeune [Tue, 8 Jan 2013 21:46:37 +0000 (22:46 +0100)]
r600g/llvm:translate ARL opcode to a simple cast

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
11 years agor600g/llvm: rework handling of the constants
Vadim Girlin [Tue, 8 Jan 2013 21:46:35 +0000 (22:46 +0100)]
r600g/llvm: rework handling of the constants

Vincent Lejeune:
  - tgsi to llvm now emits pointers for constants

Tom Stellard:
  - Only use texture cache for vtx fetch with compute shaders
  - Change address space used for constant loads to match LLVM
    backend.

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>