platform/upstream/mesa.git
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>

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

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 packing helpers
Alyssa Rosenzweig [Wed, 16 Dec 2020 19:11:59 +0000 (14:11 -0500)]
pan/bi: Remove packing helpers

Support code for the old IR packing.

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 packs
Alyssa Rosenzweig [Wed, 16 Dec 2020 19:07:32 +0000 (14:07 -0500)]
pan/bi: Remove old IR packs

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 combine lowering
Alyssa Rosenzweig [Wed, 16 Dec 2020 19:06:33 +0000 (14:06 -0500)]
pan/bi: Remove combine lowering

Unused.

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

3 years agopan/bi: Switch to new IR
Alyssa Rosenzweig [Wed, 30 Dec 2020 20:50:50 +0000 (15:50 -0500)]
pan/bi: Switch to new 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: Stub FAU lowering pass
Alyssa Rosenzweig [Wed, 30 Dec 2020 20:50:36 +0000 (15:50 -0500)]
pan/bi: Stub FAU lowering pass

A given tuple can only load a single entry from FAU-RAM, so we need a
lowering pass before scheduling to assign FAU and lower the other
sources to moves.

Right now this only handles constants. Uniforms and general FAU are
todo.

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

3 years agopan/bi: Add bi_branch, bi_jump helpers
Alyssa Rosenzweig [Wed, 16 Dec 2020 17:58:35 +0000 (12:58 -0500)]
pan/bi: Add bi_branch, bi_jump 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: Schedule new instructions singletons
Alyssa Rosenzweig [Thu, 10 Dec 2020 21:05:11 +0000 (16:05 -0500)]
pan/bi: Schedule new instructions singletons

We'll let the routines coexist for a moment, just to keep the commits
digestible, but this is modified from bi_make_singleton.

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

3 years agopan/bi: Add bi_message_type_for_instr helper
Alyssa Rosenzweig [Thu, 10 Dec 2020 21:04:49 +0000 (16:04 -0500)]
pan/bi: Add bi_message_type_for_instr helper

Greatly simplified by the use of the 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: Add instruction emit for builder
Alyssa Rosenzweig [Wed, 16 Dec 2020 18:35:51 +0000 (13:35 -0500)]
pan/bi: Add instruction emit for builder

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

3 years agopan/bi: Add emit tex for builder
Alyssa Rosenzweig [Wed, 16 Dec 2020 18:03:04 +0000 (13:03 -0500)]
pan/bi: Add emit tex for builder

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

3 years agopan/bi: Fix TEXS/TEXC check prototype
Alyssa Rosenzweig [Wed, 16 Dec 2020 18:02:22 +0000 (13:02 -0500)]
pan/bi: Fix TEXS/TEXC check prototype

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

3 years agopan/bi: Emit TEXC with builder
Alyssa Rosenzweig [Wed, 16 Dec 2020 18:02:03 +0000 (13:02 -0500)]
pan/bi: Emit TEXC with builder

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

3 years agopan/bi: Add builder-using helpers for TEXC structs
Alyssa Rosenzweig [Wed, 16 Dec 2020 18:01:45 +0000 (13:01 -0500)]
pan/bi: Add builder-using helpers for TEXC structs

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

3 years agopan/bi: Add TEXS emit with builder
Alyssa Rosenzweig [Wed, 16 Dec 2020 18:01:12 +0000 (13:01 -0500)]
pan/bi: Add TEXS emit with builder

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

3 years agopan/bi: Implement jumps with the builder
Alyssa Rosenzweig [Sat, 12 Dec 2020 03:33:09 +0000 (22:33 -0500)]
pan/bi: Implement jumps with the builder

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

3 years agopan/bi: Implement ALU with the builder
Alyssa Rosenzweig [Wed, 16 Dec 2020 18:58:12 +0000 (13:58 -0500)]
pan/bi: Implement ALU with the builder

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

3 years agopan/bi: Add bi_cmpf_nir helper
Alyssa Rosenzweig [Sat, 12 Dec 2020 03:00:01 +0000 (22:00 -0500)]
pan/bi: Add bi_cmpf_nir helper

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

3 years agopan/bi: Add bi_nir_round helper
Alyssa Rosenzweig [Sat, 12 Dec 2020 02:24:59 +0000 (21:24 -0500)]
pan/bi: Add bi_nir_round helper

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

