-
Notifications
You must be signed in to change notification settings - Fork 540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] SKRuntimeEffect doesn't work on Bitmap Canvas #1822
Comments
SkVM is not integrated (for official build) into Skia 88th milestone, support starts at 90th milestone. |
specifically the issue is the std::unique_ptr<ByteCode> Compiler::toByteCode(Program& program) {
#if defined(SK_ENABLE_SKSL_INTERPRETER)
AutoSource as(this, program.fSource.get());
std::unique_ptr<ByteCode> result(new ByteCode());
ByteCodeGenerator cg(fContext.get(), &program, this, result.get());
bool success = cg.generateCode();
if (success) {
return result;
}
#else
ABORT("ByteCode interpreter not enabled");
#endif
return nullptr;
} |
enabling this in the CPP file directly enables SKSL to work on CPU |
specifically // required to enable CPU support for SKSL, this enables SKSL to work in a CPU canvas
#define SK_ENABLE_SKSL_INTERPRETER in also // enable JIT if possible
#define SKVM_JIT_WHEN_POSSIBLE in |
@mgood7123 did those changes work for you? I am still seeing the exception after applying those changes. Could you please help? Here are my changes. |
it should work, did you try recompiling from scratch? if not then you will need to try to debug the exception |
I used the same I cannot debug yet. It would take some time to setup the build environment. Do you have a copy of the |
Just been testing this in the new Skia update and it is looking so good. This shaders thing looks like a game changer. GPU and CPU surfaces are all fast! |
@mattleibow Is there any documentation and/or samples about this update that brings custom shaders support? I've been trying a piece of simplest code with I've tried both bitmap canvas and rendering onscreen through |
Have you tried the v3 alphas? The v2 is still using the same version of skia that does not yet support this. |
I'm a bit lost here, which What am I missing? |
They are on the preview feed: https://aka.ms/skiasharp-eap/index.json However, I am hoping to release a preview of v3 to nuget soon. |
Description
When attempting to use SKSL effects on bitmap canvases, there is a native exception raised.
Code
Expected Behavior
SKSL runtime effect is successfully used on drawing operation.
Actual Behavior
An exception occurs on attempting a draw operation:
An unhandled exception of type 'System.Runtime.InteropServices.SEHException' occurred in SkiaSharp.dll
External component has thrown an exception.
Basic Information
The text was updated successfully, but these errors were encountered: