Commit Graph

80 Commits

Author SHA1 Message Date
Alyssa Rosenzweig 0afd691f29 panfrost: clang-format the tree
This switches us over to Mesa's code style [1], normalizing us within the tree.
The results aren't perfect, but they bring us a hell of a lot closer to the rest
of the tree. Panfrost doesn't feel so foreign relative to Mesa with this, which
I think (in retrospect after a bunch of years of being "different") is the right
call.

I skipped PanVK because that's paused right now.

  find panfrost/ -type f -name '*.h' | grep -v vulkan | xargs clang-format -i;
  find panfrost/ -type f -name '*.c' | grep -v vulkan | xargs clang-format -i;
  clang-format -i gallium/drivers/panfrost/*.c gallium/drivers/panfrost/*.h ; find
  panfrost/ -type f -name '*.cpp' | grep -v vulkan | xargs clang-format -i

[1] https://docs.mesa3d.org/codingstyle.html

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20425>
2022-12-24 02:22:57 +00:00
Alyssa Rosenzweig a4705afe63 panfrost: Fix up some formatting for clang-format
clang-format will make a mess of these otherwise.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20425>
2022-12-24 02:22:57 +00:00
Alyssa Rosenzweig 976405907e pan/mdg: Emulate 8-bit with the 16-bit pipe
We don't care to support i8vec16, we just need a bit of 8-bit support to
implement format packing/unpacking in blend shaders. We're already doing
this by using the 16-bit pipe, we just need to commit to it all the way
-- reporting the correct sizes in max_bitsize_for_alu so the mask
packing logic works as intended -- and dropping the imov-specific hack
that was introduced to workaround a similar class of bugs.

With the previous patch, fixes:

   dEQP-GLES31.functional.draw_buffers_indexed.random.max_required_draw_buffers.1

Fixes: 39e4b7279d ("pan/midg: Fix swizzling on 8-bit sources")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19763>
2022-12-01 00:52:53 +00:00
Alyssa Rosenzweig 044428211c pan/mdg: Fix out-of-order execution
We can go up to 15 instructions out of order (performance fix) but we
can't go past a branch (bug fix).

Fixes: 30a393f458 ("pan/mdg: Enable out-of-order execution after texture ops")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19762>
2022-11-23 20:23:50 +00:00
Alyssa Rosenzweig 5bc830cbf2 pan/mdg: Reexpress umul_high packing
There are a bunch of subtle details of how 32-bit sources are
zero-extended to 64-bit, how their swizzles work, how 64-bit
destinations are shrunk to 32-bit, and how those two interact. This
fixes the interactions... mostly.

Fixes umul_high, all such tests should be passing now. Unblocks idiv
lowering that depends on umul_high.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17860>
2022-08-24 19:54:23 +00:00
Alyssa Rosenzweig 6fc81f163e pan/mdg: Fix partial execution mode names
cont -> skip, last -> kill, and fix the special case handling. It's just an
enum. Makes the disassembly easier to read and closer to Bifrost.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15123>
2022-02-23 12:56:30 +00:00
Alyssa Rosenzweig eb0ef85cb6 pan/mdg: Clarify some ISA unknowns
Nothing usefully new here, just trying to improve signal:noise ratio on the
disassembly.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14888>
2022-02-18 15:04:47 +00:00
Boris Brezillon a8fbfcfbd3 pan/midg: Support 8/16 bit load/store
Needed for panvk copy shaders to support 8 or 16bit formats.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14885>
2022-02-04 17:12:35 -05:00
Boris Brezillon 3f9bce08e1 pan/midg: Fix swizzle packing on 64bit instructions with src-expansion + dst-shrinking
In that case, the mask is specified on 32bit lanes, so we need to shift
it if it's > 0x3. The expand modifier will take care of selecting the
right side of the 32bit vector.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14885>
2022-02-04 17:12:35 -05:00
Boris Brezillon da474d5d14 pan/midg: Fix the upper/lower limit on 8bit vectors
If I'm correct, the lower/upper split on 8bit vectors is 8, not 4.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14885>
2022-02-04 17:12:35 -05:00
Boris Brezillon 39e4b7279d pan/midg: Fix swizzling on 8-bit sources
Even though 8-bit ALUs are not supported, we can have [un]pack_32_4x8
instructions which translate to IMOVs, and those operate on 8-bit
vectors. The problem is, the swizzling granularity is 16 bit, which
means we don't support

      MOV.i8 R0.xyzw, TMP0.xxxx, R1.zyxw

and the compiler doesn't even complain, it just applies 8 bit
swizzling directly, which obviously doesn't work.

This is probably not the right way to fix that, but I thought I'd
raised the issue with a hack to fix, so we can get the discussion
started.

(Found while debugging FB store lowering on Midgard).

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14885>
2022-02-04 17:12:35 -05:00
Alyssa Rosenzweig d92e353a11 pan/mdg: Fix definition of UBO unpack
Needed to link the disassembler separate from the rest of the compiler,
as in out-of-tree pandecode builds. Which I haven't done for Midgard in
well over a year, enough time for this to bit rot.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14185>
2021-12-14 03:42:28 +00:00
Tomeu Vizoso e882b0505e pan/midgard: Don't emit zero padding
util_dynarray_grow_bytes doesn't cope well with zero grow bytes.

../mesa/src/util/u_dynarray.h:134:8: runtime error: division by zero
    #0 0xffffa2d99288 in util_dynarray_grow_bytes ../mesa/src/util/u_dynarray.h:134
    #1 0xffffa2d99288 in emit_alu_bundle ../mesa/src/panfrost/midgard/midgard_emit.c:350
    #2 0xffffa2d99288 in emit_binary_bundle ../mesa/src/panfrost/midgard/midgard_emit.c:390
    #3 0xffffa2d738a8 in midgard_compile_shader_nir ../mesa/src/panfrost/midgard/midgard_compile.c:2740
    #4 0xffffa2cc8aa8 in panfrost_shader_compile ../mesa/src/gallium/drivers/panfrost/pan_assemble.c:68
    #5 0xffffa2c9918c in panfrost_bind_shader_state ../mesa/src/gallium/drivers/panfrost/pan_context.c:2015
    #6 0xffffa0726d94 in st_update_vp ../mesa/src/mesa/state_tracker/st_atom_shader.c:238
    #7 0xffffa070e028 in st_validate_state ../mesa/src/mesa/state_tracker/st_atom.c:261
    #8 0xffffa06c30bc in prepare_draw ../mesa/src/mesa/state_tracker/st_draw.c:132
    #9 0xffffa06c30bc in st_draw_vbo ../mesa/src/mesa/state_tracker/st_draw.c:184
    #10 0xffffa167bb20 in _mesa_validated_drawrangeelements ../mesa/src/mesa/main/draw.c:816
    #11 0xffffa167c684 in _mesa_DrawElements ../mesa/src/mesa/main/draw.c:970
    #12 0xaaaadfa5b55c in glu::drawFromUserPointers(glu::RenderContext const&, unsigned int, int, glu::VertexArrayBinding const*, glu::PrimitiveList const&, glu::DrawUtilCallback*) (/home/tomeu/deqp-build/modules/gles2/deqp-gles2+0x3b355c)
    #13 0xaaaadf9ce514 in deqp::gls::ShaderLibraryCase::execute() (/home/tomeu/deqp-build/modules/gles2/deqp-gles2+0x326514)
    #14 0xaaaadf9cfb38 in deqp::gls::ShaderLibraryCase::iterate() (/home/tomeu/deqp-build/modules/gles2/deqp-gles2+0x327b38)
    #15 0xaaaadf70cc9c in deqp::gles2::TestCaseWrapper::iterate(tcu::TestCase*) (/home/tomeu/deqp-build/modules/gles2/deqp-gles2+0x64c9c)
    #16 0xaaaadfb9a47c in tcu::TestSessionExecutor::iterateTestCase(tcu::TestCase*) (/home/tomeu/deqp-build/modules/gles2/deqp-gles2+0x4f247c)
    #17 0xaaaadfb9b240 in tcu::TestSessionExecutor::iterate() (/home/tomeu/deqp-build/modules/gles2/deqp-gles2+0x4f3240)
    #18 0xaaaadfb7a564 in tcu::App::iterate() (/home/tomeu/deqp-build/modules/gles2/deqp-gles2+0x4d2564)
    #19 0xaaaadf70a20c in main (/home/tomeu/deqp-build/modules/gles2/deqp-gles2+0x6220c)
    #20 0xffffaf1e12a8 in __libc_start_main ../csu/libc-start.c:308
    #21 0xaaaadf70a8dc  (/home/tomeu/deqp-build/modules/gles2/deqp-gles2+0x628dc)

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10695>
2021-05-10 17:02:09 +00:00
Italo Nicola 337957956e pan/mdg: improve tex opcode decoding and add missing ops
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9461>
2021-04-27 07:04:08 +00:00
Italo Nicola 6a12ea02fe pan/mdg: properly encode/decode ldst instructions
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9461>
2021-04-27 07:04:08 +00:00
Italo Nicola d2119073de pan/mdg: improve ldst opcode names and add missing ops
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9461>
2021-04-27 07:04:08 +00:00
Italo Nicola 733d25cfce pan/mdg: misc cleanups
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9461>
2021-04-27 07:04:08 +00:00
Italo Nicola 7f0bf3d82d pan/mdg: improve input modifier printing
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9461>
2021-04-27 07:04:07 +00:00
Italo Nicola b6c7da98be pan/mdg: encode/decode expand_mode properly
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9461>
2021-04-27 07:04:07 +00:00
Italo Nicola 77e05b6a86 pan/mdg: refactor mir_pack_swizzle
This commit makes mir_pack_swizzle set rep_low, rep_high and half in a
more explicit way, helping in the transition to a unified expand_mode
enum in the following commit.

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9461>
2021-04-27 07:04:07 +00:00
Italo Nicola 4cc7f2d84e pan/mdg: rename dest_override to shrink_mode
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9461>
2021-04-27 07:04:07 +00:00
Boris Brezillon c09439721c pan/midg: Fix midgard_pack_common_store_mask()
st_u64() gets an invalid mask when component Y is written.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10332>
2021-04-22 16:59:18 +00:00
Italo Nicola 9703ca5699 pan/mdg: fix midgard writemask encoding for stores
This commits fixes a regression caused by commit
616394cf31.

Fixes dEQP-GLES31.functional.compute.shared_var.atomic.min.*,
dEQP-GLES31.functional.ssbo.atomic.min.*,
dEQP-GLES31.functional.compute.shared_var.atomic.max.* and
dEQP-GLES31.functional.ssbo.atomic.max.*.

Midgard's non-image and non-varying store operations have a unique
behavior for the load/store writemask, with each bit being responsible
for 1/4th of the size of the total write operation. This means that we
have to pack the writemask differently since we stopped using st_u128
for everything.

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10067>
2021-04-21 21:22:42 +00:00
Alyssa Rosenzweig 14bbc24b60 pan/mdg: Add missing Collabora copyright notices
On a few of the older files.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7502>
2020-11-09 16:45:25 +00:00
Italo Nicola 8e221f58a6 panfrost: add atomic ops infrastructure
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6439>
2020-09-01 21:04:09 +00:00
Alyssa Rosenzweig c8ac01af33 pan/mdg: Fix discard encoding
Let's match the blob.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6525>
2020-08-31 19:43:55 +00:00
Eric Anholt 4c24c8239a panfrost: Fix remaining release-build warnings.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6462>
2020-08-28 22:45:08 +00:00
Alyssa Rosenzweig ff3ea3b3bb pan/mdg: Fix auxiliary load/store swizzle packing
It needs to respect the existing swizzle, as well as the type size.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6321>
2020-08-19 12:08:51 +00:00
Alyssa Rosenzweig 06c31031e7 pan/mdg: Ensure barrier op is set on texture
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Fixes: 92c808cd47 ("pan/mdg: eliminate references to ins->texture.op")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6321>
2020-08-19 12:08:51 +00:00
Italo Nicola a91011c9ec pan/mdg: emit REGISTER_UNUSED on unused ALU src2
This saves power and time by skipping a roundtrip to the register file.

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6128>
2020-07-31 00:25:21 +00:00
Italo Nicola 8150c1d632 pan/mdg: defer branch packing
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5933>
2020-07-30 22:55:36 +00:00
Italo Nicola 140185eb04 pan/mdg: refactor emit_alu_bundle
This refactor prepares emit_alu_bundle() for the next commit that
reconstructs branch instructions right before emission.
It also simplifies the code since the previous control flow was only
better when we had the prepacked fields in midgard_instruction.

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5933>
2020-07-30 22:55:36 +00:00
Italo Nicola 0f0f9ee710 pan/mdg: remove ins->alu
This commit removes the `ins->alu` field from midgard_instruction,
simplifying the code by just recreating midgard_vector_alu later when we
have to emit it.

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5933>
2020-07-30 22:55:36 +00:00
Italo Nicola 5299239c2e pan/mdg: externalize mir_pack_mod
midgard_print.c requires mir_pack_mod to remove references to ins->alu.

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5933>
2020-07-30 22:55:36 +00:00
Italo Nicola 1a4d165683 pan/mdg: defer register packing
This commit moves the packing of registers and other things from
install_registers_instr() to midgard_emit.c, right before emitting the
binary.

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5933>
2020-07-30 22:55:36 +00:00
Italo Nicola bea6a652db pan/mdg: eliminate references to ins->load_store.op
This commit makes `ins->op` the correct field to use with load_store
instructions.

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5933>
2020-07-30 22:55:36 +00:00
Italo Nicola 92c808cd47 pan/mdg: eliminate references to ins->texture.op
This commit makes the `ins->op` the correct field to use with texture
instructions.

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5933>
2020-07-30 22:55:36 +00:00
Italo Nicola 5011373e2b pan/mdg: eliminate references to ins->alu.outmod
In an effort to simplify MIR by not prepacking instructions, this commit
removes references to `ins->alu.outmod` so that we can later remove the
`ins->alu` field from midgard_instruction.
Every place that was using `ins->alu.outmod` was changed to now use the
generic `ins->outmod` field instead.
We then reconstruct the outmod field right before emission.

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5933>
2020-07-30 22:55:36 +00:00
Italo Nicola 5f7e0185cd pan/mdg: eliminate references to ins->alu.reg_mode
In an effort to simplify MIR by not prepacking instructions, this commit
removes references to `ins->alu.reg_mode` so that we can later remove
the `ins->alu` field from midgard_instruction.
Every place that was using reg_mode was changed to now use the generic
`ins->src_type` field instead.
We then reconstruct the reg_mode field right before emission.

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5933>
2020-07-30 22:55:36 +00:00
Italo Nicola f4c89bf9bd pan/mdg: eliminate references to ins->alu.op
In an effort to simplify MIR by not prepacking instructions, this commit
removes references to `ins->alu.op` so that we can later remove the
`ins->alu` field from midgard_instruction.
Every place that was using ins->op was changed to now use the generic
`ins->op` field instead.
We then reconstruct the `alu.op` field right before emission.
This new field is generic and can contain opcodes for ALU, texture or
load/store instructions. It should be used in conjunction with
`ins->type`, just like the current prepacked `op` field.

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5933>
2020-07-30 22:55:36 +00:00
Alyssa Rosenzweig 6290e83190 pan/mdg: Lower roundmodes
So now we can use the IR field semantically.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5285>
2020-06-03 15:36:57 +00:00
Alyssa Rosenzweig 30a393f458 pan/mdg: Enable out-of-order execution after texture ops
We don't make great use of it (due to the scheduler not being aware
yet), but we can pack for it regardless and maybe pick up some win.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5286>
2020-06-01 18:38:49 +00:00
Alyssa Rosenzweig 4f5b3802dc pan/mdg: Eliminate 64-bit swizzle packing division
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5154>
2020-05-21 18:29:53 -04:00
Alyssa Rosenzweig 28a750c5f2 pan/mdg: Eliminate expand_writemask division
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5154>
2020-05-21 18:29:53 -04:00
Alyssa Rosenzweig e6293425bf pan/mdg: Pack 8-bit swizzles in 16-bit ops
Let's inch closer to 8-bit.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5151>
2020-05-21 17:49:14 +00:00
Alyssa Rosenzweig 3d435b334b pan/mdg: Pack barriers correctly
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5151>
2020-05-21 17:49:14 +00:00
Alyssa Rosenzweig 1108eaa90d pan/mdg: Streamline dest_override handling
We can pass it all off to emit time, and let the types in the IR do the
heavylifting in the meantime, which is a lot easier to get right.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5151>
2020-05-21 17:49:14 +00:00
Alyssa Rosenzweig 1cd65353c9 pan/mdg: Defer modifier packing until emit time
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5151>
2020-05-21 17:49:14 +00:00
Alyssa Rosenzweig 3cfe2fc1b1 pan/mdg: Identify scalar integer mods
Symmetric with vector mods, except for normal which is packed as
sign-extend. (flag 2 never seen in the wild)

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5151>
2020-05-21 17:49:14 +00:00
Alyssa Rosenzweig 8c012c8f8b pan/mdg: Handle dest up/lower correctly with swizzles
During emit time.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5151>
2020-05-21 17:49:14 +00:00