OSDN Git Service

android-x86/external-mesa.git
4 years agoradv/winsys: set IB flags prior to submit in the sysmem path
Florian Will [Mon, 27 Jan 2020 09:30:21 +0000 (10:30 +0100)]
radv/winsys: set IB flags prior to submit in the sysmem path

This fixes missing scene objects in ZUSI 3 + dxvk. Index / vertex buffer
upload using thousands of CopyBuffer commands in one huge Vulkan command
buffer, mixed with lots of render pass begin/end and draw calls, failed
for some of the buffers.

radv divides the huge command buffer into 3 IBs, and they had random
flags set because the field was uninitialized. Maybe IBs got discarded
if they had the PREAMBLE bit set.

Signed-off-by: Florian Will <florian.will@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Cc: <mesa-stable@lists.freedesktop.org>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3577>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3577>
(cherry picked from commit 951083768b351b0700bdcc02758670e505cce974)

4 years agoisl: drop CCS row pitch requirement for linear surfaces
Lionel Landwerlin [Fri, 24 Jan 2020 13:34:36 +0000 (15:34 +0200)]
isl: drop CCS row pitch requirement for linear surfaces

We were applying row pitch constraint of CCS surfaces to linear
surfaces. But CCS is only supported in linear tiling under some
condition (more on that in the following commit). So let's drop that
requirement for now.

Fixes a bunch of crucible assert where the byte size of a linear image
is expected to be similar to the byte size of buffer for the same
extent in the following category :

   func.miptree.r8g8b8a8-unorm.aspect-color.view-2d.*download-copy-with-draw.*

v2: Move restriction to isl_calc_tiled_min_row_pitch()

v3: Move restrinction to isl_calc_row_pitch_alignment() (Jason)

v4: Update message (Lionel)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 07e16221d975 ("isl: Round up some pitches to 512B for Gen12's CCS")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3551>
(cherry picked from commit a3f6db2c4e927be7e7d40cbc39c8664030d2af59)

4 years ago.pick_status.json: Update to 997040e4b8353fe9b71a5e9fde2f933eae09c7a3
Dylan Baker [Tue, 28 Jan 2020 23:29:25 +0000 (15:29 -0800)]
.pick_status.json: Update to 997040e4b8353fe9b71a5e9fde2f933eae09c7a3

4 years ago.pick_status.json: Mark df34fa14bb872447fed9076e06ffc504d85e2d1c as backported
Dylan Baker [Fri, 24 Jan 2020 18:43:55 +0000 (10:43 -0800)]
.pick_status.json: Mark df34fa14bb872447fed9076e06ffc504d85e2d1c as backported

4 years ago.pick_status.json: Mark 58c929be0ddbbd9291d0dadbf11538170178e791 as backported
Dylan Baker [Fri, 24 Jan 2020 18:43:54 +0000 (10:43 -0800)]
.pick_status.json: Mark 58c929be0ddbbd9291d0dadbf11538170178e791 as backported

4 years agodocs: Add SHA 256 sums for 19.3.3
Dylan Baker [Tue, 28 Jan 2020 19:32:51 +0000 (11:32 -0800)]
docs: Add SHA 256 sums for 19.3.3

4 years agoVERSION: bump version to 19.3.3
Dylan Baker [Tue, 28 Jan 2020 19:06:26 +0000 (11:06 -0800)]
VERSION: bump version to 19.3.3

4 years agodocs: Add relnotes for 19.3.3 release
Dylan Baker [Tue, 28 Jan 2020 19:06:07 +0000 (11:06 -0800)]
docs: Add relnotes for 19.3.3 release

4 years agoradeonsi: don't invoke decompression inside internal launch_grid
Marek Olšák [Sat, 18 Jan 2020 02:24:14 +0000 (21:24 -0500)]
radeonsi: don't invoke decompression inside internal launch_grid

Decompress resources properly but don't do it inside launch_grid
to prevent recursion.

(cherry-picked from df34fa14bb872447fed9076e06ffc504d85e2d1c)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
4 years agoradeonsi: clean up how internal compute dispatches are handled
Marek Olšák [Sat, 18 Jan 2020 02:23:12 +0000 (21:23 -0500)]
radeonsi: clean up how internal compute dispatches are handled

(cherry-picked from 58c929be0ddbbd9291d0dadbf11538170178e791)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
4 years agodrisw: Cache the depth of the X drawable
Adam Jackson [Mon, 6 Jan 2020 16:06:30 +0000 (11:06 -0500)]
drisw: Cache the depth of the X drawable

This is not always ->rgbBits, because there are cases where that could
be 32 but we're (legally) bound to a depth-24 pixmap. The important
thing to have match here is the actual server-side notion of depth.  You
can look this up (at modest expense) from the xlib visual info if the
fbconfig has a visual. But it might not, so if not, fetch it (at
slightly greater expense) from XGetGeometry. Do this at GLX drawable
creation so you don't have to do it on the SwapBuffers path.

Apparently this fixes glx/glx-swap-singlebuffer, which is unintentional
but quite pleasant.

Fixes: mesa/mesa#2291
Fixes: 90d58286 ("drisw: Fix and simplify drawable setup")
Reviewed-by: Eric Anholt <eric@anholt.net>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3305>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3305>
(cherry picked from commit 2fc11e8a05f59bbffed284c86108fedbac315081)

Conflicts:
.gitlab-ci/piglit/quick_gl.txt

This testing doesn't exist in the 19.3 branch, so I've deleted the file.

Dylan

4 years agoaco/gfx10: Fix VcmpxExecWARHazard mitigation.
Timur Kristóf [Fri, 24 Jan 2020 14:17:44 +0000 (15:17 +0100)]
aco/gfx10: Fix VcmpxExecWARHazard mitigation.

The SOPP instruction shouldn't have a definition, and its block
should be set to -1 in order to prevent it from being recognized
as a branch.
Also fix a typo in the readme.

Fixes: d6dfce02d074d615a3b88a3fccd8ee8c7e13c010
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3552>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3552>
(cherry picked from commit c787b8d2a16d5e2950f209b1fcbec6e6c0388845)

4 years agointel: Fix aux map alignments on 32-bit builds.
Kenneth Graunke [Wed, 22 Jan 2020 00:46:24 +0000 (16:46 -0800)]
intel: Fix aux map alignments on 32-bit builds.

ALIGN() brilliantly uses uintptr_t, making it unsafe for use with 64-bit
GPU addresses in 32-bit builds of the driver.  Use align64() instead,
which uses uint64_t.

Fixes assertion failures when running any 32-bit program on Tigerlake.

Fixes: 2e6a7ced4db ("iris/gen12: Write GFX_AUX_TABLE base address register")
Fixes: 0d0290bb3f7 ("intel/common: Add surface to aux map translation table support")
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3507>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3507>
(cherry picked from commit 8dc0540a171627cb502f76c75a29a43a86328a95)

4 years agomeson: Do not require libdrm for DRI2 on hurd
Samuel Thibault [Sat, 28 Dec 2019 21:51:39 +0000 (22:51 +0100)]
meson: Do not require libdrm for DRI2 on hurd

Cc: 19.3 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3231>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3231>
(cherry picked from commit 2fd85105c6b144d1f44e5faef33363e554b58455)

4 years agoaco: fix off-by-one error when initializing sgpr_live_in
Rhys Perry [Wed, 22 Jan 2020 11:51:31 +0000 (11:51 +0000)]
aco: fix off-by-one error when initializing sgpr_live_in

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2394
Fixes: 93c8ebfa780 ('aco: Initial commit of independent AMD compiler')
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3511>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3511>
(cherry picked from commit 15a1cc00d38db084b41d7ae7907aa0b0c22f2099)

