#asahi-gpu · 2023-08-29 13:24
alyssaDon't put the push constants themselves on the agx_sysvals, instead put the u64 pointer to the push constant buffer there#asahi-gpu · 2023-08-29 13:23
alyssayou shouldn't need this#asahi-gpu · 2023-08-29 13:23
alyssai509vcb: " 21:38 <i509vcb> alyssa: would you mind if load_sysval_agx allowed the binding to be a nir_def. I'd like to avoid the extra indirection for getting push constants but binding being a fixed int makes that hard "#asahi-gpu · 2023-08-29 12:23
alyssayeah#asahi-gpu · 2023-08-29 04:47
i509vcbI'd imagine the universal rule of don't exceed system ram would apply#asahi-gpu · 2023-08-29 04:46
i509vcb(Right now I have to lie about that amount for wgpu to not go down undefined behavior)#asahi-gpu · 2023-08-29 04:46
i509vcbIs there any known hardware limit on maximum allocation sizes for https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkPhysicalDeviceMaintenance3Properties.html#asahi-gpu · 2023-08-29 04:16
alyssashould be simpler than what the gl driver has to do#asahi-gpu · 2023-08-29 04:16
alyssaso you would just lower derefs straight to bindless and not allocate texture state registers#asahi-gpu · 2023-08-29 04:16
alyssafor vulkan, there's no binding tables in the API#asahi-gpu · 2023-08-29 04:16
alyssai509vcb: the gl driver lowers binding tables to bindless because it's too late by the time it hits the driver, since GL is based on binding tables#asahi-gpu · 2023-08-29 04:06
i509vcblooks like I need to lower non-bindless to bindless to see wgpu's cube example work#asahi-gpu · 2023-08-29 03:04
i509vcbActually no wgpu test excludes lavapipe based on vendor id....#asahi-gpu · 2023-08-29 03:03
i509vcbno wgpu today, looks like it dies initializing the internal zero buffer#asahi-gpu · 2023-08-29 02:55
i509vcbgotta love gdb crashing when you try to tab complete a source file in wgpu to test why agxv seems to fail allocating memory there...#asahi-gpu · 2023-08-28 22:02
i509vcbBuffers I have no idea, those I am tempted to delay to another MR#asahi-gpu · 2023-08-28 22:02
i509vcbok so everything except for buffers is in sysvals#asahi-gpu · 2023-08-28 21:38
i509vcbOf course no real rush to do that#asahi-gpu · 2023-08-28 21:38
i509vcbalyssa: would you mind if load_sysval_agx allowed the binding to be a nir_def. I'd like to avoid the extra indirection for getting push constants but binding being a fixed int makes that hard#asahi-gpu · 2023-08-28 17:18
alyssa(with everything unified)#asahi-gpu · 2023-08-28 17:18
alyssalooking forward to the final form of the patch :)#asahi-gpu · 2023-08-28 17:18
alyssai509vcb: looks like you're on the right track#asahi-gpu · 2023-08-28 17:03
i509vcbalyssa: MR for sysvals has been updated, it seems to be accessible but gitlab can be slow and ci may or may not be working right#asahi-gpu · 2023-08-28 04:52
linai509vcb: yes, you need to split to have more#asahi-gpu · 2023-08-28 04:14
i509vcbalyssa: is the 64 size half limit in agx_usc_uniform because of hardware limitations?#asahi-gpu · 2023-08-27 19:42
alyssa:+1:#asahi-gpu · 2023-08-27 19:15
i509vcbalyssa: yep the missing second load_global_const was the issue#asahi-gpu · 2023-08-27 12:12
alyssa(alternatively, you could pass the entirety of the sysval buffer to agx_usc_uniform and then use the load_sysval_agx you implemented above, without the load. but that is very chunky since you dont use most of those uniforms in a given pipeline, which is why the gl driver has the layout code.)#asahi-gpu · 2023-08-27 12:12
alyssathat 0000 is a hexdump of the content of the uniform#asahi-gpu · 2023-08-27 12:11
alyssaif you want to put an address in a uniform, you need to pool_upload the address to the cmdbuf pool and pass /that/ address to usc_uniform#asahi-gpu · 2023-08-27 12:11
alyssaagx_usc_uniform works like a memcpy: move the contents of this GPU memory into these uniforms#asahi-gpu · 2023-08-27 12:10
alyssasince you put the address int he buffer and then you need to load from the address int he buffer#asahi-gpu · 2023-08-27 12:10
alyssaload_global_const(load_global_const(load_preamble(0) + offset to the num_workgroups))#asahi-gpu · 2023-08-27 12:10
alyssafor load_num_wrkgroups that means there would be 2 dependent loads in this case#asahi-gpu · 2023-08-27 12:09
alyssaat least as it's used in the GL driver, load_sysval_agx is intended to return the value#asahi-gpu · 2023-08-27 12:09
alyssathis would load the /address/ of the sysval, you need to wrap this whole thing in a load_const_agx#asahi-gpu · 2023-08-27 12:08
alyssahttps://gist.github.com/i509VCB/fce24eb2825733cc4bfacef043b398ba#asahi-gpu · 2023-08-27 12:06
alyssathat's a lot of messages #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: