OSDN Git Service

android-x86/external-mesa.git
8 years agocherry-ignore: add patch already in branch
Emil Velikov [Thu, 14 Jan 2016 17:38:21 +0000 (19:38 +0200)]
cherry-ignore: add patch already in branch

Marek's patch has landed in branch, yet the script still lists it.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agodocs: add sha256 checksums for 11.0.8
Emil Velikov [Mon, 21 Dec 2015 10:08:14 +0000 (10:08 +0000)]
docs: add sha256 checksums for 11.0.8

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agodocs: add release notes for 11.0.8
Emil Velikov [Mon, 21 Dec 2015 09:22:06 +0000 (09:22 +0000)]
docs: add release notes for 11.0.8

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agoUpdate version to 11.0.8
Emil Velikov [Mon, 21 Dec 2015 09:16:42 +0000 (09:16 +0000)]
Update version to 11.0.8

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agor600g: write all MRTs only if there is exactly one output (fixes a hang)
Marek Olšák [Fri, 18 Dec 2015 16:16:39 +0000 (17:16 +0100)]
r600g: write all MRTs only if there is exactly one output (fixes a hang)

This fixes a hang in
piglit/arb_blend_func_extended-fbo-extended-blend-pattern_gles2 on REDWOOD.

Cc: 11.0 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
(cherry-picked from commit b5b87c4ed1dfd58aec8905e0514c9ba92ba83e1d)

Conflicts:
src/gallium/drivers/r600/r600_shader.c

8 years agotgsi/scan: add flag colors_written
Marek Olšák [Thu, 10 Dec 2015 12:15:50 +0000 (13:15 +0100)]
tgsi/scan: add flag colors_written

This is a prerequisite for the following r600g fix.

Cc: 11.0 11.1 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit eb4813a9524e1a61f46bf45150adb1bd78564863)

8 years agoradeon/uvd: uv pitch separation for stoney
Boyuan Zhang [Thu, 12 Nov 2015 23:01:16 +0000 (18:01 -0500)]
radeon/uvd: uv pitch separation for stoney

v2: set the behaviour default for future ASICs.

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit f55f134a033a61d67c2a71bbe57f85eb3484eec1)

8 years agottn: add TEX2 support
Ilia Mirkin [Fri, 20 Nov 2015 21:51:07 +0000 (16:51 -0500)]
ttn: add TEX2 support

This fixes CubeArrayShadow tests (where the shadow comes in via a second
arg to the TEX2 instruction).

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit 4fd24caf92fc995e4a730181e0f179a7f2218e60)

8 years agoRevert "i965/vec4: Use byte offsets for UBO pulls on Sandy Bridge"
Emil Velikov [Sat, 19 Dec 2015 00:19:14 +0000 (00:19 +0000)]
Revert "i965/vec4: Use byte offsets for UBO pulls on Sandy Bridge"

This reverts commit 34cbde2e6320a55f54180e7f9f68db435b58e542.

As mentioned in the beginning of this revert series - let's pull the lot
out, as they cause regressions.

Additionally they are bugfixes (as opposed to regression fixes), which
if needed will need to be reworked.

8 years agoRevert "i965/fs: Use a stride of 1 and byte offsets for UBOs"
Emil Velikov [Sat, 19 Dec 2015 00:18:54 +0000 (00:18 +0000)]
Revert "i965/fs: Use a stride of 1 and byte offsets for UBOs"

This reverts commit 0ae22b3ebde780c2c88b5bfceaf172e311bd4742.

See the previous reverts.

8 years agoRevert "i965/vec4: Use a stride of 1 and byte offsets for UBOs"
Emil Velikov [Sat, 19 Dec 2015 00:18:07 +0000 (00:18 +0000)]
Revert "i965/vec4: Use a stride of 1 and byte offsets for UBOs"

This reverts commit 147c3fbdb3f779f5172304e3be10cc27e0e67be7.

See the previous reverts.

8 years agoRevert "i965/state: Get rid of dword_pitch arguments to buffer functions"
Emil Velikov [Sat, 19 Dec 2015 00:17:43 +0000 (00:17 +0000)]
Revert "i965/state: Get rid of dword_pitch arguments to buffer functions"

This reverts commit 683d65dae3e673ee95d544008874edf1255e87cf.

See previous commit.

8 years agoRevert "i965/nir: Remove unused indirect handling"
Emil Velikov [Sat, 19 Dec 2015 00:16:12 +0000 (00:16 +0000)]
Revert "i965/nir: Remove unused indirect handling"

This reverts commit 4acb394f459b58725a2059a911b6236703c44eb2.

As discussed with Jason on IRC. Earlier commit in the series, causes
regression, and "there's no point in having the others in there, if we
cannot get to the last patch."

8 years agoconfigura.ac: fix test for SSE4.1 assembler support
Oded Gabbay [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
configura.ac: fix test for SSE4.1 assembler support

This patch modifies the SSE4.1 test in configure.ac to use a global
variable to initialize vector variables. In addition, we now return the
value of the computation instead of 0.

This is done so gcc 4.9 (and lower) won't optimize the SSE4.1 assembly
instructions (when using -O1 and higher), because then the configure test
might incorrectly pass even though the assembler doesn't support the
SSE4.1 instructions (the test will pass because the compiler does support the intrinsics).

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91806
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit 6e44bbe0f5496b1aea2b4a29adae7990b62fda33)

8 years agoconfigure: check for python2.7 for PYTHON2
Jonathan Gray [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
configure: check for python2.7 for PYTHON2

Check for a 'python2.7' binary, 'python' and 'python2' are not
provided by the OpenBSD python 2.7.x packages.

Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit 4ef44bb484cbc0336d4fdcb8edce889ed1283732)

