Commit Graph

54793 Commits

Author SHA1 Message Date
Kenneth Graunke fce9e5d41b i965/vs: Do headerless texturing for texelFetchOffset().
For texelFetchOffset(), we just add the texel offsets to the coordinate
rather than using the message header's offset fields.  So we don't
actually need a header on Gen5+.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
2013-01-24 15:19:08 -08:00
Matt Turner 0412864ae8 libgl-xlib/build: Link with C++ when LLVM is used
Also link-in libX11 and libXext.

Tested-by: Brian Paul <brianp@vmware.com>
2013-01-24 14:00:27 -08:00
Paul Berry b50c0feb2c intel: Fix ReadPixels on buffers whose width >= 32kbytes
When possible, glReadPixels calls are performed using the hardware
blitter.  However, according to the Ivy Bridge PRM, Vol1 Part4,
section 1.2.1.2 (Graphics Data Size Limitations):

    The BLT engine is capable of transferring very large quantities of
    graphics data. Any graphics data read from and written to the
    destination is permitted to represent a number of pixels that
    occupies up to 65,536 scan lines and up to 32,768 bytes per scan
    line at the destination. The maximum number of pixels that may be
    represented per scan line’s worth of graphics data depends on the
    color depth.

With an RGBA32F color buffer (which has 16 bytes per pixel) this
imposes a maximum width of 2048 pixels.

To make matters worse, if the pitch of the buffer is 32k or greater,
intel_miptree_map_blit's call to intelEmitCopyBlit will overflow
intelEmitCopyBlit's src_pitch and dst_pitch parameters (which are
16-bit signed integers).

We can conveniently avoid both problems by avoiding the readpixels
blit path when the miptree's pitch is >= 32k.

Fixes gles3conform "half_float" tests when the buffer width is greater
than 2048.

Reviewed-by: Eric Anholt <eric@anholt.net>
Tested-by: Ian Romanick <ian.d.romanick@intel.com>
2013-01-24 13:17:07 -08:00
Ian Romanick ac158f8ee7 intel: callocing a 32 byte temp is silly, so don't
I believe that the size used to vary, so the dynamic allocation is
necessary.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2013-01-24 13:57:46 -05:00
Marek Olšák 7a23029b2f st/mesa: implement ARB_internalformat_query v2
Reviewed-by: Brian Paul <brianp@vmware.com>
2013-01-24 18:39:28 +01:00
Marek Olšák 041234ee1e st/mesa: advertise OES_depth_texture_cube_map if GLSL 1.30 is supported
Reviewed-by: Brian Paul <brianp@vmware.com>
2013-01-24 18:38:49 +01:00
Marek Olšák 4f0563a658 st/dri: disallow recursion in dri_flush
ST_FLUSH_FRONT may call driThrottle, which is implemented with dri_flush.
This prevents double flush as well as fence leaks caused by a recursion
in the middle of throttling.

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

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
2013-01-24 18:22:14 +01:00
Marek Olšák fffe3e0908 st/dri: add null-pointer check, remove duplicated local variable
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
2013-01-24 18:22:14 +01:00
Tom Stellard 0261b4ecdb Revert "Revert "targets/opencl: Link against libgallium.la instead of libgallium.a""
This reverts commit 7824ab8070.

Now that we force linking with LLVM shared libs when building clover,
we can link against libgallium.la with no problems.
2013-01-24 15:45:32 +00:00
Tom Stellard cf69a591e1 configure.ac: Force use of LLVM shared libs with --enable-opencl v2
If we build clover with LLVM static libraries, then clover and also each
pipe_*.so driver that is built will contain their own static copy of
LLVM.  The recent automake changes have uncovered a problem where
the pipe_*.so drivers try to use clover's LLVM symbols.  This causes
LLVM's static registry objects to be initialized each time
a pipe_*.so driver is loaded by clover.  Initializing these objects
multiple times is not allowed and leads to assertion failures in the
LLVM code.

We can avoid all these problems by having clover and all the pipe_*.so
drivers link against the same LLVM shared library.

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

v2:
  - Fix shared library detection when LLVM is built with CMake
