platform/upstream/mesa.git
3 years agofreedreno/ir3: Handle sized tex destination types
Connor Abbott [Tue, 8 Dec 2020 11:41:22 +0000 (12:41 +0100)]
freedreno/ir3: Handle sized tex destination types

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

3 years agonir/lower_tex: Handle sized tex destination types
Connor Abbott [Tue, 8 Dec 2020 11:40:31 +0000 (12:40 +0100)]
nir/lower_tex: Handle sized tex destination types

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7989>

3 years agointel: silence unused var warnings in release builds
Lionel Landwerlin [Sun, 24 Jan 2021 15:03:40 +0000 (17:03 +0200)]
intel: silence unused var warnings in release builds

v2: Use ASSERTED

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

3 years agovk-device-select: add device group support
Dave Airlie [Mon, 18 Jan 2021 05:12:49 +0000 (15:12 +1000)]
vk-device-select: add device group support

This just sorts CPU device groups last in case an app tries to
use the first device group.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8551>

3 years agolima/ppir: fix creation of mov node for non-ssa tex dest
Erico Nunes [Fri, 15 Jan 2021 00:33:16 +0000 (01:33 +0100)]
lima/ppir: fix creation of mov node for non-ssa tex dest

In ppir when a texture node has only a single successor, it is used
directly to output the texture lookup value, in order to save the
insertion of a mov.
However, a sequence like this can happen:

  r0 = (float)tex r8 (coord), 0 (texture), 0 (sampler)
  r1 = mov r0.z

In this case, even if the mov is a single successor, the assumption
that only the elements needed by the successor node cannot be made.
The target register can also be read or written elsewhere and so the
simplification cannot be made. Add an exception to cover this case.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Andreas Baierl <ichgeh@imkreisrum.de>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8517>

3 years agozink: fix streamout for clipdistance
Mike Blumenkrantz [Sat, 23 Jan 2021 21:21:36 +0000 (16:21 -0500)]
zink: fix streamout for clipdistance

the assert added here during review broke this since clipdistance is 8 components

Fixes: 9eec52c67e6 ("zink: tweak xfb slot mapping in ntv")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8673>

3 years agoci/freedreno/a6xx: Skip vs-output-array-vec2-index-wr-before-gs
Rob Clark [Sat, 23 Jan 2021 17:27:06 +0000 (09:27 -0800)]
ci/freedreno/a6xx: Skip vs-output-array-vec2-index-wr-before-gs

This one test seems to be destroying the world, and causing massive
flakeyness, and is generally more a recovery/GMU stress test than
anything.

See #4159

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

3 years agofreedreno: Add perf_warn() for missed UBWC opportunities
Rob Clark [Fri, 22 Jan 2021 17:19:09 +0000 (09:19 -0800)]
freedreno: Add perf_warn() for missed UBWC opportunities

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

3 years agofreedreno/a6xx: Add helper to check if UBWC is supported
Rob Clark [Fri, 22 Jan 2021 17:16:58 +0000 (09:16 -0800)]
freedreno/a6xx: Add helper to check if UBWC is supported

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

3 years agofreedreno: Add fmt/args macros for pipe_resource
Rob Clark [Fri, 22 Jan 2021 16:42:29 +0000 (08:42 -0800)]
freedreno: Add fmt/args macros for pipe_resource

Deduplicate some long debug prints before adding more.

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

3 years agofreedreno: Add perf_warn() trace helper
Rob Clark [Fri, 22 Jan 2021 16:18:07 +0000 (08:18 -0800)]
freedreno: Add perf_warn() trace helper

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

3 years agoglx: Provide glvnd wrapper for glXSwapIntervalEXT
Keith Packard [Thu, 21 Jan 2021 20:19:12 +0000 (12:19 -0800)]
glx: Provide glvnd wrapper for glXSwapIntervalEXT

When using glvnd, this function needs to be exposed through
getDispatchAddress or libglvnd will not find it.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Fixes: 60ebeb4608a8 "glx: Implement GLX_EXT_swap_control for DRI2 and DRI3"
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8621>

3 years agovc4/ci: Replace expect script by python script
Juan A. Suarez Romero [Thu, 7 Jan 2021 09:33:03 +0000 (10:33 +0100)]
vc4/ci: Replace expect script by python script

Replace the expect-based script to turn on/off the Raspberry Pi devices
using a python-based script.

v2:
 - Fix small nitpicks (Juan)
 - Limit line length (Andres)

v3:
 - Bump image tags (Eric, Andres)

v4:
 - Bump image tags (Eric)

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Acked-by: Andres Gomez <agomez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8362>

