platform/upstream/mesa.git
3 years agopanfrost: Pass a dev object to panfrost_needs_explicit_stride()
Boris Brezillon [Wed, 16 Dec 2020 07:40:33 +0000 (08:40 +0100)]
panfrost: Pass a dev object to panfrost_needs_explicit_stride()

So we can soon use the same path for Bifrost and Midgard.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8125>

3 years agopanfrost: Merge emit_texture_payload() and emit_texture_payload_v7()
Boris Brezillon [Wed, 16 Dec 2020 08:14:48 +0000 (09:14 +0100)]
panfrost: Merge emit_texture_payload() and emit_texture_payload_v7()

The only reason we have two different functions to prepare the texture
payload is the different ordering between pre-v7 and v7+ GPUs. Abstract
the surface iteration so we can merge panfrost_emit_texture_payload_v7()
and panfrost_emit_texture_payload().

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8125>

3 years agopanfrost: Pass a device object to panfrost_new_texture()
Boris Brezillon [Wed, 16 Dec 2020 07:36:46 +0000 (08:36 +0100)]
panfrost: Pass a device object to panfrost_new_texture()

We will need it to merge some of the Bifrost and Midgard logic.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8125>

3 years agopanfrost: Group CRC fields in a struct
Boris Brezillon [Mon, 14 Dec 2020 18:50:08 +0000 (19:50 +0100)]
panfrost: Group CRC fields in a struct

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8125>

3 years agopanfrost: Move checksum_bo to panfrost_resource
Boris Brezillon [Thu, 17 Dec 2020 09:33:50 +0000 (10:33 +0100)]
panfrost: Move checksum_bo to panfrost_resource

There's no reason to have the checksum_bo at the slice level since there
can only be one external CRC BO per resource. Move this field to the
panfrost_resource struct.

Suggested-by: Icecream95
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8125>

3 years agofeatures: mark off textureGather for zink
Mike Blumenkrantz [Mon, 4 Jan 2021 14:46:07 +0000 (09:46 -0500)]
features: mark off textureGather for zink

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

3 years agozink: enable PIPE_CAP_MAX_TEXTURE_GATHER_COMPONENTS
Mike Blumenkrantz [Mon, 4 Jan 2021 14:45:34 +0000 (09:45 -0500)]
zink: enable PIPE_CAP_MAX_TEXTURE_GATHER_COMPONENTS

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

3 years agozink: handle textureGather with Shadow-type samplers
Mike Blumenkrantz [Fri, 24 Jul 2020 13:48:36 +0000 (09:48 -0400)]
zink: handle textureGather with Shadow-type samplers

these have to go through OpImageDrefGather without composite construction
on the result

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

3 years agozink: implement ARB_texture_gather
Mike Blumenkrantz [Wed, 15 Jul 2020 19:25:45 +0000 (15:25 -0400)]
zink: implement ARB_texture_gather

again pretty straightforward, just hooking up tg4 tex op in ntv

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

3 years agozink: use Offset param for txf ops
Mike Blumenkrantz [Wed, 15 Jul 2020 19:18:24 +0000 (15:18 -0400)]
zink: use Offset param for txf ops

there's an image operand for handling offsets, so we can use this when it
hasn't previously been lowered away

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

3 years agozink: run nir_lower_tex for offsets if shaderImageGatherExtended is missing
Mike Blumenkrantz [Thu, 24 Dec 2020 15:38:15 +0000 (10:38 -0500)]
zink: run nir_lower_tex for offsets if shaderImageGatherExtended is missing

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

3 years agonir: fix missing nir_lower_pntc_ytransform.c in the makefile
Danylo Piliaiev [Mon, 4 Jan 2021 14:16:32 +0000 (16:16 +0200)]
nir: fix missing nir_lower_pntc_ytransform.c in the makefile

Fixes: 33fd9e5d "nir: account for point-coord origin when lowering it"
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8308>

3 years agozink: handle dynamic sampler array indexing for arb_gpu_shader5
Mike Blumenkrantz [Tue, 28 Jul 2020 18:50:45 +0000 (14:50 -0400)]
zink: handle dynamic sampler array indexing for arb_gpu_shader5

this requires that arrays of samplers be declared as single variables with
a single binding point, which is then propagated through to the descriptor
set updates

constant sampler array indexing is now un-lowered during access so we can
construct an access chain for both constant and dynamic offset paths

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

