summaryrefslogtreecommitdiffstats
path: root/src/panfrost/pandecode/decode.c
Commit message (Collapse)AuthorAgeFilesLines
* pan/decode: Print Bifrost blend descriptorAlyssa Rosenzweig2020-04-101-1/+1
| | | | | Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4505>
* panfrost: On Bifrost, set the right tiler descriptorTomeu Vizoso2020-04-101-26/+12
| | | | | | | | On both fragment and tiler jobs. Signed-off-by: Tomeu Vizoso <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4505>
* panfrost: Remove most usage of midgard_payload_vertex_tilerTomeu Vizoso2020-04-101-1/+7
| | | | | | | | | | By passing the prefix and postfix structs around, we can use most of the cmdstream functions as well for bifrost, as those structs haven't changed between midgard and bifrost. Signed-off-by: Tomeu Vizoso <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4505>
* panfrost: Unify vertex/tiler structuresAlyssa Rosenzweig2020-04-101-70/+33
| | | | | | | | | Some fields were shuffled but these are essentially the same across the generations. Signed-off-by: Alyssa Rosenzweig <[email protected]> Signed-off-by: Tomeu Vizoso <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4505>
* pan/bi: Handle abs packing for fp16/FMA add/minAlyssa Rosenzweig2020-03-311-1/+1
| | | | | | | | It's seriously quirky, and all to save a single bit. Alas. It also introduces an edge case for the scheduler which is a bit annoying. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4382>
* pan/decode: Skip analysis for Bifrost tiler structuresAlyssa Rosenzweig2020-03-031-1/+34
| | | | | | | | We don't understand the Bifrost at all yet, so let's just print and move on. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4025>
* pan/decode: Fix tiler weights printingAlyssa Rosenzweig2020-03-031-2/+2
| | | | | | | Theoretical - still always zero. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4025>
* pan/decode: Restore bifrost sample_locationsAlyssa Rosenzweig2020-03-031-8/+55
| | | | | | | | | Code by Connor Abbott, reverting a part of 254f40fd535ef57dee2bcc4afd97840749ce5918 where it was removed during a Midgard refactor. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4025>
* pan/decode: Calm an assert to a pandecode errorAlyssa Rosenzweig2020-03-031-2/+2
| | | | | | | We'd like to see what the problem actually was... Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4025>
* pan/decode: Dump scratchpad size if presentAlyssa Rosenzweig2020-02-271-0/+8
| | | | | | | | This will help us narrow the size required for thread local storage. Signed-off-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Tomeu Vizoso <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3950>
* panfrost: Debitfieldize mali_uniform_buffer_metaAlyssa Rosenzweig2020-02-181-4/+4
| | | | | | | | | | | It fits snugly in a u64, just give a macro for direct computation rather than fudging around with bitfields. Not sure if this actually matters with well-optimized compilers but it makes the code subjectively cleaner so it's worth it for that if nothing else. Signed-off-by: Alyssa Rosenzweig <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3838> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3838>
* pan/decode: Cleanup pandecode_jcAlyssa Rosenzweig2020-02-181-22/+2
| | | | | | | | | Some of this code is, to put it mildly, impossibly ancient horsedropping crazy cruft. Signed-off-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Boris Brezillon <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3836>
* pan/decode: Add `minimal` modeAlyssa Rosenzweig2020-02-181-7/+14
| | | | | | | | | We would like a mode to skip decoding job payloads so we can just inspect for faults. Signed-off-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Boris Brezillon <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3836>
* pan/decode: Remove extraneous newlineAlyssa Rosenzweig2020-02-161-1/+1
| | | | | | | | pandecode_log already does this. Signed-off-by: Alyssa Rosenzweig <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835>
* panfrost: Rename unknown2_8 to paddingAlyssa Rosenzweig2020-02-161-2/+4
| | | | | | | It's zero everywhere. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835>
* panfrost: Rename bifrost_framebuffer->mali_framebufferAlyssa Rosenzweig2020-02-161-10/+10
| | | | | | | | | | | | (And bifrost_fb_extra to mali_framebuffer_extra, bifrost_render_target to mali_render_target) These structures are the norm on midgard t760+, drop the bifrost names, it's silly... unrelated to the rest of the series but while I'm messing with pandecode and cleaning up bifrost abstractions, might as well. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835>
* panfrost: Unify bifrost_scratchpad with mali_shared_memoryAlyssa Rosenzweig2020-02-161-33/+8
| | | | | | | | | | It looks like these are the same structure, so this allows us to reuse mali_shared_memory across architectures, and dispels with the Bifrost-specific mystery of the scratchpads... nothing so mysterious after all, just stack. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835>
* panfrost: Identify mali_shared_memory structureAlyssa Rosenzweig2020-02-161-58/+49
| | | | | | | | | This small structure is used to configure shared memory and stack for compute shaders, and is also present at the beginning of framebuffer descriptors. Let's factor it out. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3835>
* panfrost: Add the MALI_WRITES_{Z,S} flagsBoris Brezillon2020-02-051-6/+14
| | | | | | | | | | | | | | We discovered 2 new shader flags used when a fragment shader updates the depth/stencil value through a ZS writeout. If those flags are not set, the depth/stencil value stored in the depth/stencil tilebuffer remain unchanged. While at it, rename unknown2 into flags_hi and rename flags into flags_lo. Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3697>
* panfrost: Fix decoding of tiled 3D texturesTomeu Vizoso2020-02-041-2/+2
| | | | | | | | | | From decoding cmd streams generated by the blob, the pointers in the payload don't seem to include those that refer to different depth levels when the texture is in tiled format. Signed-off-by: Tomeu Vizoso <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3692>
* panfrost: Print intended field when decodingTomeu Vizoso2020-01-311-1/+1
| | | | | | Signed-off-by: Tomeu Vizoso <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3625>
* pan/decode: Drop MFBD compute shader stuffAlyssa Rosenzweig2020-01-271-4/+7
| | | | | | | | This is triggering all sorts of failures in pandecode and is only mostly spurious. Let's not overwhelm ourselves with this yet. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3580>
* pan/decode: Remove SHORT_SLIDE indirectionAlyssa Rosenzweig2020-01-241-15/+6
| | | | | | | | | | | | | ../src/panfrost/pandecode/decode.c: In function ‘pandecode_compute_fbd’: ../src/panfrost/pandecode/decode.c:789:35: warning: taking address of packed member of ‘struct mali_compute_fbd’ may result in an unaligned pointer value [-Waddress-of-packed-member] 789 | pandecode_u32_slide(num, s->unknown ## num, ARRAY_SIZE(s->unknown ## num)) | ~^~~~~~~~~ ../src/panfrost/pandecode/decode.c:800:9: note: in expansion of macro ‘SHORT_SLIDE’ 800 | SHORT_SLIDE(1); | ^~~~~~~~~~~ Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3543>
* pan/decode: Remove last_sizeAlyssa Rosenzweig2020-01-241-4/+0
| | | | | | | | | Fixes ../src/panfrost/pandecode/decode.c: In function ‘pandecode_jc’: ../src/panfrost/pandecode/decode.c:2859:14: warning: variable ‘last_size’ set but not used [-Wunused-but-set-variable] 2859 | bool last_size; Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3543>
* panfrost: Don't use implicit mali_exception_status enumAlyssa Rosenzweig2020-01-241-1/+1
| | | | | | | Fixes ../src/panfrost/pandecode/public.h:53:33: warning: ‘enum mali_exception_access’ declared inside parameter list will not be visible outside of this definition or declaration Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3543>
* pan/decode: Support dumping to a fileIcecream952020-01-231-18/+21
| | | | | Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3525>
* pan/bifrost: Support disassembling to a fileIcecream952020-01-231-1/+1
| | | | | Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3525>
* pan/midgard: Support disassembling to a fileIcecream952020-01-231-1/+1
| | | | | Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3525>
* panfrost: Fix linear depth texturesAlyssa Rosenzweig2020-01-141-6/+21
| | | | | | | | | | | | | | | | As pointed out by Boris, what we were calling PAN_LINEAR depth textures was in fact u-interleaved tiled (!), but we never noticed since we flipped the flag used for sampling, leading to all sorts of fun bugs when attempting to directly acess depth textures from the CPU. Which begs the question -- if what we called LINEAR was tiled, how do we actually render linear depth textures? It turns out the flags for AFBC form a mali_block_format 2-bit code just like their render-target counterparts, so we can render to any of the above. Signed-off-by: Alyssa Rosenzweig <[email protected]> Reported-by: Boris Brezillon <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3393> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3393>
* panfrost: Dynamically allocate array of texture pointersTomeu Vizoso2020-01-021-6/+6
| | | | | | | | With 3D textures we can have lots of layers, so better allocate it dynamically at runtime. Signed-off-by: Tomeu Vizoso <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Remove 32-bit next_job pathAlyssa Rosenzweig2019-12-271-6/+2
| | | | | | | | | | It has been unused for a while; let's just remove the abstraction. Technically the hardware does support 32-bit job descriptors, but we don't and we can't keep them from breaking so let's not pretend they work. Signed-off-by: Alyssa Rosenzweig <[email protected]> Suggested-by: Boris Brezillon <[email protected]>
* panfrost: Remove mali_alt_funcAlyssa Rosenzweig2019-12-271-23/+1
| | | | | | | | | | There's only one way to encode comparison functions in the command stream, not two. It's just that the semantics for texture comparisons are flipped from the semantics of stencil comparison. We can factor out that flip to common Panfrost code, rather than tying it to a second Gallium routine. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Inline away MALI_NEGATIVEAlyssa Rosenzweig2019-12-271-5/+5
| | | | | | It's an awfully fancy way to add one... Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Remove MALI_ATTR_INTERNALAlyssa Rosenzweig2019-12-271-2/+0
| | | | | | | It's a relic from before we understood the varying builtins. It should never actually come up if the builtins are decoded correctly. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* pan/decode: Handle gl_VertexID/gl_InstanceIDAlyssa Rosenzweig2019-12-241-19/+42
| | | | | | | | | Just like varyings have special records for point coordinates (etc), attributes have special records for vertex/instance ID. We can parse these fairly easily, although they don't line up exactly with normal attribute records. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* pan/decode: Fix reference computation for invocationsAlyssa Rosenzweig2019-12-241-4/+3
| | | | | | | Slight bug with instancing. No harm done but let's get rid of the pandecode warning, it's just noise. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* pan/decode: Append 0:0 spills:fills to blobber-dbAlyssa Rosenzweig2019-12-241-1/+1
| | | | | | | At the moment there's no need to actually count these but we do need a placeholder for report.py to be happy. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* pan/decode: Prefix blobberdb with MESA_SHADER_*Alyssa Rosenzweig2019-12-241-1/+1
| | | | | | | We use these prefixes in panfrost shader-db and they need to match for shader-db to be happpy. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* pan/decode: Skip COMPUTE in blobber-dbAlyssa Rosenzweig2019-12-241-14/+19
| | | | | | | | The blob uses COMPUTE jobs for some internal purposes. These are essentially free but panfrost doesn't use them, so it messes up the numbering. Just filter them out. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Decode shader types in pantrace shader-dbAlyssa Rosenzweig2019-12-241-1/+13
| | | | | | We see some COMPUTE jobs that were mistakenly identified as VERTEX. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Pack invocation_shifts manually instead of a bit fieldAlyssa Rosenzweig2019-12-161-25/+22
| | | | | | | | gcc generates exceptionally bad code for panfrost_pack_work_groups_fused otherwise ... although that routine is somehow still hot ... Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3067>
* panfrost: Remove fbd_type enumAlyssa Rosenzweig2019-12-161-3/+3
| | | | | | | | Just use the MALI_MFBD tag directly; it's clean. Signed-off-by: Alyssa Rosenzweig <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3118> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3118>
* pandecode: Add castAlyssa Rosenzweig2019-12-131-1/+1
| | | | | | Fixes minor coverity warning about the format specifier. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Split stack_shift nibble from unk0Alyssa Rosenzweig2019-12-121-0/+1
| | | | | | | It's conceptually independent from the upper part (which is not yet understood, but for spilling generally remains equal to 0x1e). Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Rename unknown_address_0 -> scratchpadAlyssa Rosenzweig2019-12-121-1/+1
| | | | | | It's the analogue pointer in SFBD. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Add PAN_MESA_DEBUG=syncTomeu Vizoso2019-12-111-1/+1
| | | | | | | | | | | Sometimes it's useful to get information about GPU faults in the console, so it's synchronized with other messages. This commit will cause Mesa to wait for completion and check if there are any faults raised by the GPU. Signed-off-by: Tomeu Vizoso <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Rename SET_VALUE to WRITE_VALUEAlyssa Rosenzweig2019-12-061-5/+5
| | | | | | | | | See https://lists.freedesktop.org/archives/dri-devel/2019-December/247601.html Write value emphasises that it's just a generic write primitive. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Update SET_VALUE with information from igtAlyssa Rosenzweig2019-12-061-2/+13
| | | | | | | It's not a tiler specific initialization; it's a generic GPU-side write primitive that may be used for tiler reset on midgard. Signed-off-by: Alyssa Rosenzweig <[email protected]>
* panfrost: Implement pan_tiler for non-hierarchy GPUsAlyssa Rosenzweig2019-12-031-47/+8
| | | | | | | | | | | | | | | | The algorithm is as described. Nothing fancy here, just need to add some new code paths depending on which model we're running on. Tomeu: - Also disable tiling when !hierarchy and !vertex_count - Avoid creating polygon lists smaller than the minimum when vertex_count > 0 but tile size smaller than 16 byte - Take into account tile size when calculating polygon list size for !hierarchy - Allow 0-sized tiles in a single dimension Signed-off-by: Alyssa Rosenzweig <[email protected]> Signed-off-by: Tomeu Vizoso <[email protected]>
* panfrost: Add the lod_bias fieldAlyssa Rosenzweig2019-11-211-0/+3
| | | | | | | Enough trial and error ... just think even *more* Midgard about where this field might be! Signed-off-by: Alyssa Rosenzweig <[email protected]>