aboutsummaryrefslogtreecommitdiff
path: root/layers/unique_objects.cpp
AgeCommit message (Collapse)Author
2018-01-05layers: Use common ext lists in unique_objectsMark Lobodzinski
Change-Id: I6d3ac8921dcc648df606040794029733c0516eeb
2017-12-15layers: Fix Graphics Pipeline pointers not ignoredPetr Kraus
Some VkGraphicsPipelineCreateInfo pointers must be ignored under some conditions, but were not in the layers. Add relevant tests. Fix tests found broken (using depth or color without attachment in subpass)
2017-11-14layers: Move BuildTemplate call inside global lockMark Lobodzinski
Helper routine was being called outside of the lock causing freezes in Dota2 Change-Id: I45ab0b23c6ff3ed4ec16dca15107ce16f205599f
2017-09-12Revert "layers: Fix Graphics Pipeline pointers not ignored"Mark Lobodzinski
This caused segfaults on Intel Skylake, NexusPlayer, and Samsung Galaxy S8 (Mali). This reverts commit 367d276ffe5c0748ff9d8e2b3551d4a00c9fc3c2.
2017-09-12layers: Fix Graphics Pipeline pointers not ignoredPetr Kraus
Some VkGraphicsPipelineCreateInfo pointers must be ignored under some conditions, but were not in the layers. Add relevant tests. Fix tests found broken (using depth or color without attachment in subpass) Change-Id: I3e2a3f61a52c72ce3a11483ff8b031189f4c61c9
2017-07-17header: Update to version 1.0.55 of the Vulkan hdrMark Lobodzinski
- updated vulkan.h - updated generator.py - updated reg.py - updated vk.xml - updated Win/Lin json files - fixed and updated vulkan.hpp - updated validation error messages and database - applied validextensionstruct fixes from 1.0.54 LVL vk.xml file - fixed parameter_validation DebugMarker prototypes - fixed unique_objects DebugMarker prototypes - fixed NV_FILL_RECTANGLE in error DB - updated error database with new covered VUs Change-Id: I4eec816a6dc9756105a357beab6af4abb303994d
2017-06-09layers: Rename whitelist checking routines in UOMark Lobodzinski
Change-Id: Ifa1f5a8ad95c9c2578d5444764f66c5f552078e8
2017-06-09layers: Unique objects GPA handling updatesMark Lobodzinski
Change-Id: Id14c4b5ecb96eed9091ee13aceeb1701adb1f511
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-06-06layers: Remove device_extensions.h from unique objsMark Lobodzinski
Was not being used. Change-Id: I498b40bd0ee29d4e1ef478b0570947ef2315144e
2017-05-03layers: Move UO helpers to headerChris Forbes
2017-05-03layers: UO: rework GetDisplayPlaneCapabilitiesKHRChris Forbes
Not sure what this was trying to achieve -- we should have seen every VkDisplayMode as a return from GetDisplayModePropertiesKHR?
2017-05-03layers: Rework UO GetDisplayModePropertiesKHRChris Forbes
Similar overkill to function fixed in earlier commit
2017-05-03layers: Mark bogus looking reverse lookup in UOChris Forbes
2017-05-03layers: Fix UO GetPhysicalDeviceDisplayPlanePropertiesKHRChris Forbes
This was doing odd things. pProperties is an output-only array. Its contents are undefined before the call, so we shouldn't be trying to unwrap the handles in there. We don't even need the safe_* here.
2017-05-03layers: Use helpers in most swapchain UO implsChris Forbes
2017-05-03layers: Write helpers for UO Unwrap+WrapNew operationsChris Forbes
Allows us to concentrate all the ID generation and cast insanity in one place.
2017-05-03layers: Store instance data in UO::layer_data rather than gpu handleChris Forbes
2017-05-03layers: Use InstanceExtensions support in UOChris Forbes
2017-05-03layers: hold UO dispatch tables by value in layer_dataChris Forbes
Trims out some allocations; fixes leak of dispatch tables
2017-05-03layers: UO: split device and instance dataChris Forbes
2017-04-24layers: Final object-type cleanup and loose endsMark Lobodzinski
Fixed a few DebugReport object type casts and a couple of missed spots with internal object type usage. Change-Id: Iaa8bdcf60d5ec89e1da64227f2b7367ce6c64dc1
2017-04-18layers: Special-case UO generation of QueuePresentKHRChris Forbes
VkPresentInfo::pResults is an /output/ array. The generated code makes a copy on the way in (pointlessly, but other clients of safe_* might find this reasonable), but neglects to copy it back on the way out. Lift the current code generated for QueuePresentKHR back into the special cases, and add the correct post-call copy. Fixes #1670. V3: Just open-code the loop. I don't want to turn off MSVC's fussy mode, and it's convinced both std::copy and std::copy_n are unsafe with all raw pointers. Signed-off-by: Chris Forbes <chrisforbes@google.com>
2017-04-12layers: Allow UO to codegen vkAllocateMemoryMark Lobodzinski
This was a special case, manually written as it contained a pnext extension chain containing Vulkan handles. Codegen now covers this case. Change-Id: I086d4314aeb9968c3f151e4e7134de7846c1c8d0
2017-03-29layers: Remove unneccessary line in unique_objectsMark Lobodzinski
Change-Id: If658b4196e895a1229495c6acb40fb50feadd02c
2017-03-29layers: Fix push_desc_with_template in unique_objsMark Lobodzinski
Added unwrapping of vulkan objects embedded in this APIs data buffer. Change-Id: Ibbee614148d10efe9a954cd793f0e92881300c71
2017-03-29layers: Fix extension func/core struct codegenDustin Graves
Fix code generation for extension functions receiving struct parameter types defined by core Vulkan. Extensions are processed as separate features by the code generator, and the type info required for structure generation was not being shared across features. The code generator has been modified to share type info across features so that the validation code generated for extension functions includes validation for core structures: - Prevent unique objects and parameter validation code generators from clearing struct type info data structures at the start of feature processing. - Remove unused data structures from unique objects code generator. - Adds handle unwrapping and parameter validation for elements in the vkCmdPushDescriptorSetKHR pDescriptorWrites parameter. - Adds handle unwrapping and parameter validation for elements in the vkCreateSharedSwapCHainsKHR pCreateInfos parameter. - Adds VkAllocationCallback parameter validation to the WSI and descriptor update template extensions functions. Change-Id: I016aa6550681dbf7d6bda834272374ce63ed1940
2017-03-24layers: Removing redundant if in unique_objectsArda Coskunses
Exact same if check performed multiple times. Removing redundant one Change-Id: Iff32a724e58a06b4a967ba2632e60cc5b4050238
2017-03-22layers: GH1592, Fix unique_objects DebugMarker ExtMark Lobodzinski
CodeGen ignored these APIs as they contain handles which are embedded in a structure and aliased. Added manual coverage. Change-Id: I81cf1945981a8e0b69966a9d0e190e49ff728ea8
2017-03-15layers: Fix CTS BufferView UpdateTemplate crashMark Lobodzinski
Change-Id: I2d03265b465ffc869f52ca85e6ad23301424a8d7
2017-03-07layers: Improve UpdateTemplate variable namesMark Lobodzinski
Change-Id: I8e0d26b795fc9f2a2634f4de823967d3f16b15d9
2017-03-07layers: Parse extension buffer to unwrap handlesMark Lobodzinski
The UpdateDescriptorSetWithTemplate extension API contains a parameter which is a buffer containing Vulkan objects. To get this through to the driver using the UniqueObjects layer, these handles must get unwrapped. Change-Id: I91f573f696eafc00957cbff502aaa8ce96c4e1ba
2017-03-07layers: Create desc_update_template map for new objsMark Lobodzinski
Store unique_objects DescriptorUpdateTemplate data in a map for parsing UpdateTempate buffers. Change-Id: Iab0d95a1aa2f309a3d33c8859b16543f98ca549c
2017-03-07layers: Move DescriptorUpdateTemplate functionsMark Lobodzinski
In unique_objects, moved these functions from being auto-generated to being manually written. Change-Id: Iae7ccac0ad51d57826104bd0532742a098c673ce
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-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-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-03layers: Remove bad call to safe_struct worker fcnMark Lobodzinski
One of the displaymode functions was calling a safe_struct worker function incorrectly, and a special-case hack was added to have unique_objects generate this unneeded function. Change-Id: I9939b56cb254e50b60d48945a14ad223efad775e
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-15layers: Update Valid Usage enums (VL-70)Mike Weiblen
Reviewed the following 5 files' invocation of log_msg() for opportunities to update for Valid Usage enums. layers/threading.h layers/vk_layer_logging.h layers/descriptor_sets.cpp layers/swapchain.cpp layers/unique_objects.cpp Split some composite checks apart, to better match the meaning of individual VUs. Added VU enums to a new file, and expanded the stats collection script to include the new file. Changed some placeholder uses of msgCode=="0" to "VALIDATION_ERROR_UNDEFINED". (0 is the value of the enum VALIDATION_ERROR_00000 which was misleading) When Valid Usage enums were referenced, also updated the VU database. Tweak #include order for Windows, to undo clang-format reordering. Completes Jira task VL-70. Change-Id: I550922b194e733f41316ae493098f70a54cbd64e
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-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-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-02layers: Change to including vk_safe_struct code.Mike Stroyan
Cmake on windows cannot handle multiple projects using generated library code.
2016-10-07layers: Fix access violation in LVTMark Lobodzinski
Was sending an out-of-scope memory reference to the display driver in unique_objects::AllocateMemory. Change-Id: I6b700445125acab040310682c96e7507d0fd91aa
2016-10-06Layers: Implement unique_objects layer using vk.xmlMark Lobodzinski
UniqueObjects was the final LVL layer not using vk.xml for codegen. The new implementation follows the threading layer model which (outside of safe_struct dependencies) is more tolerant of API changes. Also updated for structure and style. build-android/android-generate.bat - Updated for build build-android/android-generate.sh - Updated for build generator.py - Added Unique Objects Generator genvk.py - Added call to U_O generator layers/CMakeLists.txt - Updated for build layers/unique_objects.cpp - New: manually generated code layers/unique_objects.h - Now a true header file vk-layer-generate.py - killed! Change-Id: I0d57871dfd2600829502f0bffd7cf6f926b7d5e7