00:31agd5f: mareko, gmail not longer delivers anything from gitlab or the mailing lists. AMD is somewhat better, but still seems to miss a lot
01:24zmike: mareko: you mean like loading R8 and converting? probably
01:25zmike: not much point trying when dynamic vertex input exist and the vk driver can just do it better and smarter
03:08mareko: zmike: more like supporting R8G8B8
03:08mareko: zmike: or R8G8B8A8 with 1-byte alignment
03:25jenatali: mareko: if that code ended up in common gallium, I'd use it instead of the CPU emulation in vbuf
04:13mareko: jenatali: as a utility that drivers can use, that's possible
04:14mareko: other than lowering vertex layouts, there is also indexbuf lowering, which could be done with compute shaders
04:17mareko: primitive restart lowering would run slower because it would only run 1 workgroup per index buffer, but everything else can be super parallel, and that would eliminate the perf cost of u_vbuf
04:18jenatali: Yeah that'd be great
04:19jenatali: We really don't want to add 8-bit index buffers to D3D but every now and then we bump into apps that use it and hit the vbuf path. With TC at least doing CPU-side caching it's not too bad but compute would be better
04:21zmike: mareko: vulkan requires stride to be aligned to the size of the format, so RGBA8 would be 4-byte alignment
04:21zmike: there's a pipe cap I added for this because (surprise!) it was added for amd
04:23mareko: jenatali: radeonsi uses a compute shader to lower it on gfx7 (Radeon RX 200) and older, it runs before each draw using 8-bit indices, see si_compute_shorten_ubyte_buffer, it does improve perf even with the barriers around it
04:24jenatali: Yeah, that'd be simple enough to add to our driver I guess. Just hasn't been important enough yet
04:27mareko: zmike: radeonsi doesn't use the CAP anymore, it supports byte-aligned VS inputs by loading each byte with separate loads if necessary, can the same be done is SPIR-V for Vulkan?
04:27mareko: *in
04:32zmike: I meant the vk spec part was added for amd
04:33mareko: zmike: yes but can it be lowered with shader variants?
04:33zmike: R8 or aligned RGBA8 are what you've got
04:34zmike: you can't have RGBA8 byte-strided
04:34zmike: would need an extension for it
04:34mareko: zmike: can you set the format to R8 and then load the 4 bytes from the same VS input?
04:35zmike: uhhh
04:35zmike: I don't think so?
04:35zmike: I'm pretty paged out on this stuff now though so maybe
04:36mareko: zmike: can't you add a relative offset to the VS input load?
04:36mareko: adding that into the Vulkan spec would allow you to lower everything
04:37zmike: most of this is restricted by how amd's compiler works
04:37jenatali: I thought VK allowed component alignment, not format alignment. I might be misremembering though
04:37zmike: it really can't handle anything but the most basic stuff in vertex attrs
04:37jenatali: So R8 byte-aligned would be fine but not R32
04:38zmike: pretty sure it's format alignment, but I'm literally in bed trying to sleep so probably not at the top of my game here lmao
04:38jenatali: We relaxed D3D's rules about this for dzn, but it might've just been that the offset *within* a vertex can be misaligned
04:39jenatali: zmike: get off your phone/laptop and go sleep
04:39zmike: I'm trying
04:39zmike: just not that hard
04:40mareko: zmike: now is the time to start playing a 4X game ;)
19:48evadot: eric_engestrom: thanks for the FreeBSD kcmp merge, I was just wondering today if I should ping some people here to have it reviewed/commited :)
21:39Roadapthy: Wow. 500 people in here? That's great!
21:40Roadapthy: I came in to ask if anybody could give me a working build config for MESA on Ubuntu 23.04. Well, in my case, it's Xubuntu 23.04. I have come very close but there's always some mistake.
21:43Roadapthy: I tried this and it just didn't work:
21:43Roadapthy: meson build --optimization=3 -Ddebug=false -Dc_args="-O3 -march=native" -Dosmesa=true -Dsse2=true -Dvulkan-drivers=amd,swrast,intel -Dglvnd=true -Dplatforms=x11,wayland -Dgallium-omx=disabled -Db_ndebug=false -Dbuild-tests=true -Dtools=drm-shim -Dglx-direct=true -Dgbm=enabled -Ddri3=enabled -Dvideo-codecs=vc1dec,h264dec,h264enc,h265dec,h265enc -Dllvm=enabled -Dgallium-opencl=icd -Dgallium-nine=true -Dgallium-va=enabled
21:47jenatali: "didn't work"?
21:48ccr: that's a lot of options, probably some are superfluous
21:48Roadapthy: Yes, I installed it and games were slower. I also rebooted the system and it couldn't find the graphics driver (some error of that kind)
21:48Roadapthy: That's what I thought too but I tried no options and just going with the default.
21:48ccr: most people do not need osmesa, for example
21:48Roadapthy: Which also did not work.
21:48Roadapthy: ohhh ok.
21:49Roadapthy: Oh, I have an AMD RX 6700 TX and I compiled the latest stable Kernel. Everything works great now but I have never been able to successfully build and install a working MESA.
21:49Roadapthy: I have also successfully build Valve's Proton and it's working great.
21:50Roadapthy: Oh, and in the past I have done the same with SDL2. I typically sneak in -O2 -march=native
21:52kisak: In this situation I'd update to 23.10 since 23.04 went end of life last week, and use the source packages of mesa in kisak-mesa or oibaf as a basis for a local build ... oh wait, I can't use myself as an origin
21:52kisak: (Debian salsa is upstream for me)
22:06Roadapthy: Oh dang! Hello Kisak! Thank you for your hard work! I have used your PPA in the past successfully.
22:07Roadapthy: And I have 23.10 on another partition but 23.10 didn't have as broad support yet so I stuck with 23.04 on my main.
22:07Roadapthy: Kisak, how do you create those wonderful binaries like that? lol I'd love to create one on my system that has been juiced up with some -march=native.
22:12kisak: over here it's https://salsa.debian.org/xorg-team/lib/mesa/-/tree/debian-experimental adapted to what the ubuntu releases want and some minor tweaks. Others do the heavy lifting.
22:15Roadapthy: Oh, I was there and used that before. It's MESA version 24! I almost had that working.
22:16Roadapthy: I didn't mean to download version 24 though. I compiled it, installed, and nearly everything worked but it was slow and after reboot came the dead end.
22:23Roadapthy: So are you saying that I could do "git clone --branch mesa-staging/24.0 https://gitlab.freedesktop.org/mesa/mesa.git mesa24" and just compile using "meson .." and it should work on my system?
22:24Roadapthy: Sorry, correction: " git clone --branch debian-unstable https://salsa.debian.org/xorg-team/lib/mesa.git mesa2.3.5"
22:29Roadapthy: https://pastebin.com/NTTvzGvd
22:40Roadapthy: Because I have an AMD GPU, I always try to remove Intel, Nouveau and whatever else that I can but I don't know if that's making this worse or not.
22:49jenatali: Roadapthy: "games were slower." Like 5%, 50% or 5000% slower?
22:51Roadapthy: Oh, FPS in my games went from 80-120 to like 62-70
22:52Roadapthy: Which I know means I screwed something up.
22:52Company: did you check how Ubuntu compiles their packages?
22:53Roadapthy: I did and that's partially where I got my compile args but the apt-build also failed. It couldn't finish the build.
22:53Roadapthy: However, I was able to grab the information from that whole process.
22:54jenatali: Ok so like 50%. Probably not missing a driver then
22:57Roadapthy: I'm using the source now that Kisak gave me but I think my llvm is the wrong version. I tried 19 but that's probably too new.
22:58kisak: meanwhile I just pushed a security refresh of llvm 15 to the build farm.
22:59kisak: (which is going to be used for my next build)
22:59HdkR: One argument in that list of stuff is messed up. `-Db_ndebug=true` is what that one needs to be
23:00jenatali: Good catch
23:00jenatali: That's likely it
23:01Roadapthy: Ohhhh
23:02HdkR: I hate that NDEBUG variable being inverted. Very counter intuitive
23:02Roadapthy: Well, I'm removing llvm 19 and returning to llvm 15 and I can try `-Db_ndebug=true` for sure.
23:02Roadapthy: I try to remove all debug, symbols, profiling, tracing, everything- I'm not a developer so I can't use that extra information anyway other than to ask AI.
23:03Roadapthy: Hdkr: Thank you for that info and I'll try it.
23:03Roadapthy: Kisak: Thank you for the link and the llvm 15 info.
23:04eric_engestrom: evadot: you're welcome, and thanks for upstreaming the freebsd patches :)
23:04kisak: llvm 15-17 should be normal for most distros right now, I'm stuck on llvm 15 due to other minor complications that is unrelated to your perf concerns.
23:05Roadapthy: Kisak: Ohhh I see. Ok. Thanks. I guess I could try 16 and 17.
23:05Roadapthy: My Linux GPT claims llvm 19 was the problem just now.
23:14Roadapthy: I can confirm that "meson .. --optimization=3 -Ddebug=false -Dc_args="-O3 -march=native" -Db_ndebug=true" does not work on Xubuntu 23.04, Debian MESA 23.3.5, using llvm 15. It builds, but after nothing works.