#
…

2022-06-19

01:07darkapex has joined #asahi-gpu
01:24chadmed has joined #asahi-gpu
01:38yunilina: It looks like 16-bit pixel formats use 128x64 tiles, and 64-bit pixel formats use 64x32 tiles.
01:38yuniThis seems annoying to deal with... non-square tiles sound complicated.
01:39yuniIt's sensible -- it means that 1 tile is exactly 1 page.
01:40yuni16384 = 128 * 128 * 1 = 128 * 64 * 2 = 64 * 64 * 4 = ...
01:40yuniIt raises tons of questions, though.
02:33PhilippvK has quit [Ping timeout: 480 seconds]
07:09bisko has joined #asahi-gpu
07:21bisko has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
09:29c10l has quit [Quit: Bye o/]
09:33c10l has joined #asahi-gpu
10:50c10l has quit [Quit: Bye o/]
10:54c10l has joined #asahi-gpu
12:02kode54wow, that's wacky
12:02kode54but sensible
13:17chadmed has quit [Ping timeout: 480 seconds]
13:18chadmed has joined #asahi-gpu
13:40MajorBiscuit has joined #asahi-gpu
14:41yunikode54: seriously
15:15yuniTiling pattern for a 256x256 RG8 image:
15:15yuniy₇ y₆ x₇ x₆ y₅ x₅ y₄ x₄ y₃ x₃ y₂ x₂ y₁ x₁ y₀ x₀
15:23yuniNow to remember how to interpret that ...
15:24jakebot6 has quit [Quit: The Lounge - https://thelounge.chat]
15:30yuniFor reference, tiling pattern for a 256x256 RGBA8 image:
15:30yunix₇ x₆ y₅ x₅ y₄ x₄ y₃ x₃ y₂ x₂ y₁ x₁ y₀ x₀
15:30jakebot6 has joined #asahi-gpu
15:30yunier that's missing some rows
15:31yuniFor reference, tiling pattern for a 256x256 RGBA8 image:
15:31yuniy₇ y₆ x₇ x₆ y₅ x₅ y₄ x₄ y₃ x₃ y₂ x₂ y₁ x₁ y₀ x₀
15:31yuniwhich is... the same? what?
15:32yuniI guess 128x64 and 64x64 tiling looks a lot alike.
15:35yuniI don't know.
15:35yuniI guess focus on the task at hand, calculating the layouts.
15:53yuni1/3 mesa:asahi / asahi_layout_tests OK 0.01s
16:07MajorBiscuit has quit [Quit: WeeChat 3.5]
17:13yuniSo now I'm trying to fix the linear<-->tiling routines given what we've discovered
17:13yunidEQP-GLES2.functional.texture.specification.teximage2d_align.2d_rgba8888_47_1 presents an interesting problem
17:13yuniLevel 0 of 47x27, that's bpp 32, tile size 16x16 Fail (Image comparison failed)
17:13yuniLevel 0 of 47x27, that's bpp 32, tile size 32x32 Pass (Pass)
17:16yuniI just dumped the correct layout, we're generating that correctly.
17:18yuniAnd the tiling pattern:
17:18yunix₅ y₄ x₄ y₃ x₃ y₂ x₂ y₁ x₁ y₀ x₀
17:19yuniSo that's legitimately a 32x32 tile (or equivalently 64x32).
17:20yuniThe layout unit test has the first tile as 0x2000 bytes
17:20yuni0x2000 = 64 * 32 * 4, so that's consistent with a 32x32 (or 64x32) tiling.
17:21yunibut *not* with a 16x16 tiling
17:21yuniFor 32-bit, the max tile size is 64x64
17:21yuniBut this is "small", so we can't use that one.
17:22yuniThe minor axis is 27 pixels, the "round down" rule gives a 16x16 tile.
17:22yuniThe "round up" rule gives a 32x32 tile.
17:23yuniOh -- but this is a "small" case
17:23yuniSo for the size calculation, the width/height are both rounded up to powers of two, giving 64x32
17:24yuniand then the tile size within that is irrelevant
17:24yuniAfter rounding up to a power of a two, we get 64x32, and then the minor axis used directly is 32
17:24yunibut that's equivalent to the round-up rule!
17:25alyssa has joined #asahi-gpu
17:25alyssayuni: That's all super cursed...
17:26yuniSeriously.
17:31yuniI have a hack that splits out the cases, which fixes the test. But I think I'm missing the bigger picture
17:33yuniStill breaking a pile of dEQPs.
17:48Ella[m]this sounds like it's gonna be fun to implement 👀
17:49Ella[m]i seem to have other issues rn tho :3
17:50alethkit has joined #asahi-gpu
17:53Ella[m]yeah trying to hook up the shader compiler into the vulkan driver :)
17:54yunigood luck!
17:54Ella[m]thanks <3
17:54yuniThe layout code is being moved to src/asahi/layout, so when that's working and merged you'll be able to use for VK
17:54yuniand not worry about all this nonsense.
17:54Ella[m]very nice :)
17:54yuniOf course that depends on the code working ....
17:55yuniAnd every time I think I understand how the twiddling works, the hardware throws another a curveball at me.
17:55alyssaElla[m]: btw, where's the vk driver code living?
17:55Ella[m]uhhh currently locally on my machine :3
17:56alyssaMaybe create an account on https://gitlab.freedesktop.org/ and push to a Mesa fork?
17:57Ella[m]haven't pushed in a while since my current changes need lots of cleanup
17:58Ella[m]i have a habit of forgetting to push stuff 😩
17:59alyssaWould appreciate getting a peak -- there are lots of ways to screw up driver dev and maybe I can keep you from going down a bad path or two
17:59alyssaadmittedly I don't know much VK driver dev yet myself ...
18:00Ella[m]the only other driver dev experience i've had is with relatively small contributions to v3dv
18:00Ella[m]but yah i'll push my unclean code now to a wip progress branch :3
18:00alyssaawesome :-)
18:01Ella[m]oh well this is embarrassing. last time i pushed was from my linux install. I don't even have my ssh keys on macos
18:03yunirelatable
18:06Ella[m]<alyssa> "Would appreciate getting a peak..." <- ight https://gitlab.freedesktop.org/Ella-0/mesa/-/tree/agxv-mega-wip
18:07Ella[m]warning: it's cursed and messy :) no cleanup at all
18:10alyssaElla[m]: Ok, something I notice off the bat:
18:10alyssaYou have the idea of "CPU jobs" for copies and such...? I know it's not implemented but I have bad news -- that won't work even if it is implemented.
18:11Ella[m]oh that's old :) i already know
18:11alyssaUnlike in OpenGL (where the driver can "stop the world" at any time and takeover --
18:11alyssagot it will shut up :)
18:11Ella[m]i just haven't removed it
18:11alyssafor the benefit of others reading backlog
18:12alyssaUnlike in OpenGL (where the driver can "stop the world" at any time, split the render pass, and do some work on the CPU, and ping pong back), Vulkan really requires everything to happen on the GPU (except where the API specifically happens on the CPU)
18:12alyssaElla[m]: Also, to actually implement those copies and things, there's a bit of talk around building a "vk_blitter" like we have u_blitter in gallium, but this is nontrivial unfortunately :(
18:13alyssathere's also maybe hardware support for some(?) blits and copies, lina thinks she saw something relevant in the kernel, but I haven't looked at all because on the gl side I don't really care
18:17Ella[m]alyssa: oh cool, i think i was gonna do something similar to what v3dv has (which i think some of the other drivers also have) with meta pipelines blitting (v3dv_meta_copy, v3dv_meta_clear, ...) i'll poke around a bit to see if i come across any hardware support for this stuff tho.
18:17alyssafor panvk, I'd really like the v3dv meta pipeline approach to be generalized to common code
18:17alyssarealistically if that's an option for agxv you'll want that for the first draft of the driver at least, more pressing matters.
18:22Ella[m]yup i'll probably do that at first :) idk first thing is getting my triangle thingy to render properly.
18:22Ella[m]it's meant to be like this
18:47alyssa has quit [Quit: Lost terminal]
21:42yuyichao has joined #asahi-gpu
21:45LunaFoxgirlVT has joined #asahi-gpu
22:18LunaFoxgirlVT has quit [Quit: Leaving]
22:31manawyrm has joined #asahi-gpu
…