platform/upstream/Vulkan-Tools.git
9 years agotoolchain: Switch to using github for glslang
Cody Northrop [Thu, 2 Jul 2015 17:33:41 +0000 (11:33 -0600)]
toolchain: Switch to using github for glslang

We don't have any tags to pull from, but we can pull specific
commits that are tested and known to work.

The current commit matches up with the previous subversion
version of glslang, so there is no functional change.

9 years agotoolchain: Add script to pull and build on Windows
Cody Northrop [Tue, 12 May 2015 22:23:59 +0000 (16:23 -0600)]
toolchain: Add script to pull and build on Windows

Summary:

Add Windows version of update_external_sources, and relocate
glslang and LunarGLASS target revisions to external files shared
with Linux.

Details:

On Linux, we've successfully been using update_external_sources.sh
to get on the target version of glslang (which generates SPIR-V) and
LunarGLASS (which consumes SPIR-V).  Both of these components are
peers to the typical Vulkan directory structure:

   /LoaderAndTools
       /layers
       /loader
       /demos
       /...
   /glslang
   /LunarGLASS

There hasn't been an equivalent on Windows, so tedious manual steps
and GUIs have been used on individual systems.

This commit introduces a Windows batch script that automates the
process similar to Linux.  It detects if you have the required
dependendcies and early-outs for any problems.

If you are a Windows developer that only wants spirv headers, run:

  update_external_sources.bat --sync-glslang

If you want to build the Windows version of glslangValidator.exe, run:

  update_external_sources.bat --build-glslang

If you want to run LunarGOO with SPIR-V support on Windows, run:

  update_external_sources.bat --build-LunarGLASS

The script builds Debug and Release x64 versions, and should be run from:

  Developer Command Prompt for VS2013

This commit also relocates the target version of glslang and LunarGLASS
to an external shared file that only contains the version number of
each.  Both scripts read the value from the file, therefore they
cannot get out of sync.

9 years agotests: Fix some failing layer validation tests
Tobin Ehlis [Thu, 2 Jul 2015 16:45:16 +0000 (10:45 -0600)]
tests: Fix some failing layer validation tests

MemTracker was changing an API return value during an error case which caused ParamChecker to complain, flagging unexpected error.
ParamChecker was no allowing NULL fence on Queue Submit or NULL pDynamicOffsets on when binding Descriptor Sets. Both of these values can be NULL.

9 years agoloader: Rename loader_platform.h -> vk_loader_platform.h
Tobin Ehlis [Fri, 3 Jul 2015 16:34:49 +0000 (10:34 -0600)]
loader: Rename loader_platform.h -> vk_loader_platform.h

9 years agolayers: Rename all layer headers to begin with "vk_layer_" prefix
Tobin Ehlis [Fri, 3 Jul 2015 16:15:26 +0000 (10:15 -0600)]
layers: Rename all layer headers to begin with "vk_layer_" prefix

9 years agoinclude: Rename vkLayer.h -> vk_layer.h and vkIcd.h -> vk_icd.h
Tobin Ehlis [Fri, 3 Jul 2015 15:42:57 +0000 (09:42 -0600)]
include: Rename vkLayer.h -> vk_layer.h and vkIcd.h -> vk_icd.h

