#
✕ nick:alyssa
#asahi-gpu · 2022-10-02 20:09
alyssais the local version sane?
#asahi-gpu · 2022-10-02 20:08
alyssadid you install up to date modules?
#asahi-gpu · 2022-10-02 20:06
alyssaalso, modules
#asahi-gpu · 2022-10-02 20:05
alyssawhere is the wifi firmware coing from
#asahi-gpu · 2022-10-02 19:58
alyssathose sound like kernel misconfiguration or busted initramfs or something
#asahi-gpu · 2022-10-02 18:07
alyssallvmpipe already does ispc's 1 Weird Trick
#asahi-gpu · 2022-10-02 16:52
alyssalina: All of the "this GPU is scalar/vector" drama makes a lot more sense when you realize subgroup-style SIMD is equivalent to vec4 SIMD :)
#asahi-gpu · 2022-10-02 16:37
alyssasure
#asahi-gpu · 2022-10-02 15:47
alyssakarolherbst: The conceptual block diagram is the same as Mali, the hardware is just a lot less opinionated.
#asahi-gpu · 2022-10-02 15:26
alyssaI think it can be done... I don't think I want to be the one to do it ;)
#asahi-gpu · 2022-10-02 15:26
alyssaI don't think turnip can, because qualcomm isn't a traditional tiler.
#asahi-gpu · 2022-10-02 15:26
alyssaI don't know if v3dv could use.
#asahi-gpu · 2022-10-02 15:26
alyssaI assume PowerVR too given the heritage.
#asahi-gpu · 2022-10-02 15:25
alyssaBoth Mali and AGX want that common lowering
#asahi-gpu · 2022-10-02 15:25
alyssaMy motivated reasoning says that we could extend the render pass emulation in the Vulkan core to do that for tilers (implement with dynamic rendering + imageblocks)
#asahi-gpu · 2022-10-02 15:25
alyssa-----
#asahi-gpu · 2022-10-02 15:24
alyssa(EXT_pixel_local_storage is a GLES extension adding imageblocks.)
#asahi-gpu · 2022-10-02 15:23
alyssaSo to implement all this subpass gooiness, we'd want to be doing an internal dynamic rendering for the whole render pass, with some sort of internal VK_MESA_pixel_local_storage extension
#asahi-gpu · 2022-10-02 15:23
alyssavkEndRendering()
#asahi-gpu · 2022-10-02 15:23
alyssa(what Metal calls "imageblocks")
#asahi-gpu · 2022-10-02 15:23
alyssaDraws where input attachments are lowered to "tilebuffer load" and outputs are lowered to "tilebuffer store", keyed to the explicit tilebuffer layouts
#asahi-gpu · 2022-10-02 15:22
alyssavkBeginRendering(the layout at the END, that will actually be stored to memory)
#asahi-gpu · 2022-10-02 15:22
alyssaConceptually what we actually want is:
#asahi-gpu · 2022-10-02 15:22
alyssaThis can all be done with render passes, but it doesn't really map in a totally clean way.
#asahi-gpu · 2022-10-02 15:22
alyssa------------
#asahi-gpu · 2022-10-02 15:21
alyssaFinally, the end of tile program writes out only what's left at the end with STORE_OPs
#asahi-gpu · 2022-10-02 15:21
alyssaFragment shaders are keyed to the layout before and after, determining how input attachments are read and colour is written respectively.
#asahi-gpu · 2022-10-02 15:21
alyssaBefore and after each subpass, there is a fixed layout of the tilebuffer: mappings of colour attachments to offsets and tilebuffer formats.
#asahi-gpu · 2022-10-02 15:20
alyssaThe background program initializes the tilebuffer for the *first* subpass.
#asahi-gpu · 2022-10-02 15:20
alyssaIdeally, the "background -> draws -> end of tile" pipeline is a single *render pass*
#asahi-gpu · 2022-10-02 15:19
alyssaSo how does any of this map to subpasses?
#asahi-gpu · 2022-10-02 15:19
alyssa---------------
#asahi-gpu · 2022-10-02 15:19
alyssa(For loads, the driver will again bind N texture state registers with texture descriptors mapping the render target's existing contents)
#asahi-gpu · 2022-10-02 15:19
alyssaFor completeness, there's also a special "background" program that runs for every pixel before any other fragment shader. It should load or clear all render targets as necessary.
#asahi-gpu · 2022-10-02 15:18
alyssa(I expect those formats need not match exactly but they must be compatible for the results to make sense.)
#asahi-gpu · 2022-10-02 15:17
alyssawith a shader that contains N block copy instructions, each specifying the format and location of the render target in the tilebuffer
#asahi-gpu · 2022-10-02 15:16
alyssaFor example, to implement N render targets with different formats, the driver will bind N texture state registers with descriptors mapping each render target in memory with the format of the attachment in memory.
#asahi-gpu · 2022-10-02 15:16
alyssaThe driver prepares this shader based on the API state.
#asahi-gpu · 2022-10-02 15:15
alyssaThat is a fragment-like shader that runs once per tile, rather than once per pixel, after all regular fragment shading is done.
#asahi-gpu · 2022-10-02 15:15
alyssaGenerally this instruction is used in the special "end-of-tile" program.
#asahi-gpu · 2022-10-02 15:14
alyssaIt interprets a block of local memory according to the format/byte offset provided, and blits it to the right spot in the image you pass in.
#asahi-gpu · 2022-10-02 15:14
alyssaand a format and a byte offset
#asahi-gpu · 2022-10-02 15:14
alyssaThis takes in an image descriptor (usually loaded into a texture state register with BIND_TEXTURE)
#asahi-gpu · 2022-10-02 15:13
alyssaThis is the most subtle. ("unkB1" in applegpu right now)
#asahi-gpu · 2022-10-02 15:13
alyssa3. copy local block to image.
#asahi-gpu · 2022-10-02 15:12
alyssa2. local pixel load. The above in reverse. This is how we can load the "tilebuffer" to implement blending.
#asahi-gpu · 2022-10-02 15:12
alyssaThis is how fragment shaders write out their results to the "tilebuffer".
#asahi-gpu · 2022-10-02 15:12
alyssaThe shader passes in a byte offset, a format, and a value to store.
#asahi-gpu · 2022-10-02 15:11
alyssa1. local pixel store. This works like a local store (as compute kernels use), but the destination is implicitly indexed by the fragment coordinate. It's a formatted load, meaning you specify the format in the instruction and it does conversion (rgba8 -> f32) in hardware for you.
#asahi-gpu · 2022-10-02 15:10
alyssaHow does that work? Well, there are 3 handy instructions:

plus ›