mesa.git
4 years agoglsl: cleanup vertex shader input checks
Marcin Ślusarz [Wed, 20 May 2020 19:30:29 +0000 (21:30 +0200)]
glsl: cleanup vertex shader input checks

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5133>

4 years agoglsl_to_tgsi: add fallthrough comments
Marcin Ślusarz [Wed, 20 May 2020 19:29:15 +0000 (21:29 +0200)]
glsl_to_tgsi: add fallthrough comments

All those cases are supposed to hit an assert in ir_binop_bit_or case.

Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5133>

4 years agoradeonsi/gfx10: implement most performance counters
Marek Olšák [Fri, 22 May 2020 12:30:31 +0000 (08:30 -0400)]
radeonsi/gfx10: implement most performance counters

PAL has all of them.

GE perf counters don't work - no idea why.
I only tested the few that I like to use.

There is no documentation, though most of the enums had already been
in the headers.

Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5184>

4 years agoamd: replace SH -> SA (shader array) in comments
Marek Olšák [Fri, 22 May 2020 12:05:25 +0000 (08:05 -0400)]
amd: replace SH -> SA (shader array) in comments

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5184>

4 years agoac/gpu_info: replace num_good_cu_per_sh with min/max_good_cu_per_sa
Marek Olšák [Fri, 22 May 2020 12:04:07 +0000 (08:04 -0400)]
ac/gpu_info: replace num_good_cu_per_sh with min/max_good_cu_per_sa

Perf counters use the new max number.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5184>

4 years agoradeonsi: don't hardcode most perf counter block counts
Marek Olšák [Fri, 22 May 2020 10:09:39 +0000 (06:09 -0400)]
radeonsi: don't hardcode most perf counter block counts

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5184>

4 years agodocs/features: mark GL_ARB_texture_multisample as done for zink
Erik Faye-Lund [Fri, 22 May 2020 10:37:37 +0000 (12:37 +0200)]
docs/features: mark GL_ARB_texture_multisample as done for zink

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

4 years agozink: expose PIPE_CAP_TEXTURE_MULTISAMPLE
Erik Faye-Lund [Mon, 3 Feb 2020 16:41:18 +0000 (17:41 +0100)]
zink: expose PIPE_CAP_TEXTURE_MULTISAMPLE

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

4 years agozink: implement nir_texop_txf_ms
Erik Faye-Lund [Mon, 3 Feb 2020 16:39:37 +0000 (17:39 +0100)]
zink: implement nir_texop_txf_ms

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

4 years agor600/sfn: remove debug output leftover
Gert Wollny [Sat, 23 May 2020 17:07:08 +0000 (19:07 +0200)]
r600/sfn: remove debug output leftover

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5187>

4 years agor600/sfn: Correctly update the number of literals when forcing a new
Gert Wollny [Sat, 23 May 2020 16:28:05 +0000 (18:28 +0200)]
r600/sfn: Correctly update the number of literals when forcing a new
group

When forcing a new instruction group by adding a ALU_OP_NOP, the
literals for the instruction that triggered this must be taken into
account for the next group, so update the number of literals
accordingly.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5187>

4 years agor600/sfn: use modern c++ in printing LDS read instruction
Gert Wollny [Sat, 23 May 2020 16:04:35 +0000 (18:04 +0200)]
r600/sfn: use modern c++ in printing LDS read instruction

Closes #3021

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5187>

4 years agor600/sfn: Fix mapping for f32tof64 and f64tof32
Gert Wollny [Sat, 23 May 2020 15:55:50 +0000 (17:55 +0200)]
r600/sfn: Fix mapping for f32tof64 and f64tof32

We define the mapping based on the vector unit opcode.

Closes #3013

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5187>

4 years agor600: Fix duplicated subexpression in r600_asm.c
Gert Wollny [Sat, 23 May 2020 15:43:50 +0000 (17:43 +0200)]
r600: Fix duplicated subexpression in r600_asm.c

Fixes: 4422ce1b04c117f61394a6834cd7933f06ce4e1f
    r600: force new CF with TEX only if any texture value is written

Closes #3012

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5187>

4 years agofreedreno/drm: disallow exported buffers in bo cache
Rob Clark [Tue, 19 May 2020 15:27:04 +0000 (08:27 -0700)]
freedreno/drm: disallow exported buffers in bo cache

