2022-10-02
00:05yuyichao_ has quit [Quit: Konversation terminated!]
00:51alyssaI'm under the impression iOS apps can talk to the AGXAccelerator IOKit service themselves (based on project 0 reports I've read) making that technically possible,
00:52alyssathough maybe it's sandboxed and just has a WebKit exception that's used in those exploit chains..
01:11yuyichao has joined #asahi-gpu
01:19yuyichao_ has joined #asahi-gpu
01:23yuyichao has quit [Ping timeout: 480 seconds]
02:20chipxxx has quit [Read error: Connection reset by peer]
03:38kov has quit [Quit: Coyote finally caught me]
05:08appleboy711[m] has joined #asahi-gpu
05:10appleboy711[m]I wonder how the M2 GPU reverse engineering is going.
05:44joske has joined #asahi-gpu
06:22SSJGZ has joined #asahi-gpu
06:34bisko has joined #asahi-gpu
06:46bisko has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
07:04joske has quit [Ping timeout: 480 seconds]
09:02jannauyes, no updates since the last stream. demo is working for xdc don't expect updates until after
09:17goldsoultheory has joined #asahi-gpu
09:43chipxxx has joined #asahi-gpu
10:40linaBy the way, we have at least one other user running the crazy it-works branch. I told her to just make a laundry list of what apps are broken, so we can go through it at our leisure as we get to fixing things.
10:45linaThe uAPI needs a full revamp to really support Vulkan, but I guess you should be able to test basic rendering jobs as is? Just keep in mind the Z clipping is hardcoded to OpenGL mode right now...
10:45linahttps://github.com/AsahiLinux/linux/blob/e92bd6fc55c71382d76d8950face426d292e79c1/drivers/gpu/drm/asahi/render.rs#L152
10:46linaElla[m]: Thank you for working on this! Having a Vulkan implementation (even if incomplete) is going to be super useful to make sure we don't mess up the real uAPI design ^^
10:50Sobek[m]Is the uapi of the GPU drivers covered by the stability guarantees in linux releases? Is introducing a new uapi version associated with a newer and better driver for the same hardware, with coordinated changes in mesa, something that happens regularly?
10:52linaIt's also why I don't think this driver is going to be upstreamed any time soon, because rushing it makes no sense. I want to see GL 3.1 and OpenCL and at least some Vulkan running before we even attempt it.
10:53linaI had a long discussion with jekstrand and alyssa about uAPI design, so I have a good plan I think... but I really want to see it proven before we jump to upstreaming!
10:56linaFor now, the first step is to just move into the uAPI all the registers that GL actually needs to pass the CTS (and also that GL mode bit). Most of that render command design can carry over to the real uAPI progressively.
10:56linaBut the way the driver does memory management, queue allocation, waiting, and scheduling is going to be completely redesigned for the real uAPI
10:57Ella[m]<lina> "https://github.com/AsahiLinux/..." <- I'll probably just flip it in the kernel when I'm testing next week. I want to try and get some basic WSI stuff working but I shouldn't need OpenGL at all for that.
10:58linaSounds good! It's just Z clip so if it's wrong you'll just get messed up clipping, it won't otherwise break everything. When I tested GL mesa on non-GL mode, I was getting half a cube. Vulkan on GL mode is probably just the opposite, so it'll probably display fine as long as nothing is behind the camera?
11:05skoobasteeve has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
11:06skoobasteeve has joined #asahi-gpu
11:13skoobasteeve has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
11:13skoobasteeve has joined #asahi-gpu
11:26goldsoultheory has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
11:28goldsoultheory has joined #asahi-gpu
12:09joske_ has joined #asahi-gpu
12:13joske_funny but in mate terminal (when running in wayland?) everytime it gets focus, the window shrinks a bit :-D
12:14joske_ has quit []
12:14karolherbstheh... I know there are some funny things going on in gnome where stuff depends on correct rendering, otherwise it just doesn't work...
12:15alyssaon Bifrost it was lack of register spilling that bit me, but AGX has twice as many registers available to a single thread, so that should be ok
12:15karolherbstlike in the past there was screwed up colors for big endian systems and besides just everything having the wrong color, the UI didn't work at all
12:15alyssalot of real control flow in the shaders but we're passing everything relevant in deqp-gles2 so I don't think that's it, the control flow handling we have now is suboptimal but "obviously" correct
12:16karolherbstfamous last works
12:16karolherbst*words
12:16alyssabased on the corruption I saw in the images I'm more inclined to blame a GL driver bug than a compiler one
12:16jannauresizing weston-terminal inside weston behave strangely as well. window border not at the same place at the mouse cursor
12:17danielskarolherbst: mutter used to do window picking by rendering with solid colours and reading back, but not for a while now
12:17karolherbstyeah.. maybe it's fixed now
12:17karolherbstalyssa: well.. try to come up with _good_ reasons why rendering wrong colors makes the UI break like completely :P
12:18karolherbstand with completely I mean: you can't do anything except looking at the screen
12:24alyssahttps://gitlab.freedesktop.org/asahilina/mesa/-/blob/omg-it-works/src/gallium/drivers/asahi/agx_pipe.c#L177
12:24alyssafor debug I would "assert(whandle->offset == 0);" there to see if that's causing any issue
12:26alyssaI don't think it's uncommon, I'd just like to know if that's causing people's problems ;)
12:28alyssahttps://gitlab.freedesktop.org/asahilina/mesa/-/blob/omg-it-works/src/gallium/drivers/asahi/agx_pipe.c#L231
12:30alyssaor maybe "handle->format = rsrc->base.format;" ... would need to think for a bit to figure out whether the difference matters
12:30alyssa(I think no because you can't share depth/stencil targets across process boundaries so we should be ok)
12:30DarkShadow44 has quit [Quit: ZNC - https://znc.in]
12:30DarkShadow44 has joined #asahi-gpu
12:32alyssahttps://gitlab.freedesktop.org/asahilina/mesa/-/blob/omg-it-works/src/gallium/drivers/asahi/agx_pipe.c#L256
12:33alyssahttps://gitlab.freedesktop.org/asahilina/mesa/-/blob/omg-it-works/src/gallium/drivers/asahi/agx_pipe.c#L277
12:36alyssathe first is when WE select the modifier, in which case it's just the logic without the for loop on top
12:36alyssathe second case is when the CLIENT selects the modifier, in which case we have to pick from that set conditional on those allowed checks
12:37alyssahttps://gitlab.freedesktop.org/asahilina/mesa/-/blob/omg-it-works/src/gallium/drivers/asahi/agx_pipe.c#L277
12:39alyssa(DISPLAY_TARGET is mostly for software rasterizers but we can't delete it because reasons, SCANOUT is for buffers shared with the display/dcp, SHARED is for buffers shared across processes like window surfaces, LINEAR is an old hack that won't die)
12:40alyssahttps://gitlab.freedesktop.org/asahilina/mesa/-/blob/omg-it-works/src/gallium/drivers/asahi/agx_pipe.c#L277
12:40alyssathis should only be for DISPLAY_TARGET, it can and will break for SCANOUT and SHARED which can't go through the displaytarget path
12:46alyssathough I don't think that last part will actually matter because winsys will be NULL on linux
13:35linaI don't know what I'm doing with mesa anyway, I just copied and pasted bits of Panfrost code so I'm not surprised it's broken... ^^;;;
13:58karolherbstwhat are those registers GL needs btw? Do you have some other ways of accessing that besides adding ioctls? Or is that mostly in the "context initialization" area?
14:07linaThey'd just be fields in the render struct. It's job data like everything else already there.
14:08linaIt's just that we're still figuring out what fields of the corresponding giant firmware render structures actually need to be exposed to userspace and which don't.
14:08karolherbstmhhh, normally I'd expect that userpace just fills command buffers, sends that to the kernel driver and that's it. But it kind of sounds like that doesn't really exists here?
14:08linaIn this case we've been learning that some of those fields correspond directly to hardware registers (some of them fully or partially match PowerVR registers...), and since that ABI is dictated by hardware and therefore fixed, it's safe to expose to userspace directly.
14:09karolherbstand it's more like filling actual structs with data do describe jobs, is that correct?
14:09linaIn this case the kernel fills command buffers because Apple decided to architect their firmware such that those command buffers have to be trusted.
14:09karolherbstahhh
14:09karolherbstyeah okay, that's.. problematic
14:10linaIt's just that the fixed-sized, job description structures need to be populated by the kernel, partially from userspace data
14:10karolherbstthe hardware I know is more flexible. E.g. on nvidia you can assign "classes" to context which have priviliged access, which the kernel only allows for itself, and userspace can only allocated classes without special priviliges
14:10karolherbstokay
14:10linaSo we make up an arbitrary uABI for that to contain the data we need, and the kernel just copies it over to the firmware structs and fires the job
14:10karolherbstyeah, that's not as terrible as I initially thought then
14:11karolherbstso you can batch multiple render jobs into one submission and the kernel just sanitizes, submits and fence it
14:11karolherbstright.. I meant it more like error checking and filling out proper structs
14:12linaalyssa: There are some things to sanitize (e.g. not exceeding max # of attachments), but it's fairly obvious stuff.
14:12karolherbstlina: one shader invocation
14:12karolherbstlike "draw this shader pipeline"
14:12linaOne job submission to the kernel = one batch of rendering to the same set of render targets
14:12alyssaHow is that different from any other invalid cmdbuf that userspace can prepare and that GPU will fault on
14:12karolherbstokay
14:13alyssalina: "one batch of rendering to the same set of render targets" is called a render pass :)
14:13linaalyssa: The kernel needs to copy the attachment list over for one, but I also don't think the firmware will appreciate the count being > the list size
14:13karolherbstso as long things stay simple it's fine, but if games switch the render targets often it's bad
14:13karolherbstthough usually command buffers get that huge that flushing is a must anyway
14:13alyssalina: Yeah, that's fair ... I guess supplying bad data to firmware is different than supplying bad data to hardware
14:14karolherbstat least for GL that's easy to solve
14:14karolherbstfor vulkan.... it's super annoying
14:14karolherbstyou will have to workaround that limit
14:14karolherbstattachment lists
14:14karolherbstyeah.. it's not special, but vulkan allows application to construct cmd buffers directly
14:15karolherbstand submit them explicitly
14:15goldsoultheory has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
14:15karolherbstso you have ot make sure the kernel accepts all of them
14:15karolherbsteither you split it up or something else
14:15karolherbstright
14:15goldsoultheory has joined #asahi-gpu
14:15karolherbstwell... depends
14:15karolherbstnvidia doesn't because it's all done in the command buffer
14:16karolherbstswitching render targets is just a command
14:16karolherbstwe do have more virtual limits, like the amount of bos allowed to use in a submission, but that's pretty much it
14:16goldsoultheory has quit []
14:16karolherbstright.. hardware limitations exist and those are usually exposed in vulkan as limits
14:17linaYou can do as many render passes to as many separate sets of render targets as you want in AGX, each one just has to be a separate job submission
14:17karolherbstyeah... just means that you will have to do multiple submissions when submitting a vulkan cmd buffer
14:18karolherbstand make sure each batch is correct while recording
14:18karolherbstyeah
14:18linaI mean you need to make sure everything submitted is correct anyway, you wouldn't want to feed the kernel something it rejects at any point
14:18karolherbstI just never had to deal with those problems myself :D
14:18karolherbstwe don't have that in nvidia
14:19linaYeah but I'm sure you have hardware limits that cannot be exceeded for correct output, right?
14:19karolherbstthe only reason the kernel rejects is if the context crashes or we run out of memory
14:19karolherbstthere is no metadata attached when doing submissions
14:19karolherbstit's literally just memory
14:19karolherbstbut yes, we have to make sure in userspace to not cause the context to crash, but that's something the kernel isn't involved with
14:20linaBut the command buffers themselves are going to be full of fields telling the hardware what to do... what's the difference between the kernel rejecting your command buffer and the hardware bugging out? Both indicate the driver did the wrong thing and allowed something to go through that isn't allowed.
14:21karolherbstright, not saying they are fundamentally different, just some hardware doens't need anything to be configured on the kernel side for things to run
14:21karolherbstnvidia does all of its submission in userspace even
14:21linaI'm just saying this isn't a big deal in the grand scheme of things, as far as hardware differences go
14:21karolherbstat least for vulkan and compute
14:22karolherbstyeah.. probably
14:22goldsoultheory has joined #asahi-gpu
14:22alyssayes, NVIDIA's hardware is the most perfect thing in the universe, everything else pales in comparison, we all know, jekstrand won't stop talking about it :-p
14:22karolherbstdid he
14:24karolherbstthough my hope is to get to know more about other hardware with my CL work
14:25alyssaalthough it's unique in how much it does on the shader cores and how little fixed function hardware it has
14:25karolherbstyeah.. I've heard
14:25karolherbstprobably makes sense to some degree being more flexible here as you know input/outputs are just memory anyway
14:26karolherbstthough implementing geometry shaders sounds like pain on agx?
14:26karolherbstuhhh
14:27karolherbstI don't think I ever heard anybody at Intel saying that even
14:27karolherbstbut I also never talked to actual hw engineers at Intel
14:27karolherbstat least modern intel GPUs are all scalar, finally
14:27lina(That was a joke, click the link. That's my favorite WTF hardware graphics bug I saw while looking at GPU drivers.)
14:28karolherbstlina: usually by hw engineers getting too nifty
14:29karolherbstthere is probably some good reason behind it once you hear the reason, but a totaly mystery for anybody else
14:29karolherbstlina: yeah.. until you hear the reason
14:30karolherbstit is
14:30DarkShadow44 has quit [Quit: ZNC - https://znc.in]
14:30DarkShadow44 has joined #asahi-gpu
14:30karolherbstauto vectorization is a religion at intel
14:31karolherbstthat's the reason they got vectorized ISAs for that long
14:31karolherbstsome ditched them 15 years ago
14:31karolherbstnot sure when intel went full scalar though.. gfx9?
14:32karolherbstoh sure.. for memory
14:32karolherbstbut intel went this insane way where compute and something was scalar, but the other stages vectorized
14:32karolherbstit's really idiotic
14:32karolherbstalyssa: yeah.. very good thread
14:33karolherbstthere is even this joke story about intel engineers trying to beat cuda by using auto vectorization
14:33alyssa"Intel's [GPU ISA] is basically designed to keep CS PhD compiler engineers entertained solving unnecessarily hard problems"
14:33karolherbstand asked "how did nvidia solved this issue" - "they didn't, they don't use vectors" - "sure, but how did they solve auto vectorization?"
14:34karolherbstfun read
14:34karolherbstthat's also one reason why CL is so inherently bad most of the times
14:35karolherbstpeople don't write scalar applications, they make have use of vectors and it sucks
14:35karolherbstanyway, that blog post sums it all up nicely
14:41karolherbstwhat's that about broadcom?
14:42karolherbstanyway.. hw design matters for writing good driver impls, and some care less than others
14:49alyssa[Apparently "hey sis, I want, not a sound out of you" ... less dramatic than the Spanish :p]
14:50bisko has joined #asahi-gpu
14:50* karolherbstgoes into panic mode because flight preparations
14:51karolherbstI had the smart idea of taking a flight at 6 am
14:54karolherbstyeah... so my plan was to try to stay awak over the night and sleep on my flight to the US
14:54karolherbstoh well...
14:54karolherbstlet's see how that all goes
15:03Ella[m]yes, I've made some notes on what order I want to do things in and I've already integrated the new state tracking stuff
15:03alyssaand possibly also pure dynamic rendering with common render pass emulation, but we're still trying to figure out if that can be made to work efficiently with tilers
15:05alyssaThe trouble is that you leave a lot of perf on the table for renderpasses with multiple subpasses
15:08karolherbstis metal really that great/terrible how people say?
15:09karolherbstcompared to GL or vulkan?
15:09alyssaI figured out most of the details in August but haven't had time to update Mesa with the knowledge yet.
15:10karolherbstmaybe I should try to use metal once and then I have data and can decide to hate or love it or something
15:11karolherbstdoes something like helper invocations even exist?
15:11alyssa1. 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.
15:12alyssa2. local pixel load. The above in reverse. This is how we can load the "tilebuffer" to implement blending.
15:14alyssaThis takes in an image descriptor (usually loaded into a texture state register with BIND_TEXTURE)
15:14alyssaIt 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.
15:15alyssaThat is a fragment-like shader that runs once per tile, rather than once per pixel, after all regular fragment shading is done.
15:16alyssaFor 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.
15:17alyssawith a shader that contains N block copy instructions, each specifying the format and location of the render target in the tilebuffer
15:18chipxxx has quit [Read error: Connection reset by peer]
15:18alyssa(I expect those formats need not match exactly but they must be compatible for the results to make sense.)
15:19alyssaFor 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.
15:19alyssa(For loads, the driver will again bind N texture state registers with texture descriptors mapping the render target's existing contents)
15:21alyssaBefore and after each subpass, there is a fixed layout of the tilebuffer: mappings of colour attachments to offsets and tilebuffer formats.
15:21alyssaFragment shaders are keyed to the layout before and after, determining how input attachments are read and colour is written respectively.
15:22alyssaThis can all be done with render passes, but it doesn't really map in a totally clean way.
15:23alyssaDraws where input attachments are lowered to "tilebuffer load" and outputs are lowered to "tilebuffer store", keyed to the explicit tilebuffer layouts
15:23alyssaSo 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
15:25alyssaMy 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)
15:33karolherbstI am actually wondering if we'll see more hardware like that even in the discrete space, where stages will be more like that
15:35MatrixTravelerbot[m]1 has quit []
15:47alyssakarolherbst: The conceptual block diagram is the same as Mali, the hardware is just a lot less opinionated.
15:51karolherbstalyssa: sure.. but I could also imagine that nvidia or AMD are more aggressive about killing of stages, but maybe they are simply less concerned about space and keep their stuff. At least for nvidia I know that they already just use L1 or L2 cache for all those stage special memory things
16:45karolherbstit's fun, isn't it?
16:51linaAlso it seems so obvious in retrospect, shaders for CPUs... why wasn't that a thing before?
16:51karolherbstthough I am not sure myself if I read the full thing, might have stopped somewhere in the middle. The first part is in itself already a good story about intel here :D
16:52karolherbstthe main problem is, that for different problems you have to use different mindeset. Normal code written for C doesn't optimize well, and normal C devs never had to think much about data paralization and all of that
16:52alyssalina: 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 :)
16:52karolherbstif you can use avx/sse all the way, it can be super fast, but normal code doesn't give you that
16:52karolherbstand never will
16:52karolherbstyeah...
16:52karolherbstcoporate culture is more important than "technical reasoning" for most things
16:53karolherbstor well.. the more relevant reason why things turned out how they did
16:56karolherbstnot even wanting to say that it's a bad thing, because most of the time "technical points" are just mindsets/culture put into something abstract and ticked of with a "yep, that's how it must be"
16:57karolherbstin the end what works decides what's the best thing, not some abstract reasoning
17:02karolherbstuhhh that "On jerks and institutional acceptance of them" part reminds me of some...
17:12karolherbstI am now actually wondering what would happen if we mixed llvmpipe with ispc...
17:12karolherbstthough llvmpipe is already doing similar things
17:13karolherbstbut also not sure how much it embraces AVX
17:31compassion4 has joined #asahi-gpu
17:36compassion has quit [Ping timeout: 480 seconds]
17:36compassion4 is now known as compassion
18:08karolherbstyeah .. for most part
18:08karolherbstfunny thing is though, that pocl is roughly 10x as fast as llvmpipe in luxmark
18:10karolherbstbut I am also not super concerned about llvmpipe with CL, because it's easy to just use pocl
18:31goldsoultheory has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
18:32goldsoultheory has joined #asahi-gpu
18:33goldsoultheory has quit []
19:05joske has joined #asahi-gpu
19:06joskesome observations from running Lina's GPU driver on M1 MBA 16GB: doesn't boot reliably, seems I *need* to edit the kernel command line in grub, or it won't boot, and it seems that loglevel must be set to 8
19:08joskeonce booted, wifi doesn't work: complains about some crypto things missing in the kernel while they ARE available: https://paste.debian.net/1255756/
19:09joskewhen running GNOME in wayland, function keys are not working (can not change volume etc), while I'm pretty sure that worked before in GNOME wayland
19:10goldsoultheory has joined #asahi-gpu
19:16joske has quit [Quit: Leaving]
19:16yuyichao_ has quit [Read error: Connection reset by peer]
19:18joske has joined #asahi-gpu
19:19yuyichao_ has joined #asahi-gpu
19:22joske has quit []
20:01RowanG[m] has quit [Quit: Client limit exceeded: 20000]
20:02joske has joined #asahi-gpu
20:03joskekernel misconfiguration is possible of course (it's an old config I used when I was still using 4k kernel)
20:03joske has quit []
20:08joske has joined #asahi-gpu
20:09alyssai'm not a kernel dev [dubious - discuss], not sure I can help other than ask questions about stuff I've screwed up in the past :D
20:09karolherbstis it fixed after loading the modules?
20:10karolherbstsure, but also the crypto stuff?
20:10karolherbstwell... but why does it complain then?
20:10karolherbstsure all of those symbols are actually there?
20:11karolherbstuhm.. configs
20:11karolherbsteither in your .config or the one getting installed to /boot/
20:11karolherbstI am sure iwd just checks the config
20:12sveni don’t der how enabling the gpu driver could break any of that tbh. Maybe the debug part due to sone timing but the rest very much sounds like config issues
20:12karolherbstI am not entirely sure _how_ iwd checks it.. maybe you have to make sure to also install the config or something
20:12karolherbstmaybe iwd checks against =m
20:13karolherbstthat could be it
20:13karolherbstnormally the rule is: initramfs or no support
20:14karolherbstand that network stuff is usually built around the fact that you have an initramfs
20:14karolherbstif you leave this assumption you are generally on your own and I advise you to use an initramfs
20:14joskeI was not aware of that rule ;-). And as I said it had always worked without (been using my own kernel with sven's 4k patch for many months)
20:14karolherbstsure.. and something might have changed
20:15karolherbstmaybe a config of those got disabled by accident or...
20:16karolherbstthe annoying part is that loading order kind of matters... might be simpler to start with a stock config taken from somewhere
20:16karolherbstbuild and install from that to make sure it boots and loads network sucessfully
20:17karolherbstand then only make very very very small changes and go another test
20:18karolherbstright.. but that shouldn't be a problem if you only keep the old config.. probably
20:24goldsoultheory has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
20:26joskebuilding using config from https://github.com/AsahiLinux/PKGBUILDs/blob/main/linux-asahi/config
20:31goldsoultheory has joined #asahi-gpu
20:33karolherbstI think I am 🤏 so close of getting an M1 apple macbook myself...
20:34joskekarolherbst: you won't regret it, even without the GPU driver, the machine is very usable in linux
20:35karolherbstI am the kind of person who'd just go with the m2 ultra straight away
20:35karolherbstyeah...
20:36karolherbstjo... I mean.. the ultra is already expensive enough at it is
20:36karolherbstahh it's m1 max actually
20:36karolherbstthose marketing people
20:36karolherbsts/the//
20:36Ella[m]I wrote a script to regularly scrape second hand sites until i could find something I could afford
20:36joskeI have an M1 max MBP for work, I installed asahi on it for a few hours (not allowed in fact), it flies
20:37karolherbstshould have called it SS M1 SS2 M1....
20:37karolherbstis the M2 equal to the M1 for the bits which matter btw?
20:38karolherbstthough I don't think I need the GPU power, because what usually happens is, that once nvidia release new GPUs, I get them anyway
20:38svenit had some new hardware and changed a few things around. Don’t think anyone looked at the gpu in detail yet afaik
20:39karolherbstk.. atm I am looking at the 14-inch one... 16 might be a tad too big.. dunno
20:39karolherbstoh well...
20:40karolherbstehhh
20:40karolherbstis that really a limitation though?
20:40karolherbstI had an argument on the dri-devel mailing list with somebody who wanted to always use the discrete GPU for external ports (there are laptops where you can one time flip to the discrete one) so they can plug in 4 displays instead of 3.... and I was like:: seriuosly?
20:41karolherbstand make it the default for all laptops with such a flip
20:41joske has quit [Remote host closed the connection]
20:41karolherbstahh...
20:41karolherbstunless apple messed up the hw, it should be possible... hopefully
20:42karolherbstcould also be hardcoded in their firmware
20:42svenyeah, I have an idea how to hack it. They do support two separate DP streams for tiled displays
20:42karolherbstI also only use one, but my intel GPU is already busy with two 4k screens... :D
20:42svennow the only questions remaining is if the Display controller firmware will hate me for that
20:42karolherbstit probably will
20:43karolherbstquestion is: does it matter?
20:43karolherbstand is the firmware signed?
20:43karolherbstmhhh
20:43goldsoultheory has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
20:43karolherbstsooo.. there might be a way to get around signed firmware, which... ehh I know because of reasons
20:43karolherbstnot sure if that would work on apple hardware though
20:44karolherbstit also depends on how they verify the signature
20:44karolherbstand how the secret is stored
20:44karolherbstbut yeah.... it's pointless if one needs to do heavy changes to the firmware
20:44karolherbstsure
20:45karolherbstnvidia did the same, but people still managed to find a way to leak the signature keys
20:45karolherbsthw isn't perfect
20:45karolherbstuhhh...
20:45karolherbstI suspect apple has a bit more experience with making sure it's secure than nvidia does
20:46karolherbstnintendo wasn't amused
20:49karolherbstyeah... but it's better to make a decision once it's known what the limitations are and if one could simply binary patch something... though even that is very annoying
20:49jannautwo (mostly) identical displays is probably too much of an limitation but it should be possible to build a thunderbolt/usb4 dock which emulates a tiles display
20:50svenand I’m specifically working on this hw because I don’t have to write or rely on exploits ;)
20:51goldsoultheory has joined #asahi-gpu
20:52jannauno matter how large you write that only works with 2 identical displays you will be swamped with support requests
20:54alyssaMainly I don't understand why they have the DCP architecture at all on anything other than the watches
20:56karolherbstwait.. so tiled displays work?
20:56karolherbstany max resolution there?
20:57karolherbstheh...
20:57karolherbstokay so... tiled displays are just two displays
20:57jannauwe suspect that the m1 ultra supports 6 6k displays instead of just 4 like claimed by apple
20:57karolherbstI mean like literally two displays
20:58karolherbstDP has a flag in the edid to mark them as such, so the OS can properly deal with that
20:58svenyup, which why I hope that I can hack that to support two actually separate displays on two ports
20:59karolherbstyeah... that should be possible.. worst case you just modify the edid the firmware sees.. but dunno how that's all wired up on the hardware
21:01karolherbstso TB usually has twice the amount of bandwith than DP, so requiring TB for 6k might even make sense
21:01karolherbstthere is also this lane assignment business going on
21:01karolherbstand one could argue that you don't want to waste all 4 lanes on Displayport
21:10karolherbsthow are crossbar related to that anyway?
21:35* karolherbstshould stop trolling trolls on phoronix
21:36SSJ_GZ has joined #asahi-gpu
21:37SSJGZ has quit [Remote host closed the connection]
21:38karolherbstit gets better
21:39* karolherbstnever used go
21:39alyssaI don't write the sort of software that Go shines at, but I really liked what I saw when I was playing with it
21:40karolherbstbut seems like go isn't such a controversial topic, so it's easier to engage on those "anti rust" folks
21:40karolherbstyou mean like "?"?
21:42karolherbstbut I am actually interested about all those fake arguments people pull out just to say why Rust doesn't belong into anything or something
21:42karolherbstmy favourit is still "it shouldn't have a stdlib"
21:43karolherbstI still have ~3 hours until I have to leave
21:44karolherbstalyssa: I already said that package management is an important key feature of rust :D
21:44karolherbstbut sure.. I could say that pulling in serde would be cool
21:44karolherbstbecause it's still experimental?
21:44karolherbstrust does have this formal "get shit into stdlib" process
21:44karolherbstand crates are used to toy around first
21:44karolherbstthere are other things pulled from crates into stdlib all the time
21:45karolherbstnum_integer e.g. has some nice things
21:45karolherbsthttps://docs.rs/num-integer/latest/num_integer/trait.Integer.html#method.next_multiple_of vs https://doc.rust-lang.org/std/primitive.u32.html#method.next_multiple_of
21:46dottedmagalyssa: w.r.t. things Go shines at: I'm doing a Wayland compositor in Go for fun (under macOS four double-fun), and it still kinda-shines.
21:46SSJ_GZ has quit [Ping timeout: 480 seconds]
21:46karolherbstas long as more and more things are getting pulled into stdlib we might not even need crates long term in mesa
21:46karolherbstthough not having serde would be a big downside :(
21:48karolherbstit's kind of sad though how those "software purist" always think the entire world is bad and they are the only one who really get it
21:50i509VCBI am kind of on the train of "the standard library is where libraries go to die". You need to be very selective of what goes in.
21:50karolherbstsure and I think the rust community is very very selective on that
21:51alyssakarolherbst: what about those who think the entire world is bad and nobody gets it including them? :P
21:51i509VCBwhy would mesa need to depend on serde specifically? I'm guessing there is some need somewhere to manage json or xml?
21:51karolherbstshader caching
21:52karolherbstnah, it's more about metadata
21:52karolherbstI have a few structs I have to serialize
21:52karolherbstand atm I handroll the code
21:52karolherbstbut come on.. why do I have to hand roll serializeing enums and stuff
21:53karolherbsthttps://gitlab.freedesktop.org/mesa/mesa/-/blob/main/src/gallium/frontends/rusticl/core/kernel.rs#L152
21:53karolherbstyeah.. but I only need it for trivial enough things
21:54karolherbstit's not a biggy, but that's one place where e.g. using serde would make sense
21:54karolherbsteven though it's doing much more than we actually need
21:54karolherbstdon't even need a special format.. a plain binary dump is enough
21:55karolherbstmaybe serde is actually too big for that
21:56karolherbstyeah... though we have a little trick: shader caches are only valid for the same mesa binary
21:56karolherbstif you got a new version, the cache is invalid
21:56karolherbstso what I really need is just an easy way to map between data types and [u8]
21:58karolherbstbut I also use that in some other places, like https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/src/gallium/frontends/rusticl/mesa/compiler/clc/spirv.rs#L370
21:58karolherbstmostly that enum to int mapping is annoying, though I could just unsafe it I think?
22:00yrlf has quit [Quit: The Lounge - https://thelounge.chat]
22:00yrlf has joined #asahi-gpu
22:04i509VCBI'd think TryFrom implementation that returns an Err given an invalid value would make more sense
22:06i509VCBOr something like this: https://gist.github.com/i509VCB/d0ffc8ad1f061a220b60b1ef24af63a0
22:06karolherbstwell.. returning an Error doesn't help with anything though
22:06karolherbstbecause the fallback is to just compile the source regardless
22:07karolherbstbut yeah.. maybe repr(C) would help
22:07karolherbstmhhh
22:07karolherbstalready having enough unsafe blocks :D
22:08karolherbstthough I am sure that the 1st place of unsafe \ loc goes to the stdlib
22:08karolherbsti509VCB: my point was more, that I don't want to have to write the code for it :)
22:08karolherbstbecause when it gets changed, the code needs got get updated
22:08karolherbstheh...
22:09karolherbstI think there are also crates making that int <-> enum conversion less painful
22:10karolherbstbut then I also want to just declare a type to get derived serialize/deserialize methods
22:11M152ari[m] has joined #asahi-gpu
22:11i509VCBsure I get don't want more ticking timebombs that explode when you forget to update little things.
22:11karolherbstI think this was the one I found way earlier: https://docs.rs/int-enum/latest/int_enum/trait.IntEnum.html
22:13karolherbstor it's the first crate to be "done"
22:14karolherbstor maybe it's part of serde now
22:14karolherbstit does seem to use serde It hink...
22:14karolherbstahh yes
22:14karolherbstbut not sure if serde supports that out of the box now
22:15karolherbstbut looking at bindgen I think rust really needs to improve handling of "int enums", to make interacting with C code less painfull
22:17karolherbsti509VCB: yeah, and then 4 other enum types
22:17i509VCBAlthough bitflags are a bit out of it: https://docs.rs/bindgen/0.60.1/bindgen/struct.Builder.html#method.rustified_enum
22:17karolherbstyeah...
22:17karolherbstall those enum types have pro and cons
22:17karolherbstI think I use all of them in mesa...
22:17i509VCBYou can mark it as a bitfield enum, but you have to name all the types... https://docs.rs/bindgen/0.60.1/bindgen/struct.Builder.html#method.bitfield_enum
22:17karolherbstI know :)
22:18karolherbststill.. they are annoying to use
22:18karolherbstcould be worse though
22:33goldsoultheory has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
22:42bluetail4 has joined #asahi-gpu
22:42bluetail has quit [Ping timeout: 480 seconds]
22:42bluetail4 is now known as bluetail
23:16laintree has quit [Remote host closed the connection]
23:20lain has joined #asahi-gpu
23:56juleeandres[m] has joined #asahi-gpu