3 years agoradv: avoid oob read during clear
Mike Blumenkrantz [Thu, 31 Dec 2020 20:44:32 +0000 (15:44 -0500)]
radv: avoid oob read during clear

when clearing a depth/stencil image the passed colorvalue pointer is
smaller than the VkClearValue struct size

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

3 years agonir: account for point-coord origin when lowering it
Danylo Piliaiev [Tue, 22 Dec 2020 12:37:45 +0000 (14:37 +0200)]
nir: account for point-coord origin when lowering it

The resulting point-coord origin not only depends on whether
the draw buffer is flipped but also on GL_POINT_SPRITE_COORD_ORIGIN
state. Which makes its transform differ from a transform of wpos.

On freedreno fixes:
 gl-3.2-pointsprite-origin
 gl-3.2-pointsprite-origin -fbo

Fixes: d934d320 "nir: Add flipping of gl_PointCoord.y in nir_lower_wpos_ytransform."
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8200>

3 years agoradv: Use VRAM for the initial gfx cmdbuffer.
Bas Nieuwenhuizen [Mon, 28 Dec 2020 02:14:18 +0000 (03:14 +0100)]
radv: Use VRAM for the initial gfx cmdbuffer.

Not expect it to make any real difference, but lets be consistent.

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

3 years agoradv: Put commandbuffers in VRAM if all VRAM is CPU visible.
Bas Nieuwenhuizen [Mon, 7 Dec 2020 23:09:29 +0000 (00:09 +0100)]
radv: Put commandbuffers in VRAM if all VRAM is CPU visible.

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

3 years agoradv: Use VRAM for upload buffers if entire VRAM is CPU-visible.
Bas Nieuwenhuizen [Mon, 7 Dec 2020 23:25:56 +0000 (00:25 +0100)]
radv: Use VRAM for upload buffers if entire VRAM is CPU-visible.

Not doing this for APUs because spilling is quite likely, due to
overall VRAM pressure.

Also adding a flag to disable for performance debugging.

Finally adds some memset for places where we depended on the memory
being initialized to zero, which we won't get with VRAM anymore.
(I think these places should stop depending on it since it hides
 issues with executing the cmdbuffer multiple times, but this
  preserves behavior)

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

3 years agomicrosoft/compiler: Fix clang fallthrough warnings
Jesse Natalie [Mon, 28 Dec 2020 20:52:00 +0000 (12:52 -0800)]
microsoft/compiler: Fix clang fallthrough warnings

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8248>

3 years agomicrosoft/resource_state_manager: Remove unused private variable
Jesse Natalie [Mon, 28 Dec 2020 18:57:02 +0000 (10:57 -0800)]
microsoft/resource_state_manager: Remove unused private variable

Clang detects that this variable is unused. We can re-add it if
we end up needing it but for now let's just remove it.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8248>

3 years agomicrosoft/compiler: Fix tautological comparison
Jesse Natalie [Mon, 28 Dec 2020 18:56:17 +0000 (10:56 -0800)]
microsoft/compiler: Fix tautological comparison

Clang detects that a signed character can't be >= 128. Instead,
we should just explicitly check for the 8th bit via bitmask compare.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8248>

3 years agomicrosoft/compile: Fix incorrect enum type in function signature
Jesse Natalie [Mon, 28 Dec 2020 18:55:29 +0000 (10:55 -0800)]
microsoft/compile: Fix incorrect enum type in function signature

Clang warns for passing one enum type where another was expected.
This was just a copy/paste bug, and had no real impact since the
enum was just used as an integer in this function.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8248>

3 years agod3d12: Remove copy/pasted line of array initialization
Jesse Natalie [Mon, 28 Dec 2020 18:54:24 +0000 (10:54 -0800)]
d3d12: Remove copy/pasted line of array initialization

Clang warns that the second instance overrides array entry
initialization, so remove the copy/pasted line. UNORM entries
are already initialized above (with alpha explicitly, and
NO_ALPHA used for the others), so this was just a duplicate and
had no real impact.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8248>

3 years agod3d12: Fix uninitialized variable referenced in error case
Jesse Natalie [Mon, 28 Dec 2020 18:52:44 +0000 (10:52 -0800)]
d3d12: Fix uninitialized variable referenced in error case

Clang warns that errorString is uninitialized if printBlobUtf8
is null, meaning GetBlobAsUtf8 failed, but then we go ahead and
access it (and printBlobUtf8) after the if. Expand the if to
encompass the printing.

