-
Notifications
You must be signed in to change notification settings - Fork 67
Add Vulkan Support #127
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
Add Vulkan Support #127
Conversation
CNFG_BATCH no longer implies CNFGOGL
cf80c2d to
b7058e9
Compare
vk/cnfgbatch.h
Outdated
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.
Please explain what is going on here.
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.
The glslangValidator program has an option to output the compiled SPIR-V as a variable in a C header file, using the --vn parameter (with the name of the variable specified right after), in the following format
// version
#pragma once
const uint32_t VariableName[] = {
insert SPIRV here
};However, I didn't like how the variable wasn't declared static or how the file contained the #pragma. After looking through the program's command line options, I found the -x option, which was basically the same as --vn but without the pragma or the variable declaration, and that option is what I chose for outputting the generated SPIR-V
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.
You definitely need to have a very clear comment explaining how to regenerate those tables / what the files are for!
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.
Please also explain what is going on here.
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.
Ditto to the comment under vk/cnfgbatch.h
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.
You can reference the other file, by name, I would probably err on the side of putting them in the same file.
|
The 3 files have been replaced with a singular file including all 3 shaders and some comments explaining the file |
|
This all looks good, merging now. |
Vulkan support for Windows and X11. Adding support for other platforms shouldn't be too difficult (assuming the platforms support the features used in the batched renderer). The compiled SPIR-V shaders are in the tree (and have a separate clean target) so contributers don't need the glslangValidator program if they want to regenerate rawdraw_sf.h
Requirements for the batched renderer:
Vulkan 1.3 with Dynamic Rendering and Synchronization2
VK_KHR_surface
VK_KHR_swapchain
VK_KHR_debug_utils (if using validation layers)