On Sun, May 5, 2019 at 1:27 AM Alyssa Rosenzweig <[email protected]> wrote: > > > The blend shader enable bit is already described in the comments in > > the header; the blend shader is enabled when unk2 == 0. > > I'm pretty sure that comment was from you, but thank you ;) > > > (the blend shader has > > to be allocated within the same 2^24 byte range as the main shader for > > it to work properly anyways, even on Midgard, which is probably not > > implemented properly on mainline). > > Indeed. Mainline Midgard blend shaders work (well, stubbed out so they > just do passthrough without any real blending, but the hardware is > correct). That said, we cap shader memory at 16MB upfront, which > "resolves" this problem.
No, it doesn't. The high (64 - 24) bits have to be exactly the same. So if your 16 MB allocation is not aligned, you could wind up with two shaders crossing that boundary by sheer bad luck and then things go boom. ARM's kernel driver dealt with it by aligning all executable memory allocations to 2^24, but the upstream driver doesn't have a solution yet. > > > Maybe it would be better if these functions got passed the > > mali_shader_descriptor itself? > > Possibly. I don't have access to any Bifrost machines right now, so I > can't test that. I could test it, but most of the freedreno tests that exercise blend shaders wouldn't work because you never implemented capturing the memory for each submission separately. Have you done that since? _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