Fixes: 2ea15cd6 ("d3d12: introduce d3d12 gallium driver")

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8248>

3 years agod3d12: Fix clang warnings from {0} in C++ code
Jesse Natalie [Mon, 28 Dec 2020 18:50:40 +0000 (10:50 -0800)]
d3d12: Fix clang warnings from {0} in C++ code

There's no reason for the 0 here since C++ supports {},
and clang doesn't like it, so drop it.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8248>

3 years agomicrosoft/resoure_state_manager: Silence GCC invalid offsetof warning
Jesse Natalie [Mon, 28 Dec 2020 18:49:38 +0000 (10:49 -0800)]
microsoft/resoure_state_manager: Silence GCC invalid offsetof warning

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8248>

3 years agod3d12: Fix implicit fallthrough warnings
Jesse Natalie [Mon, 28 Dec 2020 18:48:54 +0000 (10:48 -0800)]
d3d12: Fix implicit fallthrough warnings

Changes comments to use FALLTHROUGH macro, to silence warnings
from both GCC and clang.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8248>

3 years agod3d12: Fix unused local variable warning in release build
Jesse Natalie [Mon, 28 Dec 2020 18:48:21 +0000 (10:48 -0800)]
d3d12: Fix unused local variable warning in release build

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8248>

3 years agod3d12: Signed/unsigned comparison warning fixes
Jesse Natalie [Mon, 28 Dec 2020 18:47:48 +0000 (10:47 -0800)]
d3d12: Signed/unsigned comparison warning fixes

Missed these last time through, not sure how. I couldn't find a
reason for the nested loop in d3d12_enable_fake_so_buffers to go
backwards, which would require signed, so I switched it to forward.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8248>

3 years agod3d12: Unused variable warning indicated bug in bo_unmap
Jesse Natalie [Mon, 28 Dec 2020 18:46:21 +0000 (10:46 -0800)]
d3d12: Unused variable warning indicated bug in bo_unmap

Fixes: 2ea15cd6 ("d3d12: introduce d3d12 gallium driver")

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8248>

3 years agomicrosoft/compiler: Fix incorrect size passed to strncpy
Jesse Natalie [Mon, 28 Dec 2020 18:44:08 +0000 (10:44 -0800)]
microsoft/compiler: Fix incorrect size passed to strncpy

GCC correctly detects/warns that this was the wrong size

Fixes: b9c61379 ("microsoft/compiler: translate nir to dxil")

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8248>

3 years agomicrosoft/compiler: Fix warnings produced by GCC in release mode
Jesse Natalie [Mon, 28 Dec 2020 18:42:37 +0000 (10:42 -0800)]
microsoft/compiler: Fix warnings produced by GCC in release mode

Inline some variables/functions that are only used for asserts.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8248>

3 years agoetnaviv: Fix rework ZSA into a derived state
Marek Vasut [Sat, 19 Dec 2020 00:23:12 +0000 (01:23 +0100)]
etnaviv: Fix rework ZSA into a derived state

In case the stencil is modified, it is also enabled. That was the
behavior of the original code, which was also the correct behavior,
so reinstate the behavior.

Fixes dEQP-GLES2.functional.fragment_ops.depth_stencil.* on STM32MP1 GC400T.

Fixes: b29fe26d438 ("etnaviv: rework ZSA into a derived state")
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8174>

3 years agosoftpipe: Fix typos.
Vinson Lee [Thu, 31 Dec 2020 03:59:08 +0000 (19:59 -0800)]
softpipe: Fix typos.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8279>

3 years agoci: Add a530 and a630 piglit runs.
Eric Anholt [Wed, 23 Dec 2020 21:52:22 +0000 (13:52 -0800)]
ci: Add a530 and a630 piglit runs.

These bring a whole lot of new coverage to these drivers, since dEQP is
bad at desktop GL feature coverage around early GL 3.x.  piglit also gets
at a lot of MSAA, fast clearing, and texture layout issues that dEQP
doesn't do much with.

Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7370>

3 years agoci/bare-metal: Pass through FDO_CI_CONCURRENT on bare-metal runners.
Eric Anholt [Tue, 29 Dec 2020 18:59:07 +0000 (10:59 -0800)]
ci/bare-metal: Pass through FDO_CI_CONCURRENT on bare-metal runners.

I've set it up in the gitlab-runer config on all the freedreno boards.
This means that for piglit, where the run.sh always choose either this
variable or 4 threads otherwise, we'll have the right number of parallel
tasks.

Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7370>