3 years agospirv: handle NoContraction in GLSL450 alu ops
Mike Blumenkrantz [Wed, 29 Jul 2020 14:06:46 +0000 (10:06 -0400)]
spirv: handle NoContraction in GLSL450 alu ops

we were dropping this when it was set, leading to incorrect algebraic
optimizations that broke various types of tests, e.g., running
spec@arb_gpu_shader5@execution@precise@fs-fract-of-nan in zink

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

3 years agozink: don't force a renderpass start when setting framebuffer state
Mike Blumenkrantz [Tue, 11 Aug 2020 22:36:52 +0000 (18:36 -0400)]
zink: don't force a renderpass start when setting framebuffer state

this breaks compute and isn't strictly necessary since we'll be starting
a renderpass during draw anyway; we just need to flush here to update the
state

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8662>

3 years agozink: add function for waiting on a specific batch's fence
Mike Blumenkrantz [Tue, 11 Aug 2020 22:38:11 +0000 (18:38 -0400)]
zink: add function for waiting on a specific batch's fence

previously we only had zink_fence_wait(), which just waits on the
current batch to finish, but it may be the case that we don't want to
wait on all batches up to that point, so we can optimize a bit by only
waiting as long as we have to

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8662>

3 years agogallium/u_inlines: add helper for simplifying pipe_context::resource_copy_region
Mike Blumenkrantz [Wed, 9 Sep 2020 18:35:23 +0000 (14:35 -0400)]
gallium/u_inlines: add helper for simplifying pipe_context::resource_copy_region

this hook has too many params, and I only need like half of them

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

3 years agozink: enable PIPE_CAP_SAMPLER_VIEW_TARGET
Mike Blumenkrantz [Mon, 10 Aug 2020 14:17:10 +0000 (10:17 -0400)]
zink: enable PIPE_CAP_SAMPLER_VIEW_TARGET

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

3 years agovirgl: add support for VIRGL_CAP_V2_UNTYPED_RESOURCE
Chia-I Wu [Thu, 24 Dec 2020 23:37:15 +0000 (15:37 -0800)]
virgl: add support for VIRGL_CAP_V2_UNTYPED_RESOURCE

An untyped resource is a blob resource that contains only raw bytes
without type information (e.g., width, height, format, etc.).  virgl
supports only typed resources, and when it encounters untyped resources,
it fails silently in the host.

This cap enables virgl to assign type information to untyped resources.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-By: Isaac Bosompem <mrisaacb@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8584>

3 years agovirgl: update headers
Chia-I Wu [Thu, 24 Dec 2020 07:04:48 +0000 (23:04 -0800)]
virgl: update headers

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-By: Isaac Bosompem <mrisaacb@google.com>
Acked-By: Gurchetan Singh <gurchetansingh@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8584>

3 years agodocs/zink: add GL 4.2 requirements
Erik Faye-Lund [Fri, 22 Jan 2021 11:15:33 +0000 (12:15 +0100)]
docs/zink: add GL 4.2 requirements

Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8648>

3 years agodocs/zink: add GL 4.1 requirements
Erik Faye-Lund [Fri, 22 Jan 2021 10:24:53 +0000 (11:24 +0100)]
docs/zink: add GL 4.1 requirements

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8648>

3 years agodocs/zink: add GL 4.0 requirements
Erik Faye-Lund [Fri, 22 Jan 2021 10:04:33 +0000 (11:04 +0100)]
docs/zink: add GL 4.0 requirements

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8648>

3 years agodocs/zink: fix phrasing of GL 3.3 requirements
Erik Faye-Lund [Fri, 22 Jan 2021 09:57:32 +0000 (10:57 +0100)]
docs/zink: fix phrasing of GL 3.3 requirements

These requirements aren't all about VkPhysicalDeviceFeatures, so let's
make the text reflect that.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8648>

3 years agodocs/zink: document the independentBlend requirement for GL3
Erik Faye-Lund [Fri, 22 Jan 2021 09:45:20 +0000 (10:45 +0100)]
docs/zink: document the independentBlend requirement for GL3

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8648>

3 years agodocs/zink: add two missing required features
Erik Faye-Lund [Fri, 22 Jan 2021 08:49:36 +0000 (09:49 +0100)]
docs/zink: add two missing required features

If these features aren't supported, we'll start doing illegal stuff, so
let's document it.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8648>

3 years agodocs/zink: add missing colon
Erik Faye-Lund [Fri, 22 Jan 2021 19:37:57 +0000 (20:37 +0100)]
docs/zink: add missing colon

Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8648>

3 years agonv50/ir: Initialize RegAlloc member func in constructor.
Vinson Lee [Tue, 19 Jan 2021 02:20:21 +0000 (18:20 -0800)]
nv50/ir: Initialize RegAlloc member func in constructor.