Otherwise we can MADVISE(WONTNEED) a bo that someone else is still
using.  We already handled that in the dma-buf and flink-name export
paths.

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

4 years agor600/sfn: Use correct setter method.
Vinson Lee [Mon, 25 May 2020 00:18:04 +0000 (17:18 -0700)]
r600/sfn: Use correct setter method.

Fix warning reported by Coverity Scan.

Useless call (USELESS_CALL)
side_effect_free: Calling v->pin_to_channel() is only useful for its
return value, which is ignored.

Fixes: 5d10e3ec6066 ("r600/nir: Pin interpolation results to channel")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5197>

4 years agozink: pass batch instead of context for queries
Erik Faye-Lund [Thu, 21 May 2020 10:25:26 +0000 (12:25 +0200)]
zink: pass batch instead of context for queries

This makes things a bit more consistent IMO.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5141>

4 years agozink: do not dig into resource for nr_samples
Erik Faye-Lund [Wed, 20 May 2020 12:48:02 +0000 (14:48 +0200)]
zink: do not dig into resource for nr_samples

The pipe_surface also know this, so no point in digging so deep.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5141>

4 years agozink: use samples from state
Erik Faye-Lund [Wed, 20 May 2020 12:39:35 +0000 (14:39 +0200)]
zink: use samples from state

There's no reason to compute this, when it's already passed in.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5141>

4 years agonir: Add un/pack_32_4x8 opcodes
Alyssa Rosenzweig [Wed, 13 May 2020 17:51:06 +0000 (13:51 -0400)]
nir: Add un/pack_32_4x8 opcodes

Complement the existing un/pack_32_2x16 opcodes. These are useful for
8-bit format packing. On Midgard, they are equivalent to just a 32-bit
move, but other GPUs could lower to other packs if needed.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5107>

4 years agoutil: delete fnv1a hash function
Dmitriy Nester [Thu, 27 Feb 2020 13:42:21 +0000 (15:42 +0200)]
util: delete fnv1a hash function

xxhash is faster than fnv1a in almost all circumstances, so we're
switching to it globally.

Signed-off-by: Dmytro Nester <dmytro.nester@globallogic.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2405
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4020>

4 years agozink: replace fnv1a hash function with xxhash
Dmitriy Nester [Thu, 27 Feb 2020 13:38:45 +0000 (15:38 +0200)]
zink: replace fnv1a hash function with xxhash

xxhash is faster than fnv1a in almost all circumstances, so we're
switching to it globally.

Signed-off-by: Dmytro Nester <dmytro.nester@globallogic.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4020>

4 years agor600: replace fnv1a hash function with xxhash
Dmitriy Nester [Thu, 27 Feb 2020 13:37:00 +0000 (15:37 +0200)]
r600: replace fnv1a hash function with xxhash

xxhash is faster than fnv1a in almost all circumstances, so we're
switching to it globally.

Signed-off-by: Dmytro Nester <dmytro.nester@globallogic.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4020>

4 years agoutil/hash_table: replace fnv1a hash function with xxhash
Dmitriy Nester [Thu, 27 Feb 2020 13:17:45 +0000 (15:17 +0200)]
util/hash_table: replace fnv1a hash function with xxhash

xxhash is faster than fnv1a in almost all circumstances, so we're
switching to it globally.

Signed-off-by: Dmytro Nester <dmytro.nester@globallogic.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4020>

4 years agoi965: replace fnv1a hash function with xxhash
Dmitriy Nester [Thu, 27 Feb 2020 13:28:50 +0000 (15:28 +0200)]
i965: replace fnv1a hash function with xxhash

xxhash is faster than fnv1a in almost all circumstances, so we're
switching to it globally.

Signed-off-by: Dmytro Nester <dmytro.nester@globallogic.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4020>

4 years agofreedreno: replace fnv1a hash function with xxhash
Dmitriy Nester [Thu, 27 Feb 2020 13:27:17 +0000 (15:27 +0200)]
freedreno: replace fnv1a hash function with xxhash

xxhash is faster than fnv1a in almost all circumstances, so we're
switching to it globally.

Signed-off-by: Dmytro Nester <dmytro.nester@globallogic.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4020>

4 years agonir: replace fnv1a hash function with xxhash
Dmitriy Nester [Thu, 27 Feb 2020 13:04:25 +0000 (15:04 +0200)]
nir: replace fnv1a hash function with xxhash

