Matt Turner [Sat, 8 Dec 2012 00:32:30 +0000 (16:32 -0800)]
mesa/uniform_query: Don't write to *params if there is an error
The GL 3.1 and ES 3.0 specs say of glGetActiveUniformsiv:
"If an error occurs, nothing will be written to params."
So, make a pass through the indices and check that they're valid before
the pass that actually writes to params. Checking pname happens on the
first iteration of the second loop.
Fixes es3conform's getactiveuniformsiv_for_nonexistent_uniform_indices
test.
NOTE: This is a candidate for the 9.0 branch.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit
11cea472466f731fa9c44d56f1643dec26e6601c)
Stefan Dösinger [Wed, 5 Dec 2012 22:08:19 +0000 (23:08 +0100)]
r200: Initialize swrast before setting limits
Otherwise the driver announces 4096 vertex shader constants and other
way too high limits.
NOTE: This is a candidate for stable release branches.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit
654a945f4d5fa00a40d47b952162a3b7f71dca5d)
Conflicts:
src/mesa/drivers/dri/r200/r200_context.c
Stefan Dösinger [Wed, 5 Dec 2012 22:08:20 +0000 (23:08 +0100)]
radeon: Initialize swrast before setting limits
NOTE: This is a candidate for stable release branches.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit
f6a4e1bc1eb3df1e9172474b60cf9fce571e35d1)
Conflicts:
src/mesa/drivers/dri/radeon/radeon_context.c
Stefan Dösinger [Wed, 5 Dec 2012 22:08:21 +0000 (23:08 +0100)]
meta: Disable GL_FRAGMENT_SHADER_ATI in MESA_META_SHADER
Fixes clears in Wine on r200.
NOTE: This is a candidate for stable release branches.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit
d8069b7603c368c59e7a605d696d2bd65ad414f6)
Port to 9.0: Andreas Boll <andreas.boll.dev@gmail.com>
s/API_OPENGL_COMPAT/API_OPENGL/
Brian Paul [Tue, 4 Dec 2012 23:32:01 +0000 (16:32 -0700)]
draw: set precalc_flat flag for AA lines too
Fixes flat shading for AA lines. demos/src/trivial/line-smooth is a
test case which hits this.
Note: This is a candidate for the stable branches.
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
(cherry picked from commit
d2c7fe5389e40871a7e339dc0ecaa7f570f851ed)
José Fonseca [Fri, 16 Nov 2012 17:09:05 +0000 (17:09 +0000)]
draw: Properly limit vertex buffer fetches on draw arrays.
We need to clamp vertex buffer fetch based on its size, not based on the
user specified max index hint.
This matches draw_pt_fetch_run() above.
NOTE: This is a candidate for the stable branches.
Reviewed-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit
7da3a947c72111dfb605781be6c0d61423b56e76)
Kenneth Graunke [Mon, 3 Dec 2012 06:30:45 +0000 (22:30 -0800)]
mesa: Disable GL_NV_primitive_restart extension in core contexts.
The NV formulation of primitive restart is turned on/off with
glEnableClientState/glDisableClientState. These two functions don't
exist in core contexts, which mean that GL_NV_primitive_restart is
essentially useless...even broken.
However, leaving it on causes oglconform's primitive-restart-nv tests to
run in OpenGL 3.1 contexts, which results in them all failing. This
patch causes 29 subtests to go from "fail" to "not run".
NOTE: This is a candidate for stable branches.
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit
32c6db3978e89e61660d9479d7548cb7a5e04ba2)
Brian Paul [Sun, 2 Dec 2012 23:18:22 +0000 (16:18 -0700)]
st/glx: accept GLX_SAMPLE_BUFFERS/SAMPLES_ARB == 0
Only fail if GLX_SAMPLE_BUFFERS_ARB or GLX_SAMPLES_ARB are non-zero.
We were already doing this in the older swrast/glx code.
This fixes a piglit/waffle problem where we'd always fail to get a
visual/config and report the test as "skip".
Note: This is a candidate for the stable branches.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit
c6d74bfaf61a6d52e6f886e33f2e98c3007d79fc)
Anuj Phogat [Fri, 16 Nov 2012 18:47:56 +0000 (10:47 -0800)]
mesa: Fix GL_LUMINANCE handling for textures in glGetTexImage
We need to rebase colors (ex: set G=B=0) when getting GL_LUMINANCE
textures in following cases:
1. If the luminance texture is actually stored as rgba
2. If getting a luminance texture, but returning rgba
3. If getting an rgba texture, but returning luminance
A similar fix was pushed by Brian Paul for uncompressed textures
in commit: f5d0ced.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=47220
Observed no regressions in piglit and ogles2conform due to this fix.
This patch will cause failures in intel oglconform pxconv-gettex,
pxstore-gettex and pxtrans-gettex test cases. The cause of failures
is a bug in test cases. Expected luminance value is calculted
incorrectly in test cases: L = R+G+B.
V2: Set G = 0 when getting a RG texture but returning luminance.
Note: This is a candidate for stable branches.
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Ian Romanick <idr@freedesktop.org>
(cherry picked from commit
9ab896243cfdee7f6a626aceb26e4cb88bd4da2d)
Matt Turner [Mon, 26 Nov 2012 23:13:25 +0000 (15:13 -0800)]
mesa: Set transform feedback's default buffer mode to INTERLEAVED_ATTRIBS
Fixes part of es3conform's transform_feedback_init_defaults test.
NOTE: This is a candidate for the stable branch.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit
13f9012ad3837c98a2c891244e64878fa61f9cd2)
Matt Turner [Fri, 23 Nov 2012 08:03:59 +0000 (00:03 -0800)]
mesa: Return 0 for XFB_VARYING_MAX_LENGTH if no varyings
v2: Perform this count the same way as elsewhere in this file, per
Brian Paul's review.
Fixes part of es3conform's transform_feedback_init_defaults test.
NOTE: This is a candidate for the stable branches.
Reviewed-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit
7c2060f0f08134e8c4ea00af94f59c18f30d05e2)
José Fonseca [Thu, 25 Oct 2012 14:47:12 +0000 (15:47 +0100)]
mesa/st: Don't use 4bits for GL_UNSIGNED_BYTE_3_3_2(_REV)
4bits and 3bits quantitization values differ significantly for
values other than 0 and 1.
Fixes piglit draw-pixels for softpipe/llvmpipe.
NOTE: Probably a candidate for stable branches.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
(cherry picked from commit
0cb0c38ccea84ab524d10447585000d41fbb8c74)
Andreas Boll [Fri, 1 Feb 2013 12:17:47 +0000 (13:17 +0100)]
configure.ac: Allow OpenGL ES1 and ES2 only with enabled OpenGL
Building OpenGL ES1 and/or ES2 without OpenGL is not supported on mesa
9.0.x
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Eric Anholt [Wed, 17 Oct 2012 20:07:33 +0000 (13:07 -0700)]
i965: Actually add support for GL_ANY_SAMPLES_PASSED from GL_ARB_oq2.
v2: Fix mangled sentence in the comment, and make the loop exit early.
Fixes assertion failures in Piglit's spec/ARB_occlusion_query2/render
test as well as the game PlaneShift.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> (v1)
(cherry picked from commit
e755c1a36b27d6e45f0ae81729908342b8775c74)
Jerome Glisse [Wed, 30 Jan 2013 20:02:32 +0000 (15:02 -0500)]
r600g: add cs memory usage accounting and limit it v3 (backport for mesa 9.0)
We are now seing cs that can go over the vram+gtt size to avoid
failing flush early cs that goes over 70% (gtt+vram) usage. 70%
is use to allow some fragmentation.
The idea is to compute a gross estimate of memory requirement of
each draw call. After each draw call, memory will be precisely
accounted. So the uncertainty is only on the current draw call.
In practice this gave very good estimate (+/- 10% of the target
memory limit).
v2: Remove left over from testing version, remove useless NULL
checking. Improve commit message.
v3: Add comment to code on memory accounting precision
This version is a backport for mesa 9.0
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Kenneth Graunke [Wed, 30 Jan 2013 19:10:54 +0000 (11:10 -0800)]
cherry-ignore: Ignore candidates for the 9.1 branch.
Chad Versace [Wed, 23 Jan 2013 19:17:51 +0000 (11:17 -0800)]
i965/disasm: Fix horizontal stride of dest registers
The bug: The printed horizontal stride was the numerical value of the
BRW_HORIZONTAL_$N enum.
The fix: Translate the enum before printing.
Note: This is a candidate for the stable releases.
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
(cherry picked from commit
ca7d332253e237c51fdf5c88a8f7937e65e8abff)
Kenneth Graunke [Thu, 17 Jan 2013 04:24:13 +0000 (20:24 -0800)]
i965/vs: Store texturing results into a vec4 temporary.
The sampler appears to ignore writemasks (even when correcting the
WRITEMASK_XYZW in brw_vec4_emit.cpp to the proper writemask) and just
always writes all four values.
To cope with this, just texture into a temporary, then MOV out into a
register that has the proper number of components.
NOTE: This is a candidate for stable branches.
Fixes es3conform's shadow_execution_vert.test.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <idr@freedesktop.org>
(cherry picked from commit
f0dbd9255b5813d1567e1f09266f80e35dcbeb70)
Kenneth Graunke [Thu, 17 Jan 2013 03:09:52 +0000 (19:09 -0800)]
i965/vs: Set LOD to 0 for ordinary texture() calls.
Previously it was left undefined, causing us to select a random LOD.
NOTE: This is a candidate for stable branches.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <idr@freedesktop.org>
(cherry picked from commit
aeff9a0d9889c4583e4f7fc89539380c1e6d043c)
Kenneth Graunke [Thu, 17 Jan 2013 03:08:12 +0000 (19:08 -0800)]
i965/vs: Create a 'lod_type' temporary for ir->lod_info.lod->type.
This is purely a refactor. However, in a moment, we'll want to set
lod_type to float for ir_tex, where ir->lod_info.lod is NULL.
NOTE: This is a candidate for stable branches (for the next patch).
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <idr@freedesktop.org>
(cherry picked from commit
56ce55d198af65d4a9de7119eb9e2417296c54ea)
Kenneth Graunke [Thu, 29 Nov 2012 10:40:09 +0000 (02:40 -0800)]
i965: Add missing _NEW_BUFFERS dirty bit in Gen7 SBE state.
This is needed to compute render_to_fbo. It even has the comment.
NOTE: This is a candidate for stable branches.
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit
bd87441ac028068f422e2c96b39f93644a0f246f)
Eric Anholt [Mon, 26 Nov 2012 22:22:12 +0000 (14:22 -0800)]
i965/fs: Don't generate saturates over existing variable values.
Fixes a crash in http://workshop.chromeexperiments.com/stars/ on i965,
and the new piglit test glsl-fs-clamp-5.
We were trying to emit a saturating move into a uniform, which the code
generator appropriately choked on. This was broken in the change in
32ae8d3b321185a85b73ff703d8fc26bd5f48fa7.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=57166
NOTE: This is a candidate for the 9.0 branch.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit
b9b033d8e456228fb05c5e28f85323de40f3292f)
Conflicts: 9.0 doesn't have the MOV() helper. Convert to old style.
Kenneth Graunke [Wed, 30 Jan 2013 19:05:28 +0000 (11:05 -0800)]
cherry-ignore: Ignore i965 guardband bug fixes.
Guardband clipping is disabled in 9.0, so these aren't actually needed
(and don't apply cleanly either).
Eric Anholt [Mon, 12 Nov 2012 21:13:55 +0000 (13:13 -0800)]
i965/fs: Fix the gen6-specific if handling for
80ecb8f15b9ad7d6edc
Fixes oglconform shad-compiler advanced.TestLessThani.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=48629
NOTE: This is a candidate for the 9.0 branch.
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit
0482998ccc205a9d29953c7a8b33f41ae3584935)
Conflicts: fs_inst doesn't have a "predicate" field on the 9.0 branch,
so convert it to "predicated = true". See
54679fcbcae7a2d41cb43.
Kenneth Graunke [Sat, 13 Aug 2011 01:27:16 +0000 (18:27 -0700)]
i965: Add chipset limits for Haswell GT1/GT2.
The maximum number of URB entries come from the 3DSTATE_URB_VS and
3DSTATE_URB_GS state packet documentation; the thread count information
comes from the 3DSTATE_VS and 3DSTATE_PS state packet documentation.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
(cherry picked from commit
9add4e803877f97ad7f6d479d81d537426f09b6f)
Kenneth Graunke [Fri, 4 Jan 2013 15:53:09 +0000 (07:53 -0800)]
i965: Use Haswell's sample_d_c for textureGrad with shadow samplers.
The new hardware actually just supports this now.
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit
899017fc54c40c969b5239b33f3a17b311878b0d)
Kenneth Graunke [Wed, 16 Jan 2013 19:14:14 +0000 (11:14 -0800)]
i965: Lower textureGrad() with samplerCubeShadow.
We weren't lowering textureGrad() with samplerCubeShadow because I
couldn't figure out the LOD calculations. It turns out they're easy:
you just have to use 1 for the depth. This causes it to pass
oglconform's four tests.
(cherry picked from commit
613e64060c2bc58c3920c3c6ff77291642ba0e23)
When cherry-picking this to stable, I've reordered this before the
Haswell commit that would have introduced a regression.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Tested-by: Anuj Phogat <anuj.phogat@gmail.com> (original)
Tested-by: Ian Romanick <idr@freedesktop.org> (original)
Kenneth Graunke [Fri, 21 Sep 2012 10:13:36 +0000 (03:13 -0700)]
i965: Do texture swizzling in hardware on Haswell.
Haswell supports EXT_texture_swizzle and legacy DEPTH_TEXTURE_MODE
swizzling by setting SURFACE_STATE entries. This means we don't have to
bake the swizzle settings into the shader code by emitting MOV
instructions, and thus don't have to recompile shaders whenever the
swizzles change.
Unfortunately, we can't handle GL_ALPHA this way: unlike all the others,
which store the comparison result in the .r channel (and possibly others
as well), GL_ALPHA puts it in the .a channel. The GLSL 1.30+ style
functions which return a float always simply return the .r channel,
which would be zero if we handled this as a surface override. In this
case, fall back to doing it the old way. DEPTH_TEXTURE_MODE = GL_ALPHA
isn't an interesting performance path anyway.
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit
6d6aef79742ece3bb570ae44e6c13791aae15e01)
Kenneth Graunke [Fri, 7 Sep 2012 20:24:16 +0000 (13:24 -0700)]
i965: Refactor texture swizzle generation into a helper.
It's going to be reused in a second place soon.
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit
b5a042a657fed45264406cbd0d67fa6217a410a1)
Kenneth Graunke [Sat, 25 Aug 2012 01:40:40 +0000 (18:40 -0700)]
i965: Fix primitive restart on Haswell.
Haswell moved the "Cut Index Enable" bit from the INDEX_BUFFER packet to
a new 3DSTATE_VF packet, so we need to emit that. Also, it requires us
to specify the cut index rather than assuming it's 0xffffffff.
This adds a new Haswell-specific tracked state atom to gen7_atoms.
Normally, we would create a new generation-specific atom list, but since
there's only one difference over Ivybridge so far, I chose to simply
make it return without doing any work on non-Haswell systems.
Fixes five piglit tests:
- general/primitive-restart-DISABLE_VBO
- general/primitive-restart-VBO_COMBINED_VERTEX_AND_INDEX
- general/primitive-restart-VBO_INDEX_ONLY
- general/primitive-restart-VBO_SEPARATE_VERTEX_AND_INDEX
- general/primitive-restart-VBO_VERTEX_ONLY
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
(cherry picked from commit
815d9d405c69bb07d550ae9f79283dcdc7466e2c)
Andreas Boll [Tue, 22 Jan 2013 20:25:04 +0000 (21:25 +0100)]
docs: add news item for 9.0.2 release
Andreas Boll [Tue, 22 Jan 2013 20:24:43 +0000 (21:24 +0100)]
docs: Add 9.0.2 release md5sums
Andreas Boll [Sun, 20 Jan 2013 14:40:11 +0000 (15:40 +0100)]
docs: Add 9.0.2 release notes
Andreas Boll [Sun, 20 Jan 2013 14:18:44 +0000 (15:18 +0100)]
mesa: Bump version to 9.0.2
Ander Conselvan de Oliveira [Mon, 21 Jan 2013 15:36:52 +0000 (17:36 +0200)]
egl/wayland: Destroy the pending buffer callback with the egl surface
Otherwise, we crash when the callback is executed, since the dri2_surf
pointer may point to invalid data.
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Andreas Boll [Sun, 20 Jan 2013 14:14:40 +0000 (15:14 +0100)]
mesa: update .cherry-ignore list
Andreas Boll [Fri, 18 Jan 2013 11:46:52 +0000 (12:46 +0100)]
Revert "r600g: try to fix streamout for the cases where BURST_COUNT > 0"
This reverts commit
42f71b4861b9d01a8f925fea3182fc1a292222f3.
Fixes the following piglit regressions on my rv770
./bin/ext_transform_feedback-output-type float[2] -auto -fbo
./bin/ext_transform_feedback-output-type float[2]-no-subscript -auto -fbo
./bin/ext_transform_feedback-output-type int[2] -auto -fbo
./bin/ext_transform_feedback-output-type int[2]-no-subscript -auto -fbo
./bin/ext_transform_feedback-output-type uint[2] -auto -fbo
./bin/ext_transform_feedback-output-type uint[2]-no-subscript -auto -fbo
Johannes Obermayr [Sat, 29 Dec 2012 00:52:11 +0000 (01:52 +0100)]
tests: AM_CPPFLAGS must include $(top_srcdir) instead of $(top_builddir).
Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>
(cherry picked from commit
ebcabb88cfd19b35cd1b0a327fa055fff0c1b2be)
Additionally it fixes the missing $(top_srcdir)/include in
src/glsl/tests/Makefile.am
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59383
Tom Stellard [Mon, 17 Sep 2012 14:33:56 +0000 (14:33 +0000)]
r600g: Use LOOP_START_DX10 for loops
LOOP_START_DX10 ignores the LOOP_CONFIG* registers, so it is not limited
to 4096 iterations like the other LOOP_* instructions. Compute shaders
need to use this instruction, and since we aren't optimizing loops with
the LOOP_CONFIG* registers for pixel and vertex shaders, it seems like
we should just use it for everything.
Reviewed-by: Marek Olšák <maraeo@gmail.com>
(cherry picked from commit
810345492eca34c2ad12728b5491a4691cc62ec2)
Fixes a hang on the following piglit test on my rv770
./bin/ext_timer_query-time-elapsed -auto -fbo
Brian Paul [Wed, 2 Jan 2013 20:46:20 +0000 (13:46 -0700)]
gallivm: support more immediates in lp_build_tgsi_info()
Bump limit from 32 to 128.
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=58545
(cherry picked from commit
1b6ba9c4c840e291cbbe19a8601b56d1d103179c)
Reviewed-by: Brian Paul <brianp@vmware.com>
Johannes Obermayr [Fri, 30 Nov 2012 00:44:56 +0000 (01:44 +0100)]
clover: Adapt libclc's INCLUDEDIR and LIBEXECDIR to make use of the new introduced libclc.pc.
Tom Stellard:
-Keep --with-libclc-path and mark it deprecated.
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
(cherry picked from commit
959e83d65075513f989cb1fe634dca314a7e185f)
Johannes Obermayr [Fri, 30 Nov 2012 22:53:58 +0000 (23:53 +0100)]
gallium/auxiliary: Add -fno-rtti to CXXFLAGS on LLVM >= 3.2.
Also remove the recently added and overloaded LLVM_CXXFLAGS from CXXFLAGS.
Note: This is a candidate for the stable branches.
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
(cherry picked from commit
21694b8eacbf63f8abdee6340510c0458a25a7fb)
Conflicts:
src/gallium/auxiliary/Makefile
smoki [Thu, 3 Jan 2013 17:57:40 +0000 (18:57 +0100)]
radeon/r200: Fix tcl culling
Should fix:
https://bugs.freedesktop.org/show_bug.cgi?id=57842
(cherry picked from commit
5bf357db89836d0f4e4b8a4cb559755d4734b81b)
smoki [Mon, 10 Dec 2012 16:30:26 +0000 (17:30 +0100)]
r200: fix broken tcl lighting
command mistakenly used vector instead of scalar emit (the more or less
identical code in radeon is already correct).
Seems like it would be broken ever since kms probably.
Should fix bugs 22576, 26809.
(cherry picked from commit
320d531373e7b0873f5de42f6173b986290f593f)
Ian Romanick [Thu, 6 Dec 2012 22:57:01 +0000 (14:57 -0800)]
glsl: Don't add structure fields to the symbol table
I erroneously added this back in January 2011 in commit
88421589.
Looking at the commit message, I have no idea why I added it. It only
added non-array structure fields to the symbol table, so array structure
fields are treated correctly.
Fixes piglit tests structure-and-field-have-same-name.vert and
structure-and-field-have-same-name-nested.vert. It should also fix
WebGL conformance tests shader-with-non-reserved-words.
NOTE: This is a candidate for the stable release branches.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=57622
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit
ed3f237e09a42bdb55afb58d1536affad9000d76)
Adam Jackson [Wed, 2 Jan 2013 19:04:18 +0000 (14:04 -0500)]
r300g: Fix visibility CFLAGS in automake
Note: this is a candidate for the 9.0 stable branch.
Signed-off-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit
c8d3fd4a120be0f62367f679e31ea5763c10c197)
Adam Jackson [Wed, 2 Jan 2013 19:02:59 +0000 (14:02 -0500)]
galahad, noop: Fix visibility CFLAGS in automake
Note: this is a candidate for the 9.0 stable branch.
Signed-off-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit
443954d161dc3db0605926e4e759080e299710ce)
Adam Jackson [Wed, 2 Jan 2013 19:09:22 +0000 (14:09 -0500)]
glcpp: Typo fix.
Note: this is a candidate for the 9.0 stable branch.
Signed-off-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit
86b6964ef9839f1bd5a05efe47712843c97196ca)
Adam Jackson [Wed, 2 Jan 2013 19:02:00 +0000 (14:02 -0500)]
glcpp: Fix visibility CFLAGS in automake
Note: this is a candidate for the 9.0 stable branch.
Signed-off-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit
0daabd52394899ec4947dc2cf3119201d2e79b1c)
Johannes Obermayr [Tue, 4 Dec 2012 13:18:03 +0000 (14:18 +0100)]
clover: Install CL headers.
Note: This is a candidate for the stable branches.
(cherry picked from commit
b361bb3de4bd8d27f6fcb920e5516e51db00ef73)
Andreas Boll [Thu, 6 Dec 2012 17:36:25 +0000 (18:36 +0100)]
build: Fix GLES linkage without libglapi
fixes a regression introduced with
fc9ea7c74dc5cb996c3d9fe6663fd6da080e8360
NOTE: This is a candidate for the 9.0 branch.
Reported-by: Brian Paul <brianp@vmware.com>
Acked-by: Matt Turner <mattst88@gmail.com>
(cherry picked from commit
520892688af7ce9baca6e2b72e7e7eaebe02260c)
Dave Airlie [Fri, 30 Nov 2012 10:24:33 +0000 (20:24 +1000)]
glsl: fix uninitialised variable from constructor
Coverity pointed out this uninitialised class member.
Note: This is a candidate for stable branches.
Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit
f3476ec8fa5a94d469a12318c537b13ce9cc5a45)
Dave Airlie [Fri, 30 Nov 2012 10:23:20 +0000 (20:23 +1000)]
glsl: initialise killed_all field.
coverity pointed out this field was being used uninitialised.
Note: This is a candidate for stable branches.
Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit
906670a7906a785210c872f637239bf4afa5b63d)
Dave Airlie [Fri, 30 Nov 2012 08:33:21 +0000 (18:33 +1000)]
glsl: fix cut-n-paste error in error handling. (v2)
Reported by coverity scan.
v2: fix second case
Note: This is a candidate for stable branches.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit
e85c9a4d2874a302195c66742b446f0645440c43)
Brian Paul [Fri, 30 Nov 2012 17:10:25 +0000 (10:10 -0700)]
util: added pipe_surface_release() function
To fix a pipe_context::surface_destroy() use-after-free problem.
We previously added pipe_sampler_view_release() for similar reasons.
Note: this is a candidate for the stable branches.
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
(cherry picked from commit
51223784d6a8ee93cf004c9ba87a7e4dcb7b3161)
Andreas Boll [Fri, 16 Nov 2012 09:46:06 +0000 (10:46 +0100)]
build: use git ls-files for adding all Makefile.in into the release tarball
Until we have proper 'make dist' this is an improvement of the current
situation, because each time some old Makefiles got converted to automake
we had to update the tarballs target.
NOTE: This is a candidate for the 9.0 branch.
Cc: Eric Anholt <eric@anholt.net>
Acked-by: Matt Turner <mattst88@gmail.com>
(cherry picked from commit
0f5e2ce8541855c65852dabbb19313fd0bb65b3d)
Conflicts:
Makefile.am
Eric Anholt [Fri, 16 Nov 2012 17:56:03 +0000 (09:56 -0800)]
i965/gen4: Fix memory leak each time compile_gs_prog() is called.
Commit
774fb90db3e83d5e7326b7a72e05ce805c306b24 introduced a ralloc context to
each user of struct brw_compile, but for this one a NULL context was used,
causing the later ralloc_free(mem_ctx) to not do anything.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55175
NOTE: This is a candidate for the stable branches.
(cherry picked from commit
59bfd66a614177320817a97e1dadfcfcf3b9b092)
Alex Deucher [Wed, 21 Nov 2012 23:48:18 +0000 (18:48 -0500)]
radeonsi: add a new SI pci id
Note: this is a candidate for the stable branch.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit
e2df37f69a4e513b756fc193a544d48d8fd0ddac)
Vinson Lee [Wed, 14 Nov 2012 07:20:42 +0000 (23:20 -0800)]
i915: Fix wrong sizeof argument in i915_update_tex_unit.
The bug was found by Coverity.
NOTE: This is a candidate for the stable branches.
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit
10f214e5b248e5dd5f323c689549cd66d2f6ad22)
Andreas Boll [Sat, 17 Nov 2012 17:04:54 +0000 (18:04 +0100)]
Add .dirstamp to toplevel .gitignore
(cherry picked from commit
59b3d3ad6e77af92eb23b77c59dc60e6f9566d87)
Chad Versace [Fri, 9 Nov 2012 22:06:41 +0000 (14:06 -0800)]
egl/dri2: Set error code when dri2CreateContextAttribs fails
When dri2CreateContextContextAttribs failed, eglCreateContext returned
NULL yet set the error code to EGL_SUCCESS! The problem was that
eglCreateContext ignored the error code returned by
driCreateContextAttribs.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56706
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
(cherry picked from commit
5cf8536690226b3bd19d19197fcec501a278703c)
Chad Versace [Fri, 9 Nov 2012 22:06:40 +0000 (14:06 -0800)]
i965: Validate requested GLES context version in brwCreateContext
For GLES1 and GLES2, brwCreateContext neglected to validate the requested
context version received from the DRI layer. If DRI requested an OpenGL
ES2 context with version 3.9, we provided it one.
Before this fix, the switch statement that validated the requested GL
context flavor was an ugly #ifdef copy-paste mess. Instead of reproducing
the copy-past-mess for GLES1 and GLES2, I first refactored it. Now the
switch statement is readable.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
(cherry picked from commit
243cf7a924eaef78ce0d5150747fae6c3c4e6974)
Maarten Lankhorst [Mon, 19 Nov 2012 08:43:29 +0000 (09:43 +0100)]
automake: strip LLVM_CXXFLAGS and LLVM_CPPFLAGS too
It seems that -NDEBUG and other flags might still be leaked through
those variables, so strip those off there as well.
NOTE: This is a candidate for the 9.0 branch.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
(cherry picked from commit
ddb901fbf4489ffcd85d3320f23913eb1d4fbdfe)
Eric Anholt [Tue, 13 Nov 2012 21:39:37 +0000 (13:39 -0800)]
mesa: Fix segfault on reading from a missing color read buffer.
The diff looks funny, but it's moving the integer vs non-integer check
below the _mesa_source_buffer_exists() check that ensures
_ColorReadBuffer is non-null, so we get a GL_INVALID_OPERATION instead
of a segfault. This looks like it had regressed in the
_mesa_error_check_format_and_type() changes, which removed the first of
the two duplicated checks for the source buffer. Fixes segfault in the
new piglit ARB_framebuffer_object/negative-readpixels-no-rb.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45877
NOTE: This is a candidate for the stable branches.
Reviewed-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit
5c99697f74c68f7e170564d791b95d986a18774a)
Marek Olšák [Sun, 11 Nov 2012 14:22:32 +0000 (15:22 +0100)]
mesa: add MaxNumLevels to gl_texture_image, remove MaxLog2
MaxLog2 led to bugs, because it didn't work well with 1D and 3D textures.
NOTE: This is a candidate for the stable branches.
v2: correct the comment at MaxNumlevels
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit
8111342e814304730bed34446ea816cbc17a5775)
Kenneth Graunke [Thu, 8 Nov 2012 12:13:26 +0000 (04:13 -0800)]
i965: Fix AA Line Distance Mode in 3DSTATE_SF on Ivybridge.
We were accidentally setting bit 14 in DWord 2 (which is Reserved/MBZ)
rather than bit 14 in DWord 3 (which is AA Line Distance Mode).
There's also no reason to ever set it to legacy mode; the bit is only
used when drawing antialiased lines anyway. Set it unconditionally.
NOTE: This is a candidate for stable branches.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit
e639385064663ba401544de5dbd463fa7f6cce2d)
Matt Turner [Tue, 6 Nov 2012 18:59:30 +0000 (10:59 -0800)]
glcpp: Reject garbage after #else and #endif tokens
Previously we were accepting garbage after #else and #endif tokens when
the previous preprocessor conditional evaluated to false (eg, #if 0).
When the preprocessor hits a false conditional, it switches the lexer
into the SKIP state, in which it ignores non-control tokens. The parser
pops the SKIP state off the stack when it reaches the associated #elif,
#else, or #endif. Unfortunately, that meant that it only left the SKIP
state after the lexing the entire line containing the #token and thus
would accept garbage after the #token.
To fix this we use a mid-rule, which is executed immediately after the
#token is parsed.
NOTE: This is a candidate for the stable branch
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56442
Fixes: preprocess17_frag.test from oglconform
Reviewed-by: Carl Worth <cworth@cworth.org> (glcpp-parse.y)
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit
060e69679925f171cfcc2a5f84fab1d833a7e804)
Mario Kleiner [Sun, 7 Oct 2012 01:44:14 +0000 (03:44 +0200)]
mesa: Don't glPopAttrib() GL_POINT_SPRITE_COORD_ORIGIN on < OpenGL-2.0
The GL_POINT_BIT state attribute GL_POINT_SPRITE_COORD_ORIGIN
is only supported on OpenGL-2.0 or later. Prevent glPopAttrib()
from trying to restore it on OpenGL-1.4 implementations which
support GL_ARB_POINT_SPRITE, as otherwise the sequence...
glPushAttrib(GL_POINT_BIT);
glPopAttrib();
throws an GL_INVALID_ENUM error in glPopAttrib().
See also commit
f778174ea1e431a7113f12c12beb4aba9e825a9f
NOTE: This is a candidate for the 9.0 branch.
Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit
eabbe5c45f5d05822c5f841628afa4008398d553)
Kenneth Graunke [Thu, 8 Nov 2012 04:29:40 +0000 (20:29 -0800)]
mesa: Fix glGetVertexAttribI[u]iv now that we have real integer attribs.
Since
cf438f5375e242, we store actual integers for the attribute data.
We just need to reinterpret the GLfloat array as a GLint/GLuint array
so we can read the proper data.
Fixes oglconform's glsl-vertex-attrib/basic.VertexAttribI[1234][u]i
subtests (after fixing an unrelated bug in those test cases).
v2: Use the COPY_4V macro to be concise.
NOTE: This is a candidate for the stable branches.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Marek Olšák <maraeo@gmail.com> [v1]
(cherry picked from commit
c299f44782d7d7d6719fce622a121aad58856139)
Dave Airlie [Sat, 1 Sep 2012 03:55:38 +0000 (13:55 +1000)]
glsl_to_tgsi: fix dst register for texturing fetches.
I've no idea why there isn't a piglit that triggers this behaviour,
but while enabling TBOs for softpipe and r600g, I noticed all the
integer tests failed. I tracked it back to the TXF returning a float
when it should be returning an int. This fixed it and I haven't
seen any regressions in a full piglit run on softpipe.
http://bugs.freedesktop.org/55010
NOTE: This is a candidate for the 9.0 branch.
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit
9785ae0973cc206afc36dbc7d5b9553f92d06b47)
Anuj Phogat [Fri, 2 Nov 2012 18:18:16 +0000 (11:18 -0700)]
meta: Remove redundant code in _mesa_meta_GenerateMipmap
Integer textures generate invalid operation in glGenerateMipmap.
So, the code related to integer textures is now redundant.
Note: This is a candidate for stable branches.
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit
a196f43596f6cb85a8f3e446596a2fb8e0ee7872)
Anuj Phogat [Fri, 2 Nov 2012 17:47:33 +0000 (10:47 -0700)]
mesa: Generate invalid operation in glGenerateMipMap for integer textures
Khronos has reached a conclusion and disallowed following texture formats in
glGenerateMipMap():
(a) ASTC textures
(b) integer internal formats (e.g., RGBA8UI, RG16I)
(c) textures with stencil formats (e.g., STENCIL_INDEX8)
(d) textures with packed depth/stencil formats (e.g, DEPTH24_STENCIL8)
https://cvs.khronos.org/bugzilla/show_bug.cgi?id=9471
Note: This is a candidate for stable branches.
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit
c0a78d7d7b51e125d143e693fdfc78b90f2d68cf)
Eric Anholt [Wed, 31 Oct 2012 22:36:27 +0000 (15:36 -0700)]
mesa: Fix core GL genned-name handling for glBeginQuery().
Fixes piglit gl-3.1/genned-names.
NOTE: This is a candidate for the 9.0 branch.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit
4fce0230fc3528be32562410bcddfc887c4d25a0)
Eric Anholt [Wed, 31 Oct 2012 22:33:41 +0000 (15:33 -0700)]
mesa: Fix the core GL genned-name handling for glBindBufferBase()/Range().
This is part of fixing gl-3.1/genned-names.
v2: Fix a missing return value.
NOTE: This is a candidate for the 9.0 branch.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit
947d8ff4a7c4b7ffb4013056b48dbabe6b3931b0)
José Fonseca [Tue, 30 Oct 2012 19:45:25 +0000 (19:45 +0000)]
llvmpipe: Obey back writemask.
Tested with a modified glean tstencil2 test.
NOTE: This is a candidate for stable branches.
Reviewed-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit
f69fc3612768d9cfed974b9d6ecf6a70fa0db99c)
Bryan Cain [Tue, 23 Oct 2012 16:58:40 +0000 (11:58 -0500)]
glsl_to_tgsi: set correct register type for array and structure elements
This fixes an issue where glsl_to_tgsi_visior::get_opcode() would emit the
wrong opcode because the register type was GLSL_TYPE_ARRAY/STRUCT instead of
GLSL_TYPE_FLOAT/INT/UINT/BOOL, so the function would use the float opcodes for
operations on integer or boolean values dereferenced from an array or
structure. Assertions have been added to get_opcode() to prevent this bug
from reappearing in the future.
NOTE: This is a candidate for the stable branches.
Reviewed-by: Brian Paul <brianp@vmware.com>
Tested-by: Andreas Boll <andreas.boll.dev@gmail.com>
(cherry picked from commit
170f0459a2367406d4ec838b2eebdc6ff2f84f2c)
Christoph Bumiller [Thu, 25 Oct 2012 12:32:29 +0000 (14:32 +0200)]
nv50/ir: restore use of long immediate encodings
NOTE: This is a candidate for the 9.0 branch.
(cherry picked from commit
9ae7d8bb799a8c5008c7c4824d414ca856e13ba5)
Kenneth Graunke [Thu, 25 Oct 2012 09:29:15 +0000 (02:29 -0700)]
i965/vs: Preserve the type when copy propagating into an instruction.
Consider the following code, which reinterprets a register as a
different type:
mov(8) g6<1>F g1.4<0,4,1>.xF
and(8) g5<1>.xUD g6<4,4,1>.xUD 0x7fffffffUD
Copy propagation would notice that we can replace the use of g6 with
g1.4 and eliminate the MOV. Unfortunately, it failed to preserve the UD
type, incorrectly generating:
and(8) g5<1>.xUD g6<4,4,1>.xF 0x7fffffffUD
Found while debugging Ian's uncommitted ARB_vertex_program LOG opcode
test with my new Mesa IR -> Vec4 IR translator.
NOTE: This is a candidate for stable release branches.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit
03ea156f1b3e57ef223c0340afb49e513fa0b407)
Kenneth Graunke [Thu, 25 Oct 2012 04:16:46 +0000 (21:16 -0700)]
i965/vs: Don't lose the MRF writemask when doing compute-to-MRF.
Consider the following code sequence:
mul(8) g4<1>F g1<0,4,1>.wzwwF g3<4,4,1>.wzwwF
mov.sat(8) m1<1>.xyF g4<4,4,1>F
mul(8) g4<1>F g1<0,4,1>.xxyxF g3<4,4,1>.xxyxF
mov.sat(8) m1<1>.zwF g4<4,4,1>F
The compute-to-MRF pass will discover the first mov.sat and attempt to
replace it by rewriting earlier instructions. Everything works out,
so it replaces scan_inst's destination file, reg, and reg_offset,
resulting in:
mul(8) m1<1>F g1<0,4,1>.wzwwF g3<4,4,1>.wzwwF
mul(8) g4<1>F g1<0,4,1>.xxyxF g3<4,4,1>.xxyxF
mov.sat(8) m1<1>.zwF g4<4,4,1>F
Unfortunately, it loses the .xy writemask on the mov.sat's MRF
destination. While this doesn't pose an immediate problem, it then
proceeds to transform the second mov.sat, resulting in:
mul(8) m1<1>F g1<0,4,1>.wzwwF g3<4,4,1>.wzwwF
mul(8) m1<1>F g1<0,4,1>.xxyxF g3<4,4,1>.xxyxF
Instead of writing both halves of the vector (like the original code),
it overwrites the full vector both times, clobbering the desired .xy
values.
When encountering a MOV, the compute-to-MRF code scans for instructions
which generate channels of the MOV source. It ensures that all
necessary channels are available (possibly written by several
instructions). In this case, *more* channels are available than
necessary, so we want to take the subset that's actually used.
Taking the bitwise and of both writemasks should accomplish that.
This was discovered by analyzing an ARB_vertex_program test
(glean/vertProg1/MUL test (with swizzle and masking)) with my new
Mesa IR -> Vec4 IR translator code. However, it should be possible
with GLSL programs as well.
NOTE: This is a candidate for stable release branches.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit
10ff6772c8054aea12ac0f08e2e3898fd4a7f76b)
Kenneth Graunke [Mon, 22 Oct 2012 17:56:46 +0000 (10:56 -0700)]
glcpp: Don't use infinite lookhead for #define differentiation.
Previously, we used lookahead patterns to differentiate:
#define FOO(x) function macro
#define FOO (x) object macro
Unfortunately, our rule for function macros:
{HASH}define{HSPACE}+/{IDENTIFIER}"("
relies on infinite lookahead, and apparently triggers a Flex bug where
the generated code overflows a state buffer (see YY_STATE_BUF_SIZE).
There's no need to use infinite lookahead. We can simply change state,
match the identifier, and use a single character lookahead for the '('.
This apparently makes Flex not generate the giant state array, which
avoids the buffer overflow, and should be more efficient anyway.
Fixes piglit test 17000-consecutive-chars-identifier.frag.
NOTE: This is a candidate for every release branch ever.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Carl Worth <cworth@cworth.org>
(cherry picked from commit
9142ade15416415f2d5eb20b093b898c649cd2bb)
Brian Paul [Fri, 19 Oct 2012 21:34:55 +0000 (15:34 -0600)]
st/mesa: free TGSI tokens with ureg_free_tokens()
since they're allocated by ureg_get_tokens().
NOTE: This is a candidate for the 8.0 and 9.0 branches.
(cherry picked from commit
11070105f0b5ad20f12bb40a8dd0b357924bcfdd)
Brian Paul [Fri, 19 Oct 2012 20:51:20 +0000 (14:51 -0600)]
st/mesa: replace REALLOC() with realloc()
We should use the later since we're freeing the memory with free(),
not the gallium FREE() macro.
This fixes a mismatch when using the gallium debug memory functions.
NOTE: This is a candidate for the 9.0 branch.
(cherry picked from commit
bb93439873e0f270383d8a802eec79807d32c10a)
Kenneth Graunke [Thu, 20 Sep 2012 21:27:29 +0000 (14:27 -0700)]
mesa: Don't flatten IF statements by default.
MaxIfDepth of 0 means "flatten all the time", not "never flatten".
This is only desirable on hardware that can't support control flow;
software rasterization and most hardware drivers want this.
This alters behavior for swrast as well as i915. Tested on i915.
NOTE: This is a candidate for stable release branches.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit
56705cd36bf48d5050ac9ec10d91fd097a577f42)
Alex Deucher [Tue, 16 Oct 2012 17:11:38 +0000 (13:11 -0400)]
radeonsi: add some new SI pci ids
Note: this is a candidate for the stable branch.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit
ed8d87c6a641efe8667c0ba580260ffaff5ffc7e)
Abdiel Janulgue [Fri, 12 Oct 2012 08:51:03 +0000 (11:51 +0300)]
mesa: Fix a crash in update_texture_state() for external texture type
NOTE: This is a candidate for the stable branch.
Signed-off-by: Abdiel <abdiel.janulgue@intel.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit
bcb10ca17221833b2502970fb94ff52cf328ee30)
Chris Fester [Thu, 11 Oct 2012 22:01:23 +0000 (16:01 -0600)]
util: null-out the node's prev/next pointers in list_del()
Note: This is a candidate for the 9.0 branch.
Signed-off-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit
3fffe8f7b77938fcbf449a7f9a2ae9614c8e2bd4)
Tapani Pälli [Tue, 2 Oct 2012 11:50:31 +0000 (14:50 +0300)]
android: generate matching remap_helper to dispatch table
commit
a010215463c63680c69e90202fe3fcd2e5b25fa6 removed ES2 specific dispatch
table and remap_helper, since now we are using dispatch.h which is generated
from gl_and_es_API.xml we need to generate a matching remap_helper using the
same xml.
Note: This is a candidate for the 9.0 branch.
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
(cherry picked from commit
60565b564bc969ce47fb8417c79050c261e5aec9)
Brian Paul [Thu, 11 Oct 2012 00:31:52 +0000 (18:31 -0600)]
svga: don't use uninitialized framebuffer state
Only the first 'nr_cbufs' color buffers in the pipe_framebuffer_state are
valid. The rest of the color buffer pointers might be unitialized.
Fixes a regression in the piglit fbo-srgb-blit test since changes in the
gallium blitter code.
NOTE: This is a candidate for the 9.0 branch (just to be safe).
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
(cherry picked from commit
60a9390978db0a3c9b0170c726ebe684baf75734)
Kenneth Graunke [Mon, 1 Oct 2012 22:28:56 +0000 (15:28 -0700)]
i965/vs: Implement register spilling.
To validate this code, I ran piglit -t vs quick.tests with the "go spill
everything" debugging code enabled. There was only one regression:
glsl-vs-unroll-explosion simply ran out of registers. This should be
fine in the real world, since no one actually spills every single
register.
NOTE: This is a candidate for the 9.0 branch. Even if it proves to have
bugs, it's likely better than simply failing to compile.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit
9237f0ea8d176fb5dcd41868dcc723fe34f6b1f3)
Kenneth Graunke [Mon, 1 Oct 2012 22:28:55 +0000 (15:28 -0700)]
i965/vs: Fix unit mismatch in scratch base_offset parameter.
move_grf_array_access_to_scratch() calculates scratch buffer offsets in
bytes. However, emit_scratch_read/write() expects the base_offset
parameter to be measured in OWords.
As a result, a shader using a scratch read/write offset greater than
zero (in practice, a shader containing more than one variable in
scratch) would use too large an offset, frequently exceeding the
available scratch space.
This patch corrects the mismatch by removing spurious conversion from
OWords to bytes in move_grf_array_access_to_scratch().
This is based on a patch by Paul Berry.
NOTE: This is a candidate for stable release branches.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit
46e529672bb124b78eb454cbf55c72074ef6d35c)
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.
Christoph Bumiller [Mon, 7 Jan 2013 14:50:19 +0000 (15:50 +0100)]
nv50/ir: wrap assertion using typeid in #ifndef NDEBUG
Note: this is a candidate for the 9.0 stable branch.
Christoph Bumiller [Mon, 7 Jan 2013 19:18:06 +0000 (20:18 +0100)]
nvc0: add missing call to map edge flag in push_vbo
Note: this is a candidate for the 9.0 stable branch.
Jonas Ådahl [Tue, 25 Dec 2012 12:01:08 +0000 (13:01 +0100)]
wayland: Don't cancel a roundtrip when any event is received
Since wl_display_dispatch_queue() returns the number of processed events
or -1 on error, only cancel the roundtrip if an -1 is returned.
This also fixes a potential memory corruption bug happening when the
roundtrip does an early return and the callback later writes to the then
out of scope stack allocated `done' parameter.
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Ander Conselvan de Oliveira [Thu, 22 Nov 2012 13:34:49 +0000 (15:34 +0200)]
egl/wayland: Dispatch the event queue before get_buffers
When a client frame callback is executed and the client starts rendering
again, the egl event queue might not have been dispatched so that the
buffer release event for the previous frame hasn't been processed. In
that case a third buffer is allocated, even though it would be possible
to reuse the buffer that was just released.
The wl_display_dispatch_queue_pending() entry point is available from
wayland-client 1.0.2, so require that in configure.ac. Also, just
let the pkg-config macro throw its own error, which will show what version
we were looking for and failed to find.
Note: This is a candidate for stable branches.
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Kristian Høgsberg [Fri, 30 Nov 2012 18:29:17 +0000 (13:29 -0500)]
egl/wayland: Add invalidate back in eglSwapBuffers()
Commit
ca3ed3e024864e91ca3cccc59fb96950e1d079b5 fixed the problem where
eglMakeCurrent would trigger a getbuffer callback that then breaks the
following wl_egl_window_resize() call. However, we still need to
invalidate buffers in eglSwapBuffers, since in wayland we always swap
buffers, so the dri driver needs to come out and ask us for the next buffer
after each swapbuffer.
Note: this is a candidate for stable branches.
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Ander Conselvan de Oliveira [Fri, 30 Nov 2012 15:41:02 +0000 (17:41 +0200)]
egl/wayland: Don't invalidate drawable on swap buffers
We used to invalidate the drawable after a call to eglSwapBuffers(),
so that a wl_egl_window_resize() would take effect for the next frame.
However, that leads to calling dri2_get_buffers() when eglMakeCurrent()
is called with the current context and surface, and a later call to
wl_egl_window_resize() would not take effect until the next buffer
swap.
Instead, add a callback from wl_egl_window_resize() back to the wayland
egl platform, and invalidate the drawable only when it is resized.
This solves a bug on wayland clients when going back to windowed mode
from fullscreen when clicking a pop up menu, where the window size
after this would be the fullscreen size.
Note: this is a candidate for stable branches.
CC: wayland-devel@lists.freedesktop.org
Marek Olšák [Fri, 21 Dec 2012 19:34:52 +0000 (20:34 +0100)]
r600g: always use a tiled resource as the destination of MSAA resolve
i.e. we have to allocate a temporary tiled resource if dst isn't tiled.
This fixes hardlocks on r6xx-r7xx, though using a linear resource is forbidden
on later asics as well.
NOTE: This is a candidate for the stable branches.
(cherry picked from commit
9c6410e5c3ffc74564fae5afcc1b6982759cdd01)
Conflicts:
src/gallium/drivers/r600/r600_blit.c
src/gallium/drivers/r600/r600_texture.c
Marek Olšák [Wed, 19 Dec 2012 15:59:45 +0000 (16:59 +0100)]
r600g: try to fix streamout for the cases where BURST_COUNT > 0
The burst was incorrectly used, because ELEM_SIZE was always 0.
I don't know if the burst works, because I don't know of any test
which uses it.
NOTE: This is a candidate for the stable branches.
Reviewed-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit
6a2ec765bd22ae5d94e5fdac8507c659175efa4e)
Conflicts:
src/gallium/drivers/r600/r600_shader.c
Stefan Dösinger [Fri, 7 Dec 2012 16:38:35 +0000 (17:38 +0100)]
r300: Don't disable destination read if the src blend factor needs it
The read can remain disabled if the src alpha factor needs it because
the result would still be zero.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=57984
NOTE: This is a candidate for stable release branches.
Signed-off-by: Marek Olšák <maraeo@gmail.com>
(cherry picked from commit
ff5a9868c8d5041a3d944ce300c857934f4e8251)