Fix defect reported by Coverity Scan.

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

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8568>

3 years agozink: clone shader before lowering clip_halfz
Erik Faye-Lund [Fri, 22 Jan 2021 15:14:32 +0000 (16:14 +0100)]
zink: clone shader before lowering clip_halfz

If we don't clone the shader before lowering clip_halfz, we risk ending
up performing the same lowering multiple times, each time we compile a
new variant.

This fixes rendering in Neverball.

Fixes: 15f478fe840 ("zink: only run nir_lower_clip_halfz for last vertex processing stage")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4147
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8652>

3 years agozink: check correct caps for PIPE_CAP_IMAGE_LOAD_FORMATTED
Mike Blumenkrantz [Fri, 22 Jan 2021 18:19:53 +0000 (13:19 -0500)]
zink: check correct caps for PIPE_CAP_IMAGE_LOAD_FORMATTED

we actually need more features here than just the one which was checked to
enabled this

Fixes: 2f6f4b613c3 ("zink: export shader image caps using features")

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

3 years agoci: Enable process isolation for softpipe & freedreno piglit jobs
Michel Dänzer [Wed, 20 Jan 2021 08:49:35 +0000 (09:49 +0100)]
ci: Enable process isolation for softpipe & freedreno piglit jobs

Disabling process isolation causes a random set of tests to be
spuriously skipped. The set of skipped tests can change when piglit is
rebuilt (even from the same Git commit), which can make docker image
rebuilds painful. (Not to mention the reduced testing coverage due to
the skipped tests)

One downside of this change is that the arm64_a630_piglit_shader job
now takes almost 10 minutes.

v2:
* Change arm64_a530_piglit_shader job as well, but make it run manually
  on branches of forked repositories only, since it takes almost 20
  minutes now. (Eric Anholt)

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8611>

3 years agoanv: Advertise shaderInt64 on Gen11+
Jason Ekstrand [Mon, 26 Oct 2020 23:48:29 +0000 (18:48 -0500)]
anv: Advertise shaderInt64 on Gen11+

On Gen11, they took away our hardware int64 support.  We have lowering
for all of it in NIR except for subgroup ops.  Now that all the subgroup
ops are implemented, we can enable the feature.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329>

3 years agointel/fs: Implement umin/umax shuffle
Jason Ekstrand [Mon, 26 Oct 2020 23:48:12 +0000 (18:48 -0500)]
intel/fs: Implement umin/umax shuffle

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329>

3 years agointel/fs: Refactor our shuffle emit code
Jason Ekstrand [Mon, 26 Oct 2020 16:58:32 +0000 (11:58 -0500)]
intel/fs: Refactor our shuffle emit code

This adds an emit_scan_step helper which gives us a place to do
something a bit more interesting than emitting a single op.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329>

3 years agointel/fs: Properly lower 64-bit MUL on 64-bit-incapable platforms
Jason Ekstrand [Tue, 27 Oct 2020 07:24:30 +0000 (02:24 -0500)]
intel/fs: Properly lower 64-bit MUL on 64-bit-incapable platforms

There are two problems this commit solves:  First, is that the 64x64 MUL
lowering generates a Q MOV which, because of how late it runs in the
compile pipeline, it never gets removed.  Second, it generates 32x32
MULs and we have to run it a second time to lower those.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329>

3 years agointel/fs: Support 64-bit CLUSTER_BROADCAST on Gen11+
Jason Ekstrand [Tue, 27 Oct 2020 05:31:22 +0000 (00:31 -0500)]
intel/fs: Support 64-bit CLUSTER_BROADCAST on Gen11+

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329>

3 years agointel/fs: Support 64-bit SHUFFLE on Gen11+
Jason Ekstrand [Tue, 27 Oct 2020 05:02:43 +0000 (00:02 -0500)]
intel/fs: Support 64-bit SHUFFLE on Gen11+

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329>

3 years agointel/fs: Support 64-bit SEL_EXEC on Gen11+
Jason Ekstrand [Mon, 26 Oct 2020 18:34:04 +0000 (13:34 -0500)]
intel/fs: Support 64-bit SEL_EXEC on Gen11+

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329>

3 years agointel/fs: QUAD_SWIZZLE requires packed data
Jason Ekstrand [Tue, 27 Oct 2020 05:36:53 +0000 (00:36 -0500)]
intel/fs: QUAD_SWIZZLE requires packed data

We could probably support some strides if we tried hard enough but the
whole point of this opcode is to accelerate things with crazy Align16 or
crazy regions.  It's ok if we have to emit an extra MOV to get a packed
source.

Fixes: 8b4a5e641bc3 "intel/fs: Add support for subgroup quad operations"
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329>

3 years agointel/reg,fs: Handle immediates properly in subscript()
Jason Ekstrand [Mon, 26 Oct 2020 18:27:43 +0000 (13:27 -0500)]
intel/reg,fs: Handle immediates properly in subscript()

Just returning the original type isn't what we want in basically any
case.  Mask and shift the immediate as needed.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329>

3 years agointel/compiler: Move brw_reg_type_for_bit_size to brw_reg_type.h
Jason Ekstrand [Mon, 26 Oct 2020 17:22:20 +0000 (12:22 -0500)]
intel/compiler: Move brw_reg_type_for_bit_size to brw_reg_type.h

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329>

3 years agointel/compiler: Return 1 for immediates in regs_read
Jason Ekstrand [Tue, 27 Oct 2020 01:53:37 +0000 (20:53 -0500)]
intel/compiler: Return 1 for immediates in regs_read

Previously, we were returning 2 whenever the source was a Q type.  As
far as I can tell, the only reason why this hasn't blown up before is
that it was only ever used for VGRFs until the SWSB pass landed which
uses it for everything.  This wasn't a problem because Q types generally
aren't a thing on TGL.  However, they are for a small handful of
instructions.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329>

3 years agonir/lower_int64: Lower 64-bit vote_ieq
Jason Ekstrand [Tue, 27 Oct 2020 04:08:26 +0000 (23:08 -0500)]
nir/lower_int64: Lower 64-bit vote_ieq

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329>

3 years agonir/lower_int64: Add lowering for 64-bit iadd shuffle/reduce
Jason Ekstrand [Mon, 26 Oct 2020 17:41:08 +0000 (12:41 -0500)]
nir/lower_int64: Add lowering for 64-bit iadd shuffle/reduce

Lowering iadd is a bit trickier because we have to deal with potential
overflow but it's still not bad to do in NIR.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329>

3 years agonir/lower_int64: Add lowering for some 64-bit subgroup ops
Jason Ekstrand [Mon, 26 Oct 2020 15:50:35 +0000 (10:50 -0500)]
nir/lower_int64: Add lowering for some 64-bit subgroup ops

These are all pretty trivial because we can just split the op into one
subgroup op per half of the value.  There's some question as to whether
these belong in lower_int64 or lower_subgroups but, on Intel, they key
decider of whether or not we need the lowering is based on whether or
not we have hardware int64 support.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329>

3 years agonir/lower_int64: Fix lowering of f2[ui]64 for 16-bit float
Jason Ekstrand [Tue, 27 Oct 2020 04:09:04 +0000 (23:09 -0500)]
nir/lower_int64: Fix lowering of f2[ui]64 for 16-bit float

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329>

3 years agonir/lower_int64: Add a level of wrapper functions
Jason Ekstrand [Mon, 26 Oct 2020 15:41:41 +0000 (10:41 -0500)]
nir/lower_int64: Add a level of wrapper functions

We're about to start lowering a few intrinsics so we need support more
than just ALU.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7329>

3 years agoradv: only decompress the depth/stencil aspect that needs to be resolved
Samuel Pitoiset [Mon, 18 Jan 2021 14:46:06 +0000 (15:46 +0100)]
radv: only decompress the depth/stencil aspect that needs to be resolved

For depth/stencil images, the driver was decompressing both aspects
while it should be enough to only decompress the one that's going
to be resolved.

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

3 years agoutil: When building 'ARM64EC', don't use x64 intrinsics which need to be emulated
Ben Niu [Thu, 21 Jan 2021 17:56:17 +0000 (09:56 -0800)]
util: When building 'ARM64EC', don't use x64 intrinsics which need to be emulated

ARM64EC is a new build target for Windows ARM64 devices for x64 support.
These binaries can be loaded in x64 processes, but don't need to be emulated. For
code that's heavily used, avoiding the emulation can be a huge perf win.

Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8619>

3 years agomain: Undefine MemoryBarrier for Windows
Jesse Natalie [Wed, 13 Jan 2021 22:42:08 +0000 (14:42 -0800)]
main: Undefine MemoryBarrier for Windows

In winnt.h, MemoryBarrier can be defined in one of 4 ways, depending
on which architecture is being targeted.
- For x86, it's an inline function.
- For x64, it's an object-like macro, which means that the MemoryBarrier
  function in the table actually ends up being called __faststorefence.
- For arm and arm64, it's a function-like macro, and the preprocessor fails
  because the function table entry doesn't call it.

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8485>

3 years agoanv: Early-exit from cmd_buffer_flush_state
Jason Ekstrand [Wed, 20 Jan 2021 17:36:54 +0000 (11:36 -0600)]
anv: Early-exit from cmd_buffer_flush_state

