mesa.git
4 years agointel/disasm: Change visibility of has_uip and has_jip
Danylo Piliaiev [Mon, 3 Jun 2019 08:58:58 +0000 (11:58 +0300)]
intel/disasm: Change visibility of has_uip and has_jip

Pre-work for shader disassembly label support.

From: "Lonnberg, Toni" <toni.lonnberg@intel.com>
Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4245>

4 years agoanv: refresh cached current batch bo after emitting some commands
Marcin Ślusarz [Tue, 1 Sep 2020 20:02:10 +0000 (22:02 +0200)]
anv: refresh cached current batch bo after emitting some commands

Fixes crashes in:
- Rise of the Tomb Rider (on benchmark start)
- Total War: Three Kingdoms (on game start)
- Total War: Warhammer II (on game start)

Fixes: 34a0ce58c7f ("anv: add a new execution mode for secondary command buffers")
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6546>

4 years agoradeonsi: use radeonsi_clamp_div_by_zero for SPECviewperf13, Road Redemption
Pierre-Eric Pelloux-Prayer [Wed, 12 Aug 2020 11:28:55 +0000 (13:28 +0200)]
radeonsi: use radeonsi_clamp_div_by_zero for SPECviewperf13, Road Redemption

Fixes SPECviewperf 13 creo rendering.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2639
Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6259>

4 years agoradeonsi,driconf: add clamp_div_by_zero option
Pierre-Eric Pelloux-Prayer [Thu, 13 Aug 2020 09:15:36 +0000 (11:15 +0200)]
radeonsi,driconf: add clamp_div_by_zero option

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6259>

4 years agoac/llvm: add option to clamp division by zero
Pierre-Eric Pelloux-Prayer [Tue, 11 Aug 2020 16:52:24 +0000 (18:52 +0200)]
ac/llvm: add option to clamp division by zero

Replace div(x) by min(div(x), FLT_MAX)) to avoid getting a NaN result
when x is 0.

A cheaper alternative would be to use legacy mult instructions but they're
not exposed by LLVM.

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6259>

4 years agoradeonsi: enable PIPE_CAP_NO_CLIP_ON_COPY_TEX
Pierre-Eric Pelloux-Prayer [Wed, 15 Jul 2020 19:25:23 +0000 (21:25 +0200)]
radeonsi: enable PIPE_CAP_NO_CLIP_ON_COPY_TEX

This fixes specviewperf13 catia test rendering.

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6259>

4 years agomesa/st: introduce PIPE_CAP_NO_CLIP_ON_COPY_TEX
Pierre-Eric Pelloux-Prayer [Wed, 15 Jul 2020 19:23:48 +0000 (21:23 +0200)]
mesa/st: introduce PIPE_CAP_NO_CLIP_ON_COPY_TEX

If supported this means that src_x/src_y/width/height parameters of
CopyTex functions will not be clipped using the read framebuffer's dimensions.

Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6259>

4 years agogallium/swr: Fix compilation TCS/TES compilation issues
jzielins [Tue, 1 Sep 2020 15:04:40 +0000 (17:04 +0200)]
gallium/swr: Fix compilation TCS/TES compilation issues

Gallvm API changes in TCS/TES, but the compilation worked
for older LLVM APIs. With LLVM 12 update is needed.

Reviewed-by: Krzysztof Raszkowski <krzysztof.raszkowski@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6554>

4 years agogallium/swr: Fix compilation with LLVM 12
jzielins [Tue, 1 Sep 2020 14:53:12 +0000 (16:53 +0200)]
gallium/swr: Fix compilation with LLVM 12

Update to reflect changes in VectorType and ElementCount APIs

Closes: #3457
Reviewed-by: Krzysztof Raszkowski <krzysztof.raszkowski@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6554>

4 years agospirv: fix retrieving dest type for OpFragmentMaskFetchAMD
Samuel Pitoiset [Tue, 1 Sep 2020 07:43:03 +0000 (09:43 +0200)]
spirv: fix retrieving dest type for OpFragmentMaskFetchAMD

Since the dest type is retrieved from the SPIR-V return type now,
we have to set it manually for OpFragmentMaskFetchAMD. The result
type must be a 32-bit unsigned integer type scalar.

Fix dEQP-VK.pipeline.multisample.shader_fragment_mask.* with RADV.

Fixes: a196f05fc22 ("nir/vtn: Use return type rather than image type for tex ops")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6533>

4 years agovulkan: make VK_TIME_DOMAIN_CLOCK_MONOTONIC_RAW_EXT conditional
Jonathan Gray [Tue, 1 Sep 2020 02:13:43 +0000 (12:13 +1000)]
vulkan: make VK_TIME_DOMAIN_CLOCK_MONOTONIC_RAW_EXT conditional

Only advertise VK_TIME_DOMAIN_CLOCK_MONOTONIC_RAW_EXT if CLOCK_MONOTONIC_RAW
is defined.  Fixes the build on OpenBSD which has CLOCK_MONOTONIC but not
CLOCK_MONOTONIC_RAW.

Fixes: 67a2c1493c0 ("vulkan: Add VK_EXT_calibrated_timestamps extension (radv and anv) [v5]")
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6517>

4 years agoradv: remove seccomp includes
Jonathan Gray [Tue, 4 Aug 2020 07:47:33 +0000 (17:47 +1000)]
radv: remove seccomp includes

57c95d2ce23 ("radv: a support for a secure compile fork at device creation")
added includes which were not removed in
7324977e420 ("radv: remove the secure compile support feature")

remove these no longer needed includes to fix the non-linux build

Fixes: 7324977e420 ("radv: remove the secure compile support feature")
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6517>

4 years agoutil/os_misc: os_get_available_system_memory() for OpenBSD
Jonathan Gray [Thu, 5 Dec 2019 14:21:07 +0000 (01:21 +1100)]
util/os_misc: os_get_available_system_memory() for OpenBSD

Return the smallest value of available non-kernel physical memory and
the static per process data size limit as the amount of available
system memory on OpenBSD.

Fixes: b80930a6fea ("anv: add support for VK_EXT_memory_budget")
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6517>

4 years agoanv: use os_get_available_system_memory()
Jonathan Gray [Thu, 5 Dec 2019 14:07:56 +0000 (01:07 +1100)]
anv: use os_get_available_system_memory()

Replace local get_available_system_memory() function with
os_get_available_system_memory().

Fixes: b80930a6fea ("anv: add support for VK_EXT_memory_budget")
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6517>

4 years agoutil/os_misc: add os_get_available_system_memory()
Jonathan Gray [Thu, 5 Dec 2019 14:01:29 +0000 (01:01 +1100)]
util/os_misc: add os_get_available_system_memory()

Add os_get_available_system_memory() derived from
src/intel/vulkan/anv_device.c get_available_system_memory()

Fixes: b80930a6fea ("anv: add support for VK_EXT_memory_budget")
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6517>

4 years agoanv: use os_get_total_physical_memory()
Jonathan Gray [Sat, 30 Nov 2019 06:36:01 +0000 (17:36 +1100)]
anv: use os_get_total_physical_memory()

Replace non-portable sysinfo() use with Mesa's
os_get_total_physical_memory()

Fixes: 060a6434eca ("anv: Advertise larger heap sizes")
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6517>

4 years agofreedreno/a6xx: Add ARB_depth_clamp and separate clamp support.
Eric Anholt [Tue, 1 Sep 2020 19:09:40 +0000 (12:09 -0700)]
freedreno/a6xx: Add ARB_depth_clamp and separate clamp support.

Passes piglit depth_clamp, depth-clamp-range,
amd_depth_clamp_separate_range.  This is part of enabling GL 3.2 (the
other is bumping PIPE_CAP_GLSL_FEATURE_LEVEL, which I'm hoping to do once
we have the KHR-GL* testing in place).

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

4 years agoci: Enable KHR-GL30 CTS testing on freedreno a630.
Eric Anholt [Thu, 27 Aug 2020 16:28:53 +0000 (09:28 -0700)]
ci: Enable KHR-GL30 CTS testing on freedreno a630.

Since we expose desktop GL, let's get at least a little bit of testing
coverage of it.

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

4 years agoci: Use the same VK-GL-CTS tree for GL/GLES as VK.
Eric Anholt [Thu, 27 Aug 2020 00:02:41 +0000 (17:02 -0700)]
ci: Use the same VK-GL-CTS tree for GL/GLES as VK.

There's no need to have separate build scripts here, just choose what the
DEQP_TARGET is for the particular container being built.  This brings in a
tremendous number of GLES test fixes that haven't made it into a tagged
gles CTS release.

Closes: #2056
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6526>

4 years agoci: Bump vulkan CTS version to 1.2.3.2, and keep the GL CTS around.
Eric Anholt [Wed, 26 Aug 2020 23:57:44 +0000 (16:57 -0700)]
ci: Bump vulkan CTS version to 1.2.3.2, and keep the GL CTS around.

The version bump gets us various testcase fixes, mostly to test
requirements).  While we're rebuilding the container, copy GL CTS stuff
from build-deqp-gl.sh -- we had already included the glcts binary in our
image, but we had unnecessary other binaries and were missing the mustpass
files (container size stays the same overall).  Also pull in all the GLES
mustpass lists, not just the main ones -- Rob wants them to increase our
coverage to match what Android CTS covers.

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

