[Mesa-dev] [PATCH 1/2] nir: retain pixel_center_integer information when lowering gl_FragCoord
Kenneth Graunke
kenneth at whitecape.org
Wed Feb 14 06:52:17 UTC 2018
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...
-------------- 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/20180213/c2beff6a/attachment.sig>
More information about the mesa-dev
mailing list