If we don't have any dynamic state, pipeline, or descriptor changes,
we can do a very quick early-exit instead of checking for a bunch of
stuff bit-by-bit.

Tested-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8594>

3 years agoanv: Only flush descriptors used by the pipeline
Jason Ekstrand [Wed, 20 Jan 2021 17:35:17 +0000 (11:35 -0600)]
anv: Only flush descriptors used by the pipeline

Previously, if we had a pipeline transition from something which used,
say, tessellation to something which didn't and we ended up with
tessellation descriptors dirty, we could end up re-emitting far more
than necessary.  With this commit, we mask off unused stages so we only
update when necessary.

Tested-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8594>

3 years agoanv: Take the set of stages to flush in flush_descriptor_sets
Jason Ekstrand [Wed, 20 Jan 2021 17:29:53 +0000 (11:29 -0600)]
anv: Take the set of stages to flush in flush_descriptor_sets

Tested-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8594>

3 years agoanv: Exit early from cmd_buffer_apply_pipe_flushes
Jason Ekstrand [Wed, 20 Jan 2021 16:35:51 +0000 (10:35 -0600)]
anv: Exit early from cmd_buffer_apply_pipe_flushes

Tested-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8594>

3 years agoradv: use a workgroup size of 8x8 for FMASK color expand
Samuel Pitoiset [Fri, 22 Jan 2021 09:42:11 +0000 (10:42 +0100)]
radv: use a workgroup size of 8x8 for FMASK color expand

Probably better for access patterns.

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

3 years agoradv: use the range aspect mask in FMASK color expand
Samuel Pitoiset [Fri, 22 Jan 2021 09:43:19 +0000 (10:43 +0100)]
radv: use the range aspect mask in FMASK color expand

Instead of harcoding it.

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

3 years agoradv: add multi-layer support to FMASK color expand
Samuel Pitoiset [Fri, 22 Jan 2021 09:40:44 +0000 (10:40 +0100)]
radv: add multi-layer support to FMASK color expand

For better performance for layered MSAA images.

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

3 years agoradeonsi: iterate from draw 1 for total/min_direct_count computation
Marek Olšák [Sun, 17 Jan 2021 23:48:09 +0000 (18:48 -0500)]
radeonsi: iterate from draw 1 for total/min_direct_count computation

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

3 years agoradeonsi: enable accidentally disabled fast launch with non-indexed tri strips
Marek Olšák [Thu, 14 Jan 2021 13:23:04 +0000 (08:23 -0500)]
radeonsi: enable accidentally disabled fast launch with non-indexed tri strips

Only *indexed* triangle strips hang.

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

3 years agoradeonsi: skip some code for ALLOW_PRIM_DISCARD_CS if tess or GS is enabled
Marek Olšák [Thu, 14 Jan 2021 05:03:23 +0000 (00:03 -0500)]
radeonsi: skip some code for ALLOW_PRIM_DISCARD_CS if tess or GS is enabled

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

3 years agoradeonsi: rename SI_SGPR_RW_BUFFERS to SI_SGPR_INTERNAL_BINDINGS
Marek Olšák [Tue, 12 Jan 2021 04:07:50 +0000 (23:07 -0500)]
radeonsi: rename SI_SGPR_RW_BUFFERS to SI_SGPR_INTERNAL_BINDINGS

They are just internal buffers and images.

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

3 years agoradeonsi: move if (sctx->vertex_buffers_dirty) into the upload function
Marek Olšák [Mon, 11 Jan 2021 19:52:00 +0000 (14:52 -0500)]
radeonsi: move if (sctx->vertex_buffers_dirty) into the upload function

This looks unnecessary, but the next commit will build upon it and add
more stuff into the function.

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

3 years agoradeonsi: don't set vertex buffer dirty flags when they don't do anything
Marek Olšák [Mon, 11 Jan 2021 19:42:50 +0000 (14:42 -0500)]
radeonsi: don't set vertex buffer dirty flags when they don't do anything

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

3 years agoradeonsi: move y_inverted out of si_viewports
Marek Olšák [Sun, 10 Jan 2021 07:00:58 +0000 (02:00 -0500)]
radeonsi: move y_inverted out of si_viewports

for better packing

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

3 years agoradeonsi: inline si_blend_color and si_clip_state structures
Marek Olšák [Sun, 10 Jan 2021 06:58:31 +0000 (01:58 -0500)]
radeonsi: inline si_blend_color and si_clip_state structures

better packing

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

3 years agoradeonsi: simplify determining whether render condition is enabled at draw time
Marek Olšák [Sun, 10 Jan 2021 05:45:22 +0000 (00:45 -0500)]
radeonsi: simplify determining whether render condition is enabled at draw time