xxhash is faster than fnv1a in almost all circumstances, so we're
switching to it globally.

Signed-off-by: Dmytro Nester <dmytro.nester@globallogic.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4020>

4 years agopanfrost: Only run batch debug when specifically asked
Alyssa Rosenzweig [Sat, 23 May 2020 01:49:06 +0000 (21:49 -0400)]
panfrost: Only run batch debug when specifically asked

It's expensive and in a hot path; even for general debug builds we won't
need this, only if we're specifically hacking on batch code.

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

4 years agopanfrost: Add debug print before query flushes
Alyssa Rosenzweig [Sat, 23 May 2020 01:35:47 +0000 (21:35 -0400)]
panfrost: Add debug print before query flushes

Just so we know if they're happening.

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

4 years agoradv: Implement vkGetSwapchainGrallocUsage2ANDROID.
Bas Nieuwenhuizen [Mon, 25 May 2020 01:58:16 +0000 (03:58 +0200)]
radv: Implement vkGetSwapchainGrallocUsage2ANDROID.

This was implemented in version 6 of the VK_ANDROID_native_buffer
extension and we only implement version 5. However, the Android
Vulkan loader only checks whether vkGetInstanceProcAddr for the
function is not NULL.

This all went wrong when we switched to the layer code from ANV.
Because the function may now be different per device, it adds fallback
functions that dispatch to the dispatch table. So if we didn't implement
the function we still returned a pointer to the dispatch function,
which made the Android Vulkan loader believe it was supported.

Dispatch functions:
https://gitlab.freedesktop.org/mesa/mesa/-/blob/d555794f3032594dbef3623052103900138d2356/src/amd/vulkan/radv_entrypoints_gen.py#L328

Fixes: d555794f303 "radv: update entrypoints generation from ANV"
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2936
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5198>

4 years agoEGL: sync headers with Khronos
Simon Ser [Thu, 7 May 2020 19:49:25 +0000 (21:49 +0200)]
EGL: sync headers with Khronos

Taken from EGL-Registry commit 90b78b0662e2f0548cfd1926fb77bf628933541b.

With this update EGL_WL_bind_wayland_display and
EGL_WL_create_wayland_buffer_from_image are now in the registry, so we
don't need to define them in eglmesaext.h anymore.

The eglSwapBufferWithDamage* functions now take a const rects argument.
The eglapi.c function signature is updated accordingly.

Signed-off-by: Simon Ser <contact@emersion.fr>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4953>

4 years agost/mesa: Clear texture's views when texture is removed from Shared->TexObjects
Danylo Piliaiev [Mon, 18 May 2020 17:44:58 +0000 (20:44 +0300)]
st/mesa: Clear texture's views when texture is removed from Shared->TexObjects

If texture is shared between several contexts, calling glDeleteTextures
will remove it from ctx->Shared->TexObjects - which makes impossible for
contexts, when destroyed, to release their views to this texture. Which
leaves dangling pointers to destroyed contexts.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2960
Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5106>

4 years agoradv: Do not close fd -1 when NULL-winsys creation fails.
Bas Nieuwenhuizen [Sat, 23 May 2020 00:36:03 +0000 (02:36 +0200)]
radv: Do not close fd -1 when NULL-winsys creation fails.

Fixes: cd6ec2b1abb "radv: implement a dummy winsys for creating devices without AMDGPU"
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5181>

4 years agoradv: Remove dead code.
Bas Nieuwenhuizen [Sat, 23 May 2020 00:32:09 +0000 (02:32 +0200)]
radv: Remove dead code.

pool is always non-NULL, and is also accessed before this check
in the function, so remove the pool = NULL case.

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

4 years agoradv: Handle failing to create .cache dir.
Bas Nieuwenhuizen [Sat, 23 May 2020 00:26:04 +0000 (02:26 +0200)]
radv: Handle failing to create .cache dir.

Fixes: f4e499ec791 "radv: add initial non-conformant radv vulkan driver"
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5181>

4 years agoradv/winsys: Remove extra sizeof multiply.
Bas Nieuwenhuizen [Sat, 23 May 2020 00:01:44 +0000 (02:01 +0200)]
radv/winsys:  Remove extra sizeof multiply.

The pointer is already uint64_t*, so the sizeof was too much ...