4 years agopanfrost: Drop PIPE_CAP_MAX_COMBINED_HW_ATOMIC_COUNTER/BUFFERS
Alyssa Rosenzweig [Tue, 1 Sep 2020 20:44:07 +0000 (16:44 -0400)]
panfrost: Drop PIPE_CAP_MAX_COMBINED_HW_ATOMIC_COUNTER/BUFFERS

Just leave it at 0 and the frontend will lower for us.

Fixes dEQP-GLES31.functional.atomic_counter.get.1_counter_*

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

4 years agopanfrost: add support for atomics
Italo Nicola [Mon, 31 Aug 2020 17:32:30 +0000 (17:32 +0000)]
panfrost: add support for atomics

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6439>

4 years agopanfrost: add atomic ops infrastructure
Italo Nicola [Mon, 31 Aug 2020 11:17:48 +0000 (11:17 +0000)]
panfrost: add atomic ops infrastructure

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6439>

4 years agopanfrost: add support for src[3] in LOAD_STORE ops
Italo Nicola [Mon, 31 Aug 2020 11:17:08 +0000 (11:17 +0000)]
panfrost: add support for src[3] in LOAD_STORE ops

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6439>

4 years agopanfrost: introduce LDST_ATOMIC property
Italo Nicola [Wed, 26 Aug 2020 11:13:39 +0000 (11:13 +0000)]
panfrost: introduce LDST_ATOMIC property

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6439>

4 years agopanfrost: add LDST_ADDRESS property to atomic ops
Italo Nicola [Wed, 26 Aug 2020 11:01:45 +0000 (11:01 +0000)]
panfrost: add LDST_ADDRESS property to atomic ops

Atomic ops have to encode the address of the variable it's writing to.
This property is used to align the address to 64-bit boundaries.

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6439>

4 years agopanfrost: add atomic_cmpxchg opcode
Italo Nicola [Thu, 20 Aug 2020 13:35:07 +0000 (13:35 +0000)]
panfrost: add atomic_cmpxchg opcode

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6439>

4 years agopanfrost: fix undefined value access on mir_set_intr_mask()
Italo Nicola [Wed, 26 Aug 2020 14:56:13 +0000 (14:56 +0000)]
panfrost: fix undefined value access on mir_set_intr_mask()

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6439>

4 years agoclover: Use 64-bit offsets for shader_in on 64-bit GPUs
Jason Ekstrand [Fri, 21 Aug 2020 22:23:59 +0000 (17:23 -0500)]
clover: Use 64-bit offsets for shader_in on 64-bit GPUs

This really shouldn't matter as inputs should have logical pointers.
However, nir_builder defaults to building derefs based on the pointer
size in the shader_info.  It's easier for now to just be consistent
everywhere.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6379>

4 years agonir/lower_explicit_io: Assert that compute address sizes match derefs
Jason Ekstrand [Fri, 21 Aug 2020 21:55:02 +0000 (16:55 -0500)]
nir/lower_explicit_io: Assert that compute address sizes match derefs

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6379>

4 years agospirv: Drop the constant_as_global as option
Jason Ekstrand [Wed, 19 Aug 2020 16:26:53 +0000 (11:26 -0500)]
spirv: Drop the constant_as_global as option

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6379>

4 years agoclover/nir: Use nir_var_mem_constant for __constant memory
Jason Ekstrand [Wed, 19 Aug 2020 16:34:21 +0000 (11:34 -0500)]
clover/nir: Use nir_var_mem_constant for __constant memory

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6379>

4 years agollvmpipe: Add support for load_global_constant
Jason Ekstrand [Mon, 31 Aug 2020 18:47:44 +0000 (13:47 -0500)]
llvmpipe: Add support for load_global_constant

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6379>

4 years agonouveau/nir: Implement load_global_constant
Jason Ekstrand [Sat, 29 Aug 2020 06:01:48 +0000 (01:01 -0500)]
nouveau/nir: Implement load_global_constant

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6379>

4 years agointel/fs: Implement nir_intrinsic_load_global_constant
Jason Ekstrand [Sat, 29 Aug 2020 06:00:37 +0000 (01:00 -0500)]
intel/fs: Implement nir_intrinsic_load_global_constant

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

4 years agospirv: Use nir_var_mem_constant for UniformConstant data in CL
Jason Ekstrand [Tue, 18 Aug 2020 20:30:26 +0000 (15:30 -0500)]
spirv: Use nir_var_mem_constant for UniformConstant data in CL

For now, we leave the constant_as_global option intact and get rid of
the UBO path which no one upstream is using today.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6379>

