-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Add BlitRGBtoRGBPixelAlphaLSX and SDL_FillRect4LSX opt #14345
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
base: SDL2
Are you sure you want to change the base?
Conversation
|
Feature development happens to SDL3 in the main branch, which then can be back ported. |
|
Okay. No problem. @madebr |
|
Offhand, these look good. Do you have performance numbers that show the difference between LSX and non-LSX code paths for these operations? |
|
Hi @slouken ,we didn't find a good way to show the performance. We wrote these optimizations based on perf record results when using SDL to render videos. After these optimizations, and together with other optimizations merged before(see 50d8642), we find that the video renderings become more smoothly. |
|
Hello, is there anything else that needs updating? |
Well, this PR doesn’t have The renderer change was also not present in the SDL3 PR, so I assumed it wasn’t necessary in this one either. |
src/render/SDL_render.c
Outdated
| Android_ActivityMutex_Lock_Running(); | ||
| #endif | ||
|
|
||
| /*CPU acceleration runs faster than integrated graphichs on Loongson at pressent.*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| /*CPU acceleration runs faster than integrated graphichs on Loongson at pressent.*/ | |
| /* CPU acceleration runs faster than integrated graphics on Loongson at present. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
| #if defined(__linux__) && defined(__loongarch__) | ||
| if (SDL_CheckIntegratedGraphics()) { | ||
| SDL_SetHint(SDL_HINT_FRAMEBUFFER_ACCELERATION, "0"); | ||
| flags = SDL_RENDERER_SOFTWARE; | ||
| } | ||
| #endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will effectively make it impossible to create an opengl SDL_Renderer on those platforms. Is this ok for compatibility with non-SDL renderer using OpenGL?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @madebr, what does it mean with non-SDL renderer using OpenGL?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With non-SDL renderer using OpenGL, I mean a user project using OpenGL calls for drawing (including 3D) instead of using the SDL renderer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your quick reply, it seems this change will not affect that behavior.
Sorry, they are really missed. Will add them lately. |
|
Hi @slouken , I misunderstood your question about BTW, this PR is ready for review. |
|
Please remove the renderer change from this PR. You can submit that separately for consideration. |
We have optimized the functions BlitRGBtoRGBPixelAlphaLSX and SDL_FillRect4LSX opt. @slouken