Read one bool instead of reading one bool and one pointer.

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

3 years agoradeonsi: add internal blitter_running flag
Marek Olšák [Sun, 10 Jan 2021 03:58:40 +0000 (22:58 -0500)]
radeonsi: add internal blitter_running flag

to skip the indirection in si_decompress_textures

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

3 years agoradeonsi: don't use rasterizer_discard to validate draws, only check ps_shader
Marek Olšák [Sun, 10 Jan 2021 02:08:48 +0000 (21:08 -0500)]
radeonsi: don't use rasterizer_discard to validate draws, only check ps_shader

Let's just say that PS can never be NULL here.

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

3 years agoradeonsi: optimize translating index_size to index_type
Marek Olšák [Sat, 9 Jan 2021 13:58:11 +0000 (08:58 -0500)]
radeonsi: optimize translating index_size to index_type

gcc generated a lookup table for the switch. This replaces it with
arithmetics.

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

3 years agoradeonsi: don't mark NULL states as dirty in si_pm4_reset_emitted
Marek Olšák [Sat, 9 Jan 2021 13:10:13 +0000 (08:10 -0500)]
radeonsi: don't mark NULL states as dirty in si_pm4_reset_emitted

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

3 years agoradeonsi: clear dirty_states if si_pm4_bind_state is unbinding or no-op
Marek Olšák [Sat, 9 Jan 2021 12:59:11 +0000 (07:59 -0500)]
radeonsi: clear dirty_states if si_pm4_bind_state is unbinding or no-op

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

3 years agoradeonsi: add new possibly faster command submission helpers
Marek Olšák [Sat, 9 Jan 2021 20:14:22 +0000 (15:14 -0500)]
radeonsi: add new possibly faster command submission helpers

This decreases the release libgallium_dri.so size without debug symbols
by 16384 bytes. The CPU time spent in si_emit_draw_packets decreased
from 4.5% to 4.1% in viewperf13/catia/plane01.

The previous code did:
    cs->current.buf[cs->current.cdw++] = ...;
    cs->current.buf[cs->current.cdw++] = ...;
    cs->current.buf[cs->current.cdw++] = ...;
    cs->current.buf[cs->current.cdw++] = ...;

The new code does:
    unsigned num = cs->current.cdw;
    uint32_t *buf = cs->current.buf;
    buf[num++] = ...;
    buf[num++] = ...;
    buf[num++] = ...;
    buf[num++] = ...;
    cs->current.cdw = num;

The code is the same (radeon_emit is redefined as a macro) except that
all set and emit functions must be surrounded by radeon_begin(cs) and
radeon_end().

radeon_packets_added() returns whether there has been any new packets added
since radeon_begin.

radeon_end_update_context_roll(sctx) sets sctx->context_roll = true
if there has been any new packets added since radeon_begin.

For now, the "cs" parameter is intentionally unused in radeon_emit and
radeon_emit_array.

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

3 years agoradv: fix separate depth/stencil layout in render pass
Samuel Pitoiset [Mon, 18 Jan 2021 07:59:29 +0000 (08:59 +0100)]
radv: fix separate depth/stencil layout in render pass

We used to select the stencil layout even if we should have selected
the depth/stencil one.

Fixes: e4c8491bdf8 ("radv: implement VK_KHR_separate_depth_stencil_layouts")
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/8552>

3 years agozink: respect fragment-shader depth-layout
Erik Faye-Lund [Fri, 22 Jan 2021 10:42:18 +0000 (11:42 +0100)]
zink: respect fragment-shader depth-layout

This is required by GLSL 1.30 and later, so we should also respect the
setting.

Fixes: 6785d8c4601 ("zink: expose GLSL 1.30")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8644>

3 years agozink: make all xfb caps depend on extension
Erik Faye-Lund [Fri, 22 Jan 2021 11:41:42 +0000 (12:41 +0100)]
zink: make all xfb caps depend on extension

Without this, we'll expose GL_ARB_transform_feedback2 and
GL_ARB_transform_feedback3 even without VK_EXT_transform_feedback,
because these caps are directly wired up without checking the pervious
extensions.

Fixes: e8ad52f7b0c ("zink: enable xfb extension in screen creation")
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8640>

3 years agozink: require vulkan memory model for tesselation
Erik Faye-Lund [Fri, 22 Jan 2021 11:23:10 +0000 (12:23 +0100)]
zink: require vulkan memory model for tesselation

We enable the KHR_vulkan_memory_model extension whenever we use
tesselation, so right now this is a defacto requirement. So let's make
this requirement explicit.