4 years agoradv: fix double free corruption in radv_alloc_memory()
Samuel Pitoiset [Wed, 22 Jan 2020 07:40:11 +0000 (08:40 +0100)]
radv: fix double free corruption in radv_alloc_memory()

If the driver fails to allocate memory for some reasons, it shouldn't
free the 'mem' object twice.

Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2302
Fixes: 825ddfee599 ("radv: Handle device memory alloc failure with normal free.")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3508>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3508>
(cherry picked from commit bd51538d285ad0ef488df60e24eaa08b9da20c28)

4 years agoegl/android: fix buffer_count for applications setting max count
Tapani Pälli [Tue, 21 Jan 2020 11:01:51 +0000 (13:01 +0200)]
egl/android: fix buffer_count for applications setting max count

Problem with previous solution was that it did not take account that
some applications may set a max count for buffers. Therefore we need to
query both min and max and clamp our setting based on that.

Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2373
Fixes: be08e6a4496 ("egl/android: Restrict minimum triple buffering for android color_buffers")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3480>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3480>
(cherry picked from commit 39e7492d33c89ee7049d5bc07267d131cc6a1ff9)

4 years agoradv: Remove syncobj_handle variable in header.
Bas Nieuwenhuizen [Tue, 21 Jan 2020 10:49:55 +0000 (11:49 +0100)]
radv: Remove syncobj_handle variable in header.

I strongly suspect it was supposed to be a typedef. However, used
nowhere, we should remove it.

Fixes: eaa56eab6da "radv: initial support for shared semaphores (v2)"
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2385
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3479>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3479>
(cherry picked from commit bd4380c63c3b8b8b5f60dc840809dbe96a222fd7)

4 years agoturnip: fix invalid VK_ERROR_OUT_OF_POOL_MEMORY
Hyunjun Ko [Fri, 17 Jan 2020 07:23:03 +0000 (07:23 +0000)]
turnip: fix invalid VK_ERROR_OUT_OF_POOL_MEMORY

When VK_DESCRIPTOR_TYPE_SAMPLER is provided, it doesn't need to be
counted as a buffer count. Otherwise it leads to mismatch of allocated
buffer size, hitting VK_ERROR_OUT_OF_POOL_MEMORY finally.

Fixes: c39afe68f0390d45130c1317b3b7e65f55542c36

Also fixes amber tests:
./tests/cases/address_modes_float.amber
./tests/cases/address_modes_int.amber
./tests/cases/magfilter_linear.amber
./tests/cases/magfilter_nearest.amber

Reviewed-by: Jonathan Marek <jonathan@marek.ca>
(cherry picked from commit 26d93a7495511ded7cca3ed46bcdf7e134c0f929)

4 years agoclover: Initialize Asm Parsers
Jan Vesely [Sun, 19 Jan 2020 02:27:01 +0000 (21:27 -0500)]
clover: Initialize Asm Parsers

Fixes piglits that use ADMGCN inline assembly:
program@execute@calls
program@execute@amdgcn-mubuf-negative-vaddr

CC: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
(cherry picked from commit 87e1f8eca5d2748839be12afe81d10e1f8353b59)

4 years agoanv: Stop allocating WSI event fences off the instance
Jason Ekstrand [Sat, 18 Jan 2020 05:03:41 +0000 (23:03 -0600)]
anv: Stop allocating WSI event fences off the instance

Fixes: 16eb390834d "anv: add VK_EXT_display_control to anv driver [v5]"
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3461>
(cherry picked from commit f0519c9cf9fdccf93b0c3b81b47911de2422b285)

4 years agoanv: Canonicalize buffer formats for image/buffer copies
Jason Ekstrand [Fri, 17 Jan 2020 23:46:31 +0000 (17:46 -0600)]
anv: Canonicalize buffer formats for image/buffer copies

Some formats, in particular YCbCr formats and ASTC have additional
restrictions.  We already whack ASTC formats to RGBA32_UINT because the
hardware doesn't allow LINEAR with ASTC.  However, we need to fix YCbCr
formats as well because they come with alignment restrictions that we
can't guarantee are satisfied.  We're using blorp_copy to do the copies
so we may as well just stomp formats for everything.

Fixes: b24b93d5843 "anv: enable VK_KHR_sampler_ycbcr_conversion"
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3460>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3460>
(cherry picked from commit dd92179a72e5263b9db730d92a883e2536aa4474)

4 years agoanv/blorp: Rename buffer image stride parameters
Jason Ekstrand [Sat, 18 Jan 2020 00:25:33 +0000 (18:25 -0600)]
anv/blorp: Rename buffer image stride parameters

The new names fit better with the Vulkan names and don't pretend to be
an actual image extent.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3460>
(cherry picked from commit 14c6e665f7725e9cf314a4bd06de908a943bd43a)

4 years agodocs: remove double-closed definition-list
Erik Faye-Lund [Thu, 16 Jan 2020 16:45:55 +0000 (17:45 +0100)]
docs: remove double-closed definition-list

Fixes: bc17ac58661 "docs: add documentation for building with meson"
Acked-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3431>
(cherry picked from commit b009a7644b91901b037a4e1dbb86970407d72d75)

4 years agodocs: move paragraph closing tag
Erik Faye-Lund [Thu, 16 Jan 2020 16:39:39 +0000 (17:39 +0100)]
docs: move paragraph closing tag

The pre-tag right before is a block-level tag, which means it implicitly
terminates the paragraph. So there's no paragraph to close after this.
Instead, move the paragraph-closing before the pre-tag, to explicitly
close the paragraph.

Fixes: 41b3eb08d9f "docs: update meson docs for windows"
Acked-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3431>
(cherry picked from commit b387f68f49abc995605098178a3c643f3a9cfe41)

4 years agodocs: use code-tags instead of pre-tags
Erik Faye-Lund [Thu, 16 Jan 2020 17:01:41 +0000 (18:01 +0100)]
docs: use code-tags instead of pre-tags

Similar to the previous two commits, it seems more appropriate to use
code-tags here than pre-tag.

Fixes: 9af6c38deff "docs: Add use of Closes: tag for closing gitlab issues"
Acked-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3431>
(cherry picked from commit a370cfd96ed11463a9e76c1d9bc42eb5f3858fde)

4 years agodocs: use code-tags instead of pre-tags
Erik Faye-Lund [Thu, 16 Jan 2020 16:49:34 +0000 (17:49 +0100)]
docs: use code-tags instead of pre-tags

Similar to the previous commit, code-tags seems more appropriate than
pre-tags here. So let's change it.

Fixes: ca0c1e69cab "docs: update releasing process to use new scripts and gitlab"
Acked-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3431>
(cherry picked from commit 1de361e56b33fff35e2feb83dd5c404f67d42a69)

4 years agodocs: use code-tag instead of pre-tag
Erik Faye-Lund [Thu, 16 Jan 2020 16:32:19 +0000 (17:32 +0100)]
docs: use code-tag instead of pre-tag

It's unlikely the author meant to use <pre>-here, as that starts a whole
new block. Instead, the inline code-tag seems more appropriate here.

Fixes: 41b3eb08d9f "docs: update meson docs for windows"
Acked-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3431>
(cherry picked from commit 36e02752755bd26992cf87409558f6c016372acd)

