[Mesa-dev] [PATCH] glsl: Make copy propagation not panic when it sees an intrinsic.

Kenneth Graunke kenneth at whitecape.org
Tue Dec 13 06:59:57 UTC 2016


On Monday, December 12, 2016 4:35:46 PM PST Marek Olšák wrote:
[snip]
> Yeah, the GLSL compiler can't really do anything if it sees a bitcast.
> I tried to write a pass that removes bitcasts, but it's a PITA because
> you can have a vec4 where xzw are used as float and y as int.
> 
> I just gave up and figured that unrolling in LLVM IR would be simpler.
> 
> Marek

Yeah, this is one reason we need to get away from GLSL IR.  Programs
ported from DX11 have bitcasts out the wazoo.  NIR handles this much
better - since the types are part of the instruction, it magically sees
through all this rubbish.  You don't even need to think about it when
writing passes.  I suppose that's one thing that TGSI got right, and in
retrospect we got wrong.

--Ken
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20161212/8698ea9e/attachment.sig>


More information about the mesa-dev mailing list