Fixes: eeff7e11544 "radv: Add userspace fence buffer per context."
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5181>

4 years agogitlab-ci: Enable -Werror in `meson-s390x` job
Michel Dänzer [Sat, 23 May 2020 14:07:53 +0000 (16:07 +0200)]
gitlab-ci: Enable -Werror in `meson-s390x` job

It's warning-clean.

v2:
* Prevent -Werror from being enabled in `meson-ppc64le` job as well

Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5185>

4 years agoradv: advertise VK_AMD_texture_gather_bias_lod
Samuel Pitoiset [Tue, 19 May 2020 12:49:10 +0000 (14:49 +0200)]
radv: advertise VK_AMD_texture_gather_bias_lod

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

4 years agoradv: add support for querying which formats support texture gather LOD
Samuel Pitoiset [Tue, 19 May 2020 13:05:32 +0000 (15:05 +0200)]
radv: add support for querying which formats support texture gather LOD

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

4 years agoaco: add support for bias/lod with texture gather
Samuel Pitoiset [Wed, 20 May 2020 14:25:28 +0000 (16:25 +0200)]
aco: add support for bias/lod with texture gather

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

4 years agoac/nir: add support for bias/lod with texture gather
Samuel Pitoiset [Wed, 20 May 2020 13:50:50 +0000 (15:50 +0200)]
ac/nir: add support for bias/lod with texture gather

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

4 years agospirv: add support for bias/lod with OpImageGather
Samuel Pitoiset [Wed, 20 May 2020 14:24:18 +0000 (16:24 +0200)]
spirv: add support for bias/lod with OpImageGather

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

4 years agospirv: add SpvCapabilityImageGatherBiasLodAMD
Samuel Pitoiset [Tue, 19 May 2020 12:50:57 +0000 (14:50 +0200)]
spirv: add SpvCapabilityImageGatherBiasLodAMD

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

4 years agoglsl: subroutine signatures must match exactly
Yevhenii Kolesnikov [Wed, 20 May 2020 16:16:28 +0000 (19:16 +0300)]
glsl: subroutine signatures must match exactly

From GLSL 4.60.7 spec, section 6.1.2 "Subroutines":

It is a compile-time error if arguments and return type don’t match
between the function and each associated subroutine type.

Before, if subroutine type and implementation function were declared
with types, that could be implicitly converted, it led to a runtime crash.

Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5125>

4 years agoradv: advertise shaderDeviceClock on GFX8+
Samuel Pitoiset [Wed, 20 May 2020 08:02:49 +0000 (10:02 +0200)]
radv: advertise shaderDeviceClock on GFX8+

Unsupported on GFX6-GFX7.

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

4 years agoac/nir: implement nir_intrinsic_shader_clock with device scope
Samuel Pitoiset [Wed, 20 May 2020 08:07:26 +0000 (10:07 +0200)]
ac/nir: implement nir_intrinsic_shader_clock with device scope

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

4 years agoac/nir: fix shader clock with subgroup scope
Samuel Pitoiset [Wed, 20 May 2020 07:56:36 +0000 (09:56 +0200)]
ac/nir: fix shader clock with subgroup scope

The compiler should emit s_memtime instead of s_memrealtime for
the subgroup scope. I don't know why this LLVM 9 checks was for
but LLVM 8 also has this amdgcn intrinsic.

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

4 years agoaco: implement nir_intrinsic_shader_clock with device scope
Samuel Pitoiset [Wed, 20 May 2020 07:55:37 +0000 (09:55 +0200)]
aco: implement nir_intrinsic_shader_clock with device scope

Use s_memrealtime instead.

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

4 years agospirv: add ReadClockKHR support with device scope
Samuel Pitoiset [Wed, 20 May 2020 07:54:50 +0000 (09:54 +0200)]
spirv: add ReadClockKHR support with device scope

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

4 years agoradv: remove useless assignment in build_streamout_vertex()
Samuel Pitoiset [Fri, 22 May 2020 08:09:22 +0000 (10:09 +0200)]
radv: remove useless assignment in build_streamout_vertex()

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3025
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/5158>

4 years agoradv: cleanup physical device features
Samuel Pitoiset [Wed, 20 May 2020 07:07:49 +0000 (09:07 +0200)]
radv: cleanup physical device features

Similar to the physical device properties.

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

