vkvg: android / enable scalarBlockLayout
Android currently does not build because Vulkan 1.2 is not supported. I’m not particularly familiar with Vulkan, but I think these steps are needed.
VK_MAKE_API_VERSION
is not present, so just fallback toVK_MAKE_VERSION
ifVK_MAKE_API_VERSION
is not defined (vkh_app.c).- Use ‘#ifdef VK_VERSION_1_2’ to guard against the usage of
VkPhysicalDeviceVulkan12Features
- If Vulkan 1.2 is detected at runtime, set
scalarBlockLayout
inVkPhysicalDeviceVulkan12Features
- Otherwise, if
VK_EXT_scalar_block_layout
is detected setscalarBlockLayout
inVkPhysicalDeviceScalarBlockLayoutFeaturesEXT
and pointpNext
to this struct. - Fallback to default layout???
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 18 (10 by maintainers)
I’ve merge both fixes on master this morning, and remote git https://github.com/jpbruyere/vkvg/tree/master/src/recording/vkvg_record_internal.h looks good to me, try maybe with a clean git clone, sometimes with rebase there are some changes in remote history that are not applied locally. Wait, that’s recording=false, I check…ok you’re right, I make the fix now. Done, the fix is pushed on master, thanks for the report.
I’ve pushed a fix #104
So I don’t automatically enable scalar block if version = 1.2, but by default the option is enabled.
Awesome, thanks. One more suggestion: Latest NDK defines VK_VERSION_1_2, even though few android devices support it, and you use this to set
VKVG_VK_SCALAR_BLOCK_SUPPORTED
. So with the latest NDK, I can’t disable scalar block layout. Maybe the cmake setting to be to force disable scalar block?VK_MAKE_API_VERSION fix, is pushed with note on readme for min vulkan version, for the return values, it’s on my todo list, thanks again.
or just:
One more comment.
vkGetPhysicalDeviceFeatures2
is a 1.1 feature, maybe update the readme that 1.1 is a minumum requirement.