Skip to content

Conversation

@Kylogias
Copy link
Contributor

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)

CNFG_BATCH no longer implies CNFGOGL
@Kylogias Kylogias force-pushed the cnfg-vk branch 3 times, most recently from cf80c2d to b7058e9 Compare August 16, 2025 18:25
vk/cnfgbatch.h Outdated
Copy link
Member

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.

Copy link
Contributor Author

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

Copy link
Member

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!

Copy link
Member

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.

Copy link
Contributor Author

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

Copy link
Member

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.

@Kylogias
Copy link
Contributor Author

The 3 files have been replaced with a singular file including all 3 shaders and some comments explaining the file

@cnlohr
Copy link
Member

cnlohr commented Aug 18, 2025

This all looks good, merging now.

@cnlohr cnlohr merged commit 74fad23 into cntools:master Aug 18, 2025
1 check passed
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

Successfully merging this pull request may close these issues.

2 participants