Vadim Girlin [Mon, 23 Jan 2012 09:23:19 +0000 (13:23 +0400)]
r600g: fix loop break/continue operations
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Vadim Girlin [Mon, 23 Jan 2012 10:12:46 +0000 (14:12 +0400)]
r600g: fix fragcoord.w
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Benjamin Franzke [Tue, 24 Jan 2012 09:12:59 +0000 (10:12 +0100)]
targets/gbm: Fix install path
GBM_BACKEND_INSTALL_DIR was deleted by commit
06ad64ad29e7aa9e2d001f6bd1f8c1c1f77050b8.
Since we dont need this configurable, use $(INSTALL_LIB_DIR)/gbm now.
Benjamin Franzke [Tue, 24 Jan 2012 08:29:43 +0000 (09:29 +0100)]
gbm/Makefile.template: Remove builtin-compile path
Builtins are handled by the main gbm Makefile since
06ad64ad29e7aa9e2d001f6bd1f8c1c1f77050b8.
Benjamin Franzke [Tue, 24 Jan 2012 08:24:06 +0000 (09:24 +0100)]
egl,gbm_gallium: Fix linkage against gbm from automake
Add src/gbm/.libs to ldflags.
The gbm lib is src/gbm/.libs/ instead of lib/
as of commit
06ad64ad29e7aa9e2d001f6bd1f8c1c1f77050b8.
Vadim Girlin [Mon, 23 Jan 2012 11:58:31 +0000 (15:58 +0400)]
r600g: fix interpolation with clipvertex
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Chad Versace [Wed, 18 Jan 2012 23:56:58 +0000 (15:56 -0800)]
swrast: Fix unsigned promotion in pointer arithmetic
When rowstride was negatie, unsigned promotion caused a segfault here:
299│ if (rb->Format == MESA_FORMAT_S8) {
300│ const GLuint rowStride = rb->RowStride;
301│ for (i = 0; i < count; i++) {
302│ if (x[i] >= 0 && y[i] >= 0 && x[i] < w && y[i] < h) {
303├> stencil[i] = *(map + y[i] * rowStride + x[i]);
304│ }
305│ }
306│ }
Fixes segfault in oglconform
separatestencil-neu(NonPolygon.BothFacesBitmapCoreAPI),
though test still fails.
Note: This is a candidate for the stable branches.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43327
Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
Ian Romanick [Sat, 21 Jan 2012 00:08:01 +0000 (16:08 -0800)]
meta: Fallback for glBlitFramebuffer from a multisample surface
NOTE: This is a candidate for the 8.0 branch.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44818
Paul Berry [Thu, 19 Jan 2012 23:49:43 +0000 (15:49 -0800)]
i965/vs: Fix bogus assertion in emit_block_move()
i965 processes assignments of whole structures using
vec4_visitor::emit_block_move, a recursive function which visits each
element of a structure or array (to arbitrary nesting depth) and
copies it from the source to the destination. Then it increments the
source and destination register numbers so that further recursive
invocations will copy the rest of the structure. In addition, it sets
the swizzle field for the source register to an appropriate value of
swizzle_for_size(...) for the size of each element being copied, so
that later optimization passes won't be fooled into thinking that
unused vector elements are live.
This all works fine. However, emit_block_move also contains an
assertion to verify, before setting the swizzle field for the source
register, that the source register doesn't already contain a
nontrivial swizzle. The intention is to make sure that the caller of
emit_block_move hasn't already done some swizzling of the data before
the call, which emit_block_move would then counteract when it
overwrites the swizzle field. But the assertion is at the lowest
level of nesting of emit_block_move, which means that after the first
element is copied, instead of checking the swizzle field set by the
caller, it checks the swizzle field used when moving the previous
element. That means that if the structure contains elements of
different vector sizes (which therefore require different swizzles),
the assertion will erroneously fire.
This patch moves the assertion from emit_block_move to the calling
function, vec4_visitor::visit(ir_assignment *). Since the caller is
non-recursive, the assertion will only happen once, and won't be
fooled by emit_block_move's modification of the swizzle field.
This patch also reverts commit
fe006a7 (i965/vs: Fix swizzle related
assertion), which attempted to fix the bug by making the assertion
more lenient, but only worked properly for structures, arrays, and
matrices in which each constituent vector is the same size.
This fixes the problem described in comment 9 of
https://bugs.freedesktop.org/show_bug.cgi?id=40865. Unfortunately, it
doesn't fix the whole bug, since the test in question is also failing
due to lack of register spilling support in the VS.
Fixes piglit test vs-assign-varied-struct. No piglit regressions on
Sandy Bridge.
This is a candidate for the 8.0 release branch.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=40865#c9
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Alex Deucher [Mon, 23 Jan 2012 21:41:52 +0000 (16:41 -0500)]
r600g: clean up register headers
- CP_INTERRUPT packet doesn't exist
- remove lots of r6xx copy/paste remnants from evergreen reg header
- fix some cayman specific registers
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Eric Anholt [Wed, 18 Jan 2012 22:42:26 +0000 (14:42 -0800)]
i965/vs: Enable workaround-free math on gen7.
This is similar to a commit that did the same for the FS.
Shaves several more instructions off of the VS in Lightsmark, but no
statistically significant performance difference (n=5).
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Wed, 18 Jan 2012 20:58:45 +0000 (12:58 -0800)]
i965/vs: Use the embedded-comparison SEL on gen6+, like the FS does.
Shaves a few instructions off of the VS in Lightsmark, but no
statistically significant performance difference on gen7 (n=5).
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Matt Turner [Mon, 16 Jan 2012 02:30:26 +0000 (21:30 -0500)]
automake: src/gbm
libgbm.so.1.0.0 (instead of libgbm.so.1.0) is installed now
along with libgbm.so.1 (no change).
Eric Anholt [Wed, 18 Jan 2012 19:27:24 +0000 (11:27 -0800)]
autoconf: Fix build of dri symbols test to not manually link expat.
AC_CHECK_LIB has this nasty behavior, like the cflags tests, of
automatically putting the tested value into the global LIBS on
success. This caused -lexpat to end up in LIBS, but without the
--with-expat dir, so my 32-bit build on a 64 system using expat from a
custom prefix could only find the system expat and fail to link on the
one current consumer of the LIBS variable: the dri driver test link.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Kenneth Graunke [Fri, 20 Jan 2012 11:33:40 +0000 (03:33 -0800)]
i965: Fix border color on Sandybridge and Ivybridge.
While reading through the simulator, I found some interesting code that
looks like it checks the sampler default color pointer against the bound
set in STATE_BASE_ADDRESS. On failure, it appears to program it to the
base address itself.
So I decided to try programming a legitimate bound, and lo and behold,
border color worked.
+92 piglits on Sandybridge. Also fixes Lightsmark on Ivybridge.
NOTE: This is a candidate for stable release branches.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=28924
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38868
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Jon TURNEY [Sun, 22 Jan 2012 13:23:26 +0000 (13:23 +0000)]
Fix underlinking in libOSMesa since commit
adefee5 "Always build shared glapi"
Since we now always build shared glapi, this exposes the fact that libOSMesa was
underlinked when glapi was built shared.
Fix this by doing the same thing as drivers/X11/Makefile already does, ensuring
that the library is linked with the shared glapi library.
(I'm not clear why we link with both glapi.a and glapi.so, so this may be all wrong)
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Jon TURNEY [Sun, 22 Jan 2012 14:21:56 +0000 (14:21 +0000)]
Don't build shared dricore when unneeded
Refine "always build shared dricore" so we don't build it if we don't need
it because we aren't actually building any dri drivers because of --disable-driglx-direct
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Dave Airlie [Mon, 23 Jan 2012 13:18:16 +0000 (13:18 +0000)]
r600g: cayman fix integer multiplies
Looks insane, but it does appear we need a full slot per input/output.
This fixes another 180 or so piglit tests.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Mon, 23 Jan 2012 11:21:43 +0000 (11:21 +0000)]
r600g: cayman initial integer support
Adds all the easier lowhanging opcodes.
Fixes ~3000 piglit tests with GLSL1.30 enabled on cayman.
This just leaves the mul/div/mod ops to fix up.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Vadim Girlin [Mon, 23 Jan 2012 09:47:51 +0000 (13:47 +0400)]
r600g: fix VS fog export
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Matt Turner [Sun, 22 Jan 2012 22:15:03 +0000 (17:15 -0500)]
dri: install dri_interface.h
Broken in commit
129213e7.
Reported-by Kai Wasserbäch <kai@dev.carbon-project.org>
Dave Airlie [Sun, 22 Jan 2012 17:24:29 +0000 (17:24 +0000)]
r600g: shift integer ops are trans unit only on r600.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Vadim Girlin [Sat, 21 Jan 2012 20:17:11 +0000 (00:17 +0400)]
r600g: replace trans/vector-only instruction lists with ranges (v2)
airlied : assert on cayman cases to keep compiler happy
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Sun, 22 Jan 2012 17:09:34 +0000 (17:09 +0000)]
Revert "r600g: replace trans/vector-only instruction lists with ranges"
This reverts commit
946309067c835d35a85ab2ad774df6698e6669ab.
Until we check the cayman bits out properly
Dave Airlie [Sun, 22 Jan 2012 16:52:19 +0000 (16:52 +0000)]
r600g: srgb mode is only valid on certain format types.
"If set, forces degamma on XYZ if format is
FMT_8_8_8_8, FMT_BC1, FMT_BC2, or FMT_BC3"
Don't claim support for sRGB on any other formts.
This fixes glean texture_srgb.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Sun, 22 Jan 2012 16:14:32 +0000 (16:14 +0000)]
r600g: initial cube shadow sampling
It doesn't pass the piglit test, but it seems to be a lot closer
than it was before. I need to track down if there is another problem.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Vadim Girlin [Sat, 21 Jan 2012 21:49:46 +0000 (01:49 +0400)]
r600g: take into account kcache banks for bank swizzle check
Due to the changes for multiple kcache banks support, now we are assigning
final SRCx_SEL values for kcache access at the later stage, when building the
bytecode. So we need to take into account kcache banks to distinguish
the constants with the same address but different bank index.
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Vadim Girlin [Sat, 21 Jan 2012 20:17:12 +0000 (00:17 +0400)]
r600g: set round_mode to truncate and get rid of tgsi_f2i on evergreen
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Vadim Girlin [Sat, 21 Jan 2012 20:17:11 +0000 (00:17 +0400)]
r600g: replace trans/vector-only instruction lists with ranges
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Vadim Girlin [Sat, 21 Jan 2012 20:17:10 +0000 (00:17 +0400)]
r600g: fix some interpolation tests for evergreen
Same fix as previously done by Dave Airlie for r600/r700
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Matt Turner [Sun, 22 Jan 2012 03:43:02 +0000 (22:43 -0500)]
configure.ac: use AC_PROG_MKDIR_P
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=45057
Matt Turner [Fri, 20 Jan 2012 21:01:38 +0000 (16:01 -0500)]
Remove src/mesa/ppc
It didn't actually do anything except modify the GL_RENDERER string.
Andrei Slăvoiu [Sat, 21 Jan 2012 16:36:26 +0000 (11:36 -0500)]
Vadim Girlin [Fri, 20 Jan 2012 21:37:48 +0000 (01:37 +0400)]
r600g: implement clip vertex v2
Clip planes are uploaded as a constant buffer and used by the vertex
shader to produce corresponding clip distances for hw clipping.
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Vadim Girlin [Fri, 20 Jan 2012 19:24:32 +0000 (23:24 +0400)]
r600g: improve kcache line sets handling v2
Add support for multiple kcache banks (constant buffers).
Lock the required lines only.
Allow up to 4 kcache line sets in the alu clause by using ALU_EXTENDED on eg+.
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Sat, 21 Jan 2012 12:15:10 +0000 (22:15 +1000)]
r600g: no need to do CUBE coordinate handling for TXQ.
Fixes texSize on cube.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Vadim Girlin [Sat, 21 Jan 2012 00:48:12 +0000 (04:48 +0400)]
r600g: make INTERP_LOAD_P0 vector-only
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Vinson Lee [Tue, 17 Jan 2012 02:01:22 +0000 (18:01 -0800)]
glsl: Fix 'control reaches end of non-void function' warning.
Fix this GCC warning on non-debug builds.
glsl_types.cpp: In member function 'gl_texture_index
glsl_type::sampler_index() const':
glsl_types.cpp:157: warning: control reaches end of non-void function
NOTE: This is a candidate for the 8.0 branch.
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Alex Deucher [Fri, 20 Jan 2012 23:04:44 +0000 (18:04 -0500)]
r600g: use S_028B20_BUFFER_0_EN macro for streamout buffer enable
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Alex Deucher [Fri, 20 Jan 2012 23:01:58 +0000 (18:01 -0500)]
r600g: update streamout support for virtual addresses
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Matt Turner [Fri, 20 Jan 2012 21:53:31 +0000 (16:53 -0500)]
Remove reference to now deleted dri/Makefile.targets
Matt Turner [Sun, 15 Jan 2012 16:50:20 +0000 (11:50 -0500)]
automake: src/mesa/drivers/dri
Matt Turner [Sun, 15 Jan 2012 16:39:48 +0000 (11:39 -0500)]
automake: src/mesa/drivers/dri/swrast
Matt Turner [Sun, 15 Jan 2012 15:20:30 +0000 (10:20 -0500)]
automake: src/mesa/drivers/dri/nouveau
Matt Turner [Sun, 15 Jan 2012 15:04:58 +0000 (10:04 -0500)]
automake: src/mesa/drivers/dri/r200
Matt Turner [Sun, 15 Jan 2012 03:21:30 +0000 (22:21 -0500)]
automake: src/mesa/drivers/dri/radeon
Matt Turner [Sun, 15 Jan 2012 02:57:32 +0000 (21:57 -0500)]
automake: src/mesa/drivers/dri/i915
Vadim Girlin [Wed, 18 Jan 2012 09:46:26 +0000 (13:46 +0400)]
r600g: fix streamout on evergreen
Enable it in the evergreen_context_draw if needed.
Same as already done in the r600_context_draw for r6xx/r7xx.
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Vadim Girlin [Wed, 18 Jan 2012 19:17:29 +0000 (23:17 +0400)]
r600g: fix combined MEM_STREAM instructions
BURST_COUNT is clipped with ARRAY_SIZE, so set it to the max value
to avoid clipping.
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Matt Turner [Fri, 13 Jan 2012 19:30:36 +0000 (14:30 -0500)]
Always build shared dricore
Tested-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Matt Turner <mattst88@gmail.com>
Matt Turner [Wed, 11 Jan 2012 23:32:14 +0000 (18:32 -0500)]
Always build shared glapi
libglapi.so, libGL.so, libGLESv2.so, libGLESv1_CM.so must all
come from the same version of Mesa or bad things may happen.
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Matt Turner <mattst88@gmail.com>
Matt Turner [Thu, 12 Jan 2012 00:02:26 +0000 (19:02 -0500)]
Remove -ffast-math from default CFLAGS
Fixes glsl-const-folding-01. inversesqrt(1.0) != 1.0 was evaluating as
true.
Signed-off-by: Matt Turner <mattst88@gmail.com>
Chad Versace [Thu, 19 Jan 2012 21:08:48 +0000 (13:08 -0800)]
intel/gen6: Some framebuffers having separate depthstencil should be unsupported
When the framebuffer has separate depth and stencil buffers, and HiZ is
not enabled on the depth buffer, mark the framebuffer as unsupported. This
happens when trying to create a framebuffer with Z16/S8 because we haven't
enabled HiZ on Z16 yet.
Fixes gles2conform test stencil8.
Note: This is a candiate for the 8.0 branch.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44948
Reviewed-and-tested-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed--by: Eric Anholt <eric@anholt.net>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
Chad Versace [Tue, 17 Jan 2012 20:01:34 +0000 (12:01 -0800)]
mesa: Loosen glBlitFramebuffer restrictions on depthstencil buffers (v2)
This loosens the format validation in glBlitFramebuffer. When blitting
depth bits, don't require an exact match between the depth formats; only
require that the two formats have the same number of depth bits and the
same depth datatype (float vs uint). Ditto for stencil.
Between S8_Z24 buffers, the EXT_framebuffer_blit spec allows
glBlitFramebuffer to blit the depth and stencil bits separately. So I see
no reason to prevent blitting the depth bits between X8_Z24 and S8_Z24 or
the stencil bits between S8 and S8_Z24. However, we of course don't want
to allow blitting from Z32 to Z32_FLOAT.
Fixes Piglit fbo/fbo-blit-d24s8 on Intel drivers with separate stencil
enabled.
The problem was that, on Intel drivers with separate stencil, the default
framebuffer has separate depth and stencil buffers with formats X8_Z24 and
S8. The test attempts to blit the depth bits from a S8_Z24 buffer into the
default framebuffer.
v2: Check that depth datatypes match.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44665
Note: This is a candidate for the 8.0 branch.
Reported-by: Xunx Fang <xunx.fang@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
Christoph Bumiller [Fri, 20 Jan 2012 12:43:32 +0000 (13:43 +0100)]
nvc0: fix some limit cap values
NOTE: This is a candidate for the 8.0 branch.
Christoph Bumiller [Fri, 20 Jan 2012 12:29:42 +0000 (13:29 +0100)]
nvc0: handle discontiguous outputs in stream_output_info
Christoph Bumiller [Fri, 20 Jan 2012 12:24:46 +0000 (13:24 +0100)]
mesa: allocate transform_feedback_info::Outputs array dynamically
The nvc0 gallium driver is advertising 128 MAX_INTERLEAVED_COMPS
which made it always assert in the linker when TFB was used since
the Outputs array was smaller than that maximum.
v2: added assertions
NOTE: This is a candidate for the 8.0 branch.
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Dave Airlie [Wed, 18 Jan 2012 15:16:55 +0000 (15:16 +0000)]
r600g: fixup AR handling (v5)
So it appears R600s (except rv670) do AR handling different using a different
opcode. This patch fixes up r600g to work properly on r600.
This fixes ~100 piglit tests here (in GLSL1.30 mode) on rv610.
v3: add index_mode as per the docs.
This still fails any dst relative tests for some reason I can't quite see yet,
but it passes a lot more tests than without.
v4: add a nop after dst.rel this could be improved using a second pass,
where we only insert nops if two instructions are sure to collide.
The docs say r600, rv610, rv630 needs this, and not rv670, rs780, rs880,
need AMD to confirm rv620, rv635.
v5: add is_nop_inst.
NOTE: This is a candidate for stable branches.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Brian Paul [Fri, 20 Jan 2012 17:55:15 +0000 (10:55 -0700)]
mesa: include arrayobj.h to silence implicit function declaration warning
Caused by commit
7a1e941ebee43cb97a2c77fd2269999b202308a2.
Mathias Fröhlich [Thu, 29 Dec 2011 12:10:01 +0000 (13:10 +0100)]
mesa: Fix and speedup gl_array_object::_MaxElement computation.
Use a bitmask approach to compute gl_array_object::_MaxElement.
To make this work correctly depending on the shader type actually used,
make use of the newly introduced typed bitmask getters.
With this change I gain about 5% draw time on some osgviewer examples.
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
Reviewed-by: Brian Paul <brianp@vmware.com>
Mathias Froehlich [Thu, 29 Dec 2011 12:10:00 +0000 (13:10 +0100)]
mesa: Introduce enabled bitfield helper functions.
Depending on the installed shader type, different arrays are used
from gl_array_object. Provide helper functions that compute
the bitmask of these arrays that are finally enabled for a given
shader type. The will be used in a followup change.
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
Reviewed-by: Brian Paul <brianp@vmware.com>
Mathias Fröhlich [Thu, 29 Dec 2011 12:10:00 +0000 (13:10 +0100)]
mesa: Use BITFIELD64_RANGE for VERT_BIT_*_ALL.
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
Reviewed-by: Brian Paul <brianp@vmware.com>
Stéphane Marchesin [Fri, 20 Jan 2012 01:18:55 +0000 (17:18 -0800)]
i915g: Fix indentation.
Stéphane Marchesin [Fri, 20 Jan 2012 00:28:23 +0000 (16:28 -0800)]
i915g: Fix indentation and comment.
Paul Berry [Tue, 17 Jan 2012 18:28:10 +0000 (10:28 -0800)]
glsl: Fix isinf() for non-C99-compliant compilers.
Commit
ede60bc4670a8d9c14921c77abee1ac57fc0e6bf (glsl: Add isinf() and
isnan() builtins) uses "+INF" in the .ir file to represent infinity.
This worked on C99-compliant compilers, since the s-expression reader
uses strtod() to read numbers, and C99 requires strtod() to understand
"+INF". However, it didn't work on non-C99-compliant compilers such
as MSVC.
This patch modifies the s-expression reader to explicitly check for
"+INF" rather than relying on strtod() to support it.
This is a candidate for the 8.0 branch.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44767
Tested-by: Morgan Armand <morgan.devel@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Alex Deucher [Fri, 20 Jan 2012 02:07:58 +0000 (21:07 -0500)]
r600g: fix typo in evergreen register
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Brian Paul [Thu, 19 Jan 2012 18:37:00 +0000 (11:37 -0700)]
svga: move svga_texture() casts/calls in svga_surface_copy()
To fix failed assertions when calling glCopyBufferSubData().
svga_texture() asserts that the resource is a texture. Simply move the
calls to svga_texture() after the code that handles non-texture copies
so that we don't call it with non-texture resources.
Fixes glean bufferObject failure.
NOTE: This is a candidate for the 8.0 branch.
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Brian Paul [Thu, 19 Jan 2012 17:20:24 +0000 (10:20 -0700)]
st/mesa: copy num_immediates field when copying the immediates array
Two assignments to num_immediates were missing in
get_pixel_transfer_visitor() and get_bitmap_visitor().
The uninitialized value led to valgrind errors and crashes in some
cases.
Added new assertions to catch future problems in this area. Also
changed num_immediates to unsigned to avoid signed/unsigned
comparison warnings.
NOTE: This is a candidate for the 8.0 branch.
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Ian Romanick [Wed, 18 Jan 2012 00:24:05 +0000 (16:24 -0800)]
mesa: Set default access flags based on the run-time API
The default access flags for OpenGL ES (via GL_OES_map_buffer) and
desktop OpenGL are different. The code previously tried to handle
this, but the decision was made at compile time. Since the same
driver binary can be used for both OpenGL ES and desktop OpenGL, the
decision must be made at run-time.
This should fix bug #44433. It appears that the test case does
various map and unmap operations and inspects the state of the buffer
object around each. When it sees that GL_BUFFER_ACCESS does not match
its expectations, it fails.
NOTE: This is a candidate for release branches.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44433
Brian Paul [Thu, 19 Jan 2012 16:41:30 +0000 (09:41 -0700)]
st/mesa: add fallback pipe formats for (compressed) R, RG formats
If we don't find an exact PIPE_FORMAT_x for a GL_(COMPRESSED)_RED/RG format,
try uncompressed formats. We were already doing this for the RGB(A) formats.
Fixes piglit arb_texture_compression-internal-format-query test.
NOTE: This is a candidate for the stable branches.
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Stéphane Marchesin [Thu, 19 Jan 2012 03:24:18 +0000 (19:24 -0800)]
i915g: Don't avoid flushing when we have a pending fence.
Otherwise the fence will never arrive.
Also check for a NULL i915->batch.
NOTE: This is a candidate for the 8.0 branch.
Stéphane Marchesin [Thu, 19 Jan 2012 03:23:48 +0000 (19:23 -0800)]
i915g: Don't invert signalled/unsignalled fences
NOTE: This is a candidate for the 8.0 branch.
Kenneth Graunke [Wed, 18 Jan 2012 08:55:12 +0000 (00:55 -0800)]
i965: Fix disassembly of data port writes on Ivybridge.
msg_type moved by a bit, so the message type was being disassembled
incorrectly. In particular, render target writes were showing up as
"OWORD block write".
NOTE: This is a candidate for stable release branches.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Kenneth Graunke [Wed, 18 Jan 2012 08:50:31 +0000 (00:50 -0800)]
i965: Fix disassembly of sampler messages on Ivybridge.
Compared to sampler_gen5, simd_mode shifted by a bit and msg_type grew
by a bit. So we were printing slightly incorrect numbers.
NOTE: This is a candidate for stable release branches.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Kenneth Graunke [Wed, 18 Jan 2012 12:53:40 +0000 (04:53 -0800)]
i965/vs: Take attributes into account when deciding urb_entry_size.
Both the VF and VS share space in the URB. First, the VF stores
attributes (shader inputs) there. The VS then reads the attributes,
executes, and reuses the space to store varyings (shader outputs).
Thus, we need to calculate the amount of URB space necessary for inputs,
outputs, and pick whichever is greater.
The old VS backend correctly did this (brw_vs_emit.c:408), but the new
VS backend only considered outputs.
Fixes vertex scrambling in GLBenchmark PRO on Ivybridge.
NOTE: This is a candidate for the 8.0 branch.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41318
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Stéphane Marchesin [Wed, 18 Jan 2012 21:03:56 +0000 (13:03 -0800)]
st/dri: Remove useless flush front.
In the following scenario:
- CreateContext C1
- MakeCurrent C1
- DestroyContext C1 (does not actually destroy the first context, postponed
until the next MakeCurrent)
- CreateContext C2
- MakeCurrent C2
MakeCurrent will call flush on a half destroyed context, leading to crashes.
Since the other paths (destroy and makecurrent) already flush the context,
there is no need to flush here, so we remove this useless flush front call.
This fixes GPU crashes with Chrome and gallium drivers.
Ian Romanick [Tue, 17 Jan 2012 20:41:15 +0000 (12:41 -0800)]
intel: Set depth to 6 for cubemaps
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41216
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43212
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43250
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: Jin Yang <jin.a.yang@intel.com>
Kristian Høgsberg [Wed, 18 Jan 2012 20:32:35 +0000 (15:32 -0500)]
gbm: Validate usage flags in gbm_bo_create_from_egl_image()
The entry point is supposed to validate that the EGLImage is suitable for
the passed in usage flags, but that was never implemented.
Eric Anholt [Fri, 18 Nov 2011 01:11:00 +0000 (17:11 -0800)]
i965: Add support for Z16 depth formats.
v2: Don't flag the format as being HiZ ready (there's DRI2 handshake
pain to go through).
Fixes piglit gl-3.0-required-sized-texture-formats
NOTE: This is a candidate for the 8.0 branch.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Eric Anholt [Tue, 17 Jan 2012 19:28:56 +0000 (11:28 -0800)]
i965/gen7: Set up surface horizontal alignment field.
This is required for Z16 support for texturing, which is the first
thing to have a horizontal alignment of 8. Renderbuffers don't need
it, since they're always set up as the only mip level, but do it for
completeness anyway.
NOTE: This is a candidate for the 8.0 branch.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Eric Anholt [Tue, 17 Jan 2012 19:27:11 +0000 (11:27 -0800)]
i965/gen7: Remove stale comment.
This field is actually set up above.
NOTE: This is a candidate for the 8.0 branch, to avoid conflicts.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Eric Anholt [Thu, 12 Jan 2012 21:16:33 +0000 (13:16 -0800)]
glsl: Fix leak of linked uniform names at relink/free of the shader_program.
NOTE: This is a candidate for the 8.0 branch.
Eric Anholt [Thu, 12 Jan 2012 21:10:26 +0000 (13:10 -0800)]
glsl: Fix leak of LinkedTransformFeedback.Varyings.
I copy-and-pasted the thing I was allocating for as the context, so
the first time it would be NULL (root of a ralloc context) and they'd
chain off each other from then on.
NOTE: This is a candidate for the 8.0 branch.
Eric Anholt [Thu, 12 Jan 2012 21:08:22 +0000 (13:08 -0800)]
mesa: Fix leak of uniform storage records on shader program link/free.
NOTE: This is a candidate for the 8.0 branch.
Eric Anholt [Thu, 12 Jan 2012 21:01:21 +0000 (13:01 -0800)]
i965: Fix leak of the program cache BO on context destroy.
NOTE: This is a candidate for the 8.0 branch.
Eric Anholt [Thu, 12 Jan 2012 20:59:15 +0000 (12:59 -0800)]
i965/vs: Fix leak of an empty hash_table structure per compile.
This statement got duplicated above, probably in a rebase resolution,
so we never freed the extra one.
NOTE: This is a candidate for the 8.0 branch.
Eric Anholt [Thu, 12 Jan 2012 20:55:06 +0000 (12:55 -0800)]
i965: Fix refcount leak of the gl_program structure.
Fixes a leak of almost 200kb on a minimal shader_runner program
(algebraic-add-add-1).
NOTE: This is a candidate for the 8.0 branch.
Eric Anholt [Thu, 12 Jan 2012 20:51:34 +0000 (12:51 -0800)]
mesa: Make the register allocator allocation take a ralloc context.
This fixes a memory leak on i965 context destruction.
NOTE: This is a candidate for the 8.0 branch.
Brian Paul [Tue, 17 Jan 2012 23:28:10 +0000 (16:28 -0700)]
svga: change PIPE_CAPF_MAX_TEXTURE_LOD_BIAS from 16.0 to 15.0
The legal range for the device is apparently [-16.0, +15.0].
Limiting the range to [-15, +15] fixes piglit's lodbias test.
NOTE: This is a candidate for the 8.0 branch.
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Brian Paul [Wed, 18 Jan 2012 17:06:42 +0000 (10:06 -0700)]
svga: fix min/max lod clamping
The interaction between the mipmap lod min/max limits and the texture
base/max level limits is kind of tricky. Changing the base level
didn't work as expected before.
NOTE: This is a candidate for the 8.0 branch.
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Brian Paul [Wed, 18 Jan 2012 17:05:25 +0000 (10:05 -0700)]
svga: add 0.5 in float->int conversion of sample min/max lod
This makes lod clamping more consistent with other drivers.
NOTE: This is a candidate for the 8.0 branch.
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Brian Paul [Tue, 17 Jan 2012 15:15:25 +0000 (08:15 -0700)]
st/mesa: pass GL_MAP_INVALIDATE_RANGE_BIT to gallium drivers
when mapping renderbuffers or texture images.
NOTE: This is a candidate for the 8.0 branch.
Brian Paul [Tue, 17 Jan 2012 15:12:30 +0000 (08:12 -0700)]
mesa: use GL_MAP_INVALIDATE_RANGE_BIT in glTexImage paths
Update the dd.h docs to indicate that GL_MAP_INVALIDATE_RANGE_BIT
can be used with GL_MAP_WRITE_BIT when mapping renderbuffers and
texture images.
Pass the flag when mapping texture images for glTexImage, glTexSubImage,
etc. It's up to drivers whether to actually make use of the flag.
NOTE: This is a candidate for the 8.0 branch.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Brian Paul [Mon, 16 Jan 2012 17:08:08 +0000 (10:08 -0700)]
mesa: try RGBA_FLOAT16 before RGBA_FLOAT32 when choosing A,L,LA,I formats
To try to use less tex memory and maybe get better performance.
Spotted by Roland Scheidegger.
NOTE: This is a candidate for the 8.0 and 7.11 branches.
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Brian Paul [Mon, 16 Jan 2012 16:05:05 +0000 (09:05 -0700)]
mesa: fix tex format selection for GL_R32F and other R/G float formats
The i965 driver advertises GL_ARB_texture_float and GL_ARB_texture_rg
support but the ctx->TextureFormatSupported[] table entries for
MESA_FORMAT_R_FLOAT32 and MESA_FORMAT_RGBA_FLOAT32 are false on gen 4
hardware. So the case for GL_R32F would fail and we'd print an
implementation error.
This patch adds more Mesa tex format options for GL_R32F and other R/G
formats so we fall back to 16-bit formats when 32-bit formats aren't
available.
Eric made the same fix in commit
6216a5b4 for the non R/G formats.
v2: try 16-bit formats before 32-bit formats and try RG formats before
RGBA where possible.
This should fix https://bugs.freedesktop.org/show_bug.cgi?id=44039
NOTE: This is a candidate for the 8.0 and 7.11 branches.
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Brian Paul [Mon, 16 Jan 2012 16:59:20 +0000 (09:59 -0700)]
docs: add more potential dependencies for vmware guest driver
Alexander von Gluck IV [Tue, 17 Jan 2012 15:46:01 +0000 (15:46 +0000)]
scons: Add more machine architectures to the machine map
* BePC, BeBox, BeMac for Haiku.
* Add sparc architecture as Mesa looks for it.
Signed-off-by: José Fonseca <jfonseca@vmware.com>
Dave Airlie [Wed, 18 Jan 2012 12:14:49 +0000 (22:14 +1000)]
r600g: fix ISLT on r600/700
This fixes ISLT like evergreen.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Wed, 18 Jan 2012 11:54:07 +0000 (21:54 +1000)]
r600g: make r600/700 use correct ineg.
Noticed by Vadim Girlin on irc.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Wed, 18 Jan 2012 09:33:21 +0000 (19:33 +1000)]
r600g: fix some of the interpolation tests.
This enables linear gradients if we need a linear,
it also sets the flat shade flag for color/constant interpolations.
Signed-off-by: Dave Airlie <airlied@redhat.com>