4 years agodocs: open paragraph before closing it
Erik Faye-Lund [Thu, 16 Jan 2020 16:27:16 +0000 (17:27 +0100)]
docs: open paragraph before closing it

Fixes: 44c5e634a5c "docs: update meson docs for windows"
Acked-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3431>
(cherry picked from commit f0677086a17930130c2e01546fc007659b9269ba)

4 years agodocs: fix paragraphs
Erik Faye-Lund [Thu, 16 Jan 2020 16:21:50 +0000 (17:21 +0100)]
docs: fix paragraphs

Paragraphs are terminated by pre-tags, so the latter one closes a new,
empty one. Let's split the paragraph in two around the pre-tag instead.

Fixes: c0dfe8c6dfd "docs: do not use div for line-breaking"
Acked-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3431>
(cherry picked from commit a0d25c4d87e104087b647d5837a47a025b4235a5)

4 years agodocs: fix typo in html tag name
Erik Faye-Lund [Thu, 16 Jan 2020 16:13:12 +0000 (17:13 +0100)]
docs: fix typo in html tag name

Fixes: 5d11a828e10 "docs: update install docs for meson"
Acked-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3431>
(cherry picked from commit 750d664226e7afdb52cc306ada19e8bfb9b6c97e)

4 years agoutil: call bind_sampler_states before setting sampler_views
Pierre-Eric Pelloux-Prayer [Sat, 15 Feb 2020 22:05:53 +0000 (23:05 +0100)]
util: call bind_sampler_states before setting sampler_views

Fixes the following valgrind error:

    Invalid read of size 16
       at 0x28F458A1: si_set_sampler_view_desc (in radeonsi_drv_video.so)
       by 0x28F4657E: si_set_sampler_views (in radeonsi_drv_video.so)
       by 0x28D62BF5: util_compute_blit (in radeonsi_drv_video.so)
       by 0x28D3A944: vlVaHandleVAProcPipelineParameterBufferType (in radeonsi_drv_video.so)
       by 0x28D34EE1: vlVaRenderPicture (in radeonsi_drv_video.so)
       by 0x4B2582B: vaRenderPicture (in libva.so.2.500.0)
     Address 0x18142a10 is 0 bytes inside a block of size 48 free'd
       at 0x48369AB: free (vg_replace_malloc.c:540)
       by 0x28D62D51: util_compute_blit (in radeonsi_drv_video.so)
       by 0x28D3A944: vlVaHandleVAProcPipelineParameterBufferType (in radeonsi_drv_video.so)
       by 0x28D34EE1: vlVaRenderPicture (in radeonsi_drv_video.so)
       by 0x4B2582B: vaRenderPicture (in libva.so.2.500.0)
     Block was alloc'd at
       at 0x4837B65: calloc (vg_replace_malloc.c:762)
       by 0x28EFB2EC: si_create_sampler_state (in radeonsi_drv_video.so)
       by 0x28D62C30: util_compute_blit (in radeonsi_drv_video.so)
       by 0x28D3A944: vlVaHandleVAProcPipelineParameterBufferType (in radeonsi_drv_video.so)
       by 0x28D34EE1: vlVaRenderPicture (in radeonsi_drv_video.so)
       by 0x4B2582B: vaRenderPicture (in libva.so.2.500.0)

Fixes: 69430d7e59e ("va: use a compute shader for the blit")
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2321
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3428>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3428>
(cherry picked from commit 5b1c4e1b75fe3466e5eec799e091c7a8ec9acd0e)

4 years agomeson: use github URL for wraps instead of completely unreliable wrapdb
Eric Engestrom [Tue, 14 Jan 2020 15:53:21 +0000 (15:53 +0000)]
meson: use github URL for wraps instead of completely unreliable wrapdb

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3391>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3391>
(cherry picked from commit 65641e0c7a29944e19cc068457ee0d59cace8096)

4 years agoaco: rework lower_to_cssa()
Daniel Schürmann [Mon, 13 Jan 2020 16:35:11 +0000 (17:35 +0100)]
aco: rework lower_to_cssa()

This patch changes lower_to_cssa to be much more conservative
about assumptions which phi operands might interfere.
Previously, this pass wasn't exhaustive and could miss some corner cases.

v2: remove optimizations to find better insertion points as it's hard
to guarantee that they are always correct and have overall no benefit.

Fixes: 0b8216b2cdbcaccfd2bd1a65be6b8ac5654e3067 ('aco: Lower to CSSA')

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3385>
(cherry picked from commit d098024c40ee6bd12804833b71a554380df2d51d)

4 years agointel/perf: report query split for mdapi
Lionel Landwerlin [Mon, 16 Dec 2019 13:42:55 +0000 (15:42 +0200)]
intel/perf: report query split for mdapi

Also forgotten in the initial implementation.

v2: Report begin timestamp scaled by the timestamp frequency (Windows
    behavior)

v3: Rename split to disjoint to match GL terminology (Tapani)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: <mesa-stable@lists.freedesktop.org>
Acked-by: Tapani Pälli <tapani.palli@intel.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3112>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3112>
(cherry picked from commit 44ffeb4fee8a38f9e526749eee163cbff89dea25)

4 years agointel/perf: expose timestamp begin for mdapi
Lionel Landwerlin [Mon, 16 Dec 2019 13:36:24 +0000 (15:36 +0200)]
intel/perf: expose timestamp begin for mdapi

This was forgotten in the initial implementation.

v2: ensure the value is written for both GL & Vulkan queries

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: <mesa-stable@lists.freedesktop.org>
Acked-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3112>
(cherry picked from commit 3bb8a4bfecbfb1345256c4faa8cd10d5b0a7ca76)

4 years agoradeonsi: work around an LLVM crash when using llvm.amdgcn.icmp.i64.i1
Marek Olšák [Thu, 9 Jan 2020 02:52:26 +0000 (21:52 -0500)]
radeonsi: work around an LLVM crash when using llvm.amdgcn.icmp.i64.i1

Cc: 19.2 19.3 <mesa-stable@lists.freedesktop.org>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3338>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3338>
(cherry picked from commit 8ff8e68e422a5c6b9ab26eaa56eff5c27a642d2e)

4 years agointel/compiler: Fix illegal mutation in get_nir_image_intrinsic_image
Kenneth Graunke [Wed, 15 Jan 2020 08:31:49 +0000 (00:31 -0800)]
intel/compiler: Fix illegal mutation in get_nir_image_intrinsic_image

get_nir_image_intrinsic_image() was incorrectly mutating the value held
by the register which holds the intrinsic's first source (image index).

If this happened to be the register for an SSA def which is also used
elsewhere in the program, this meant that we would clobber that value
in subsequent uses.

Note that this only affects i965, because neither anv nor iris use the
binding table start sections, so nothing is ever added here.

Fixes KHR-GL46.compute_shader.resources-max on i965 with Eric Anholt's
MR !3240 applied.  That MR reorders SSBOs and ABOs, so that test uses
image 0 and SSBO 0, causing this code to brilliantly add binding table
index 45 to both the image (correct) and the SSBO (bzzt, wrong!).

Fixes: 09f1de97a76 ("anv,i965: Lower away image derefs in the driver")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3404>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3404>
(cherry picked from commit 0a1c47074b9edbb52c4783b34397d24fe98ad96f)

4 years ago.pick_status.json: Update to c787b8d2a16d5e2950f209b1fcbec6e6c0388845
Dylan Baker [Fri, 24 Jan 2020 17:05:48 +0000 (09:05 -0800)]
.pick_status.json: Update to c787b8d2a16d5e2950f209b1fcbec6e6c0388845

