mesa.git
4 years agoradeonsi: move L2_CACHE_CONTROL registers into si_emit_framebuffer_state
Marek Olšák [Fri, 20 Mar 2020 01:37:15 +0000 (21:37 -0400)]
radeonsi: move L2_CACHE_CONTROL registers into si_emit_framebuffer_state

the next commit will set more fields.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5383>

4 years agoradeonsi: implement R9G9B9E5 render target and image store support on gfx10.3
Marek Olšák [Tue, 23 Jul 2019 04:36:05 +0000 (00:36 -0400)]
radeonsi: implement R9G9B9E5 render target and image store support on gfx10.3

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5383>

4 years agoradeonsi: enable larger SDMA clears and copies on gfx10.3
Marek Olšák [Tue, 3 Sep 2019 21:54:47 +0000 (17:54 -0400)]
radeonsi: enable larger SDMA clears and copies on gfx10.3

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5383>

4 years agoradeonsi: honor a user-specified pitch on gfx10.3
Marek Olšák [Thu, 26 Sep 2019 20:59:23 +0000 (16:59 -0400)]
radeonsi: honor a user-specified pitch on gfx10.3

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5383>

4 years agoac/surface: add displayable DCC code for gfx10.3
Marek Olšák [Sat, 18 Apr 2020 00:44:39 +0000 (20:44 -0400)]
ac/surface: add displayable DCC code for gfx10.3

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5383>

4 years agoac,radeonsi: start adding support for gfx10.3
Marek Olšák [Fri, 27 Mar 2020 02:02:13 +0000 (22:02 -0400)]
ac,radeonsi: start adding support for gfx10.3

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5383>

4 years agoac,radeonsi: replace == GFX10 with >= GFX10 where it's needed
Marek Olšák [Fri, 27 Mar 2020 02:01:33 +0000 (22:01 -0400)]
ac,radeonsi: replace == GFX10 with >= GFX10 where it's needed

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5383>

4 years agoradeonsi: enable ARB_sparse_buffer
Marek Olšák [Wed, 6 May 2020 19:18:25 +0000 (15:18 -0400)]
radeonsi: enable ARB_sparse_buffer

This seems to be working now, but it wasn't working before.
I don't know what fixed this. Tested on Raven and Navi14.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5402>

4 years agotu: Fix context faults loading unused descriptor sets
Connor Abbott [Tue, 9 Jun 2020 12:40:58 +0000 (14:40 +0200)]
tu: Fix context faults loading unused descriptor sets

The app is allowed to never bind descriptor sets that are statically
unused by the pipeline, which would've caused a context fault since
CP_LOAD_STATE6 would try to load the descriptors that don't exist. Fix
this by not preloading descriptors from unused descriptor sets. We could
do more fine-grained accounting of which descriptors are used, but this
is enough to fix the problem.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5400>

4 years agoi965: Work around incorrect usage of glDrawRangeElements in UE4
Danylo Piliaiev [Mon, 25 May 2020 16:07:08 +0000 (19:07 +0300)]
i965: Work around incorrect usage of glDrawRangeElements in UE4

Unreal Engine 4 has a bug in usage of glDrawRangeElements,
causing it to be called with a number of vertices in place
of "end" parameter (which specifies the maximum array index
contained in indices).

Since there is unknown amount of games affected and we
could not identify that a game is built with UE4 - we are
forced to make a blanket workaround, disregarding max_index
in range calculations. Fortunately all such calls look like:
  glDrawRangeElements(GL_TRIANGLES, 0, 3, 3, ...);
So we are able to narrow down this workaround.

This was uncovered after b684030c3a656ffdbc93581856034e0982db46fd
broke a bunch of UE4 games.

Cc: 20.1 <mesa-stable@lists.freedesktop.org>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2917
Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5203>

4 years agotu: Rewrite flushing to use barriers
Connor Abbott [Thu, 2 Apr 2020 15:48:19 +0000 (17:48 +0200)]
tu: Rewrite flushing to use barriers

Replace the various ad-hoc flushes that we've inserted, copied from
freedreno, etc. with a unified system that uses the user-supplied
information via vkCmdPipelineBarrier() and subpass dependencies.

There are a few notable differences in behavior:

- We now move setting RB_CCU_CNTL up a little in the gmem case, but
hopefully that won't matter too much. This matches what the Vulkan blob
does.

- We properly implement delayed setting of events, completing our
implementaton of events.

- Finally, of course, we should be a lot less flush-happy. We won't emit
useless CCU/cache flushes with multiple copies, renderpasses, etc. that
don't depend on each other, and also won't flush/invalidate the cache
around renderpasses unless we actually need to.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4964>

4 years agotu: Remove useless event_write helpers
Connor Abbott [Thu, 2 Apr 2020 14:55:00 +0000 (16:55 +0200)]
tu: Remove useless event_write helpers

tu6_emit_cache_flush() was wrongly named, and with the removal of the
last parameter both are useless.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4964>

4 years agotu: Don't actually track seqno's for events
Connor Abbott [Tue, 9 Jun 2020 13:30:43 +0000 (15:30 +0200)]
tu: Don't actually track seqno's for events

