-
Notifications
You must be signed in to change notification settings - Fork 158
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
cube: (Linux) Install image file and change cube(pp) to look for it in system dirs #5
Comments
Now installs vulkaninfo and mock ICD. Not yet installing cube(pp) pending decision on issue #5.
I am a maintainer for Gentoo and I am looking forward to the cube/cubepp demos and related textures being installed to the system. Thank you. |
- Modify cube and cubepp to obtain the texture image data from an include file instead of reading a PPM file at runtime. (This is the way it works for Android) This removes the need to install an image file or otherwise make an image file available in a repo build. - Add cube and cubepp to the install target. Fixes #5
Although we know how to handle installing the assets (texture image file), we've decided to compile the image data into the cube and cubepp applications, which avoids the need to handle the installation of the image file. The Android version works this way, and it is just generally simpler to handle these simple demos when there are no other dependent files. The PR for this issue will make these changes to cube(pp) and add them to the install target. |
- Modify cube and cubepp to obtain the texture image data from an include file instead of reading a PPM file at runtime. (This is the way it works for Android) This removes the need to install an image file or otherwise make an image file available in a repo build. - Add cube and cubepp to the install target. Note: The file handling code is left in place to make it easy to add a "-texture_file <file>" option so a user can pass in a texture file. Fixes #5
- Modify cube and cubepp to obtain the texture image data from an include file instead of reading a PPM file at runtime. (This is the way it works for Android) This removes the need to install an image file or otherwise make an image file available in a repo build. - Add cube and cubepp to the install target. Note: The file handling code is left in place to make it easy to add a "-texture_file <file>" option so a user can pass in a texture file. Fixes #5
- Modify cube and cubepp to obtain the texture image data from an include file instead of reading a PPM file at runtime. (This is the way it works for Android) This removes the need to install an image file or otherwise make an image file available in a repo build. - Add cube and cubepp to the install target. Note: The file handling code is left in place to make it easy to add a "-texture_file <file>" option so a user can pass in a texture file. Fixes #5
- Modify cube and cubepp to obtain the texture image data from an include file instead of reading a PPM file at runtime. (This is the way it works for Android) This removes the need to install an image file or otherwise make an image file available in a repo build. - Add cube and cubepp to the install target. Note: The file handling code is left in place to make it easy to add a "-texture_file <file>" option so a user can pass in a texture file. Fixes #5
Thanks Karl! |
We didn't quite get the check on whether a format can be legally queried on a particular GPU quite right. We were checking against the instance version only. We need to check agains the driver's supported API version as well.
The cube and cubepp demos have the restriction of expecting to find the texture image file (lunarg.ppm) in the same directory as the executable. This restriction makes it infeasible to "install" to a system directory because the image file would have to go into a directory meant for executables and not data.
Choose a suitable system location that is consistent with the FHS or equivalent standard.
Something like
/usr/share/vulkan/lunarg/cube/lunarg.ppm
as long as it follows conventions.Modify the cube and cubepp applications to search the current directory first for lunarg.ppm and then this new system location. The current directory has priority and the application should close if it cannot find the file in either location.
Modify the CMake install target to install this file to the selected location.
Note that we had this same request some time ago from a package maintainer, but we turned it down at that time because the compiled shader binaries needed to be installed as well, and we were unsure about doing that.
Since then, the cube(pp) packaging has changed so that the shader binaries are compiled into the program text, removing the need to install the shader binaries and reducing the number of auxiliary files to one. It now seems more feasible to install this image file as described.
Another approach would be to store the contents of the texture image as a C source code file and compile the image into the program text. But this seems clunky.
The text was updated successfully, but these errors were encountered: