Daniel Dadap [Wed, 30 Sep 2015 17:09:49 +0000 (12:09 -0500)]
loader: set DEFAULT_VK_{DRIVER,LAYER}S_PATH to "" on Linux
When loader_get_fullpath() gets an empty string as the 'dir' parameter,
it immediately writes out the original, unexpanded filename. Setting
the default drivers and layers paths to an empty string on Linux will
allow the unmodified filenames to be passed to dlopen(3) without having
to maintain a separate code path for Windows.
Now that there is no longer a default path for drivers or layers on
Linux, ${CMAKE_INSTALL_LIBDIR} no longer needs to be baked into the
loader binary. Note that any ICDs or layers that are currently getting
installed to the previous default paths (e.g. /usr/lib/vulkan/icd or
/usr/lib/vulkanlayer) will not be discoverable when specified as plain
filenames, unless these directories happen to be configured in the
loader's search path on the system in question.
Daniel Dadap [Wed, 30 Sep 2015 16:50:51 +0000 (11:50 -0500)]
loader: add helper for combining paths
Add a helper function to combine an arbitrary number of path elements,
separating them with the platform-specific directory separator, and
use it in places where path combining is currently achieved through
direct string manipulation.
As an additional cleanup, update loader_get_fullpath() to duplicate
the search path string internally, rather than relying on the caller
to do so. Since loader_get_fullpath() and loader_expand_path() no
longer modify input strings, and loader_expand_path() no longer
requires that the caller append the DIRECTORY_SYMBOL ahead of time,
acrobatics to duplicate strings to prevent modification and/or to add
directory separators are no longer necessary.
This change will result a behavior change on Windows: the existing
logic for loading an ICD that is specified as a bare filename, and
not as an absolute or relative path, is to search for a driver with
the given ICD name in the DEFAULT_VK_DRIVERS_PATH search path on
Linux, and to use the given ICD name as-is on Windows. This could
lead to DLL injection attack on Windows. Merge the Linux/Windows
behavior to limit the search for ICD filenames to the default search
path on Windows as well, which is also more consistent with the
behavior described in the loader spec.
Conflicts:
loader/loader.c
Mike Stroyan [Wed, 28 Oct 2015 17:15:46 +0000 (11:15 -0600)]
demos: fclose in cube and tri
Balance every fopen with fclose.
Mike Stroyan [Wed, 28 Oct 2015 15:46:57 +0000 (09:46 -0600)]
demos: windows fixes for cube and tri resize
Defer resize until after first prepare.
Record new window size from WM_SIZE.
Leave demo->swapchain.handle valid to pass to CreateSwapchainKHR.
Mike Stroyan [Thu, 15 Oct 2015 14:42:32 +0000 (08:42 -0600)]
Layers: MemTracker check vkCmdCopyQueryPoolResults
MemTracker check of buffer memory and usage flags in vkCmdCopyQueryPoolResults
Mike Stroyan [Thu, 15 Oct 2015 14:30:18 +0000 (08:30 -0600)]
demos: add occlusion features to vulkaninfo
Add reporting of VkPhysicalDeviceFeatures occlusionQueryNonConservative to vulkaninfo.
Johannes van Waveren [Wed, 28 Oct 2015 16:45:00 +0000 (11:45 -0500)]
use conditional compilation based on _WIN32 instead of WIN32 and __linux__
Jason Ekstrand [Fri, 16 Oct 2015 00:15:25 +0000 (17:15 -0700)]
demos/cube: Provide a non-null VertexInputStateCreateInfo
In the spec for VkGraphicsPipelineCreateInfo, some structs are explicitly
listed as being able to be NULL if they are not used.
VertexInputStateCreateInfo is not one of them.
Jason Ekstrand [Fri, 16 Oct 2015 00:16:32 +0000 (17:16 -0700)]
demos/cube: Explicitly specify std140 layout on UBOs
Without this, glslang won't actually provide the offsets and strides
required by SPIR-V.
Mark Lobodzinski [Tue, 27 Oct 2015 15:53:00 +0000 (09:53 -0600)]
layers: Validate buffer view usage flags
Jeremy Hayes [Wed, 28 Oct 2015 19:01:39 +0000 (13:01 -0600)]
layers: Validate number of layers in subresource.
Reviewed by Tobin.
Tobin Ehlis [Tue, 27 Oct 2015 22:35:27 +0000 (16:35 -0600)]
tests: Added CopyDescriptorUpdateErrors test to verify 3 errors during descriptorset copy updates
Tobin Ehlis [Tue, 27 Oct 2015 21:43:38 +0000 (15:43 -0600)]
layers: Add DrawState validation for copy descriptor updates
Tobin Ehlis [Tue, 27 Oct 2015 18:54:50 +0000 (12:54 -0600)]
layers: Simplify descriptor validation in DrawState
Many descriptor validation helper functions were returning skipCall based on the potential for a bad update structure type. However, at the beginning of update validation, we validate that the update type is ok. Therefore, the other helper functions don't need to continually repeat this check, and can be simplified to return relevant values directly.
Tobin Ehlis [Tue, 27 Oct 2015 18:25:35 +0000 (12:25 -0600)]
layers: Improve DrawState write descriptor update
Validate that stageFlags are the same for a single write update.
Validate that all sampler updates from a single write update are either immutable or non-immutable.
Refactor update contents check to have a loop per switch case instead of switching for each loop iteration.
Added two new validation errors:
DRAWSTATE_DESCRIPTOR_STAGEFLAGS_MISMATCH
DRAWSTATE_INCONSISTENT_IMMUTABLE_SAMPLER_UPDATE
Tobin Ehlis [Tue, 27 Oct 2015 16:10:54 +0000 (10:10 -0600)]
layers: Remove DrawState g_lastBoundDescriptorSet variable - it's no longer used
Cody Northrop [Tue, 13 Oct 2015 17:28:23 +0000 (11:28 -0600)]
demos: Clean up tri depth
We animated tri to make it clear it was rendering correctly based
on ISV feedback. It looks better, but still questionable.
This change makes the depth cutoff a straight line by giving the top
two vertices the same depth.
Cody Northrop [Tue, 27 Oct 2015 19:15:41 +0000 (13:15 -0600)]
draw_state: Fix enum in validate_draw_state_flags
DRAWSTATE_STENCIL_NOT_BOUND -> DRAWSTATE_SCISSOR_NOT_BOUND
Cody Northrop [Mon, 26 Oct 2015 20:07:35 +0000 (14:07 -0600)]
windows: Fix vector resizing in draw_state
Tony Barbour [Tue, 27 Oct 2015 17:01:20 +0000 (11:01 -0600)]
demos: print new device limits in vulkaninfo
Courtney Goeltzenleuchter [Tue, 27 Oct 2015 17:32:31 +0000 (11:32 -0600)]
misc: Remove dynamic array definititions
Windows doesn't like dynamicly sized arrays. Replace
with new'd array of objects or object pointers instead.
Courtney Goeltzenleuchter [Tue, 27 Oct 2015 17:23:21 +0000 (11:23 -0600)]
misc: Add intrin.h to support ffs utility
Courtney Goeltzenleuchter [Tue, 27 Oct 2015 17:22:14 +0000 (11:22 -0600)]
misc: Windows does not like named structure initialization
Courtney Goeltzenleuchter [Tue, 27 Oct 2015 17:19:02 +0000 (11:19 -0600)]
Bug 14621: Change vkGet* functions to not return VkResult
Missed one function in prior patch.
Ian Elliott [Tue, 27 Oct 2015 17:06:33 +0000 (11:06 -0600)]
tri/cube: Adjust demo_resize() to API changes.
Ian Elliott [Wed, 21 Oct 2015 21:14:07 +0000 (15:14 -0600)]
tri/cube: Add WM_SIZE to Win32 event handler to resize a window.
Ian Elliott [Wed, 21 Oct 2015 19:50:31 +0000 (13:50 -0600)]
cube: Removed some #if 0's that had bee left in the code.
Ian Elliott [Sat, 17 Oct 2015 00:02:43 +0000 (18:02 -0600)]
tri/cube: Handle window resizes (from WSI or XCB).
If either vkAcquireNextImageKHR() or vkQueuePresentKHR() return
VK_ERROR_OUT_OF_DATE, a new demo_resize() function is called, that replaces the
current state, command buffers, swapchain, etc, with new ones that reflect the
new size of the window. As part of this, the app picks up the window size from
vkGetSurfacePropertiesKHR().
The same occurs if the application receives an XCB_CONFIGURE_NOTIFY event, with
a changed window size.
Tobin Ehlis [Fri, 23 Oct 2015 22:00:08 +0000 (16:00 -0600)]
layers: Improve DrawState Descriptor validation
Adding further validation for the contents of vkUpdateDescriptorSets() call.
Make sure that provided sampler/image/buffer data is consistent with type and layout of the update.
For imageView updates, make sure that aspect bits are set correctly for Color and DS images and make sure that the imageLayout is compatible with the underlying image format.
This results in 4 new validation checks:
DRAWSTATE_SAMPLER_DESCRIPTOR_ERROR
DRAWSTATE_IMAGEVIEW_DESCRIPTOR_ERROR
DRAWSTATE_BUFFERVIEW_DESCRIPTOR_ERROR
DRAWSTATE_BUFFERINFO_DESCRIPTOR_ERROR
Each of the new checks has a basic check to verify that the underlying Vk object (sampler, imageview, bufferview, buffer) for the respective type of check is valid. The ImageView error also includes cases where format of the image is not consistent with the layout (Color vs DS).
Also added some enhancements to existing check:
DRAWSTATE_INVALID_IMAGE_ASPECT - verify D&S bits not both set, but that one is for a DS layout, verify COLOR bit set for Color layout
This change included adding and/or enhancing the tracking in DrawState for image[View] and buffer[View].
There is documentation for each of the new checks.
There are new tests added for each of the new error cases as well as the ASPECT error case.
Tobin Ehlis [Fri, 25 Sep 2015 20:49:43 +0000 (14:49 -0600)]
layers: Modify Image layer to store IMAGE_STATE structs instead of their unique_ptrs
Jon Ashburn [Mon, 26 Oct 2015 22:54:51 +0000 (16:54 -0600)]
loader: Check for NULL ICD in CreateDevice
Related to lunargxchange #163
Courtney Goeltzenleuchter [Fri, 23 Oct 2015 19:39:19 +0000 (13:39 -0600)]
misc: Bump to header version 183
Courtney Goeltzenleuchter [Mon, 26 Oct 2015 18:59:59 +0000 (12:59 -0600)]
draw_state: Remove obsolete check
Courtney Goeltzenleuchter [Fri, 23 Oct 2015 19:38:14 +0000 (13:38 -0600)]
bug-14827: Remove DescriptorInfo union
The DescriptorInfo union is invalid in C++
Courtney Goeltzenleuchter [Mon, 19 Oct 2015 19:44:50 +0000 (13:44 -0600)]
bug-14258: Remove maxCommandBuffers
commit #
53c2f7e
Tobin Ehlis [Fri, 23 Oct 2015 23:52:53 +0000 (17:52 -0600)]
layers: Update ObjectTracker to handle double-embedded loops of array struct params w/ object arrays in them
ObjectTracker still only goes 1-level deep on object validation so if an array struct param has an embedded struct that then has an object, validating those objects is not yet done by ObjectTracker.
Tobin Ehlis [Fri, 23 Oct 2015 22:57:03 +0000 (16:57 -0600)]
layers: Fix objectTracker to validate DSs in CmdBindDescriptorSets()
Courtney Goeltzenleuchter [Fri, 23 Oct 2015 20:21:05 +0000 (14:21 -0600)]
bug-14258: Make descriptor pools and command pools more consistent
Courtney Goeltzenleuchter [Fri, 23 Oct 2015 16:37:38 +0000 (10:37 -0600)]
misc: bump to header version 182
Courtney Goeltzenleuchter [Fri, 23 Oct 2015 16:37:02 +0000 (10:37 -0600)]
bug-14575: normalized queue priorities
Courtney Goeltzenleuchter [Thu, 22 Oct 2015 21:47:21 +0000 (15:47 -0600)]
Bug 14789: Clean up limit structure
Mark Lobodzinski [Mon, 26 Oct 2015 22:14:44 +0000 (16:14 -0600)]
layers: Fix windows build error
Image layer had a list initialzation inside a member initializer list
Mark Lobodzinski [Fri, 23 Oct 2015 20:20:31 +0000 (14:20 -0600)]
layers: Add state-dependent image aspect/format checks
Courtney Goeltzenleuchter [Thu, 22 Oct 2015 21:33:27 +0000 (15:33 -0600)]
misc: Update header to v181
Courtney Goeltzenleuchter [Thu, 22 Oct 2015 21:31:56 +0000 (15:31 -0600)]
bug-14827: Make DescriptorInfo a union of bufferInfo, imageInfo, and bufferView
Courtney Goeltzenleuchter [Thu, 22 Oct 2015 00:11:04 +0000 (18:11 -0600)]
bug-14786: CmdBufferOptimizeFlags -> CmdBufferUsageFlags
Courtney Goeltzenleuchter [Fri, 16 Oct 2015 15:46:00 +0000 (09:46 -0600)]
bug-14786: Addressing layered subresources in vkCmdCopyImage
commit:
ad27e2b Attempt at naming consistency
Courtney Goeltzenleuchter [Wed, 21 Oct 2015 23:57:31 +0000 (17:57 -0600)]
bug-14786: minor renames
Courtney Goeltzenleuchter [Fri, 16 Oct 2015 00:22:08 +0000 (18:22 -0600)]
misc: Change clear rectangle to include array layer/count
commit:
53a511d
Courtney Goeltzenleuchter [Thu, 22 Oct 2015 17:03:31 +0000 (11:03 -0600)]
bug-14542: Remove VK_UNSUPPORTED from success return codes
Courtney Goeltzenleuchter [Wed, 21 Oct 2015 23:08:06 +0000 (17:08 -0600)]
WIP bug-14815: VkShaderStage
Courtney Goeltzenleuchter [Wed, 21 Oct 2015 23:00:51 +0000 (17:00 -0600)]
WIP bug-14815: VkImageAspect
Courtney Goeltzenleuchter [Thu, 22 Oct 2015 17:31:50 +0000 (11:31 -0600)]
misc: Bump header version to v180
Courtney Goeltzenleuchter [Fri, 23 Oct 2015 21:48:32 +0000 (15:48 -0600)]
misc: change is unneeded?
Courtney Goeltzenleuchter [Wed, 21 Oct 2015 00:04:07 +0000 (18:04 -0600)]
bug-14746: add batched submit for semaphores and command buffers
Courtney Goeltzenleuchter [Tue, 20 Oct 2015 22:52:45 +0000 (16:52 -0600)]
misc: match upstream header v179
Courtney Goeltzenleuchter [Tue, 20 Oct 2015 22:40:38 +0000 (16:40 -0600)]
Bug 14621: Change vkGet* functions to not return VkResult
Courtney Goeltzenleuchter [Fri, 16 Oct 2015 15:58:26 +0000 (09:58 -0600)]
bug-14580: add dataSize to vkGetPipelineCacheData
commit:
aaa2ae0
Courtney Goeltzenleuchter [Mon, 19 Oct 2015 22:50:21 +0000 (16:50 -0600)]
bug-14809: Need VK_ERROR_FEATURE_NOT_PRESENT
Courtney Goeltzenleuchter [Mon, 19 Oct 2015 22:23:53 +0000 (16:23 -0600)]
misc: make enum boundary names consistent
Courtney Goeltzenleuchter [Mon, 19 Oct 2015 22:03:32 +0000 (16:03 -0600)]
bug-14808: report number of valid bits in timesamps
Courtney Goeltzenleuchter [Tue, 20 Oct 2015 17:34:57 +0000 (11:34 -0600)]
misc: upstream header v176
Courtney Goeltzenleuchter [Tue, 20 Oct 2015 17:32:47 +0000 (11:32 -0600)]
misc: Remove WRITE_COMBINED
Courtney Goeltzenleuchter [Fri, 16 Oct 2015 16:04:24 +0000 (10:04 -0600)]
misc: Fix compile warnings about undefined _MSC_VER
commit:
a500fc4
Courtney Goeltzenleuchter [Thu, 15 Oct 2015 23:59:39 +0000 (17:59 -0600)]
bug-14737: Move alphaToCoverageEnable to MultisampleStateCreateInfo
Courtney Goeltzenleuchter [Fri, 16 Oct 2015 15:51:53 +0000 (09:51 -0600)]
bug-14646: remove VK_SUBPASS_DESCRIPTION_NO_OVERDRAW_BIT
commit:
854f367
Courtney Goeltzenleuchter [Thu, 15 Oct 2015 23:46:39 +0000 (17:46 -0600)]
misc: bump header version 174
Courtney Goeltzenleuchter [Thu, 15 Oct 2015 22:57:32 +0000 (16:57 -0600)]
bug-14084: Replace abbreviations in VkQueryPipelineStatisticFlags
Courtney Goeltzenleuchter [Thu, 15 Oct 2015 23:35:38 +0000 (17:35 -0600)]
bug-14531: Expand tess abbreviation to tessellation
Courtney Goeltzenleuchter [Tue, 20 Oct 2015 16:53:50 +0000 (10:53 -0600)]
misc: Bump header to align with upstream
Courtney Goeltzenleuchter [Thu, 15 Oct 2015 22:58:44 +0000 (16:58 -0600)]
bug-14642: Rename queueRecordCount to requestedQueueCount
Courtney Goeltzenleuchter [Tue, 20 Oct 2015 16:37:05 +0000 (10:37 -0600)]
misc: Bump header to align with upstream
Courtney Goeltzenleuchter [Thu, 15 Oct 2015 22:51:05 +0000 (16:51 -0600)]
bug-14291: combine color and depth/stencil clears
Courtney Goeltzenleuchter [Thu, 15 Oct 2015 18:57:38 +0000 (12:57 -0600)]
misc: Rename depthClip to depthClamp
Implementations will need to invert their behavior.
commit:
60a6646e24e58b1e2c44ea8eeb1017fc133593a1
Tony Barbour [Fri, 23 Oct 2015 16:53:30 +0000 (10:53 -0600)]
demos: Check all return values
Michael Lentine [Fri, 23 Oct 2015 19:40:50 +0000 (12:40 -0700)]
Return empty string instead of null
Jon Ashburn [Wed, 21 Oct 2015 22:09:27 +0000 (16:09 -0600)]
loader: Fix heap_realloc function to return newly allocated memory
LunarXchange issue #162
Tobin Ehlis [Tue, 20 Oct 2015 23:06:16 +0000 (17:06 -0600)]
layers: Remove mid() & mdd() functions from DrawState
Just use the report_data directly off the already looked-up map entry for the given device/instance. This saves a map lookup.
Tobin Ehlis [Tue, 20 Oct 2015 22:16:04 +0000 (16:16 -0600)]
layers: Add DrawState check for DescriptorSet availability in Pool
Prior to allocating descriptors from a Pool, verify that requested number/type of descriptors are available in that Pool, flag error if not.
When Pool is reset or when descriptors are allocated, release descriptors back to pool.
Added constructor and destructor for POOL_NODE to simplify allocation/cleanup.
Added layer documentation for new check and AllocDescriptorFromEmptyPool test to verify that error is correctly flagged.
Tobin Ehlis [Tue, 20 Oct 2015 16:11:55 +0000 (10:11 -0600)]
layers: DrawState layout tracking improvements
Descriptor type per layout tracked via vector to simplify allocation/cleanup.
Added tracking for pipeline layout that can be used for further validation checks
Tobin Ehlis [Tue, 20 Oct 2015 15:13:54 +0000 (09:13 -0600)]
layers: Added TODO comments to DrawState for missing validation checks
Tobin Ehlis [Mon, 19 Oct 2015 20:31:10 +0000 (14:31 -0600)]
layers: Fix indices in DrawState error message
If imageView aspect for DescriptorSet Update has both Depth and Stencil set, top-level "WriteDescriptorSet" is governed by "i" and specific descriptor within that particular WriteDescriptorSet is governed by "j".
Tobin Ehlis [Mon, 19 Oct 2015 18:09:13 +0000 (12:09 -0600)]
layers: Comment in DrawState for missing validation of DescriptorPool size limit
Tony Barbour [Wed, 21 Oct 2015 16:14:48 +0000 (10:14 -0600)]
demos: Add mem barrier to change layout to present
This addresses LunarExchange issue 168
Tony Barbour [Tue, 20 Oct 2015 19:01:07 +0000 (13:01 -0600)]
demos: check return value from vkQueueWaitSemaphore
Tony Barbour [Tue, 20 Oct 2015 18:49:46 +0000 (12:49 -0600)]
demos: Handle paint events and call RedrawWindow to animate
This keeps MessageBoxs from validation on Windows from hanging the
demos, while allowing the demo to animate
Cody Northrop [Wed, 21 Oct 2015 17:32:58 +0000 (13:32 -0400)]
Fix "_out64" -> "build" references accidentally removed
Cody Northrop [Wed, 21 Oct 2015 17:17:49 +0000 (13:17 -0400)]
Fix formatting in BUILD.md
David Pinedo [Wed, 21 Oct 2015 14:03:06 +0000 (08:03 -0600)]
BUILD.md: changed "_out64" to "build"
David Pinedo [Mon, 19 Oct 2015 21:22:28 +0000 (15:22 -0600)]
demos: fix tabs and line endings in vulkaninfo
David Pinedo [Mon, 19 Oct 2015 21:15:34 +0000 (15:15 -0600)]
Demos: output api version in vulkaninfo
Tony Barbour [Thu, 15 Oct 2015 18:42:56 +0000 (12:42 -0600)]
Clarify parameter usage in memory_type_from_properties
Mark Lobodzinski [Fri, 16 Oct 2015 15:17:27 +0000 (09:17 -0600)]
layers: LX161, validate attachment references in subpasses
For CmdClearColorAttachment, attachment ref must be in attachment
reference array of current subpass.
Mark Lobodzinski [Fri, 16 Oct 2015 19:32:24 +0000 (13:32 -0600)]
layers: LX160, Validate Descriptor Set Image Aspects
Validated that Descriptor Sets do not have both the STENCIL and
DEPTH aspect bits set in their imageViews.
Jon Ashburn [Thu, 15 Oct 2015 19:47:58 +0000 (13:47 -0600)]
loader: Clean up loader_platform file
Michael Lentine [Tue, 6 Oct 2015 21:56:18 +0000 (14:56 -0700)]
Add subpass dependency validation.
Mark Lobodzinski [Wed, 14 Oct 2015 19:16:33 +0000 (13:16 -0600)]
layers: LX159, properly validate swapchain images
Swapchain images are implicitly created and deleted, but must
be considered valid VkImage objects.
Mark Lobodzinski [Tue, 13 Oct 2015 17:50:56 +0000 (11:50 -0600)]
layers: LX159, validate all descriptorSets in array
DrawState was not using array index in dsUpdate.
Mark Lobodzinski [Tue, 13 Oct 2015 17:45:33 +0000 (11:45 -0600)]
layers: LX159, pipelineCache CAN be Null.
Fix for ObjectTracker to not error on NULL pipelineCache objects.
Mark Lobodzinski [Tue, 13 Oct 2015 19:45:56 +0000 (13:45 -0600)]
layers: Remove MemTracker dead code