We just dropped the last user which actually cared about the seqno.
This never worked anyway, since the seqno was never reset between
multiple executions of the same command buffer. Turn the part of the
control buffer which used to track the seqno into a dummy dword, and
figure out automatically whether we need to include it. We will
implement seqnos again eventually, with timline semaphores, but that
will likely be totally different.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4964>

4 years agotu: Remove useless post-binning flushes
Connor Abbott [Tue, 9 Jun 2020 13:25:40 +0000 (15:25 +0200)]
tu: Remove useless post-binning flushes

The Vulkan blob doesn't do this, and based on my understanding of how
the blob works this is unnecessary. CACHE_FLUSH is already serialized
against all 3d commands so you don't need to wait for rendering commands
to finish before issuing it, and the subsequent wfi + WAIT_FOR_ME will
cause the CP to wait for the CACHE_FLUSH to finish, so there's also no
need to wait for it to complete. The CACHE_INVALIDATE also seems
unnecessary, and also isn't done by the blob.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4964>

4 years agopanfrost: Mark PIPE_BUFFER BOs as not renderable
Icecream95 [Sat, 4 Apr 2020 23:49:07 +0000 (11:49 +1200)]
panfrost: Mark PIPE_BUFFER BOs as not renderable

Without this, memory usage explodes by 16x due to height alignment.

Closes: #2715
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4451>

4 years agowinsys/radeon: do not cast bo->va as void*
Pierre-Eric Pelloux-Prayer [Fri, 5 Jun 2020 12:40:01 +0000 (14:40 +0200)]
winsys/radeon: do not cast bo->va as void*

Using a util_hash_table_create_ptr_keys to store bo->va address doesn't
work on 32 bits.
This commit makes radeon_drm_winsys::bo_vas a hash_table_u64 instead.

Tested by Miklós Máté.

CC: 20.1 <mesa-stable@lists.freedesktop.org>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3056
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5380>

4 years agoci: use separate docker images for baremetal builds
Christian Gmeiner [Sun, 7 Jun 2020 21:19:50 +0000 (23:19 +0200)]
ci: use separate docker images for baremetal builds

Using arm_test-base as a separate base layer as well for storage &
network bandwidth efficiency.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5381>

4 years agoci: add arm_test-base docker image
Christian Gmeiner [Sun, 7 Jun 2020 20:03:34 +0000 (22:03 +0200)]
ci: add arm_test-base docker image

Similar to x86_build-base.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5381>

4 years agoradv/llvm: expose VK_EXT_shader_demote_to_helper_invocation with LLVM 9+
Samuel Pitoiset [Fri, 5 Jun 2020 13:58:36 +0000 (15:58 +0200)]
radv/llvm: expose VK_EXT_shader_demote_to_helper_invocation with LLVM 9+

It should already work with the LLVM backend.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5361>

4 years agoglthread: sync in glFlush for multiple contexts
Marek Olšák [Mon, 8 Jun 2020 12:46:10 +0000 (08:46 -0400)]
glthread: sync in glFlush for multiple contexts

See the code comment.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5382>

4 years agogallium/u_vbuf: add a faster path for uploading non-interleaved attribs
Marek Olšák [Mon, 1 Jun 2020 19:56:12 +0000 (15:56 -0400)]
gallium/u_vbuf: add a faster path for uploading non-interleaved attribs

+1% higher FPS in torcs.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5304>

4 years agogallium/u_vbuf: get rid of some pointer dereferences
Marek Olšák [Mon, 1 Jun 2020 19:49:36 +0000 (15:49 -0400)]
gallium/u_vbuf: get rid of some pointer dereferences

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5304>

4 years agonir: use bitfield_insert instead of bfi in nir_lower_double_ops
Ben Skeggs [Sat, 6 Jun 2020 06:58:00 +0000 (16:58 +1000)]
nir: use bitfield_insert instead of bfi in nir_lower_double_ops

NVIDIA hardware doesn't have an equivilant to bfi, but we do already have
a lowering for bitfield_insert->bfi.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5373>

4 years agoturnip: fix VFD_CONTROL for binning pass
Jonathan Marek [Sat, 6 Jun 2020 17:06:34 +0000 (13:06 -0400)]
turnip: fix VFD_CONTROL for binning pass

Fixes some cases with TU_DEBUG=forcebin, specifically the failures in:
dEQP-VK.glsl.*_vertex

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5370>

4 years agoturnip: use common emit_xs_cntl to fill a6xx_sp_xs_ctrl_reg0
Jonathan Marek [Sat, 6 Jun 2020 15:38:18 +0000 (11:38 -0400)]
turnip: use common emit_xs_cntl to fill a6xx_sp_xs_ctrl_reg0

Note this changes the value of SP_GS_CTRL_REG0, by using FOUR_QUADS and
setting MERGEDREGS. ir3 expects MERGEDREGS, and using FOUR_QUADS instead
of TWO_QUADS doesn't seem to hurt.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5370>

4 years agoturnip: fix HW binning with geometry shader
Jonathan Marek [Sat, 6 Jun 2020 15:26:11 +0000 (11:26 -0400)]
turnip: fix HW binning with geometry shader

Fixes failures with TU_DEBUG=forcebin and geometry shaders, for example:
dEQP-VK.binding_model.*geometry*
dEQP-VK.transform_feedback.simple.query*

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5370>