8 years agoconfigure.ac: use pkg-config for libelf
Jonathan Gray [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
configure.ac: use pkg-config for libelf

Use PKG_CHECK_MODULES to get the flags to link libelf

v2: keep AC_CHECK_LIB as a fallback for elfutils provided
libelf that doesn't install a pkg-config file.

Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
(cherry picked from commit 7f585a6a98d0553ec0ba48e18b1d9bac1256881a)
[Emil Velikov: squash trivial conflict]
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Conflicts:
src/gallium/targets/opencl/Makefile.am

8 years agonvc0: free memory allocated by the prog which reads MP perf counters
Samuel Pitoiset [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
nvc0: free memory allocated by the prog which reads MP perf counters

This fixes a long time ago memory leak (even before all my query
related changes).

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 9aca60bfb07d87d82aff943a23cfa693e2712528)

8 years agometa/generate_mipmap: Work-around GLES 1.x problem with GL_DRAW_FRAMEBUFFER
Ian Romanick [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
meta/generate_mipmap: Work-around GLES 1.x problem with GL_DRAW_FRAMEBUFFER

GL_DRAW_FRAMEBUFFER does not exist in OpenGL ES 1.x, and since
_mesa_meta_begin hasn't been called yet, we have to work-around API
difficulties.  The whole reason that GL_DRAW_FRAMEBUFFER is used instead
of GL_FRAMEBUFFER is that the read framebuffer may be different.  This
is moot in OpenGL ES 1.x.

I have another patch series that would also fix this (by removing the
calls to _mesa_BindFramebuffer and friends), but it's not quite ready
yet... and I think it may be a bit heavy for some stable branches.
Consider this a stop-gap fix.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93215
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
(cherry picked from commit 96dc732ed81f48d8bbc7aa6fb4d9c2833b691189)

8 years agoglsl: assign varying locations to tess shaders when doing SSO
Ilia Mirkin [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
glsl: assign varying locations to tess shaders when doing SSO

GRID Autosport uses SSO shaders. When a tessellation evaluation shader
is passed through this, it triggers assertion failures down the line
with unassigned varying locations. Make sure to do this when the first
shader in the pipeline is not a vertex shader.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit eca8f38dcffb700fdfe413a707d524e6a84bd453)

8 years agocherry-ignore: don't pick a specific i965 formats patch
Emil Velikov [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
cherry-ignore: don't pick a specific i965 formats patch

commit 839793680f9 "MESA_FORMAT_B8G8R8X8_SRGB for RGB visuals" causes a
handfull of regressions, some of which listed in fdo#92759.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agoi965: Add B8G8R8X8_SRGB to the alpha format override
Neil Roberts [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
i965: Add B8G8R8X8_SRGB to the alpha format override

brw_init_surface_formats overrides the render format for RGBX formats
which aren't supported for rendering so that they internally use RGBA
instead. However, B8G8R8X8_SRGB was missing so it wasn't marked as a
renderable format. This patch just adds it.

Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
Cc: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit 43f4be5f06b7a96b96a3a7b43f5112139a1f423a)

8 years agoi965: Add MESA_FORMAT_B8G8R8X8_SRGB to brw_format_for_mesa_format
Neil Roberts [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
i965: Add MESA_FORMAT_B8G8R8X8_SRGB to brw_format_for_mesa_format

This will be used in a subsequent patch as the format for RGB visuals.

Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
Cc: Ilia Mirkin <imirkin@alum.mit.edu>
Suggested-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit c769efda939e06338d41e1046a5f954c690951d5)

8 years agonv50/ir: can't have predication and immediates
Ilia Mirkin [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
nv50/ir: can't have predication and immediates

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 6aca7fecb7f7b6c67cf0315e781060a8d1d4b704)

8 years agogallium/radeon: fix Hyper-Z hangs by programming PA_SC_MODE_CNTL_1 correctly
Marek Olšák [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
gallium/radeon: fix Hyper-Z hangs by programming PA_SC_MODE_CNTL_1 correctly

This is the recommended setting according to hw people and it makes Hyper-Z
stable. Just the two magic states.

This fixes Evergreen, Cayman, SI, CI, VI (using the Cayman code).

Cc: 11.0 11.1 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit d3c08309abd17b6e0d466b677af57e3cc74b0e00)
[Emil Velikov: s/radeon_set_context_reg/r600_write_context_reg/g]
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Conflicts:
src/gallium/drivers/r600/evergreen_state.c
src/gallium/drivers/radeon/cayman_msaa.c

8 years agoradeonsi: apply the streamout workaround to Fiji as well
Marek Olšák [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
radeonsi: apply the streamout workaround to Fiji as well

Cc: 11.0 11.1 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 787ada6bf65a58b1bab5a30be86698e9b7b0797e)

8 years agoradeonsi: don't call of u_prims_for_vertices for patches and rectangles
Marek Olšák [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
radeonsi: don't call of u_prims_for_vertices for patches and rectangles

Both caused a crash due to a division by zero in that function.
This is an alternative fix.

Cc: 11.0 11.1 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
(cherry picked from commit 0f9519b938d78ac55e8e5fdad5727a79baf18d42)

8 years agomesa/shader: return correct attribute location for double matrix arrays
Dave Airlie [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
mesa/shader: return correct attribute location for double matrix arrays

If we have a dmat2[4], then dmat2[0] is at 17, dmat2[1] at 19,
dmat2[2] at 21 etc. The old code was returning 17,18,19.

I think this code is also wrong for float matricies as well.

There is now a piglit for the float case.

This partly fixes:
GL41-CTS.vertex_attrib_64bit.limits_test

[airlied: update with Tapani suggestion to clean it up].

Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 18ad641c3b2e926b8b3e2bd1df31fa739624cbe4)

8 years agogallium/util: return correct number of bound vertex buffers
Patrick Rudolph [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
gallium/util: return correct number of bound vertex buffers

In case a state tracker unbinds every slot by a seperate
pipe->set_vertex_buffers() call, starting from slot zero, the number
of bound buffers would not reach zero at all.
The current algorithm does not account for pre-existing holes in the
buffer list.

Unbinding all buffers at once or starting at the top-most slot results
in correct behaviour.

Calculating the correct number of bound buffers fixes a NULL pointer
dereference in nvc0_validate_vertex_buffers_shared().

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93004
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 79bff488bc23b8615cc37069b6c5914c56be835f)

8 years agomesa/varray: set double arrays to non-normalised.
Dave Airlie [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
mesa/varray: set double arrays to non-normalised.

Doesn't have any effect in practice I don't think, but
CTS reads back using GetVertexAttrib.

This fixes: GL41-CTS.vertex_attrib_64bit.get_vertex_attrib

Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 21abaad8fe7b5bf78737b9cf009548f41e4777b9)

8 years agonv50,nvc0: fix use-after-free when vertex buffers are unbound
Patrick Rudolph [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
nv50,nvc0: fix use-after-free when vertex buffers are unbound

Always reset the vertex bufctx to make sure there's no pointer to
an already freed pipe_resource left after unbinding buffers.
Fixes use after free crash in nvc0_bufctx_fence().

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93004
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
[imirkin: simplify nvc0 fix, apply to nv50]
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 432a798cf5c7fab18a3e32d4073840df7d0d37cb)

8 years agoi965: Resolve color and flush for all active shader images in intel_update_state().
Francisco Jerez [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
i965: Resolve color and flush for all active shader images in intel_update_state().

Fixes arb_shader_image_load_store/execution/load-from-cleared-image.shader_test.

Couldn't reproduce any significant FPS regression in CPU-bound
benchmarks from the Finnish benchmarking system on neither VLV nor BSW
after 30 runs with 95% confidence level.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92849
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jason Ekstrand <jason.ekstrand@intel.com>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
Tested-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
(cherry picked from commit 595c8180714da1d97be445b9a66affa1dfea39f6)

8 years agoradeonsi: handle doubles in lds load path.
Dave Airlie [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
radeonsi: handle doubles in lds load path.

This handles loading doubles from LDS properly.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Cc: "11.0 11.1" <mesa-stable@lists.fedoraproject.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 8c9e40ac22ce5a60753172a8f95a120d84a3ec4c)

8 years agor600: handle geometry dynamic input array index
Dave Airlie [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
r600: handle geometry dynamic input array index

This fixes:
glsl-1.50/execution/geometry/dynamic_input_array_index.shader_test
my profanity.

We need to load the AR register with the value from the index reg

Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit cce3864046be104933fd4f1bb7a4b36092ff4925)

8 years agor600g: fix geom shader input indirect indexing.
Dave Airlie [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
r600g: fix geom shader input indirect indexing.

This fixes:
gs-input-array-vec4-index-rd

The others run out of gprs unfortunately.

Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 38542921c785efb37bae88db409d278990684fa4)

8 years agor600/shader: add utility functions to do single slot arithmatic
Dave Airlie [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
r600/shader: add utility functions to do single slot arithmatic

These utilities are to be used to do things like integer adds and
multiplies to be used in calculating the LDS offsets etc.

It handles CAYMAN MULLO differences as well.

Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 0696ebc899d3aa125ae85b757c5fba137617ecaa)
[Emil Velikov: requred by the next commit]
Nominated-by: Emil Velikov <emil.velikov@collabora.com>
8 years agor600/shader: split address get out to a function.
Dave Airlie [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
r600/shader: split address get out to a function.

This will be used in the tess shaders.

Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 4d64459a92a4c1a64fb7051fd1320c14c1854dcb)
[Emil Velikov: required by the commit after the next one]
Nominated-by: Emil Velikov <emil.velikov@collabora.com>
8 years agonv50/ir: fix cutoff for using r63 vs r127 when replacing zero
Ilia Mirkin [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
nv50/ir: fix cutoff for using r63 vs r127 when replacing zero

The only effect here is a space savings - 822 programs in shader-db
affected with the following overall change:

total bytes used in shared programs   : 44154976 -> 44139880 (-0.03%)

Fixes: 641eda0c (nv50/ir: r63 is only 0 if we are using less than 63 registers)
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit f920f8eb026d39c0adb547a90399e76b8351fec6)

8 years agoglsl: Allow binding of image variables with 420pack.
Matt Turner [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
glsl: Allow binding of image variables with 420pack.

This interaction was missed in the addition of ARB_image_load_store.

Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93266
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit c200e606f7348a6d75e4cf72fb538f5d78d67649)

8 years agoi965/nir: Remove unused indirect handling
Jason Ekstrand [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
i965/nir: Remove unused indirect handling

The one and only place where the FS backend allows reladdr is on uniforms.
For locals, inputs, and outputs, we lower it away before the backend ever
sees it.  This commit gets rid of the dead indirect handling code.

Cc: "11.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit 22c273de2b97743587310f7bbf66767191bde866)
[Emil Velikov: squash trivial conflicts]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Conflicts:
src/mesa/drivers/dri/i965/brw_fs_nir.cpp

8 years agoi965/state: Get rid of dword_pitch arguments to buffer functions
Jason Ekstrand [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
i965/state: Get rid of dword_pitch arguments to buffer functions

Cc: "11.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit abb569ca18db159ae3e4c4b51d01e5a8b3215e04)
[Emil Velikov: drop hunks for missing functions, drop gen7_cs_state.c]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Conflicts:
src/mesa/drivers/dri/i965/brw_context.h
src/mesa/drivers/dri/i965/brw_wm_surface_state.c
src/mesa/drivers/dri/i965/gen7_cs_state.c

8 years agoi965/vec4: Use a stride of 1 and byte offsets for UBOs
Jason Ekstrand [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
i965/vec4: Use a stride of 1 and byte offsets for UBOs

Cc: "11.0" <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92909
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit 05bdc21f84edc200a0b0a695b79d12f25cc00645)
[Emil Velikov: s/brw_imm_ud/src_reg/g;s/brw_imm_d/src_reg/]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Conflicts:
src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp

8 years agoi965/fs: Use a stride of 1 and byte offsets for UBOs
Jason Ekstrand [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
i965/fs: Use a stride of 1 and byte offsets for UBOs

Cc: "11.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit 13ad8d03f201a4d09bf7ab9078b00807d61dfada)
[Emil Velikov]
 - s/const_offset_reg.ud/const_offset_reg.fixed_hw_reg.dw1.ud/
 - s/brw_imm_ud/fs_reg/

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Conflicts:
src/mesa/drivers/dri/i965/brw_fs.cpp
src/mesa/drivers/dri/i965/brw_fs_nir.cpp

8 years agoi965/vec4: Use byte offsets for UBO pulls on Sandy Bridge
Jason Ekstrand [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
i965/vec4: Use byte offsets for UBO pulls on Sandy Bridge

Previously, the VS_OPCODE_PULL_CONSTANT_LOAD opcode operated on
vec4-aligned byte offsets on Iron Lake and below and worked in terms of
vec4 offsets on Sandy Bridge.  On Ivy Bridge, we add a new *LOAD_GEN7
variant which works in terms of vec4s.  We're about to change the GEN7
version to work in terms of bytes, so this is a nice unification.

Cc: "11.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit e3e70698c3cfa7e9acccd6eddfb37516c45d5ac2)
[Emil Velikov: s/brw_imm_ud/src_reg/g ,s/offset.ud/offset.dw1.ud/ ]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agogk110/ir: fix imad sat/hi flag emission for immediate args
Ilia Mirkin [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
gk110/ir: fix imad sat/hi flag emission for immediate args

According to nvdisasm both the immediate and non-imm cases use the same
bits. Both of these flags are quite rarely set though.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 1d708aacb7631833b0f04e704481854428f60ba3)

8 years agogk104/ir: sampler doesn't matter for txf
Ilia Mirkin [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
gk104/ir: sampler doesn't matter for txf

We actually leave the sampler unset for OP_TXF, which caused the GK104+
logic to treat some texel fetches as indirect. While this works, it's
incredibly wasteful. This only happened when the texture was > 0 (since
sampler remained == 0).

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 63b850403c90f33c295d3ad6be4ad749d4ea6274)

8 years agogk110/ir: fix imul hi emission with limm arg
Ilia Mirkin [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
gk110/ir: fix imul hi emission with limm arg

The elemental demo hits this case.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit db072d20867426958153279575dfdc2049b5f595)

8 years agonv50/ir: avoid looking at uninitialized srcMods entries
Ilia Mirkin [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
nv50/ir: avoid looking at uninitialized srcMods entries

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 2b98914fe01f1c7b2de8a096c8923b3ab0a69578)

8 years agonv50/ir: fix DCE to not generate 96-bit loads
Ilia Mirkin [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
nv50/ir: fix DCE to not generate 96-bit loads

A situation where there's a 128-bit load where the last component gets
DCE'd causes a 96-bit load to be generated, which no GPU can actually
emit. Avoid generating such instructions by scaling back to 64-bit on
the first load when splitting.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 49692f86a1b77fac4634d2a3f0502ec7451c3435)

8 years agoradeonsi: fix Fiji for LLVM <= 3.7
Marek Olšák [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
radeonsi: fix Fiji for LLVM <= 3.7

Cc: 11.0 11.1 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit dd27825c8cf0e7b55ebaa139e299f275943d22f6)

8 years agoi965: use _Shader to get fragment program when updating surface state
Tapani Pälli [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
i965: use _Shader to get fragment program when updating surface state

Atomic counters and Images were using ctx::Shader that does not take in
to account program pipeline changes, ctx::_Shader must be used for SSO to
work. Commit c0347705 already changed ubo's to use this.

Fixes failures seen with following Piglit test:
arb_separate_shader_object-atomic-counter

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 231db5869c2c0f32608f39100bffff569da21bea)

8 years agonv50/ir: don't forget to mark flagsDef on cvt in txb lowering
Ilia Mirkin [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
nv50/ir: don't forget to mark flagsDef on cvt in txb lowering

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 101e315cc167b0b00319aa70f64c49470e2525f8)

8 years agonv50/ir: fix instruction permutation logic
Ilia Mirkin [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
nv50/ir: fix instruction permutation logic

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 06055121e6386bc74e4558a86ef690eae9556482)

8 years agonv50/ir: the mad source might not have a defining instruction
Ilia Mirkin [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
nv50/ir: the mad source might not have a defining instruction

For example if it's $r63 (aka 0), there won't be a definition.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 11fcf46590129abfa2ca2117a320e8a8052761e4)

8 years agonv50/ir: deal with loops with no breaks
Ilia Mirkin [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
nv50/ir: deal with loops with no breaks

For example if there are only returns, the break bb will not end up part
of the CFG. However there will have been a prebreak already emitted for
it, and when hitting the RET that comes after, we will try to insert the
current (i.e. break) BB into the graph even though it will be
unreachable. This makes the SSA code sad.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit adcc547bfbef362067bb3b4e3aee75b287bc6189)

8 years agonvc0/ir: fold postfactor into immediate
Ilia Mirkin [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
nvc0/ir: fold postfactor into immediate

SM20-SM50 can't emit a post-factor in the presence of a long immediate.
Make sure to fold it in.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit ff61ac48387d3f42ede50a572c11f404f4cd3abb)

8 years agor600: SMX returns CONTEXT_DONE early workaround
Dave Airlie [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
r600: SMX returns CONTEXT_DONE early workaround

streamout, gs rings bug on certain r600s, requires a wait idle
before each surface sync.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Cc: "10.6 11.0 11.1" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit af4013d26b3203a794ae34fe0c98139bc1058273)
[Emil Velikov: s/radeon_set_config_reg/r600_write_config_reg/g ]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agor600: do SQ flush ES ring rolling workaround
Dave Airlie [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
r600: do SQ flush ES ring rolling workaround

Need to insert a SQ_NON_EVENT when ever geometry
shaders are enabled.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Cc: "10.6 11.0 11.1" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit b63944e8b9177d231b3789bf84ea9e67b9629905)

8 years agoi965: Fix scalar vertex shader struct outputs.
Kenneth Graunke [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
i965: Fix scalar vertex shader struct outputs.

While we correctly set output[] for composite varyings, we set completely
bogus values for output_components[], making emit_urb_writes() output
zeros instead of the actual values.

Unfortunately, our simple approach goes out the window, and we need to
recurse into structs to get the proper value of vector_elements for each
field.

Together with the previous patch, this fixes rendering in an upcoming
game from Feral Interactive.

v2: Use pointers instead of pass-by-mutable-reference (Jason, Matt).

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
(cherry picked from commit 3810c1561401aba336765d64d1a5a3e44eb58eb3)

8 years agoi965: Fix fragment shader struct inputs.
Kenneth Graunke [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
i965: Fix fragment shader struct inputs.

Apparently we have literally no support for FS varying struct inputs.
This is somewhat surprising, given that we've had tests for that very
feature that have been passing for a long time.

Normally, varying packing splits up structures for us, so we don't see
them in the backend.  However, with SSO, varying packing isn't around
to save us, and we get actual structs that we have to handle.

This patch changes fs_visitor::emit_general_interpolation() to work
recursively, properly handling nested structs/arrays/and so on.
(It's easier to read with diff -b, as indentation changes.)

When using the vec4 VS backend, this fixes rendering in an upcoming
game from Feral Interactive.  (The scalar VS backend requires additional
bug fixes in the next patch.)

v2: Use pointers instead of pass-by-mutable-reference (Jason, Matt)

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
(cherry picked from commit 3e9003e9cf55265ab1fb6522dc5cbb2f455ea1f9)

8 years agoradeonsi: fix a hang due to uninitialized border color registers
Marek Olšák [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
radeonsi: fix a hang due to uninitialized border color registers

Just point the hw to valid memory.

This fixes hangs in piglit/depthstencil-render-miplevel tests.
What's even more bizzare is that the hanging tests report "skip".

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
8 years agoradeonsi: fix occlusion queries on Fiji
Marek Olšák [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
radeonsi: fix occlusion queries on Fiji

Tested.

(cherry picked from commit bfc14796b077444011c81f544ceec5d8592c5c77)

8 years agoradeonsi/compute: Use the compiler's COMPUTE_PGM_RSRC* register values
Tom Stellard [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
radeonsi/compute: Use the compiler's COMPUTE_PGM_RSRC* register values

The compiler has more information and is able to optimize the bits
it sets in these registers.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
CC: <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 89851a296536b89364fe6104d13330975788f960)
[Emil Velikov: squash trivial conflict]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Conflicts:
src/gallium/drivers/radeonsi/si_compute.c

8 years agoradeonsi: Rename si_shader::ls_rsrc{1,2} to si_shader::rsrc{1,2}
Tom Stellard [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
radeonsi: Rename si_shader::ls_rsrc{1,2} to si_shader::rsrc{1,2}

In the future, these will be used by other shaders types.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit 95e051091676584fd7bfba9d0316c3747bf17f35)
[Emil Velikov: squash trivial conflicts]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Conflicts:
src/gallium/drivers/radeonsi/si_state_draw.c
src/gallium/drivers/radeonsi/si_state_shaders.c

8 years agofreedreno/a4xx: point regid to "red" even for alpha-only rb formats
Ilia Mirkin [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
freedreno/a4xx: point regid to "red" even for alpha-only rb formats

Looks like a4xx hw does this in a more standard way and we don't need to
hack around it like we do on a3xx. Fixes GL_ALPHA formats in
fbo-blending-formats, fbo-colormask-formats, and fbo-alphatest-formats.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit ff9450ecd1f7635f8917e3177f0ef18eb8f9f49b)
[Emil Velikov: squash trivial conflict]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Conflicts:
src/gallium/drivers/freedreno/a4xx/fd4_program.c

8 years agofreedreno/a4xx: fix 5_5_5_1 texture sampler format
Ilia Mirkin [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
freedreno/a4xx: fix 5_5_5_1 texture sampler format

This fixes teximage-colors, fbo-generatemipmap-formats, and probably
others (in relation to the RGB5 formats, others still fail).

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit 769b3ab6c5111f50502f9df0e8930c8d13f475c7)

8 years agofreedreno/a4xx: support lod_bias
Ilia Mirkin [Fri, 18 Dec 2015 12:25:53 +0000 (12:25 +0000)]
freedreno/a4xx: support lod_bias

The lower layers assume that we support this, and it's been core since
GL 1.4. This fixes a slew of piglit tests, especially around
tex-miplevel-selection.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit 0a4462ad6ee921ed805ad51e330b819b95ee90d6)

8 years agodocs: add sha256 checksums for 11.0.7
Emil Velikov [Wed, 9 Dec 2015 16:09:37 +0000 (16:09 +0000)]
docs: add sha256 checksums for 11.0.7

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agodocs: add release notes for 11.0.7
Emil Velikov [Wed, 9 Dec 2015 15:19:30 +0000 (15:19 +0000)]
docs: add release notes for 11.0.7

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agoUpdate version to 11.0.7
Emil Velikov [Wed, 9 Dec 2015 15:13:37 +0000 (15:13 +0000)]
Update version to 11.0.7

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agomesa; add get-extra-pick-list.sh script into bin/
Emil Velikov [Wed, 2 Sep 2015 16:36:22 +0000 (17:36 +0100)]
mesa; add get-extra-pick-list.sh script into bin/

This is a very rudimentary script that checks if any of the applied
cherry-picks have been referenced (fixed?) by another patch. With the
latter either missing the stable tag or hasn't yet been picked.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
8 years agonvc0/ir: start offset at texBindBase for txq, like regular texturing
Ilia Mirkin [Fri, 11 Sep 2015 03:58:17 +0000 (23:58 -0400)]
nvc0/ir: start offset at texBindBase for txq, like regular texturing

Curiously this has no actual effect. I think it's because the first 8
textures are bound in multiple slots for some reason. However seems
prudent to use these the same way as regular texturing, esp in the case
where there are more than 8 textures bound.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
(cherry picked from commit 5877a594d54fdd2b3aa329f4d35b3491a7ee8a33)
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93110

8 years agoradeon/vce: disable Stoney VCE for 11.0
Leo Liu [Fri, 20 Nov 2015 17:07:52 +0000 (12:07 -0500)]
radeon/vce: disable Stoney VCE for 11.0

Signed-off-by: Leo Liu <leo.liu@amd.com>
Cc: "11.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
8 years agoxmlconfig: Add support for DragonFly
François Tigeot [Tue, 17 Nov 2015 17:54:01 +0000 (18:54 +0100)]
xmlconfig: Add support for DragonFly

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
(cherry picked from commit 8a94ba5e0cb738c6b1a817ea54afc5816d2bb596)

8 years agoegl/wayland: Ignore rects from SwapBuffersWithDamage
Daniel Stone [Sat, 7 Nov 2015 18:25:31 +0000 (18:25 +0000)]
egl/wayland: Ignore rects from SwapBuffersWithDamage

eglSwapBuffersWithDamage accepts damage-region rectangles to hint the
compositor that it only needs to redraw certain areas, which was passed
through the wl_surface_damage request, as designed.

Wayland also offers a buffer transformation interface, e.g. to allow
users to render pre-rotated buffers. Unfortunately, there is no way to
query buffer transforms, and the damage region was provided in surface,
rather than buffer, co-ordinate space.

Users could in theory account for this themselves, but EGL also requires
co-ordinates to be passed in GL/mathematical co-ordinate space, with an
inversion to Wayland's natural/scanout co-ordinate space, so
transformations other than a 180-degree rotation will fail as EGL
attempts to subtract the region from (its view of the) surface height.

Pending creation and acceptance of a wl_surface.buffer_damage request,
which will accept co-ordinates in buffer co-ordinate space, pessimise to
always sending full-surface damage.

bce64c6c provides the explanation for why we send maximum-range damage,
rather than the full size of the surface: in the presence of buffer
transformations, full-surface damage may not actually cover the entire
surface.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
(cherry picked from commit d1314de293e9e4a63c35f094c3893aaaed8580b4)

8 years agoautomake: fix some occurrences of hardcoded -ldl and -lpthread
Jonathan Gray [Mon, 23 Nov 2015 03:22:24 +0000 (14:22 +1100)]
automake: fix some occurrences of hardcoded -ldl and -lpthread

Correct some occurrences of -ldl and -lpthread to use
$(DLOPEN_LIBS) and $(PTHREAD_LIBS) respectively.

Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
(cherry picked from commit 99cd60083518ad4465e3e29996168e8fa8a89fbb)
[Emil Velikov: drop the unneeded i965 hunk]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agor600: workaround empty geom shader.
Dave Airlie [Tue, 24 Feb 2015 04:09:40 +0000 (14:09 +1000)]
r600: workaround empty geom shader.

We need to emit at least one cut/emit in every
geometry shader, the easiest workaround it to
stick a single CUT at the top of each geom shader.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Cc: "10.6 11.0 11.1" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 4f347225752b48f3dc5a59a6be71fe78616252a7)
[Emil Velikov: squash trivial conflict]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Conflicts:
src/gallium/drivers/r600/r600_shader.c

8 years agor600: rv670 use at least 16es/gs threads
Dave Airlie [Tue, 24 Feb 2015 06:30:05 +0000 (16:30 +1000)]
r600: rv670 use at least 16es/gs threads

This is specified in the docs for rv670 to work properly.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Cc: "10.6 11.0 11.1" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 04efcc6c7adfda75b425f443588f0faab453ba3a)

8 years agor600: geometry shader gsvs itemsize workaround
Dave Airlie [Wed, 18 Feb 2015 23:51:19 +0000 (23:51 +0000)]
r600: geometry shader gsvs itemsize workaround

On some chips the GSVS itemsize needs to be aligned to a cacheline size.

This only applies to some of the r600 family chips.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Cc: "10.6 11.0 11.1" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 8168dfdd4e63457bd8a9ef04a5d49a1f2e202ab8)

8 years agogles2: Update gl2ext.h to revision: 32120
Marta Lofstedt [Fri, 27 Nov 2015 14:31:05 +0000 (15:31 +0100)]
gles2: Update gl2ext.h to revision: 32120

This is needed to be able to implement the accepted OES
extensions.

Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Marta Lofstedt <marta.lofstedt@linux.intel.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
(cherry picked from commit 1d5b88e33b07bc26d612720e6cb197a6917ba75f)

8 years agomesa: support GL_RED/GL_RG in ES2 contexts when driver support exists
Ilia Mirkin [Thu, 26 Nov 2015 15:32:57 +0000 (10:32 -0500)]
mesa: support GL_RED/GL_RG in ES2 contexts when driver support exists

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93126
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 0396eaaf80c5d7955d7926c4e448f006c7682d2e)

8 years agotexgetimage: consolidate 1D array handling code.
Dave Airlie [Wed, 11 Nov 2015 02:33:38 +0000 (12:33 +1000)]
texgetimage: consolidate 1D array handling code.

This should fix the getteximage-depth test that currently asserts.

I was hitting problem with virgl as well in this area.

This moves the 1D array handling code to a single place.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ben Skeggs <bskeggs@redhat.com>
Cc: "10.6 11.0 11.1" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 237bcdbab529237a120e225c63f567934a955523)

8 years agonv50/ir: fix (un)spilling of 3-wide results
Ilia Mirkin [Sat, 18 Apr 2015 19:00:45 +0000 (15:00 -0400)]
nv50/ir: fix (un)spilling of 3-wide results

There is no 96-bit load/store operations, so we have to split it up
into a 32-bit parts, with a split/merge around it.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90348
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 4deb118d06e96731f3481daa72c201d7258bfbbb)

8 years agonv50,nvc0: properly handle buffer storage invalidation on dsa buffer
Ilia Mirkin [Mon, 23 Nov 2015 02:08:16 +0000 (21:08 -0500)]
nv50,nvc0: properly handle buffer storage invalidation on dsa buffer

In case that the buffer has no bind at all, assume it can be a regular
buffer. This can happen on buffers created through the ARB_dsa
interfaces.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit ad5f6b03e793b9390e3b9f3eca68bd43f9d809eb)

8 years agonouveau: use the buffer usage to determine placement when no binding
Ilia Mirkin [Mon, 23 Nov 2015 01:58:56 +0000 (20:58 -0500)]
nouveau: use the buffer usage to determine placement when no binding

With ARB_direct_state_access, buffers can be created without any binding
hints at all. We still need to allocate these buffers to VRAM or GART,
as we don't have logic down the line to place them into GPU-mappable
space. Ideally we'd be able to shift these things around based on usage.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92438
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 079f713754a9e5d7802b655d54320bd37f24fbfa)

8 years agoglsl: Fix off-by-one error in array size check assertion
Ian Romanick [Wed, 18 Nov 2015 02:35:00 +0000 (18:35 -0800)]
glsl: Fix off-by-one error in array size check assertion

Apparently, this has been a bug since 2010 (c30f6e5d).

Also use ARRAY_SIZE instead of open coding it.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit 2f554761536bbfd0d8ec22e807c18bd6df0f22b8)

8 years agonir: fix typo in idiv lowering, causing large-udiv-udiv failures
Ilia Mirkin [Sun, 8 Nov 2015 18:43:07 +0000 (13:43 -0500)]
nir: fix typo in idiv lowering, causing large-udiv-udiv failures

In nv50, and in the python script that Rob circulated, we do:

   bld.mkCmp(OP_SET, CC_GE, TYPE_U32, (s = bld.getSSA()), TYPE_U32, m, b);

Do the same in the nir div lowering pass. This fixes the large-udiv-udiv
piglit tests on freedreno.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Rob Clark <robclark@freedesktop.org>
(cherry picked from commit b40e144a665142957a7ae027238e61fd01a27ebc)

8 years agollvmpipe: disable VSX in ppc due to LLVM PPC bug
Oded Gabbay [Tue, 17 Nov 2015 14:16:46 +0000 (16:16 +0200)]
llvmpipe: disable VSX in ppc due to LLVM PPC bug

This patch disables the use of VSX instructions, as they cause some
piglit tests to fail

For more details, see: https://llvm.org/bugs/show_bug.cgi?id=25503#c7

With this patch, ppc64le reaches parity with x86-64 as far as piglit test
suite is concerned.

v2:
- Added check that we have at least LLVM 3.4
- Added the LLVM bug URL as a comment in the code

v3:

- Only disable VSX if Altivec is supported, because if Altivec support
is missing, then VSX support doesn't exist anyway.

- Change original patch description.

Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Cc: "11.0" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
(cherry picked from commit 4581f8428e0e1d2f6787d0765823c7883bd2cfcd)

8 years agonvc0/ir: actually emit AFETCH on kepler
Ilia Mirkin [Wed, 18 Nov 2015 19:23:35 +0000 (14:23 -0500)]
nvc0/ir: actually emit AFETCH on kepler

Looks like this was forgotten in the commit which added the AFETCH
logic.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit 8e68113c1a78c48f26e820f4beb2dda9e4b99f32)

8 years agometa/generate_mipmap: Don't leak the framebuffer object
Ian Romanick [Sat, 14 Nov 2015 00:09:37 +0000 (16:09 -0800)]
meta/generate_mipmap: Don't leak the framebuffer object

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Cc: "10.6 11.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 72e232374eda780a5dcd374b55d203d0e2a6d02b)

8 years agoget-pick-list.sh: Require explicit "11.0" for nominating stable patches
Emil Velikov [Thu, 3 Dec 2015 15:17:32 +0000 (15:17 +0000)]
get-pick-list.sh: Require explicit "11.0" for nominating stable patches

A nomination unadorned with a specific version is now interpreted as
being aimed at the 11,0 branch, which was recently opened.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
8 years agometa/TexSubImage: Don't pollute the buffer object namespace
Ian Romanick [Mon, 9 Nov 2015 21:11:02 +0000 (13:11 -0800)]
meta/TexSubImage: Don't pollute the buffer object namespace

tl;dr: For many types of GL object, we can *NEVER* use the Gen function.

In OpenGL ES (all versions!) and OpenGL compatibility profile,
applications don't have to call Gen functions.  The GL spec is very
clear about how you can mix-and-match generated names and non-generated
names: you can use any name you want for a particular object type until
you call the Gen function for that object type.

Here's the problem scenario:

 - Application calls a meta function that generates a name.  The first
   Gen will probably return 1.

 - Application decides to use the same name for an object of the same
   type without calling Gen.  Many demo programs use names 1, 2, 3,
   etc. without calling Gen.

 - Application calls the meta function again, and the meta function
   replaces the data.  The application's data is lost, and the app
   fails.  Have fun debugging that.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92363
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
(cherry picked from commit 58aa56d40bfc6ba54ad9172bf219d18eeb615a80)

8 years agometa: Don't pollute the buffer object namespace in _mesa_meta_DrawTex
Ian Romanick [Thu, 5 Nov 2015 22:44:26 +0000 (14:44 -0800)]
meta: Don't pollute the buffer object namespace in _mesa_meta_DrawTex

tl;dr: For many types of GL object, we can *NEVER* use the Gen function.

In OpenGL ES (all versions!) and OpenGL compatibility profile,
applications don't have to call Gen functions.  The GL spec is very
clear about how you can mix-and-match generated names and non-generated
names: you can use any name you want for a particular object type until
you call the Gen function for that object type.

Here's the problem scenario:

 - Application calls a meta function that generates a name.  The first
   Gen will probably return 1.

 - Application decides to use the same name for an object of the same
   type without calling Gen.  Many demo programs use names 1, 2, 3,
   etc. without calling Gen.

 - Application calls the meta function again, and the meta function
   replaces the data.  The application's data is lost, and the app
   fails.  Have fun debugging that.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92363
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
(cherry picked from commit 76cfe2bc4436186fd585be96c4f402c1b1c79bdf)

8 years agometa: Use internal functions for buffer object and VAO access in _mesa_meta_DrawTex
Ian Romanick [Thu, 5 Nov 2015 22:42:07 +0000 (14:42 -0800)]
meta: Use internal functions for buffer object and VAO access in _mesa_meta_DrawTex

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
(cherry picked from commit a222d4cbc3de49857aebbdf727e53c273abcc6c1)

8 years agometa: Track VBO using gl_buffer_object instead of GL API object handle in _mesa_meta_...
Ian Romanick [Thu, 5 Nov 2015 22:31:23 +0000 (14:31 -0800)]
meta: Track VBO using gl_buffer_object instead of GL API object handle in _mesa_meta_DrawTex

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
(cherry picked from commit b8a7369fb7e5773892d01fcb1140fe6569ee27eb)

8 years agometa: Partially convert _mesa_meta_DrawTex to DSA
Ian Romanick [Thu, 5 Nov 2015 22:16:31 +0000 (14:16 -0800)]
meta: Partially convert _mesa_meta_DrawTex to DSA

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
(cherry picked from commit d5225ee5d92f00958c54b425fe829c811149e889)

8 years agometa: Don't pollute the buffer object namespace in _mesa_meta_setup_vertex_objects
Ian Romanick [Wed, 4 Nov 2015 01:41:16 +0000 (17:41 -0800)]
meta: Don't pollute the buffer object namespace in _mesa_meta_setup_vertex_objects

tl;dr: For many types of GL object, we can *NEVER* use the Gen function.

In OpenGL ES (all versions!) and OpenGL compatibility profile,
applications don't have to call Gen functions.  The GL spec is very
clear about how you can mix-and-match generated names and non-generated
names: you can use any name you want for a particular object type until
you call the Gen function for that object type.

Here's the problem scenario:

 - Application calls a meta function that generates a name.  The first
   Gen will probably return 1.

 - Application decides to use the same name for an object of the same
   type without calling Gen.  Many demo programs use names 1, 2, 3,
   etc. without calling Gen.

 - Application calls the meta function again, and the meta function
   replaces the data.  The application's data is lost, and the app
   fails.  Have fun debugging that.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92363
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
(cherry picked from commit 37d11b13ce1db2ad867ff5433cb31bcd1d93c7bf)

8 years agometa: Use internal functions for buffer object and VAO access
Ian Romanick [Wed, 4 Nov 2015 00:47:22 +0000 (16:47 -0800)]
meta: Use internal functions for buffer object and VAO access

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
(cherry picked from commit b1b73a42c8f245d5bf6bbed04071b2c6519b2fb4)

8 years agometa: Use DSA functions for VBOs in _mesa_meta_setup_vertex_objects
Ian Romanick [Tue, 3 Nov 2015 23:55:14 +0000 (15:55 -0800)]
meta: Use DSA functions for VBOs in _mesa_meta_setup_vertex_objects

The fixed-function attribute paths don't get the DSA treatment because
there are no DSA entry-points for fixed-function attributes.  These
could have been added, but this is a temporary patch intended to make
later patches easier to review.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
(cherry picked from commit 52921f8e089abbc6871060fc50f90b62aaf1e11b)

8 years agometa: Track VBO using gl_buffer_object instead of GL API object handle
Ian Romanick [Tue, 3 Nov 2015 23:37:40 +0000 (15:37 -0800)]
meta: Track VBO using gl_buffer_object instead of GL API object handle

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
(cherry picked from commit 1035e00a815f0babddac0c6c43d01fd34f7e8a94)

8 years agometa: Don't leave the VBO bound after _mesa_meta_setup_vertex_objects
Ian Romanick [Tue, 3 Nov 2015 04:11:02 +0000 (20:11 -0800)]
meta: Don't leave the VBO bound after _mesa_meta_setup_vertex_objects

Meta currently does this, but future changes will make this impossible.
Explicitly do it as a step in the patch series now to catch any possible
kinks.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
(cherry picked from commit 3b5a7d450dea9bfadf1d72338f4418c87340805b)