Fixed BGRA channel assignment for Color struct#7
Draft
thomascp wants to merge 1 commit into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi,
First of all, thank you so much for this amazing project! It has been incredibly helpful for learning Raspberry Pi bare-metal GPU programming.
While running the code, I noticed that my rendered triangle looked different from the one shown in your README.
In my case, the bottom-left vertex is blue, the bottom-right is green, and the top vertex is red.
After some investigation, I found that StoreTileBufferGeneral stores the buffer using the V3D_OUTPUT_IMAGE_FORMAT_RGBA8 format. However, when it is copied over to the framebuffer, the framebuffer expects a BGRA format.
To fix this color channel mismatch, I modified the codes in drawTex (swapping the r and b struct members) so that the memory layout aligns correctly with the expected BGRA format.
Could you please take a look? Thank you!
BR,
Peng