Commit Graph

132779 Commits

Author SHA1 Message Date
Alyssa Rosenzweig 129d390bd8 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>
2020-12-31 10:50:49 -05:00
Boris Brezillon 469d74908c 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>
2020-12-31 14:39:02 +00:00
Alyssa Rosenzweig f6e128fb8f 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>
2020-12-31 14:39:02 +00:00
Alyssa Rosenzweig e904bbb170 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>
2020-12-31 14:39:02 +00:00
Alyssa Rosenzweig cf5b2b8939 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>
2020-12-31 14:39:02 +00:00
Alyssa Rosenzweig b691aeaacf 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>
2020-12-31 14:39:02 +00:00
Alyssa Rosenzweig f474e6a47c 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>
2020-12-31 14:39:02 +00:00
Alyssa Rosenzweig e5ec0dc183 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>
2020-12-31 14:39:02 +00:00
Alyssa Rosenzweig fa465d52b9 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>
2020-12-31 14:39:02 +00:00
Alyssa Rosenzweig 029e928226 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>
2020-12-31 14:39:02 +00:00
Alyssa Rosenzweig 4e4146c990 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>
2020-12-31 14:39:02 +00:00
Alyssa Rosenzweig 7e8022fa8a 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>
2020-12-31 14:39:02 +00:00
Alyssa Rosenzweig a1e150fc4d 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>
2020-12-31 14:39:02 +00:00
Alyssa Rosenzweig 8b0d0a931b 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>
2020-12-31 14:39:02 +00:00
Alyssa Rosenzweig 39aa8c4a5a 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>
2020-12-31 14:39:02 +00:00
Alyssa Rosenzweig 73169aa0b4 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>
2020-12-31 14:39:02 +00:00
Alyssa Rosenzweig 239ef52216 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>
2020-12-31 14:39:02 +00:00
Alyssa Rosenzweig 0f6e317045 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>
2020-12-31 14:39:02 +00:00
Alyssa Rosenzweig 84f251c38a 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>
2020-12-31 14:39:02 +00:00
Alyssa Rosenzweig 26ce13f657 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>
2020-12-31 14:39:02 +00:00
Alyssa Rosenzweig f7c2fc7eba 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>
2020-12-31 14:39:02 +00:00
Alyssa Rosenzweig 26cbf559d6 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>
2020-12-31 14:39:02 +00:00
Alyssa Rosenzweig 70d6c5675d 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>
2020-12-31 14:39:02 +00:00
Alyssa Rosenzweig e477de829f 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>
2020-12-31 14:39:02 +00:00
Alyssa Rosenzweig 6f048b5f95 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>
2020-12-31 14:39:02 +00:00
Alyssa Rosenzweig 311d3d6015 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>
2020-12-31 14:39:01 +00:00
Alyssa Rosenzweig f05174e5a5 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>
2020-12-31 14:39:01 +00:00
Alyssa Rosenzweig 8e82641cf5 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>
2020-12-31 14:39:01 +00:00
Alyssa Rosenzweig 8c99fed470 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>
2020-12-31 14:39:01 +00:00
Alyssa Rosenzweig 95d62ee7cf 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>
2020-12-31 14:39:01 +00:00
Alyssa Rosenzweig 9c7efc4510 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>
2020-12-31 14:39:01 +00:00
Alyssa Rosenzweig 482cc273af 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>
2020-12-31 14:39:01 +00:00
Alyssa Rosenzweig 0ae835499d 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>
2020-12-31 14:39:01 +00:00
Alyssa Rosenzweig 2e57684d2d 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>
2020-12-31 14:39:01 +00:00
Alyssa Rosenzweig 341e312cf4 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>
2020-12-31 14:39:01 +00:00
Alyssa Rosenzweig 49f38aa9e7 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>
2020-12-31 14:39:01 +00:00
Alyssa Rosenzweig 3c5097bbfd 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>
2020-12-31 14:39:01 +00:00
Alyssa Rosenzweig 20bfe9ee05 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>
2020-12-31 14:39:01 +00:00
Alyssa Rosenzweig baec458105 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>
2020-12-31 14:39:01 +00:00
Alyssa Rosenzweig 279772b5ec 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>
2020-12-31 14:39:01 +00:00
Alyssa Rosenzweig 63863de923 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>
2020-12-31 14:39:01 +00:00
Alyssa Rosenzweig 9841afad57 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>
2020-12-31 14:39:01 +00:00
Alyssa Rosenzweig feecf0a3d8 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>
2020-12-31 14:39:01 +00:00
Alyssa Rosenzweig 4de806a803 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>
2020-12-31 14:39:01 +00:00
Alyssa Rosenzweig 8a6ec4a5d8 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>
2020-12-31 14:39:01 +00:00
Alyssa Rosenzweig 693271c0a8 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>
2020-12-31 14:39:01 +00:00
Alyssa Rosenzweig 226dfa9490 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>
2020-12-31 14:39:01 +00:00
Alyssa Rosenzweig de3c66c2ba 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>
2020-12-31 14:39:01 +00:00
Alyssa Rosenzweig 82328a5245 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>
2020-12-31 14:39:01 +00:00
Alyssa Rosenzweig 8ef0d41170 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>
2020-12-31 14:39:01 +00:00