4 years agoturnip: correctly emit non-binning vs in transform feedback case
Jonathan Marek [Sat, 6 Jun 2020 15:21:58 +0000 (11:21 -0400)]
turnip: correctly emit non-binning vs in transform feedback case

The offset given to tu6_emit_shader_object was wrong, binning_vs_offset
should only be used when using the binning pass vs.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5370>

4 years agofreedreno/a6xx: use nonbinning VS when GS is used
Jonathan Marek [Sat, 6 Jun 2020 15:16:16 +0000 (11:16 -0400)]
freedreno/a6xx: use nonbinning VS when GS is used

The current "ds = state->bs" seems broken, and the "vs = state->bs" is
unnecessary (already set above). Since it was added as part of a GS-related
patch, I think this is what was intended.

Note: tesselation disables GMEM rendering so we shouldn't have to worry
about hs/ds + binning interaction.

Fixes: 0eebedb6190fdab8956769 ("freedreno/a6xx: Emit program state for GS")
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5370>

4 years agoturnip: clamp sampler minLod/maxLod
Jonathan Marek [Sun, 7 Jun 2020 02:08:41 +0000 (22:08 -0400)]
turnip: clamp sampler minLod/maxLod

Otherwise A6XX_TEX_SAMP_1_{MIN,MAX}_LOD silently overflows.

This fixes these tests:
dEQP-VK.texture.explicit_lod.2d.derivatives.*

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5375>

4 years agoturnip: update some properties based on blob driver
Jonathan Marek [Sun, 7 Jun 2020 02:07:09 +0000 (22:07 -0400)]
turnip: update some properties based on blob driver

subTexelPrecisionBits/mipmapPrecisionBits change fixes some failures in:
dEQP-VK.texture.explicit_lod.*

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5375>

4 years agoturnip: move HLSQ_UPDATE_CNTL write to before xs config writes
Jonathan Marek [Sun, 7 Jun 2020 17:06:42 +0000 (13:06 -0400)]
turnip: move HLSQ_UPDATE_CNTL write to before xs config writes

This matches the blob and gallium driver more closely, and fixes a
rendering issue observed on a650.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5376>

4 years agonir: Fix logic that ends combine barrier sequence
Caio Marcelo de Oliveira Filho [Sat, 6 Jun 2020 06:05:42 +0000 (23:05 -0700)]
nir: Fix logic that ends combine barrier sequence

The combination must stop when we see a scoped barrier that have
execution scope, i.e. it has control barrier behavior.  The code was
mistakenly looking at the wrong scope.

Fixes: 345b5847b42 ("nir: Replace the scoped_memory barrier by a scoped_barrier")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5365>

4 years agointel/fs: Add Fall-through comment
Caio Marcelo de Oliveira Filho [Fri, 5 Jun 2020 23:04:13 +0000 (16:04 -0700)]
intel/fs: Add Fall-through comment

Just to clarify the missing break is intentional.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5365>

4 years agospirv: Memory semantics is optional for OpControlBarrier
Caio Marcelo de Oliveira Filho [Fri, 5 Jun 2020 22:58:32 +0000 (15:58 -0700)]
spirv: Memory semantics is optional for OpControlBarrier

Fixes: 3ed2123d77d ("spirv: Use scoped barriers for SpvOpControlBarrier")
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5365>

4 years agonir: Fix printing execution scope of a scoped barrier
Caio Marcelo de Oliveira Filho [Fri, 5 Jun 2020 22:26:47 +0000 (15:26 -0700)]
nir: Fix printing execution scope of a scoped barrier

Fixes: 345b5847b42 ("nir: Replace the scoped_memory barrier by a scoped_barrier")
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5365>

4 years agoetnaviv: drop translate_blend(..)
Christian Gmeiner [Sat, 6 Jun 2020 10:28:13 +0000 (12:28 +0200)]
etnaviv: drop translate_blend(..)

PIPE_BLEND_* matches 1:1 the hardware defines.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4187>

4 years agoglsl: inline functions with unsupported return type before converting to nir
Danylo Piliaiev [Fri, 29 May 2020 10:51:32 +0000 (13:51 +0300)]
glsl: inline functions with unsupported return type before converting to nir

glsl_to_nir doesn't expect non-vector/scalar return types in functions.

Fixes: 7e60d5a501f311fa5e7bca5335adc6013dc1aeb9
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3058
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3060
Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Tested-by: Witold Baryluk <witold.baryluk@gmail.com>
Reviewed-by: Witold Baryluk <witold.baryluk@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5333>

4 years agoaco: use v_xor3_b32
Rhys Perry [Thu, 4 Jun 2020 13:36:00 +0000 (14:36 +0100)]
aco: use v_xor3_b32

fossil-db (Navi):
Totals from 334 (0.26% of 128321) affected shaders:
CodeSize: 3345532 -> 3345484 (-0.00%); split: -0.00%, +0.00%
Instrs: 624662 -> 622778 (-0.30%); split: -0.30%, +0.00%

Mostly affects some parallel-rdp shaders

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5357>

4 years agoac/gpu_info, radv: set max_wave64_per_simd to 20 on GFX10
Rhys Perry [Thu, 4 Jun 2020 14:03:11 +0000 (15:03 +0100)]
ac/gpu_info, radv: set max_wave64_per_simd to 20 on GFX10

Fixes RADV max_waves reporting for GFX10

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5356>

