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
Fix regression in VGA draw's wrapped line case #2441
Conversation
e52755a
to
b140385
Compare
76d8da1
to
e0b170a
Compare
Tested our QPEG testcase in debug build - works fine. Thanks @kcgen! |
e0b170a
to
fe0ff87
Compare
Oh, compilers complain about |
fe0ff87
to
bf95350
Compare
Interesting; yes - looks like it's using the (updated) |
Tug-o'-war between compilers :-) clang is happy now, but MSVC is not: D:\a\dosbox-staging\dosbox-staging\src\hardware\vga_draw.cpp(377,1): error C3493: 'palette_map' cannot be implicitly captured because no default capture mode has been specified [D:\a\dosbox-staging\dosbox-staging\vs\dosbox.vcxproj] D:\a\dosbox-staging\dosbox-staging\src\hardware\vga_draw.cpp(378,1): error C3493: 'bytes_per_palette_pixel' cannot be implicitly captured because no default capture mode has been specified [D:\a\dosbox-staging\dosbox-staging |
Tried w/ reference and two values: ... = [&target_addr, palette_map, bytes_per_palette_pixel](...) But now clang is warning again:
Going back to the single reference. |
bf95350
to
ac44390
Compare
Yeah, this is weird... we already had 12 warnings with voodoo enabled and now it jumped back up… Good call, let's keep the higher limit for now and limit it by fixing issues in voodoo code. |
After incorperating "vgaonly"'s features and using a 32-bit DAC palette, the draw_linear_line_from_dac_palette's wrapped portion of the function was not updated in the same way as the unwrapped (or "whole-line") approach. This commit moves the line-writing chunk into a lambda (to avoid code-reptition), which also ensures that both the wrapped and unwrapped code chunks use the same writing logic.
e5c68b3
to
9f8510e
Compare
the warning bump was my fault in this PR. I was testing some SIMD acceleration (both SSE and NEON) in the VGA draw function - and forgot to remove that GCC flag from Meson. This exposed 4 new warnings in libFLAC that I incorrectly believed were there all along.. I've snipped out that Meson SSE flag and we're back to 12 warnings. |
MSVC cannot into standards-conforming lambdas by default, I had it spew out a ton of errors on my branch because of that. You can just cherry-pick 1453a5b (or bump to C++20, MSVC will turn on updated parser automatically then) to make everyone happy. |
@kcgen Just tested this on my end and now QPEG works fine without any crashes! Great quick fix! 🎉 |
After incorporating
vgaonly
's features as well as using a 32-bit DAC palette, thedraw_linear_line_from_dac_palette
's wrapped portion of the function was not updated in the same way as the unwrapped (or "whole-line") approach.This commit moves the line-writing chunk into a lambda (to avoid code-repetition), which also ensures they all use the same writing logic.
Fixes #2439.