3 years agoci/bare-metal: Drop extra DEQP_PARALLEL settings.
Eric Anholt [Tue, 29 Dec 2020 18:59:07 +0000 (10:59 -0800)]
ci/bare-metal: Drop extra DEQP_PARALLEL settings.

The .baremetal_test sets DEQP_PARALLEL: 0 (number of CPUs), so existing
DEQP tasks should already be auto-configured.  This means we can drop
a530's single-threaded overrides, since it's non-SMP.

Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7370>

3 years agoci/bare-metal: pass thorugh PIGLIT env vars
Christian Gmeiner [Tue, 20 Oct 2020 17:33:51 +0000 (19:33 +0200)]
ci/bare-metal: pass thorugh PIGLIT env vars

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

3 years agoci/fastboot: exclude either deqp or piglit
Christian Gmeiner [Tue, 20 Oct 2020 17:33:07 +0000 (19:33 +0200)]
ci/fastboot: exclude either deqp or piglit

Keep the generated initramfs image as small as possible.

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

3 years agoci/bare-metal: build full piglit for baremetal ARM targets.
Christian Gmeiner [Sat, 17 Oct 2020 19:34:42 +0000 (21:34 +0200)]
ci/bare-metal: build full piglit for baremetal ARM targets.

ARM64 had it for traces only, upgrade it to a full build so we can test
a630.  We also add it for armhf, as we'll want it on both rpi and etnaviv.

Bumped the LAVA tag as well, since the script changes a bit and it does
impact the final image (even if we aren't pulling in full piglit there
yet).  Note I also had to drop the "v" on the tarring of their rootfs, as
the verbosity on baremetal was exceeding job log size.

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

3 years agoci: build mesa with gbm
Christian Gmeiner [Mon, 26 Oct 2020 21:01:07 +0000 (22:01 +0100)]
ci: build mesa with gbm

We need gbm support for piglit.

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

3 years agoci: build ARM mesa with X11 OpenGL support
Christian Gmeiner [Sat, 17 Oct 2020 12:00:45 +0000 (14:00 +0200)]
ci: build ARM mesa with X11 OpenGL support

I want to run piglit with baremetal ci and for this opengl support
is needed.

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

3 years agoclover: Expose cl_khr_extended_versioning
Pierre Moreau [Thu, 12 Nov 2020 20:39:10 +0000 (21:39 +0100)]
clover: Expose cl_khr_extended_versioning

With the extension specification merged in and the last query now
supported, the extension can be advertised.

v2: Fix indentation (Dave Airlie)

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2078>

3 years agoclover: Implement clCreateProgramWithIL from OpenCL 2.1
Pierre Moreau [Tue, 5 May 2020 11:16:52 +0000 (13:16 +0200)]
clover: Implement clCreateProgramWithIL from OpenCL 2.1

v2: Remove clCreateProgramWithIL from api/invalid.cpp

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2078>

3 years agoclover: Advertise cl_khr_il_program
Pierre Moreau [Thu, 12 Nov 2020 11:01:14 +0000 (12:01 +0100)]
clover: Advertise cl_khr_il_program

v2:
* Change the code to avoid the macro (Karol Herbst, Francisco Jerez);
* Update the code to add a `cl_name_version`.

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2078>

3 years agoclover/api: Implement CL_DEVICE_IL_VERSION
Pierre Moreau [Tue, 5 May 2020 11:16:47 +0000 (13:16 +0200)]
clover/api: Implement CL_DEVICE_IL_VERSION

v2: Move `supported_il_versions_as_string()` from `device` to an
    anonymous namespace, and remove the static storage of the results
    (Francisco Jerez)

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2078>

3 years agoclover: Handle CL_PROGRAM_IL in clGetProgramInfo
Pierre Moreau [Tue, 5 May 2020 11:16:44 +0000 (13:16 +0200)]
clover: Handle CL_PROGRAM_IL in clGetProgramInfo

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2078>

3 years agoclover: Implement clCreateProgramWithILKHR
Pierre Moreau [Tue, 5 May 2020 11:16:42 +0000 (13:16 +0200)]
clover: Implement clCreateProgramWithILKHR

v2: Use the same storage for OpenCL C sources and ILs representations
    (Karol Herbst, Francisco Jerez)
v3:
* Remove `program::has_source` and instead add a value to
  `program::il_type` for sources. (Francisco Jerez)