4 years agonir/lower_explicit_io: fix NON_UNIFORM access for UBO loads
Samuel Pitoiset [Wed, 3 Jun 2020 12:35:02 +0000 (14:35 +0200)]
nir/lower_explicit_io: fix NON_UNIFORM access for UBO loads

Make sure to propagate the NON_UNIFORM access for UBO loads, so
that non-uniform loads are correctly lowered.

Cc: <mesa-stable@lists.freedesktop.org>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5311>

4 years agonir/spirv/glsl450: increase asin(x) precision
Arcady Goldmints-Orlov [Wed, 15 Apr 2020 21:55:53 +0000 (16:55 -0500)]
nir/spirv/glsl450: increase asin(x) precision

asin(x) is now implemented using a piecewise approximation, which
improves the precision for |x| < 0.5
Previously, we were using a polynomial approximation for both the
asin() and acos() functions. Unfortunately, for asin(), this polynomial
does not have enough precision to satisfy the Vulkan CTS requiremenents,
which define the asin() precision based on the precision of
atan2(x, sqrt(1.0 - x*x)). The piecewise approximation gives the needed
precision in the problematic range.

v2: Skip the piecewise approximation for acos

Closes: #1843
Acked-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3809>

4 years agoac/nir: adjust an assertion for D16 on GFX6-GFX7
Samuel Pitoiset [Thu, 4 Jun 2020 07:28:16 +0000 (09:28 +0200)]
ac/nir: adjust an assertion for D16 on GFX6-GFX7

16-bit types can be used with MUBUF on GFX6-GFX7.

Fixes: c3e0ba52a0a ("ac/nir: support 16-bit data in buffer_load_format opcodes")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5325>

4 years agov3d_bufmgr: fix time_t printf
Peter Seiderer [Sun, 22 Mar 2020 12:03:00 +0000 (13:03 +0100)]
v3d_bufmgr: fix time_t printf

Fixes:

  error: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘time_t’ {aka ‘long long int’}

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4279>

4 years agopan_bo.h: add time.h include for time_t
Peter Seiderer [Sun, 22 Mar 2020 10:48:31 +0000 (11:48 +0100)]
pan_bo.h: add time.h include for time_t

Fixes:

  ../src/gallium/drivers/panfrost/pan_bo.h:93:9: error: unknown type name ‘time_t’

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4279>

4 years agovc4_bufmgr: fix time_t printf
Peter Seiderer [Sun, 22 Mar 2020 10:42:35 +0000 (11:42 +0100)]
vc4_bufmgr: fix time_t printf

Fixes:

  error: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘time_t’ {aka ‘long long int’}

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4279>

4 years agoglsl: fix potential slow compile times for GLSLOptimizeConservatively
Timothy Arceri [Fri, 5 Jun 2020 03:57:40 +0000 (13:57 +1000)]
glsl: fix potential slow compile times for GLSLOptimizeConservatively

See code comment for full description of the change.

Fixes: 0a5018c1a483 ("mesa: add gl_constants::GLSLOptimizeConservatively")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3034
Tested-by: Witold Baryluk <witold.baryluk@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5346>

4 years agollvmpipe: do not enable tessellation shader without llvm coroutines support
Charmaine Lee [Fri, 5 Jun 2020 00:46:33 +0000 (17:46 -0700)]
llvmpipe: do not enable tessellation shader without llvm coroutines support

Tessellation shader in llvmpipe depends on llvm coroutines support. So do not
advertise tessellation shader support in llvmpipe if GALLIVM_HAVE_CORO is FALSE.

This fixes assertion in LLVMTokenTypeInContext() running tessellation shader
tests with llvm version < 6.

Fixes: eb522717 "llvmpipe: add support for tessellation shaders"
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Neha Bhende <bhenden@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5366>

4 years agointel/compiler: fix Android build
Marcin Ślusarz [Fri, 5 Jun 2020 09:52:42 +0000 (11:52 +0200)]
intel/compiler: fix Android build

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Fixes: 689acc739899 ("intel/compiler: Extract control barriers from scoped barriers")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3087
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5354>

4 years agointel/genxml: Migrate from deprecated xml.etree.ElementTree getchildren.
Vinson Lee [Fri, 5 Jun 2020 07:36:55 +0000 (00:36 -0700)]
intel/genxml: Migrate from deprecated xml.etree.ElementTree getchildren.

xml.etree.ElementTree getchildren was deprecated since Python 2.7 and
will be removed in Python 3.9.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5348>

4 years agoandroid: svga: fix build for GL4.1 support
Mauro Rossi [Fri, 5 Jun 2020 20:33:48 +0000 (22:33 +0200)]
android: svga: fix build for GL4.1 support

Fixes the following building errors:

external/mesa/src/gallium/drivers/svga/svga_context.c:184: error: undefined reference to 'svga_init_ts_functions'
external/mesa/src/gallium/drivers/svga/svga_context.c:100: error: undefined reference to 'svga_cleanup_tcs_state'
out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_pipe_svga_intermediates/libmesa_pipe_svga.a(svga_state.o):svga_state.c:hw_draw_state_sm5: error: undefined reference to 'svga_hw_tes'
out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_pipe_svga_intermediates/libmesa_pipe_svga.a(svga_state.o):svga_state.c:hw_draw_state_sm5: error: undefined reference to 'svga_hw_tcs'