3 years agopan/bi: Add bi_alu_src_index helper
Alyssa Rosenzweig [Sat, 12 Dec 2020 01:30:19 +0000 (20:30 -0500)]
pan/bi: Add bi_alu_src_index helper

Generates bi_index from nir_alu_src, taking into account the applied
swizzle, and using (swizzle / 32-bit) portion as an offset, to be
applied later during RA. The sub 32-bit portion only applies for 8-bit
and 16-bit instructions, which need to either handle them explicitly as
a swizzle specifier, or lower to a swizzle explicitly.

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

3 years agopan/bi: Add intrinsic emits for builder
Alyssa Rosenzweig [Wed, 16 Dec 2020 18:35:42 +0000 (13:35 -0500)]
pan/bi: Add intrinsic emits for builder

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

3 years agopan/bi: Implement load attribute with the builder
Alyssa Rosenzweig [Mon, 21 Dec 2020 22:35:28 +0000 (17:35 -0500)]
pan/bi: Implement load attribute with the builder

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

3 years agopan/bi: Implement frag coord with the builder
Alyssa Rosenzweig [Sat, 12 Dec 2020 03:49:54 +0000 (22:49 -0500)]
pan/bi: Implement frag coord with the builder

Much slicker :-)

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

3 years agopan/bi: Implement load_ubo with the builder
Alyssa Rosenzweig [Sat, 12 Dec 2020 02:00:26 +0000 (21:00 -0500)]
pan/bi: Implement load_ubo with the builder

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

3 years agopan/bi: Implement store_vary with the builder
Alyssa Rosenzweig [Wed, 9 Dec 2020 14:00:04 +0000 (09:00 -0500)]
pan/bi: Implement store_vary with the builder

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

3 years agopan/bi: Implement fragment_out by builder
Alyssa Rosenzweig [Wed, 9 Dec 2020 13:42:41 +0000 (08:42 -0500)]
pan/bi: Implement fragment_out by builder

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

3 years agopan/bi: Implement BLEND by builder
Alyssa Rosenzweig [Wed, 9 Dec 2020 13:42:26 +0000 (08:42 -0500)]
pan/bi: Implement BLEND by builder

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

3 years agopan/bi: Implement load_vary via the builder
Alyssa Rosenzweig [Tue, 8 Dec 2020 13:39:20 +0000 (08:39 -0500)]
pan/bi: Implement load_vary via the builder

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

3 years agopan/bi: Implement bi_reg_fmt_for_nir helper
Alyssa Rosenzweig [Tue, 8 Dec 2020 13:39:31 +0000 (08:39 -0500)]
pan/bi: Implement bi_reg_fmt_for_nir helper

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

3 years agopan/bi: Implement load_blend_input via the builder
Alyssa Rosenzweig [Tue, 8 Dec 2020 13:39:07 +0000 (08:39 -0500)]
pan/bi: Implement load_blend_input via the builder

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

3 years agopan/bi: Implement bi_emit_load_const via the builder
Alyssa Rosenzweig [Tue, 8 Dec 2020 00:15:24 +0000 (19:15 -0500)]
pan/bi: Implement bi_emit_load_const via the builder

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

3 years agopan/bi: Implement bi_load_sysval via the builder
Alyssa Rosenzweig [Tue, 8 Dec 2020 00:15:10 +0000 (19:15 -0500)]
pan/bi: Implement bi_load_sysval via the builder

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

3 years agopan/bi: Implement bi_emit_ld_tile via the builder
Alyssa Rosenzweig [Tue, 8 Dec 2020 00:14:49 +0000 (19:14 -0500)]
pan/bi: Implement bi_emit_ld_tile via the builder

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

3 years agopan/bi: Add bi_make_vec_to helper
Alyssa Rosenzweig [Wed, 9 Dec 2020 19:06:15 +0000 (14:06 -0500)]
pan/bi: Add bi_make_vec_to helper

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

3 years agopan/bi: Add bi_is_intr_immediate helper
Alyssa Rosenzweig [Wed, 9 Dec 2020 13:58:57 +0000 (08:58 -0500)]
pan/bi: Add bi_is_intr_immediate helper

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

3 years agopan/bi: Add builder initialization helper
Alyssa Rosenzweig [Wed, 16 Dec 2020 17:50:07 +0000 (12:50 -0500)]
pan/bi: Add builder initialization helper

