aboutsummaryrefslogtreecommitdiff
path: root/layers/threading.cpp
AgeCommit message (Collapse)Author
2017-06-09layers: Simplify threadchecker GPA handlingMark Lobodzinski
Change-Id: I11cdc2f6524926714d22abd08fba0a670a3a4a97
2017-06-07layers: Free per-device and -instance data on destroyGabríel Arthúr Pétursson
Instance and device data are allocated by the first call to GetLayerDataPtr in the corresponding vkCreate call. We need to delete them when we're done with them. Introduce a FreeLayerDataPtr helper function that assists with this task. Deletes for dispatch tables were missing in a few places too. Add them.
2017-02-28layers: Special-case threading GetSwapchainImagesMark Lobodzinski
This API is a special-case for the code-gen in that it sometimes returns an array of images. These do not need to be counted by start/finishReadObject and so were moved into the non-generated part of the layer source. Change-Id: Iaaab9143abadbf025b5f3c118aa26dae3c6f1bec
2017-02-16layers: Fix AllocateDescriptorSets in threadingMark Lobodzinski
Needed to special case this routine to skip validating objects before creation. Caught in CTS testing. Change-Id: Ic1c1b69bd1d75a5742c8b709624153db6af71885
2017-02-08layers:Rename get_my_data_ptr to GetLayerDataPtrTobin Ehlis
Change utility function get_my_data_ptr() to be named GetLayerDataPtr() which is more descriptive and capital camel case in-line with coding standard.
2017-01-26repo: Clang-format LVL source files using GoogleMark Lobodzinski
Switch clang-format standard from the LLVM style to the Google style for more consistency. Change-Id: I247c4abc275d7873a91522e1e234198adaa24033
2017-01-26repo: Clang-format c/cpp/h LVL files using LLVMMark Lobodzinski
Bring all source files in the repo up to date with consistent coding style/standard. Change-Id: Iceedbc17109974d3a0437fc4995441c9ad7e0c23
2017-01-24loader: Update the loader to 1.0.39Mark Young
Add new extensions for 1.0.39. Also, updated layers to include minimal set of functionality for 1.0.39 extensions. Extensions include: - VK_KHR_get_physical_device_properties2 - VK_KHR_shader_draw_parameters - VK_EXT_direct_mode_display - VK_EXT_display_surface_counter - VK_EXT_display_control Also, redo the LoaderAndLayerIf document. Change-Id: I10412086da7a798afe832a3892e18f606259b5af
2016-12-27layers: Update 'string' layer header filesMark Lobodzinski
Remove struct_string_helper header files, add in enum_string_helper and <sstream> as these were included in the removed header file. Change-Id: Ice0842ce2f06b5581a5add739534d59d834edbf6
2016-12-20layers: Remove unused header from threading/PVMark Lobodzinski
vk_struct_validate_helper.h not used. Change-Id: I19757e96900e0500f4db9355c38a497936706bba
2016-12-20layers: Remove unused threadchecker header fileMark Lobodzinski
Change-Id: I7906b82c1c9c0397113508da74348ea28fe21add
2016-12-15layers: PR1276, Fix Clang compiler warningsJamie Madill
fixes - error: using namespace directive in global context in header - error: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'int' Change-Id: If56d5b9c33f0de813fbb67120650a887eb9368b0
2016-07-15layers: threading with cmd buffer handle reuseMike Stroyan
A driver may reuse a command buffer handle in another thread. The threading layer needs to remove command buffer information before calling FreeCommandBuffers. This addresses part of github issue #719.
2016-07-13layers: faster threading layer for single threadMike Stroyan
Add a check to the threading layer to detect a single thread case. If the application has only called vulkan from one thread at a time, then skip access counters for externally synchronized parameters. This greatly reduces the overhead of the layer for applications that don't truly use vulkan in a multi-threaded way.
2016-07-13layers: Use type-specific mutexes in thread layerMike Stroyan
Use type-specific mutexes to reduce lock contention.
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-24threading: avoid invalid GIPA call in vkCreateDeviceChia-I Wu
Save VkInstance in layer_data so that we query vkCreateDevice with a valid instance.
2016-05-24threading: handle device commands in GetInstanceProcAddrChia-I Wu
Call layer_intercept_proc in GetInstanceProcAddr.
2016-05-24threading: no interface functions in layer functionsChia-I Wu
Move handling of interface functions in threading::GetInstanceProcAddr to v0's vkGetInstanceProcAddr.
2016-05-24threading: assert valid instance/device in vkGet*ProcAddrChia-I Wu
device is always valid in vkGetDeviceProcAddr. instance is valid if pName is not intercepted in layer_intercept_instance_proc.
2016-05-24threading: improve EnumerateDeviceExtensionPropertiesChia-I Wu
Call down the next layer unless pLayerName is threading.
2016-05-24threading: add threading::layerPropsChia-I Wu
Replace globalLayerProps and deviceLayerProps with layerProps. There is no plan to define more than one layer in the same namespace.
2016-05-24threading: drop vk prefix for layer functionsChia-I Wu
Drop VK_LAYER_EXPORT as well.
2016-05-24threading: put layer functions into a namespaceChia-I Wu
Put all layer fucntions/data into threading namespace. I had to add some wrappers to make everything work. This also removes vkEnumerateInstance*Properties from procmap. procmap is used in vkGetDeviceProcAddr and it should not contain vkEnumerateInstance*Properties in the first place.
2016-05-24threading: decorate Vulkan commands with VKAPI_ATTRChia-I Wu
2016-05-24threading: move vkEnumerate*Properties aroundChia-I Wu
Move them toward the end of the file.
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: threading - use std mutexJeremy Hayes
Change-Id: I773ea148807e5b634ad021ea58b001cd3d1bad87
2016-04-04layers: Fix 7 signed/unsigned comparison warnings on VS2015Michael Mc Donnell
2016-03-22misc: Update to header version 1.0.6Jon Ashburn
Change-Id: Idf7a9d40278b796e16effa54e9b60668d275b8ec
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-08layers: clang-format layers directoryJon Ashburn
Change-Id: I318e3759829f33441e57aafedec1e9ec06d658c4
2016-02-24layers: Make layer option names more consistent and update docsMark Lobodzinski
2016-02-18layers: MR221: rename threading testCourtney Goeltzenleuchter
The threading validation layer has been basically re-written, so updating the vendor name accordingly
2016-02-18layers: MR221: Add Enumerate for AndroidCourtney Goeltzenleuchter
Android does not use json files to store layer and extension information and needs to query it directly from the layer.
2016-02-18layers: MR221: Update extension info to match json filesCourtney Goeltzenleuchter
2016-02-08layers: lock use of threading layer cmd pool mapMike Stroyan
Access to command_pool_map data structure in threading validation layer needs a mutex.
2016-02-07layers: In GetInstanceProcAddr, intercept instance procs even if NULL instanceKarl Schultz
This problem showed up when running cube --validate and the order of the layers was arranged so that the threading layer is NOT first. It can also show up when running vktrace and the threading layer is in any position, because the vktrace layer becomes first. The symptom is generally a failure to create an instance when the threading layer is enabled. The fix is to check for the non-instance-based procs first by calling layer_intercept_instance_proc before bailing if the instance is NULL.
2016-02-05layers: Fix CreateSemaphore/CreateEvent conflictDustin Graves
Reorder includes to avoid conflicts between the VkLayerDispatchTable_ CreateSemaphore/CreateEvent fields and the WIN32 API.
2016-02-05layers: thread checks for vkDestroyInstance and vkDestroyDeviceMike Stroyan
Add instance write to vkDestroyInstance. Add device write to vkDestroyDevice.
2016-02-05layers: use less of namespace stdMike Stroyan
Change to std::unordered_map instead of "using namespace std".
2016-02-05layers: change android build to xml threadingMike Stroyan
Use threading validation layer generated from vk.xml for android.
2016-02-05layers: Add threading layer generationMike Stroyan
Generate threading layer wrappers in thread_check.h. Change path for generated vulkan.h.