Fixes: ccb4ea5a "svga: Add GL4.1(compatibility profile) support in svga driver"
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5364>

4 years agoandroid: util: fix build for GL4.1 support
Mauro Rossi [Fri, 5 Jun 2020 20:37:38 +0000 (22:37 +0200)]
android: util: fix build for GL4.1 support

Fixes the following building errors:

external/mesa/src/gallium/drivers/svga/svga_state_tgsi_transform.c:154: error: undefined reference to 'tgsi_write_vpos'
external/mesa/src/gallium/drivers/svga/svga_state_tgsi_transform.c:201: error: undefined reference to 'tgsi_remove_dynamic_indexing'

Fixes: 48a7456f ("util: Add util functionality for GL4.1 support")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5364>

4 years agoSwitch from cElementTree to ElementTree.
Vinson Lee [Fri, 5 Jun 2020 07:46:10 +0000 (00:46 -0700)]
Switch from cElementTree to ElementTree.

The xml.etree.cElementTree module will be removed in Python 3.9. Since
Python 3.3 the xml.etree.cElementTree module has been deprecated, the
xml.etree.ElementTree module uses a fast implementation whenever
available.

Builds using Python 2.7 can still work but with the slower
implementation.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Acked-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5349>

4 years agoRevert "panfrost: Keep cached BOs mmap'd"
Icecream95 [Fri, 5 Jun 2020 04:52:23 +0000 (16:52 +1200)]
Revert "panfrost: Keep cached BOs mmap'd"

This reverts commit 794c239a990e08b5a42d42607e9c5e5b0921390c.

A kernel bug causes cached BOs to not be unmapped correctly,
triggering "bad page cache" kernel messages and causing short hangs.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5355>

4 years agopan/midgard: Use a signed value for checking inline constants
Icecream95 [Fri, 5 Jun 2020 08:17:27 +0000 (20:17 +1200)]
pan/midgard: Use a signed value for checking inline constants

Inline constants are sign extended, so we should use a int16_t instead
of an unsigned type.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5351>

4 years agofreedreno/ir3: Handle cases where we decide not to lower UBO 0 loads.
Eric Anholt [Fri, 29 May 2020 23:49:43 +0000 (16:49 -0700)]
freedreno/ir3: Handle cases where we decide not to lower UBO 0 loads.

We advertize 4096 vec4s of GL uniform storage, but the HW can only store
512 vec4s in the const buffer.

Closes: #3049
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5273>

4 years agofreedreno/ir3: Drop the max_const on a6xx to 512.
Eric Anholt [Fri, 29 May 2020 23:35:43 +0000 (16:35 -0700)]
freedreno/ir3: Drop the max_const on a6xx to 512.

The GLES blob on the p3a limits constlen to 512 between VS and FS across
a6xx gpu ids (615, 630, 640, and 650).  Experimentally, exceeding that
limit in any one stage results in rendering corruption or GPU hangs
(though my most detailed testing had a loop limit in a uniform, so that
may the cause of the hang).  Clamp the limit we use inside of a shader so
we don't exceed it within a stage.

This commit doesn't resovle limiting inter-stage.  Experimentally, I've
found that I can push up to a total of ~768 vec4s between VS and FS on
a630, with or without uniform updates between each draw.  We'll need to do
some shader key-based limiting of constlen at draw time to respect that
limit, but that's left for future work, and this commit is enough for the
google earth case that initiated this work.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5273>

4 years agofreedreno/ir3: Account for driver params in UBO max const upload.
Eric Anholt [Fri, 29 May 2020 23:31:43 +0000 (16:31 -0700)]
freedreno/ir3: Account for driver params in UBO max const upload.

The const state setup needs to be able to push its driver params, so
account for them in the analyze_ubo_ranges.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5273>

4 years agofreedreno/ir3: Stop shifting UBO 1 down to be UBO 0.
Eric Anholt [Fri, 29 May 2020 17:21:02 +0000 (10:21 -0700)]
freedreno/ir3: Stop shifting UBO 1 down to be UBO 0.

It turns out the GL uniforms file is larger than the hardware constant
file, so we need to limit how many UBOs we lower to constbuf loads.  To do
actual UBO loads, we'll need to be able to upload UBO 0's pointer or
descriptor.

No difference on nohw 1 UBO update drawoverhead case (n=35).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5273>

4 years agofreedreno/ir3: Drop unnecessary alignment of pushed UBO size.
Eric Anholt [Mon, 1 Jun 2020 18:40:36 +0000 (11:40 -0700)]
freedreno/ir3: Drop unnecessary alignment of pushed UBO size.

The analysis pass gives us vec4-aligned size, and all of our other
constbuf allocations here are in vec4 units, so we can just divide by 16.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5273>

4 years agofreedreno/ir3: Stop pushing immediates once we've filled the constbuf.
Eric Anholt [Mon, 1 Jun 2020 18:32:04 +0000 (11:32 -0700)]
freedreno/ir3: Stop pushing immediates once we've filled the constbuf.

If we filled the constbuf up with UBOs, we may need to avoid generating
more immediate push constants.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5273>

4 years agofreedreno/ir3: Refactor ir3_cp's lower_immed().
Eric Anholt [Mon, 1 Jun 2020 18:20:51 +0000 (11:20 -0700)]
freedreno/ir3: Refactor ir3_cp's lower_immed().