4 years agoradv: do not return from radv_GetPhysicalDeviceFeatures2()
Samuel Pitoiset [Wed, 20 May 2020 06:59:31 +0000 (08:59 +0200)]
radv: do not return from radv_GetPhysicalDeviceFeatures2()

This function returns void.

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

4 years agor600: Use TRUNC_COORD on samplers
Christopher Egert [Sun, 17 May 2020 17:12:02 +0000 (19:12 +0200)]
r600: Use TRUNC_COORD on samplers

As per d573d1d82524b8a2e5f56938069cabc0f0176a0e the same should be done
here. It seems like TRUNCATE_COORD not available on r600, so this is
limited to evergreen.

Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5078>

4 years agopanfrost: Ensure final.no_colour is initialized.
Vinson Lee [Sat, 23 May 2020 01:34:34 +0000 (18:34 -0700)]
panfrost: Ensure final.no_colour is initialized.

Fix warning reported by Coverity Scan.

Uninitialized scalar variable (UNINIT)
uninit_use: Using uninitialized value final. Field final.no_colour is
uninitialized.

Fixes: 3e4e849e6a96 ("panfrost: Disable tib read/write when colourmask = 0x0")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5183>

4 years agor600/sfn: Initialize VertexStageExportForGS m_num_clip_dist member variable.
Vinson Lee [Sat, 23 May 2020 00:40:14 +0000 (17:40 -0700)]
r600/sfn: Initialize VertexStageExportForGS m_num_clip_dist member variable.

Fix warning reported by Coverity Scan.

Uninitialized scalar field (UNINIT_CTOR)
uninit_member: Non-static class member m_num_clip_dist is not
initialized in this constructor nor in any functions that it calls.

Fixes: f7df2c57a207 ("r600/sfn: extract class to handle the VS export to different stages")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5180>

4 years agollvmpipe: Fix variable name.
Vinson Lee [Sat, 23 May 2020 00:08:04 +0000 (17:08 -0700)]
llvmpipe: Fix variable name.

Fix warning reported by Coverity Scan.

Unused value (UNUSED_VALUE)
assigned_value: Assigning value from res->nr_samples to
jit_tex->sample_stride here, but that stored value is overwritten before
it can be used.

Fixes: 2e5cddacf7fb ("llvmpipe: add num_samples/sample_stride support to jit textures")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3022
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5179>

4 years agodocs: drop no-longer-relevant comment about bugzilla
Eric Engestrom [Fri, 22 May 2020 19:20:19 +0000 (21:20 +0200)]
docs: drop no-longer-relevant comment about bugzilla

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5172>

4 years agotree-wide: fix deprecated GitLab URLs
Eric Engestrom [Tue, 19 May 2020 23:02:52 +0000 (01:02 +0200)]
tree-wide: fix deprecated GitLab URLs

They will stop working in the next GitLab release, so let's update them
ASAP to make sure things are propagated to everyone by then.

See:
https://about.gitlab.com/releases/2020/05/06/gitlab-com-13-0-breaking-changes/#removal-of-deprecated-project-paths

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5111>

4 years agoradeonsi/gfx8: enable TC-compatible HTILE from the beginning as before
Marek Olšák [Tue, 19 May 2020 23:30:54 +0000 (19:30 -0400)]
radeonsi/gfx8: enable TC-compatible HTILE from the beginning as before

Fixes: 0d83e7f4b98 - radeonsi: enable TC-compatible HTILE on demand for best Z/S performance
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2921
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2967
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5095>

4 years agoradeonsi: don't enable TC-compatible HTILE for stencil if stencil doesn't use it
Marek Olšák [Tue, 19 May 2020 23:29:21 +0000 (19:29 -0400)]
radeonsi: don't enable TC-compatible HTILE for stencil if stencil doesn't use it

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

4 years agoradeonsi: split si_all_descriptors_begin_new_cs and rename functions
Marek Olšák [Fri, 13 Mar 2020 23:28:58 +0000 (19:28 -0400)]
radeonsi: split si_all_descriptors_begin_new_cs and rename functions

A future commit will extend it.

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

4 years agoradeonsi: move resetting tracked registers into a new function
Marek Olšák [Tue, 10 Mar 2020 22:40:44 +0000 (18:40 -0400)]
radeonsi: move resetting tracked registers into a new function

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

4 years agoac: update register and packet definitions for preemption
Marek Olšák [Wed, 5 Feb 2020 21:55:41 +0000 (16:55 -0500)]
ac: update register and packet definitions for preemption

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

