Jeremy Hayes [Tue, 17 May 2016 15:32:12 +0000 (09:32 -0600)]
loader: update linux so version
Change-Id: I84656754952e7488712ca5bcd4701e2e85d92cce
Jon Ashburn [Tue, 17 May 2016 14:43:38 +0000 (08:43 -0600)]
loader: Treat GLOBAL layers same as INSTANCE layers
Also change validation layers type to be GLOBAL so they work with old loaders
prior to device layer deprecation.
Change-Id: I32788cb7788c8ad840ced15236c5ed792edfbbff
Mark Lobodzinski [Tue, 17 May 2016 14:44:09 +0000 (08:44 -0600)]
layers: GH485, Remove redundant format props check
With new checks in place for CreateImage, old check in CreateRenderPass
is redundant and can be removed.
Change-Id: I53e5201f453041b3c8ba17edc193c1f3b142f4cb
Mark Lobodzinski [Tue, 17 May 2016 14:42:03 +0000 (08:42 -0600)]
layers: GH485, Strengthen image format validation
CreateImage was checking that format caps weren't null, but was not
validating against color or depth/stencil attachment types.
Change-Id: Ic8996829033f552f6ef7477bdefdaba702ae2403
Tony Barbour [Mon, 16 May 2016 21:47:56 +0000 (15:47 -0600)]
demos: Make sure shaderClipDistance is available before requesting
Change-Id: Id0b58d54a553fce4914ddc1097f1e1c8ac3c337f
Jon Ashburn [Mon, 16 May 2016 23:35:43 +0000 (17:35 -0600)]
loader: reduce message level if GDPA of a layer is not found
Change-Id: Ic4dd99015f5f3a07a6657f196fde89181d66c0f6
GregF [Mon, 16 May 2016 23:26:26 +0000 (17:26 -0600)]
update glslang and spirv-tools revisions
Rene Lindsay [Fri, 13 May 2016 16:19:41 +0000 (09:19 -0700)]
git: Ignore Qt generated files
Change-Id: I5970f83e8316e3f13e79e103cc17c96e31fef95e
Jon Ashburn [Mon, 16 May 2016 20:40:36 +0000 (14:40 -0600)]
misc: Update to version 1.0.13, header, xml, JSON files
Change-Id: Id70c1b709d35b2f508e0dde5f862102c87c80521
Jon Ashburn [Mon, 16 May 2016 20:01:18 +0000 (14:01 -0600)]
loader: deprecate device layers
Change-Id: I43c279e36368bf1ef9a2f446007e34366bfff777
Cody Northrop [Mon, 16 May 2016 15:09:15 +0000 (09:09 -0600)]
windows: Fix android-generate.bat
Mirror changes made to android-generate.sh in
cb9ce9e0
Jamie Madill [Wed, 11 May 2016 20:11:47 +0000 (16:11 -0400)]
layers: Fix VkBool32 return in vk-layer-generate.py.
This regressed in
f4542e618, but is only visible when defining
VK_USE_PLATFORM_WIN32_KHR, so might have been missed. Fixes a
warning in MS 2015, as well as an incorrect return value.
Jamie Madill [Tue, 10 May 2016 14:36:20 +0000 (07:36 -0700)]
layers: Add output file option to vk-generate scripts.
With some build systems, it's not easy to pipe stdout into a file.
This solution allows the scripts to use the last argument as an
output file option. This is a problem in partiuclar for GN.
Chris Forbes [Mon, 16 May 2016 02:09:35 +0000 (14:09 +1200)]
layers: Track dynamic descriptor offsets per set index
One big pool of dynamic offsets didn't work well:
- CmdBindDescriptorSets just appended, without regard for unaffected sets,
whether offsets were already recorded for the affected sets, etc. A
command buffer which bound descriptor sets many times would just
accumulate junk.
- DescriptorSet::ValidateSetNode was always passed the base of the
offset pool, when the set's first dynamic offset may have been some
distance into the pool.
Instead, track a vector of dynamic offsets per set index, alongside
the tracking of the bound descriptor set, which makes both correct
tracking of updates, and correct validation at draw time easier.
Fixes lots of weird behavior with more complex binding sequences.
Signed-off-by: Chris Forbes <chrisforbes@google.com>
Chris Forbes [Sun, 15 May 2016 23:19:50 +0000 (11:19 +1200)]
layers: Narrow scopes of some locals for clarity
Signed-off-by: Chris Forbes <chrisforbes@google.com>
Norbert Nopper [Sun, 15 May 2016 17:19:41 +0000 (19:19 +0200)]
Fix allows to return actual storage_ and not default false value.
Tobin Ehlis [Thu, 12 May 2016 22:57:14 +0000 (16:57 -0600)]
layers: Clean up old mem_tracker merge remnants
Clean up most of the remaining MTMERGESOURCE defines.
Many of these come straight out. A number of copy functions
were able to merge some code to provide a slight efficiency gain.
Tobin Ehlis [Mon, 16 May 2016 14:36:40 +0000 (08:36 -0600)]
layers: Fix android build errors
Tobin Ehlis [Thu, 12 May 2016 14:42:09 +0000 (08:42 -0600)]
tests: Update doc validation
Print a single warning line identifying the number of missing tests.
Tobin Ehlis [Thu, 12 May 2016 14:32:31 +0000 (08:32 -0600)]
tests: Add InvalidMemoryMapping test
Tobin Ehlis [Thu, 12 May 2016 14:31:32 +0000 (08:31 -0600)]
layers: Fixes to memory mapping checks
MapMemory w/ size 0 is now invalid in the spec so remove comment and
change callback to ERROR.
Update some error messages for clarity.
Only update the mapped memory range state if MapMemory succeeds.
Tobin Ehlis [Wed, 11 May 2016 20:57:49 +0000 (14:57 -0600)]
tests: Update document validation related to tests
If a test is not done, standardize on "TODO" as the only allowed
text. Otherwise, the txt is considered to be a valid test and an
error will be flagged if the test cannot be found in
layer_validation_tests.cpp.
Tobin Ehlis [Wed, 11 May 2016 20:40:44 +0000 (14:40 -0600)]
layers: Kill MISSING_MEM_BINDINGS error
The MEMTRACK_MISSING_MEM_BINDINGS enum was dead code. There's no way
that the check can be hit in current code so added an assert() for
future safety and killed the checks and their documentation.
Tobin Ehlis [Wed, 11 May 2016 19:52:53 +0000 (13:52 -0600)]
tests: Add tests for INVALID_ALIASING cases
Chris Forbes [Fri, 13 May 2016 04:23:58 +0000 (16:23 +1200)]
layers: Move `fb` from RENDER_PASS_NODE to GLOBAL_CB_NODE
This is part of a renderpass instance, not of the renderpass itself.
If stored where MT put it, things go horribly wrong when recording
command buffers in parallel.
Signed-off-by: Chris Forbes <chrisforbes@google.com>
Chris Forbes [Fri, 13 May 2016 01:42:12 +0000 (13:42 +1200)]
layers: Finish unhooking layer_data from SC pipeline validation
Signed-off-by: Chris Forbes <chrisforbes@google.com>
Chris Forbes [Fri, 13 May 2016 01:39:17 +0000 (13:39 +1200)]
layers: Use pipeline layout ptr from pipeline node
Signed-off-by: Chris Forbes <chrisforbes@google.com>
Chris Forbes [Fri, 13 May 2016 01:35:20 +0000 (13:35 +1200)]
layers: Add PIPELINE_LAYOUT_NODE * to PIPELINE_NODE
Signed-off-by: Chris Forbes <chrisforbes@google.com>
Chris Forbes [Fri, 13 May 2016 01:27:58 +0000 (13:27 +1200)]
layers: No longer require layer_data for stage validation
Signed-off-by: Chris Forbes <chrisforbes@google.com>
Chris Forbes [Fri, 13 May 2016 01:17:42 +0000 (13:17 +1200)]
layers: Pass in shaderModuleMap to SC
Signed-off-by: Chris Forbes <chrisforbes@google.com>
Chris Forbes [Fri, 13 May 2016 01:01:24 +0000 (13:01 +1200)]
layers: use RENDER_PASS_NODE* from pipeline in SC
Breaks one more dep from SC guts -> layer_data
Signed-off-by: Chris Forbes <chrisforbes@google.com>
Chris Forbes [Fri, 13 May 2016 01:01:02 +0000 (13:01 +1200)]
layers: Add RENDER_PASS_NODE* to PIPELINE_NODE*
Signed-off-by: Chris Forbes <chrisforbes@google.com>
Mark Lobodzinski [Thu, 12 May 2016 21:14:07 +0000 (15:14 -0600)]
layers: LX518, Fix ObjectTracker memory leaks
Several places in object_tracker were not properly deleting data
structures, which caused signicant memory leaks.
Change-Id: Ie64ab18efecc45838e103dd7a8cb5f75c92155c4
Ian Elliott [Mon, 9 May 2016 19:54:01 +0000 (13:54 -0600)]
layers: PR512 Update some of the swapchain errors that are now tested.
Ian Elliott [Mon, 9 May 2016 18:33:47 +0000 (12:33 -0600)]
layers: PR512 Fix swapchain's validateCreateSwapchainKHR()
It used to dereference pCreateInfo, even when it was NULL.
Karl Schultz [Thu, 12 May 2016 14:11:23 +0000 (08:11 -0600)]
tests: GH431 PR 510 Apply suggested changes
- Convert error to warning for overlapping ranges
- Consider overlapping ranges in range checks
- User a reference to avoid a copy
- Many more additional tests
Change-Id: I18ad43b98684f16a978461a1a089ebff5437a563
Tobin Ehlis [Wed, 11 May 2016 20:44:13 +0000 (14:44 -0600)]
layers: Remove unused var to fix android build
Tobin Ehlis [Wed, 11 May 2016 16:38:29 +0000 (10:38 -0600)]
layers: Migrate INVALID_IMAGE_LAYOUT check to renderpass create time
Previously performing this check at CmdBeginRenderPass time, but we have
all of the data needed when renderpass is created so check there instead.
Karl Schultz [Fri, 6 May 2016 19:56:42 +0000 (13:56 -0600)]
tests: GH431 Add layer checks and tests for push constant
Change-Id: I46eb5f9adbe702a278cded0f73dc18d1617489f0
Fix windows compilation issues
Change-Id: Ic9b9795e34d1e1e68bae9838b8538bb2e37d18b4
Chia-I Wu [Thu, 28 Apr 2016 08:04:15 +0000 (16:04 +0800)]
swapchain: avoid invalid GIPA call in vkCreateDevice
Save VkInstance in layer_data so that we query vkCreateDevice with a valid
instance.
Chia-I Wu [Thu, 28 Apr 2016 07:16:59 +0000 (15:16 +0800)]
swapchain: improve GetInstanceProcAddr
Handle device commands as well. Move handling of interface functions to
v0's vkGetInstanceProcAddr.
Chia-I Wu [Thu, 28 Apr 2016 06:38:57 +0000 (14:38 +0800)]
swapchain: refactor GetInstanceProcAddr
Split command intercepting out to intercept_core_instance_command and
intercept_khr_surface_command.
Chia-I Wu [Thu, 5 May 2016 08:13:19 +0000 (16:13 +0800)]
swapchain: add intercept_khr_swapchain_command
It returns the function pointers for all intercepted VK_KHR_swapchain
commands. Call intercept_khr_swapchain_command from GetDeviceProcAddr.
Chia-I Wu [Thu, 28 Apr 2016 06:38:57 +0000 (14:38 +0800)]
swapchain: add intercept_core_device_command
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.
Chia-I Wu [Thu, 28 Apr 2016 06:21:13 +0000 (14:21 +0800)]
swapchain: improve EnumerateDeviceExtensionProperties
Call down the next layer unless pLayerName is swapchain.
Chia-I Wu [Thu, 28 Apr 2016 06:12:27 +0000 (14:12 +0800)]
swapchain: add swapchain::swapchain_layer
Replace swapchain_layers with swapchain_layer. There is no plan to define
more than one layer in the same namespace.
Chia-I Wu [Thu, 28 Apr 2016 06:01:30 +0000 (14:01 +0800)]
swapchain: drop vk prefix for layer functions
Drop VK_LAYER_EXPORT as well.
Chia-I Wu [Thu, 28 Apr 2016 03:27:46 +0000 (11:27 +0800)]
swapchain: put layer functions into a namespace
Put all layer fucntions/data into swapchain namespace. I had to add some
wrappers to make everything work.
Chia-I Wu [Thu, 28 Apr 2016 03:21:49 +0000 (11:21 +0800)]
swapchain: move vkEnumerate*Properties around
Move them toward the end of the file.
Cody Northrop [Mon, 9 May 2016 22:15:57 +0000 (16:15 -0600)]
layers: Determine whether command buffer can be ended with active render pass
Tobin Ehlis [Wed, 11 May 2016 13:26:33 +0000 (07:26 -0600)]
tests: Enhance doc validator to recognize Wsi tests
Enable doc validator to recognize tests in VkWsiEnabledLayerTest group.
Jeremy Hayes [Thu, 12 May 2016 17:29:49 +0000 (11:29 -0600)]
loader: update linux so version
Change-Id: I027e6f9e0010074c0a83748e3724c7ef1cabb4f9
Dustin Graves [Wed, 27 Apr 2016 23:44:56 +0000 (17:44 -0600)]
layers: Additional vkCreateImageView validation
Add more vkCreateImageView parameter validation, based on the valid
usage section for VkImageViewCreateInfo in the Vulkan specification.
Issues-Addressed: LX #502
Change-Id: I7fd743312f43a8ff36f2db9f6b50569d630f9dca
Dustin Graves [Thu, 12 May 2016 00:31:44 +0000 (18:31 -0600)]
layers: Additional vkCreateImage param validation
Add more vkCreateImage parameter validation, based on the valid usage
section for VkImageCreateInfo.
Issues-Addressed: GitHub #354
Change-Id: Ia978a64f6c03c3cf115a07e707099253104e04a1
Dustin Graves [Thu, 21 Apr 2016 22:30:17 +0000 (16:30 -0600)]
layers: Adjust queue family index error messages
Adjust parameter_validation layer's validate_queue_family_indices
error messages:
- Split validate_queue_family_indices into separate functions for
arrays of indices and single index values, allowing error messages
to be formatted with and without array brackets when appropriate.
- Print the correct parameter name in error messages.
Change-Id: I9a77ccbd0ad14da4732362d2694ed205e13c3a40
Karl Schultz [Thu, 12 May 2016 16:28:57 +0000 (10:28 -0600)]
build: Disable RTTI generation
Disablng RTTI can save a little space. And it will help keep
some C++ features from being used that are not (well) supported
on some platforms.
Change-Id: I8050009a65de640c2e41cdefb1ead43c88bb710a
Dustin Graves [Tue, 10 May 2016 22:44:16 +0000 (16:44 -0600)]
layers: Sync XML registry files from Vulkan-Docs
Sync the vk.xml and related Python scripts with the latest revisions from
Vulkan-Docs:
- Update local copy of vk.xml from Vulkan-Docs
- Merge minor changes to genvk.py and generator.py from Vulkan-Docs to
local copies
- Add debug marker function pointers to VkLayerDispatchTable
- Update parameter_validation code generation to support use of types
across API features; The core API feature needs to be aware of a
structure defined by the AMD_rasterization_order feature for the
purpose of pNext validation
- Modify thread_check code generation to add TODO messages for debug
marker support
Change-Id: I4d5b98683592f4ef404cb46e5b0f6ad519912382
Tobin Ehlis [Wed, 11 May 2016 20:44:13 +0000 (14:44 -0600)]
layers: Remove unused var to fix android build
Dustin Graves [Tue, 10 May 2016 17:42:58 +0000 (11:42 -0600)]
tests: Add required parameter/error code tests
Add tests for the parameter_validation REQUIRED_PARAMETER and
FAILURE_RETURN_CODE error codes to layer_validation_tests.
Change-Id: I324901e411eb92dbaf0c7d232ae1d8bf63d433b1
Dustin Graves [Mon, 9 May 2016 22:21:12 +0000 (16:21 -0600)]
tests: Add unrecognized value tests
Add tests for unrecognized Vulkan enumeration, VkFlags, and VkBool32
values to layer_validation_tests.
Change-Id: I01d913c3903a7ca959c4bccb60a864a5f91c8809
Dustin Graves [Mon, 9 May 2016 20:40:29 +0000 (14:40 -0600)]
tests: Add struct validation tests
Add Vulkan structure sType and pNext validation tests to
layer_validation_tests.
Change-Id: I774d316def6697f2f3ebf5f0c20270fb0ad2daae
Tobin Ehlis [Wed, 11 May 2016 16:38:29 +0000 (10:38 -0600)]
layers: Migrate INVALID_IMAGE_LAYOUT check to renderpass create time
Previously performing this check at CmdBeginRenderPass time, but we have
all of the data needed when renderpass is created so check there instead.
Tobin Ehlis [Wed, 11 May 2016 14:47:55 +0000 (08:47 -0600)]
layers: Remove MEMTRACK_INVALID_LAYOUT
Use DRAWSTATE_INVALID_IMAGE_LAYOUT instead as MEMTRACK version was only used
in a single case and the check is more in-line with DRAWSTATE behavior.
Tobin Ehlis [Wed, 11 May 2016 14:10:27 +0000 (08:10 -0600)]
tests: Remove invalid error enum MEM_OBJ_CLEAR_EMPTY_BINDINGS
This error enum is no longer used and has been superceded by more specific errors.
Tobin Ehlis [Wed, 11 May 2016 14:04:32 +0000 (08:04 -0600)]
tests: Remove invalid error enum MEMTRACK_MEMORY_BINDING_ERROR
This error enum is no longer used and has been superceded by more specific errors.
Mark Mueller [Wed, 11 May 2016 15:07:46 +0000 (08:07 -0700)]
Merge pull request #523 from KhronosGroup/CoreValidationMessageCleanup
layers:LX#470 Address poor use of hex vs dec output & w/a convention
Mark Mueller [Tue, 3 May 2016 19:17:29 +0000 (13:17 -0600)]
layers:LX#470 Fix poor use of hex vs dec output
1) Introduce convention of explicitly placing "0x" before hex
format requests for clarity (don't use "%#")
2) All lower case in hex output (except w/stringstream which refuses
to do anything but uppercase, possibly only on windows).
3) Decorated pointers are printed for all Vulkan structure types.
3) Some intelligence in generators based on Vulkan variable name:
if the Vulkan variable name contains ("flag", "bit", "offset",
"handle", "buffer", "object", "mask") it will be output in
hexadecimal format
4) Remove "using namespace std;" from global scope of vk_struct_string_helper_cpp.h
Change-Id: Idbae73bfdaa3bc059543d43b209373cd0bcbc099
Chris Forbes [Fri, 6 May 2016 04:55:18 +0000 (16:55 +1200)]
layers:pass RENDER_PASS_NODE* around more
Signed-off-by: Chris Forbes <chrisforbes@google.com>
Chris Forbes [Fri, 6 May 2016 04:31:14 +0000 (16:31 +1200)]
layers: Hold active RENDER_PASS_NODE rather than VkRenderPass in CB node
Allows eliminating the bulk of the renderPassMap lookups
Signed-off-by: Chris Forbes <chrisforbes@google.com>
Chris Forbes [Fri, 6 May 2016 04:11:29 +0000 (16:11 +1200)]
layers: Add VkRenderPass member to RENDER_PASS_NODE
Signed-off-by: Chris Forbes <chrisforbes@google.com>
Chris Forbes [Fri, 6 May 2016 04:11:03 +0000 (16:11 +1200)]
layers: Trim down locked regions in CreateRenderPass
Signed-off-by: Chris Forbes <chrisforbes@google.com>
Chris Forbes [Fri, 6 May 2016 03:54:55 +0000 (15:54 +1200)]
layers: Mark some layer_data const, remove unordered_map::operator[] use.
Signed-off-by: Chris Forbes <chrisforbes@google.com>
Chris Forbes [Wed, 11 May 2016 03:18:00 +0000 (15:18 +1200)]
layers: Fix get_descriptor_binding
Not sure where the `return` went... this worked by accidents of calling
conventions in debug, but was rightfully eaten by the optimizer in release.
Signed-off-by: Chris Forbes <chrisforbes@google.com>
Chris Forbes [Tue, 10 May 2016 04:47:02 +0000 (16:47 +1200)]
layers: Get rid of even more coupling between SC and rest of CV
Signed-off-by: Chris Forbes <chrisforbes@google.com>
Chris Forbes [Tue, 10 May 2016 04:02:49 +0000 (16:02 +1200)]
layers: have PIPELINE_LAYOUT_NODE hold ptrs to descriptor set layouts
Just holding the nondispatchable object handles forces
get_descriptor_binding to use layer_data, which we'd rather it didn't.
Signed-off-by: Chris Forbes <chrisforbes@google.com>
Chris Forbes [Tue, 10 May 2016 23:44:12 +0000 (11:44 +1200)]
layers: add some asserts to spirv_inst_iter
These allow us to more easily catch in debug:
- Bogus zero-length instructions
- Reads off the end of the instruction
Signed-off-by: Chris Forbes <chrisforbes@google.com>
Tobin Ehlis [Tue, 10 May 2016 18:09:30 +0000 (12:09 -0600)]
layers: Update fence to track all queues associated with it
Semaphore's can create cross-queue dependencies between fences.
This change updates the FENCE_NODE object to have an unordered_set
of all queues that a fence is tied to instead of just tracking the
last queue on which a fence has been submitted.
Tobin Ehlis [Tue, 10 May 2016 16:16:23 +0000 (10:16 -0600)]
layers: GH458 Fix cleanup of queue lastFences
When waiting on fences, they were not being correctly removed from the
queue's lastFences vector. Updated the remove code and verified that
it's now working correctly.
Tony Barbour [Fri, 6 May 2016 20:23:44 +0000 (14:23 -0600)]
layers: Save swapchain image format for later validation compares
This fixes the cube resize with validation enabled bug
LunarEx issue #501, Github Issue #275
Change-Id: Ifc73be13f09f332a7b30e08d1f9fe4f3894d2b78
Karl Schultz [Tue, 10 May 2016 17:36:08 +0000 (11:36 -0600)]
build: GH316 include cinttypes instead of inttypes.h
Fixes compilation problems on CentOS.
Change-Id: I92c5ea0ebea8684c40e67e9b386732e55cb47cc8
Dustin Graves [Mon, 9 May 2016 23:36:57 +0000 (17:36 -0600)]
layers: Add missing parameter_validation functions
Add the following to address missing functionality in the
parameter_validation layer:
- Add parameter_validation_vkResetCommandBuffer call to
vkResetCommandBuffer
- Add missing vkGetPhysicalDevice.* exports to GetInstanceProcAddress
Change-Id: I73944933b0c318f691a14c305c192aa7a0bf8ded
Jon Ashburn [Tue, 10 May 2016 15:24:52 +0000 (09:24 -0600)]
loader: Update interface doc
The version 0 layer did not properly address the desktop loader requirements.
Split the layer interface into an Android section and a desktop section.
Change-Id: I782bdddd13da318274ad604ee0e48208bd1dc947
Chris Forbes [Tue, 10 May 2016 04:42:02 +0000 (16:42 +1200)]
Merge pull request #513 from chrisforbes/cv-tidy-more
layers: Start cutting needless deps between SC and layer_data
Chris Forbes [Tue, 10 May 2016 03:30:22 +0000 (15:30 +1200)]
layers: Start cutting needless deps between SC and layer_data
Signed-off-by: Chris Forbes <chrisforbes@google.com>
Tony Barbour [Thu, 5 May 2016 20:46:39 +0000 (14:46 -0600)]
tests: Add tests focussed on the Image validation layer
Change-Id: Ifa42ea77db06322157e54852f187d4d83579b51e
Tobin Ehlis [Mon, 9 May 2016 19:22:50 +0000 (13:22 -0600)]
layers: Update behavior for secondary cmdbuffers w/ *_SIMULTANEOUS_USE_BIT set
Spec clarification has been approved and secondary command buffers with
VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT may be in flight in multiple primary
command buffers at the same time.
This changes updates the error concerning secondary command buffers to be in-flight
on multiple primary command buffers to only appli if
VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT is not set.
Jon Ashburn [Mon, 9 May 2016 17:31:40 +0000 (11:31 -0600)]
loader: lvlgh204, Fix calls to secure_getenv on glibc < 2.17
Change-Id: I2f98d8de343cf3f6a30fdc223b37201b32571e99
Jon Ashburn [Mon, 9 May 2016 13:59:14 +0000 (07:59 -0600)]
header: update that includes debug_marker extension
Change-Id: Ifb8b7e2f66ac3dcb6e1889d59879caba39805d53
Jon Ashburn [Mon, 9 May 2016 14:51:17 +0000 (08:51 -0600)]
layers: Fix safe_struct gen to skip debug_marker struct
Safe structure doesn't work with static arrays; add an
exception so safe-struct is not generated for the strcuture in question.
Change-Id: I4605fdfb3dd840fb8e38371e7e59311fc6e1cb9f
Dustin Graves [Fri, 6 May 2016 17:20:38 +0000 (11:20 -0600)]
tests: Add required parameter tests
Add parameter_validation layer tests, to check the
parametert_validation::REQUIRED_PARAMETER error case.
Change-Id: I9ecb1ec914bdc093f007d5f61dbdc47ba0d5551c
Dustin Graves [Thu, 5 May 2016 19:44:21 +0000 (13:44 -0600)]
layers: Add error codes for parameter_validation
Add error codes to the parameter_validation layer:
- Add parameter_validation::ErrorCode enum defining common parameter
validation errors to parameter_validation_utils.h
- Replace the '1' in parameter_validation log_msg calls with the
appropriate error code
- Add parameter_validation error code documentation to
vk_validation_layer_details.md
- Remove 'typedef enum' declaration requirement for error code
enumerations from vk_layer_documentation_generate.py; It will
now recognize error code enmerations declared wihtout the typedef
Change-Id: Icf18b9124000159f7436f66e48a95d0c58047a07
Dustin Graves [Wed, 4 May 2016 18:56:08 +0000 (12:56 -0600)]
layers: Add parameter_validation namespace
Add parameter_validation namespace for utility functions. Namespace will
be extended to include core layer functions in a future update.
Change-Id: I0929f5caacbf3e1b4509f051ea020566cce44e3e
Tobin Ehlis [Wed, 4 May 2016 20:08:34 +0000 (14:08 -0600)]
tests: Add InvalidImageLayout tests
These hit 16/18 cases for INVALID_IMAGE_LAYOUT enum in core_validation.
The other 2 cases were already hit by object_tracker and another test.
Chia-I Wu [Fri, 6 May 2016 04:19:33 +0000 (12:19 +0800)]
core_validation: avoid invalid GIPA call in vkCreateDevice
Save VkInstance in layer_data so that we query vkCreateDevice with a valid
instance.
Chia-I Wu [Fri, 6 May 2016 04:04:23 +0000 (12:04 +0800)]
core_validation: handle device commands in GetInstanceProcAddr
Per commit
5bf16c33b9c1f38fc467d94716f276620a265327, extension check is
bypassed in GetInstanceProcAddr for VK_KHR_swapchain functions.
Chia-I Wu [Fri, 6 May 2016 03:58:01 +0000 (11:58 +0800)]
core_validation: no interface functions in layer functions
Move handling of interface functions in
core_validation::GetInstanceProcAddr to v0's vkGetInstanceProcAddr.
Chia-I Wu [Fri, 6 May 2016 03:55:53 +0000 (11:55 +0800)]
core_validation: refactor GetInstanceProcAddr
Split command intercepting out to intercept_core_instance_command. Assert
that instance is valid if intercept_core_instance_command returns nullptr.
Chia-I Wu [Fri, 6 May 2016 03:51:11 +0000 (11:51 +0800)]
core_validation: add intercept_khr_swapchain_command
It returns the function pointers for all intercepted VK_KHR_swapchain
commands. Call intercept_khr_swapchain_command from GetDeviceProcAddr.
Chia-I Wu [Fri, 6 May 2016 03:44:32 +0000 (11:44 +0800)]
core_validation: add intercept_core_device_command
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.
Chia-I Wu [Fri, 6 May 2016 03:38:37 +0000 (11:38 +0800)]
core_validation: improve EnumerateDeviceExtensionProperties
Call down the next layer unless pLayerName is core_validation.