There was duplicated handling in the callers that we can just move inside.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5273>

4 years agofreedreno: Upload gallium constbufs as needed when referenced as a UBO.
Eric Anholt [Mon, 1 Jun 2020 18:53:22 +0000 (11:53 -0700)]
freedreno: Upload gallium constbufs as needed when referenced as a UBO.

For now we never ask to set up UBO 0 as a real UBO, so this doesn't
trigger, but it gets us ready for handling the case where UBO 0 is too big
to be push constants in the HW.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5273>

4 years agofreedreno/a6xx: Add support for ALPHA_TO_ONE.
Eric Anholt [Fri, 5 Jun 2020 00:08:18 +0000 (17:08 -0700)]
freedreno/a6xx: Add support for ALPHA_TO_ONE.

Fixes piglit ext_framebuffer_multisample-draw-buffers-alpha-to-one

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5343>

4 years agoturnip: Add support for alphaToOne.
Eric Anholt [Fri, 5 Jun 2020 00:00:59 +0000 (17:00 -0700)]
turnip: Add support for alphaToOne.

Comparing a blob trace using the feature to one not, the difference was
pretty obvious and in the spot you'd expect compared to alphaToCoverage.
The SP_ reg didn't have a corresponding bit set, though it also has an
alphaToCoverage.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5343>

4 years agoturnip: Use tu_cs_emit_regs() for BLEND_CONTROL.
Eric Anholt [Thu, 4 Jun 2020 23:51:13 +0000 (16:51 -0700)]
turnip: Use tu_cs_emit_regs() for BLEND_CONTROL.

Just a cleanup since I was in the area.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5343>

4 years agoradv: set keep_statistic_info with RADV_DEBUG=shaderstats
Rhys Perry [Fri, 5 Jun 2020 13:28:28 +0000 (14:28 +0100)]
radv: set keep_statistic_info with RADV_DEBUG=shaderstats

Needed for RADV_DEBUG=shaderstats to dump ACO statistics.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5358>

4 years agointel: fix gen_sort_tags.py
Eric Engestrom [Fri, 5 Jun 2020 09:26:56 +0000 (11:26 +0200)]
intel: fix gen_sort_tags.py

The script was failing for me (python 3.8), not sure if this is a recent
python version break or not as I don't know how often people have been
running this script:

    Processing ./gen9.xml... Traceback (most recent call last):
      File "./gen_sort_tags.py", line 177, in <module>
        main()
      File "./gen_sort_tags.py", line 170, in main
        genxml[:] = enums + sorted_structs.values() + instructions + registers
    TypeError: can only concatenate list (not "odict_values") to list

Turning the odict into a list fixes it for me, and the resulting xml
file are identical to before :)

Fixes: 903e142f0d35bc550ffd ("genxml: add a sorting script")
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5352>

4 years agoradv/aco: enable VK_KHR_shader_subgroup_extended_types on GFX6-GFX7
Samuel Pitoiset [Thu, 4 Jun 2020 08:41:50 +0000 (10:41 +0200)]
radv/aco: enable VK_KHR_shader_subgroup_extended_types on GFX6-GFX7

CTS pass on Pitcairn (GFX6). This extension isn't really useful
without 8-bit/16-bit storage though but this is going to be exposed
soon.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5327>

4 years agoaco: fix nir_intrinsic_quad_* with 8-bit in GFX6-GFX7
Samuel Pitoiset [Thu, 4 Jun 2020 08:39:51 +0000 (10:39 +0200)]
aco: fix nir_intrinsic_quad_* with 8-bit in GFX6-GFX7

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5327>

4 years agoaco: fix sign-extend 8-bit subgroup operations on GFX6-GFX7
Samuel Pitoiset [Thu, 4 Jun 2020 08:35:23 +0000 (10:35 +0200)]
aco: fix sign-extend 8-bit subgroup operations on GFX6-GFX7

SDWA is GFX8+.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5327>

4 years agoaco: use v_bfe_u32 for unsigned reductions sign-extension on GFX6-GFX7
Samuel Pitoiset [Fri, 5 Jun 2020 06:54:52 +0000 (08:54 +0200)]
aco: use v_bfe_u32 for unsigned reductions sign-extension on GFX6-GFX7

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5327>

4 years agointel/genxml: drop sort_xml.sh and move the loop directly in gen_sort_tags.py
Eric Engestrom [Fri, 5 Jun 2020 09:49:06 +0000 (11:49 +0200)]
intel/genxml: drop sort_xml.sh and move the loop directly in gen_sort_tags.py

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5353>

4 years agoradv: Use ac_surface to allocate aux surfaces.
Bas Nieuwenhuizen [Sun, 24 May 2020 13:04:04 +0000 (15:04 +0200)]
radv: Use ac_surface to allocate aux surfaces.

For consistency and a bunch of codesharing.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5194>

4 years agoamd/common: Add total alignment calculation.
Bas Nieuwenhuizen [Sun, 24 May 2020 12:23:24 +0000 (14:23 +0200)]
amd/common: Add total alignment calculation.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5194>

4 years agoradv: Allocate values/predicates at the end of the image.
Bas Nieuwenhuizen [Sun, 24 May 2020 12:14:34 +0000 (14:14 +0200)]
radv: Allocate values/predicates at the end of the image.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5194>