2013-01-24 15:45:18 +00:00
Tom Stellard 69d639ba8b configure.ac: Compute the required llvm static libraries only once
In order to determine which static LLVM libraries are needed we pass
a list of components to llvm-config and it generates the list of
library dependencies for us.  The advantage of only calling llvm-config
one time is that it can determine if two components depend on the same
library and then add it to the output list only once.  The old practice
of having each driver call llvm-config to add its own dependencies to
$(LLVM_LIBS) caused many libraries to be added to this variable multiple
times.
2013-01-24 15:44:53 +00:00
Michel Dänzer 35f0dc2cc7 radeonsi: Fall back to dummy pixel shader instead of trying indirect addressing.
Indirect addressing isn't fully handled yet.

Fixes crashes with piglit tests using indirect addressing.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
2013-01-24 08:46:48 +01:00
Marek Olšák 68cebb9a8f radeonsi: make sure copying of all texture formats is accelerated
[ Cherry-picked from r600g commit 7c371f4695 ]

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
2013-01-24 08:46:31 +01:00
Michel Dänzer de4e448095 radeonsi: Handle PIPE_FORMAT_L32A32_S/UINT for rendering.
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
2013-01-24 08:46:31 +01:00
Michel Dänzer d0096dfa85 radeonsi: Make sure to use float number format for packed float colour formats.
These aren't covered by UTIL_FORMAT_TYPE_FLOAT.

Fixes 15 piglit (sub)tests.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
2013-01-24 08:46:31 +01:00
Ian Romanick 5bd86b26df intel: Enable S3TC extensions always
Always enable the use of pre-compressed texture data.  The ability to
perform on-line compression still requires the presence of libtxc_dxtn
or an explicit driconf over-ride.  Applications that just want to submit
precompessed data when an on-line compressor is not available can look
for the GL_EXT_texture_compression_dxt1 and
GL_ANGLE_texture_compression_dxt[35] extensions.

v2: Only enable the extensions that do not require on-line compression
by default.  The previous statement "This should not impact many (if
any) real applications." proved to be false for at least Sauerbraten.
This application mostly submits pre-compressed data, but it also can
submit uncompressed data that it asks the driver to compress.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> [v1]
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> [v1]
Acked-by: Eric Anholt <eric@anholt.net> [v1]
Acked-by: Lee Salzman <lsalzman@gmail.com>
2013-01-23 23:38:04 -05:00
Ian Romanick 53f8251107 mesa: Like EXT_texture_compression_dxt1, advertise ANGLE_texture_compression_dxt in all APIs
This is technically outside the ANGLE spec, but it seems unlikely to
cause any harm.

v2: Simplify the extension checks by assuming the ANGLE extension will
always be enabled by any driver that enables the EXT.  Suggested by
Eric Anholt.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Acked-by: Lee Salzman <lsalzman@gmail.com>
2013-01-23 23:38:04 -05:00
Ian Romanick d45c6c817d mesa: Simplify _mesa_choose_tex_format handling of compressed formats
For non-generic compressed format we assert two things:

1. The format has already been validated against the set of available
   extensions.

2. The driver only enables the extension if it supports all of the
   formats that are part of that extension.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2013-01-23 23:38:04 -05:00
Ian Romanick a021881ccd mesa: Use a single flag for the S3TC extensions that don't require on-line compression
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Acked-by: Lee Salzman <lsalzman@gmail.com>
2013-01-23 23:38:04 -05:00
Carl Worth 8059c2ea90 i965: Use swizzles to force R, G, and B to 0.0 for ALPHA textures.
Similar to the previous commit, we may be using a texture with actual RGBA
storage for the GL_ALPHA format, so force the color values to 0.0.

This commit fixes the following piglit (sub) tests:

	EXT_texture_snorm/fbo-blending-formats
		GL_ALPHA16_SNORM
	        GL_ALPHA8_SNORM
		GL_ALPHA_SNORM

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

