Commit Graph

43391 Commits

Author SHA1 Message Date
Vadim Girlin 738334e80c r600g: fix inconsistency with INTERP* opcode definitions
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2012-01-24 09:38:31 -05:00
Vadim Girlin 65c0f77bcc r600g: replace raw opcodes with names in the is_alu_trans/vector
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2012-01-24 09:38:28 -05:00
Vadim Girlin 315cf30607 r600g: add missing opcode definitions
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2012-01-24 09:38:26 -05:00
Vadim Girlin d89c96c75d r600g: fix loop break/continue operations
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
2012-01-24 21:33:24 +10:00
Vadim Girlin c4d644bac1 r600g: fix fragcoord.w
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
2012-01-24 21:33:24 +10:00
Benjamin Franzke 468c7ea2ac targets/gbm: Fix install path
GBM_BACKEND_INSTALL_DIR was deleted by commit
06ad64ad29.
Since we dont need this configurable, use $(INSTALL_LIB_DIR)/gbm now.
2012-01-24 10:12:59 +01:00
Benjamin Franzke ab52be6826 gbm/Makefile.template: Remove builtin-compile path
Builtins are handled by the main gbm Makefile since
06ad64ad29.
2012-01-24 10:00:52 +01:00
Benjamin Franzke 90e2568534 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 06ad64ad29.
2012-01-24 10:00:52 +01:00
Vadim Girlin 5a84cc4ebc r600g: fix interpolation with clipvertex
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-01-24 08:24:58 +00:00
Chad Versace aed5c8299f 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>
2012-01-23 17:44:52 -08:00
Ian Romanick b48d4b64e9 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
2012-01-23 15:17:45 -08:00
Paul Berry e2274aa739 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>
2012-01-23 14:45:08 -08:00
Alex Deucher c9cd170f2e 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>
2012-01-23 16:44:53 -05:00
Eric Anholt 3353626a6a 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>
2012-01-23 12:51:03 -08:00
Eric Anholt 1fde76b877 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>
2012-01-23 12:50:54 -08:00
Matt Turner 06ad64ad29 automake: src/gbm
libgbm.so.1.0.0 (instead of libgbm.so.1.0) is installed now
along with libgbm.so.1 (no change).
2012-01-23 15:18:12 -05:00
Kenneth Graunke c25e5300cb 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>
2012-01-23 10:38:14 -08:00
Jon TURNEY 4e5a8937d1 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>
2012-01-23 18:24:39 +00:00
Dave Airlie d01e166391 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>
2012-01-23 13:59:57 +00:00
Dave Airlie f01431d035 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>
2012-01-23 12:26:19 +00:00
Vadim Girlin 13daa059c0 r600g: fix VS fog export
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-01-23 10:01:35 +00:00
Matt Turner 4c84819a1b dri: install dri_interface.h
Broken in commit 129213e7.

Reported-by Kai Wasserbäch <kai@dev.carbon-project.org>
2012-01-22 17:16:02 -05:00
Dave Airlie b9c706c8c5 r600g: shift integer ops are trans unit only on r600.
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-01-22 17:25:38 +00:00
Vadim Girlin 9733a89f6d 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>
2012-01-22 17:13:00 +00:00
Dave Airlie 38ffc23e7b Revert "r600g: replace trans/vector-only instruction lists with ranges"
This reverts commit 946309067c.

Until we check the cayman bits out properly
2012-01-22 17:09:54 +00:00
Dave Airlie a9d8809f16 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>
2012-01-22 16:53:46 +00:00
Dave Airlie 9783bba9bd 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>
2012-01-22 16:17:47 +00:00
Vadim Girlin 840a342cd0 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>
2012-01-22 07:22:50 +00:00
Vadim Girlin 60bf0f05b4 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>
2012-01-22 07:22:50 +00:00
Vadim Girlin 946309067c 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>
2012-01-22 07:22:49 +00:00
Vadim Girlin cb15783364 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>
2012-01-22 07:22:49 +00:00
Matt Turner d387899388 Remove src/mesa/ppc
It didn't actually do anything except modify the GL_RENDERER string.
2012-01-21 22:43:54 -05:00
Andrei Slăvoiu 309ba0cfa2 Fix mistake in 349845f7b 2012-01-21 11:36:26 -05:00
Vadim Girlin 54e8dcaad6 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>
2012-01-21 12:43:14 +00:00
Vadim Girlin d649bf51ec 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>
2012-01-21 12:43:14 +00:00
Dave Airlie 261dc72fe3 r600g: no need to do CUBE coordinate handling for TXQ.
Fixes texSize on cube.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-01-21 22:17:25 +10:00
Vadim Girlin 8b1471f8ca r600g: make INTERP_LOAD_P0 vector-only
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-01-21 11:07:22 +00:00
Vinson Lee e9bcf4d56b 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>
2012-01-20 23:53:59 -08:00
Alex Deucher d6cd514edb r600g: use S_028B20_BUFFER_0_EN macro for streamout buffer enable
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2012-01-20 18:06:37 -05:00
Alex Deucher 90b36b50f5 r600g: update streamout support for virtual addresses
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2012-01-20 18:06:37 -05:00
Matt Turner 687a7302a5 Remove reference to now deleted dri/Makefile.targets 2012-01-20 16:54:12 -05:00
Matt Turner 129213e7a2 automake: src/mesa/drivers/dri 2012-01-20 15:54:08 -05:00
Matt Turner 349845f7b2 automake: src/mesa/drivers/dri/swrast 2012-01-20 15:54:08 -05:00
Matt Turner 3f96434f86 automake: src/mesa/drivers/dri/nouveau 2012-01-20 15:54:08 -05:00
Matt Turner b38d7a0a24 automake: src/mesa/drivers/dri/r200 2012-01-20 15:54:08 -05:00
Matt Turner e0ee818e2f automake: src/mesa/drivers/dri/radeon 2012-01-20 15:54:08 -05:00
Matt Turner 3c87dfce40 automake: src/mesa/drivers/dri/i915 2012-01-20 15:54:08 -05:00
Vadim Girlin c60dcc49e4 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>
2012-01-20 15:10:39 -05:00
Vadim Girlin c97632642a 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>
2012-01-20 15:09:42 -05:00
Matt Turner adefee50d9 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>
2012-01-20 14:56:42 -05:00