When going out of NIR, it's useful to start inserting instructions at
the end of the current block.

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

3 years agopan/bi: Add new style read/writemask helpers
Alyssa Rosenzweig [Fri, 11 Dec 2020 15:52:11 +0000 (10:52 -0500)]
pan/bi: Add new style read/writemask helpers

In the medium term we'll want to overhaul these masks entirely since
they don't make much sense anymore, but as a stop gap, this will let us
reuse the existing liveness, RA, and DCE infrastructure.

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

3 years agopan/bi: Add bi_count_staging_registers helper
Alyssa Rosenzweig [Fri, 11 Dec 2020 15:30:06 +0000 (10:30 -0500)]
pan/bi: Add bi_count_staging_registers helper

This will shortly be used for liveness analysis on the new 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: Generate instruction packer for new IR
Alyssa Rosenzweig [Fri, 4 Dec 2020 19:54:00 +0000 (14:54 -0500)]
pan/bi: Generate instruction packer for new IR

Based on existing packing infrastructure, though modifier handling is
greatly simplified by using canonical modifier encodings in the 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: Generate builder routines
Alyssa Rosenzweig [Sat, 28 Nov 2020 00:01:00 +0000 (19:01 -0500)]
pan/bi: Generate builder routines

To simplify construction of Bifrost IR. Ideas from NIR's builder, as
well as IBC.

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

3 years agopan/bi: Generate instruction printer
Alyssa Rosenzweig [Fri, 27 Nov 2020 19:39:40 +0000 (14:39 -0500)]
pan/bi: Generate instruction printer

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

3 years agopan/bi: Add bi_not alias of bi_neg
Alyssa Rosenzweig [Mon, 28 Dec 2020 14:26:07 +0000 (09:26 -0500)]
pan/bi: Add bi_not alias of bi_neg

For bitwise ops, we define .neg to mean .not to keep the IR manageable
("complement" more generally), but it's convenient to have specialized
names.

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

3 years agopan/bi: Rename bi_load
Alyssa Rosenzweig [Mon, 28 Dec 2020 13:47:48 +0000 (08:47 -0500)]
pan/bi: Rename bi_load

Need to free up the symbol so it doesn't clash with the builder.

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

3 years agopan/bi: Rename bi_pack_{fma, add} to free up symbols
Alyssa Rosenzweig [Fri, 4 Dec 2020 20:06:48 +0000 (15:06 -0500)]
pan/bi: Rename bi_pack_{fma, add} to free up symbols

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

3 years agopan/bi: Ensure fneg of a constant isn't reached
Alyssa Rosenzweig [Tue, 22 Dec 2020 23:33:56 +0000 (18:33 -0500)]
pan/bi: Ensure fneg of a constant isn't reached

Fix the optimization loop like ir3 does.

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

3 years agoci/panfrost: Skip test with 4096 byte shader
Alyssa Rosenzweig [Thu, 31 Dec 2020 14:20:17 +0000 (09:20 -0500)]
ci/panfrost: Skip test with 4096 byte shader

This has flake potential. There is clearly a hardware bug here but I
can't figure out what the correct solution is (padding out with nops
causes other tests to flake in turn).

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

3 years agofeatures: mark off multidraw for zink
Mike Blumenkrantz [Mon, 28 Dec 2020 20:47:37 +0000 (15:47 -0500)]
features: mark off multidraw for zink

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

3 years agozink: enable PIPE_CAP_MULTI_DRAW_INDIRECT(_PARAMS) caps
Mike Blumenkrantz [Thu, 20 Aug 2020 13:22:37 +0000 (09:22 -0400)]
zink: enable PIPE_CAP_MULTI_DRAW_INDIRECT(_PARAMS) caps

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

3 years agozink: hook up IndirectCount draw commands
Mike Blumenkrantz [Thu, 20 Aug 2020 13:42:52 +0000 (09:42 -0400)]
zink: hook up IndirectCount draw commands

these take a draw count buffer

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

3 years agozink: add KHR_draw_indirect_count detection
Mike Blumenkrantz [Mon, 28 Dec 2020 20:39:18 +0000 (15:39 -0500)]
zink: add KHR_draw_indirect_count detection

this is a vk 1.2 feature

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

3 years agoradv: disable stippledBresenhamLines on GFX9
Samuel Pitoiset [Mon, 28 Dec 2020 07:44:03 +0000 (08:44 +0100)]
radv: disable stippledBresenhamLines on GFX9

