Chris Forbes [Thu, 4 Jun 2015 08:27:09 +0000 (20:27 +1200)]
shader_checker: Also validate vkCreateGraphicsPipelineDerivative
Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Courtney Goeltzenleuchter <courtney@lunarg.com>
Chris Forbes [Thu, 4 Jun 2015 08:23:00 +0000 (20:23 +1200)]
shader_checker: Extract pipeline validation into own function
There's about to be a second caller.
Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Courtney Goeltzenleuchter <courtney@lunarg.com>
Tony-LunarG [Thu, 4 Jun 2015 20:22:14 +0000 (14:22 -0600)]
Windows: Add vkUpdateDescriptorSets into exports for vulkan.dll
Chris Forbes [Wed, 3 Jun 2015 22:49:27 +0000 (10:49 +1200)]
Fix a bunch of mismatched new[]/delete.
Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Chris Forbes [Mon, 25 May 2015 03:17:14 +0000 (15:17 +1200)]
shader_checker: remove stray debug output from typechecker implementation
Chris Forbes [Sun, 24 May 2015 23:13:24 +0000 (11:13 +1200)]
shader_checker: validate VS inputs against VI even when no VI
Now we'll treat the lack of a VI stage as the same as a VI stage
which provides no attribs and no bindings.
Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Tobin Ehlis <tobin@lunarg.com>
Chris Forbes [Sun, 24 May 2015 23:13:22 +0000 (11:13 +1200)]
shader_checker: Only continue with pipeline config if no errors
The driver may crash in these cases.
Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Tobin Ehlis <tobin@lunarg.com>
Chris Forbes [Fri, 29 May 2015 02:55:18 +0000 (14:55 +1200)]
shader_checker: current object & locking
Fix some issues with cross-thread access to the shader map, etc.
Also introduce a 'current object' as a hack to be able to support
the debug callback, which currently needs a dispatch table while
only having a VkInstance.
Chris Forbes [Sun, 24 May 2015 23:12:59 +0000 (11:12 +1200)]
shader_checker: Add support for delivering layer messages via callback
This is just a direct copy of what all the other layers are doing.
Allows the layer validation tests to capture errors.
Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
scygan [Mon, 1 Jun 2015 17:48:11 +0000 (19:48 +0200)]
ShaderChecker: do not crash if Shader output count == 0 and PSO attachments count > 0
(cherry picked from commit
80bb5d63774f2e11bc14d9c5291bb3273f0e79cf)
Tony Barbour [Thu, 21 May 2015 17:07:47 +0000 (11:07 -0600)]
tests: Cmake changes for building on Windows
Mike Stroyan [Tue, 19 May 2015 23:03:40 +0000 (17:03 -0600)]
layers: Change MemTracker maps to contain structs
Remove one unnecessary level of indirection.
Conflicts:
layers/mem_tracker.cpp
Mike Stroyan [Tue, 19 May 2015 21:16:08 +0000 (15:16 -0600)]
layers: Tuning MemTracker
Reverse sense of fenceMap using VkFence instead of fenceID as key.
This eliminates iterating over all of fenceMap.
Stop creating internal fences and let vkQueueSubmit pass NULL fence.
Track lastSubmittedFence and lastSubmittedQueue in command buffer info.
Use unordered_map instead of map for better performance.
Reuse iterator returned by map find whenever available.
It is faster than repeating a find operation with "[]" notation.
Remove map entries at time of VkDestroy instead of other calls such as Wait.
Mike Stroyan [Mon, 18 May 2015 22:33:03 +0000 (16:33 -0600)]
Layers: fix MemTracker threading crash
updateFenceTracking was using iterator for deleted item.
Mike Stroyan [Mon, 18 May 2015 22:31:44 +0000 (16:31 -0600)]
layers: thread safe MemTracker
Remove unneeded getFenceFromId() that crashed outside of mutex.
Mike Stroyan [Mon, 18 May 2015 22:29:39 +0000 (16:29 -0600)]
layers: fast return of inactive MemTracker printing
Chia-I Wu [Mon, 25 May 2015 08:27:55 +0000 (16:27 +0800)]
v98: replace vkUpdateDescriptors() by vkUpdateDescriptorSets()
Only slightly tested.
Conflicts:
include/vulkan.h
Chia-I Wu [Mon, 25 May 2015 08:27:50 +0000 (16:27 +0800)]
v98: remove vk{Begin,End}DescriptorPoolUpdate()
Assume VK_DESCRIPTOR_UPDATE_MODE_FASTEST.
Conflicts:
icd/intel/desc.c
include/vulkan.h
Chia-I Wu [Mon, 25 May 2015 08:22:52 +0000 (16:22 +0800)]
v98: rename count to arraySize in VkDescriptorSetLayoutBinding
Conflicts:
include/vulkan.h
Mark Lobodzinski [Fri, 29 May 2015 14:32:35 +0000 (09:32 -0500)]
vulkan.h: V97 -- Remove multiple allocations. Bug# 13948.
Remove multiple memory allocation requirements from API, and supporting
changes in driver, demos, layers, and tests.
Tobin Ehlis [Thu, 28 May 2015 18:10:17 +0000 (12:10 -0600)]
layers: Improved DrawState Descriptor Update validation
Tobin Ehlis [Wed, 27 May 2015 20:30:06 +0000 (14:30 -0600)]
layers: Add some early returns in DrawState fail cases to prevent segFs in driver
Tobin Ehlis [Tue, 26 May 2015 22:06:50 +0000 (16:06 -0600)]
layers: Fix drawState lock bug and don't call driver w/ bad pipeline
Tobin Ehlis [Fri, 22 May 2015 18:38:55 +0000 (12:38 -0600)]
tests: Added some empty test functions with comments for DrawState layer testing
Tobin Ehlis [Fri, 22 May 2015 18:38:16 +0000 (12:38 -0600)]
layers: Fix some DrawState checks
Cody Northrop [Tue, 26 May 2015 19:51:12 +0000 (15:51 -0400)]
BUILD.md: Fix markdown language that didn't translate from github to gitlab
Mark Lobodzinski [Fri, 22 May 2015 19:43:25 +0000 (14:43 -0500)]
vulkan.h: V96 -- xglCmdBlitImage filter mode. Bug# 13759.
Tobin Ehlis [Thu, 21 May 2015 15:06:56 +0000 (09:06 -0600)]
layers: Add additional check for RenderPass sampleCount
Was checking PSO MSAA num samples against FrameBuffer sampleCount. This change adds an additional check against RenderPass sampleCount.
Mark Lobodzinski [Thu, 21 May 2015 19:19:45 +0000 (14:19 -0500)]
layers: Build C++ version of generic layer
All layers are now implemented in C++.
Mark Lobodzinski [Wed, 20 May 2015 22:33:47 +0000 (17:33 -0500)]
layers: Convert object tracker to C++
Ian Elliott [Wed, 20 May 2015 20:54:42 +0000 (14:54 -0600)]
wsi: Deal with drivers that don't allow query of swap-chain VkFormat.
Ian Elliott [Fri, 15 May 2015 23:52:29 +0000 (17:52 -0600)]
wsi: Deal with drivers that don't allow query of swap-chain VkFormat.
Ian Elliott [Tue, 21 Apr 2015 22:41:02 +0000 (16:41 -0600)]
wsi: Add queries for VkDisplayWSI's and VkFormat's to demos.
Show how to query which VkFormat to use for a WSI swap chain. In order to work
correctly, changes are needed to existing ICDs:
- Changed the order of VkFormats for the intel sample driver, so that the
desired value will be first (which is what the demos will use).
- Enhanced the nulldrv to support the
VK_PHYSICAL_DEVICE_INFO_TYPE_DISPLAY_PROPERTIES_WSI query.
Mike Stroyan [Fri, 15 May 2015 23:34:51 +0000 (17:34 -0600)]
Add win32 condition variables.
Mike Stroyan [Fri, 15 May 2015 14:50:57 +0000 (08:50 -0600)]
layers: Make threading layer provide thread-safety
Add mutual exclusion behavior to threading layer after reporting collisions.
This will allow applications to continue beyond first threading error.
It can't help reentrant calls.
Mark Lobodzinski [Thu, 14 May 2015 20:08:13 +0000 (15:08 -0500)]
tests: Expand layer validation test coverage
Added layer validation tests for several ObjectTracker and
MemTracker validation cases. Also improved error handling
in object tracker layer to handle validation failures that
could cause unrecoverable driver errors.
FslNopper [Thu, 14 May 2015 07:47:05 +0000 (09:47 +0200)]
Merge branch 'master' of
https://gitlab.khronos.org/vulkan/LoaderAndTools.git
Courtney Goeltzenleuchter [Wed, 13 May 2015 22:25:37 +0000 (16:25 -0600)]
Revert "demos: Add msaa-tri.c for msaa rendering example modified from tri.c"
This reverts commit
0e83c4d651d5602a35b5c54eb59f2543310b5f31.
Henry Song [Wed, 13 May 2015 21:53:31 +0000 (14:53 -0700)]
demos: Add msaa-tri.c for msaa rendering example modified from tri.c
Tobin Ehlis [Wed, 13 May 2015 17:57:18 +0000 (11:57 -0600)]
loader: On Windows disable global optimization for API entrypoints
Without this change, on a Windows Release build, mhook is unable to hook the entrypoint functions.
Mike Stroyan [Mon, 11 May 2015 23:18:14 +0000 (17:18 -0600)]
layers: rework Threading layer to match version 91
Handle multiple thread checked parameters.
Thread-check parameters in some calls that start with a VkDevice parameter.
Use more recent WSI name pattern.
Mike Stroyan [Mon, 11 May 2015 19:44:24 +0000 (13:44 -0600)]
layers: fix calculation of intercepting functions.
Assign _gen_layer_get_global_extension_info to intercept.
Remove duplicate calculation of lookups.
Mark Lobodzinski [Mon, 11 May 2015 22:21:15 +0000 (17:21 -0500)]
vulkan.h: V93 -- fine-grained memory binding synchronization. Bug# 13464
New names and behavior for QueueBind* APIs.
Chris Forbes [Mon, 4 May 2015 02:20:10 +0000 (14:20 +1200)]
shader_checker: check types between FS output and CB
Chris Forbes [Mon, 4 May 2015 02:04:24 +0000 (14:04 +1200)]
shader_checker: add type checking between VF and VS
Chris Forbes [Mon, 4 May 2015 02:04:06 +0000 (14:04 +1200)]
shader_checker: add helper to walk a type tree and return the basic type
Chris Forbes [Mon, 4 May 2015 23:34:14 +0000 (11:34 +1200)]
shader_checker: fix fs output/cb attachment walking after assert fixes
Chris Forbes [Fri, 8 May 2015 22:31:21 +0000 (10:31 +1200)]
layers: remove assumption that there's a glslang source tree alongside
We have an in-tree spirv.h now, just use that.
Jon Ashburn [Mon, 11 May 2015 16:34:20 +0000 (09:34 -0700)]
Windows: Fix build from recent loader changes
Courtney Goeltzenleuchter [Fri, 8 May 2015 21:46:40 +0000 (15:46 -0600)]
spirv: Update to matching header
Mark Lobodzinski [Fri, 8 May 2015 14:50:33 +0000 (09:50 -0500)]
vulkan.h: V94 -- remove vkCmdCloneImageData. Bug #16550.
Mark Lobodzinski [Fri, 8 May 2015 14:12:28 +0000 (09:12 -0500)]
layers: Remove use_count from ObjectTracker
Removed ll_increment_use_count from layer
Fixed some issues with thread safety
Simplified handling of special-case APIs
Removed GetExtensionSupport dead code
Jon Ashburn [Wed, 6 May 2015 16:15:07 +0000 (10:15 -0600)]
misc: Add vkGetInstanceProcAddr() entrypoint
Adding this entrypoint as this has been discussed in khronos and is needed
for the loader/layer/extension proposal.
Caveats:
1) Have not updated layers or any tests/demos yet that will come later;
2) No one including loader is using this call yet;
3) Leaving exisitng vkGetProcAddr() as is for now; later once loader
is using vkGetInstanceProcAddr call can switch vkGetProcAddr() to
vkGetDeviceProcAddr()
Jon Ashburn [Wed, 6 May 2015 15:02:10 +0000 (09:02 -0600)]
loader: No longer generate code, instead directly check in source code
Jon Ashburn [Tue, 5 May 2015 22:11:15 +0000 (16:11 -0600)]
layers: Fix bug of GetGlobalExtensionInfo not being added to layer_intercept
Jon Ashburn [Tue, 5 May 2015 22:20:46 +0000 (16:20 -0600)]
loader: logging on Windows to both debug output and stderr
Mike Stroyan [Tue, 5 May 2015 22:33:08 +0000 (16:33 -0600)]
layers: update object tracker memory ref validation
Allocate enough space for queueInfo.
Record queueNodeIndex to allow setGpuQueueInfoState between addQueueInfo and validateQueueFlags.
Report case when queue flags remain unknown to application and layer.
Move expanded common code into validateQueueFlags.
Initialize g_pQueueInfo to NULL. Handle case when it is NULL.
Handle when malloc or realloc fails.
FslNopper [Wed, 6 May 2015 19:43:49 +0000 (21:43 +0200)]
Merge branch 'master' of https://gitlab.khronos.org/vulkan/LoaderAndTools.git
FslNopper [Wed, 6 May 2015 19:42:01 +0000 (21:42 +0200)]
Removed warning in cube demo.
Mark Lobodzinski [Tue, 5 May 2015 23:24:45 +0000 (18:24 -0500)]
layers: Add object type validation to object tracker
Validate that objects match the objectType any time both are specified.
Mark Lobodzinski [Tue, 5 May 2015 20:01:37 +0000 (15:01 -0500)]
layers: Use native Vulkan object type definitions
ObjectTracker was using locally-defined object types as the vulkan
ones were unavailable. Replaced them with ones from Vulkan.h.
Jon Ashburn [Tue, 5 May 2015 15:37:01 +0000 (09:37 -0600)]
loader: Fix bugs where non-dispatchable objects overwrite dispatch table
Also fix the GPA for non pass through cases
Jon Ashburn [Mon, 4 May 2015 22:48:55 +0000 (16:48 -0600)]
loader: Fix bug in vkGetProcAddr so trampoline code is returned as needed
Jon Ashburn [Mon, 4 May 2015 15:16:41 +0000 (09:16 -0600)]
loader: Separate out the python generator script
Loader is a reference component. Intel driver is a sample component. Loader
should not be sharing files with driver. This is a first step in that direction.
Also loader has special cases that are not in driver or layers. So it simplifies
their scripts not to have loader baggage in them.
Jon Ashburn [Sat, 2 May 2015 00:00:33 +0000 (18:00 -0600)]
loader: rename a few dispatch utilties
Courtney Goeltzenleuchter [Fri, 1 May 2015 23:56:13 +0000 (17:56 -0600)]
bug 13854: Remove memory references
header: 0.93.0
svn: 30980
Courtney Goeltzenleuchter [Wed, 29 Apr 2015 23:16:21 +0000 (17:16 -0600)]
bug-13690: Clarification on vkFlushMappedMemory
Bug 13690 - Clarification on the behavior of vkFlushMappedMemory
svn ID: 30914 & 30888
Courtney Goeltzenleuchter [Thu, 23 Apr 2015 23:49:22 +0000 (17:49 -0600)]
bug-13751: Update vkCmdClearColorImage color parameter
svn ID: 30918
Change the VkCmdClearColroImage color parameter
be a pointer.
Chia-I Wu [Wed, 22 Apr 2015 06:20:52 +0000 (14:20 +0800)]
intel: support only VK_DEPTH_MODE_ZERO_TO_ONE
Fail pipeline creation when VK_DEPTH_MODE_NEGATIVE_ONE_TO_ONE is specified.
Update viewport transformation for depth range [0, 1].
Demos are updated too.
Chia-I Wu [Wed, 22 Apr 2015 06:56:17 +0000 (14:56 +0800)]
demos/cube: use GL conventions
Use GL conventions in vertex data and contents. Tranform to VK conventions
in the vertex shader with
gl_Position.y = -gl_Position.y;
Chia-I Wu [Wed, 22 Apr 2015 07:44:24 +0000 (15:44 +0800)]
demos/tri: fix facing and enable culling
Courtney Goeltzenleuchter [Thu, 30 Apr 2015 16:58:33 +0000 (10:58 -0600)]
tri: Fix command buffer use for staging texture
Mark Lobodzinski [Mon, 27 Apr 2015 20:26:11 +0000 (15:26 -0500)]
layers: Move OT validation calls inside mutex
ObjectTracker generated validation code was being added outside the
mutex-protected area compromising thread-safety.
Mark Lobodzinski [Thu, 30 Apr 2015 22:04:27 +0000 (17:04 -0500)]
layers: Add memory manager queue validation to object tracker
Validate that sparse-memory binding operations only take place on queues
with MEMMGR capability.
Tony Barbour [Wed, 29 Apr 2015 22:23:52 +0000 (16:23 -0600)]
layers: Add another routine to the list that don't need use counts
Tony Barbour [Wed, 29 Apr 2015 22:19:20 +0000 (16:19 -0600)]
demos: Add validation via --validate cmd line option
Ian Elliott [Tue, 28 Apr 2015 22:11:24 +0000 (16:11 -0600)]
layers: Eliminate compiler warnings on Windows.
This includes suppressing compiler warning C4065, where VS complains if a
switch statement has a "default", but not "case" statements. This was true in
many functions of the auto-generated "helper" header files.
This also includes removing unreferenced local variables, and dealing with some
type differences (sometimes with casting, sometimes with changing the type).
Ian Elliott [Tue, 28 Apr 2015 21:50:36 +0000 (15:50 -0600)]
demos: Eliminate compiler warnings on Windows.
Ian Elliott [Tue, 28 Apr 2015 21:57:32 +0000 (15:57 -0600)]
loader: Eliminate compiler warnings on Windows.
Ian Elliott [Tue, 28 Apr 2015 22:06:24 +0000 (16:06 -0600)]
Win: Stop using the temporary "xcb_nvidia" code.
Now that we have a better WSI solution, this older code is no longer needed.
Ian Elliott [Tue, 28 Apr 2015 17:35:02 +0000 (11:35 -0600)]
demos: Improve tri/cube error if incompatible driver found.
Cody Northrop [Mon, 20 Apr 2015 20:09:40 +0000 (14:09 -0600)]
toolchain: Update to newer glslang and LunarGLASS versions
LUNARGLASS_REVISION=1070
GLSLANG_REVISION=30939
Courtney Goeltzenleuchter [Wed, 29 Apr 2015 16:51:48 +0000 (10:51 -0600)]
mem_tracker: Fix error from fixing MSVC asserts
Ian Elliott [Tue, 28 Apr 2015 19:22:33 +0000 (13:22 -0600)]
demos: tri/cube give error if can't find WSI extension.
Ian Elliott [Tue, 28 Apr 2015 17:35:02 +0000 (11:35 -0600)]
demos: Improve tri/cube error if incompatible driver found.
Ian Elliott [Tue, 28 Apr 2015 16:52:52 +0000 (10:52 -0600)]
demos: Use macros for the app name, and window name.
David Pinedo [Mon, 27 Apr 2015 22:36:17 +0000 (16:36 -0600)]
layers: Fix msvc++ iterator issues
Ian Elliott [Tue, 28 Apr 2015 16:33:11 +0000 (10:33 -0600)]
demos: Change app name for the console window.
Courtney Goeltzenleuchter [Mon, 27 Apr 2015 23:16:56 +0000 (17:16 -0600)]
draw_state: Fix another MSVC++ debug assert
Courtney Goeltzenleuchter [Mon, 27 Apr 2015 21:04:43 +0000 (15:04 -0600)]
draw_state: Fix Microsoft C++ iterator assert
The Microsoft Visual Studio vector library does not like this code:
delete (*ii).second->pCmds.back();
Internally, pCmds.back() does a pCmds.end() - 1 and since the
vector we are using (*ii).second->pCmds is not local, the library
throws an assert about the iterator being non-incrementable.
The assert if fixed by making a local copy of the vector and
working on that.
Courtney Goeltzenleuchter [Mon, 27 Apr 2015 21:00:47 +0000 (15:00 -0600)]
mem_tracker: Do not increment iterator after delete
The loop was blindly incrementing the iterator and
it should not. In the delete case the loop should
resume with the iterator returned
by the delete as it's the next element in the list.
Courtney Goeltzenleuchter [Mon, 27 Apr 2015 20:56:34 +0000 (14:56 -0600)]
cube: Disable rendering once we enter cleanup
Code was getting a segfault after clicking on the close
window button and a refresh is attempted as things are getting
shut down. If we use same demo->prepare flag to indicate
rendering is ready during shutdown we avoid the issue.
Courtney Goeltzenleuchter [Mon, 27 Apr 2015 17:16:35 +0000 (11:16 -0600)]
draw_state: Fix Microsoft C++ assert
The C++ runtime library was issuing an assert on the following line:
for (vector<CMD_NODE*>::iterator ii=pCB->pCmds.begin(); ii!=pCB->pCmds.end(); ++ii) {
It was complaining that the iterator ii was not compatible with the
pCmds.end(). Tracing down the assert, the C++ library did not like the
fact that we were accessing pCmds through a pointer (pCB). If we made a
local copy of the pCmds vector the assert went away.
David Pinedo [Mon, 27 Apr 2015 19:20:08 +0000 (13:20 -0600)]
Shader Checker Layer: make sure iterated list is of non-zero length
On MSVC++, need a check to make sure a list is of non-zero length
before attempting to iterate on it.
Jon Ashburn [Sat, 25 Apr 2015 00:15:00 +0000 (17:15 -0700)]
loader: Terminate chain of GetProcAddr() in driver if gpu obj is base
Fixes issue when driver doesn't implement an entrypoint of recursing
and unwrapping gpu object too many times.
Tobin Ehlis [Tue, 28 Apr 2015 23:27:16 +0000 (17:27 -0600)]
layers: Fix bug in APIDump where some void* members were having their address printed when APIDumpNoAddr was TRUE
Cody Northrop [Tue, 28 Apr 2015 19:31:42 +0000 (13:31 -0600)]
icd: Add support for one bit alpha BC1 formats
Tony Barbour [Tue, 28 Apr 2015 20:28:17 +0000 (14:28 -0600)]
layers: Add another routine to list that don't need use counts
Tony Barbour [Tue, 28 Apr 2015 20:15:53 +0000 (14:15 -0600)]
layers: Add 3 more routines to list that don't need use counts
Tobin Ehlis [Tue, 28 Apr 2015 16:58:20 +0000 (10:58 -0600)]
layers: Fix APIDump corner cases to not print addresses w/ NoAddr option