* Use `std::move()` on sources.
* Replace `CL_MAKE_VERSION(99999999u, 0u, 0u)` with
  `std::numeric_limits<uint32_t>::max()` (Francisco Jerez)

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2078>

3 years agoclover: List supported ILs versions
Pierre Moreau [Thu, 12 Nov 2020 19:38:18 +0000 (20:38 +0100)]
clover: List supported ILs versions

v2:
* Change the existing method to return a `std::vector<cl_name_version`;
* Add a string function that uses the previous method but returns a
  `std::string`.
v3:
* Remove `supported_il_versions_as_string()` (Francisco Jerez)

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2078>

3 years agoclover/spirv: Use cl_version for SPIR-V versions (v2)
Pierre Moreau [Thu, 12 Nov 2020 19:36:15 +0000 (20:36 +0100)]
clover/spirv: Use cl_version for SPIR-V versions (v2)

v2: Explicitly construct the cl_name_version object.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2078>

3 years agoclover/spirv: Add function checking the SPIR-V version
Pierre Moreau [Tue, 5 May 2020 11:16:39 +0000 (13:16 +0200)]
clover/spirv: Add function checking the SPIR-V version

An OpenCL implementation advertising a certain version of the API does
not have to support all existing version: some versions are mandatory
but not all. For example, the OpenCL 2.1 Specification mentions that
conforming implementations have to support SPIR-V 1.0, but only might
support higher versions.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2078>

3 years agoclover/spirv: Change API to use std::string binaries
Pierre Moreau [Sun, 13 Dec 2020 20:25:33 +0000 (21:25 +0100)]
clover/spirv: Change API to use std::string binaries

clover::program stores IL representations using a std::string, so change
the API to also use std::string to avoid copies and additional
allocations.

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2078>

3 years agoclover/spirv: Add function checking whether a binary contains SPIR-V
Pierre Moreau [Tue, 5 May 2020 11:16:36 +0000 (13:16 +0200)]
clover/spirv: Add function checking whether a binary contains SPIR-V

v2: Change API to take a std::string

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2078>

3 years agoclover/spirv: Add version conversion utilities
Pierre Moreau [Thu, 12 Nov 2020 19:08:45 +0000 (20:08 +0100)]
clover/spirv: Add version conversion utilities

SPIR-V and OpenCL encodes differently version numbers and since SPIR-V
version numbers are reported in OpenCL, there is a need for utilities to
convert back and forth.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Pierre Moreau <dev@pmoreau.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2078>

3 years agost/mesa: skip glDrawPixels if it's totally clipped for all codepaths
Marek Olšák [Mon, 12 Oct 2020 01:27:21 +0000 (21:27 -0400)]
st/mesa: skip glDrawPixels if it's totally clipped for all codepaths

Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7720>

3 years agost/mesa: relax requirements for doing glCopyPixels via blit
Marek Olšák [Mon, 12 Oct 2020 01:25:14 +0000 (21:25 -0400)]
st/mesa: relax requirements for doing glCopyPixels via blit

glCopyPixels doesn't use a vertex shader, so ignore it.
The rest should be obvious.

Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7720>

3 years agost/mesa: don't do glCopyPixels via blit if depth bounds test is enabled
Marek Olšák [Wed, 9 Dec 2020 01:40:57 +0000 (20:40 -0500)]
st/mesa: don't do glCopyPixels via blit if depth bounds test is enabled

Fixes: 36a6f848bb0 - st/mesa: add EXT_depth_bounds_test

Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7720>

3 years agogallium/util: fix util_can_blit_via_copy_region for conditional rendering
Marek Olšák [Mon, 21 Dec 2020 07:39:13 +0000 (02:39 -0500)]
gallium/util: fix util_can_blit_via_copy_region for conditional rendering

Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7720>

3 years agodocs: Document extensions exposing GL3.0
Alyssa Rosenzweig [Fri, 1 Jan 2021 04:52:04 +0000 (23:52 -0500)]
docs: Document extensions exposing GL3.0

Conditional rendering bumps us to big GL 3.0 on Midgard, but broken
texture buffer handling keeps us from GL 3.1. That should be fixed
shortly, I hope.

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

3 years agopanfrost: Set conditional render cap
Icecream95 [Sun, 6 Sep 2020 11:26:51 +0000 (23:26 +1200)]
panfrost: Set conditional render cap

