aboutsummaryrefslogtreecommitdiff
path: root/layers/object_tracker.cpp
AgeCommit message (Collapse)Author
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
2016-11-28layers: GH1131, Add error enums to object trackerMike Schuchardt
Added error enums to object_tracker.cpp and updated vk_validation_error_database.txt check_implemented column to match Change-Id: Icdd08ef50316be023b218b0b36a997a8a61e2a1e
2016-11-23layers: Handle partial failure in vkCreate*PipelinesMaciej Jesionowski
This applies to vkCreate*Pipelines creating multiple objects with a single call. Creation of *some* pipelines may fail and an error code will be returned. In this case invalid handles will be set to NULL, and the remaining handles must be managed properly.
2016-11-17layers: GH949, Fix ObjTrkr to destroy NULL handlesMark Lobodzinski
ObjectTracker emitted errors when a destroy/free call was made with VK_NULL_HANDLE, which *is* allowed by the spec. Change-Id: I2b4e19999e539d68b5856139566d4a7a8a530ca6
2016-11-10layers: update valid usageJeremy Hayes
Change-Id: Id7556ddc1be59ee7fe5ab9273257cbc399724a3e
2016-10-27layers: Fix a couple of err enum probs found by accidentKarl Schultz
Change-Id: Ibdebf762561e5e0888c3c04e5047d9d879d5f45a
2016-10-25layers:Early exit in object_tracker FreeMemoryTobin Ehlis
If memory object is invalid, object_tracker should not call down the chain. Also, update validation test to expect that object_tracker will flag the invalid handle instead of core_validation.
2016-10-20layers: More err enum work in obj_trackerKarl Schultz
Change-Id: I299b68ec2e66d77812ce5dff0d457e328cdd6c5c
2016-10-12layers: Add error enums to object trackerKarl Schultz
- Add error enum to many calls to ValidateObject(). - Specify null_allowed=true when VU allows it. (mostly Destroy* cases) Change-Id: I61d94ea71cf885caad475c2012111c92bc7e9904
2016-10-11layers: Updating some CreateBuffer checks to use unique enumsKarl Schultz
Small batch of updates to use unique validation error enums and messages for a few checks. Updated the database file and flagged some other checks that are missing with the error enums and TODO notes. Change-Id: I2020a88bbdcf7ea6d725f667523e89b160fe7ab8
2016-10-04layers: Clean up Windows build warningsMark Lobodzinski
Change-Id: Iec47464d56c862cb1a6f132241d200d6f68efa21
2016-10-04layers: Tweak object_tracker for 32bit some moreChris Forbes
The previous approach doesn't actually work.
2016-10-04layers: Be careful about casts. ptr -> uint64_t& isnt right on 32bit.Chris Forbes
Signed-off-by: Chris Forbes <chrisforbes@google.com>