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

Looking for more information #2

Closed
makuto opened this issue Oct 21, 2023 · 2 comments
Closed

Looking for more information #2

makuto opened this issue Oct 21, 2023 · 2 comments

Comments

@makuto
Copy link

makuto commented Oct 21, 2023

I have looked around for a good amount of time, and this repository seems to be the only one which claims to have support for hardware-accelerated graphics on the Raspberry Pi 4. (I say "claims" only because I was unable to get the code to compile, so I couldn't test it myself).

I wanted to know if you could give some background as to where you found out how to do this. Was this based on Linux V3D? I want to know what your original sources are so I can understand this code and use it in my projects.

I am also wondering where you got the bytecode for the QPU. Did you compile the shaders on Linux with Mesa and copy over? Hand-write it?

@Random06457
Copy link
Owner

Hi, first, I'd like to apologize for the current state of this repository. I initially wanted to do a lot of cleanup, add more examples and write some documentation on my findings but I got caught up in a lot of work and ended up doing none of these things (maybe I'll continue working on this in the future but as of right now it's hard to say).

If you have troubles compiling this project, feel free to give more info so I can help you. Also, if you have any question with how anything works, I'd be happy to answer with what I remember.

As for where I got all this info, it was mostly from looking around in the linux kernel space v3d driver as well as in the userspace driver in mesa.

https://gitlab.freedesktop.org/mesa/mesa/-/tree/main/src/gallium/drivers/v3d
https://gitlab.freedesktop.org/mesa/mesa/-/tree/main/src/broadcom

During my process of trying to understand how everything works and how every part relates to one another, I modified linux to dump everything that gets sent to the GPU.
This is how I got the sample that I hardcoded in the example (i.e. when I wanted to use a shader, I would just write some OpenGL/GLSL code and dump the resulting bytecode to let mesa handle all the compilation part).

@makuto
Copy link
Author

makuto commented Nov 5, 2023

Sorry for the slow reply, I was expecting to get an email when you commented but I guess my profile has that disabled.
Thanks for the explanation! I'm right in the middle of something else, but I will open other issues to ask more questions once I have time to look more into this.

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

No branches or pull requests

2 participants