Enables OpenGL 3.0 by default on t760+:

    $ PAN_MESA_DEBUG= glxinfo | grep "GL version"
    OpenGL version string: 3.0 Mesa 20.3.0-devel

Inverted conditional rendering is also enabled as the conditional
rendering code handles that case.

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

3 years agopanfrost: Respect the render condition
Alyssa Rosenzweig [Fri, 1 Jan 2021 04:49:10 +0000 (23:49 -0500)]
panfrost: Respect the render condition

Clears, draws, and blits should check. All from freedreno.

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

3 years agopanfrost: Import render condition check from fd
Alyssa Rosenzweig [Fri, 1 Jan 2021 04:44:32 +0000 (23:44 -0500)]
panfrost: Import render condition check from fd

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

3 years agopanfrost: Stub out panfrost_render_condition
Icecream95 [Sat, 5 Sep 2020 11:19:56 +0000 (23:19 +1200)]
panfrost: Stub out panfrost_render_condition

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

3 years agopan/mdg: Support loads and stores to scratch memory
Icecream95 [Thu, 31 Dec 2020 12:39:49 +0000 (01:39 +1300)]
pan/mdg: Support loads and stores to scratch memory

Similar to shared memory load/store, except giving a different memory
type to the hardware.

Add nir->scratch_size to ctx->tls_size to allocate the memory.

Tested with the Piglit OpenCL test i32-stack-array.cl.

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

3 years agopan/mdg: Invert the type conditional for load intrinsics
Icecream95 [Thu, 31 Dec 2020 12:59:27 +0000 (01:59 +1300)]
pan/mdg: Invert the type conditional for load intrinsics

There are now more intrinsics for which nir_type_uint is forced than
where the destination type is used to find the intrinsic type, so
invert the conditional so that nir_type_uint is the default case when
nothing more specific is given.

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

3 years agopan/mdg: Pass the memory type to mir_set_offset directly
Icecream95 [Thu, 31 Dec 2020 12:29:04 +0000 (01:29 +1300)]
pan/mdg: Pass the memory type to mir_set_offset directly

We want to add support for more memory types, so replace the is_shared
bool with an integer that is directly stored to load_store.arg_1.

The new memory type values are off by 0x40, as that bit now comes from
the index type.

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

3 years agopan/mdg: Add i2i64 to mir_match_offset
Icecream95 [Mon, 28 Dec 2020 12:00:24 +0000 (01:00 +1300)]
pan/mdg: Add i2i64 to mir_match_offset

Similar to the existing u2u64 function, but with a different type.

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

3 years agopan/mdg: Return false instead of asserting in mir_args_ssa
Icecream95 [Thu, 31 Dec 2020 12:44:04 +0000 (01:44 +1300)]
pan/mdg: Return false instead of asserting in mir_args_ssa

mir_args_ssa asserted that the given number of arguments to use is
greater than or equal to the actual number, but this is not checked by
callers, so instead of crashing return false to mark failure.

Fixes the local memory atomics OpenCL tests in Piglit.

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

3 years agopan/mdg: Replace zext with a type enum
Icecream95 [Thu, 31 Dec 2020 12:18:51 +0000 (01:18 +1300)]
pan/mdg: Replace zext with a type enum

The index type is actually a two-bit field, with support for both sign
and zero extension.

What was previously labelled as `zext` actually does sign-extension,
but we want that in most cases anyway.

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

3 years agopanfrost: Allow NULL for some binding functions
Icecream95 [Mon, 28 Dec 2020 12:13:49 +0000 (01:13 +1300)]
panfrost: Allow NULL for some binding functions

Handle Clover passing NULL to bind_sampler_states and
set_sampler_views when cleaning up after launching a job.

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

3 years agopan/mdg: Support nir_intrinsic_group_memory_barrier
Icecream95 [Mon, 28 Dec 2020 12:08:10 +0000 (01:08 +1300)]
pan/mdg: Support nir_intrinsic_group_memory_barrier

Treat it like the other memory barriers and do nothing.

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

3 years agopan/mdg: Support nir_intrinsic_load_global_constant
Icecream95 [Mon, 28 Dec 2020 11:57:42 +0000 (00:57 +1300)]
pan/mdg: Support nir_intrinsic_load_global_constant

Treat it the same as nir_intrinsic_load_global.

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

3 years agopan/mdg: Use the pan_nir_lower_64bit_intrin NIR pass
Icecream95 [Sat, 26 Dec 2020 11:04:52 +0000 (00:04 +1300)]
pan/mdg: Use the pan_nir_lower_64bit_intrin NIR pass

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

