mesa merge requestshttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests2021-04-22T20:22:15Zhttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10375panfrost/ci: Test GLES 3.1 on Bifrost and T8602021-04-22T20:22:15ZBoris Brezillonpanfrost/ci: Test GLES 3.1 on Bifrost and T860The new version adds a commit to test GLES 3.1 on T860.
/cc @alyssa @italoveThe new version adds a commit to test GLES 3.1 on T860.
/cc @alyssa @italoveMarge BotMarge Bothttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10369panfrost: Fix indirect draws on Bifrost2021-04-21T19:46:40ZBoris Brezillonpanfrost: Fix indirect draws on BifrostThe first patch fixes a regression introduced by the preload rework, and the second an issue in the Bifrost compiler.The first patch fixes a regression introduced by the preload rework, and the second an issue in the Bifrost compiler.Marge BotMarge Bothttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10314panfrost: Fix RSD emission on Bifrost v62021-04-20T22:14:29ZBoris Brezillonpanfrost: Fix RSD emission on Bifrost v6Bifrost v6 doesn't have wait dependency fields.
Fixes some dEQP-GLES3.functional.shaders.fragdepth tests on G72.
/cc @icecream95Bifrost v6 doesn't have wait dependency fields.
Fixes some dEQP-GLES3.functional.shaders.fragdepth tests on G72.
/cc @icecream95Marge BotMarge Bothttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10299android: panfrost/lib: add pan_cs.c to Makefile.sources2021-04-20T17:43:59Zmaurossiandroid: panfrost/lib: add pan_cs.c to Makefile.sourcesFixes the following building errors:
FAILED: out/target/product/x86_64/obj/SHARED_LIBRARIES/gallium_dri_intermediates/LINKED/gallium_dri.so
...
ld.lld: error: undefined symbol: pan_emit_tls
>>> referenced by pan_cmdstream.c:2279 (extern...Fixes the following building errors:
FAILED: out/target/product/x86_64/obj/SHARED_LIBRARIES/gallium_dri_intermediates/LINKED/gallium_dri.so
...
ld.lld: error: undefined symbol: pan_emit_tls
>>> referenced by pan_cmdstream.c:2279 (external/mesa/src/gallium/drivers/panfrost/pan_cmdstream.c:2279)
...
ld.lld: error: undefined symbol: pan_emit_fbd
>>> referenced by pan_cmdstream.c:2302 (external/mesa/src/gallium/drivers/panfrost/pan_cmdstream.c:2302)
...
ld.lld: error: undefined symbol: pan_emit_fragment_job
>>> referenced by pan_cmdstream.c:2382 (external/mesa/src/gallium/drivers/panfrost/pan_cmdstream.c:2382)
...
ld.lld: error: undefined symbol: pan_emit_bifrost_tiler_heap
>>> referenced by pan_job.c:718 (external/mesa/src/gallium/drivers/panfrost/pan_job.c:718)
...
ld.lld: error: undefined symbol: pan_emit_bifrost_tiler
>>> referenced by pan_job.c:723 (external/mesa/src/gallium/drivers/panfrost/pan_job.c:723)
...
ld.lld: error: undefined symbol: pan_fbd_has_zs_crc_ext
>>> referenced by pan_job.c:893 (external/mesa/src/gallium/drivers/panfrost/pan_job.c:893)
...
clang-9: error: linker command failed with exit code 1 (use -v to see invocation)
Cc: 21.1 <mesa-stable@lists.freedesktop.org>
Fixes: 387f8c037d38 ("panfrost: Add various helpers to simplify FB desc emission")Marge BotMarge Bothttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10250panfrost: Fix ZS reloading on Bifrost v62021-04-21T19:46:39ZBoris Brezillonpanfrost: Fix ZS reloading on Bifrost v6MALI_PRE_POST_FRAME_SHADER_MODE_EARLY_ZS_ALWAYS was introduced in
Bifrost v7. Use MALI_PRE_POST_FRAME_SHADER_MODE_ALWAYS on v6.
/cc @icecream95MALI_PRE_POST_FRAME_SHADER_MODE_EARLY_ZS_ALWAYS was introduced in
Bifrost v7. Use MALI_PRE_POST_FRAME_SHADER_MODE_ALWAYS on v6.
/cc @icecream95Marge BotMarge Bothttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10233panfrost: Don't advertise AFBC mods when the format is not supported2021-04-21T16:54:37ZBoris Brezillonpanfrost: Don't advertise AFBC mods when the format is not supportedOn Bifrost, AFBC is not supported if the format has a non-identity
swizzle. For internal resources we fix the format at runtime, but this
fixup is not applicable when we export the resource. Don't advertise
AFBC modifiers on such formats...On Bifrost, AFBC is not supported if the format has a non-identity
swizzle. For internal resources we fix the format at runtime, but this
fixup is not applicable when we export the resource. Don't advertise
AFBC modifiers on such formats.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>Marge BotMarge Bothttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10188panfrost: Simplify Bifrost blendable formats2021-04-21T13:34:58ZAlyssa Rosenzweigpanfrost: Simplify Bifrost blendable formatsDelete a lot of indirection. @icecream95 proposed a fast path for rgba8_unorm but if we can make 1 format fast, why not make all the formats fast?
Running on dEQP but haven't profiled anything. Then again the code cleanup alone is worth...Delete a lot of indirection. @icecream95 proposed a fast path for rgba8_unorm but if we can make 1 format fast, why not make all the formats fast?
Running on dEQP but haven't profiled anything. Then again the code cleanup alone is worth it imo.
Also seriously considering deleting support for non-dithered tib formats, we don't use them and I don't get when you'd want to. There's already a mechanism outside this to implement GL_DITHER. Maybe useful for Vulkan?Marge BotMarge Bothttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9719panfrost: Add a Meson dependency on bi_opcodes.h for bifrost_compiler2021-03-23T21:27:27ZJesse Nataliejenatali@microsoft.companfrost: Add a Meson dependency on bi_opcodes.h for bifrost_compiler`Fixes: 2d4597de ("pan/bi: Use autogenerated modifiers")`
Only the compiler lib was updated to use the dependency, but the standalone tool also indirectly includes this header so it needs the dep too.
/cc @alyssa`Fixes: 2d4597de ("pan/bi: Use autogenerated modifiers")`
Only the compiler lib was updated to use the dependency, but the standalone tool also indirectly includes this header so it needs the dep too.
/cc @alyssaMarge BotMarge Bothttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9520panfrost: Prepare things for indirect draw support on Bifrost2021-03-11T14:40:46ZBoris Brezillonpanfrost: Prepare things for indirect draw support on Bifrost@alyssa all patches except the penultimate one have been R-b you. Let me know if I should drop the last 2 patches or add your R-b.@alyssa all patches except the penultimate one have been R-b you. Let me know if I should drop the last 2 patches or add your R-b.Marge BotMarge Bothttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9380panfrost: Enough OpenCL support for basic tests2021-03-30T18:36:49ZIcecream95panfrost: Enough OpenCL support for basic testsThese patches are enough to run `clinfo` and a few of the Piglit OpenCL tests on Bifrost GPUs with `PAN_MESA_DEBUG=deqp`.These patches are enough to run `clinfo` and a few of the Piglit OpenCL tests on Bifrost GPUs with `PAN_MESA_DEBUG=deqp`.Marge BotMarge Bothttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9265android: pan/bi: reorder static dependencies in gallium/dri2021-03-11T22:52:04Zmaurossiandroid: pan/bi: reorder static dependencies in gallium/drilibpanfrost_lib depends on libpanfrost_bifrost for 'bifrost_compile_shader_nir' symbol
libpanfrost_lib depends on libpanfrost_bifrost_disasm for 'disassemble_bifrost' symbol
LOCAL_STATIC_LIBRARIES requires proper ordering to make the sym...libpanfrost_lib depends on libpanfrost_bifrost for 'bifrost_compile_shader_nir' symbol
libpanfrost_lib depends on libpanfrost_bifrost_disasm for 'disassemble_bifrost' symbol
LOCAL_STATIC_LIBRARIES requires proper ordering to make the symbols available
Fixes the following building error happening with Android P:
FAILED: out/target/product/x86_64/obj/SHARED_LIBRARIES/gallium_dri_intermediates/LINKED/gallium_dri.so
external/mesa/src/panfrost/lib/decode.c:534: error: undefined reference to 'disassemble_bifrost'
external/mesa/src/panfrost/lib/pan_shader.c:145: error: undefined reference to 'bifrost_compile_shader_nir'
Cc: 20.3 21.0 <mesa-stable@lists.freedesktop.org>
Fixes: 166630f ("android: pan/bi: Separate disasm/compiler targets")Marge BotMarge Bothttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9239pan/bi: FP16 support2021-05-06T23:43:30ZAlyssa Rosenzweigpan/bi: FP16 supportAdds initial vectorized FP16 to Bifrost. Draft because there are a few dEQP fails to sort out, there is a big hack to work around INSTR_INVALID_ENC faults on some tests, and codegen is terrible right now (for the 1-bit boolean preliminar...Adds initial vectorized FP16 to Bifrost. Draft because there are a few dEQP fails to sort out, there is a big hack to work around INSTR_INVALID_ENC faults on some tests, and codegen is terrible right now (for the 1-bit boolean preliminary, this is a regression -- but we can potentially do much better than master). Still, some of the preliminaries can be landed now at least.
int16 will need quite a bit more work and can come later.Marge BotMarge Bothttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9109panfrost: Fix uniform_count on Midgard2021-02-18T16:48:42ZAlyssa Rosenzweigpanfrost: Fix uniform_count on MidgardThe compiler ABI specifies push uniforms at a 4-byte granularity (like
Bifrost), but Midgard require a 16-byte granularity. As such if the
number of pushed words is not a multiple of 4, there is a buffer overrun
at shader load time. Ordi...The compiler ABI specifies push uniforms at a 4-byte granularity (like
Bifrost), but Midgard require a 16-byte granularity. As such if the
number of pushed words is not a multiple of 4, there is a buffer overrun
at shader load time. Ordinarily this is inaccessible so the garbage is
ignored.
However, there was a great deal of confusion around the `uniform_cutoff`
variable. In some cases (such a full glmark2 run on a 64-bit processor),
the push uniforms would be at the end of a BO and the overrun would
cause a page fault.
Remove uniform_cutoff entirely and work with count directly to avoid
faulting, and round the count up to be defensive.
Closes: #4289
Fixes: ed810eb0a0c ("panfrost: Don't truncate uniform_count")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>Marge BotMarge Bothttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9105panfrost: ES3 hackfest2021-03-11T22:52:04ZAlyssa Rosenzweigpanfrost: ES3 hackfestAtomics, images, framebuffer no attachments, framebuffer fetch, more multisamplings, bugfixing spree...
Decided to punt on 64-bit atomics since it's nontrivial on Bifrost (will require a rather deep change to the scheduler logic to deal...Atomics, images, framebuffer no attachments, framebuffer fetch, more multisamplings, bugfixing spree...
Decided to punt on 64-bit atomics since it's nontrivial on Bifrost (will require a rather deep change to the scheduler logic to deal with the postprocessing -- on my TODO but probably not for ES3.1) and there are bigger fish to fry.
Cc @icecream95 for the compute stuff (I finished some of your patches)Marge BotMarge Bothttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8973panfrost: Overhaul push constants2021-02-11T17:39:06ZAlyssa Rosenzweigpanfrost: Overhaul push constantsThis series started out with the observation that our UBO handling is pretty bad. We push sysvals and UBO #0 implicitly, we don't use lower_uniforms_to_ubo on midgard but do on bifrost with no relevant architectural difference, we don't ...This series started out with the observation that our UBO handling is pretty bad. We push sysvals and UBO #0 implicitly, we don't use lower_uniforms_to_ubo on midgard but do on bifrost with no relevant architectural difference, we don't push anything on bifrost, we need redundant iadd instructions to skip over sysvals on bifrost, we need to know the total number of sysvals before emitting any code, etc...
This series attempts to fix all of these. We switch to explicit UBO analysis in the compiler backends, reporting what to push at draw time, allowing us to push other UBOs, skip disjoint ranges, pack tightly on Bifrost even if the user didn't, etc. With that change we can make sysvals their own UBO and all is well. There's no shortage of room for improvement, but overall I'm pretty happy with how this came out.
The next version of !8774 will depend on this.Marge BotMarge Bothttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8848pan/bi: Support atomic exchanges2021-02-05T18:01:48ZAlyssa Rosenzweigpan/bi: Support atomic exchangesThere are two "types" of atomics in Bifrost:
* Computational atomics (adds, mins, ..) which require a complex series of instructions using ATOM_CX as a helper
* "Freestanding" atomics, particularly exchanges
The implementations are to...There are two "types" of atomics in Bifrost:
* Computational atomics (adds, mins, ..) which require a complex series of instructions using ATOM_CX as a helper
* "Freestanding" atomics, particularly exchanges
The implementations are totally disjoint. This MR supports the latter.
Support for the former will take quite a bit more time to land as it depends on the scheduler, which hasn't cleared CI in a while. The fixes here should be immediately useful, however.
[N.b.: I am unhappy about the sequence of redundant moves. This works around issues with tied operands in our current register allocation scheme. It's not ideal and I would like to fix this the right way down the line, but it's a low priority item right now, and this suffices (at a small performance cost). We have the same issue with TEXC as it is.]
Cc @bbrezillon @icecream95Marge BotMarge Bothttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8808panfrost: Misc cleanup and one fix2021-02-23T22:23:49ZBoris Brezillonpanfrost: Misc cleanup and one fixCollection of cleanups + a patch to fix the tiler job injection logic on Bifrost.
/cc @italove for the attrib changesCollection of cleanups + a patch to fix the tiler job injection logic on Bifrost.
/cc @italove for the attrib changesMarge BotMarge Bothttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8774panfrost: ES3.x improvements (bitfields, sample variables, 16x multisampling)2021-02-18T22:15:03ZAlyssa Rosenzweigpanfrost: ES3.x improvements (bitfields, sample variables, 16x multisampling)Working my way through fails on dEQP-GLES31.functional.shaders.* on both Midgard and Bifrost. This fixes a bunch of them. Draft because:
- [x] I realized in the shower this morning (as one does) ufind_msb lowering on Bifrost is buggy fo...Working my way through fails on dEQP-GLES31.functional.shaders.* on both Midgard and Bifrost. This fixes a bunch of them. Draft because:
- [x] I realized in the shower this morning (as one does) ufind_msb lowering on Bifrost is buggy for 8/16-bit
- [ ] I realized shortly after getting it working the .hi lowering is totally useless, just need to fix the packing for .Z/.W which _should_ be possible despite what the assembly suggests.
- [x] Midgard helper invocation store lowering is a mess
- [x] Sample position arrays aren't actually updated (responsible for failing tests on both archs)
- [x] Sample position lowering is out-of-spec on Midgard (despite the DDK doing the same buggy thing and getting away with it)
- [x] Sample mask is preloaded on Bifrost unconditionally, should check shader info.
- [ ] gl_SampleMask writes aren't supported on Midgard
(I do plan to fix these, except maybe gl_SampleMask, just signing off for the night and want to make sure @bbrezillon sees these)
@icecream95 might want to steal some of these patches for CL.Marge BotMarge Bothttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8773panfrost: Add the tiler heap to fragment jobs on Bifrost2021-02-23T22:23:50ZIcecream95panfrost: Add the tiler heap to fragment jobs on BifrostFixes faults in applications that use multiple windows (e.g. Firefox, plasmashell).
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4157Fixes faults in applications that use multiple windows (e.g. Firefox, plasmashell).
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4157Marge BotMarge Bothttps://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8470panfrost: Don't skip the test with a 4k shader2021-01-13T19:34:57ZBoris Brezillonpanfrost: Don't skip the test with a 4k shaderCommit bfcdc8f1 ("pan/bi: Add some zero bytes after shaders on
Bifrost") should have fixed the problem.
/cc @icecream95Commit bfcdc8f1 ("pan/bi: Add some zero bytes after shaders on
Bifrost") should have fixed the problem.
/cc @icecream95Marge BotMarge Bot