4 years agonir: Allow opt_large_constants to be run with constant_data_size > 0
Jason Ekstrand [Tue, 18 Aug 2020 21:11:28 +0000 (16:11 -0500)]
nir: Allow opt_large_constants to be run with constant_data_size > 0

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6379>

4 years agonir/lower_io: Add support for nir_var_mem_constant
Jason Ekstrand [Tue, 18 Aug 2020 19:43:39 +0000 (14:43 -0500)]
nir/lower_io: Add support for nir_var_mem_constant

This commit adds support for nir_var_mem_constant various places.  It
also adds a pass similar to nir_lower_vars_to_explicit_types except it
also scrapes out the constants and stuffs them into constant_data.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6379>

4 years agonir/lower_io: Add a build_addr_for_var helper
Jason Ekstrand [Sat, 15 Aug 2020 05:53:45 +0000 (00:53 -0500)]
nir/lower_io: Add a build_addr_for_var helper

The new version is more verbose but also more extensible.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6379>

4 years agonir/lower_io: Use the variable mode for load_scratch_base_ptr checks
Jason Ekstrand [Mon, 17 Aug 2020 16:53:47 +0000 (11:53 -0500)]
nir/lower_io: Use the variable mode for load_scratch_base_ptr checks

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6379>

4 years agonir: Add a load_global_constant intrinsic
Jason Ekstrand [Sat, 29 Aug 2020 05:59:22 +0000 (00:59 -0500)]
nir: Add a load_global_constant intrinsic

This has the same semantics as load_global except the memory it reads is
known to be constant so load_global_constant intrinsics can be CSEd
rather than relying on more complex copy-propagation.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6379>

4 years agonir: Add a new nir_var_mem_constant variable mode
Jason Ekstrand [Tue, 18 Aug 2020 19:02:21 +0000 (14:02 -0500)]
nir: Add a new nir_var_mem_constant variable mode

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6379>

4 years agonir/serialize: fix serialization of system values
Karol Herbst [Sat, 29 Aug 2020 19:58:37 +0000 (21:58 +0200)]
nir/serialize: fix serialization of system values

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6545>

4 years agoclover/spirv: fix vec3 alignment
Karol Herbst [Mon, 31 Aug 2020 19:21:02 +0000 (21:21 +0200)]
clover/spirv: fix vec3 alignment

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6433>

4 years agonvc0/cl: hande 64 bit pointers in nvc0_set_global_handle
Karol Herbst [Mon, 31 Aug 2020 11:32:55 +0000 (13:32 +0200)]
nvc0/cl: hande 64 bit pointers in nvc0_set_global_handle

clover gives us a uint32_t pointer into the kernel input bufffer, but also
for actual 64 bit pointers, so we can just use memcpy instead.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6433>

4 years agospirv: fix 64 bit atomic inc and dec
Karol Herbst [Sat, 22 Aug 2020 11:48:35 +0000 (13:48 +0200)]
spirv: fix 64 bit atomic inc and dec

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jason Ekstrand <jason@jlekstran.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6433>

4 years agonvc0/ir: fix load propagation for sub 4 byte addressing
Karol Herbst [Fri, 21 Aug 2020 19:37:03 +0000 (21:37 +0200)]
nvc0/ir: fix load propagation for sub 4 byte addressing

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6433>

4 years agoclover/llvm: undefine __IMAGE_SUPPORT__ for devices without image support
Karol Herbst [Fri, 21 Aug 2020 19:10:32 +0000 (21:10 +0200)]
clover/llvm: undefine __IMAGE_SUPPORT__ for devices without image support

libclang seems to define this on its own for SPIR targets, but the CTS
requires it to be not set if the device doesn't support images.

The SPIRV-LLVM-Translator also requires the spir triple to be set so we
can't really do anything else except to undefine.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jason Ekstrand <jason@jlekstran.net>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6433>

4 years agoclover/nir: use offset for temp memory
Karol Herbst [Wed, 19 Aug 2020 19:14:46 +0000 (21:14 +0200)]
clover/nir: use offset for temp memory

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6433>

4 years agonv50/ir: fix cas lowering for 64 bit
Karol Herbst [Sat, 7 Mar 2020 15:55:19 +0000 (16:55 +0100)]
nv50/ir: fix cas lowering for 64 bit

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6433>

4 years agoclover/nir: Lower function_temp to scratch.
Karol Herbst [Sun, 16 Aug 2020 15:43:18 +0000 (17:43 +0200)]
clover/nir: Lower function_temp to scratch.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.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/6433>

4 years agoegl/x11: simplify dri2_initialize_x11()
Eric Engestrom [Mon, 17 Aug 2020 18:32:45 +0000 (20:32 +0200)]
egl/x11: simplify dri2_initialize_x11()