9 years agovulkan.h: v129 -- rework clear colors, remove raw clear [#14020]
Chris Forbes [Wed, 24 Jun 2015 02:34:53 +0000 (14:34 +1200)]
vulkan.h: v129 -- rework clear colors, remove raw clear [#14020]

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
9 years agotri: Use render pass load ops for color and depth clears
Chris Forbes [Mon, 22 Jun 2015 06:51:09 +0000 (18:51 +1200)]
tri: Use render pass load ops for color and depth clears

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
9 years agocube: Use render pass load op for depth clear
Chris Forbes [Mon, 22 Jun 2015 06:47:28 +0000 (18:47 +1200)]
cube: Use render pass load op for depth clear

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
9 years agovulkan.h: Split attachment and image clears (#13914, v126)
Chris Forbes [Mon, 22 Jun 2015 05:21:59 +0000 (17:21 +1200)]
vulkan.h: Split attachment and image clears (#13914, v126)

- Add bit flags for image aspects.
- Replace VkRect with VkRect2D and VkRect3D.
- Rename vkCmdClearDepthStencil to vkCmdClearDepthStencilImage
- Add vkCmdClearColorAttachment and vkCmdClearDepthStencilAttachment

Remaining to be done:
- Actually implement vkCmdClearColorAttachment,
  vkCmdClearDepthStencilAttachment in the Intel ICD
- Enforce renderpass interactions: CmdClear*Attachment may only be
  called within a renderpass; CmdClear*Image may only be called outside
  a renderpass.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
9 years agovulkan.h: Update features/limits structures (#12827, v125)
Chris Forbes [Sun, 21 Jun 2015 08:09:12 +0000 (20:09 +1200)]
vulkan.h: Update features/limits structures (#12827, v125)

- Add infrastructure in vulkaninfo to dump features/limits. To be filled
  out to dump everything interesting.
- Move existing limits from VkPhysicalDeviceInfo to
  VkPhysicalDeviceLimits, and drop those that no longer exist.
- Adjust the drivers to fill out the above in their new location.
  Other new features/limits still to be exposed by nulldrv and the intel
  ICD.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
9 years agoupdate vulkan.h for multi-level command buffers (V121)
Chia-I Wu [Fri, 26 Jun 2015 07:34:39 +0000 (15:34 +0800)]
update vulkan.h for multi-level command buffers (V121)

With minimal changes to keep everything building and functioning.

9 years agovulkan.h: Added #define for MAX_DESCRIPTION
Mark Lobodzinski [Fri, 3 Jul 2015 16:26:22 +0000 (10:26 -0600)]
vulkan.h: Added #define for MAX_DESCRIPTION

Part of header revision 135 changes.

9 years agovulkan.h: V120 -- Tighten spec around VkMemoryRequirements
Mark Lobodzinski [Thu, 2 Jul 2015 23:09:57 +0000 (17:09 -0600)]
vulkan.h: V120 -- Tighten spec around VkMemoryRequirements

Moved the HOST_LOCAL memory property.

9 years agovulkan.h: V119 -- Remove unsigned byte indices
Mark Lobodzinski [Thu, 2 Jul 2015 16:03:43 +0000 (10:03 -0600)]
vulkan.h: V119 -- Remove unsigned byte indices

Took out VK_INDEX_TYPE_UINT8.

9 years agovulkan.h: V118 -- Add array types to VkImageViewType
Mark Lobodzinski [Thu, 2 Jul 2015 15:53:03 +0000 (09:53 -0600)]
vulkan.h: V118 --  Add array  types to VkImageViewType

9 years agovulkan.h: V117 -- Remove Atomic Counters, Bug #14081
Mark Lobodzinski [Wed, 1 Jul 2015 21:49:28 +0000 (15:49 -0600)]
vulkan.h: V117 -- Remove Atomic Counters, Bug #14081

9 years agovulkan.h: V116 -- Remove VK_IMAGE_LAYOUT_CLEAR_OPTIMAL
Mark Lobodzinski [Wed, 1 Jul 2015 21:18:26 +0000 (15:18 -0600)]
vulkan.h: V116 -- Remove VK_IMAGE_LAYOUT_CLEAR_OPTIMAL

Usage was declared redundant.

9 years agovulkan.h: V115 -- Reintroduce memory heaps & types. Bug #14082.
Mark Lobodzinski [Thu, 2 Jul 2015 22:49:40 +0000 (16:49 -0600)]
vulkan.h: V115 -- Reintroduce memory heaps & types.  Bug #14082.

Reworked memory properties and types and added support for multiple
heaps.

9 years agolayers: Update ObjectTracker layer to check first-level struct parameters for valid...
Tobin Ehlis [Tue, 30 Jun 2015 20:32:16 +0000 (14:32 -0600)]
layers: Update ObjectTracker layer to check first-level struct parameters for valid objects

9 years agolayers: Fix ObjectTracker to add Instance when it's created
Tobin Ehlis [Tue, 30 Jun 2015 20:31:50 +0000 (14:31 -0600)]
layers: Fix ObjectTracker to add Instance when it's created

9 years agodemos: Set pName for cube shaders to "main" to keep ShaderChecker happy
Tobin Ehlis [Thu, 2 Jul 2015 17:02:49 +0000 (11:02 -0600)]
demos: Set pName for cube shaders to "main" to keep ShaderChecker happy

9 years agoloader: Use _alloca instead of alloca on Windows
David Pinedo [Thu, 2 Jul 2015 15:04:37 +0000 (09:04 -0600)]
loader: Use _alloca instead of alloca on Windows

9 years agobug 14014: Fill out support for VkShaderModule
Courtney Goeltzenleuchter [Sun, 28 Jun 2015 19:01:17 +0000 (13:01 -0600)]
bug 14014: Fill out support for VkShaderModule

Updated tests and demos to properly use VkShaderModule.
Add support to shader_checker for shader module.
Doesn't do anything with the pName parameter.

9 years agobug-14014: Allow multiple entrypoints in modules
Courtney Goeltzenleuchter [Thu, 25 Jun 2015 00:24:19 +0000 (18:24 -0600)]
bug-14014: Allow multiple entrypoints in modules

Continue implementation of shader module.

9 years agoloader: Move CreateDevice to device table
Courtney Goeltzenleuchter [Fri, 26 Jun 2015 00:01:43 +0000 (18:01 -0600)]
loader: Move CreateDevice to device table

Discovered an issue where a layer was doing cleanup
in it's DestroyDevice function but the CreateDevice
was never called.
This happened because the extension was only enabled
on the device chain and the device chain doesn't actually
call CreateDevice. That happens on the Instance chain.
Making it so that we can call down the device chain -
which is terminated by the ICD.
We need to know the real device object to construct the
device chain heiarchy and when calling down the device
chain it should end with the ICD doing the actual device
object creation.

This patch fixes the issue by using the
same process as CreateInstance. The loader will call
the ICD's CreateDevice and pass that in the *pDevice
argument. The layers then ignore the PhysicalDevice parameter
and use the *pDevice to access the device chain.
To prevent the ICD from being called twice needed to
stub in a special loader_GetDeviceChainProcAddr to provide
a stub for only CreateDevice as the end of the chain.

9 years agoloader: Remove locks from vkGet routines
Tony Barbour [Wed, 1 Jul 2015 19:31:02 +0000 (13:31 -0600)]
loader: Remove locks from vkGet routines

If the driver needs thread safety to answer "get" requests, it is
assumed that it will lock for itself

9 years agovulkan.h: Bug 14181 - Barriers need to be more precise
Tony Barbour [Mon, 29 Jun 2015 22:20:35 +0000 (16:20 -0600)]
vulkan.h: Bug 14181 - Barriers need to be more precise

9 years agoDemos: use vcproj .user file to configure location of vulkan.dll in msvs
David Pinedo [Wed, 1 Jul 2015 18:57:51 +0000 (12:57 -0600)]
Demos: use vcproj .user file to configure location of vulkan.dll in msvs

9 years agoloader: Remove uneeded ICD and layers scanned boolean
Jon Ashburn [Tue, 30 Jun 2015 22:44:28 +0000 (16:44 -0600)]
loader: Remove uneeded ICD and layers scanned boolean

Artifact of when layers and ICDs weren't scanned initially.

9 years agoloader: Support gettting JSON ICD manifest files from registry
Jon Ashburn [Tue, 30 Jun 2015 21:46:22 +0000 (14:46 -0700)]
loader: Support gettting JSON ICD manifest files from registry

Windows now supports the JSON manifest file for ICDs

9 years agoloader: Fix compilation warnings for debug_report on Windows
Jon Ashburn [Tue, 30 Jun 2015 21:44:13 +0000 (14:44 -0700)]
loader: Fix compilation warnings for debug_report on Windows

9 years agoloader: Add math library to the build for linux cJSON files
Jon Ashburn [Mon, 29 Jun 2015 23:51:36 +0000 (17:51 -0600)]
loader: Add math library to the build for linux  cJSON files

9 years agoloader: Add parsing of JSON file to find location of ICD libraries
Jon Ashburn [Mon, 29 Jun 2015 17:25:34 +0000 (11:25 -0600)]
loader: Add parsing of JSON file to find location of ICD libraries

Works on Linux not yet on Windows.

9 years agocube: fix validation and clean up errors
Tony Barbour [Tue, 30 Jun 2015 20:14:19 +0000 (14:14 -0600)]
cube: fix validation and clean up errors

9 years agoLayers: Fix screenshot seg fault, changed accesses to dispatch tbl
David Pinedo [Tue, 30 Jun 2015 19:08:37 +0000 (13:08 -0600)]
Layers: Fix screenshot seg fault, changed accesses to dispatch tbl

9 years agodemos: Ensure VertexInputState is NULL if unused
Mark Lobodzinski [Tue, 30 Jun 2015 16:18:36 +0000 (10:18 -0600)]
demos: Ensure VertexInputState is NULL if unused

Was passing in pointer to a null VertexInputState structure, but
driver needs null pointer if structure unused.

9 years agoRevert "loader: Remove CreateDevice from loader's instance"
Courtney Goeltzenleuchter [Mon, 29 Jun 2015 23:38:51 +0000 (17:38 -0600)]
Revert "loader: Remove CreateDevice from loader's instance"

This reverts commit b81161d0fa45c3b1333d8954220c992c5eb8aac4.

Change did not match commit message.

9 years agoloader: Need to use ICD's GetDeviceProcAddr
Courtney Goeltzenleuchter [Mon, 29 Jun 2015 22:09:23 +0000 (16:09 -0600)]
loader: Need to use ICD's GetDeviceProcAddr

The loader_GetDeviceProcAddr is the terminator
for the CreateDevice chain. It needs to call the ICD's
GetDeviceProcAddr to get the correct function pointer
not the object's current dispatch table that points
at the beginning of the chain.
Saw issue when running cube with only DRAW_STATE layer
enabled.

9 years agoloader: Remove CreateDevice from loader's instance
Courtney Goeltzenleuchter [Fri, 26 Jun 2015 00:01:43 +0000 (18:01 -0600)]
loader: Remove CreateDevice from loader's instance

Need to remove the CreateDevice function pointer from the
loader's instance table.

9 years agoloader: Move CreateDevice to device table
Courtney Goeltzenleuchter [Fri, 26 Jun 2015 00:01:43 +0000 (18:01 -0600)]
loader: Move CreateDevice to device table

Discovered an issue where a layer was doing cleanup
in it's DestroyDevice function but the CreateDevice
was never called.
This happened because the extension was only enabled
on the device chain and the device chain doesn't actually
call CreateDevice. That happens on the Instance chain.
Making it so that we can call down the device chain -
which is terminated by the ICD.
We need to know the real device object to construct the
device chain heiarchy and when calling down the device
chain it should end with the ICD doing the actual device
object creation.

This patch fixes the issue by using the
same process as CreateInstance. The loader will call
the ICD's CreateDevice and pass that in the *pDevice
argument. The layers then ignore the PhysicalDevice parameter
and use the *pDevice to access the device chain.
To prevent the ICD from being called twice needed to
stub in a special loader_GetDeviceChainProcAddr to provide
a stub for only CreateDevice as the end of the chain.

integrate review feedback.

9 years agolayers: Do not advertise support for WSI
Courtney Goeltzenleuchter [Fri, 26 Jun 2015 22:43:44 +0000 (16:43 -0600)]
layers: Do not advertise support for WSI

Layers that do not implement WSI features yet can 'trace'
WSI calls do not need to advertise WSI as an extension.
Any WSI calls made will land in the layer if it hooks
those calls. Otherwise should not care about WSI.

9 years agolayers: Abort logging if null debug_report ptr
Courtney Goeltzenleuchter [Fri, 26 Jun 2015 21:14:50 +0000 (15:14 -0600)]
layers: Abort logging if null debug_report ptr

If a layer were to only be enabled on the device chain
it would not have had a chance to allocate a debug_report
data structure. Just treat such cases as having debug_report
disabled.

9 years agolayers: Remove unneeded asserts
Courtney Goeltzenleuchter [Fri, 26 Jun 2015 21:11:45 +0000 (15:11 -0600)]
layers: Remove unneeded asserts

We'll soon break the rule being asserted, so remove
them.

9 years agogenerator: Add more debug statements
Courtney Goeltzenleuchter [Fri, 26 Jun 2015 21:07:53 +0000 (15:07 -0600)]
generator: Add more debug statements

The location comments in the generated code help
a lot in determining what part of the generator generates
what code.

9 years agogenerator: Clear dispatch table
Courtney Goeltzenleuchter [Fri, 26 Jun 2015 21:05:29 +0000 (15:05 -0600)]
generator: Clear dispatch table

Finding entries that are not filled in properly is easier
if the table is initialized to zeros.

9 years agoloader: Need to search device extension cache
Courtney Goeltzenleuchter [Thu, 25 Jun 2015 22:27:24 +0000 (16:27 -0600)]
loader: Need to search device extension cache

Code was searching global extension cache for
extensions enabled at CreateDevice time. List are similar
but not identical and cause vulkaninfo to hit a segfault.

9 years agoloader: Add debug info
Courtney Goeltzenleuchter [Thu, 25 Jun 2015 22:26:55 +0000 (16:26 -0600)]
loader: Add debug info

9 years agovulkaninfo: Use app's extension count, not system
Courtney Goeltzenleuchter [Thu, 25 Jun 2015 22:24:57 +0000 (16:24 -0600)]
vulkaninfo: Use app's extension count, not system

Was telling the driver to enable more extensions than
intended.

9 years agovulkaninfo: handy debug output
Courtney Goeltzenleuchter [Thu, 25 Jun 2015 22:24:36 +0000 (16:24 -0600)]
vulkaninfo: handy debug output

9 years agovulkaninfo: Need WSI extension for some queries
Courtney Goeltzenleuchter [Thu, 25 Jun 2015 22:23:45 +0000 (16:23 -0600)]
vulkaninfo: Need WSI extension for some queries

9 years agovulkan.h: V110 #13864 -- Border Color Values Underspecified
Tony Barbour [Thu, 25 Jun 2015 22:56:44 +0000 (16:56 -0600)]
vulkan.h: V110 #13864 -- Border Color Values Underspecified

9 years agolayers: ObjectTracker cleanup
Tobin Ehlis [Thu, 25 Jun 2015 18:29:25 +0000 (12:29 -0600)]
layers: ObjectTracker cleanup

Removed some unused error codes.
Updated INVALID_OBJECT error to correctly be flagged.

9 years agovulkan.h: Bug 14171 - remove unused structure type enums
Tony Barbour [Fri, 26 Jun 2015 21:02:35 +0000 (15:02 -0600)]
vulkan.h: Bug 14171 - remove unused structure type enums

9 years agovulkan.h: Bug 14153 - remove maxInlineMemoryUpdateSize
Tony Barbour [Fri, 26 Jun 2015 20:32:15 +0000 (14:32 -0600)]
vulkan.h: Bug 14153 - remove maxInlineMemoryUpdateSize

9 years agovulkan.h: Bug 14136 - reorder logicop enums
Tony Barbour [Fri, 26 Jun 2015 19:28:56 +0000 (13:28 -0600)]
vulkan.h: Bug 14136 - reorder logicop enums

9 years agovulkan.h: Bug 13900 - Remove initialCount from semaphores
Tony Barbour [Fri, 26 Jun 2015 18:56:09 +0000 (12:56 -0600)]
vulkan.h: Bug 13900 - Remove initialCount from semaphores

9 years agolayers: Use new param checker layer.
Jeremy Hayes [Fri, 26 Jun 2015 18:48:09 +0000 (12:48 -0600)]
layers: Use new param checker layer.

9 years agovulkan.h: Bug 13616 Clarification of types of sample counts
Tony Barbour [Fri, 26 Jun 2015 16:18:34 +0000 (10:18 -0600)]
vulkan.h: Bug 13616 Clarification of types of sample counts

9 years agovulkan.h: Bug 13939 Remove references to depth/stencil resolve
Tony Barbour [Fri, 26 Jun 2015 15:43:05 +0000 (09:43 -0600)]
vulkan.h: Bug 13939 Remove references to depth/stencil resolve

9 years agolayers: Flag DrawState INVALID_RENDERPASS error if NULL RenderPass used to Begin...
Tobin Ehlis [Tue, 23 Jun 2015 22:13:03 +0000 (16:13 -0600)]
layers: Flag DrawState INVALID_RENDERPASS error if NULL RenderPass used to Begin/End/Continue a RenderPass

9 years agolayers: Warn in DrawState if DescriptorSet bound that was never updated.
Tobin Ehlis [Wed, 24 Jun 2015 23:27:33 +0000 (17:27 -0600)]
layers: Warn in DrawState if DescriptorSet bound that was never updated.

9 years agolayers: In DrawState, validate correct use of RenderPass
Tobin Ehlis [Wed, 24 Jun 2015 21:53:07 +0000 (15:53 -0600)]
layers: In DrawState, validate correct use of RenderPass

This change validates certain API calls are made inside of or outside of a RenderPass as appropriate. Exact restrictions included in this changelist are included below.

Also fixed cube and tri demos to Bind Pipeline & DescriptorSets within RenderPass and updated some layer validation tests.

The following calls must be within RenderPass:
vkCmdBindPipeline() w/ GFX pipelineBindPoint
vkCmdBindDescriptorSets() w/ GFX pipelineBindPoint
vkCmdBindDynamicStateObject()
vkCmdBindIndexBuffer()
vkCmdBindVertexBuffers()
vkCmdEndRenderPass()

The following calls must be outside of RenderPass:
vkCmdBindPipeline() w/ COMPUTE pipelineBindPoint
vkCmdBindDescriptorSets() w/ COMPUTE pipelineBindPoint
vkCmdBlitImage()
vkCmdResolveImage()
vkCmdBeginRenderPass()

9 years agolayers: Add DrawState check to verify Draw* cmds only issued within RenderPass
Tobin Ehlis [Tue, 23 Jun 2015 17:22:55 +0000 (11:22 -0600)]
layers: Add DrawState check to verify Draw* cmds only issued within RenderPass

9 years agolayers: Add DrawState check to verify that Pipeline layout from vkCmdBindDescriptorSe...
Tobin Ehlis [Mon, 22 Jun 2015 23:20:50 +0000 (17:20 -0600)]
layers: Add DrawState check to verify that Pipeline layout from vkCmdBindDescriptorSets() matches layout from PSO at Draw time.

Also fix a bug where PSO status flags were not getting set into Cmd Buffer.

9 years agolayers: Flag DrawState INVALID_RENDERPASS error if NULL RenderPass used to Begin...
Tobin Ehlis [Tue, 23 Jun 2015 22:13:03 +0000 (16:13 -0600)]
layers: Flag DrawState INVALID_RENDERPASS error if NULL RenderPass used to Begin/End/Continue a RenderPass

9 years agovulkan.h: V109 -- Remove minLod from VkImageViewCreateInfo
Tony Barbour [Thu, 25 Jun 2015 21:41:47 +0000 (15:41 -0600)]
vulkan.h: V109 -- Remove minLod from VkImageViewCreateInfo

9 years agovulkan.h: V108 -- Static Types, Bug# 13919
Tony Barbour [Wed, 24 Jun 2015 22:06:58 +0000 (16:06 -0600)]
vulkan.h: V108 -- Static Types, Bug# 13919

9 years agolayers: Correctly set Object Type for Dynamic State when flagging error
Tobin Ehlis [Tue, 23 Jun 2015 16:52:08 +0000 (10:52 -0600)]
layers: Correctly set Object Type for Dynamic State when flagging error

9 years agolayers: Report error in DrawState if vkCmdBlitImage() called during RenderPass.
Tobin Ehlis [Tue, 23 Jun 2015 16:41:13 +0000 (10:41 -0600)]
layers: Report error in DrawState if vkCmdBlitImage() called during RenderPass.

9 years agolayers: Added DrawState check to flag error if compute pipeline bound during RenderPass
Tobin Ehlis [Tue, 23 Jun 2015 14:46:18 +0000 (08:46 -0600)]
layers: Added DrawState check to flag error if compute pipeline bound during RenderPass

9 years agoBug 14014: Allow multiple entrypoints in modules
Courtney Goeltzenleuchter [Fri, 19 Jun 2015 03:49:59 +0000 (21:49 -0600)]
Bug 14014: Allow multiple entrypoints in modules

https://cvs.khronos.org/bugzilla/show_bug.cgi?id=14014
Header and minimal code changes to include support for
multiple entrypoints in a shader module.
Driver implementation TBD.

9 years agobug 14016: Make vkResetFences take const pFences
Courtney Goeltzenleuchter [Thu, 18 Jun 2015 23:28:20 +0000 (17:28 -0600)]
bug 14016: Make vkResetFences take const pFences

https://cvs.khronos.org/bugzilla/show_bug.cgi?id=14016

9 years agoscreenshot: remove unneeded initialization code
Courtney Goeltzenleuchter [Wed, 24 Jun 2015 20:58:38 +0000 (14:58 -0600)]
screenshot: remove unneeded initialization code

The device dispatch is setup in GetDeviceProcAddr, don't
need to do it in layer's CreateDevice.

9 years agoscreenshot: Need to wrap more functions
Courtney Goeltzenleuchter [Tue, 23 Jun 2015 14:50:57 +0000 (08:50 -0600)]
screenshot: Need to wrap more functions

Need to include CreateInstance, DestroyInstance
and CreateDevice in screenshot's GetInstanceProcAddr
otherwise cannot process setup correctly.

9 years agoscreenshot: Need a DestroyInstance
Courtney Goeltzenleuchter [Tue, 23 Jun 2015 14:50:27 +0000 (08:50 -0600)]
screenshot: Need a DestroyInstance

Need way to clean up resources allocated at CreateInstance.

9 years agoloader: Use loader_GetInstanceProcAddr
Courtney Goeltzenleuchter [Mon, 22 Jun 2015 23:45:21 +0000 (17:45 -0600)]
loader: Use loader_GetInstanceProcAddr

By using the vkGetInstanceProcAddr function in the loader's
instance dispatch table we will trace that function
during initialization of layers. Don't want to do that so
call loader internal function.

9 years agoimage: Need to get layer_data from correct place
Courtney Goeltzenleuchter [Mon, 22 Jun 2015 22:19:14 +0000 (16:19 -0600)]
image: Need to get layer_data from correct place

9 years agovulkan: remove unused error code
Courtney Goeltzenleuchter [Mon, 22 Jun 2015 21:22:51 +0000 (15:22 -0600)]
vulkan: remove unused error code

9 years agovulkan.h: Remove vkGetFormatInfo, add features/limits (#12827, v125)
Chris Forbes [Sun, 21 Jun 2015 10:55:02 +0000 (22:55 +1200)]
vulkan.h: Remove vkGetFormatInfo, add features/limits (#12827, v125)

NOTES:

1/ Some layers impact from vkGetFormatInfo ->
vkGetPhysicalDeviceFormatInfo; some checks are currently disabled in
ParamChecker pending discussion on the best way to do this. Similar
checks in Image layer implemented via additional layer_data member
to link back from VkDevice -> VkPhysicalDevice.

2/ VkPhysicalDeviceFeatures, VkPhysicalDeviceLimits members all zero
for now; also some further churn to be done to the contents of these
structures.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
9 years agobug 13038: Remove support for multiple GPUs
Courtney Goeltzenleuchter [Thu, 18 Jun 2015 23:01:41 +0000 (17:01 -0600)]
bug 13038: Remove support for multiple GPUs

https://cvs.khronos.org/bugzilla/show_bug.cgi?id=13038

9 years agoloader: Add {}'s so that loader compilers on Windows
David Pinedo [Wed, 24 Jun 2015 21:29:18 +0000 (15:29 -0600)]
loader: Add {}'s so that loader compilers on Windows

9 years agolayers: Add DrawState check to verify that Pipeline layout from vkCmdBindDescriptorSe...
Tobin Ehlis [Mon, 22 Jun 2015 23:20:50 +0000 (17:20 -0600)]
layers: Add DrawState check to verify that Pipeline layout from vkCmdBindDescriptorSets() matches layout from PSO at Draw time.

Also fix a bug where PSO status flags were not getting set into Cmd Buffer.

9 years agovulkan.h: V104 -- Unify compute/graphics pipeline shader passing semantics, Bug#...
Mark Lobodzinski [Tue, 23 Jun 2015 21:11:57 +0000 (15:11 -0600)]
vulkan.h: V104 -- Unify compute/graphics pipeline shader passing semantics, Bug# 13800

9 years agolayers: ObjectTracker per-instance storage, updated logging
Mark Lobodzinski [Tue, 23 Jun 2015 17:35:12 +0000 (11:35 -0600)]
layers: ObjectTracker per-instance storage, updated logging

o  Moved non-generated code into object_track.h header file
o  Added support for per-instance storage
o  Updated for new debug logging mechanism/callbacks

9 years agolayers: Fix DrawState compile fail
Tobin Ehlis [Tue, 23 Jun 2015 00:00:14 +0000 (18:00 -0600)]
layers: Fix DrawState compile fail

Missed adding in layout when resolving merge conflict.

9 years agolayers: Add DrawState check to verify Idx buffer bound before an Indexed Draw
Tobin Ehlis [Fri, 19 Jun 2015 21:07:05 +0000 (15:07 -0600)]
layers: Add DrawState check to verify Idx buffer bound before an Indexed Draw

Also some minor formatting clean-up to reduce lines of code

9 years agolayers: Add DrawState check to verify BeginCommandBuffer was called before updating...
Tobin Ehlis [Fri, 19 Jun 2015 19:00:59 +0000 (13:00 -0600)]
layers: Add DrawState check to verify BeginCommandBuffer was called before updating or ending a Cmd Buffer

Also migrated code to set Dynamic State back into CmdBindDynamicState function since that's the only call to set Dynamic State.

9 years agotri/cube: Convert GPA usage/error-checking/reporting to a macro.
Ian Elliott [Mon, 22 Jun 2015 21:07:49 +0000 (15:07 -0600)]
tri/cube: Convert GPA usage/error-checking/reporting to a macro.

9 years agotri: Change to vkGetDeviceProcAddr() for WSI functions.
Ian Elliott [Mon, 22 Jun 2015 20:30:28 +0000 (14:30 -0600)]
tri: Change to vkGetDeviceProcAddr() for WSI functions.

9 years agovulkan.h: V103 -- Add VkPipelineLayout to vkCmdBindDescriptorSets, Bug# 14047
Mark Lobodzinski [Mon, 15 Jun 2015 19:21:21 +0000 (13:21 -0600)]
vulkan.h: V103 -- Add VkPipelineLayout to vkCmdBindDescriptorSets, Bug# 14047

9 years agolayers: Addition of source_line_info.py script to simplify codegen debugging
Tobin Ehlis [Fri, 12 Jun 2015 18:49:01 +0000 (12:49 -0600)]
layers: Addition of source_line_info.py script to simplify codegen debugging

vk-layer-generate.py and vk_helper.py now use added source_line_info.py script to insert comments throughout generated code indicating where the code was generated from.

9 years agoLayers: Correctly handle WSI_LUNARG extension.
David Pinedo [Fri, 19 Jun 2015 19:48:18 +0000 (13:48 -0600)]
Layers: Correctly handle WSI_LUNARG extension.

Other code cleanup.

9 years agoMemTracker: Advertise WSI_LUNARG extension in GetPhysDevExtInfo
Jon Ashburn [Fri, 19 Jun 2015 18:02:24 +0000 (12:02 -0600)]
MemTracker: Advertise WSI_LUNARG extension in GetPhysDevExtInfo

9 years agolayers: Erase proper key in draw state.
Jeremy Hayes [Fri, 19 Jun 2015 17:37:38 +0000 (11:37 -0600)]
layers: Erase proper key in draw state.

9 years agolayers: Fix iterator comparison.
Jeremy Hayes [Fri, 19 Jun 2015 16:57:11 +0000 (10:57 -0600)]
layers: Fix iterator comparison.

9 years agolayers: Move image validation to separate layer.
Jeremy Hayes [Thu, 18 Jun 2015 16:12:39 +0000 (10:12 -0600)]
layers: Move image validation to separate layer.

9 years agolayers: Comment for newbies.
Jeremy Hayes [Thu, 18 Jun 2015 16:25:55 +0000 (10:25 -0600)]
layers: Comment for newbies.

9 years agoMemTracker: make sure get_mem_binding_from_object uses dispatchable object
Jon Ashburn [Thu, 18 Jun 2015 23:12:57 +0000 (17:12 -0600)]
MemTracker: make sure get_mem_binding_from_object uses dispatchable object

9 years agolayers: Add DrawState check for Invalid PSO CreateInfo state
Tobin Ehlis [Thu, 18 Jun 2015 21:59:33 +0000 (15:59 -0600)]
layers: Add DrawState check for Invalid PSO CreateInfo state

Report any violations in PSO restrictions as DRAWSTATE_INVALID_PIPELINE_CREATE_STATE error and don't call into driver.
Also fix a couple of broken error calls that had NULL dispatchable object parameter.