Reviewed-by: Eric Anholt <eric@anholt.net>
2013-01-23 17:41:09 -08:00
Carl Worth 33599433c7 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>
2013-01-23 17:40:52 -08:00
Carl Worth 570ed2be7d 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>
2013-01-23 17:40:52 -08:00
Carl Worth b961ba44ed 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>
2013-01-23 17:40:24 -08:00
José Fonseca 0642437606 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.
2013-01-23 12:11:53 +00:00
Matt Turner 60315e3eaf GL3.txt: i965 supports ARB_base_instance
Added in commit cdd3f549.
2013-01-22 21:34:25 -08:00
Brian Paul bd8045d4c5 wmesa: include api_exec.h to fix compilation 2013-01-22 16:44:11 -07:00
Brian Paul 26a05b5005 draw: fix MSVC divide-by-zero compilation error
Kind of lame, but it works.
2013-01-22 16:44:11 -07:00
Kenneth Graunke cdd3f5496a 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>
2013-01-22 15:41:30 -08:00
Matt Turner 0d108116bd 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>
2013-01-22 14:33:45 -08:00
Matt Turner 952e6e9f3b glsl/Makefile.sources: Correct BUILTIN_COMPILER_CXX_FILES
Squashed with two reverts:

Revert "android: Update for builtin_stubs.cpp move"

This reverts commit c0def90ede.

Revert "scons: Update for builtin_stubs.cpp"

This reverts commit 8ac4b82699.

Tested-by: Andreas Boll <andreas.boll.dev@gmail.com>
Tested-on-Android-by: Chad Versace <chad.versace@linux.intel.com>
2013-01-22 14:33:41 -08:00
Matt Turner 2a71054396 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
2013-01-22 14:33:38 -08:00
Matt Turner b68b85224d 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
2013-01-22 14:33:31 -08:00
Matt Turner 3791ce05eb builtin_compiler/build: Use generated parser files
... instead of generating them again.

Tested-by: Andreas Boll <andreas.boll.dev@gmail.com>
2013-01-22 14:33:28 -08:00
Matt Turner efd201caa5 glsl/build: Build tests via the glsl Makefile
Tested-by: Andreas Boll <andreas.boll.dev@gmail.com>
2013-01-22 14:33:24 -08:00
Matt Turner 86d30dea3c 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>
2013-01-22 14:33:20 -08:00
Matt Turner cc9f609cb9 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>
2013-01-22 14:33:16 -08:00
Matt Turner 569f0e400a glsl/build: Don't build glsl_compiler
Use glslparsertest from piglit instead.

Tested-by: Andreas Boll <andreas.boll.dev@gmail.com>
2013-01-22 14:33:07 -08:00
Brian Paul ab74fee5e1 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>
2013-01-22 14:53:58 -07:00
Brian Paul ed643d6b2f draw: improve the clipper debug/printf code
Reviewed-by: José Fonseca <jfonseca@vmware.com>
2013-01-22 14:53:58 -07:00
Brian Paul 4a938ef713 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>
2013-01-22 14:53:58 -07:00
Brian Paul 547a418888 swrast: fix blit code's nearest/linear coordinate arithmetic
Fixes piglit's fbo-blit-stretch test.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
2013-01-22 14:53:58 -07:00
Brian Paul b70b486249 swrast: fix incorrect width for direct/nearest blit
Reviewed-by: José Fonseca <jfonseca@vmware.com>
2013-01-22 14:53:58 -07:00
Brian Paul 728bf86a23 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>
2013-01-22 14:53:58 -07:00
Andreas Boll 0a60ea4ddc docs: import release notes for 9.0.2, add news item 2013-01-22 21:28:51 +01:00
José Fonseca 9a0973044e scons: Disable frame pointer omission for all build types except release.
In particular for checked builds, where debug_backtrace_capture relies
on it.
2013-01-22 20:19:28 +00:00
José Fonseca de0057caa6 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>
2013-01-22 19:10:47 +00:00
Michel Dänzer a56dfd99e2 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>
2013-01-22 18:50:02 +01:00
Kenneth Graunke 121d19de92 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>
2013-01-22 09:05:32 -08:00
Ian Romanick 148fc6d537 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>
2013-01-22 03:26:24 -05:00
Ian Romanick d7475c7966 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>
2013-01-22 03:26:24 -05:00