01:33airlied: agd5f: will do it now
05:02mareko: ACO seems to work very well with radeonsi
07:14airlied: agd5f: backmerged pushed out
07:51mupuf: mareko: great to hear! Any more you want to share?
07:53mupuf: As in, do you mean it is close to being functionally and performance equivalent? Or is it equal, or better? What apps did you use for your testing?
12:23luc: hi, all, recently I do some experiment on aarch64 platform. i replace memcpy[1] with __memcpy_aarch64_simd[2] in _mesa_store_compressed_texsubimage. it turns out that the latter is almost 1x slower than the former. If I understand correctly. what _mesa_store_compressed_texsubimage() does is copying data from ram to vram. I dont know why simd does worse under the circumstance
12:24luc: [1]https://github.com/bminor/glibc/blob/master/sysdeps/aarch64/memcpy.S
12:25luc: [2]https://github.com/ARM-software/optimized-routines/blob/master/string/aarch64/memcpy-advsimd.S
12:25karolherbst: luc: memcpy is already implemented efficiently via simd instructions
12:25karolherbst: glibc chooses what is the fastest given the hw and input
12:26karolherbst: also compilers might replace memcpy by something better as well
12:29luc: compared to ARM-software version, I noticed that glibc just doesn't use SIMD/FP registers,I wonder how they (simd/fp registers) make a difference.
12:29karolherbst: yeah.. but I'd trust them to know what they are doing and apparently they seem to do
12:30karolherbst: but it might be best to check with gdb what actually happens on that memcpy
12:30karolherbst: compilers are free to skip going through libc on any memcpy call, so it might just be that the compiler does something even smarter
12:32karolherbst: and by using something besides memcpy you take that freedom away from compilers
12:42luc: I've checked that with gdb. sure that it is __memcpy_generic in [1] above that is chosen. so i guess what is slow are those instructions such as load/store q0.. 7
12:47karolherbst: luc: out of curiousity, did you try the sve version?
12:50luc: karolherbst: not yet, because my cpu is armv8-a, according to ARM reference, sve is introduced since armv8.2-a
12:51karolherbst: could check in /proc/cpuinfo but yeah.. it's kinda hard to find out when sve was actually introduced
12:54luc: in fact, __ARM_FEATURE_SVE not defined by my compiler
12:59luc: karolherbst: /proc/cpuinfo shows `Features: fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid`
12:59karolherbst: I see
12:59karolherbst: yeah.. then no idea why the generic version is faster, unless there is a good reason for this
13:08luc: karolherbst: thanks a lot
13:12cwabbott: https://github.com/ARM-software/optimized-routines/blob/master/string/aarch64/memcpy-advsimd.S is using the same instructions as __memcpy_generic, because with aarch64 you can assume that you have ASIMD instructions (which is what both use to load/store)
13:12cwabbott: the inner loop even looks very similar
13:12cwabbott: no idea why one would be slower
14:05karolherbst: jenatali: yeah, so I didn't hit any regressions with https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26641
14:06jenatali: karolherbst: Great, let's land it
14:07jenatali: karolherbst: How long does a full CL CTS run take on rusticl?
14:07karolherbst: depends on the kind of the CL CTS run
14:08jenatali: Kind?
14:08karolherbst: or did you mean the run with the official runner and everything?
14:08karolherbst: but also FULL vs EMBEDDED matters
14:08jenatali: Yeah, a full run
14:09MrCooper: karolherbst: heads up, I'm bisecting a rusticl regression since Friday with radeonsi
14:09karolherbst: my last run on zink on radv was ~3 hours apparently
14:09karolherbst: MrCooper: which one?
14:09karolherbst: I wanted to dig into one today myself ...
14:10karolherbst: jenatali: zink only exposes EMBEDDED though, and on iris which does FULL it was like 10 hours?
14:10karolherbst: but that was like a year ago
14:11MrCooper: piglit program@execute@builtin@builtin-float-remquo-1.0.generated & program@execute@builtin@builtin-float-sincos-1.0.generated broke
14:11jenatali: Huh ok. When I did it a few years ago I was seeing closer to like 72. Not sure if I was just slow execution or if it was slow compilation
14:11karolherbst: yeah.. maybe rusticl being heavily threaded helps
14:11karolherbst: though
14:11karolherbst: the CTS built in release mode helps a lot
14:12karolherbst: but yeah... I interface with a `pipe_context` only from a special worker thread, which allows some kind of parallelism
14:12karolherbst: (I should compile programs in parallel though...)
14:13karolherbst: but I have a script which runs like evertyhing in an hour parallized
14:13karolherbst: or under 10 minutes with wimpy and some annoying and irrelevant tests disabled
14:14karolherbst: MrCooper: ahh
14:14karolherbst: MrCooper: on my end I have nextafter, remainder and remquo failing sometimes
14:15karolherbst: but also something with half vstore/vload
14:15karolherbst: I'll look into the vstore/vload stuff first then
14:16MrCooper: ~30 tests fail here ever since I started testing, these were passing until today though
14:16karolherbst: jenatali: maybe something serializes on conversion/math_brute_force on your end? Those tests are already threaded themselves and run on multiple CL queues
14:16karolherbst: and conversions is like 60% of the runtime
14:16karolherbst: at least for me
14:16jenatali: Yeah they just take forever
14:17jenatali: I haven't tried to do a full run recently and I'm working on perf currently so hopefully it'll be faster when I'm done
14:17karolherbst: Test Conversions passed in 28495.6525979s on iris
14:17karolherbst: roughly 8 hours full profile
14:18jenatali: I think my last fails actually disappeared since I last looked too (hooray shared / external libraries) so I might be able to actually submit for CL3.0 certification
14:18karolherbst: nice
14:19karolherbst: jenatali: full or embedded profile?
14:19karolherbst: I guess full as you don't have the image restriction issue with d3d
14:19jenatali: Full
14:19karolherbst: stats from my iris CTS run: https://gist.githubusercontent.com/karolherbst/6373866091ab497f4683edfa3902a2e4/raw/90d6962f0ed09f3a81a709d409f794a51db60f3d/gistfile1.txt
14:19jenatali: What issue?
14:19karolherbst: like.. GL doesn't split samplers and textures
14:20karolherbst: so most drivers only support 32 read only images
14:20jenatali: Oh right
14:20karolherbst: and radeonsi wasn't interested unless anything actually needs more, as it's otherwise just pointless overhead :D
14:20jenatali: Yeah the one main benefit of using an external runtime+driver
14:20jenatali: Right
14:22karolherbst: MrCooper: I see
14:23karolherbst: MrCooper: one concerning issue is that I _sometimes_ hit this assert: test_bruteforce: ../src/gallium/auxiliary/util/u_inlines.h:83: pipe_reference_described: Assertion `count != 1' failed.
14:23karolherbst: kinda need to figure out what that's all about
14:30MrCooper: karolherbst: bisect landed on https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26307
14:30karolherbst: mhh still doing mine
14:30karolherbst: or rather.. git bisect run is still running
14:31karolherbst: which of those commits though?
14:31karolherbst: however
14:31karolherbst: I think something is up with denormal flushing or rounding behavior...
14:32MrCooper: 17e01a9a9b743d89066ba0a42c841e9b7e7d0528 "radeonsi: merge context_reg_saved_mask and other_reg_saved_mask into a BITSET"
14:32karolherbst: mhhh
14:32karolherbst: that's going to be fun to debug
14:37MrCooper: will you file an issue about this?
14:37karolherbst: I'd probably just debug it and send a patch...
14:38MrCooper: even better :) thanks
14:40karolherbst: my bisect ended at dbbf566588cedc72062f3d3640a0cf1bebd40af9 aco,ac/llvm,radeonsi: lower f2f16 to f2f16_rtz in nir :')
14:41karolherbst: I think I have to set the execution mode or something
15:11karolherbst: MrCooper: ohh.. yours was fp16 stuff?
15:11karolherbst: ehh wait
15:11karolherbst: it's a vec16
15:11karolherbst: nvm
16:09emersion: jani: enums can't be forward-declared :/
16:09jani: emersion: welcome to gcc, they can!
16:10emersion: jani, hm, but how does the compiler decide on the size?
16:10emersion: is there a flag to make all enums int or something?
16:10jani: emersion: of course, you shouldn't ever put that in an abi, but within a kernel build it'll always be the same
16:19CounterPillow: why did they add that particular footgun to the compiler?
16:20emersion: p e r f o r m a n ce
16:21emersion: i hope C23 enums can be forward-declared if you specify the underlying type
16:21jani: I think that's what modern C++ has
16:24bl4ckb0ne: CounterPillow: saving a few bits
16:24bl4ckb0ne: back 78 those were expensive
16:24HdkR: forward declaring enums is valid since C++11, just need to be explicit about the sizing :)
16:25karolherbst: bl4ckb0ne: still could have made it explicit
16:25karolherbst: though that's easy to say 45 laters
16:25karolherbst: *45 years
16:26bl4ckb0ne: indeed
16:26karolherbst: though back then C was also more like assembly on steroids if anything
16:26bl4ckb0ne: better late than never eh
16:26HdkR: Oh cool, C23 gains the same `enum Enum : int` explicit sizing as C++11
16:26karolherbst: yeah..
16:27karolherbst: C23 is another huge release (finally)
16:27CounterPillow: Now we just have to wait 20 years to be able to use it in the kernel :)
16:27karolherbst: and then in 2035 we'll get a mesa MR defaulting to it
16:27bl4ckb0ne: do you think msvc will have full support by then?
16:27CounterPillow: Partial but only if you pretend it's C++
16:29karolherbst: by 2035 MS will have ditched the NT kernel and uses linux anyway (and long ditched MSVC for something llvm based)
16:31jani: emersion: actually it's not always the same, but the caller needs to have the complete type before it can make the call
16:31jani: emersion: so you can't call functions with the wrong size
16:32emersion: i see
16:32karolherbst: sounds like an oversight, they should have allowed it for extra cursedness
16:32jani: :)
16:33karolherbst: MrCooper: .... can you confirm that your issue goes away with MESA_SHADER_CACHE_DISABLE=1?
16:34karolherbst: what a pain issue
16:34karolherbst: so it fails for me on the first run compiling things
16:34karolherbst: and then passes
16:35karolherbst: well.. apparently that's not even true
16:35karolherbst: pain
16:35karolherbst: anyway...
16:35karolherbst: I think the cache is broken
16:37jenatali: bl4ckb0ne: I think MSVC will probably have full support for C23 within a year or two if I had to guess
16:37bl4ckb0ne: thats good to know
16:37jenatali: Just a guess FWIW, I don't have insider knowledge on their timelines for that stuff
16:37jenatali: But they finally added C11 threads (https://devblogs.microsoft.com/cppblog/c11-threads-in-visual-studio-2022-version-17-8-preview-2/) so it seems like they actually care a bit about C now
17:32MrCooper: karolherbst: nope, fails even with MESA_SHADER_CACHE_DISABLE=1
17:34karolherbst: mhhh
17:34karolherbst: I wonder if my issue is the same, but it's quite random
17:34karolherbst: and I need to run ~7 times with the cache disabled to either hit it or not
17:49cmarcelo: jenatali: best part of that MSVC news for me: struct whatever w = {}; will work for it now.
17:49karolherbst: pain.. I always bisect towards nonsense commits :(
17:50jenatali: cmarcelo: Hm? Is that a thing being added in C23?
17:50MrCooper: karolherbst: it's been consistent for me so far, I've only done low double-digit number of tests though
17:51cmarcelo: jenatali: yes. you can use = {} instead of = {0} to zero initialize structs.. that is helpful in some edge cases too (nested structs etc). it was already supported in clang/gcc as compiler extensions for a while.
17:51jenatali: Oh cool
17:53karolherbst: MrCooper: mhh.. maybe I'm debugging a different bug then
17:53MrCooper: seems likely
17:59karolherbst: let's see how many attempts it will take to find the culprit :')
18:00cmarcelo: jenatali: and from my understanding it also will zero the padding bits (!)
18:00jenatali: :O
18:00karolherbst: it's not already guarnateed?
18:00karolherbst: or will {} != { 0 } then?
18:02cmarcelo: I don't think is guaranteed :-( my understanding is that will be different. trying to parse out the spec proposals.
18:10bwidawsk: so there were a few patches which landed for 23.3 (started with 9ec9849c85e8202cb) that leandrohrb56 authored and that emersion and daniels reviewed which essentially stop me from using VKMS as an EGL renderer. I'm wondering what the right path would be for me to run my test suite now
18:10bwidawsk: at least I think this is the case...
18:12emersion: bwidawsk: why do they stop you from doing that?
18:12bwidawsk: I think the main one is I lose dmabuf import apparently
18:12emersion: sounds like a bug
18:13cmarcelo: karolherbst: AFAICT "= {0}" didn't guaranteed to also zero the padding. empty initializer "= {}" guarantees that.
18:13karolherbst: cursed
18:14karolherbst: the same for the compiler extensions?
18:14emersion: eh, really?
18:14bwidawsk: emersion:
18:14bwidawsk: ```
18:14bwidawsk: 2023-12-12T17:35:10.212251Z DEBUG main: smithay::backend::egl::display: Supported EGL client extensions: ["EGL_EXT_client_extensions", "EGL_EXT_device_base", "EGL_EXT_device_enumeration", "EGL_EXT_device_query", "EGL_EXT_platform_base", "EGL_KHR_client_get_all_proc_addresses", "EGL_KHR_debug", "EGL_EXT_platform_device", "EGL_EXT_explicit_device", "EGL_EXT_platform_wayland", "EGL_KHR_platform_wayland", "EGL_EXT_platform_x11",
18:14bwidawsk: "EGL_KHR_platform_x11", "EGL_EXT_platform_xcb", "EGL_MESA_platform_gbm", "EGL_KHR_platform_gbm", "EGL_MESA_platform_surfaceless"]
18:14bwidawsk: ```
18:15bwidawsk: sorry, wrong one
18:15bwidawsk: I meant this
18:15bwidawsk: ```
18:15bwidawsk: 2023-12-12T17:35:10.248792Z INFO main: smithay::backend::egl::display: Supported EGL display extensions: ["EGL_EXT_create_context_robustness", "EGL_KHR_cl_event2", "EGL_KHR_config_attribs", "EGL_KHR_context_flush_control", "EGL_KHR_create_context", "EGL_KHR_create_context_no_error", "EGL_KHR_fence_sync", "EGL_KHR_get_all_proc_addresses", "EGL_KHR_gl_colorspace", "EGL_KHR_gl_renderbuffer_image", "EGL_KHR_gl_texture_2D_image",
18:15bwidawsk: "EGL_KHR_gl_texture_3D_image", "EGL_KHR_gl_texture_cubemap_image", "EGL_KHR_image_base", "EGL_KHR_no_config_context", "EGL_KHR_reusable_sync", "EGL_KHR_surfaceless_context", "EGL_EXT_pixel_format_float", "EGL_KHR_wait_sync", "EGL_MESA_configless_context", "EGL_MESA_drm_image", "EGL_MESA_query_driver", ""]
18:15bwidawsk: ```
18:19bwidawsk: oh hang on a sec
18:19bwidawsk: maybe it's my fault, let me check something else
18:33bwidawsk: daniels, emersion, leandrohrb56: It was my mistake. It was falling back to gles renderer instead of using pixman as it was supposed to be.
18:34cmarcelo: karolherbst: the GCC extension seems to do that (zero padding), although it not really documented. also looks like in practice gcc/clang already treat "={0}" == "={}". will keep an eye open to see what MSVC will do here.
18:35karolherbst: yeah, it's also often faster to just initialize it all in one go, because vector instructions
18:39vsyrjala: iirc c23 mandates ={} to make sense. ie. padding is also zeroed
18:42cmarcelo: vsyrjala: yes
18:44vsyrjala: oh that was exactly what is being disuccsed :)
18:44vsyrjala:didn't look far back
18:45vsyrjala: if only constexpr for functions had been included as well :(
18:48jenatali: cmarcelo: Feel free to +1 https://developercommunity.visualstudio.com/t/add-an-experimental-c23-mode-stdclatest-and-implem/1657588
18:48jenatali: I just did :)
18:53cmarcelo: jenatali: voted
19:46mareko: mupuf: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10285
19:48karolherbst: mareko: while you are here, are you aware of any recent regression inside radeonsi in regards to the shader compiler _sometimes_ producing different/wrong code? Should be 2-3 weeks old change, but I'm still haveing troubles figuring out what's actually going on here. Just wondeirng if you know something
19:49mupuf: mareko: thanks!
19:49mareko: karolherbst: if it's the bitset thing, try to use CLEAR instead of SET
19:49mareko: in si_compute.c
19:50mareko: for the saved registers
19:50karolherbst: not quite sure yet.. I need to run a test ~15 times to properly detect the regression, so my git bisect runs are kinda... unreliable so far
19:50karolherbst: yeah.. MrCooper bisected to that I think
19:50karolherbst: 17e01a9a9b743d89066ba0a42c841e9b7e7d0528 specifically
19:50karolherbst: I might end up at the same commit
19:50mareko: BITSET_SET_RANGE is 100% wrong, it should be CLEAR
19:51karolherbst: okay, thanks :) will try that out then
19:53mareko: the previous code used a bitmask and it set 0
19:54karolherbst: that one inside si_launch_grid?
19:54mareko: there should be only one in that file
19:54karolherbst: okay, must be that one then
19:55mareko: it's rather obvious from the bad commit
19:55karolherbst: yeah, now that I found the spot it indeed looks wrong
19:57karolherbst: will need to run the test in a loop for a while to be sure it fixes it :)
19:58soreau: could it cause gpu hangs or app crashes?
19:58karolherbst: I've seen such happening but not sure if it was caused by that
19:58mareko: only with rusticl, clover, or CDNA
19:59karolherbst: mareko: yeah.. so it looks better, do you want to submit an MR or should I?
19:59karolherbst: I'll do more testing to make sure it's better
20:00mareko: feel free to do it
20:00karolherbst: okay, once I run more tests I'll open one then
20:22ChaosPrincess: is there any documentation on how tessellation control shaders are compiled? even a very simple one that only sets the levels and passes through one variable (tes_color[gl_InvocationID] = tcs_color[gl_InvocationID]) turns into a huge pile of bcsels and control flow.
21:28airlied: ChaosPrincess: for what gpu?
21:31ChaosPrincess: asahi, but that is me dumping nir quite early, right at the beginning of agx_compile_variant
21:36airlied: not sure where they lower tess to compute and do actual tessellation
21:37airlied: might need alyssa to appear
21:37ChaosPrincess: they don't. i am looking at input nir that is being passed from opengl compiler to driver-specific code
21:38airlied: NIR_DEBUG=print_tcs might be a good place to look
21:39jenatali: ChaosPrincess: IIRC it comes out of the GLSL frontend that way
21:41ChaosPrincess: print_tcs says the offending pass is gl_nir_lower_buffers
21:44jenatali: Ah, looks like it's probably nir_lower_indirect_derefs which just isn't wrapped in NIR_PASS_V so it doesn't print