4 years agoradv: Disable HTILE in ac_surface.
Bas Nieuwenhuizen [Sun, 24 May 2020 12:00:05 +0000 (14:00 +0200)]
radv: Disable HTILE in ac_surface.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5194>

4 years agoradv: Disable DCC in ac_surface.
Bas Nieuwenhuizen [Sun, 24 May 2020 11:57:02 +0000 (13:57 +0200)]
radv: Disable DCC in ac_surface.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5194>

4 years agoradv: Use offsets in surface struct.
Bas Nieuwenhuizen [Sun, 24 May 2020 11:47:20 +0000 (13:47 +0200)]
radv: Use offsets in surface struct.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5194>

4 years agoradv: Rely on ac_surface for avoiding cmask for linear images.
Bas Nieuwenhuizen [Sun, 24 May 2020 11:25:53 +0000 (13:25 +0200)]
radv: Rely on ac_surface for avoiding cmask for linear images.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5194>

4 years agoradv: Enforce the contiguous memory for DCC layers in ac_surface.
Bas Nieuwenhuizen [Sun, 24 May 2020 10:50:55 +0000 (12:50 +0200)]
radv: Enforce the contiguous memory for DCC layers in ac_surface.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5194>

4 years agoradv: Pass no_metadata_planes info in to ac_surface.
Bas Nieuwenhuizen [Sun, 24 May 2020 10:10:00 +0000 (12:10 +0200)]
radv: Pass no_metadata_planes info in to ac_surface.

Also do not allocate aux surfaces for multi-plane images. I may
have messed up and used plane 1 offsets for the other planes as well.
I cannot imagine that sharing aux surfaces between the planes will
work well.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5194>

4 years agoradv: Use ac_surface to determine fmask enable.
Bas Nieuwenhuizen [Sun, 24 May 2020 09:57:09 +0000 (11:57 +0200)]
radv: Use ac_surface to determine fmask enable.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5194>

4 years agoci: add U-Boot specific fetch strings
Christian Gmeiner [Thu, 4 Jun 2020 10:56:00 +0000 (12:56 +0200)]
ci: add U-Boot specific fetch strings

U-Boot's fastboot over udp generates the following output:
  Listening for fastboot command on x.y.z.w

Also add a general 'data abort' error string seen with an
too old U-Boot version:
  https://github.com/u-boot/u-boot/commit/95712af

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5258>

4 years agoci: extend expect-output.sh
Christian Gmeiner [Thu, 21 May 2020 22:05:37 +0000 (00:05 +0200)]
ci: extend expect-output.sh

We need to support different fastboot fetch strings for different
bootloader solutions. Lets extend expect-output.sh to support
multiple fetch strings (-f) and add support for error catch
strings (-e) to stop the CI run early.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5258>

4 years agofreedreno/computerator: fix missing dependency on generated header
Rob Clark [Thu, 4 Jun 2020 21:15:58 +0000 (14:15 -0700)]
freedreno/computerator: fix missing dependency on generated header

Fixes:
```
 ../mesa-freedreno-20.2.0_pre/src/freedreno/computerator/ir3_asm.c:25:10: fatal error: 'ir3/ir3_parser.h' file not found
 #include "ir3/ir3_parser.h"
          ^~~~~~~~~~~~~~~~~~
 1 error generated.
```

Fixes: da467817e3e ("freedreno/ir3: Move ir3 assembler to backend compiler")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5340>

4 years agoglapi: remove deprecated .getchildren() that has been replace with an iterator
Eric Engestrom [Thu, 4 Jun 2020 23:05:46 +0000 (01:05 +0200)]
glapi: remove deprecated .getchildren() that has been replace with an iterator

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3086
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Vinson Lee <vlee@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5342>

4 years agoradv/aco: enable 64-bit atomic features if RADV is linked with LLVM 8
Samuel Pitoiset [Thu, 4 Jun 2020 12:53:20 +0000 (14:53 +0200)]
radv/aco: enable 64-bit atomic features if RADV is linked with LLVM 8

Just in case someone links RADV with this old LLVM 8 and wants ACO.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5331>

4 years agosvga: Performance fixes
Neha Bhende [Tue, 26 May 2020 15:59:50 +0000 (21:29 +0530)]
svga: Performance fixes

This is a squash commit of in house performance fixes and misc bug fixes
for GL4.1 support.

Performance fixes:
* started using system memory for constant buffer to gain 3X performance boost with metro redux

Misc bug fixes:
* fixed usage of vertexid in shader
* added empty control point phase in hull shader for zero ouput control point
* misc shader signature fixes
* fixed clip_distance input declaration
* clearing the dirty bit for the surface while using direct map if surface is already flushed
  and there is no pending primitive

This patch also uses SVGA_RETRY macro for commands retries. Part of it is already
used in previous patch.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Signed-off-by: Neha Bhende <bhenden@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5317>

4 years agosvga: Add GL4.1(compatibility profile) support in svga driver
Neha Bhende [Tue, 26 May 2020 15:56:42 +0000 (21:26 +0530)]
svga: Add GL4.1(compatibility profile) support in svga driver

This patch is a squash commit of a very long in-house patch series.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Signed-off-by: Neha Bhende <bhenden@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5317>

4 years agosvga/include: Headers for GL4.1 support
Neha Bhende [Tue, 26 May 2020 15:47:44 +0000 (21:17 +0530)]
svga/include: Headers for GL4.1 support

This brings in the new types, enums and #defines for GL 4.1
features in the virtual device.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Signed-off-by: Neha Bhende <bhenden@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5317>

4 years agowinsys/drm: Add GL4.1 support in drm winsys
Neha Bhende [Tue, 26 May 2020 15:45:23 +0000 (21:15 +0530)]
winsys/drm: Add GL4.1 support in drm winsys

This is to check whether virtual hardware has SM5 support

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Signed-off-by: Neha Bhende <bhenden@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5317>

4 years agoutil: Add util functionality for GL4.1 support
Neha Bhende [Tue, 26 May 2020 15:43:14 +0000 (21:13 +0530)]
util: Add util functionality for GL4.1 support

This patch adds the following tgsi utilities

* tgsi_dynamic_indexing: This utility flattens out the dyanamic indexing of constant buffers
* tgsi_vpos: This utility writes zeros to position at index 0 in vertex shader.
  This utility can be used if there is no shader output in vertex shader
* util_make_tess_ctrl_passthrough_shader: This adds passthough tessellation control shader.
  Input of passthrough tess ctrl shader is output of vertex shader
  and output is input of tessellation eval shader.
  If program has tessellation eval shader but no tessellation control shader,
  this utility can be used to create passthrough tessellation control shader.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Signed-off-by: Neha Bhende <bhenden@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5317>

4 years agofreedreno/a6xx: more early-z
Rob Clark [Thu, 4 Jun 2020 17:07:57 +0000 (10:07 -0700)]
freedreno/a6xx: more early-z

Technically we only have to do late-z in the alpha-test or discard case
if depth-write is enabled.  If depth write is disabled, the depth read /
test / conditional-write interlock that we need to emulate is not a
problem, so we can still use early-z test.

There is a slightly weird case when there is no zsbuf attachment (see
dEQP-GLES31.functional.fbo.no_attachments.*) where the hw wants us to
use LATE_Z.. not entirely sure if this is an interaction with occlusion
query or just a pecularity of how the hw works when there is no depth
buffer.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5336>

4 years agoci: bump virglrenderer to latest version
Dave Airlie [Thu, 4 Jun 2020 04:03:47 +0000 (14:03 +1000)]
ci: bump virglrenderer to latest version

Need this for upcoming GL 4.0 llvmpipe support.

Reviewed-by: Elie Tournier <elie.tournier@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5323>

4 years agoturnip: Simplify vertex buffer bindings.
Eric Anholt [Thu, 4 Jun 2020 00:07:06 +0000 (17:07 -0700)]
turnip: Simplify vertex buffer bindings.

We were remapping the bindings so the HW binding points were consecutive,
which there's no need for.  Now that we don't shuffle, we can mostly drop
the dependency on the pipeline for this SDS.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5321>

4 years agoturnip: Don't bother clamping VB size.
Eric Anholt [Thu, 4 Jun 2020 17:11:44 +0000 (10:11 -0700)]
turnip: Don't bother clamping VB size.

From the VK spec: "All elements of pOffsets must be less than the size of
the corresponding element in pBuffers"

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5321>

4 years agoturnip: Move vertex buffer bindings to SET_DRAW_STATE.
Eric Anholt [Thu, 4 Jun 2020 17:10:01 +0000 (10:10 -0700)]
turnip: Move vertex buffer bindings to SET_DRAW_STATE.

This means that the HW can skip over the vertex buffer state when it's not
used in a bin.  The blob also has this behavior.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5321>

4 years agollvmpipe: move coroutines out of noopt case
Dave Airlie [Thu, 4 Jun 2020 02:10:40 +0000 (12:10 +1000)]
llvmpipe: move coroutines out of noopt case

the virgl CI code was using the noopt path and crashing with a
wierd can't select llvm.coro.subfn.addr error, turns out we have
to call the cleanup pass no matter what.

This enable a lot more virgl gles31 passes, but we have
to disable tessellation shaders as now they executed, they
crash due to missing OES_gpu_shader5, I should try and reenable
them when llvmpipe is further along

Fixes: d32690b43c91d ("gallivm: add coroutine pass manager support")
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Acked-by: Elie Tournier <elie.tournier@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5320>

4 years agopan/mdg: Ensure ld_vary_16 is aligned
Alyssa Rosenzweig [Thu, 4 Jun 2020 15:32:59 +0000 (11:32 -0400)]
pan/mdg: Ensure ld_vary_16 is aligned

Otherwise packing may fail.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fixes: 5f8dd413bcc ("pan/mdg: Handle 16-bit ld_vary")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5339>

4 years agofreedreno/a6xx: Fix VFD_CONTROL emit
Kristian H. Kristensen [Thu, 4 Jun 2020 06:18:52 +0000 (23:18 -0700)]
freedreno/a6xx: Fix VFD_CONTROL emit

The FETCH_CNT field isn't actually the FETCH count. We don't have a
lot of data where it's different from DECODE_CNT, so there's not much
to go by. It could be number of VFD_DEST_CNTL or maybe DECODE_CNT for
binning.  For now, setting both to number of DEST_CNTL gets Google
Earth working again.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5324>