Some CTS fail on Vega10 but work on Raven.

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

3 years agosoftpipe: Sanity check that the SSBO view offset is within the BO.
Eric Anholt [Wed, 30 Dec 2020 20:51:04 +0000 (12:51 -0800)]
softpipe: Sanity check that the SSBO view offset is within the BO.

If we're going to check that the size matches, we should consider the
buffer offset too.  I haven't tracked down any testcases doing this, but
it seems obviously correct.

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

3 years agogallium/tgsi_exec: Replace the SSBO RESQ-specific interface with lookup.
Eric Anholt [Wed, 30 Dec 2020 20:44:42 +0000 (12:44 -0800)]
gallium/tgsi_exec: Replace the SSBO RESQ-specific interface with lookup.

We've got the new lookup with size+ptr, just use that one for querying
buffer size.

This means we now return 0 instead of undefined for unbound buffers, but
it also means we return 0 for a buffer view with a size larger than that
of the underlying buffer.

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

3 years agogallium/tgsi_exec: Move the SSBO store path to tgsi_exec, too.
Eric Anholt [Wed, 30 Dec 2020 20:35:54 +0000 (12:35 -0800)]
gallium/tgsi_exec: Move the SSBO store path to tgsi_exec, too.

Now that we have lookups, we can just fold this in.

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

3 years agogallium/tgsi_exec: Use the new SSBO lookup interface for SSBO loads.
Eric Anholt [Wed, 30 Dec 2020 20:17:21 +0000 (12:17 -0800)]
gallium/tgsi_exec: Use the new SSBO lookup interface for SSBO loads.

We were ignoring the requested size of the load in the overflow handling
and would read past the end of buffers, rather than just returning 0 as
robustness would like us to do.

Fixes valgrind complaint on softpipe in:
EQP-GLES31.functional.shaders.builtin_functions.common.sign.float_mediump_compute

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

3 years agogallium/tgsi_exec: Reuse the atomic helper for SSBO atomics.
Eric Anholt [Wed, 30 Dec 2020 19:59:15 +0000 (11:59 -0800)]
gallium/tgsi_exec: Reuse the atomic helper for SSBO atomics.

I needed to refactor SSBOs to deal with a buffer overflow, and it's easier
to just delete the SSBO atomic code from the interface.

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

3 years agogallium/tgsi_exec: Fix shared memory atomic ops.
Eric Anholt [Wed, 30 Dec 2020 19:21:49 +0000 (11:21 -0800)]
gallium/tgsi_exec: Fix shared memory atomic ops.

It was only executing the first channel, ignoring the rest.  I also
cleaned things up to not loop over rgba, since atomics are only ever to a
single 32-bit value per invocation.

This worked on softpipe previously because it only dispatches 1 CS
invocation per TGSI exec machine anyway, wasting the other 3 slots.

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

3 years agoci/softpipe: Re-enable GS tests that had been banned for being flaky.
Eric Anholt [Thu, 31 Dec 2020 00:09:13 +0000 (16:09 -0800)]
ci/softpipe: Re-enable GS tests that had been banned for being flaky.

Now that the flakes should be fixed, turn the coverage on.

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

3 years agogallium/draw: Fix intermittent failure to bind new geometry shaders.
Eric Anholt [Thu, 31 Dec 2020 00:09:13 +0000 (16:09 -0800)]
gallium/draw: Fix intermittent failure to bind new geometry shaders.

If you deleted your old GS and created a new one, then it would
occasionally skip binding the new GS because the token pointers were
equal.  Clear the current token pointer in the machine when we're deleting
its token.

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

3 years agodocs: update calendar and link releases notes for 20.3.2
Dylan Baker [Thu, 31 Dec 2020 04:19:51 +0000 (20:19 -0800)]
docs: update calendar and link releases notes for 20.3.2

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

3 years agodocs: Add sha256 sum for 20.3.2
Dylan Baker [Thu, 31 Dec 2020 04:11:04 +0000 (20:11 -0800)]
docs: Add sha256 sum for 20.3.2

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

3 years agodocs: add release notes for 20.3.2
Dylan Baker [Thu, 31 Dec 2020 03:57:40 +0000 (19:57 -0800)]
docs: add release notes for 20.3.2

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