Skip to content
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

Crash on blitImage with different image format #196

Open
abu-irrational opened this issue Mar 12, 2024 · 3 comments
Open

Crash on blitImage with different image format #196

abu-irrational opened this issue Mar 12, 2024 · 3 comments
Labels

Comments

@abu-irrational
Copy link

Trying to copy BLImages (with different format) among different BLcontexts, causes a crash.
Here's a minimal fiddle.

// ========================================
BLImage render(const BLContextCreateInfo& cci) {

BLImage img0(400, 400, BL_FORMAT_A8);
BLImage img1(400, 400, BL_FORMAT_XRGB32);
// ... initialize img0 and img1

// copy img1 (RGB) -> img0 (A8) OK
BLContext ctx0(img0);
ctx0.blitImage(BLPointI(0,0),img1);

// copy img0 (A8) -> img1 (RGB) CRASH
BLContext ctx1(img1);
ctx1.blitImage(BLPointI(0,0),img0);

return img1;
}

I have another crash test, but it's difficult to reproduce ...
Surprisingly it's the opposite of the above test case, i.e. blitting a XRGB32 image over an A8 image ...
I'm using the master branch (10-march-2024) and when I try to blit a XRGB32 image in a context with an attached A8 image, I get the following warning
bl::Pipeline::JIT assembling error: InvalidInstruction: vpackuswb xmm@255,
Blend2D error 0x10002 INVALID_STATE

@abu-irrational
Copy link
Author

Just a correction:
What I'm trying to do is working with PRGB32 images (not XRGB32 images) and A8 images.
You should then correct the above fiddle script. Anyway, the result is the same.

@kobalicek kobalicek added the bug label Mar 27, 2024
@kobalicek
Copy link
Member

I checked it out and this is indeed a bug.

This needs a fix and a test case so it won't happen again.

Thanks for the report!

@kobalicek
Copy link
Member

Update: This will be fixed once aarch64_jit branch is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants