Commit Graph

55288 Commits

Author SHA1 Message Date
Lauri Kasanen 0a82828ad5 configure: Fix build with automake < 1.11
Commit 86d30dea3c broke building with older
automake versions with this error:

Makefile:769: *** Recursive variable am__v_YACC_ references itself (eventually).  Stop.

This patch fixes it. Fix stolen from xorg-macros.

Signed-off-by: Lauri Kasanen <cand@gmx.com>
2013-02-22 13:15:14 -08:00
Anuj Phogat cff862f90d meta: Allocate texture before initializing texture coordinates
tex->Sright and tex->Ttop are initialized during texture allocation.
This fixes depth buffer blitting failures in khronos conformance tests
when run on desktop GL 3.0.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=59495

Note: This is a candidate for stable branches.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2013-02-22 12:03:59 -08:00
Eric Anholt 92a204b493 mesa: Fix setup of ctx->Point.PointSprite for GLES2.
The recent change for GL core broke the older setup, which broke
gl_PointCoord on pre-gen6 (where gl_PointCoord is undefined if point
sprites are disabled).  Fixes the new piglit GLES-2.0/glsl-fs-pointcoord
test.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=32429
Note: This is a candidate for the stable branches.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2013-02-22 10:55:39 -08:00
Eric Anholt 7b0731d940 i965/fs: Fix broken math on values loaded from uniform buffers on gen6.
In a debug build this led to assertion failures, but on a non-debug
build the hardware would just reference the whole vec8 instead of the
same channel 8 times.