eglInitialize() already handles the "retry using the software path"
logic, there's no need to repeat it here.

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6353>

4 years agoegl/wayland: simplify dri2_initialize_wayland()
Eric Engestrom [Mon, 17 Aug 2020 18:32:12 +0000 (20:32 +0200)]
egl/wayland: simplify dri2_initialize_wayland()

eglInitialize() already handles the "retry using the software path"
logic, there's no need to repeat it here.

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6353>

4 years agoegl/surfaceless: simplify dri2_initialize_surfaceless()
Eric Engestrom [Mon, 17 Aug 2020 18:31:45 +0000 (20:31 +0200)]
egl/surfaceless: simplify dri2_initialize_surfaceless()

eglInitialize() already handles the "retry using the software path"
logic, there's no need to repeat it here.

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6353>

4 years agoegl/android: simplify dri2_initialize_android()
Eric Engestrom [Mon, 17 Aug 2020 18:30:47 +0000 (20:30 +0200)]
egl/android: simplify dri2_initialize_android()

eglInitialize() already handles the "retry using the software path"
logic, there's no need to repeat it here.

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6353>

4 years agointel/fs: Fix MOV_INDIRECT and BROADCAST of Q types on Gen11+
Jason Ekstrand [Fri, 17 Jul 2020 21:22:11 +0000 (16:22 -0500)]
intel/fs: Fix MOV_INDIRECT and BROADCAST of Q types on Gen11+

The immediate case is pretty uncommon to see but it can happen, in
theory.  BROADCAST is typically used to uniformize values and those are
usually 32-bit.  However, it does come up in some subgroup ops.

Fixes: 49c21802cbca "intel/compiler: Split has_64bit_types into float/int"
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6211>

4 years agonir: use enum operator helper for nir_variable_mode and nir_metadata
Karol Herbst [Mon, 31 Aug 2020 16:08:49 +0000 (18:08 +0200)]
nir: use enum operator helper for nir_variable_mode and nir_metadata

those are used quite a bit

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6520>

4 years agoutil: add helpers to define bitwise operators on enums for C++
Karol Herbst [Mon, 31 Aug 2020 16:29:10 +0000 (18:29 +0200)]
util: add helpers to define bitwise operators on enums for C++

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6520>

4 years agonir: use nir_var_all to get rid of casting
Karol Herbst [Mon, 31 Aug 2020 16:16:31 +0000 (18:16 +0200)]
nir: use nir_var_all to get rid of casting

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6520>

4 years agonir: Improve the comment on num_inputs and friends
Jason Ekstrand [Mon, 31 Aug 2020 18:06:04 +0000 (13:06 -0500)]
nir: Improve the comment on num_inputs and friends

This doesn't fix the problem that no one knows what any of these mean
half the time but it at least makes them better documented to hopefully
make people's expectations more accurate.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6524>

4 years agonir: Rename num_shared to shared_size
Jason Ekstrand [Mon, 31 Aug 2020 18:04:50 +0000 (13:04 -0500)]
nir: Rename num_shared to shared_size

This one is always a size in bytes.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6524>

4 years agospirv: Delete some dead workgroup variable handling code
Jason Ekstrand [Mon, 31 Aug 2020 18:01:21 +0000 (13:01 -0500)]
spirv: Delete some dead workgroup variable handling code

This is dead since 5ed4e31c08dc0.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6524>

4 years agospirv: add some tests for volatile/available/visible
Rhys Perry [Mon, 27 Jul 2020 13:43:40 +0000 (14:43 +0100)]
spirv: add some tests for volatile/available/visible

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6090>

4 years agospirv: Support big-endian strings
Jason Ekstrand [Fri, 28 Aug 2020 17:36:20 +0000 (12:36 -0500)]
spirv: Support big-endian strings

This should be all that's required for the SPIR-V parser to work in
big-endian systems.  SPIR-V requires that everything be in host
byte-order except for strings which are always little-endian.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6090>

4 years agospirv: implement SpvMemoryAccessVolatileMask
Rhys Perry [Fri, 24 Jul 2020 16:56:49 +0000 (17:56 +0100)]
spirv: implement SpvMemoryAccessVolatileMask

Signed-off-by: Rhys Perry <pendingchaos02@gmail.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/6090>

4 years agospirv: implement Volatile image operand
Rhys Perry [Mon, 29 Jun 2020 13:56:38 +0000 (14:56 +0100)]
spirv: implement Volatile image operand

Signed-off-by: Rhys Perry <pendingchaos02@gmail.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/6090>

