aboutsummaryrefslogtreecommitdiffstats
path: root/src/panfrost
Commit message (Collapse)AuthorAgeFilesLines
* panfrost: Calculate varying size by formatAlyssa Rosenzweig2020-06-121-0/+2
| | | | | | | Will enable <16-byte varyings. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5423>
* pan/mdg: Avoid fusing ld_vary_16 with non-zero componentAlyssa Rosenzweig2020-06-121-0/+5
| | | | | Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5423>
* pan/mdg: Print writeout sources in mir_print_instructionIcecream952020-06-101-0/+10
| | | | | Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5065>
* pan/mdg: Add new depth store loweringIcecream952020-06-101-1/+192
| | | | | | | | | | | | | This uses the new nir_intrinsic_store_combined_output_pan intrinsic, which can write depth, stencil and color in a single instruction. If there are no color writes, the "depth RT" is written to. Fixes the dEQP GLES3 depth write tests, as well as the piglit tests fragdepth_gles2, glsl-1.10-fragdepth and when modified to not rely on depth/stencil reload, glsl-fs-shader-stencil-export. Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5065>
* pan/mdg: Add depth/stencil support to emit_fragment_storeIcecream952020-06-101-4/+17
| | | | | Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5065>
* pan/mdg: Move search_var to earlier in midgard_compile.cIcecream952020-06-101-11/+11
| | | | | | | It will be needed by the new zs lowering. Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5065>
* pan/mdg: Add new depth writeout codeIcecream952020-06-102-4/+71
| | | | | | | | | | | We schedule depth writeout to smul and stencil to vlut, so scheduling to smul has to be disabled in these cases. When only writing stencil, scheduling to smul is still disabled to prevent stencil writeout from being scheduled there. Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5065>
* pan/mdg: Replace writeout booleans with a single valueIcecream952020-06-102-9/+10
| | | | | | | A single value is easier to deal with than three separate booleans. Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5065>
* pan/mdg: Remove writeout case from bytemask_of_read_componentsIcecream952020-06-102-15/+6
| | | | | | | | | By setting the swizzle for the fragment color, and setting qmask to ~0 for branches, the special case for writeout branches can be removed from mir_bytemask_of_read_components_index. Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5065>
* pan/mdg: Remove old depth writeout codeIcecream952020-06-102-16/+7
| | | | | | | | We need to be able to do color writeout at the same time as depth writeout. The old code can't do that, so needs to be removed. Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5065>
* pan/mdg: Remove old zs store loweringIcecream952020-06-101-114/+0
| | | | | | | | It is broken for when there are also color writes, and will be replaced with a new lowering which takes that into account. Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5065>
* pan/mdg: Move r1.w writeout to branch->destIcecream952020-06-102-6/+6
| | | | | | | | There will need to be sources for depth and stencil writeout, so something has to be moved to the dest of the writeout branch. Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5065>
* pan/mdg: Add a macro for printing instruction source informationIcecream952020-06-101-21/+12
| | | | | Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5065>
* pan_bo.h: add time.h include for time_tPeter Seiderer2020-06-071-0/+1
| | | | | | | | | | Fixes: ../src/gallium/drivers/panfrost/pan_bo.h:93:9: error: unknown type name ‘time_t’ Signed-off-by: Peter Seiderer <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4279>
* Revert "panfrost: Keep cached BOs mmap'd"Icecream952020-06-051-5/+17
| | | | | | | | | | This reverts commit 794c239a990e08b5a42d42607e9c5e5b0921390c. A kernel bug causes cached BOs to not be unmapped correctly, triggering "bad page cache" kernel messages and causing short hangs. Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5355>
* pan/midgard: Use a signed value for checking inline constantsIcecream952020-06-051-1/+1
| | | | | | | | Inline constants are sign extended, so we should use a int16_t instead of an unsigned type. Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5351>
* pan/mdg: Ensure ld_vary_16 is alignedAlyssa Rosenzweig2020-06-041-0/+6
| | | | | | | | Otherwise packing may fail. Signed-off-by: Alyssa Rosenzweig <[email protected]> Fixes: 5f8dd413bcc ("pan/mdg: Handle 16-bit ld_vary") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5339>
* pan/mdg: Legalize inverts with constantsAlyssa Rosenzweig2020-06-042-7/+37
| | | | | | | | | | We need to force src_invert to be in the right place even if we flip when lowering an embedded->inline constant. Signed-off-by: Alyssa Rosenzweig <[email protected]> Fixes: 449e5ded934 ("pan/mdg: Treat inot as a modifier") Reported-by: Icecream95 <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5299>
* pan/bi: Disassemble gl_PointCoord reads.Alyssa Rosenzweig2020-06-031-1/+3
| | | | | Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5290>
* panfrost: Readd MIDGARD_SHADERLESS quirk to t760Alyssa Rosenzweig2020-06-031-1/+1
| | | | | | | Signed-off-by: Alyssa Rosenzweig <[email protected]> Reported-by: Icecream95 <[email protected]> Fixes: e53d27de61b ("panfrost: Add quirks for blend shader types") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5289>
* panfrost: Document MALI_WRITES_GLOBAL bitAlyssa Rosenzweig2020-06-032-0/+8
| | | | | | | We've been setting this unconditionally -- oops! Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5300>
* panfrost: Update MALI_EARLY_Z descriptionAlyssa Rosenzweig2020-06-031-5/+5
| | | | | | | | Via the ES3.1 early-z testing force, I've confirmed this bit is e-z. I've also confirmed e-z must be disabled for global writes, as expected. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5300>
* pan/bi: Handle vectorized load_constAlyssa Rosenzweig2020-06-031-4/+13
| | | | | | | In preparation for 16-bit vectors. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5307>
* pan/bi: Passthrough second argument of F32_TO_F16Alyssa Rosenzweig2020-06-031-0/+20
| | | | | | | | At the NIR level this is a second vector source of the first (only) argument; at the BIR level this is a pair of scalars. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5307>
* pan/bi: Pack second argument of F32_TO_F16Alyssa Rosenzweig2020-06-031-4/+6
| | | | | Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5307>
* pan/bi: Fix SEL.16 swizzleAlyssa Rosenzweig2020-06-031-4/+4
| | | | | | | 2 scalar arguments, not 1 vector. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5307>
* pan/bi: Handle SEL with vec3 16-bitAlyssa Rosenzweig2020-06-031-0/+4
| | | | | | | Otherwise we end up with a missing argument. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5307>
* panfrost: Passthrough NATIVE loads/storesAlyssa Rosenzweig2020-06-031-0/+18
| | | | | | | | Now that we handle load_output directly, this works for e.g. RGB565 on Midgard. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5285>
* pan/mdg: Handle regular nir_intrinsic_load_outputAlyssa Rosenzweig2020-06-031-17/+22
| | | | | | | | Instead of the vendored version. Only for blend shaders at the moment, frag shaders fb_fetch has a lot more going on. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5285>
* pan/mdg: Allow f2u8 and friends thruAlyssa Rosenzweig2020-06-031-3/+3
| | | | | | | | Now that we can handle destination sizes directly, this keeps us from needing to chew through so many conversions. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5285>
* pan/mdg: Handle f2u8Alyssa Rosenzweig2020-06-031-1/+3
| | | | | | | This is similar to f2u16. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5285>
* pan/mdg: Fold roundmode into applicable instructionsAlyssa Rosenzweig2020-06-031-3/+20
| | | | | Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5285>
* pan/mdg: Implement *_rtz conversions with roundmodeAlyssa Rosenzweig2020-06-031-12/+22
| | | | | | | Use rte as the canonical type. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5285>
* pan/mdg: Lower roundmodesAlyssa Rosenzweig2020-06-031-1/+14
| | | | | | | So now we can use the IR field semantically. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5285>
* pan/mdg: Add opcode roundmode propertyAlyssa Rosenzweig2020-06-032-4/+11
| | | | | | | When the output is rounded in a specified direction. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5285>
* pan/mdg: Add roundmode enumAlyssa Rosenzweig2020-06-032-0/+10
| | | | | Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5285>
* pan/mdg: Distinguish blend shaders in internal shader-dbAlyssa Rosenzweig2020-06-031-0/+1
| | | | | | | | Since these shaders are purely internal, the optimization criteria are a bit different, so it's worth calling attention to this when dumping. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5285>
* panfrost: Only use AFBC YTR with RGB and RGBAIcecream952020-06-031-3/+5
| | | | | | | The "lossless colorspace transform" is lossy for R and RG formats. Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5293>
* panfrost: Decode AFBC flag bitsIcecream952020-06-032-10/+28
| | | | | Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5293>
* pan/mdg: Don't double-replicate blend on T720Alyssa Rosenzweig2020-06-031-21/+1
| | | | | | | We already do this unconditionally in NIR. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5305>
* meson: use gnu_symbol_visibility argumentDylan Baker2020-06-016-12/+12
| | | | | | | | | | This uses a meson builtin to handle -fvisibility=hidden. This is nice because we don't need to track which languages are used, if C++ is suddenly added meson just does the right thing. Acked-by: Matt Turner <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4740>
* pan/mdg: Enable out-of-order execution after texture opsAlyssa Rosenzweig2020-06-013-1/+51
| | | | | | | | 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 <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5286>
* pan/mdg: Add quirk for missing out-of-order supportAlyssa Rosenzweig2020-06-011-2/+9
| | | | | | | Added in T760, like the other good parts of Midgard. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5286>
* pan/mdg: Disassemble out-of-order bitsAlyssa Rosenzweig2020-06-013-13/+15
| | | | | | | | Optimization for texture instructions, allowing ALU and LD/ST within a single thread while a texture read is still in flight. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5286>
* panfrost: Use VTX tag for vertex texturingAlyssa Rosenzweig2020-06-011-3/+5
| | | | | | | Fixes BARRIER faults. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5284>
* panfrost: Permit AFBC of RGB8Alyssa Rosenzweig2020-06-011-0/+4
| | | | | | | Ugly but hey. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5284>
* pan/mdg: Fuse f2f16 into load_interpolated_inputAlyssa Rosenzweig2020-06-015-2/+102
| | | | | | | To become a ld_vary intrinsic. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5283>
* pan/mdg: Handle 16-bit ld_varyAlyssa Rosenzweig2020-06-011-5/+8
| | | | | Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5283>
* panfrost: Un/pack sRGB via NIRAlyssa Rosenzweig2020-06-011-0/+48
| | | | | Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5265>
* panfrost: Un/pack R11G11B10Alyssa Rosenzweig2020-06-011-0/+30
| | | | | | | NIR has a helper for it already; we can reuse. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5265>