#asahi-gpu · 2023-08-27 07:35
i509vcbI'd expect 32x3 %15 = @load_constant_agx (%13, %5 (0x8)) (access=none, base=0, format=r32_uint, sign_extend=0)?#asahi-gpu · 2023-08-27 07:35
i509vcbhttps://gist.github.com/i509VCB/18ebd917ef5389e08337eca74b176dae#asahi-gpu · 2023-08-27 07:35
i509vcbI'll also link the preamble's nir, the 32x3 load seems suspcious with %5 being 2 where it should be 8?#asahi-gpu · 2023-08-27 07:33
i509vcbs/content of buffer/content of buffer being pointed to#asahi-gpu · 2023-08-27 07:32
i509vcbbut that 000000 is the content of the buffer or the content of the uniform?#asahi-gpu · 2023-08-27 07:32
i509vcb000000 22 AD 3B 08 D5 D1 09 05 #asahi-gpu · 2023-08-27 07:32
i509vcb Buffer: 0x5ffffac34c#asahi-gpu · 2023-08-27 07:32
i509vcb Start (halfs): 0#asahi-gpu · 2023-08-27 07:32
i509vcb Size (halfs): 4#asahi-gpu · 2023-08-27 07:32
i509vcb Tag: Uniform#asahi-gpu · 2023-08-27 07:32
i509vcbUniform#asahi-gpu · 2023-08-27 07:32
i509vcbagxdecode.dump.0000 seems to tell me this about the first uniform which should be a pointer to a sysvals struct:#asahi-gpu · 2023-08-27 05:17
i509vcbstill doesn't fix the issue where if the sysval being loaded has a binding that isn't zero always fails...#asahi-gpu · 2023-08-27 05:15
i509vcbYou get a race condition#asahi-gpu · 2023-08-27 05:15
i509vcbI guess I learned what happens when you use agx_usc_uniform on the same uniform registers twice#asahi-gpu · 2023-08-27 04:56
i509vcbhuh it's flaking#asahi-gpu · 2023-08-27 04:50
i509vcbThe base is intentionally hardcoded to 0 as I have shifted other things over in the uniform registers#asahi-gpu · 2023-08-27 04:50
i509vcbWhich in the case of load_num_workgroups is this: https://gist.github.com/i509VCB/b343bb352ecaad0f23245330359add54#asahi-gpu · 2023-08-27 04:49
i509vcbThat's replacing load_sysval_agx#asahi-gpu · 2023-08-27 04:49
i509vcbI *think* this lowering is correct, not sure why vulkan keeps saying I am loading (0, 0, 0) through: https://gist.github.com/i509VCB/fce24eb2825733cc4bfacef043b398ba#asahi-gpu · 2023-08-27 01:52
i509vcbI'm going to take moving over fully to the sysval buffer a little more slowly, I've found that trying to do push constants, descriptors and vbo stuff at the same time as num_workgroups to be a bit hard to test properly#asahi-gpu · 2023-08-27 00:44
i509vcb32 uint64_t means 128 uniform registers just for buffers#asahi-gpu · 2023-08-27 00:44
i509vcbalthough it is definitely chunky#asahi-gpu · 2023-08-27 00:44
i509vcbMainly because of the compatibility stuff currently there#asahi-gpu · 2023-08-27 00:43
i509vcbI've left the bound buffers in the uniforms for now#asahi-gpu · 2023-08-27 00:21
i509vcbAnd I doubt I can do much better than the compiler right now #asahi-gpu · 2023-08-27 00:21
i509vcbI guess the former sounds better from a maintaince standpoint since we already upload all the stuff into a buffer #asahi-gpu · 2023-08-27 00:19
i509vcbBut from a theoretical performance standpoint loading that value into a uniform register would just generate an redundant mov?#asahi-gpu · 2023-08-27 00:19
i509vcb> agx_usc_uniform is then used to copy from that struct to uniform registers according to the layout that you picked earlier#asahi-gpu · 2023-08-27 00:19
i509vcbI guess part of this question was reading #asahi-gpu · 2023-08-27 00:09
i509vcbhmm okay, so really the only usc_uniform call I'd probably do then is tell the driver where I uploaded the agxv_sysvals_whatever#asahi-gpu · 2023-08-27 00:05
i509vcbagx_emit_store_preamble?#asahi-gpu · 2023-08-27 00:05
i509vcbI have sorted sysvals so that uniform registers can be assigned, but I need to load a value from the sysval buffer and store it in a uniform reg for use#asahi-gpu · 2023-08-27 00:02
i509vcbnir_load_global_constant can be used to read from a buffer, but how do I tell nir to store that value into some uniform registers?#asahi-gpu · 2023-08-26 23:37
i509vcb(lhs and rhs in the sort function actually need to be cast to a const type *const*) #asahi-gpu · 2023-08-26 23:34
i509vcbnvm I figured out that I did something wrong in sort_sysval#asahi-gpu · 2023-08-26 23:31
i509vcbThis is very similar to what parts of nir do, but it seems to not work in agxv#asahi-gpu · 2023-08-26 23:30
i509vcbI've got to be doing something wrong here if qsort fails with garbage but a loop to check my sanity is fine: https://gist.github.com/i509VCB/a9aa0d30b4a4695379110002d2507119#asahi-gpu · 2023-08-26 22:16
i509vcbs/build-type/buildtype#asahi-gpu · 2023-08-26 22:16
i509vcbI heard that -Dbuild-type=debug causes gcc to build without optimizing out stuff, but that seems to do nothing?#asahi-gpu · 2023-08-26 22:14
i509vcbI've been working through it and I feel I have something nearly done#asahi-gpu · 2023-08-26 22:14
i509vcbok#asahi-gpu · 2023-08-26 19:19
i509vcbs/than/then#asahi-gpu · 2023-08-26 19:17
i509vcbWas the intention that when I lay out uniforms I just reserve a spot for a uint64_t that is a gpu pointer to the uploaded agxv_sysvals_graphics/compute? and then just have the buffers to be bound just appear after than in the uniform registers?#asahi-gpu · 2023-08-26 19:08
i509vcbfor GL you don't seem to record what sysval is at what offset or which ones were encountered?#asahi-gpu · 2023-08-26 19:07
i509vcbalyssa: poke on question above#asahi-gpu · 2023-08-25 15:03
i509vcbThis seems to imply that I'd need to still have a bunch of has_whatever fields and bases in another type?#asahi-gpu · 2023-08-25 15:03
i509vcb> agx_usc_uniform is then used to copy from that struct to uniform registers according to the layout that you picked earlier.#asahi-gpu · 2023-08-25 14:24
i509vcbSmithay is definitely better now but I am still a annoyed by all the Arc<Mutex<T>> abuse we need#asahi-gpu · 2023-08-25 14:23
i509vcbSadly Deref is an escape route