Fixes the new piglit glsl-1.40/uniform-buffer/fs-exp2.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=57121
Note: This is a candidate for the stable branches
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2013-02-22 10:50:50 -08:00
José Fonseca cd01cc3b48 tgsi: Improve execution debugging.
- zero temps/outputs instead of copying (otherwise we won't be able to see
  the temps/outputs assignments for small shaders where nothing changes
  across big areas

- also show the inputs (as it's often impossible to infer from the rest)

Reviewed-by: Brian Paul <brianp@vmware.com>
2013-02-22 16:19:58 +00:00
José Fonseca f8436c17e4 util/u_dump: Update texture target strings. 2013-02-22 16:19:58 +00:00
Sergey Matyukevich 21e8af0b09 util/debug: Always use __builtin_frame_address on gcc.
Should workaround fdo bug 57563.

Signed-off-by: José Fonseca <jfonseca@vmware.com>
2013-02-22 16:19:58 +00:00
Michel Dänzer f6b40ddd2d radeon/llvm: Remove stale comment about radeon_llvm_emit_prepare_cube_coords 2013-02-22 13:06:07 +01:00
Marek Olšák aac8138744 r600g: fix random corruption with CP DMA in TF2
NOTE: This is a candidate for the 9.1 branch.
2013-02-22 12:49:15 +01:00
Michel Dänzer 3447cc4856 radeonsi: Don't pretend there is any R8G8B8 support
The hardware can't do it.
2013-02-22 11:44:24 +01:00
Andreas Boll c1f2c3a80f llvmpipe/build: add DLOPEN_LIBS and PTHREAD_LIBS to the lp_test_* targets
Fixes undefined symbols.

NOTE: This is a candidate for the 9.1 branch.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61052
Tested-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-02-22 10:21:43 +01:00
Andreas Boll c1eb585f3d targets/xa-vmwgfx: Force c++ linker to fix undefined symbols
NOTE: This is a candidate for the 9.1 branch.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61200
Reviewed-by: Matt Turner <mattst88@gmail.com>
2013-02-22 10:21:43 +01:00
Roland Scheidegger b6f15954b4 llvmpipe: Fix rendering into PIPE_FORMAT_X8*_UNORM.
Mesa state tracker recently started using PIPE_FORMAT_X8B8G8R8_UNORM,
causing segfaults in texture-packed-formats, because swizze[chan] was
0xff for padding channel (X).

Signed-off-by: José Fonseca <jfonseca@vmware.com>
2013-02-22 09:00:45 +00:00
José Fonseca 8ed1279b10 trace: Never close stdout/stderr.
This could happen, when a trace screen was destroyed and then recreated.
2013-02-22 08:45:07 +00:00
José Fonseca 59025d6e95 trace: Fix set_constant_buffer dumping.
We were dumping the trace driver pointer, instead of the pointer from the
underlying pipe driver.
2013-02-22 08:40:47 +00:00
Vinson Lee b92984b2fa r600g: Fix memory leak in r600_shader_select.
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reported-by: Michel Dänzer <michel@daenzer.net>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
2013-02-21 21:49:24 -08:00
Roland Scheidegger 66c3cd0be3 llvmpipe: simplify buffer allocation logic.
Now with buffer formats clarification don't need all that logic any longer.
(Note that it never would have worked in any case, because blockwidth and
blockheight were swapped any allocation with multi-byte format would have
had zero size.)

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-02-22 04:34:07 +01:00
Roland Scheidegger 2cfee2295f gallium/docs: improve text about resources a bit.
This clarifies some things and gets rid of some old stuff.
The most significant one is probably that buffers cannot have formats
(nearly all drivers completely ignored format and used width0 as byte size
already in any case). There seems to be no use case for "structured" buffers.
(Note while d3d11 has new Structured Buffers, these still aren't associated
with a format, rather a byte stride, which we can't do yet either way.)

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-02-22 04:34:07 +01:00
Roland Scheidegger f972567671 draw: make sure key size is calculated consistently.
Some parts calculated key size by using shader information, others by using
the pipe_vertex_element information. Since it is perfectly valid to have more
vertex_elements set than the vertex shader is using those may not be the same,
so we weren't copying over all vertex_element state - this caused the tgsi dump
to assert (iterates over all vertex elements). More importantly in this
situation it would also break vertex texturing completely (since the sampler
state derived from the key is at a different position than expected).
Fix thix by deriving key->nr_vertex_elements from the shader information
instead of the pipe_vertex_element state (unlike dx10, we can't have "holes"
in pipe_vertex_element state, so this should be safe).
(Note that actual llvm shader generation does not use the pipe_vertex_element
state from the key itself in any case (althogh I guess it could) but uses
the one from draw.pt (which should be the same though contains all elements)
instead.)

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-02-22 04:34:07 +01:00
Tom Stellard 10bcc843f8 r300g/compiler: Fix bug in OMOD folding
The OMOD value was only being folded to one instruction in cases where
the MUL instruction was reading a value written by more than one
instruction.

NOTE: This is a candidate for the stable branches.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
2013-02-21 22:07:28 -05:00
Tom Stellard 5e1321ddf4 r300g/tests: Add helper functions for creating a full program
Now you can convert assembly strings into a full struct radeon_compiler
object and use it to test individual compiler pases.

NOTE: This is a candidate for the stable branches.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
2013-02-21 22:07:27 -05:00
Tom Stellard bcf2e157ca r300g/tests: Exit test runner with a valid status code
This way make check can report whether or not the tests pass.

NOTE: This is a candidate for the stable branches.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
2013-02-21 22:07:27 -05:00
Tom Stellard 5355fc1e87 r300g/complier: Make r300_vertprog_swizzle_caps visible in other files
This will be used by the test suite in later commits.

NOTE: This is a candidate for the stable branches.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
2013-02-21 22:07:27 -05:00
Tom Stellard c3df498ff9 r300g/compiler: Fix typo in comment
Reviewed-by: Marek Olšák <maraeo@gmail.com>
2013-02-21 22:07:27 -05:00
Tom Stellard 27d140b960 r300g/compiler: Add missing license headers
These are all files that I authored, but forgot to add the license
headers.

NOTE: This is a candidate for the stable branches.

Signed-off-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
2013-02-21 22:07:27 -05:00
Carl Worth f5a8084692 i965: Avoid segfault in gen6_upload_state
This fixes a bug introduced in commit 258453716f and
triggered whenever "rb" is NULL.

Fixes at least one cause bug #59445:

	[SNB/IVB/HSW Bisected]Oglc draw-buffers2(advanced.blending.none) segfault
	https://bugs.freedesktop.org/show_bug.cgi?id=59445

(Though segfaults are still possible in that test case, but they have been
present since before commit 258453716f which is what's being fixed here.)

Reviewed-by: Eric Anholt <eric@anholt.net>
2013-02-21 12:09:24 -08:00
Alex Deucher 2e4ef989a2 r600g: don't enable ReZ mode on evergreen
Can cause lockups in certain cases when
zfunc/zenable/zwrite change without a flush
in between.

Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=60969
and lockups on Civ4 with wine.

This is a candidate for the 9.1 branch.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
2013-02-21 11:59:07 -05:00
Andreas Boll f7d87332b0 docs: import release notes for 9.0.3, add news item 2013-02-21 17:31:42 +01:00
Michel Dänzer b63b3012c9 radeonsi: Don't match TGSI_SEMANTIC_POSITION fs inputs to vs outputs 2013-02-21 10:07:18 +01:00
Michel Dänzer 954bc4ac34 radeonsi: Fix w component of TGSI_SEMANTIC_POSITION fragment shader inputs.
It's the reciprocal of the register value.

Fixes piglit fragcoord_w and glsl-fs-fragcoord-zw-perspective.

NOTE: This is a candidate for the 9.1 branch.
2013-02-21 10:06:52 +01:00
Michel Dänzer 18272c9b1b radeonsi: Fix up and enable flat shading.
Requires corresponding LLVM R600 backend fix to work correctly, but even
without that it doesn't hang anymore.

13 more little piglits.

Depends on LLVM: r175193, r175733

NOTE: This is a candidate for the 9.1 branch.
2013-02-21 09:14:36 +01:00
Vinson Lee 0d51906c07 radeonsi: Fix memory leak in si_shader_select.
Fixes resource leak defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2013-02-20 23:29:12 -08:00
Paul Berry 54d9c8a04a i965: Consign COORD_REPLACE VS hacks to Pre-Gen6.
Pre-Gen6, the SF thread requires exact matching between VS output
slots (aka VUE slots) and FS input slots, even when the corresponding
VS output slot is unused due to being overwritten by point coordinate
replacement (glTexEnvi(GL_POINT_SPRITE, GL_COORD_REPLACE, GL_TRUE)).
As a result, we have a special hack in the VS to ensure when any
texture coordinate is subject to point coordinate replacement, it is
always allocated space in the VUE, even if it isn't written to by the
VS.

This hack isn't needed from Gen6 onwards, since SF (Gen7: SBE)
swizzling has the ability to insert the point coordinate into
gl_TexCoord[] without needing a corresponding unused VUE slot.

Note that no modification of SF setup code is required for this
patch--get_attr_override() already does the right thing.  However, we
make a slight comment change to clarify why this works.

In addition to eliminating unnecessary VS recompiles and saving
precious URB space on Gen6+, this will save us the trouble of having
to adjust this hack when we implement geometry shaders.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2013-02-20 13:48:45 -08:00
Ian Romanick 8b586322e7 mesa: Don't install glEvalMesh in the beginend dispatch table
NOTE: This is a candidate for the 9.1 branch.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59740
Reviewed-by: Eric Anholt <eric@anholt.net>
2013-02-20 12:46:58 -08:00
Roland Scheidegger 83f7cde182 gallivm: fix indirect src register fetches requiring bitcast
For constant and temporary register fetches, the bitcasts weren't done
correctly for the indirect case, leading to crashes due to type mismatches.
Simply do the bitcasts after fetching (much simpler than fixing up the load
pointer for the various cases).

This fixes https://bugs.freedesktop.org/show_bug.cgi?id=61036

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-02-20 19:37:30 +01:00
Roland Scheidegger fbbcc1fcc4 llvmpipe: lp_resource_copy cleanup
We don't need to flush resources for each layer, and since we don't actually
care about layer at all in the flush function just drop the parameter.
Also we can use util_copy_box instead of repeated util_copy_rect.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-02-20 19:37:30 +01:00
Roland Scheidegger 95181ed2fd llvmpipe: fix lp_resource_copy using more than one 3d slice
These used to be illegal a very long time ago, then for some more time
nothing really emitted these so this code path wasn't hit.
Just trivially iterate over box->depth.
(Might be worth refactoring at some point since nowadays all the code
doesn't really do much except for depth textures.)

This fixes https://bugs.freedesktop.org/show_bug.cgi?id=61093

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-02-20 19:37:30 +01:00
Tapani Pälli 413941e1a3 gles2: a stub implementation for GL_EXT_discard_framebuffer
This patch implements a stub for GL_EXT_discard_framebuffer with
required checks listed by the extension specification. This extension
is required by GLBenchmark 2.5 when compiled with OpenGL ES 2.0
as the rendering backend.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-and-tested-by: Chad Versace <chad.versace@linux.intel.com>
2013-02-20 10:01:45 -08:00
Michel Dänzer 73bf626713 r600g/Cayman: Fix blending using destination alpha factor but non-alpha dest
Only compile tested, but should fix at least some piglit fbo-blending tests.

NOTE: This is a candidate for the stable branches.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
2013-02-20 14:43:17 +01:00
Michel Dänzer 95bced5929 radeonsi: Fix blending using destination alpha factor but non-alpha destination
11 more little piglits.

NOTE: This is a candidate for the 9.1 branch.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
2013-02-20 12:58:52 +01:00
Marek Olšák 72f4490b55 radeonsi: implement 3D transfers
That means we can map and read multiple slices with one transfer_map call.

[ Cherry-picked from r600g commit 1aebb6911e ]

11 more little piglits on master, 1 more on the 9.1 branch (Marek's
glTex(Sub)Image improvements on master broke the other 10).

NOTE: This is a candidate for the 9.1 branch.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2013-02-20 12:30:59 +01:00
Marek Olšák a84c4edeed radeonsi: add assertions to prevent creation of invalid surfaces
[ Cherry-picked from r600g commit ef11ed61a0 ]

NOTE: This is a candidate for the 9.1 branch.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2013-02-20 12:30:32 +01:00
Marek Olšák c4faab63c4 radeonsi: use u_box_origin_2d helper function
[ Cherry-picked from r600g commit b278aba423 ]

NOTE: This is a candidate for the 9.1 branch.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2013-02-20 12:15:22 +01:00
Vinson Lee c403a52666 configure.ac: Do not check for clock_gettime on MinGW.
MinGW does not have clock_gettime.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2013-02-19 21:17:37 -08:00
Zack Rusin 076403c30d DRI2: Don't disable GLX_INTEL_swap_event unconditionally
GLX_INTEL_swap_event is broken on the server side, where it's
currently unconditionally enabled. This completely breaks
systems running on drivers which don't support that extension.
There's no way to test for its presence on this side, so instead
of disabling it uncondtionally, just disable it for drivers
which are known to not support it. It makes sense because
most drivers do support it right now.
We'll be able to remove this once Xserver properly advertises
GLX_INTEL_swap_event.

Note: This is a candidate for stable branch branches.

Signed-off-by: Zack Rusin <zackr@vmware.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=60052
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Tested-by: Ian Romanick <ian.d.romanick@intel.com>
2013-02-19 12:50:16 -08:00
Eric Anholt 4c64f65f5d i965/fs: Enable CSE on uniform pull constant loads.
Improves on a major performance regression for the dolphin wii emulator
from its move to using UBOs.  Performance in the UBO codepath (as
replayed through apitrace) is up 21.1% +/- 2.3% (n=26/29).

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2013-02-19 10:34:03 -08:00
Eric Anholt c2a6e529c3 i965/fs: Only do CSE when the dst types match.
We could potentially do some CSE even when the dst types aren't the same
on gen6 where there is no implicit dst type conversion iirc, or in the
case of uniform pull constant loads where the dst type doesn't impact
what's stored.  But it's not worth worrying about.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
NOTE: This is a candidate for the 9.1 branch.
2013-02-19 10:33:41 -08:00
Eric Anholt aebd3f46e3 i965/fs: Delay setup of uniform loads until after pre-regalloc scheduling.
This should fix the register allocation explosion on the GLES 3.0 test
on gen6.  It also gives us an instruction that will fit our CSE handling.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
NOTE: This is a candidate for the 9.1 branch.
2013-02-19 10:33:32 -08:00
Eric Anholt 49bdebad38 i965/fs: Fix copy propagation with smearing.
We were correctly relaying the smear from MOV's src, but if the MOV
didn't do a smear, we don't want to smash the smear value from the
instruction being propagated into.  Prevents a regression in the
upcoming UBO change.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
NOTE: This is a candidate for the 9.1 branch.
2013-02-19 10:33:15 -08:00
Eric Anholt de7cb1cff3 i965/fs: Add a bit more instruction dumping useful for upcoming work.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2013-02-19 10:33:00 -08:00