Faulty generated OpenGL Shader keyword fails "silently"

46 views
Skip to first unread message

William Candillon

unread,
May 28, 2024, 8:18:14 AMMay 28
to skia-discuss
Hello team, 


Here with WebGL the error is clear and this how we were able to fix it immediately.
However the error is not really thrown by Skia but rather WebGL.
So on Android for instance, the runtime effect factory returns non-null and no text error.

On Metal, such SKSL works as expected.

Here it looks like something could be consolidated here? Let me know your thoughts here.

Kind regards,

William

John Stiles

unread,
May 28, 2024, 8:33:03 AMMay 28
to skia-d...@googlegroups.com
I'll take a look today and sort it out. Thanks for letting me know. 

--
You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/skia-discuss/dfe0cda8-cb66-4999-918b-a562e48d483en%40googlegroups.com.

John Stiles

unread,
May 28, 2024, 11:20:46 AMMay 28
to skia-d...@googlegroups.com
Interesting; the word "filter" was added as a reserved word in OpenGL ES3. SkSL does enforce the ES2 reserved-word list, but the spec added additional reserved words in later versions of the standard.

That's a good catch. For now, the simple fix is to avoid using reserved words in a shader; I will look at expanding our reserved-word list to encompass the latest standards in a future Skia milestone. 

John Stiles

unread,
Jul 19, 2024, 8:42:05 PMJul 19
to skia-d...@googlegroups.com
The next release of Skia will fix this bug; "filter" (and other reserved but common words, such as "smooth" and "active") will now work normally in GLSL mode. Details in http://review.skia.org/859060.
Sorry for the delay! I was OOO throughout June and have had a lot of other things on my plate since coming back :)
Reply all
Reply to author
Forward
0 new messages