aboutsummaryrefslogtreecommitdiff
path: root/layers/object_tracker.cpp
AgeCommit message (Collapse)Author
2017-06-12layers: Add in missing CreatDevice physdev obj checkMark Lobodzinski
Prevents doc validator from failing. Change-Id: I0e70da954f0a7d7ed4a54d4bcefe996a6cc9cfb3
2017-06-09layers: Remove dead/unused object_tracker functionsMark Lobodzinski
Change-Id: If0acd6013b205be973db334f874408d3f4e06c35
2017-06-09layers: Remove extension enable checks from OTMark Lobodzinski
Change-Id: I926836e429a2f38c35291702ab9f71b6d1834d7f
2017-06-09layers: Simplfy object_tracker GetProcAddr handlingMark Lobodzinski
Change-Id: Ie38e89f67b293cdfda3ade5ce979464206145226
2017-06-07layers: Destroy physical devices in object tracker's vkDestroyInstanceGabríel Arthúr Pétursson
The objects are allocated in EnumeratePhysicalDevices, but were never destroyed after use.
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-05-26layers: Add tracking of VkDescriptorUpdateTemplateKHRMark Young
Add tracking of the new VkDescriptorUpdateTemplateKHR handle. Also, update to include proper VUIDs for the corresponding checks in object_tracker.cpp with help from Mark L and Mike S. Change-Id: I4a665cfa2e8b4d8faf2a0ebd583c759e399b1599
2017-05-24layers:Migrate to new validation error IDsTobin Ehlis
Migrate valid usage IDs to new numbers based on the string IDs that are integrated into the spec build process. The formula for mapping the string ID to the new VALIDATION_ERROR enum value is in vuid_mapping.py script. The mapping between the old IDs and the new IDs is in the file "old_vuid_to_new_mapping.txt." The vk_validation_error_database.txt file has the new IDs as well as the string-based ID for each element and a column indicating if the valid usage is in the core spec or if it requires extension(s) and is therefore in the extension spec. The error messages were shortened and no longer include a section reference. Now the link goes directly to the line in the spec where the valid usage text occurs. The base of the spec link is the core spec unless the VU requires an extension in which case the spec with all extensions is used as the base.
2017-05-17layers: Add VUIDs to new objecttracker checksMark Lobodzinski
Change-Id: I0d2d893b68aea7df294796cf42a8c6d46fbfd441
2017-05-17layers: Transition all to HandleToUint64Petr Kraus
Mostly automatic (i.e. probably missed some cases)
2017-05-15layers: Add VUIDs to new objecttracker checksMark Lobodzinski
Change-Id: I0d2d893b68aea7df294796cf42a8c6d46fbfd441
2017-05-15layers: Update ObjectTracker for new extensionsMark Lobodzinski
vkGetPhysicalDeviceSurfaceFormats2KHR, vkGetSwapchainStatusKHR, and vkGetPhysicalDeviceSurfaceCapabilities2KHR. Change-Id: I726880924300e06209013ae39a8c4e019d4c2266
2017-04-25layers:Validate objects for display_timingTobin Ehlis
Update object_tracker validation for swapchain objects in new functions for VK_GOOGLE_display_timing extension. Add in missing Error IDs and update database.
2017-04-22layers: Change obj type conversion routine nameMark Lobodzinski
Change-Id: I3b4208ca3777ac46b2c5ab2839c268ed4381a2ac
2017-04-13scripts: Convert ugly case statment to nice arrayMark Lobodzinski
Since this was codegen'd, we can just create a static array for the object type conversion and do away with all of the switch statement mess. Change-Id: I5fb20778d64f0675afa9c1563e2d44d22d5b4a02
2017-04-13layers: Switch to codegen'd obj_type string helperMark Lobodzinski
Updated LVTs for error string changes as well. Change-Id: I5e0da92a9859e8ada7374af42a21a3f8f7629fdd
2017-04-13layers: Use gen'd object types in object_trackerMark Lobodzinski
Change-Id: I2166407bffcbf037d9b7898d91c674ed60fc95ba
2017-04-13layers: Remove unnecessary args from OT helper fcnsMark Lobodzinski
Change-Id: I0deb4d43c83cd126d0d4bb4e158907148a6e3753
2017-04-13layers: Object tracker variable renaming/clang-formatMark Lobodzinski
Change-Id: Id39eea99003c58dc183f45d4164c852328bc9826
2017-04-13layers: Some object tracker cleanupMark Lobodzinski
Change-Id: I8d4d82d763289df9dd9834236fdb984922304f11
2017-04-03layers: Fix incorrect feature protect for KHX extMark Lobodzinski
Change-Id: I503c2984163455fd5fd91df6fa70da1dc88fc684
2017-03-29layers: Add ios, mac and nintendo surface trackingMark Lobodzinski
Three extensions have been added that get VkSurface objects for various operating environments. Added functions to object_tracker to catch the creation of these Vulkan objects to prevent spurious validation errors. Extensions are VK_NN_vi_surface, VK_MVK_ios_surface and VK_MVK_macos_surface. Change-Id: I0357a3a012c5020a5ab44877fd9fef627e769121
2017-03-22layers: Fix uses of KHR ifdef to KHX in objecttrackerJamie Madill
In a few places, we were using VK_USE_PLATFORM_WIN32_KHR instead of VK_USE_PLATFORM_WIN32_KHX. Change-Id: I579ea848868396b9c2877e43ca24780476e55919
2017-03-17layers: Fix fence validation error in object_trackerMark Lobodzinski
Change-Id: Id03f32f636cef14cb6d549d7c04b05cd5c814d52
2017-03-16layers: Fix incorrect KHR/KHX ifdefs.Jamie Madill
In two places we were checking for the presence of the WIN32 KHR define instead of the KHX define where the enums and methods are defined. Fixes #1593. Change-Id: I0bf0c2e2ed734ed2c40a44c4cd7d468ba70ca9a4
2017-03-14header: Update to 1.0.43 header versionMark Lobodzinski
- updated include/vulkan/vulkan.h - updated scripts/cgenerator.py - updated scripts/vk.xml - updated layers json files - updated tests json files - updated loader SOVERSION - updated include/vulkan/vulkan.hpp - updated parameter_validation.cpp with new APIs - updated object_tracker.cpp with new APIs Change-Id: I1fd812cb376d5cddee5ab4acf2e4f8fe6d33b761
2017-03-14layers: Remove deprecated KHX extension from OT/PVMark Lobodzinski
Deleted references to GetPhysicalDeviceImageFormateProperties2KHX and GetPhysicalDeviceProperties2KHX from object_tracker and parameter_validation. Change-Id: I83e29bae8302dad6f774886d8472451220b426d2
2017-03-08spelling: Fix spelling errorsMark Young
Fix some spelling errors (caught by VS2017 spelling extension) and a few floating func defs that are no longer valid. Change-Id: Ifd9394227dfe3b3255c27429dadaf405433232d2
2017-03-01vulkan: update to header 1.0.42Mark Young
Updated all necessary files to 1.0.42. This includes the various headers as well as the loader, and the parameter validation, object tracking, and threading layers. Additionally, bump all layer JSON files to 1.0.42. Also, in this change: - Enable loader extension automation so that the loader now generates all extension entry-points automatically during build to reduce likelihood of missing a critical piece on header update. - Enable layer dispatch table extension automation for the same reason. - Fixes from Mark Lobodzinski and Tony Barbour to resolve crash in loader when working with Intel's Windows driver due to GetInstanceProcAddr getting called on inappropriate command names. Change-Id: Ic18d3fac2e145c386c0192031deb5089c91a00d8
2017-02-23layers: Check all devices for valid object handlesMike Schuchardt
Additional check in ValidateObject to distinguish between an invalid object and an object that was created on another device. Change-Id: I939ca7a23df47ad5809e46c780e084085f141c13
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-02-07layers:Add physicalDevice checkTobin Ehlis
Update GetPhysicalDeviceQueueFamilyProperties() in object_tracker to verify that physicalDevice is valid.
2017-02-07layers:Fix queue state recordingTobin Ehlis
Handle case when multiple calls are made to GetPhysicalDeviceQueueFamilyProperties[2KHR]() funcs by resizing vector and assigning elements w/ [] operator instead of using emplace_back().
2017-02-07layers:Update object validation for gpdp2Tobin Ehlis
A few updates to object_tracker validation for get_physical_device_properties2 extension. Use lock_guard instead of unique_lock. Add queried queues to queue tracking.
2017-02-03layers: Tolerate null handles in destroy and free routinesTony Barbour
Several CTS tests call destroy routines with null pointers. This keeps validation layers from crashing or reporting false positives Change-Id: I95a3bee21902598dffc0df28e53f5ff253cb6207
2017-01-27build: Enable declaration hiding warning on WindowsKarl Schultz
Fixes #1388 Turn on the Windows compiler option (4456) to report hidden declarations. Fix all places where this was occurring. Change-Id: I3346d87da8b70d6299c206fcac68520a091ed1a6
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
2017-01-06layers: GH1342, Correct objecttype in object_trackerMark Lobodzinski
The IndirectCountAMD extension had the wrong object type specified for validating its command buffers. Change-Id: I36707455c6e59f9f0f8456b67b02a320fa4631fa
2016-12-23layers:Fix unique error enumTobin Ehlis
ResetCommandBuffer valid commandBuffer handle is id *00094, not *00090. This was causing 90, which is for allocation, to be incorrectly reused.
2016-12-14layers: Fix object tracker memory leakMike Schuchardt
Upon repeated calls, GetDisplayPlaneSupportedDisplaysKHR will call CreateObject multiple times with the same VkDisplayKHR handle. Add a check in CreateObject for an existing tracking object before allocating a new one. Change-Id: I50f634fbe8b7e69edbfeb4e6f0c050b7fccaa6e4
2016-12-13layers: Fill out OT validation for vk_display_KHRMark Lobodzinski
Change-Id: I633fae1ba3bc076022eea6c4e599f617d0296534
2016-12-13layers: GH897, Add VK_KHR_display stubs to OTMark Lobodzinski
Added extension enable and function stubs for VK_KHR_display extension functions to object_tracker. Change-Id: Iaee862efaadf4657271b74d75a289dbaf13af26c
2016-12-09layers: Add error enums to Destroy APIsMike Schuchardt
Add error enum parameters to DestroyObject helper function for use when performing checks on the pAllocator parameter of vkDestroy* APIs. Add error enum parameter to DeviceReportUndestroyedObjects helper function for use when checking for undestroyed child objects. Change-Id: I4e0960b8b14ecc30f67a1eea112aa80de9f4ca86
2016-12-09layers: Add error enums to object trackerMike Schuchardt
Add the following validation error enums to object tracker helper functions: VALIDATION_ERROR_00097 VALIDATION_ERROR_00102 VALIDATION_ERROR_00920 VALIDATION_ERROR_00927 VALIDATION_ERROR_01651 Change-Id: Ic21fbaf14f29aef53b2b24d0aa4a8577d3a11927
2016-12-08layers:Add undefined validation error enumTobin Ehlis
Add VALIDATION_ERROR_UNDEFINED to UNIQUE_VALIDATION_ERROR_CODE enum with a value of "-1". This had been custom-defined in object_tracker.cpp so removing it from there.
2016-12-02layers:Handle NULL DebugMarker function ptrsTobin Ehlis
Fixes #1074 Object_tracker and parameter_checker intercept DebugMarker extension functions which may not be supported by underlying device and therefore could terminate with a NULL function call. Updating these layers to handle this case by making sure that their downstream function ptr is not null before calling down the chain. If the downstream function ptr is null, considering that VK_SUCCESS in the layers for functions with VkResult return code.
2016-12-02layers: OT: null out handles in pipeline creation if we dont call downChris Forbes
Signed-off-by: Chris Forbes <chrisforbes@google.com>
2016-11-29layers: Complete support for VK_KHR_Display extNorbert Nopper
Fixed using display extension only crash. Added vkGetDisplayPlaneCapabilitiesKHR. Fixes, that unique objects works for display extension. Change-Id: I66727a430b9d55bfa40fdddc884f40c91aa29f11