sksl minify supports mesh vertex and fragment?

162 views
Skip to first unread message

Hippo

unread,
Sep 11, 2023, 7:19:55 AM9/11/23
to skia-discuss
Is there any plan to make sksl minify support mesh vertex and fragment?

It works if I change the `gProgramKind` to `SkSL::ProgramKind::kMeshVertex` or `SkSL::ProgramKind::kMeshFragment` and provide definitions of `Attributes` and `Varyings`.

John Stiles

unread,
Sep 14, 2023, 4:40:48 PM9/14/23
to skia-d...@googlegroups.com
That's a good idea! Thank you for the suggestion. The next release of Skia will support minifying mesh shaders, by passing a `--meshfrag` or `--meshvert` flag to sksl-minify. 
This is implemented here: http://review.skia.org/755939 
Please let me know if this will work for your use case.

On Mon, Sep 11, 2023 at 7:20 AM Hippo <two...@gmail.com> wrote:
Is there any plan to make sksl minify support mesh vertex and fragment?

It works if I change the `gProgramKind` to `SkSL::ProgramKind::kMeshVertex` or `SkSL::ProgramKind::kMeshFragment` and provide definitions of `Attributes` and `Varyings`.

--
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/aeeb2026-89b8-4688-91d7-3d4643aecb46n%40googlegroups.com.

Hippo

unread,
Sep 18, 2023, 12:18:50 PM9/18/23
to skia-discuss
Thanks! It works!

Maybe update the usage tip? It still shows `usage: sksl-minify <output> <input> [--frag|--vert|--compute|--shader|--colorfilter|--blender] [dependencies...]`.

John Stiles

unread,
Sep 20, 2023, 10:16:01 PM9/20/23
to skia-d...@googlegroups.com
Good catch. I'll update the usage string as well.

Reply all
Reply to author
Forward
0 new messages