4 years agost/mesa: don't lower YUV when driver supports it natively
Jonathan Marek [Fri, 6 Sep 2019 13:26:08 +0000 (09:26 -0400)]
st/mesa: don't lower YUV when driver supports it natively

This fixes YUYV support on etnaviv.

Fixes: 7404833c "gallium: add handling for YUV planar surfaces"

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
4 years agoradeonsi: make sure fmask expand is done if needed
Pierre-Eric Pelloux-Prayer [Thu, 19 Dec 2019 18:54:16 +0000 (19:54 +0100)]
radeonsi: make sure fmask expand is done if needed

Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2248
Fixes: 095a58204d9 ("radeonsi: expand FMASK before MSAA image stores are used")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3174>
(cherry picked from commit c2df5389bb44a625a53ac06e637019c94236f201)

4 years agoradeonsi: fix fmask expand compute shader
Pierre-Eric Pelloux-Prayer [Thu, 19 Dec 2019 18:09:54 +0000 (19:09 +0100)]
radeonsi: fix fmask expand compute shader

'coord' variable was using TGSI_WRITEMASK_XYZ so subsequent uses of
TGSI_WRITEMASK_W were dropped.
The result for a 2 samples program was:

  0: UMAD TEMP[0].xy, SV[1].xyyy, IMM[0].xxxx, SV[0].xyyy
  1: STORE IMAGE[0], TEMP[0], TEMP[1], RESTRICT, 2D_MSAA
  2: STORE IMAGE[0], TEMP[0], TEMP[2], RESTRICT, 2D_MSAA
  3: END

instead of the expected:

  0: UMAD TEMP[0].xy, SV[1].xyyy, IMM[0].xxxx, SV[0].xyyy
  1: MOV TEMP[0].w, IMM[0].yyyy
  2: LOAD TEMP[1], IMAGE[0], TEMP[0], RESTRICT, 2D_MSAA
  3: MOV TEMP[0].w, IMM[0].zzzz
  4: LOAD TEMP[2], IMAGE[0], TEMP[0], RESTRICT, 2D_MSAA
  5: MOV TEMP[0].w, IMM[0].yyyy
  6: STORE IMAGE[0], TEMP[0], TEMP[1], RESTRICT, 2D_MSAA
  7: MOV TEMP[0].w, IMM[0].zzzz
  8: STORE IMAGE[0], TEMP[0], TEMP[2], RESTRICT, 2D_MSAA
  9: END

This fixes half of https://gitlab.freedesktop.org/mesa/mesa/issues/2248

Fixes: 095a58204d9 ("radeonsi: expand FMASK before MSAA image stores are used")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3174>
(cherry picked from commit b5e748b49b3fb9ef7a5e3af01e2ddbac59f90796)

4 years agoegl/android: Restrict minimum triple buffering for android color_buffers
Nataraj Deshpande [Fri, 10 Jan 2020 16:58:00 +0000 (08:58 -0800)]
egl/android: Restrict minimum triple buffering for android color_buffers

The patch restricts triple buffering as minimum at driver for android
color_buffers in order to fix onscreen performance hit for T-Rex and
Manhattan.

v2: Update min_buffer check condition (Tapani Pälli)
v3: further code cleanup (Eric Engestrom)

Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2332
Fixes: 0661c357c60 ("egl/android: Update color_buffers querying for buffer age")
Signed-off-by: Nataraj Deshpande <nataraj.deshpande@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3384>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3384>
(cherry picked from commit be08e6a4496aad219df1fd829fca3e4f7b322538)

4 years agoradv: only use VkSamplerCreateInfo::compareOp if enabled
Samuel Pitoiset [Tue, 14 Jan 2020 17:03:29 +0000 (18:03 +0100)]
radv: only use VkSamplerCreateInfo::compareOp if enabled

Cc: <mesa-stable@lists.freedesktop.org>
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2350
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3392>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3392>
(cherry picked from commit 5ff12322c9d79780bf4f655aad831e4acb744ee7)

4 years agoradv: Disable VK_EXT_sample_locations on GFX10.
Bas Nieuwenhuizen [Mon, 30 Dec 2019 14:27:21 +0000 (15:27 +0100)]
radv: Disable VK_EXT_sample_locations on GFX10.

Workaround for https://gitlab.freedesktop.org/mesa/mesa/issues/2163

CC: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3236>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3236>
(cherry picked from commit 4e3c81517bafe73015e4af4bdce0eae0cab7751c)

4 years agocherry-ignore: Update for 19.3.3
Dylan Baker [Wed, 15 Jan 2020 18:44:32 +0000 (10:44 -0800)]
cherry-ignore: Update for 19.3.3

4 years agoaco: fix unconditional demote_to_helper
Daniel Schürmann [Fri, 10 Jan 2020 16:19:40 +0000 (17:19 +0100)]
aco: fix unconditional demote_to_helper

This patch fixes an out-of-bounds access on p_exit_early
and binds the exec register to the correct operand.

Fixes: 2ea9e59e8d976ec77800d2a20645087b96d1e241 ('aco: move s_andn2_b64 instructions out of the p_discard_if')
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3347>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3347>

4 years agoaco: check if multiplication/clamp is live when applying output modifier
Rhys Perry [Thu, 2 Jan 2020 17:05:30 +0000 (17:05 +0000)]
aco: check if multiplication/clamp is live when applying output modifier

Backport of 809c8feb92d33c43ace3ef25584a2adca24b1be0

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
4 years agoaco: don't DCE atomics with return values
Rhys Perry [Mon, 16 Dec 2019 13:30:10 +0000 (13:30 +0000)]
aco: don't DCE atomics with return values

We don't create atomics with definitions if they are not used in NIR, but
our own DCE can remove the uses if an export turns out to be null.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: 93c8ebfa780 ('aco: Initial commit of independent AMD compiler')
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3081>
(cherry picked from commit 69bed1c9186c3e24ad54089218d58c5f7b83befe)
Conflicts resolved by Dylan Baker

Conflicts:
src/amd/compiler/aco_opcodes.py

4 years agointel/fs: Only use SLM fence in compute shaders
Caio Marcelo de Oliveira Filho [Mon, 13 Jan 2020 23:48:12 +0000 (15:48 -0800)]
intel/fs: Only use SLM fence in compute shaders

Fixes: b390ff35170 ("intel/fs: Add support for SLM fence in Gen11")
Fixes: e142061399c ("intel/fs: Implement scoped_memory_barrier")

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
(cherry picked from commit edf6a40cb2a09d58f9244abf0a1432a836a350ce)

4 years agoanv: only use VkSamplerCreateInfo::compareOp if enabled
Lionel Landwerlin [Tue, 14 Jan 2020 14:10:21 +0000 (16:10 +0200)]
anv: only use VkSamplerCreateInfo::compareOp if enabled

The spec says nothing about the validity of the compareOp field when
compareEnable is false.

v2: use vulkan enum to pick default value (Caio)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: <mesa-stable@lists.freedesktop.org>
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2350
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3387>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3387>
(cherry picked from commit a19cdf989b1cca7126a29a42e5f28e8c7823e937)

4 years agomesa: Fix detection of invalidating both depth and stencil.
Eric Anholt [Mon, 13 Jan 2020 21:06:01 +0000 (13:06 -0800)]
mesa: Fix detection of invalidating both depth and stencil.

Fixes an extra 1024x1024x4 MSAA Z/S store on WebGL fishtank on cheza.

Reported-by: Dave Airlie <airlied@redhat.com>
Fixes: db2ae5112106 ("mesa: Skip partial InvalidateFramebuffer of packed depth/stencil.")
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3370>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3370>
(cherry picked from commit 3be4b89c038554ceb95ba24c00f50c0f2db3a646)

4 years agoanv: Memset array properties
Jason Ekstrand [Mon, 13 Jan 2020 19:49:57 +0000 (13:49 -0600)]
anv: Memset array properties

This is probably better than possibly leaving those bytes uninitialized
even if the app will theoretically not use them.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3369>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3369>
(cherry picked from commit 7978f2401bba7e60f255337a394fd132082be9aa)

4 years agoanv: Don't over-advertise descriptor indexing features
Jason Ekstrand [Mon, 13 Jan 2020 18:55:41 +0000 (12:55 -0600)]
anv: Don't over-advertise descriptor indexing features

We should only advertise sub-features if we advertise the extension.

Fixes: 6e230d7607f "anv: Implement VK_EXT_descriptor_indexing"
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3369>
(cherry picked from commit d36eed3e695d8f39495a3d81373a8c47853bae7e)

4 years agointel/blorp: Fill out all the dwords of MI_ATOMIC
Jason Ekstrand [Fri, 10 Jan 2020 21:30:02 +0000 (15:30 -0600)]
intel/blorp: Fill out all the dwords of MI_ATOMIC

This makes us valgrind clean again.

Fixes: 9175c7058efb "intel/blorp: Make blorp update the clear color..."
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3366>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3366>
(cherry picked from commit d7ff137445b9bfd0cf15d176d0d152d16634559f)

4 years agointel/vec4: Support scoped_memory_barrier
Jason Ekstrand [Tue, 7 Jan 2020 22:14:56 +0000 (16:14 -0600)]
intel/vec4: Support scoped_memory_barrier

Fixes: 06aecb14c0476 "anv: Implement VK_KHR_vulkan_memory_model"
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3307>
(cherry picked from commit ada49bae5e039b10913bc61ba7b037227e7e49aa)

4 years agoaco: disable add combining for ds_swizzle_b32
Rhys Perry [Mon, 16 Dec 2019 13:58:16 +0000 (13:58 +0000)]
aco: disable add combining for ds_swizzle_b32

ds_bpermute_b32/ds_permute_b32 are fine, I think

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: 93c8ebfa780 ('aco: Initial commit of independent AMD compiler')
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3081>
(cherry picked from commit ef8abfa7908974f571786e83b047b187af0e48c7)

4 years agoaco: set exec_potentially_empty for demotes
Rhys Perry [Mon, 16 Dec 2019 11:29:08 +0000 (11:29 +0000)]
aco: set exec_potentially_empty for demotes

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: 93c8ebfa780 ('aco: Initial commit of independent AMD compiler')
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3081>
(cherry picked from commit 8f291dc14600c614788301e3265ff7f0f48b8b0d)

4 years agoaco: fix uninitialized data in the binary
Rhys Perry [Tue, 24 Sep 2019 16:21:51 +0000 (17:21 +0100)]
aco: fix uninitialized data in the binary

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-By: Timur Kristóf <timur.kristof@gmail.com>
Fixes: 93c8ebfa780 ('aco: Initial commit of independent AMD compiler')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3081>
(cherry picked from commit bbac52873f4248c2f545f12137bd24071a8043cc)

4 years agoaco: fix imageSize()/textureSize() with large buffers on GFX8
Rhys Perry [Mon, 9 Dec 2019 18:00:55 +0000 (18:00 +0000)]
aco: fix imageSize()/textureSize() with large buffers on GFX8

Tested on Navi by using dEQP-VK.image.image_size.buffer.* and the GFX8
path with the size multipled by the stride.
dEQP-VK.image.image_size.buffer.* was also run with the tests modified to
use a 96bit format.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes: 93c8ebfa780 ('aco: Initial commit of independent AMD compiler')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3081>
(cherry picked from commit fcd6d8324560b5897586cbf8161f9b46bff5d11f)

4 years agoaco: set vm for pos0 exports on GFX10
Rhys Perry [Mon, 9 Dec 2019 13:38:47 +0000 (13:38 +0000)]
aco: set vm for pos0 exports on GFX10

RADV's LLVM backend and radeonsi does the same thing.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Cc: 19.3 <mesa-stable@lists.freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3081>
(cherry picked from commit 49bcd06f974dcd8f60b4aa7d93bf1843439126a2)

4 years agointel/fs/gen8+: Fix r127 dst/src overlap RA workaround for EOT message payload.
Francisco Jerez [Sat, 28 Dec 2019 00:08:04 +0000 (16:08 -0800)]
intel/fs/gen8+: Fix r127 dst/src overlap RA workaround for EOT message payload.

The problem occured when the return payload of a SIMD8 SEND
instruction was re-used as source payload of an EOT SEND message.  In
such cases the interference edge added by that workaround between the
payload and grf127_send_hack_node would have no effect, because the
payload would be allocated to a fixed range of registers containing
r127 by the special handling of EOT message payloads in the same
function.  This would cause things to blow up if the source payload of
the first SIMD8 message ended up being allocated to a range which
happened to overlap the destination.

Fix it by avoiding r127 altogether in the allocation of EOT message
payloads.

The problem can be reproduced on ICL with the fp-indirections2 Piglit
test-case in combination with the other optimizer changes of this
series.

Fixes: 232ed8980217 "i965/fs: Register allocator shoudn't use grf127 for sends dest"
Cc: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit 0703eab0120f20451e75ba8d4ce065350ad36fef)

4 years agointel/fs/gen11+: Handle ROR/ROL in lower_simd_width().
Francisco Jerez [Mon, 25 Nov 2019 00:12:12 +0000 (16:12 -0800)]
intel/fs/gen11+: Handle ROR/ROL in lower_simd_width().

Prevents invalid code from being emitted for ROR/ROL instructions in
SIMD32 shaders.

The problem can be reproduced with the following tests while forcing
SIMD32 to be used for fragment shaders:

 piglit.shaders.glsl-rotate-left
 piglit.shaders.glsl-rotate-right

However the issue could occur in production already with compute
shaders and a workgroup size large enough to trigger SIMD32 dispatch.

Fixes: 83fdec0f0de "intel/compiler: Enable the emission of ROR/ROL instructions"
Cc: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit 0a6e46d44d30fd10ee6784c9a6920b4d127e9810)

4 years agoglsl: Fix software 64-bit integer to 32-bit float conversions.
Francisco Jerez [Fri, 27 Dec 2019 22:10:31 +0000 (14:10 -0800)]
glsl: Fix software 64-bit integer to 32-bit float conversions.

The current implementation was broken for any integers between 2^24
and 2^30 (it would return zero for me on ICL).  The reason is that for
such integers we wouldn't take the 'if (0 <= shiftCount)' early return
path, however 'shiftCount + 7' would be positive, leading to a
negative 'count' argument passed to __shift64RightJamming(), which
would give undefined results.

This reworks the affected conversion functions to use either
__shortShift64Left() or __shift64RightJamming() based on the sign of
the final shift count, which should avoid the problem.  In addition
this should qualify as a clean-up/optimization -- This implementation
of the conversion functions translates to 7 instructions less than the
original on Intel hardware.

This fixes the 'KHR-GL46.shader_ballot_tests.ShaderBallotFunctionBallot'
conformance tests on soft fp64 hardware with large enough subgroup
size (>16).