4 years agoRevert "radeonsi: don't wait for idle at the end of gfx IBs"
Marek Olšák [Tue, 19 May 2020 22:31:55 +0000 (18:31 -0400)]
Revert "radeonsi: don't wait for idle at the end of gfx IBs"

This reverts commit 266fec1307b26a544007423582afd8618791893c.

The kernel doesn't wait for idle as part of implicit sync.

Fixes: 266fec1307b26a544007423582afd8618791893c
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2950
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5095>

4 years agoradeonsi: decrease the max GS invocation count to 32
Marek Olšák [Tue, 19 May 2020 01:55:06 +0000 (21:55 -0400)]
radeonsi: decrease the max GS invocation count to 32

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5095>

4 years agoradeonsi: don't use INDIRECT_BUFFER within IBs
Marek Olšák [Tue, 19 May 2020 03:14:03 +0000 (23:14 -0400)]
radeonsi: don't use INDIRECT_BUFFER within IBs

It's fragile. If I change the size or alignment, it hangs. Better safe than
sorry.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5095>

4 years agoac/surface: don't compute single-sample CMASK if it's unaligned
Marek Olšák [Tue, 19 May 2020 05:32:38 +0000 (01:32 -0400)]
ac/surface: don't compute single-sample CMASK if it's unaligned

Displayable DCC can cause this and fail the assertion later.

Fixes: cf61f635ff6a38aad344ebe30551eaaac6fec038
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5095>

4 years agoac/gpu_info: compute the best safe IB alignment
Marek Olšák [Sun, 17 May 2020 06:38:02 +0000 (02:38 -0400)]
ac/gpu_info: compute the best safe IB alignment

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5095>

4 years agofreedreno: Use the right amount of &'s
Kristian H. Kristensen [Fri, 22 May 2020 22:03:55 +0000 (15:03 -0700)]
freedreno: Use the right amount of &'s

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

4 years agofreedreno: Add missing break statement.
Vinson Lee [Fri, 22 May 2020 18:22:19 +0000 (11:22 -0700)]
freedreno: Add missing break statement.

Reported-by: Coverity Scan
Fixes: 5a6beb6a24aa ("freedreno: add adreno 650")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5169>

4 years agonir/copy_prop_vars: Record progress in more places
Jason Ekstrand [Tue, 28 May 2019 19:40:35 +0000 (14:40 -0500)]
nir/copy_prop_vars: Record progress in more places

Fixes: 96c32d7776 "nir/copy_prop_vars: handle load/store of vector..."
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5170>

4 years agonir/opt_deref: Report progress if we remove a deref
Jason Ekstrand [Sat, 25 May 2019 04:29:15 +0000 (23:29 -0500)]
nir/opt_deref: Report progress if we remove a deref

Fixes: a1c688517de "nir/opt_deref: Properly optimize ptr_as_array..."
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5170>

4 years agonir/lower_double_ops: Rework the if (progress) tree
Jason Ekstrand [Fri, 24 May 2019 14:05:32 +0000 (09:05 -0500)]
nir/lower_double_ops: Rework the if (progress) tree

Fixes: d7d35a9522 "nir/lower_doubles: Use the new NIR lowering..."
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5170>

4 years agofrontends/va: Fix deinterlace bottom field first flag
Thong Thai [Thu, 21 May 2020 23:40:13 +0000 (19:40 -0400)]
frontends/va: Fix deinterlace bottom field first flag

Fixes an issue with mpv, where deinterlacing causes the picture to be
offset by one line every other frame in the video.

Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5157>

4 years agopan/mdg: Allow DCE on ld_color_buffer masks
Alyssa Rosenzweig [Fri, 15 May 2020 20:24:45 +0000 (16:24 -0400)]
pan/mdg: Allow DCE on ld_color_buffer masks

Helps with blend shader register pressure.

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

4 years agopan/mdg: Ensure we don't DCE into impossible masks
Alyssa Rosenzweig [Thu, 21 May 2020 21:51:06 +0000 (17:51 -0400)]
pan/mdg: Ensure we don't DCE into impossible masks

We round up for ld/st.

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

4 years agopan/mdg: Lower shifts to 32-bit
Alyssa Rosenzweig [Thu, 14 May 2020 17:30:25 +0000 (13:30 -0400)]
pan/mdg: Lower shifts to 32-bit

