On 1 November 2016 at 23:49, Nicolai Hähnle <[email protected]> wrote: > On 01.11.2016 05:32, Dave Airlie wrote: >> >> From: Dave Airlie <[email protected]> >> >> This just a discussion holder patch, radv has generated a shader >> using discard that lowers the kilp intrinsic into >> >> s_mov_b64 exec, 0 ; BEFE0180 >> >> however that means exports never happen, and I think this leads >> to a GPU hang as the frag shader must make at least one NULL export. >> >> This hacks just replaces kilp intrinsic with an explcit export >> and endpgm for now. I'm sure it's probably all sorts of wrong. >> >> Either way I expect the fix has to be in the compiler, but this >> patch lets me get CTS to run again > > > Unfortunately, this will end up messing up other stuff when the kill _isn't_ > uniform, because now you have two places where you return from the function, > which is bound to mess with control flow in hilarious ways. > > If you want to workaround the problem that you mentioned, I suggest trying > to see whether you can use some NIR transformation to lower the kill as > > kill(condition) > > rather than > > br condition, die, live > > die: > kill > > live: >
At the moment that's just how the SPIR-V comes rolling in however I do see we have a GLSL pass to convert if (cond) discard into discard(cond) I'd need a similiar pass for NIR to convert to it's discard_if intrinsic. Dave. _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