Fixes: d5cf6e92b4f7 "glsl: Add built-in functions to do uint64_to_fp32(uint64_t)"
Fixes: c9d333a6b76e "glsl: Add built-in functions to do int64_to_fp32(int64_t)"
Cc: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
(cherry picked from commit a30bb25a7a495db7b7cb3be50431029f48019fc3)

4 years agomesa/st: fix a memory leak in get_version
Andrii Simiklit [Fri, 10 Jan 2020 15:37:13 +0000 (17:37 +0200)]
mesa/st: fix a memory leak in get_version

This patch prevents memory leak in get_version function in st_manager.c
This issue was found by valgrind:
16 bytes in 1 blocks are definitely lost in loss record 6 of 1,418
   at 0x483CD99: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
   by 0x63D9476: st_init_extensions (st_extensions.c:1679)
   by 0x63B803B: get_version (st_manager.c:1271)
   by 0x63B8124: st_api_query_versions (st_manager.c:1289)
   by 0x63266EF: dri_init_screen_helper (dri_screen.c:583)
   by 0x6321B12: dri2_init_screen (dri2.c:2110)
   by 0x631AACC: driCreateNewScreen2 (dri_util.c:155)
   by 0x5D58192: dri3_create_screen (dri3_glx.c:897)
   by 0x5D39829: AllocAndFetchScreenConfigs (glxext.c:815)
   by 0x5D39C57: __glXInitialize (glxext.c:941)
   by 0x5D3290A: GetGLXPrivScreenConfig (glxcmds.c:174)
   by 0x5D34F38: glXQueryExtensionsString (glxcmds.c:1307)

Fixes: eca8032f20d0970184843d98e2bddb688e94a3a9 ("gallium: Add ARB_gl_spirv support")
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Andrii Simiklit <andrii.simiklit@globallogic.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3345>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3345>
(cherry picked from commit ebaab89761aad59c4debec67c3ec24a96cb82dd1)

4 years agofreedreno/drm: Fix memory leak in softpin implementation
Lasse Lopperi [Fri, 10 Jan 2020 08:47:55 +0000 (10:47 +0200)]
freedreno/drm: Fix memory leak in softpin implementation

Free the memory allocated for cmds/reloc_bos array when destoying the
associated ringbuffer.

For similar fix for the non-softpin implementation see:
https://gitlab.freedesktop.org/mesa/mesa/commit/d014af98b7afc69f4f733c8b8b6f2e3438e68407

Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2324

Fixes: f3cc0d2 ("freedreno: import libdrm_freedreno + redesign submit")

Signed-off-by: Lasse Lopperi <lasse.lopperi@ge.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3342>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3342>
(cherry picked from commit 3de2774dcb85fb2f87ae65a854fc5f25f0f34a91)

4 years agoradeonsi: release saved resources in si_compute_do_clear_or_copy
Pierre-Eric Pelloux-Prayer [Thu, 9 Jan 2020 13:59:49 +0000 (14:59 +0100)]
radeonsi: release saved resources in si_compute_do_clear_or_copy

Fixes: 9b331e462e5 ("radeonsi: use compute shaders for clear_buffer & copy_buffer")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit a5fe84aefb6858bee123f60b330db1e0287f9cc0)

4 years agoradeonsi: release saved resources in si_compute_copy_image
Pierre-Eric Pelloux-Prayer [Thu, 9 Jan 2020 13:41:48 +0000 (14:41 +0100)]
radeonsi: release saved resources in si_compute_copy_image

Fixes: 1b25d340b79 ("radeonsi: use compute for resource_copy_region when possible")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit 1acf714d579114ff591c00989b2e6a97de8830b8)

4 years agoradeonsi: release saved resources in si_compute_clear_render_target
Pierre-Eric Pelloux-Prayer [Thu, 9 Jan 2020 13:40:44 +0000 (14:40 +0100)]
radeonsi: release saved resources in si_compute_clear_render_target

Fixes: 984fd735152 ("radeonsi: use compute for clear_render_target when possible")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit e1e87466ae7d46c564fdd3154003ae3cddf3147b)

4 years agoradeonsi: release saved resources in si_compute_expand_fmask
Pierre-Eric Pelloux-Prayer [Thu, 9 Jan 2020 13:39:24 +0000 (14:39 +0100)]
radeonsi: release saved resources in si_compute_expand_fmask

Fixes: 095a58204d9 ("radeonsi: expand FMASK before MSAA image stores are used")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit 6c019e28caf2124b13d2ea5d87e936bf43d8b4fd)

4 years agoradeonsi: release saved resources in si_retile_dcc
Pierre-Eric Pelloux-Prayer [Thu, 9 Jan 2020 13:32:11 +0000 (14:32 +0100)]
radeonsi: release saved resources in si_retile_dcc

Fixes: 1f21396431a ("radeonsi: add support for displayable DCC for multi-RB chips")
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2330
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit 9211cbe07a0ffb0abdaf3da68f7aa3ee00a430d7)

4 years agoanv: Flag descriptors dirty when gl_NumWorkgroups is used
Jason Ekstrand [Wed, 8 Jan 2020 20:47:11 +0000 (14:47 -0600)]
anv: Flag descriptors dirty when gl_NumWorkgroups is used

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
(cherry picked from commit ae72d1238c758404df045a82c36803dbccd93b31)

4 years agoanv: fix intel perf queries availability writes
Lionel Landwerlin [Wed, 18 Dec 2019 07:16:44 +0000 (09:16 +0200)]
anv: fix intel perf queries availability writes

The availability is not written at the location changed in
ee6fbb95a74d...

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: ee6fbb95a74d ("anv: Properly handle host query reset of performance queries")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
(cherry picked from commit 60e0db3bfb05660fb3d2c868838635d667f8966a)

4 years agomesa: Prevent _MaxLevel from being less than zero
Thong Thai [Tue, 7 Jan 2020 21:38:25 +0000 (16:38 -0500)]
mesa: Prevent _MaxLevel from being less than zero

When decoding using VDPAU, the _MaxLevel value becomes -1 due to
NumLevels being equal to 0 at a certain point, and decoding fails
due to an assertion later on.

Signed-off-by: Thong Thai <thong.thai@amd.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Cc: 19.2 19.3 <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 3a4f8c8158df304af08681edbbfdfd40e43a6829)

4 years agoac/gpu_info: always use distributed tessellation on gfx10
Marek Olšák [Tue, 31 Dec 2019 02:27:02 +0000 (21:27 -0500)]
ac/gpu_info: always use distributed tessellation on gfx10

This might fix a hang on Navi14.

Cc: 19.2 19.3 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
(cherry picked from commit 186335d17d69c4a6b0ad69b82fe0744e4910645e)

4 years agodocs: add SHA256 sums for 19.3.2
Dylan Baker [Thu, 9 Jan 2020 18:30:32 +0000 (10:30 -0800)]
docs: add SHA256 sums for 19.3.2

4 years agoVERSION: bump for 19.3.2
Dylan Baker [Thu, 9 Jan 2020 18:11:04 +0000 (10:11 -0800)]
VERSION: bump for 19.3.2

4 years agodocs: Add release notes for 19.3.2
Dylan Baker [Thu, 9 Jan 2020 18:10:46 +0000 (10:10 -0800)]
docs: Add release notes for 19.3.2

4 years agoanv: don't close invalid syncfd semaphore
Lionel Landwerlin [Mon, 6 Jan 2020 14:38:19 +0000 (16:38 +0200)]
anv: don't close invalid syncfd semaphore

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
(cherry picked from commit 4578d4ae524ad433933e077bce6a0b85643e3f25)

4 years agoradeonsi: check ctx->sdma_cs before using it
Pierre-Eric Pelloux-Prayer [Tue, 7 Jan 2020 14:57:10 +0000 (15:57 +0100)]
radeonsi: check ctx->sdma_cs before using it

e5167a9276de1f383888714b41d3a9be2b9c1da9 disabled SDMA for gfx8.
This caused 3 piglit arb_sparse_buffer tests (basic, buffer-data
and commit) to crash on GFX8.

Reported-by: Michel Dänzer <michel@daenzer.net>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Fixes: e5167a9276d ("radeonsi: disable SDMA on gfx8 to fix corruption on RX 580")
(cherry picked from commit 5f8daae4d829c9f734d2f41058990809d2dba349)
Conflicts resolved by Dylan Baker

Conflicts:
src/gallium/drivers/radeonsi/si_buffer.c

4 years agomain: allow external textures for BindImageTexture
Yevhenii Kolesnikov [Thu, 2 Jan 2020 13:06:48 +0000 (15:06 +0200)]
main: allow external textures for BindImageTexture

From issue 10 of the OES_EGL_image_external_essl3:

  A limited set of use-cases is enabled by making glBindImageTexture
  accept external textures. Shaders can access such external textures
  using the existing <image2D> sampler type.

Fixes: 02a6d901eee ("mesa: add OES_EGL_image_external_essl3 support")

Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit ed43dd62acc045e71d73dc28b74b6a9a9d52286f)

4 years agointel/nir: Add a memory barrier before barrier()
Jason Ekstrand [Tue, 7 Jan 2020 19:20:10 +0000 (13:20 -0600)]
intel/nir: Add a memory barrier before barrier()

Our barrier instruction does not implicitly do a memory fence but the
GLSL barrier() intrinsic is supposed to.  The easiest back-portable
solution is to just add the NIR barriers.  We'll sort this out more
properly in later commits.

Cc: mesa-stable@lists.freedesktop.org
Closes: #2138
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
(cherry picked from commit 803fad43c3f9a89f0d8409bd33280b5457b104c7)

4 years agoradv: Emit a BATCH_BREAK when changing pixel shaders or CB_TARGET_MASK.
Bas Nieuwenhuizen [Sun, 5 Jan 2020 14:03:51 +0000 (15:03 +0100)]
radv: Emit a BATCH_BREAK when changing pixel shaders or CB_TARGET_MASK.

Fixes a hang on Raven with Resident Evil 2.

I did not find anything more restricted to fix it:

- Setting persistent_states_per_bin to 1 fixes it too,
  but likely does an internal break on any descriptor set changes
  too.
- Only breaking the batch when cb_target_mask changes does not fix
  it (and looking at AMDVLK comments, I suspect the code in radeonsi
  should really be doing a FLUSH_DFSM).
- Always doing a FLUSH_DFSM on shader switch helps, but that is more
  often than this and I don't think we should be doing that when DFSM
  is disabled.
- Also emitting the existing break on framebuffer change when DFSM is
  disabled does not fix the issue.

Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2315
CC: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
(cherry picked from commit 7cc0702bbb955010600fcb2685edb4ba703561a8)

4 years agoradeonsi: disable SDMA on gfx8 to fix corruption on RX 580
Marek Olšák [Thu, 2 Jan 2020 22:29:01 +0000 (17:29 -0500)]
radeonsi: disable SDMA on gfx8 to fix corruption on RX 580

Closes: #1399
Closes: #1889

Cc: 19.2 19.3 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-By: Timur Kristóf <timur.kristof@gmail.com>
(cherry picked from commit e5167a9276de1f383888714b41d3a9be2b9c1da9)

Conflicts:
src/gallium/drivers/radeonsi/si_pipe.c

4 years agocherry-ignore: update for 19.3.2
Dylan Baker [Tue, 7 Jan 2020 17:11:21 +0000 (09:11 -0800)]
cherry-ignore: update for 19.3.2

4 years agoglsl/nir: do not change an element index to have correct block name
Andrii Simiklit [Wed, 17 Jul 2019 12:05:49 +0000 (15:05 +0300)]
glsl/nir: do not change an element index to have correct block name

When SSBO array is used with packed layout, both IR tree
and as a result, NIR tree will be incorrect.
In fact, the SSBO dereference indices won't
match the array size in some cases like the following:

"layout(packed, binding=1) buffer SSBO { vec4 a; } ssbo[3];
 out vec4 color;
 void main() {
   color = ssbo[2].a;
 }"

After linking the IR and then NIR will have an SSBO array
definition with size 1 but dereference still will have index 2
and linked_shader->Program->sh.ShaderStorageBlocks
will contain just SSBO with name "SSBO[2]"

So this line should be removed at least as a workaround for now
to avoid error like:
Failed to find the block by name "SSBO[0]"

Fixes: 810dde2a "glsl/nir: Add a pass to lower UBO and SSBO access"
Signed-off-by: Andrii Simiklit <andrii.simiklit@globallogic.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
(cherry picked from commit be6d51e1e3a2b2165cd21fbdda2527d10f4ce9ff)

4 years agoglsl: fix a binding points assignment for ssbo/ubo arrays
Andrii Simiklit [Tue, 5 Mar 2019 15:58:53 +0000 (17:58 +0200)]
glsl: fix a binding points assignment for ssbo/ubo arrays

This is needed to be in agreement with spec requirements:
https://github.com/KhronosGroup/OpenGL-API/issues/46

Piers Daniell:
   "We discussed this in the OpenGL/ES working group meeting
    and agreed that eliminating unused elements from the interface
    block array is not desirable. There is no statement in the spec
    that this takes place and it would be highly implementation
    dependent if it happens. If the application has an "interface"
    in the shader they need to match up with the API it would be
    quite confusing to have the binding point get compacted.
    So the answer is no, the binding points aren't affected by
    unused elements in the interface block array."

v2: - 'original_dim_size' field moved above to keep
      the struct packed better on 64-bit
    - added a comment for 'total_num_array_elements' field
    - fixed a binding point calculations for SSBOs array of arrays
          ( Ian Romanick <ian.d.romanick@intel.com> )
    - fixed binding point calculations for non-packed SSBOs
v3:
    - rename 'total_num_array_elements' to 'aoa_size'
          ( Jason Ekstrand <jason@jlekstrand.net> )
    - rename 'boffset' to 'binding_stride'
          ( Alejandro Piñeiro <apinheiro@igalia.com> )

Fixes: 8cf1333b "glsl: link uniform block arrays of arrays"
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109532
Reported-By: Ilia Mirkin <imirkin@alum.mit.edu>
Tested-by: Fritz Koenig <frkoenig@google.com>
Signed-off-by: Andrii Simiklit <andrii.simiklit@globallogic.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
(cherry picked from commit 4beb0a23088e68693e94599ef36eb41cbcd59289)

4 years agoglsl: fix an incorrect max_array_access after optimization of ssbo/ubo
Andrii Simiklit [Tue, 5 Mar 2019 15:38:20 +0000 (17:38 +0200)]
glsl: fix an incorrect max_array_access after optimization of ssbo/ubo

This is needed to fix these tests:
piglit.spec.arb_shader_storage_buffer_object.compiler.unused-array-element_frag
piglit.spec.arb_shader_storage_buffer_object.compiler.unused-array-element_comp

Fixes: 8cf1333b "glsl: link uniform block arrays of arrays"
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109532
Reported-By: Ilia Mirkin <imirkin@alum.mit.edu>
Tested-by: Fritz Koenig <frkoenig@google.com>
Signed-off-by: Andrii Simiklit <andrii.simiklit@globallogic.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
(cherry picked from commit a3c9a2881e242b9ac588d6dcb158e805fefe352d)

4 years agoradv: Only use the gfx mipmap level offset/pitch for linear textures.
Bas Nieuwenhuizen [Fri, 3 Jan 2020 10:25:31 +0000 (11:25 +0100)]
radv: Only use the gfx mipmap level offset/pitch for linear textures.

The tiled-case is non-sensical for non-base mips, but Vulkan requires
that this function handles it but at the same time does not require
returning anything useful. So we can basically return anything.

Correct tiled pitch and offset are still required for our own WSI and
in the future getting the layouts of images with DRM format modifiers.
Both don't have to deal with images with more than 1 level though.

Fixes: 824bd0830e8 "radv: return the correct pitch for linear mipmaps on GFX10"
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2301
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2304
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit 17741a0a05722245314e8ce9a3d5191feb63d9bd)

4 years agoradv: return the correct pitch for linear mipmaps on GFX10
Samuel Pitoiset [Mon, 30 Dec 2019 12:47:30 +0000 (13:47 +0100)]
radv: return the correct pitch for linear mipmaps on GFX10

On GFX9, the pitch of a level is always the pitch of the entire image
but not on GFX10.

This fixes graphics glithes with Halo - The Master Chief Collection.

Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2188
CC: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
(cherry picked from commit 824bd0830e811a7b6347bbd5c30e0a76bc7daf60)

4 years agospirv: Fix glsl type assert in spir2nir.
Bas Nieuwenhuizen [Wed, 1 Jan 2020 13:56:26 +0000 (14:56 +0100)]
spirv: Fix glsl type assert in spir2nir.

Fixes: 624789e3708 "compiler/glsl: handle case where we have multiple users for types"
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
(cherry picked from commit 96c9483ccf5bc9116f7b754a0ccbc09097275083)

Conflicts:
src/compiler/spirv/spirv2nir.c

4 years agor600: Fix maximum line width
Gert Wollny [Sat, 28 Dec 2019 14:35:13 +0000 (15:35 +0100)]
r600: Fix maximum line width

There are only 13 bits available to store the line width, hence
it can't be larger than 8191

v2: Add Fixes tag

v3: - Unify value since for all r600 archs (Konstantin Kharlamov)
    - Correct the value the line width value is emitted as a 12.4
      fixed point value of 1/2 line width on r600-r700 and as
      8 * line width on Evergreen and newer.

Fixes: 06bfb2d28f7adca7edc6be9c210a7a3583023652
    r600: fork and import gallium/radeon

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Konstantin Kharlamov <hi-angel@yandex.ru>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3286>
(cherry picked from commit e8559ae4484c3240c81c0cbf49caf5be338f8395)

4 years agoanv: Ignore some CreateInfo structs when rasterization is disabled
Caio Marcelo de Oliveira Filho [Fri, 3 Jan 2020 21:23:32 +0000 (13:23 -0800)]
anv: Ignore some CreateInfo structs when rasterization is disabled

According to the description of VkGraphicsPipelineCreateInfo(),
pViewportState, pMultisampleState, pDepthStencilState and
pColorBlendState must be ignored when rasterization is not enabled.

This avoids potentially invalid pointers being dereferenced when
rasterization is disabled.  Tested with `demos_x64 VK_Parameter_Zoo`
from Renderdoc repository.

v2: Don't store the `raster_enabled` as part of anv_pipeline, just
    query it from the create info.  This avoids storing a state that's
    only used during pipeline creation. (Jason)

Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2258
Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch> [v1]
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> [v1]
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
(cherry picked from commit 75a19186b2aad7e588f04e1c554cdfd315dd848a)

4 years agonir: Add clone/hash/serialize support for non-uniform tex instructions.
Bas Nieuwenhuizen [Wed, 1 Jan 2020 13:42:58 +0000 (14:42 +0100)]
nir: Add clone/hash/serialize support for non-uniform tex instructions.

These were missed when the fields got added. Added it everywhere where
texture_index got used and it made sense.

Found this in "The Surge 2", where the inliner does not copy the fields,
resulting in corruption and hangs.

Fixes: 3bd54576415 "nir: Add a lowering pass for non-uniform resource access"
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1203
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3246>
(cherry picked from commit 69bdc1c5fccbd9c0ef5354675b069ffb1383769e)

4 years agoaco: Fix uniform i2i64.
Timur Kristóf [Tue, 31 Dec 2019 12:39:56 +0000 (13:39 +0100)]
aco: Fix uniform i2i64.

Fixes 240 failing test cases in dEQP-VK.spirv_assembly which
were failing due to a bad s_ashr_i32 instruction. This commit
fixes the instruction format along with the definitions of the
instruction.

Fixes: 11f43caaeca166c96ae49dbd506b6f58dd4a13fb
Cc: 19.3 <mesa-stable@lists.freedesktop.org>
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
(cherry picked from commit 11e62a9734c631fa38f1e7b415f5b98f6a28589f)

4 years agowinsys/radeon: initialize pte_fragment_size
Marek Olšák [Fri, 27 Dec 2019 23:02:33 +0000 (18:02 -0500)]
winsys/radeon: initialize pte_fragment_size

Cc: 19.2 19.3 <mesa-stable@lists.freedesktop.org>
Closes: #2179

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
(cherry picked from commit 84b82f8cd1c9d0a03e68af3a68fb0b009be70780)

4 years agometa: Cleanup function for DrawTex
Yevhenii Kolesnikov [Fri, 19 Jul 2019 12:10:25 +0000 (15:10 +0300)]
meta: Cleanup function for DrawTex

Buffer object was never freed, causing memory leaks.

Fixes: 76cfe2bc443 ("meta: Don't pollute the buffer object namespace in _mesa_meta_DrawTex")
CC: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/1390>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/1390>
(cherry picked from commit b318bc2072d42a58b491dac3aa6118012d92e5bb)

4 years agoamd/common: Handle alignment of 96-bit formats.
Bas Nieuwenhuizen [Mon, 23 Dec 2019 01:02:20 +0000 (02:02 +0100)]
amd/common: Handle alignment of 96-bit formats.

addrlib doesn't quite do it right, so do it ourselves.

Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2162
CC: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit 88f567b5ce3c692dbee60ba58df3af7c614e4333)

4 years agomesa: avoid returning a value in a void function
Eric Engestrom [Fri, 27 Dec 2019 21:50:24 +0000 (21:50 +0000)]
mesa: avoid returning a value in a void function

Fixes: 1d1722e91070d7c37687 ("mesa: add EXT_dsa NamedProgram functions")
Cc: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
(cherry picked from commit a6873a8df2393777975ae3043a395d79e495b365)

4 years agonine: fix empty-body-issues
Eric Engestrom [Thu, 31 Oct 2019 01:26:05 +0000 (01:26 +0000)]
nine: fix empty-body-issues

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Fixes: 8d43e2b2ded0fe3c82d4 ("meson: add -Werror=empty-body to disallow `if(x);`")
Reviewed-By: Timur Kristóf <timur.kristof@gmail.com>
(cherry picked from commit ff3a2576a45e012b1cd8fbf73b9967083d6fce0e)