3 years agopanfrost: Add a NIR pass to lower 64-bit vec3 intrinsic loads
Icecream95 [Sat, 26 Dec 2020 11:04:14 +0000 (00:04 +1300)]
panfrost: Add a NIR pass to lower 64-bit vec3 intrinsic loads

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

3 years agopanfrost: Stop lowering cs derived sysvals in glsl
Icecream95 [Tue, 22 Dec 2020 12:27:42 +0000 (01:27 +1300)]
panfrost: Stop lowering cs derived sysvals in glsl

Mali GPUs have native gl_GlobalInvocationID support, so we don't want
it to be lowered.

Although we do want to lower gl_LocalInvocationIndex, the single CAP
doesn't allow for choosing what to lower. We've already told NIR to do
the lowering instead, so just disable the GLSL-level lowering.

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

3 years agopan/mdg: Set compute lowering options
Icecream95 [Tue, 22 Dec 2020 12:53:15 +0000 (01:53 +1300)]
pan/mdg: Set compute lowering options

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

3 years agopan/mdg: Implement load_global_invocation_id
Icecream95 [Tue, 22 Dec 2020 12:54:01 +0000 (01:54 +1300)]
pan/mdg: Implement load_global_invocation_id

NIR generates global_invocation_id, but Clover lowers it to
global_invocation_id_zero_base. It isn't lowered for OpenGL,
so we need to support both intrinsics.

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

3 years agopan/mdg: Add load_kernel_input support
Icecream95 [Tue, 22 Dec 2020 10:08:21 +0000 (23:08 +1300)]
pan/mdg: Add load_kernel_input support

Similar to uniform loads, except that the offset is in bytes instead
of vec4 units.

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

3 years agopan/mdg: Fix promoted uniform moves with 64-bit types
Icecream95 [Mon, 7 Sep 2020 09:29:28 +0000 (21:29 +1200)]
pan/mdg: Fix promoted uniform moves with 64-bit types

The move source is the second src, not the first one.

Fixes: 5e5ea25a0da ("pan/mdg: Explicitly type 64-bit uniform moves")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8264>

3 years agonir: Handle load_kernel_input in nir_get_io_offset_src
Icecream95 [Tue, 22 Dec 2020 10:03:19 +0000 (23:03 +1300)]
nir: Handle load_kernel_input in nir_get_io_offset_src

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

3 years agovirgl: Fix typos.
Vinson Lee [Sat, 12 Dec 2020 03:52:30 +0000 (19:52 -0800)]
virgl: Fix typos.

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

3 years agoci/softpipe: Update the comment about the rasterpos flake.
Eric Anholt [Thu, 31 Dec 2020 15:57:11 +0000 (07:57 -0800)]
ci/softpipe: Update the comment about the rasterpos flake.

The noted fix landed, but a test fix was needed.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8275>

3 years agoci/softpipe: Ban glx-multithread-texture, too.
Eric Anholt [Wed, 30 Dec 2020 21:16:10 +0000 (13:16 -0800)]
ci/softpipe: Ban glx-multithread-texture, too.

This one also flakes on us.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8275>

3 years agoci/softpipe: Skip flaky triangle-rasterization-overdraw.
Eric Anholt [Tue, 29 Dec 2020 19:21:26 +0000 (11:21 -0800)]
ci/softpipe: Skip flaky triangle-rasterization-overdraw.

It runs a different test each run based on current time, and fails
occasionally.  Until the test can get fixed, remove it.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8275>

3 years agonir/opt_vectorize: hash whether a swizzle accesses elements beyond the maximum vector...
Daniel Schürmann [Fri, 11 Sep 2020 10:05:17 +0000 (11:05 +0100)]
nir/opt_vectorize: hash whether a swizzle accesses elements beyond the maximum vectorization factor

Swizzles that access components outside of the maximum
vector size cannot be vectorized with each other.
This patch creates different hash bins for this case.

For example accesses to .x and .y are considered different variables
compared to accesses to .z and .w for 16-bit vec2.

This prevents the vectorization of things like
   vec2 16 ssa_3 = iadd ssa_1.xz, ssa_2.xz

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6666>

3 years agonir/opt_vectorize: rehash users of vectorized instructions
Daniel Schürmann [Tue, 22 Sep 2020 17:16:26 +0000 (18:16 +0100)]
nir/opt_vectorize: rehash users of vectorized instructions