4 years agospirv: implement Volatile memory semantic
Rhys Perry [Wed, 6 May 2020 16:02:51 +0000 (17:02 +0100)]
spirv: implement Volatile memory semantic

Signed-off-by: Rhys Perry <pendingchaos02@gmail.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/6090>

4 years agospirv: implement MakePointerAvailable/MakePointerVisible for OpCopyMemory
Rhys Perry [Wed, 6 May 2020 14:04:14 +0000 (15:04 +0100)]
spirv: implement MakePointerAvailable/MakePointerVisible for OpCopyMemory

Signed-off-by: Rhys Perry <pendingchaos02@gmail.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/6090>

4 years agospirv: add vtn_emit_make_{visible,available}_barrier helpers
Rhys Perry [Tue, 18 Aug 2020 13:45:46 +0000 (14:45 +0100)]
spirv: add vtn_emit_make_{visible,available}_barrier helpers

Signed-off-by: Rhys Perry <pendingchaos02@gmail.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/6090>

4 years agospirv: make OpLoad/OpStore visibility/availablity barriers acquire/release
Rhys Perry [Mon, 27 Jul 2020 13:51:57 +0000 (14:51 +0100)]
spirv: make OpLoad/OpStore visibility/availablity barriers acquire/release

I think these are needed to order the visibility/availability operation
with the access.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.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/6090>

4 years agospirv: fix Uniform and Output MemoryAccessMakePointer{Visible,Available}
Rhys Perry [Mon, 27 Jul 2020 13:48:12 +0000 (14:48 +0100)]
spirv: fix Uniform and Output MemoryAccessMakePointer{Visible,Available}

The Uniform storage class can be used for SSBOs. This should also fix make
available/visible for the Output storage class.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.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/6090>

4 years agospirv: Add a vtn_get_mem_operands() helper
Boris Brezillon [Mon, 17 Aug 2020 17:38:47 +0000 (19:38 +0200)]
spirv: Add a vtn_get_mem_operands() helper

Add a vtn_get_mem_operands() helper to extract memory operand attached
to load/store operations.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6090>

4 years agointel/isl: Drop unnecessary check on 16bpp depth format
Sagar Ghuge [Thu, 27 Aug 2020 05:24:19 +0000 (22:24 -0700)]
intel/isl: Drop unnecessary check on 16bpp depth format

Drop unnecessary check which allows enabling of lossless write through
compression (HiZ + CCS) for D16_UNORM format on Gen12+.

We had misleading HSD information previously which used to claim that
compression can not be supported for 16bpp format. Although BSpec does
not have any restriction for D16_UNORM format.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6485>

4 years agoanv: implement shareable timeline semaphores
Lionel Landwerlin [Wed, 28 Aug 2019 10:22:30 +0000 (13:22 +0300)]
anv: implement shareable timeline semaphores

This implements timeline semaphores using a new type of dma-fence
stored into drm-syncobjs. We use a thread to implement delayed
submissions.

v2: Drop cloning of temporary semaphores and just transfer their ownership (Jason)
    Drain queue when dealing with binary semaphore
    Ensure we don't submit to the thread as long as we don't need to

v3: Use __u64 not uintptr_t for kernel pointers
    Fix commented code for INTEL_DEBUG=bat
    Set DRM_I915_GEM_EXECBUFFER_EXT_TIMELINE_FENCES in timeline fence execbuf extension
    Add new anv_queue_set_lost()
    Drop multi queue stuff meant for the fake multi queue patch
    Rework temporary syncobj handling
    Don't use syncobj when not available (DeviceWaitIdle/CreateDevice)
    Use ANV_MULTIALLOC
    And a few more tweaks...

v4: Drop drained condition helper (Lionel)
    Fix missing EXEC_OBJECT_WRITE on BOs we want to wait on (Jason)

v5: Add missing device->lost_reported in _anv_device_report_lost (Lionel)
    Fix missing free on submit->simple_bo (Lionel)
    Don't drop setting the device in lost state on QueueSubmit error (Jason)
    Store submit->fence_bos as an array of uintptr_t (Jason)

v6: condition device->has_thread_submit to i915 & core DRM support (Jason)

v7: Fix submit->in_fence leakage on error (Jason)
    Keep dummy semaphore with no thread submission (Jason)

v8: Move ownership of submit->out_fence to submit (Jason)

v9: Don't forget to read the VkFence's syncobj binary payload (Lionel)

v10: Take the mutex lock on anv_gem_close() (Jason/Lionel)

v11: Fix void* -> u64 cast on 32bit (Lionel)

v12: Rebase after BO backed timeline semaphore (Lionel)

v13: Fix missing snippets lost after rebase (Lionel)

v14: Drop update_binary usage (Lionel)

v15: Use ANV_MULTIALLOC (Lionel)

