Skip to content

glamor: add gl_PointSize for ES shaders

Konstantin requested to merge rilian-la-te/xserver:fix-es-pointsize into master

GLES3.2 spec, page 126:

The variable gl_PointSize is intended for a shader to write the size of the point to be rasterized. It is measured in pixels. If gl_PointSize is not written to, its value is undefined in subsequent pipe stages.

If glamor shader is use points, we should define gl_PointSize for GLES. On Desktop GL, it "just work" due to default gl_PointSize is 1.

As @anholt requested, define this only for minimal amount of shaders (point and glyphbit ones), to make sure than performance will not affected.

Reviewed-by: Emma Anholt emma@anholt.net
Reviewed-by: Adam Jackson ajax@redhat.com
Signed-off-by: Konstantin ria.freelander@gmail.com

This is a reviewed part of !924 (closed) for sake of faster merging.

CC: @anholt @ofourdan @daenzer @ajax

Edited by Konstantin

Merge request reports