Fixes: f815b87e188 ("zink: export tess shader pipe caps")
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8640>

3 years agozink: check for extension instead of function
Erik Faye-Lund [Fri, 22 Jan 2021 08:22:12 +0000 (09:22 +0100)]
zink: check for extension instead of function

This shouldn't change any behavior, it just seems a bit more to the
point to check for the extension that decides if these are NULL or not
than to check both of them.

Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8640>

3 years agozink: respect feature-cap for multi-draw indirect
Erik Faye-Lund [Fri, 22 Jan 2021 08:15:10 +0000 (09:15 +0100)]
zink: respect feature-cap for multi-draw indirect

Even in the presence of VK_KHR_draw_indirect_count, we still technically
need to respect the feature-cap when using a Vk 1.0 core-function.

Fixes: cef876910a0 ("zink: enable PIPE_CAP_MULTI_DRAW_INDIRECT(_PARAMS) caps")
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8640>

3 years agozink: respect feature-cap for sample-shading
Erik Faye-Lund [Fri, 22 Jan 2021 08:11:51 +0000 (09:11 +0100)]
zink: respect feature-cap for sample-shading

Vulkan has a cap to enable this, we should check that one rather than
always claiming support.

Fixes: 0c70268ff73 ("zink: mark ARB_sample_shading as supported")
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8640>

3 years agozink: respect feature-cap for independent blending
Erik Faye-Lund [Fri, 22 Jan 2021 08:09:03 +0000 (09:09 +0100)]
zink: respect feature-cap for independent blending

Vulkan has a cap to enable this, we should check that one rather than
always claiming support.

Fixes: 8d46e35d16e ("zink: introduce opengl over vulkan")
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8640>

3 years agozink: respect feature-cap for robust buffer access
Erik Faye-Lund [Fri, 22 Jan 2021 08:07:12 +0000 (09:07 +0100)]
zink: respect feature-cap for robust buffer access

Vulkan has a cap to enable this, we should check that one rather than
always claiming support.

Fixes: 61720098fa4 ("zink: set PIPE_CAP_ROBUST_BUFFER_ACCESS_BEHAVIOR")
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8640>

3 years agozink: always expose linear float textures
Erik Faye-Lund [Fri, 22 Jan 2021 08:00:48 +0000 (09:00 +0100)]
zink: always expose linear float textures

This is not an optional feature in Vulkan, so we can rely on this being
supported. This has the nice benefit of enabling OpenGL ES 3.0 support
on ANV.

Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8640>

3 years agofrontend/va/image: add pipe flush for vlVaPutImage
Boyuan Zhang [Tue, 19 Jan 2021 00:21:35 +0000 (19:21 -0500)]
frontend/va/image: add pipe flush for vlVaPutImage

To fix synchronization issue between multimedia queue and gfx queue.
Adding flush call will let multimedia queue to wait for the content of gfx
command buffer to be executed, for the case where there is dependency
between these two queues.

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8567>

3 years agoradv: enable SQTT support on GFX10.3
Samuel Pitoiset [Fri, 11 Dec 2020 14:54:20 +0000 (15:54 +0100)]
radv: enable SQTT support on GFX10.3

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

3 years agoac,radv: add SQTT support on GFX10.3
Samuel Pitoiset [Fri, 11 Dec 2020 14:54:05 +0000 (15:54 +0100)]
ac,radv: add SQTT support on GFX10.3

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

3 years agoac/rgp: add support for GFX10.3
Samuel Pitoiset [Thu, 21 Jan 2021 09:03:46 +0000 (10:03 +0100)]
ac/rgp: add support for GFX10.3

According to AMDVLK, GFX10.3 uses SQTT version 2.4.

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

3 years agoradv: inhibit clock gating when tracing with SQTT
Samuel Pitoiset [Thu, 21 Jan 2021 09:14:48 +0000 (10:14 +0100)]
radv: inhibit clock gating when tracing with SQTT

Cc: <mesa-stable@lists.freedesktop.org>
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/8616>

3 years agoradv: fix overflow when computing the SQTT buffer size
Samuel Pitoiset [Thu, 21 Jan 2021 12:39:27 +0000 (13:39 +0100)]
radv: fix overflow when computing the SQTT buffer size

With RADV_THREAD_TRACE_BUFFER_SIZE=1073741824, the computed size
will overflow and be 4096 instead of 4294967296.

Cc: <mesa-stable@lists.freedesktop.org>
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/8616>

3 years agoaco: return references in instruction cast methods
Rhys Perry [Thu, 21 Jan 2021 16:13:34 +0000 (16:13 +0000)]
aco: return references in instruction cast methods

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