v16: Fix some realloc issues (Ivan)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> (v8)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2901>

4 years agoanv: add new gem/drm helpers
Lionel Landwerlin [Tue, 6 Aug 2019 12:56:40 +0000 (15:56 +0300)]
anv: add new gem/drm helpers

Needed for dealing with the new DRM timeline syncobj ioctls.

v2: Make use of the anv_gem_get_drm_cap() parameter... (Jason)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2901>

4 years agoinclude/drm-uapi: bump headers
Lionel Landwerlin [Thu, 21 Feb 2019 12:21:44 +0000 (12:21 +0000)]
include/drm-uapi: bump headers

From drm-next at the following commit :

   commit 3393649977f9a8847c659e282ea290d4b703295c
   Merge: cbc2e82932ae ced026e959be
   Author: Dave Airlie <airlied@redhat.com>
   Date:   Fri Aug 28 13:51:30 2020 +1000

       Merge tag 'drm-intel-next-2020-08-24-1' of git://anongit.freedesktop.org/drm/drm-intel into drm-next

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2901>

4 years agofreedreno/ir3: rework setup_{input,output} to make struct varyings work
Jonathan Marek [Thu, 13 Aug 2020 01:59:33 +0000 (21:59 -0400)]
freedreno/ir3: rework setup_{input,output} to make struct varyings work

Rework setup_{input,output} to be called during emit_intrinsic, in a way
which allows struct/array/matrix type varyings to work.

This allows turnip to pass dEQP-VK.glsl.linkage.varying.struct.*

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

4 years agofreedreno/ir3: improve handling of aliased inputs
Jonathan Marek [Thu, 13 Aug 2020 01:57:15 +0000 (21:57 -0400)]
freedreno/ir3: improve handling of aliased inputs

This allows overlapping inputs, which is required for the next patch which
makes it so setup_input may be called multiple times for each input.

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

4 years agofreedreno/ir3: remove indirect input load
Jonathan Marek [Wed, 5 Aug 2020 02:19:03 +0000 (22:19 -0400)]
freedreno/ir3: remove indirect input load

nir_intrinsic_load_input should only be used with VS and FS, indirect input
shouldn't be possible for those.

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

4 years agoradv: Allow triggering thread traces by file.
Bas Nieuwenhuizen [Tue, 1 Sep 2020 12:59:55 +0000 (14:59 +0200)]
radv: Allow triggering thread traces by file.

Makes it actually feasible to trace games and not just demos/apitraces.

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

4 years agoradv: Centralize enabling thread trace.
Bas Nieuwenhuizen [Tue, 1 Sep 2020 12:49:35 +0000 (14:49 +0200)]
radv: Centralize enabling thread trace.

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

4 years agoamd/registers: switch to new generated register definitions
Marek Olšák [Fri, 21 Aug 2020 12:09:58 +0000 (08:09 -0400)]
amd/registers: switch to new generated register definitions

Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6423>

4 years agoamd/registers: add non-gfx10 register files generated from kernel headers
Marek Olšák [Fri, 21 Aug 2020 12:08:25 +0000 (08:08 -0400)]
amd/registers: add non-gfx10 register files generated from kernel headers

This was split from the next commit to reduce the massive deltas.

Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6423>

4 years agoamd/registers: add a script that generates json from kernel headers
Marek Olšák [Thu, 20 Aug 2020 09:07:35 +0000 (05:07 -0400)]
amd/registers: add a script that generates json from kernel headers

Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6423>

4 years agoamd/registers: sort registers by offset in json
Marek Olšák [Thu, 20 Aug 2020 08:03:13 +0000 (04:03 -0400)]
amd/registers: sort registers by offset in json

Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6423>

4 years agoamd/registers: expose the canonicalize.py program as a function
Marek Olšák [Thu, 20 Aug 2020 08:02:10 +0000 (04:02 -0400)]
amd/registers: expose the canonicalize.py program as a function

Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6423>

4 years agovulkan/wsi/x11: wait for acquirable images in FIFO mode
Roman Gilg [Mon, 31 Aug 2020 09:35:16 +0000 (11:35 +0200)]
vulkan/wsi/x11: wait for acquirable images in FIFO mode

In FIFO presentation mode we block either on our present-queue or on Present
events after an image was transmitted.

In case we receive completion events without idle events at some point we
exhaust our acquire-queue and can not block anymore on present-queue.

Ensure that the consumer has at least one image to acquire before blocking
again on present-queue. Otherwise wait for one from the X server.

CC: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3344
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6513>

4 years agovulkan/wsi/x11: add sent image counter
Roman Gilg [Mon, 31 Aug 2020 09:33:27 +0000 (11:33 +0200)]
vulkan/wsi/x11: add sent image counter