Kind of a hack..

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

4 years agopan/mdg: Add pack_colour_32 opcode
Alyssa Rosenzweig [Thu, 14 May 2020 17:29:22 +0000 (13:29 -0400)]
pan/mdg: Add pack_colour_32 opcode

Seen for RGB10_A2UI packing.

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

4 years agopanfrost: Handle !independent_blend for blend shaders
Alyssa Rosenzweig [Fri, 15 May 2020 16:19:22 +0000 (12:19 -0400)]
panfrost: Handle !independent_blend for blend shaders

Fixes MRT blending.

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

4 years agopanfrost: Use _mesa_roundevenf when packing clear colours
Alyssa Rosenzweig [Thu, 14 May 2020 16:27:12 +0000 (12:27 -0400)]
panfrost: Use _mesa_roundevenf when packing clear colours

Match blend shader approach.

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

4 years agopanfrost: Fix dated comment
Alyssa Rosenzweig [Tue, 12 May 2020 19:39:38 +0000 (15:39 -0400)]
panfrost: Fix dated comment

Work register counts are not explicitly stored for blend shaders, and
blend shaders are used for far more than UNORM8.

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

4 years agoProperly check mmap return value
Hanno Böck [Thu, 21 May 2020 16:51:06 +0000 (18:51 +0200)]
Properly check mmap return value

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

4 years agoci: Improve baremetal's logging of the job env var passthrough.
Eric Anholt [Fri, 15 May 2020 23:27:01 +0000 (16:27 -0700)]
ci: Improve baremetal's logging of the job env var passthrough.

Trying to read the sh -x script output was rough, just cat the file once
we're done setting it up.

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

4 years agoci: Enable a fractional run with UBO-to-constbuf disabled on a3xx.
Eric Anholt [Fri, 15 May 2020 23:15:07 +0000 (16:15 -0700)]
ci: Enable a fractional run with UBO-to-constbuf disabled on a3xx.

This gets us coverage of an important case in the HW that the CTS
otherwise basically doesn't hit.

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

4 years agoci: Don't forget to set NIR_VALIDATE in baremetal runs.
Eric Anholt [Fri, 15 May 2020 18:20:44 +0000 (11:20 -0700)]
ci: Don't forget to set NIR_VALIDATE in baremetal runs.

Given that a530 doesn't have cpufreq, we really don't have the time to be
running the validator on all of deqp.  This also helps explain why I had
to go to such a small fraction on the a3xx gles3 run (which we can now
increase).  However, a3xx gles2 seems to be fast enough that we can leave
it enabled and get coverage for older chips.

Because we run more tests now, clear out some stale xfails from the a3xx
list.

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

4 years agoci: Do an explicit NIR validation-enabled pass on freedreno a630.
Eric Anholt [Fri, 15 May 2020 23:01:15 +0000 (16:01 -0700)]
ci: Do an explicit NIR validation-enabled pass on freedreno a630.

We disable it for most of the CTS because it's slow, but let's do a
fractional run to make sure that we don't hit any obvious failures.

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

4 years agoci: Fix DEQP_CASELIST_FILTER (used by a630 noubo run)
Eric Anholt [Sat, 16 May 2020 00:18:12 +0000 (17:18 -0700)]
ci: Fix DEQP_CASELIST_FILTER (used by a630 noubo run)