This ensures that chains of ALU instructions are vectorized
in a single iteration.

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6666>

3 years agonir/opt_vectorize: don't hash filtered instructions
Daniel Schürmann [Fri, 9 Oct 2020 09:54:46 +0000 (11:54 +0200)]
nir/opt_vectorize: don't hash filtered instructions

This patch also changes nir_opt_vectorize_cb to
use only one instruction as parameter.

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6666>

3 years agonir/opt_vectorize: don't hash instructions which are already vectorized
Daniel Schürmann [Wed, 9 Sep 2020 16:44:48 +0000 (17:44 +0100)]
nir/opt_vectorize: don't hash instructions which are already vectorized

This guarantees that the hashset contains exactly the instructions
which can be vectorized.

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6666>

3 years agonir/opt_vectorize: use a single instruction per hash entry instead of a vector
Daniel Schürmann [Wed, 23 Sep 2020 14:08:13 +0000 (15:08 +0100)]
nir/opt_vectorize: use a single instruction per hash entry instead of a vector

This drastically simplifies vectorization but may potentially
lead to slightly worse vectorizations.

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6666>

3 years agonir: fix determining if an addition might overflow for phi sources
Samuel Pitoiset [Wed, 30 Dec 2020 09:28:54 +0000 (10:28 +0100)]
nir: fix determining if an addition might overflow for phi sources

nir_addition_might_overflow() expects the parent instruction to be
an alu instr but it might be a phi instr. Fix it by assuming that
the addition might overflow.

This fixes compiler crashes with Horizon Zero Dawn.

No fossils-db changes.

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

3 years agopan/mdg: Fix bound setting in RA for sources
Alyssa Rosenzweig [Thu, 31 Dec 2020 14:57:37 +0000 (09:57 -0500)]
pan/mdg: Fix bound setting in RA for sources

The bound parameter allows us to prevent allocations from crossing
particular boundaries (typically 128-bit boundaries). For 16-bit, we
don't want to cross 64-bit boundaries, in order to keep swizzles
possible to encode. We already handle this for 16-bit destinations, but
it _also_ needs to be (redundantly) handled for 16-bit sources, in case
types don't match (for example, with a vectorized size conversion
instruction).

Fixes a few newer dEQP fails.

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

3 years agopan/bi: Fix ATEST emission
Boris Brezillon [Mon, 30 Nov 2020 12:25:22 +0000 (13:25 +0100)]
pan/bi: Fix ATEST emission

The ATEST FAU index must point to the ATEST parameter datum slot
otherwise the cmdstream config is ignored.

(Rebased by Alyssa)

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8135>

3 years agopan/bi: Remove old IR
Alyssa Rosenzweig [Wed, 16 Dec 2020 19:37:17 +0000 (14:37 -0500)]
pan/bi: Remove old IR

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

3 years agopan/bi: Use new instruction types
Alyssa Rosenzweig [Mon, 28 Dec 2020 17:12:53 +0000 (12:12 -0500)]
pan/bi: Use new instruction types

And remove now redundant casts

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

3 years agopan/bi: Remove old IR instruction emit
Alyssa Rosenzweig [Wed, 16 Dec 2020 19:29:43 +0000 (14:29 -0500)]
pan/bi: Remove old IR instruction emit

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

3 years agopan/bi: Remove old IR opcode table
Alyssa Rosenzweig [Wed, 16 Dec 2020 19:28:18 +0000 (14:28 -0500)]
pan/bi: Remove old IR opcode table

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

3 years agopan/bi: Remove old IR helpers
Alyssa Rosenzweig [Wed, 16 Dec 2020 19:27:38 +0000 (14:27 -0500)]
pan/bi: Remove old IR helpers

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

3 years agopan/bi: Remove NIR->old IR
Alyssa Rosenzweig [Wed, 16 Dec 2020 19:24:18 +0000 (14:24 -0500)]
pan/bi: Remove NIR->old IR

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

3 years agopan/bi: Remove old IR scheduling
Alyssa Rosenzweig [Wed, 16 Dec 2020 19:23:53 +0000 (14:23 -0500)]
pan/bi: Remove old IR scheduling

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

3 years agopan/bi: Remove old IR spill code
Alyssa Rosenzweig [Wed, 16 Dec 2020 19:22:43 +0000 (14:22 -0500)]
pan/bi: Remove old IR spill code

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