uint32_t i;
VkLayerDispatchTable *pDisp = device_dispatch_table(device);
PFN_vkGetDeviceProcAddr gpa = pDisp->GetDeviceProcAddr;
- pDisp->GetPhysicalDeviceSurfaceCapabilitiesKHR = (PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR) gpa(device, "vkGetPhysicalDeviceSurfaceCapabilitiesKHR");
- pDisp->GetPhysicalDeviceSurfaceFormatsKHR = (PFN_vkGetPhysicalDeviceSurfaceFormatsKHR) gpa(device, "vkGetPhysicalDeviceSurfaceFormatsKHR");
- pDisp->GetPhysicalDeviceSurfacePresentModesKHR = (PFN_vkGetPhysicalDeviceSurfacePresentModesKHR) gpa(device, "vkGetPhysicalDeviceSurfacePresentModesKHR");
pDisp->CreateSwapchainKHR = (PFN_vkCreateSwapchainKHR) gpa(device, "vkCreateSwapchainKHR");
pDisp->DestroySwapchainKHR = (PFN_vkDestroySwapchainKHR) gpa(device, "vkDestroySwapchainKHR");
pDisp->GetSwapchainImagesKHR = (PFN_vkGetSwapchainImagesKHR) gpa(device, "vkGetSwapchainImagesKHR");
VkLayerInstanceDispatchTable *pDisp = instance_dispatch_table(instance);
PFN_vkGetInstanceProcAddr gpa = pDisp->GetInstanceProcAddr;
pDisp->GetPhysicalDeviceSurfaceSupportKHR = (PFN_vkGetPhysicalDeviceSurfaceSupportKHR) gpa(instance, "vkGetPhysicalDeviceSurfaceSupportKHR");
+ pDisp->GetPhysicalDeviceSurfaceCapabilitiesKHR = (PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR) gpa(instance, "vkGetPhysicalDeviceSurfaceCapabilitiesKHR");
+ pDisp->GetPhysicalDeviceSurfaceFormatsKHR = (PFN_vkGetPhysicalDeviceSurfaceFormatsKHR) gpa(instance, "vkGetPhysicalDeviceSurfaceFormatsKHR");
+ pDisp->GetPhysicalDeviceSurfacePresentModesKHR = (PFN_vkGetPhysicalDeviceSurfacePresentModesKHR) gpa(instance, "vkGetPhysicalDeviceSurfacePresentModesKHR");
instanceExtMap[pDisp].wsi_enabled = false;
for (i = 0; i < pCreateInfo->enabledExtensionNameCount; i++) {
if (strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_KHR_SURFACE_EXTENSION_NAME) == 0)
VkLayerDispatchTable *pDisp = dev_data->device_dispatch_table;
PFN_vkGetDeviceProcAddr gpa = pDisp->GetDeviceProcAddr;
- pDisp->GetSurfacePropertiesKHR = (PFN_vkGetSurfacePropertiesKHR) gpa(device, "vkGetSurfacePropertiesKHR");
- pDisp->GetSurfaceFormatsKHR = (PFN_vkGetSurfaceFormatsKHR) gpa(device, "vkGetSurfaceFormatsKHR");
- pDisp->GetSurfacePresentModesKHR = (PFN_vkGetSurfacePresentModesKHR) gpa(device, "vkGetSurfacePresentModesKHR");
pDisp->CreateSwapchainKHR = (PFN_vkCreateSwapchainKHR) gpa(device, "vkCreateSwapchainKHR");
pDisp->DestroySwapchainKHR = (PFN_vkDestroySwapchainKHR) gpa(device, "vkDestroySwapchainKHR");
pDisp->GetSwapchainImagesKHR = (PFN_vkGetSwapchainImagesKHR) gpa(device, "vkGetSwapchainImagesKHR");
pDisp->QueuePresentKHR = (PFN_vkQueuePresentKHR) gpa(device, "vkQueuePresentKHR");
for (i = 0; i < pCreateInfo->enabledExtensionNameCount; i++) {
- if (strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_EXT_KHR_DEVICE_SWAPCHAIN_EXTENSION_NAME) == 0) {
+ if (strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_KHR_SWAPCHAIN_EXTENSION_NAME) == 0) {
dev_data->device_extensions.wsi_enabled = true;
}
if (strcmp(pCreateInfo->ppEnabledExtensionNames[i], DEBUG_MARKER_EXTENSION_NAME) == 0) {
VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateSwapchainKHR(
VkDevice device,
const VkSwapchainCreateInfoKHR *pCreateInfo,
+ const VkAllocationCallbacks *pAllocator,
VkSwapchainKHR *pSwapchain)
{
layer_data* dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map);
- VkResult result = dev_data->device_dispatch_table->CreateSwapchainKHR(device, pCreateInfo, pSwapchain);
+ VkResult result = dev_data->device_dispatch_table->CreateSwapchainKHR(device, pCreateInfo, pAllocator, pSwapchain);
if (VK_SUCCESS == result) {
SWAPCHAIN_NODE *swapchain_data = new SWAPCHAIN_NODE;
return result;
}
-VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkDestroySwapchainKHR(
+VK_LAYER_EXPORT VKAPI_ATTR void VKAPI_CALL vkDestroySwapchainKHR(
VkDevice device,
- VkSwapchainKHR swapchain)
+ VkSwapchainKHR swapchain,
+ const VkAllocationCallbacks *pAllocator)
{
layer_data* dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map);
dev_data->device_extensions.swapchainMap.erase(swapchain);
}
loader_platform_thread_unlock_mutex(&globalLock);
- return dev_data->device_dispatch_table->DestroySwapchainKHR(device, swapchain);
+ return dev_data->device_dispatch_table->DestroySwapchainKHR(device, swapchain, pAllocator);
}
VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkGetSwapchainImagesKHR(
return result;
}
-VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkQueuePresentKHR(VkQueue queue, VkPresentInfoKHR* pPresentInfo)
+VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkQueuePresentKHR(VkQueue queue, const VkPresentInfoKHR* pPresentInfo)
{
layer_data* dev_data = get_my_data_ptr(get_dispatch_key(queue), layer_data_map);
bool skip_call = false;
if (pPresentInfo) {
for (uint32_t i = 0; i < pPresentInfo->swapchainCount; ++i) {
- auto swapchain_data = dev_data->device_extensions.swapchainMap.find(pPresentInfo->swapchains[i]);
- if (swapchain_data != dev_data->device_extensions.swapchainMap.end() && pPresentInfo->imageIndices[i] < swapchain_data->second->images.size()) {
- VkImage image = swapchain_data->second->images[pPresentInfo->imageIndices[i]];
+ auto swapchain_data = dev_data->device_extensions.swapchainMap.find(pPresentInfo->pSwapchains[i]);
+ if (swapchain_data != dev_data->device_extensions.swapchainMap.end() && pPresentInfo->pImageIndices[i] < swapchain_data->second->images.size()) {
+ VkImage image = swapchain_data->second->images[pPresentInfo->pImageIndices[i]];
auto image_data = dev_data->imageLayoutMap.find(image);
if (image_data != dev_data->imageLayoutMap.end()) {
- if (image_data->second->layout != VK_IMAGE_LAYOUT_PRESENT_SOURCE_KHR) {
+ if (image_data->second->layout != VK_IMAGE_LAYOUT_PRESENT_SRC_KHR) {
skip_call |= log_msg(dev_data->report_data, VK_DBG_REPORT_ERROR_BIT, VK_OBJECT_TYPE_QUEUE, (uint64_t)queue, 0, DRAWSTATE_INVALID_IMAGE_LAYOUT, "DS",
"Images passed to present must be in layout PRESENT_SOURCE_KHR but is in %d", image_data->second->layout);
}
uint32_t i;
VkLayerDispatchTable *pDisp = device_dispatch_table(device);
PFN_vkGetDeviceProcAddr gpa = pDisp->GetDeviceProcAddr;
- pDisp->GetSurfacePropertiesKHR = (PFN_vkGetSurfacePropertiesKHR) gpa(device, "vkGetSurfacePropertiesKHR");
- pDisp->GetSurfaceFormatsKHR = (PFN_vkGetSurfaceFormatsKHR) gpa(device, "vkGetSurfaceFormatsKHR");
- pDisp->GetSurfacePresentModesKHR = (PFN_vkGetSurfacePresentModesKHR) gpa(device, "vkGetSurfacePresentModesKHR");
pDisp->CreateSwapchainKHR = (PFN_vkCreateSwapchainKHR) gpa(device, "vkCreateSwapchainKHR");
pDisp->DestroySwapchainKHR = (PFN_vkDestroySwapchainKHR) gpa(device, "vkDestroySwapchainKHR");
pDisp->GetSwapchainImagesKHR = (PFN_vkGetSwapchainImagesKHR) gpa(device, "vkGetSwapchainImagesKHR");
deviceExtMap[pDisp].wsi_enabled = false;
for (i = 0; i < pCreateInfo->enabledExtensionNameCount; i++) {
- if (strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_EXT_KHR_DEVICE_SWAPCHAIN_EXTENSION_NAME) == 0)
+ if (strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_KHR_SWAPCHAIN_EXTENSION_NAME) == 0)
deviceExtMap[pDisp].wsi_enabled = true;
}
VkLayerInstanceDispatchTable *pDisp = instance_dispatch_table(instance);
PFN_vkGetInstanceProcAddr gpa = pDisp->GetInstanceProcAddr;
pDisp->GetPhysicalDeviceSurfaceSupportKHR = (PFN_vkGetPhysicalDeviceSurfaceSupportKHR) gpa(instance, "vkGetPhysicalDeviceSurfaceSupportKHR");
+ pDisp->GetPhysicalDeviceSurfaceCapabilitiesKHR = (PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR) gpa(instance, "vkGetPhysicalDeviceSurfaceCapabilitiesKHR");
+ pDisp->GetPhysicalDeviceSurfaceFormatsKHR = (PFN_vkGetPhysicalDeviceSurfaceFormatsKHR) gpa(instance, "vkGetPhysicalDeviceSurfaceFormatsKHR");
+ pDisp->GetPhysicalDeviceSurfacePresentModesKHR = (PFN_vkGetPhysicalDeviceSurfacePresentModesKHR) gpa(instance, "vkGetPhysicalDeviceSurfacePresentModesKHR");
instanceExtMap[pDisp].wsi_enabled = false;
for (i = 0; i < pCreateInfo->enabledExtensionNameCount; i++) {
- if (strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_EXT_KHR_SWAPCHAIN_EXTENSION_NAME) == 0)
+ if (strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_KHR_SURFACE_EXTENSION_NAME) == 0)
instanceExtMap[pDisp].wsi_enabled = true;
}
static inline uint32_t validate_VkImageLayoutKHR(VkImageLayout input_value)
{
return ((validate_VkImageLayout(input_value) == 1) ||
- (input_value == VK_IMAGE_LAYOUT_PRESENT_SOURCE_KHR));
+ (input_value == VK_IMAGE_LAYOUT_PRESENT_SRC_KHR));
}
VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateImage(VkDevice device, const VkImageCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkImage* pImage)
memset(pCI, 0, sizeof(MT_OBJ_BINDING_INFO));
pCI->mem = MEMTRACKER_SWAP_CHAIN_IMAGE_KEY;
pCI->create_info.image.usage =
- const_cast<VkSwapchainCreateInfoKHR*>(static_cast<const VkSwapchainCreateInfoKHR *>(pCreateInfo))->imageUsageFlags;
+ const_cast<VkSwapchainCreateInfoKHR*>(static_cast<const VkSwapchainCreateInfoKHR *>(pCreateInfo))->imageUsage;
break;
}
}
layer_data *my_device_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map);
VkLayerDispatchTable *pDisp = my_device_data->device_dispatch_table;
PFN_vkGetDeviceProcAddr gpa = pDisp->GetDeviceProcAddr;
- pDisp->GetPhysicalDeviceSurfaceCapabilitiesKHR = (PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR) gpa(device, "vkGetPhysicalDeviceSurfaceCapabilitiesKHR");
- pDisp->GetPhysicalDeviceSurfaceFormatsKHR = (PFN_vkGetPhysicalDeviceSurfaceFormatsKHR) gpa(device, "vkGetPhysicalDeviceSurfaceFormatsKHR");
- pDisp->GetPhysicalDeviceSurfacePresentModesKHR = (PFN_vkGetPhysicalDeviceSurfacePresentModesKHR) gpa(device, "vkGetPhysicalDeviceSurfacePresentModesKHR");
pDisp->CreateSwapchainKHR = (PFN_vkCreateSwapchainKHR) gpa(device, "vkCreateSwapchainKHR");
pDisp->DestroySwapchainKHR = (PFN_vkDestroySwapchainKHR) gpa(device, "vkDestroySwapchainKHR");
pDisp->GetSwapchainImagesKHR = (PFN_vkGetSwapchainImagesKHR) gpa(device, "vkGetSwapchainImagesKHR");
VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateSwapchainKHR(
VkDevice device,
const VkSwapchainCreateInfoKHR *pCreateInfo,
+ const VkAllocationCallbacks *pAllocator,
VkSwapchainKHR *pSwapchain)
{
layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map);
- VkResult result = my_data->device_dispatch_table->CreateSwapchainKHR(device, pCreateInfo, pSwapchain);
+ VkResult result = my_data->device_dispatch_table->CreateSwapchainKHR(device, pCreateInfo, pAllocator, pSwapchain);
if (VK_SUCCESS == result) {
loader_platform_thread_lock_mutex(&globalLock);
return result;
}
-VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkDestroySwapchainKHR(
- VkDevice device,
- VkSwapchainKHR swapchain)
+VK_LAYER_EXPORT VKAPI_ATTR void VKAPI_CALL vkDestroySwapchainKHR(
+ VkDevice device,
+ VkSwapchainKHR swapchain,
+ const VkAllocationCallbacks *pAllocator)
{
layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map);
VkBool32 skipCall = VK_FALSE;
- VkResult result = VK_ERROR_VALIDATION_FAILED;
loader_platform_thread_lock_mutex(&globalLock);
if (my_data->swapchainMap.find(swapchain) != my_data->swapchainMap.end()) {
MT_SWAP_CHAIN_INFO* pInfo = my_data->swapchainMap[swapchain];
}
loader_platform_thread_unlock_mutex(&globalLock);
if (VK_FALSE == skipCall) {
- result = my_data->device_dispatch_table->DestroySwapchainKHR(device, swapchain);
+ my_data->device_dispatch_table->DestroySwapchainKHR(device, swapchain, pAllocator);
}
- return result;
}
VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkGetSwapchainImagesKHR(
VkSwapchainKHR swapchain,
uint64_t timeout,
VkSemaphore semaphore,
+ VkFence fence,
uint32_t *pImageIndex)
{
layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map);
loader_platform_thread_unlock_mutex(&globalLock);
if (VK_FALSE == skipCall) {
result = my_data->device_dispatch_table->AcquireNextImageKHR(device,
- swapchain, timeout, semaphore, pImageIndex);
+ swapchain, timeout, semaphore, fence, pImageIndex);
}
return result;
}
layer_data *my_device_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map);
VkLayerDispatchTable *pDisp = get_dispatch_table(ObjectTracker_device_table_map, device);
PFN_vkGetDeviceProcAddr gpa = pDisp->GetDeviceProcAddr;
- pDisp->GetPhysicalDeviceSurfaceCapabilitiesKHR = (PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR) gpa(device, "vkGetPhysicalDeviceSurfaceCapabilitiesKHR");
- pDisp->GetPhysicalDeviceSurfaceFormatsKHR = (PFN_vkGetPhysicalDeviceSurfaceFormatsKHR) gpa(device, "vkGetPhysicalDeviceSurfaceFormatsKHR");
- pDisp->GetPhysicalDeviceSurfacePresentModesKHR = (PFN_vkGetPhysicalDeviceSurfacePresentModesKHR) gpa(device, "vkGetPhysicalDeviceSurfacePresentModesKHR");
pDisp->CreateSwapchainKHR = (PFN_vkCreateSwapchainKHR) gpa(device, "vkCreateSwapchainKHR");
pDisp->DestroySwapchainKHR = (PFN_vkDestroySwapchainKHR) gpa(device, "vkDestroySwapchainKHR");
pDisp->GetSwapchainImagesKHR = (PFN_vkGetSwapchainImagesKHR) gpa(device, "vkGetSwapchainImagesKHR");
VkLayerInstanceDispatchTable *pDisp = get_dispatch_table(ObjectTracker_instance_table_map, instance);
PFN_vkGetInstanceProcAddr gpa = pDisp->GetInstanceProcAddr;
pDisp->GetPhysicalDeviceSurfaceSupportKHR = (PFN_vkGetPhysicalDeviceSurfaceSupportKHR) gpa(instance, "vkGetPhysicalDeviceSurfaceSupportKHR");
+ pDisp->GetPhysicalDeviceSurfaceCapabilitiesKHR = (PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR) gpa(instance, "vkGetPhysicalDeviceSurfaceCapabilitiesKHR");
+ pDisp->GetPhysicalDeviceSurfaceFormatsKHR = (PFN_vkGetPhysicalDeviceSurfaceFormatsKHR) gpa(instance, "vkGetPhysicalDeviceSurfaceFormatsKHR");
+ pDisp->GetPhysicalDeviceSurfacePresentModesKHR = (PFN_vkGetPhysicalDeviceSurfacePresentModesKHR) gpa(instance, "vkGetPhysicalDeviceSurfacePresentModesKHR");
instanceExtMap[pDisp].wsi_enabled = false;
for (i = 0; i < pCreateInfo->enabledExtensionNameCount; i++) {
if (strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_KHR_SURFACE_EXTENSION_NAME) == 0)
loader_platform_thread_unlock_mutex(&objLock);
}
-VkResult
+void
explicit_DestroySwapchainKHR(
- VkDevice device,
- VkSwapchainKHR swapchain)
+ VkDevice device,
+ VkSwapchainKHR swapchain,
+ const VkAllocationCallbacks *pAllocator)
{
loader_platform_thread_lock_mutex(&objLock);
// A swapchain's images are implicitly deleted when the swapchain is deleted.
destroy_swapchain(device, swapchain);
loader_platform_thread_unlock_mutex(&objLock);
- VkResult result = get_dispatch_table(ObjectTracker_device_table_map, device)->DestroySwapchainKHR(device, swapchain);
- return result;
+ get_dispatch_table(ObjectTracker_device_table_map, device)->DestroySwapchainKHR(device, swapchain, pAllocator);
}
void
uint32_t i;
VkLayerDispatchTable *pDisp = get_dispatch_table(screenshot_device_table_map, device);
PFN_vkGetDeviceProcAddr gpa = pDisp->GetDeviceProcAddr;
- pDisp->GetSurfacePropertiesKHR = (PFN_vkGetSurfacePropertiesKHR) gpa(device, "vkGetSurfacePropertiesKHR");
- pDisp->GetSurfaceFormatsKHR = (PFN_vkGetSurfaceFormatsKHR) gpa(device, "vkGetSurfaceFormatsKHR");
- pDisp->GetSurfacePresentModesKHR = (PFN_vkGetSurfacePresentModesKHR) gpa(device, "vkGetSurfacePresentModesKHR");
pDisp->CreateSwapchainKHR = (PFN_vkCreateSwapchainKHR) gpa(device, "vkCreateSwapchainKHR");
- pDisp->DestroySwapchainKHR = (PFN_vkDestroySwapchainKHR) gpa(device, "vkDestroySwapchainKHR");
pDisp->GetSwapchainImagesKHR = (PFN_vkGetSwapchainImagesKHR) gpa(device, "vkGetSwapchainImagesKHR");
pDisp->AcquireNextImageKHR = (PFN_vkAcquireNextImageKHR) gpa(device, "vkAcquireNextImageKHR");
pDisp->QueuePresentKHR = (PFN_vkQueuePresentKHR) gpa(device, "vkQueuePresentKHR");
deviceExtMap[pDisp].wsi_enabled = false;
for (i = 0; i < pCreateInfo->enabledExtensionNameCount; i++) {
- if (strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_EXT_KHR_DEVICE_SWAPCHAIN_EXTENSION_NAME) == 0)
+ if (strcmp(pCreateInfo->ppEnabledExtensionNames[i], VK_KHR_SWAPCHAIN_EXTENSION_NAME) == 0)
deviceExtMap[pDisp].wsi_enabled = true;
}
}
VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateSwapchainKHR(
VkDevice device,
const VkSwapchainCreateInfoKHR *pCreateInfo,
+ const VkAllocationCallbacks *pAllocator,
VkSwapchainKHR *pSwapchain)
{
VkLayerDispatchTable* pTable = screenshot_device_table_map[device];
- VkResult result = get_dispatch_table(screenshot_device_table_map, device)->CreateSwapchainKHR(device, pCreateInfo, pSwapchain);
+ VkResult result = get_dispatch_table(screenshot_device_table_map, device)->CreateSwapchainKHR(device, pCreateInfo, pAllocator, pSwapchain);
loader_platform_thread_lock_mutex(&globalLock);
if (screenshotEnvQueried && screenshotFrames.empty()) {
return result;
}
-VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkQueuePresentKHR(VkQueue queue, VkPresentInfoKHR* pPresentInfo)
+VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkQueuePresentKHR(VkQueue queue, const VkPresentInfoKHR* pPresentInfo)
{
static int frameNumber = 0;
if (frameNumber == 10) {fflush(stdout); /* *((int*)0)=0; */ }
VkImage image;
VkSwapchainKHR swapchain;
// We'll dump only one image: the first
- swapchain = pPresentInfo->swapchains[0];
- image = swapchainMap[swapchain]->imageList[pPresentInfo->imageIndices[0]];
+ swapchain = pPresentInfo->pSwapchains[0];
+ image = swapchainMap[swapchain]->imageList[pPresentInfo->pImageIndices[0]];
writePPM(fileName.c_str(), image);
screenshotFrames.erase(it);
self.layer_name = "Generic"
instance_extensions=[('msg_callback_get_proc_addr', []),
('wsi_enabled',
- ['vkGetPhysicalDeviceSurfaceSupportKHR'])]
+ ['vkGetPhysicalDeviceSurfaceSupportKHR',
+ 'vkGetPhysicalDeviceSurfaceCapabilitiesKHR',
+ 'vkGetPhysicalDeviceSurfaceFormatsKHR',
+ 'vkGetPhysicalDeviceSurfacePresentModesKHR'])]
extensions=[('wsi_enabled',
- ['vkGetSurfacePropertiesKHR', 'vkGetSurfaceFormatsKHR',
- 'vkGetSurfacePresentModesKHR', 'vkCreateSwapchainKHR',
+ ['vkCreateSwapchainKHR',
'vkDestroySwapchainKHR', 'vkGetSwapchainImagesKHR',
'vkAcquireNextImageKHR', 'vkQueuePresentKHR'])]
body = [self._generate_layer_initialization(True),
def generate_body(self):
self.layer_name = "APIDump"
instance_extensions=[('wsi_enabled',
- ['vkGetPhysicalDeviceSurfaceSupportKHR'])]
+ ['vkGetPhysicalDeviceSurfaceSupportKHR',
+ 'vkGetPhysicalDeviceSurfaceCapabilitiesKHR',
+ 'vkGetPhysicalDeviceSurfaceFormatsKHR',
+ 'vkGetPhysicalDeviceSurfacePresentModesKHR'])]
extensions=[('wsi_enabled',
- ['vkGetSurfacePropertiesKHR', 'vkGetSurfaceFormatsKHR',
- 'vkGetSurfacePresentModesKHR', 'vkCreateSwapchainKHR',
+ ['vkCreateSwapchainKHR',
'vkDestroySwapchainKHR', 'vkGetSwapchainImagesKHR',
'vkAcquireNextImageKHR', 'vkQueuePresentKHR'])]
body = [self.generate_init(),
def generate_body(self):
self.layer_name = "ObjectTracker"
extensions=[('wsi_enabled',
- ['vkGetSurfacePropertiesKHR', 'vkGetSurfaceFormatsKHR',
- 'vkGetSurfacePresentModesKHR', 'vkCreateSwapchainKHR',
+ ['vkCreateSwapchainKHR',
'vkDestroySwapchainKHR', 'vkGetSwapchainImagesKHR',
'vkAcquireNextImageKHR', 'vkQueuePresentKHR'])]
instance_extensions=[('msg_callback_get_proc_addr', []),
('wsi_enabled',
- ['vkGetPhysicalDeviceSurfaceSupportKHR'])]
+ ['vkGetPhysicalDeviceSurfaceSupportKHR',
+ 'vkGetPhysicalDeviceSurfaceCapabilitiesKHR',
+ 'vkGetPhysicalDeviceSurfaceFormatsKHR',
+ 'vkGetPhysicalDeviceSurfacePresentModesKHR'])]
body = [self.generate_maps(),
self.generate_procs(),
self.generate_destroy_instance(),
sh_funcs.append('%sstringstream index_ss;' % (indent))
idx_ss_decl = True
if (stp_list[index]['name'] == 'pQueueFamilyIndices'):
- sh_funcs.append('%sif (pStruct->sharingMode == VK_SHARING_MODE_CONCURRENT) {' % (indent))
+ if (typedef_fwd_dict[s] == 'VkSwapchainCreateInfoKHR'):
+ sh_funcs.append('%sif (pStruct->imageSharingMode == VK_SHARING_MODE_CONCURRENT) {' % (indent))
+ else:
+ sh_funcs.append('%sif (pStruct->sharingMode == VK_SHARING_MODE_CONCURRENT) {' % (indent))
indent += ' '
sh_funcs.append('%sif (pStruct->%s) {' % (indent, stp_list[index]['name']))
indent += ' '
sh_funcs.append(" return final_str;")
sh_funcs.append("}")
sh_funcs.append('%s' % lineinfo.get())
- #### TODO: Get the following function moved to be in "vk_enum_string_helper.h"
- # Add function to return a string value for input VkSurfaceFormatKHR*
- sh_funcs.append("static inline const char* string_VkColorSpaceKHR(VkColorSpaceKHR input_value)\n{")
- sh_funcs.append(" switch ((VkColorSpaceKHR)input_value)")
- sh_funcs.append(" {")
- sh_funcs.append(" case VK_COLORSPACE_SRGB_NONLINEAR_KHR:")
- sh_funcs.append(" return \"VK_COLORSPACE_SRGB_NONLINEAR_KHR\";")
- sh_funcs.append(" default:")
- sh_funcs.append(" return \"Unhandled VkColorSpaceKHR\";")
- sh_funcs.append(" }")
- sh_funcs.append("}")
- sh_funcs.append('%s' % lineinfo.get())
# Add function to return a string value for input VkSurfaceFormatKHR*
sh_funcs.append("string string_convert_helper(VkSurfaceFormatKHR toString, const string prefix)\n{")
sh_funcs.append(' string final_str = prefix + "format = " + string_VkFormat(toString.format) + "format = " + string_VkColorSpaceKHR(toString.colorSpace);')
Proto("VkResult", "CreateSwapchainKHR",
[Param("VkDevice", "device"),
Param("const VkSwapchainCreateInfoKHR*", "pCreateInfo"),
+ Param("const VkAllocationCallbacks*", "pAllocator"),
Param("VkSwapchainKHR*", "pSwapchain")]),
Proto("void", "DestroySwapchainKHR",
[Param("VkDevice", "device"),
- Param("VkSwapchainKHR", "swapchain")]),
+ Param("VkSwapchainKHR", "swapchain"),
+ Param("const VkAllocationCallbacks*", "pAllocator")]),
Proto("VkResult", "GetSwapchainImagesKHR",
[Param("VkDevice", "device"),
Param("VkSwapchainKHR", "swapchain"),
Param("uint64_t", "timeout"),
Param("VkSemaphore", "semaphore"),
+ Param("VkFence", "fence"),
Param("uint32_t*", "pImageIndex")]),
Proto("VkResult", "QueuePresentKHR",
[Param("VkQueue", "queue"),
- Param("VkPresentInfoKHR*", "pPresentInfo")]),
+ Param("const VkPresentInfoKHR*", "pPresentInfo")]),
],
)
lunarg_debug_report = Extension(