On Tuesday, February 13, 2018 10:00:44 PM PST Timothy Arceri wrote: > On 14/02/18 16:24, Jason Ekstrand wrote: > > First off, you should add an index to the intrinsic if you're going to > > do this and it should probably be set elsewhere. Otherwise, it becomes > > this magic secret radeonsi thing. > > Ah yes that's how it's done, I thought there was a better way to do this > thanks. > > Although what do you mean by set it elsewhere? This is where the > intrinsic is created and the system variable goes away I don't see how > it can be set elsewhere.
Basically, add a shader_info::pixel_center_integer flag, and have glsl_to_nir() look for the decorated fragcoord variable and set that. Honestly, it might make sense to set a global shader_info field in the GLSL frontend itself, and stop storing decorations on the fragcoord variable in the first place. Make NIR and the backends follow the new SPIR-V convention and make the GLSL frontend deal with GLSL oddities. It looks like the radeonsi backend sees this and sets a global flag, so global would probably be a better fit anyway...
Description: This is a digitally signed message part.
_______________________________________________ mesa-dev mailing list firstname.lastname@example.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev