aboutsummaryrefslogtreecommitdiff
path: root/layers/swapchain.cpp
AgeCommit message (Collapse)Author
2016-06-09layers: PR573, Handle imageArraySize renameDavid McFarland
Swapchain layer had stale references -- rename things still using imageArraySize instead of imageArrayLayers. Change-Id: Iaa4500ab8cf55e50b96636a50136605dd3e6d83e
2016-06-06layers: Add default layer error message configMark Lobodzinski
Allows layers to output error messages even if no vk_layer_settings.txt config file is present. Sets defaults to LOG_MSG, error, stdout. A layer settings file will override any default values. If no settings file is present and an app creates a debug callback, the default callbacks will be removed and unregistered. Change-Id: I49f37189665816df58c258b9e9629f2bf76751c8
2016-06-02layers: simplify v0 function implementationsChia-I Wu
Since each of the layer library contains only a layer, we can simplify v0 functions by making them wrappers to the contained layer's corresponding commands. While we have to make changes to each layer individually, all the changes should be the same in spirit. The exception is vk-layer-generate.py where the missing vkEnumerateDeviceExtensionProperties is also added.
2016-05-24layers: Use correct log_msg calls in swapchainMark Lobodzinski
Swapchain layer was making a couple of calls directly to debug_report_log_msg instead of going through log_msg. Change-Id: I206210bb0d109778c90283144075a77fc459210b
2016-05-13layers: PR512 Fix swapchain's validateCreateSwapchainKHR()Ian Elliott
It used to dereference pCreateInfo, even when it was NULL.
2016-05-13swapchain: avoid invalid GIPA call in vkCreateDeviceChia-I Wu
Save VkInstance in layer_data so that we query vkCreateDevice with a valid instance.
2016-05-13swapchain: improve GetInstanceProcAddrChia-I Wu
Handle device commands as well. Move handling of interface functions to v0's vkGetInstanceProcAddr.
2016-05-13swapchain: refactor GetInstanceProcAddrChia-I Wu
Split command intercepting out to intercept_core_instance_command and intercept_khr_surface_command.
2016-05-13swapchain: add intercept_khr_swapchain_commandChia-I Wu
It returns the function pointers for all intercepted VK_KHR_swapchain commands. Call intercept_khr_swapchain_command from GetDeviceProcAddr.
2016-05-13swapchain: add intercept_core_device_commandChia-I Wu
It returns the function pointers for all intercepted core device commands. Call intercept_core_device_command from GetDeviceProcAddr. Assert that device is valid in GetDeviceProcAddr.
2016-05-13swapchain: improve EnumerateDeviceExtensionPropertiesChia-I Wu
Call down the next layer unless pLayerName is swapchain.
2016-05-13swapchain: add swapchain::swapchain_layerChia-I Wu
Replace swapchain_layers with swapchain_layer. There is no plan to define more than one layer in the same namespace.
2016-05-13swapchain: drop vk prefix for layer functionsChia-I Wu
Drop VK_LAYER_EXPORT as well.
2016-05-13swapchain: put layer functions into a namespaceChia-I Wu
Put all layer fucntions/data into swapchain namespace. I had to add some wrappers to make everything work.
2016-05-13swapchain: move vkEnumerate*Properties aroundChia-I Wu
Move them toward the end of the file.
2016-05-05layers: #471 swapchin layer to use find() for map lookupsIan Elliott
This fixes a long-standing (day-1) defect in the swapchain layer (perhaps cloned from another layer at the time?). Several unordered maps are used to keep track of things. The layer was using the [] operator for both adding a new entry to a map, and for looking up entries that should already be in a map. This latter usage is where the bug is. If a handle is passed in that hasn't been seen before, the use of the [] operator will add a new entry to the map--one that hasn't been initialized. The new EnableWsiBeforeUse test caused a crash in the swapchain layer when it used VK_NULL_HANDLE. The new code uses the find() element-lookup function of the unordere map class, and compares this to end(). If the found value is equal to end() (i.e. it currently isn't in the map), NULL is used for the pointer (the desired behavior in the swapchain layer). Two new macros were used in order to keep the code minimal and consistent in its use of find()/end().
2016-05-05layers: Fix "count" tests in swapchain layer.Ian Elliott
The swapchain layer was attempting to test if the application gave a value for a *Count variable (e.g. pSurfaceFormatCount for the vkGetPhysicalDeviceSurfaceFormatsKHR() function) that was larger than what that function returned previously (i.e. when the non-count variable was NULL). However, the test was made after calling down the call-chain, which may modify the value given by the application. This test is now made before calling down the chain. In addition, a new test is made that tries to ensure that the application did call the function with the non-Count variable equal to NULL **before** calling the function with a non-NULL non-Count variable.
2016-05-05layers: #486 Add some missing spaces where needed ...baldurk
Original commit message: Add some missing spaces where needed, hidden by string concatenation
2016-05-05layers: #484 Remove stray newline in swapchain validation message.Jamie Madill
2016-05-02layers: Add extension-enabled check to vkDestroySurfaceKHR().Ian Elliott
Because the WSI functions are statically exported (i.e. no need to call gpa() functions), the swapchain layer is supposed to issue an error if any WSI function is called without its corresponding extension being enabled. For example, the VK_KHR_swapchain extension must be enabled before the vkCreateSwapchainKHR() function is called.
2016-04-28layers: Use tmp callback for msgs during vk{Create|Destroy}Instance().Ian Elliott
This is implements some relatively-new functionality of the VK_EXT_debug_report extension. An application can pass VkDebugReportCallbackCreateInfoEXT structs on the pNext chain given to vkCreateInstance(), in order to setup one or more callbacks that can be used during vk{Create|Destroy}Instance(). These special, "temporary callbacks" allow messages (e.g. errors) to be logged during the time when the debug_report extension is normally not setup. A set of utilities copy VkDebugReportCallbackCreateInfoEXT structs from the pNext chain given to vkCreateInstance(). These utilities are used by the validation layers that may have messages (e.g. errors) during vk{Create|Destroy}Instance().
2016-04-19misc: Update licenses to Apache 2.0Jon Ashburn
Change-Id: Id447f4c8c53d33f9192940bdd3ae727b7b738a97
2016-04-18layers: swapchain - use std mutexJeremy Hayes
Change-Id: I2c5584a5d36edc097b061db2e49fba2505bd1d65
2016-04-07MR 289: layers: Changed other text/variables from "owned" to "acquired".Ian Elliott
2016-04-07MR 289: layers: Change the test about "too many images".Ian Elliott
Given new spec language coming out in early April (clarifying various aspects of acquiring presentable images), a change was needed to the WSI-swapchain validation layer. The new validate-layer test will work for "BlitModel" drivers that advertise a minImageCount of 1. Failing the test now results in an error instead of a performance warning.
2016-04-06layers: Fix unsafe bool mix warnings (part 2)Dustin Graves
Fixes the MSVS warnings regarding unsafe mix of VkBool32 and bool for the device_limits, image, parameter_validation, and threading layers. Converts all Boolean usage internal to the layers to bool/true/false. The VK_TRUE and VK_FALSE values continue to be used with the Vulkan API components. Change-Id: I612d3f26050fadcd77ffca4d8723a7c734613816
2016-04-04layers: Fix 7 signed/unsigned comparison warnings on VS2015Michael Mc Donnell
2016-03-23layers: GH117: Change warning to an error.Ian Elliott
2016-03-23layers: GH117: swapchain layer warns if app uses neither semaphore nor fence.Ian Elliott
This addresses github issue #117. Applications should call vkAcquireNextImageKHR with either a valid semaphore and/or fence. Issue a warning if both are set to VK_NULL_HANDLE.
2016-03-22misc: Update to header version 1.0.6Jon Ashburn
Change-Id: Idf7a9d40278b796e16effa54e9b60668d275b8ec
2016-03-21layers: GH156 (bug-155): Check for WSI enablesCourtney Goeltzenleuchter
https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/issues/155
2016-03-16layers: Move layer debug action initialization into layer_utilsMark Lobodzinski
Also removed dead code from the layer generation script. Change-Id: I64fdcaaf1aed8152de62079568c8e247333d8c61
2016-03-15layers: PR118, Remove erroneous validation error from swapchainszdarkhack
Remove error when selecting VK_PRESENT_MODE_FIFO_KHR (required to be supported) without enumerating the supported presentation modes first. Change-Id: Iacc8fa55dec1b1f72011041813b423f95912a092
2016-03-08layers: clang-format layers directoryJon Ashburn
Change-Id: I318e3759829f33441e57aafedec1e9ec06d658c4
2016-02-29layers: GL107, Validate queueFamilyIndices for CreateSwapchainMark Lobodzinski
2016-02-24layers: Make layer option names more consistent and update docsMark Lobodzinski
2016-02-22loader: Fix Wayland supportJason Ekstrand
All that was needed was to fix some misplaced braces, fix a couple of copy+paste problems from Mir, and add a lookup function. Getting Mir support working should be pretty easy. Conflicts: layers/swapchain.cpp
2016-02-18layers: MR221: Android needs Enumerate*PropertiesCourtney Goeltzenleuchter
Android queries information about layers and extensions from the layers via the Enumerate*Properties calls so need them to function correctly. This patch adds missing functions. ---------------------------
2016-02-18layers: MR221: Update extension info to match json filesCourtney Goeltzenleuchter
2016-02-18swapchain: MR221: Use proper layer nameCourtney Goeltzenleuchter
2016-02-18layers: MR221: Fix implementationVersionCourtney Goeltzenleuchter
2016-02-10Remove Khronos confidential clause from license text.Karl Schultz
2016-02-10layers: Enable Wall and Werror.Michael Lentine
2016-02-05layers: MR217 Fix Android build of swapchainCody Northrop
2016-02-04layers: Fix vkEnumeratePhysicalDevices()--was always returning an error.Ian Elliott
2016-02-04layers: Move logging callback destroy after logging callsMark Lobodzinski
Swapchain was using deleted memory pointer causing crashes in windows. Conflicts: layers/swapchain.cpp
2016-02-04layers: MR212 Add locking to the swapchain layer.Ian Elliott
2016-02-04layers: MR209 Fix swapchain's vkDestroyInstance to error about devices ...Ian Elliott
not being previously destroyed, instead of physical devices not being previously destroyed.
2016-02-03Revert "layers: Clang-format changes for files in layers dir of repo"Mark Lobodzinski
This reverts commit e260acfb96ea20945149ede6a250ef622ca7fd03. The clang-format changes need to be postponed until just prior to public release to facilitate MRs.
2016-02-02layers: Clang-format changes for files in layers dir of repoMark Lobodzinski