Add a counter to count how many images from our swapchain are currently "sent"
to the X server via Present extension. An image is sent when it has been
presented but we have not yet received an idle event for it.

CC: mesa-stable
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Simon Ser <contact@emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6513>

4 years agoaco: Add README which explains about what ACO is and how it works.
Timur Kristóf [Thu, 12 Mar 2020 15:07:40 +0000 (16:07 +0100)]
aco: Add README which explains about what ACO is and how it works.

This is based on an early summary written by Daniel, but updated to
reflect the current state of ACO and reworded to better fit the format.
Also added is a table which details what SW stages correspond to what
HW stages on each HW generation.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4164>

4 years agoaco: Fixup markdown formatting of the README-ISA.
Timur Kristóf [Thu, 12 Mar 2020 13:25:52 +0000 (14:25 +0100)]
aco: Fixup markdown formatting of the README-ISA.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4164>

4 years agoaco: Move README to README-ISA
Timur Kristóf [Mon, 31 Aug 2020 15:12:55 +0000 (17:12 +0200)]
aco: Move README to README-ISA

The old "readme" is not really a readme but rather just
a bunch of notes with our findings about the GCN/RDNA ISA.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4164>

4 years agonir/algebraic: mark some optimizations with fsat(NaN) as inexact
Samuel Pitoiset [Mon, 31 Aug 2020 14:08:55 +0000 (16:08 +0200)]
nir/algebraic: mark some optimizations with fsat(NaN) as inexact

If a is Nan, fsat(NaN) is expected to be 0 and some optimizations
should be marked as inexact.

Fixes a GPU hang with Death Stranding and RADV/ACO (RADV/LLVM
isn't affected because it lowers fsat).

No fossils-db change.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3368
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6519>

4 years agoci: Restrict "success" job to pipelines for MRs
Michel Dänzer [Fri, 28 Aug 2020 15:08:57 +0000 (17:08 +0200)]
ci: Restrict "success" job to pipelines for MRs

Expected benefits:

* No more spurious non-MR pipelines with just this job.
* No more warnings from GitLab such as on
  https://gitlab.freedesktop.org/mesa/mesa/-/pipelines/195778

Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6492>

4 years agodocs: Stop claiming to implement OpenVG
Adam Jackson [Fri, 28 Aug 2020 21:17:15 +0000 (17:17 -0400)]
docs: Stop claiming to implement OpenVG

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6500>

4 years agoci: Don't exclude "success" job from mesa/mesa pipelines for MRs
Michel Dänzer [Mon, 31 Aug 2020 16:49:42 +0000 (18:49 +0200)]
ci: Don't exclude "success" job from mesa/mesa pipelines for MRs

Since the last GitLab update, pre-merge pipelines for MRs run in the
mesa/mesa namespace, so this job didn't get created anymore, causing
trouble.

Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6522>

4 years agoci: Create test-docs job in mesa/mesa pipelines for MRs
Michel Dänzer [Mon, 31 Aug 2020 16:46:37 +0000 (18:46 +0200)]
ci: Create test-docs job in mesa/mesa pipelines for MRs

Since the last GitLab update, pre-merge pipelines for MRs run in the
mesa/mesa namespace, so this job didn't get created anymore, causing
trouble.

Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6522>

4 years agogallivm: fix build on LLVM 12 due to LLVMAddConstantPropagationPass removal
Marek Olšák [Tue, 1 Sep 2020 01:59:39 +0000 (21:59 -0400)]
gallivm: fix build on LLVM 12 due to LLVMAddConstantPropagationPass removal

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3465
Cc: 20.1 20.2 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6531>

4 years agoradv: dump GPU info into the hang report
Samuel Pitoiset [Wed, 26 Aug 2020 16:29:13 +0000 (18:29 +0200)]
radv: dump GPU info into the hang report

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/6471>

4 years agoradv: improve reporting faulty pipelines when a GPU hang is detected
Samuel Pitoiset [Wed, 26 Aug 2020 15:34:28 +0000 (17:34 +0200)]
radv: improve reporting faulty pipelines when a GPU hang is detected

Because the driver now waits for idle after every draw/dispatch
calls, we shouldn't report gfx pipelines when the GPU hang happens
after a dispatch (or the opposite).

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/6471>

4 years agoradv: force RADV_DEBUG=syncshaders when RADV_TRACE_FILE is used
Samuel Pitoiset [Wed, 26 Aug 2020 15:28:46 +0000 (17:28 +0200)]
radv: force RADV_DEBUG=syncshaders when RADV_TRACE_FILE is used

It's a requirement to be able to identify the first bad draw or
dispatch call.

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/6471>