We were doing sed -i /filter/p, which printed everything but printed the
filtered things twice (though they'd only get tested once).  Now that the
filter works, run all the UBO tests instead of doing a 1/5 run, revealing
a new failure.

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

4 years agogallium/swr: Fix building swr with MSVC
Krzysztof Raszkowski [Fri, 22 May 2020 15:29:01 +0000 (17:29 +0200)]
gallium/swr: Fix building swr with MSVC

Fix building swr with MSVC by turning off
UNICODE before including windows.h.

Reviewed-by: Jan Zielinski <jan.zielinski@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5166>

4 years agomesa: Fix double-lock of Shared->FrameBuffers and usage of wrong mutex
Danylo Piliaiev [Fri, 22 May 2020 10:36:31 +0000 (13:36 +0300)]
mesa: Fix double-lock of Shared->FrameBuffers and usage of wrong mutex

Fixes: 7534c536ca0f4b2b123200f421460094034f37a3
Fixes: 8cfb3e4ee57070ff45e7534a986a20c5fd649dc7
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3024
Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5160>

4 years agozink: hammer in an explicit wait when retrieving buffer contents for reading
Erik Faye-Lund [Wed, 20 May 2020 13:59:26 +0000 (09:59 -0400)]
zink: hammer in an explicit wait when retrieving buffer contents for reading

this ensures that the buffer returned is synchronized as expected, though
it incurs a significant performance hit and will hopefully be improved in future
patches

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5120>

4 years agozink: reset query on-demand when beginning a new query from resume
Mike Blumenkrantz [Wed, 20 May 2020 13:53:45 +0000 (09:53 -0400)]
zink: reset query on-demand when beginning a new query from resume

the current query pool implementation expects queries to be reset at
the time they're initiated, which means queries started at this point
need to also be explicitly reset

the zink_begin_query() function can't be reused here or else the
query will be double-added to the active list, triggering an infinite loop

ref mesa/mesa#3000

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5120>

4 years agozink: fix vkCmdResetQueryPool usage
Mike Blumenkrantz [Wed, 20 May 2020 13:52:24 +0000 (09:52 -0400)]
zink: fix vkCmdResetQueryPool usage

the final parameter here is the number of queries to reset, not the
index of the last query, meaning that the value passed needs to be
(curr_query + 1) in order to reset the query corresponding to
curr_query

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5120>

4 years agozink: flush active queries on destroy and free query object
Mike Blumenkrantz [Wed, 20 May 2020 13:45:39 +0000 (09:45 -0400)]
zink: flush active queries on destroy and free query object

queries with a valid active_list pointer are likely to still be active,
and vk spec requires them to have completed prior to being destroyed

this isn't completely accurate, as it's currently possible for queries
to remain in the active list while not actually being active, but it
resolves driver crashes that can occur from destroying a stilll-running
query pool object

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5120>

4 years agozink: add SpvId returns to a couple ntv functions
Mike Blumenkrantz [Wed, 20 May 2020 13:41:22 +0000 (09:41 -0400)]
zink: add SpvId returns to a couple ntv functions

this is helpful for debugging

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5120>

4 years agozink: explicitly zero some arrays in ntv
Mike Blumenkrantz [Wed, 20 May 2020 13:39:45 +0000 (09:39 -0400)]
zink: explicitly zero some arrays in ntv

just to be safe

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5120>

4 years agoradeonsi/sdma: remove useless compare
Pierre-Eric Pelloux-Prayer [Wed, 20 May 2020 13:34:12 +0000 (15:34 +0200)]
radeonsi/sdma: remove useless compare

clang warning:
   result of comparison of constant 65536 with expression of type 'uint16_t'
   (aka 'unsigned short') is always true

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

4 years agoamdgpu: fix unitialized variable
Pierre-Eric Pelloux-Prayer [Wed, 20 May 2020 13:32:05 +0000 (15:32 +0200)]
amdgpu: fix unitialized variable

clang warning:
    variable 'va_handle' is used uninitialized whenever 'if' condition is false

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

4 years agoradeonsi: fix inversed arguments in si_test_gds_memory_management
Pierre-Eric Pelloux-Prayer [Wed, 20 May 2020 13:30:37 +0000 (15:30 +0200)]
radeonsi: fix inversed arguments in si_test_gds_memory_management

clang warning:
   implicit conversion from enumeration type 'enum radeon_bo_usage'
   to different enumeration type 'enum radeon_bo_domain'

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

4 years agoamd/addrlib: fix forgotten char -> enum conversions
Pierre-Eric Pelloux-Prayer [Wed, 20 May 2020 13:26:29 +0000 (15:26 +0200)]
amd/addrlib: fix forgotten char -> enum conversions

clang warning:
  result of comparison of constant 115 with expression of type
  'const enum Dim' is always false

Fixes: e3e704c7e7e ("amd/addrlib: Use enum instead of sparse chars to identify dimensions")
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5119>

4 years agoglsl: Remove integer matrix support from ir_dereference_array::constant_expression_value
Ian Romanick [Wed, 20 May 2020 20:39:57 +0000 (13:39 -0700)]
glsl: Remove integer matrix support from ir_dereference_array::constant_expression_value

It looks like this code has existed since day 1, but I have no idea why.
There have never been integer matrices in GLSL.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5135>