summaryrefslogtreecommitdiff
path: root/src/panfrost
AgeCommit message (Collapse)AuthorFilesLines
2024-08-22panvk: Fix viewport calculationMary Guillemard1-1/+1
This fix "dEQP-VK.dynamic_state.*.general_state.{bind_order, state_persistence, state_switch}" Fixes: 1f57aae4e4f ("panvk: Move vkCmdDraw* functions to their own file") Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30754> (cherry picked from commit a869237d502ff80db8a7d83f2d39bd8b98674590)
2024-08-16panvk: Adjust RGB component order for fixed-function blendingBoris Brezillon1-0/+13
Basically what 004e0eb3ab85 ("panfrost: use RGB1 component ordering for R5G6B5 pixel formats") was doing in the gallium driver, but applied to panvk this time. Fixes: 004e0eb3ab85 ("panfrost: use RGB1 component ordering for R5G6B5 pixel formats") Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30685> (cherry picked from commit 9241af23e5b6a70009a0ccb6d54d49bacd1d00d1)
2024-08-16panvk: Fix NULL deref on model name when device isn't supportedMary Guillemard1-2/+3
Instead of reproting an VK_ERROR_INCOMPATIBLE_DRIVER we were crashing as device->model was init after this error check. Tested on G57 but should work the same on all unsupported arch. Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com> Fixes: f7f9b3d170f5 ("panvk: Move to vk_properties") Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30686> (cherry picked from commit c95ef9e3232ef35da3b3d7a77d0726d0cde3fe23)
2024-08-14panfrost: use RGB1 component ordering for R5G6B5 pixel formatsEric R. Smith1-24/+20
For some purposes (e.g. advanced blending) we need a non-zero alpha value returned from reads. This is only guaranteed on Bifrost if we explicitly request RGB1 component ordering. The default is to use RGBA component ordering, which for R5G6B5 causes 0 to be read for alpha. A complication is that the Mali fixed function hardware requires four components (which implies RGBA rather than RGB1). If fixed function blending is in use, we modify the pixel format back to RGBA when building the blend descriptor. Cc: mesa-stable Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29606> (cherry picked from commit 004e0eb3ab854957bdb798142678765360b7104b)
2024-07-28panvk: Pass attrib_buf_idx_offset to desc_copy_infoMary Guillemard1-2/+1
This was missing from the original fix and was causing MMU falults on "dEQP-VK.memory.pipeline_barrier.host_write_uniform_texel_buffer.*". Fixes: cec45cac846 ("panvk: Fix image support in vertex jobs") Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30378> (cherry picked from commit e863acb318c437844b3aa56d4ff611ab6689ebf9)
2024-07-24panvk: Fix image support in vertex jobsMary Guillemard5-8/+17
There were various bugs causing images access to fault. This fixes "dEQP-VK.memory.pipeline_barrier.host_write_storage_buffer.*" and possibly other tests. Fixes: 7bea6f8612e ("panvk: Overhaul the Bifrost descriptor set implementation") Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30293> (cherry picked from commit cec45cac846385425772f9431fb0fd707be5e547)
2024-07-19format: Generate endian-independent format aliasesDaniel Stone6-8/+12
Instead of having a hardcoded list of endian-independent format aliases in the header, generate them from the format definitions. Signed-off-by: Daniel Stone <daniels@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29649>
2024-07-17panvk: Fix assertVinson Lee1-1/+1
Fix defect reported by Coverity Scan. Assign instead of compare (PW.ASSIGN_WHERE_COMPARE_MEANT) assign_where_compare_meant: use of "=" where "==" may have been intended Fixes: 0e74b6eda9a0 ("panvk: Add support for layered rendering") Signed-off-by: Vinson Lee <vlee@freedesktop.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30181>
2024-07-17bi: Implement basic 8-bit vec supportMary Guillemard1-4/+35
Not the most efficient approach but functional. Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com> Acked-by: Rebecca Mckeever <rebecca.mckeever@collabora.com> Reviewed by: Eric R. Smith <eric.smith@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30088>
2024-07-17bi: Enable lower_pack pass in compilerMary Guillemard1-0/+2
Required for OpenCL Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com> Reviewed by: Eric R. Smith <eric.smith@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30088>
2024-07-17bi: Lower pack_32_4x8_split and pack_32_2x16_split in algebraicMary Guillemard1-0/+5
Required for OpenCL. Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com> Reviewed by: Eric R. Smith <eric.smith@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30088>
2024-07-17bi: Enable lower_pack_64_4x16Mary Guillemard1-0/+1
Required for OpenCL. Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com> Reviewed by: Eric R. Smith <eric.smith@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30088>
2024-07-17bi: Clean up mem_access_size_align_cbMary Guillemard1-9/+9
Also ensure that we never emit vector with more than 4 components. Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com> Reviewed-by: Eric R. Smith <eric.smith@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30088>
2024-07-16ci/panfrost: Update t760 failsMary Guillemard1-0/+1
Add a new failure found while running gles job manually Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com> Reviewed-by: Eric R. Smith <eric.smith@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30150>
2024-07-16pan/kmod: Avoid deadlock on VA allocation failure on panthorMary Guillemard1-1/+1
Fixes: 97f6a62f7ef ("pan/kmod: Add a backend for panthor") Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com> Reviewed-by: Eric R. Smith <eric.smith@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30150>
2024-07-11panfrost: add translation between modifier and compression ratesLouis-Francis Ratté-Boulianne2-0/+150
Add some util methods to be able to translate from an AFRC modifier to the associated compression bitrate (bits-per-components) and vice-versa. Also add a method to query all the supported compression bitrate for a format. Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28813>
2024-07-11panfrost: add support for AFRC modifiersLouis-Francis Ratté-Boulianne3-9/+157
Add support for all three block sizes (16, 24 and 32) and two paging tiles layout (rotation or scan optimized). The size of the resource is aligned to the paging tile width and height. Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com> Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28813>
2024-07-11panfrost: add support for AFRC render targetsLouis-Francis Ratté-Boulianne1-4/+36
Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com> Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28813>
2024-07-11panfrost: add support for AFRC texturesLouis-Francis Ratté-Boulianne1-8/+22
Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com> Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28813>
2024-07-11panfrost: encode component order as an inverted swizzle (v10)Louis-Francis Ratté-Boulianne4-7/+10
v10 restricts component orders when AFRC is in use, so we use the same solution as for AFBC on v7. Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com> Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28813>
2024-07-11panfrost: add utils for AFRC fixed-rate supportLouis-Francis Ratté-Boulianne5-0/+221
There are mainly two parameters to control the fixed-rate compression: - Block size: the size (16, 24 or 32 bytes) that will take a coding unit (format dependent). - AFRC format: the pixel format and paging tile layout Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com> Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28813>
2024-07-11panfrost: add device querying for AFRC supportLouis-Francis Ratté-Boulianne2-0/+12
As of now, only Mali-G310 supports ARM fixed-rate compression but it should be advertised in bit 25 of TEXTURE_FEATURES_0 Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com> Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28813>
2024-07-11panfrost: Add AFRC overlay in v10 xml specificationLouis-Francis Ratté-Boulianne1-1/+73
Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com> Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28813>
2024-07-07ci: simplify setting .no-auto-retry now that it isn't bundled with unrelated ↵Eric Engestrom1-3/+3
rules: Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30004>
2024-07-07ci: split .no-auto-retry out of .scheduled_pipeline-rulesEric Engestrom1-3/+3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30004>
2024-06-29build: pass licensing information in SPDX formDavid Heidelberg14-236/+13
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Acked-by: Dylan Baker <dylan.c.baker@intel.com> Acked-by: Eric Engestrom <eric@igalia.com> Acked-by: Daniel Stone <daniels@collabora.com> Signed-off-by: David Heidelberg <david@ixit.cz> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29972>
2024-06-28panfrost/ci: split gl & vk jobs rulesEric Engestrom1-12/+37
No need to run all the gl jobs on vk changes, and vice-versa. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29942>
2024-06-28panfrost/ci: drop duplicate job rulesEric Engestrom1-1/+0
It's overwritten by the `.panfrost-bifrost-manual-rules` 3 lines below. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29942>
2024-06-27panvk: Remove duplicate variable src_idxVinson Lee1-1/+1
Fix defect reported by Coverity Scan. Evaluation order violation (EVALUATION_ORDER) write_write_typo: In src_idx = src_idx = binding_layout->desc_idx + i * desc_stride + subdesc_idx, src_idx is written twice with the same value. Fixes: 7bea6f8612e1 ("panvk: Overhaul the Bifrost descriptor set implementation") Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29865>
2024-06-27panfrost: implement SFBD raw format support on v4Alexandre Marquet1-1/+20
For v4 GPUs, raw formats support is currently advertised as "not finished for SFBD". This patch implements it. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10571 Signed-off-by: Alexandre Marquet <tb@a-marquet.fr> Acked-by: Eric R. Smith <eric.smith@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29062>
2024-06-27panvk: Add support for layered renderingBoris Brezillon11-134/+272
This is needed if we want to use vk_meta_blit. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29450>
2024-06-27panvk: Use IDVS jobs when we canBoris Brezillon2-70/+187
This optimizes things by splitting the position and vertex processing in two, allowing primitives to be discarded before the varying shader is executed. This optimization is even more important if we throw layered rendering into the mix, because layered rendering on Bifrost is implemented with N IDVS/fragment jobs (N being the number of layers), with primitives not targetting a given layer being artificially culled in the vertex shader by issuing a position outside the render area. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29450>
2024-06-27pan/blitter: Let pan_preload_fb() callers queue the jobs to the job chainBoris Brezillon3-18/+18
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29450>
2024-06-27pan/desc: Prepare things for fragment job chainingBoris Brezillon3-11/+13
Right now we assume the fragment job chain contains only one job, but with multilayer/multiview rendering, we want to submit fragment jobs for all layers at once. Turn pan_emit_fragment_job() into pan_emit_fragment_job_payload() and delegate the job header packing to the caller. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29450>
2024-06-27pan/desc: Extend pan_emit_fbd() to support multilayer renderingBoris Brezillon3-29/+38
Right now, we always emit a framebuffer descriptor for the first layer in the RT views. Extend the logic so we can emit one FBD per layer we're supposed to render to without having to manually modify the RT views. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29450>
2024-06-26meson: add various generated header dependencies as order-only depsEli Schwartz1-0/+1
https://mesonbuild.com/FAQ.html#how-do-i-tell-meson-that-my-sources-use-generated-headers A few locations had underspecified deps on the header files, and this caused builds to fail given sufficient parallelism. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29115>
2024-06-26panvk: Enable texture filtering in CI for Mali-G52Mary Guillemard1-0/+1
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com> Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29872>
2024-06-26panvk: Advertise VK_KHR_sampler_mirror_clamp_to_edgeMary Guillemard1-1/+2
We already support it under the hood. Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com> Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29872>
2024-06-26panvk: Implement and advertise anisotropy supportMary Guillemard2-0/+6
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com> Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29872>
2024-06-26panvk: Enable glsl.440.linkage in CI for Mali-G52Mary Guillemard1-0/+1
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com> Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29872>
2024-06-26panvk: Run nir_lower_io_to_vector for fragment shaderMary Guillemard1-0/+4
This makes sure that all output variables at the same location are grouped together for bifrost_nir_lower_blend_components. Fix various fails with "dEQP-VK.glsl.440.linkage.varying.component.frag_out.*". Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com> Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29872>
2024-06-26panvk: Do not emit blend shader when color_mask is 0Mary Guillemard1-0/+10
Also do not emit when color write is disabled. Fix "dEQP-VK.renderpass.suballocation.attachment_write_mask.attachment_count_*.start_index_*" failures. Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com> Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29872>
2024-06-26panvk: Advertise VK_EXT_private_dataMary Guillemard2-0/+2
Alread handled by common code. Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com> Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29872>
2024-06-26panvk: Enable compute pipeline in CI for Mali-G52Mary Guillemard2-1/+21
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com> Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29872>
2024-06-26panvk: Report proper workgroup invocation and sizeMary Guillemard1-4/+12
We cannot report a workgroup invocation and size bigger than MAX_THREADS_PER_WG as splitting into serveral jobs has many limitations that cannot be overlooked. As such we limit to the MAX_THREADS_PER_WG property reported by kmod. Fix "dEQP-VK.compute.pipeline.basic.max_local_size_*" failures. Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com> Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29872>
2024-06-26panvk: Skip dispatch on empty workgroupMary Guillemard1-0/+3
Fix "dEQP-VK.compute.pipeline.basic.empty_workgroup_*" crashes. Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com> Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29872>
2024-06-25panvk: support x11 wsiErik Faye-Lund2-1/+12
This seems to be enough to get XCB working. From looking at what other drivers does, it seems likely that XLib will just work, so let's enable that as well. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29878>
2024-06-21treewide: use nir_def_replace sometimesAlyssa Rosenzweig2-8/+4
Two Coccinelle patches here. Didn't catch nearly as much as I would've liked but it's a start. Coccinelle patch: @@ expression intr, repl; @@ -nir_def_rewrite_uses(&intr->def, repl); -nir_instr_remove(&intr->instr); +nir_def_replace(&intr->def, repl); Coccinelle patch: @@ identifier intr; expression instr, repl; @@ nir_intrinsic_instr *intr = nir_instr_as_intrinsic(instr); ... -nir_def_rewrite_uses(&intr->def, repl); -nir_instr_remove(instr); +nir_def_replace(&intr->def, repl); Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com> Reviewed-by: Juan A. Suarez Romero <jasuarez@igalia.com> [broadcom] Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com> [lima] Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com> [etna] Reviewed-by: Pavel Ondračka <pavel.ondracka@gmail.com> [r300] Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29817>
2024-06-20panvk: Enable offscreen_viewport tests in CI for Mali-G52Mary Guillemard1-0/+1
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com> Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29802>
2024-06-20panvk: Clamp viewport scissor to valid rangeMary Guillemard2-12/+15
Fix "dEQP-VK.draw.renderpass.offscreen_viewport.x_off_screen_negative_y*" tests. Also did a bit of clean up around emit_viewport. Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com> Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29802>