@@ -1364,10 +1364,10 @@ static void demo_prepare_buffers(struct demo *demo) {
13641364 .format = demo -> format ,
13651365 .components =
13661366 {
1367- .r = VK_COMPONENT_SWIZZLE_R ,
1368- .g = VK_COMPONENT_SWIZZLE_G ,
1369- .b = VK_COMPONENT_SWIZZLE_B ,
1370- .a = VK_COMPONENT_SWIZZLE_A ,
1367+ .r = VK_COMPONENT_SWIZZLE_IDENTITY ,
1368+ .g = VK_COMPONENT_SWIZZLE_IDENTITY ,
1369+ .b = VK_COMPONENT_SWIZZLE_IDENTITY ,
1370+ .a = VK_COMPONENT_SWIZZLE_IDENTITY ,
13711371 },
13721372 .subresourceRange =
13731373 {.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) {
17291729 .format = tex_format ,
17301730 .components =
17311731 {
1732- VK_COMPONENT_SWIZZLE_R ,
1733- VK_COMPONENT_SWIZZLE_G ,
1734- VK_COMPONENT_SWIZZLE_B ,
1735- VK_COMPONENT_SWIZZLE_A ,
1732+ VK_COMPONENT_SWIZZLE_IDENTITY ,
1733+ VK_COMPONENT_SWIZZLE_IDENTITY ,
1734+ VK_COMPONENT_SWIZZLE_IDENTITY ,
1735+ VK_COMPONENT_SWIZZLE_IDENTITY ,
17361736 },
17371737 .subresourceRange = {VK_IMAGE_ASPECT_COLOR_BIT , 0 , 1 , 0 , 1 },
17381738 .flags = 0 ,
@@ -3136,6 +3136,9 @@ static void demo_init_vk(struct demo *demo) {
31363136 demo -> extension_names [demo -> enabled_extension_count ++ ] = VK_EXT_METAL_SURFACE_EXTENSION_NAME ;
31373137 }
31383138#endif
3139+ if (!strcmp (VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME , instance_extensions [i ].extensionName )) {
3140+ demo -> extension_names [demo -> enabled_extension_count ++ ] = VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME ;
3141+ }
31393142 if (!strcmp (VK_EXT_DEBUG_UTILS_EXTENSION_NAME , instance_extensions [i ].extensionName )) {
31403143 if (demo -> validate ) {
31413144 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) {
33083311 swapchainExtFound = 1 ;
33093312 demo -> extension_names [demo -> enabled_extension_count ++ ] = VK_KHR_SWAPCHAIN_EXTENSION_NAME ;
33103313 }
3314+ if (!strcmp (VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME , device_extensions [i ].extensionName )) {
3315+ demo -> extension_names [demo -> enabled_extension_count ++ ] = VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME ;
3316+ }
33113317 assert (demo -> enabled_extension_count < 64 );
33123318 }
33133319
0 commit comments