3 years agoaco: use format-check methods
Rhys Perry [Wed, 20 Jan 2021 15:27:16 +0000 (15:27 +0000)]
aco: use format-check methods

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

3 years agoaco: use instruction cast methods
Rhys Perry [Wed, 20 Jan 2021 14:49:08 +0000 (14:49 +0000)]
aco: use instruction cast methods

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

3 years agoaco: add instruction cast and format-check methods
Rhys Perry [Wed, 20 Jan 2021 13:46:01 +0000 (13:46 +0000)]
aco: add instruction cast and format-check methods

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

3 years agoaco: remove Format::{VOP3A,VOP3B}
Rhys Perry [Wed, 20 Jan 2021 13:50:45 +0000 (13:50 +0000)]
aco: remove Format::{VOP3A,VOP3B}

These are really the same as Format::VOP3.

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

3 years agofrontends/va/context: don't set max_references with num_render_targets
Víctor Manuel Jáquez Leal [Sun, 6 Dec 2020 13:56:58 +0000 (14:56 +0100)]
frontends/va/context: don't set max_references with num_render_targets

For HEVC and VP9 template's max_references are tied to the number of
surfaces associated with context. Later, the decoder is created if
max_references is different to zero.

But vaCreateContext() doesn't really need an array of VASurfaceIDs (see
https://lists.01.org/pipermail/intel-vaapi-media/2017-July/000052.html and
https://github.com/intel/libva/issues/251).

This patch removes the validation of the max_references at decoder
creation and also remove the assignation of num_render_targets to
max_references.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7949>

3 years agoaco: don't consider a phi trivial if same's register doesn't match the def
Rhys Perry [Fri, 22 Jan 2021 10:47:19 +0000 (10:47 +0000)]
aco: don't consider a phi trivial if same's register doesn't match the def

For example:
 s2: %688:s[32-33] = p_linear_phi %3:s[10-11], %688:s[32-33]
would have been considered trivial.

This might happen due to parallelcopies when assigning phi registers.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes: 69b6069dd28 ("aco: refactor try_remove_trivial_phi() in RA")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8645>

3 years agodocs/features: remove a few redundant zink mentions
Erik Faye-Lund [Fri, 22 Jan 2021 07:50:23 +0000 (08:50 +0100)]
docs/features: remove a few redundant zink mentions

GL 4.1 and 4.2 is listed as done for Zink anyway, so we don't need to
single out these features as supported any longer.

Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8639>

3 years agodocs/features: add missing features for zink
Erik Faye-Lund [Fri, 22 Jan 2021 07:03:59 +0000 (08:03 +0100)]
docs/features: add missing features for zink

Zink implements more features than currently maked off in features.txt,
so let's fill those bits in!

This is based on the output of glxinfo on ANV.

Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8639>

3 years agov3dv: properly handle two different binding points for cmd_buffers
Alejandro Piñeiro [Fri, 15 Jan 2021 22:07:45 +0000 (23:07 +0100)]
v3dv: properly handle two different binding points for cmd_buffers

From vkCmdBindPipeline spec:

  "pipelineBindPoint is a VkPipelineBindPoint value specifying to
   which bind point the pipeline is bound. Binding one does not disturb
   the others."

But internally we were only handling one pipeline per command buffer,
so binding a pipeline of one type would override an alredy bound
pipeline of other type.

Note that for push constants, in the same way that we were keeping one
client array and one bo for the values, for all stages, independently
of the stageFlags specified by vkCmdPushConstants, we are keeping the
same idea here, so such client array and bo is still tied to the
command buffer, and used by the two pipeline bind points. That makes
far easier tracking the push constants. We could revisit in the future
if we want a more fine grained tracking.

Fixes the following crashes:
 dEQP-VK.pipeline.push_constant.lifetime.pipeline_change_diff_range_bind_push_vert_and_comp
 dEQP-VK.pipeline.push_constant.lifetime.pipeline_change_same_range_bind_push_vert_and_comp

v2 (from Iago review)
   * Move removal of v3dv_resource definition to a different commit.
   * Use the new v3dv_cmd_pipeline_state on the cmd buffer meta
     sub-struct, call it gfx for consistency

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8613>

3 years agov3dv: drop v3dv_resource definition
Alejandro Piñeiro [Thu, 21 Jan 2021 13:18:14 +0000 (14:18 +0100)]
v3dv: drop v3dv_resource definition

In the end it became a v3dv_bo+offset combination, and for that we
already have v3dv_cl_reloc, so it became redundant.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8613>

3 years agopanfrost: Add support for INTEL_blackhole_render
Icecream95 [Thu, 21 Jan 2021 03:22:35 +0000 (16:22 +1300)]
panfrost: Add support for INTEL_blackhole_render

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