#asahi-gpu · 2023-07-29 20:09
alyssaif you don't get to it I'll probably do that on monday#asahi-gpu · 2023-07-29 20:09
alyssaso we can fix those across drivers#asahi-gpu · 2023-07-29 20:09
alyssaI wonder if what we really want is a gallium-level helper to upload any user buffers#asahi-gpu · 2023-07-29 20:09
alyssahmm#asahi-gpu · 2023-07-29 20:08
alyssathanks in advance for the bug fix :3#asahi-gpu · 2023-07-29 20:07
alyssaprobably fster too#asahi-gpu · 2023-07-29 20:07
alyssajannau: but for asahi, I would say use const_uploader in set_const_buffer to avoid the dangling ptr#asahi-gpu · 2023-07-29 20:06
alyssaprobably best to bring this up in #dri-devel given multiple affected drivers#asahi-gpu · 2023-07-29 20:06
alyssaso v3d (at least) is probably also affected#asahi-gpu · 2023-07-29 20:05
alyssaotoh, v3d does not do that#asahi-gpu · 2023-07-29 20:05
alyssaradeonsi too#asahi-gpu · 2023-07-29 20:05
alyssathat is probably more correct anyway, maybe we are fundamentally misusing gallium by keeping the dangling pointer#asahi-gpu · 2023-07-29 20:04
alyssajannau: iris doesn't have this bug, because it uploads the user buf during set_constant_buffer instead of deferring to draw timw#asahi-gpu · 2023-07-29 20:03
alyssayeah, this looks like potentially a mesa/st bug, leaving a dangling pointer#asahi-gpu · 2023-07-29 20:02
alyssa> I gather the problem is that nothing calls agx_set_constant_buffer(..., NULL); when the program is deleted#asahi-gpu · 2023-07-29 20:01
alyssajannau: that one's spicy#asahi-gpu · 2023-07-29 18:29
alyssaI guess panic-on-overflow would be nice for debug builds but otherwise shrug#asahi-gpu · 2023-07-29 18:28
alyssayeah#asahi-gpu · 2023-07-29 18:21
alyssa(otoh it would be totally straightforward to riir since it's just math)#asahi-gpu · 2023-07-29 18:20
alyssait's basically just math#asahi-gpu · 2023-07-29 18:20
alyssasomething like src/asahi/layout is very unlikely to have bugs that Rust would help with#asahi-gpu · 2023-07-29 18:20
alyssaso the hardest to riir#asahi-gpu · 2023-07-29 18:20
alyssawhich is firmly tied up with common gallium or vulkan stuff#asahi-gpu · 2023-07-29 18:20
alyssai509vcb: tbh, the scariest code is the memory manegement, etc#asahi-gpu · 2023-07-29 16:18
alyssapffheh#asahi-gpu · 2023-07-29 14:05
alyssapffheh#asahi-gpu · 2023-07-29 13:58
alyssaim just going to drop https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20298 here#asahi-gpu · 2023-07-29 13:58
alyssa>:D#asahi-gpu · 2023-07-29 13:53
alyssahonestly IDK#asahi-gpu · 2023-07-29 13:46
alyssai agree with lina, that backtrace looks like a uaf#asahi-gpu · 2023-07-29 13:44
alyssaclearly we need to rewrite mesa in rust#asahi-gpu · 2023-07-27 12:00
alyssa(scratch buffer allocation)#asahi-gpu · 2023-07-27 12:00
alyssawhoops now i have a different new kernel thing needed .-.#asahi-gpu · 2023-07-27 11:59
alyssalina: i changed branches to work on something else to avoid kernel backup#asahi-gpu · 2023-07-26 14:09
alyssaalso after that, passing ./amd_vertex_shader_layer-layered-depth-texture-render which will be more kernel stuff (or ZLS control bits)#asahi-gpu · 2023-07-26 14:07
alyssaso I just need help getting it to pass with that commit reverted ^_^#asahi-gpu · 2023-07-26 14:07
alyssaI've added a patch which disables hw layered rendering and uses only the sw emulation path, and that passes the test#asahi-gpu · 2023-07-26 14:07
alyssalina: OK, it's almost definitely kernel#asahi-gpu · 2023-07-26 13:23
alyssapor que no los 2#asahi-gpu · 2023-07-26 13:23
alyssacould also be a mesa snafu#asahi-gpu · 2023-07-26 13:20
alyssaI hope you can figure out the layered rendering mystery because I'm p stuck :(#asahi-gpu · 2023-07-26 12:56
alyssamy guess is that's the stride of the second plane, with the appropriate shifting/biasing done to pack#asahi-gpu · 2023-07-26 12:56
alyssalina: ^^ (stride / 16) - 1#asahi-gpu · 2023-07-26 12:45
alyssagood luck :3#asahi-gpu · 2023-07-26 12:44
alyssaforcing pass type to TRANSLUCENT changes the failure slightly which is a smoking gun for that#asahi-gpu · 2023-07-26 12:44
alyssaor kernel bug with the layered bits#asahi-gpu · 2023-07-26 12:44
alyssawhich could mean either shader bug (possible but I've read the asm and it looks fine..)#asahi-gpu · 2023-07-26 12:44
alyssahowever... I think the hardware tiler bit isn't working properly#asahi-gpu · 2023-07-26 12:44
alyssaand that branch forces eMRT always, so just needs to handle doing image array writes from the frag shader with the layer given by that layer varying#asahi-gpu · 2023-07-26 12:43
alyssaand also we write the layer as a regular flat varying so it's accessible in the frag shader