Skip to content

shader: disable coord_replace for non-POINT primitives

Ryan Neph requested to merge ryanneph/virglrenderer:fix_coord_replace into master

If GL_POINT_SPRITE mode is enabled and a texture has GL_COORD_REPLACE enabled, the texture will apply coord_replace to all primitive types, instead of only GL_POINTS as expected.

This change checks the prim_mode for every draw call and selects the appropriate shader variant to enable coord_replace only when rendering GL_POINTS primitives.

Issue: #188 (closed)

Signed-off-by: Ryan Neph ryanneph@google.com

Edited by Ryan Neph

Merge request reports