01:06DemiMarie: Could the needed driver support for virtio-GPU native contexts be standardized as a Vulkan extension?
01:07DemiMarie: I’m thinking as a VK_EXT_command_serialization extension.
03:17jenatali: karolherbst: ack. I've briefly thought about it a long time ago so I'm happy to talk through it if you want (when I'm actually around anyway)
03:18jenatali: zmike: eric_engestrom: +1
10:05Ermine: Hello, I'm trying to build mesa main, and I've got this error message: https://paste.sr.ht/~ermine/9ea0dd89b6db21f85fe8049b43da7fca79293ba0
10:12dj-death: Ermine: could you file an issue with the meson arguments you're using?
10:12dj-death: Ermine: looks like a meson dependency missing
10:13mripard: jani: thanks for the DRM_DW_HDMI review, I'll merge it today so we can have plenty of testing time
10:13jani: mripard: not really detailed review, but I did eyeball it through and didn't see anything obviously wrong
10:28karolherbst: jenatali: yeah.. I think atm I don't really know _how_ I want this to look like. I've pushed a new version where I added a `spirv_create_prog_var_init_shader` function so we can do something differently there.
10:28karolherbst: and my initial idea was to simply construct a shader from the constants instead
10:29karolherbst: the use of the global variables is all done and I have tests passing as long as you don't have a ptrAccessChain in the specconstantop
10:29karolherbst: the difficult part is just silling that value...
10:29karolherbst: _but_
10:29karolherbst: we could also just say: fuck caching it, just pass the address when compiling
10:30karolherbst: and the buffers location is just an input to the compilation
10:30karolherbst: _but_
10:30karolherbst: that also requires having a layout for the data, becaue ptrAccessChain...
10:34karolherbst: so I kinda think building a shader by having a custom `vtn_handle_constant` is probably the way to go...
10:34karolherbst: and if this shader remains empty because there is no ptrAccessChain you can just throw it away and use the initializer to init the buffer without running a kenrel
10:34karolherbst: and if there are instructions you just run the code
11:09pq: emersion, sima, did anyone end up officially documenting that 'stride' is well defined also beyond LINEAR modifier formats? I'd like to link to such doc.
11:09emersion: yes
11:09emersion: hm
11:10sima: I think we accidentally burried into some kernel internal api
11:10pq: you probably guess what weston issue+MR I'm replying to :-p
11:10emersion: https://www.kernel.org/doc/html/next/userspace-api/dma-buf-alloc-exchange.html#term-stride
11:10pq: thanks!
11:10sima: unfortunately it has this "usually" qualifier in there :-/
11:11emersion: maybe it's not precise enough
11:11emersion: yeah…
11:11sima: I thought we've had a sharper one somewhere
11:11emersion: same…
11:18pq: uhh, yeah, it seems to totally miss the wording "divided by tile height" for tile-row to tile-row number of bytes
11:20sima: rm_format_info_min_pitch is probably the most authoritative source for anything that's block-based
11:20sima: *drm_format_info_min_pitch
11:20sima: but it's not documented anywhere I could find it :-/
11:21sima: so maybe should add that
12:20karolherbst: cursed: "decl_var global INTERP_MODE_NONE none uint64_t p_var = &a_var"
12:22karolherbst: though that makes me think...
12:22karolherbst: do we want to allow deref chains on variable initializers?
12:23karolherbst: the indicies would be all constant
12:24jenatali: karolherbst: for constants, why do you need an init shader? You're going to allocate a buffer for the globals, why can't you just parse out the data that needs to be uploaded to the buffer from the host side?
12:24karolherbst: jenatali: because ptrAccessChain is legal as a specconstantop
12:24jenatali: I guess for pointers they'd need to be relative to the buffer base address but that still seems resolvable on the host side
12:24karolherbst: how?
12:24karolherbst: it can do any math on the pointer
12:25jenatali: Oh, math, I see...
12:25karolherbst: yeah.. it's the normal specconstantop and you could cast the address to an int and...
12:25karolherbst: normal pointer math :)
12:25karolherbst: so yeah.. without that detail it's all trivial and already working
12:26karolherbst: what I've seen some compilers doing is to just place it at a fixed address
12:26karolherbst: in the C world I mean..
12:26karolherbst: I think gcc was like that?
12:27jenatali: CLOn12 would probably do that honestly, since our pointers are emulated anyway
12:27karolherbst: but we could also just always allocate a big enough buffer (as there is a CL limit for the max size) and just use the buffers address..
12:27karolherbst: but that's wasteful
12:27jenatali: What's the size got to do with it?
12:27karolherbst: mhhh.. yeah.. but I can't really add an ABI like that I think? some drivers like iris could handle it, but not sure about zink and others
12:28karolherbst: jenatali: If I want to know the buffers address at compile time, I need to allocate the memory before compiling
12:28karolherbst: that would also solve the issue, just has the drawback of allocating early
12:28jenatali: Oh I see it's because the spec constant stuff compiles out in nir instead of being preserved
12:28karolherbst: yeah...
12:29karolherbst: vtn just resolves the entire constant and you get the final result
12:29karolherbst: we need to support initializer/finalizer kernels anyway, so the runtime needs to be able to do that anyway
12:30karolherbst: so I think spilling the chain if there is a pointer isn't that worst idea here...
12:30jenatali: Could you add a way to not do that for addresses, so you can parse out a "load base address" + offset expression?
12:30karolherbst: I was considering this, but the expression could become very complex
12:30jenatali: But yeah putting it in an init shader also makes sense
12:30karolherbst: at which point you could just have a shader doing it...
12:31pq: sima, I guess it's your turn to argue about 'stride' in https://gitlab.freedesktop.org/wayland/weston/-/issues/896
12:31jenatali: True, could do pointer math to get a difference, at which point it's no longer a trivial single offset
12:31karolherbst: and because init shaders need to be supported anyway there isn't much to win
12:31jenatali: Ok I'm sold
12:31karolherbst: writing the code is just annoying :D
12:31karolherbst: but I think I'm almost there
12:32jenatali: Cool
12:33karolherbst: the issue is just that the CTS tests with a single `= &var;` thing, so I'll need to test with more complex expressions later
12:49sima: pq, typed up something ... I kinda don't why we need to have an even more random definition of stride
12:49sima: at least for the upstream stack
12:50pq: thanks
12:51sima: "some drivers are still crap at input validation" is really not a good reason
12:51sima: and there's a very unfortunate design issue why we can't do this check in generic code, drivers can overwrite the format_info stuff
12:51sima: we'd need to lift a pretty big chunk of the format validation from drivers to drm core to change that
12:52sima: plus there's the entire "guess the format_info for the implied modifier case"
12:53DemiMarie: sima: You can probably guess what I think about moving input validation to generic code 🙂. (I like it.)
12:54sima: we're trying ...
12:55sima: but with a hundred or so kms drivers every tiny move becomes an entire internship project real fast unfortunately
14:01alyssa: mareko: Arm's ISA is really sane here?
14:03eric_engestrom: zmike, jenatali: you're welcome, and thank you for showing your appreciation... but also: what are you saying thanks to? 😅
14:03eric_engestrom: from the timing of your message, I'm guessing the mesa releases?
14:04jenatali: That's my assumption what Mike was going for. That's what mine was at least
14:04eric_engestrom: :)
14:04eric_engestrom: ❤️
14:05zmike: mesa releases 👍
14:07pq: emersion, sima, maybe you were thinking of https://gitlab.freedesktop.org/pq/color-and-hdr/-/blob/main/doc/glossary.md#stride ? That's hardly authoritative for the kernel though. :-)
14:16sima: pq, yeah I tried to sign up emersion to type up a really crisp one but I guess I failed :-)
14:17emersion: lol
14:25sima: anyway I'll disappear for easter ...
14:42zmike: anyone remember which desktop GL version/ext added linear float filtering?
14:46DemiMarie: sima: hundred? Wow! Why are there so many more KMS drivers? Bad vendors that won’t open source their userspace and so their DRM driver gets NACKd?
14:46linkmauve: zmike, GL 3.0, with GL_EXT_framebuffer_sRGB, IIRC.
14:46zmike: nice, thanks
14:46linkmauve: Not sure about GLES though.
14:46zmike: ES has an extension for it
14:48pinchartl: zmike: sounds like "there's an app for that" :-)
14:48zmike: yep
14:53zmike: anyone remember which desktop GL version/ext added BGRA8? or was that always core functionality
14:54mareko: some GL 1.x
14:54zmike: that's what I thought...
14:54zmike: wew these tests.
14:55mareko: GL 1.2
14:55pq: DemiMarie, you can see 65 sub-directories under driver/gpu/drm. Why wouldn't they be separate drivers?
14:56pq: DemiMarie, successful upstreaming increases the number of upstream KMS drivers.
14:58DemiMarie: pq: I thought each upstreamed DRM driver had to have a counterpart in Mesa, and that Mesa had far fewer drivers than that.
14:59pq: KMS drivers don't have matching Mesa drivers at all
14:59pq: I mean, KMS-only drivers
14:59DemiMarie: pq: I am trying to understand why the fraction of KMS-only drivers is so high.
15:00pq: lots of different display chips from lots of vendors?
15:01pq: not just physical chips, but logical chips that manufacturers can embed in SoC
15:02mripard: and it's much easier to design as well
15:02mripard: so vendors will typically use their own display controllers together with an off-the shelf GPU from a handful of vendors
15:11mareko: alyssa: I don't really know ;)
15:40alyssa: mareko: recent mali is legitimately nice hw
15:40alyssa: it's just universally glued to garbage SoCs with little memory bw
16:55DemiMarie: Are Google’s Tensor cores garbage?
16:55DemiMarie: *Tensor SoCs
16:56dwfreed: DemiMarie: as I understand it, they're mostly Samsung Exynos SoCs plus an NPU core
16:57DemiMarie: dwfreed: are those any good?
16:57pac85: I always wondered, in those ISAs that pick the lowest PC as a scalar PC when diverging and masking threads based on vector pc==scalar pc like adreno, what is the advantage compared to the AMD or the AGX approach? On nvidia the HW actually runs branches concurrently but when it's still masking one branch at a time how is the extra complexity justified?
16:57dwfreed: They're not amazing (certainly no Snapdragon), but they're not awful, either
16:57dwfreed: I have a Pixel 6 Pro and it works fine
16:58zmike: mareko: how do I make glthread sync for a function?
16:58zmike: like GetError does
17:06zmike: punted to ticket
17:13alyssa: cwabbott: wow @ your latest MR!
17:13alyssa: amazing
17:15HdkR: Congrats! More drivers with ray queries!
17:26pac85: Amazing work!
17:34jenatali: \o/
17:34jenatali:really needs to add that to the DXIL backend at some point
17:41cwabbott: thanks! although in the end it was just a looot of copying stuff from radv and hacking it until I figured out what it actually did
17:42glehmann: adreno living up to its name
17:43mareko: zmike: marshal="sync" in the xml
17:49zmike: thx
20:27karolherbst: jenatali: finally getting somehwere: https://gist.githubusercontent.com/karolherbst/48ece00b242619e82eadf95ce26f6486/raw/8dc6dbabf8932dcb73b5fde837412c8abf002970/gistfile1.txt
20:28jenatali: Very cool
20:28karolherbst: it's all very hacky, but I'm slowly getting an idea how to implement all of this :D
20:30karolherbst: mhh.. I also need to figure out how to launch internel kernels, because I don't do anything of that yet...
20:42karolherbst: I wonder if I want to do a CL meta thing...
20:53HdkR: karolherbst: You want to do a CL meta thing.
20:53karolherbst: I actually don't
20:54karolherbst: though I could restructure things internally a bit to make that trivial to do
20:54HdkR: It sounds like a good idea to me :)
20:55karolherbst: what shader lanugage is the vulkan meta thing using anyway?
21:00HdkR: I must have missed the Vulkan specific meta thing rather than the CLC shenanigans
21:02karolherbst: I need something for running memcpy shaders, but I'd rather not go through the CL API for that, because that's kinda annoying tbh :D
21:07HdkR: I thought that was the point of the clc integration? The shaders end up being CL, but the API is just fancy NIR compute?
21:08HdkR: Sounded like the best case scenario, aside from the whole requiring LLVM bits during compile time :D
21:09karolherbst: sure.. but I need to run internal nir shaders
21:12HdkR: Isn't that basically what asahi uses them for?
21:12karolherbst: no, thye have them written in OpenCL C
21:12karolherbst: which I can't for some use cases
21:12HdkR: Interesing
21:13karolherbst: yeah... I need to spill spirv initialzers to a shader, soo...
21:14HdkR: wha
21:14HdkR: Cursed
21:14karolherbst: yes...
21:14karolherbst: so you can have global variables being pointers and you can initializer them with pointers obviously
21:14karolherbst: and random pointer path
21:15HdkR: This smells a lot like cuda
21:16karolherbst: probably that's where the idea was from..
21:17HdkR: meta cuda compiler time
23:35karolherbst: I think I found a spirv translator bug :'(