aboutsummaryrefslogtreecommitdiff
path: root/cube/cube.c
diff options
context:
space:
mode:
authorRichard S. Wright Jr <richard@lunarg.com>2021-01-06 13:03:18 -0500
committerRichard S. Wright Jr <58573781+richard-lunarg@users.noreply.github.com>2021-01-06 16:44:29 -0500
commitca51bc7d1325cbfd66cd52f1f0898e5311d9120e (patch)
treef1ace559fa5e2e9bd82e88369e16ab8efa7c1c4c /cube/cube.c
parent4cc0932495ec1eb132c309473b8efc0b6b0d75b3 (diff)
downloadusermoji-ca51bc7d1325cbfd66cd52f1f0898e5311d9120e.tar.xz
vkcube: Updated to support portability extension properly
Diffstat (limited to 'cube/cube.c')
-rw-r--r--cube/cube.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/cube/cube.c b/cube/cube.c
index 975f8a85..ec430478 100644
--- a/cube/cube.c
+++ b/cube/cube.c
@@ -1364,10 +1364,10 @@ static void demo_prepare_buffers(struct demo *demo) {
.format = demo->format,
.components =
{
- .r = VK_COMPONENT_SWIZZLE_R,
- .g = VK_COMPONENT_SWIZZLE_G,
- .b = VK_COMPONENT_SWIZZLE_B,
- .a = VK_COMPONENT_SWIZZLE_A,
+ .r = VK_COMPONENT_SWIZZLE_IDENTITY,
+ .g = VK_COMPONENT_SWIZZLE_IDENTITY,
+ .b = VK_COMPONENT_SWIZZLE_IDENTITY,
+ .a = VK_COMPONENT_SWIZZLE_IDENTITY,
},
.subresourceRange =
{.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT, .baseMipLevel = 0, .levelCount = 1, .baseArrayLayer = 0, .layerCount = 1},
@@ -1729,10 +1729,10 @@ static void demo_prepare_textures(struct demo *demo) {
.format = tex_format,
.components =
{
- VK_COMPONENT_SWIZZLE_R,
- VK_COMPONENT_SWIZZLE_G,
- VK_COMPONENT_SWIZZLE_B,
- VK_COMPONENT_SWIZZLE_A,
+ VK_COMPONENT_SWIZZLE_IDENTITY,
+ VK_COMPONENT_SWIZZLE_IDENTITY,
+ VK_COMPONENT_SWIZZLE_IDENTITY,
+ VK_COMPONENT_SWIZZLE_IDENTITY,
},
.subresourceRange = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1},
.flags = 0,
@@ -3136,6 +3136,9 @@ static void demo_init_vk(struct demo *demo) {
demo->extension_names[demo->enabled_extension_count++] = VK_EXT_METAL_SURFACE_EXTENSION_NAME;
}
#endif
+ if (!strcmp(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME, instance_extensions[i].extensionName)) {
+ demo->extension_names[demo->enabled_extension_count++] = VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME;
+ }
if (!strcmp(VK_EXT_DEBUG_UTILS_EXTENSION_NAME, instance_extensions[i].extensionName)) {
if (demo->validate) {
demo->extension_names[demo->enabled_extension_count++] = VK_EXT_DEBUG_UTILS_EXTENSION_NAME;
@@ -3308,6 +3311,9 @@ static void demo_init_vk(struct demo *demo) {
swapchainExtFound = 1;
demo->extension_names[demo->enabled_extension_count++] = VK_KHR_SWAPCHAIN_EXTENSION_NAME;
}
+ if (!strcmp(VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME, device_extensions[i].extensionName)) {
+ demo->extension_names[demo->enabled_extension_count++] = VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME;
+ }
assert(demo->enabled_extension_count < 64);
}