aboutsummaryrefslogtreecommitdiff
path: root/layers/shader_checker.cpp
AgeCommit message (Collapse)Author
2015-11-27layers/SC: Fix location counting for stages which take arrayed input.Chris Forbes
2015-11-26layers/SC: LX187: compute size of array and matrix typesChris Forbes
This fixes spurious warnings previously emitted by SC when using larger-than-vec4 types across the VI->VS interface.
2015-11-26layers/SC: consider types larger than vec4 when collecting interfacesChris Forbes
This is required for proper handling of array or matrix types on the VI->VS interface.
2015-11-26layers/SC: fix a bogus leftover comment in descriptor validationChris Forbes
2015-11-26layers: Use spirv.hpp from colocated glslang treeChris Forbes
2015-11-26layers/SC: Delete disabled FS broadcast checking codeChris Forbes
The support for collecting builtins on an interface is still kept however -- we're likely to want to validate other builtin usage against the pipeline config.
2015-11-23layers: port ShaderChecker layer to SPIR-V 1.0GregF
2015-11-11bug 12998 part 2: append _PACK* to packed formats that change conventionsChia-I Wu
s/VK_FORMAT_R11G11B10_UFLOAT\b/VK_FORMAT_B10G11R11_UFLOAT_PACK32/g s/VK_FORMAT_R9G9B9E5_UFLOAT\b/VK_FORMAT_E5B9G9R9_UFLOAT_PACK32/g s/VK_FORMAT_D24_UNORM_X8\b/VK_FORMAT_X8_D24_UNORM_PACK32/g s/VK_FORMAT_R10G10B10A2_UNORM\b/VK_FORMAT_A2B10G10R10_UNORM_PACK32/g s/VK_FORMAT_R10G10B10A2_SNORM\b/VK_FORMAT_A2B10G10R10_SNORM_PACK32/g s/VK_FORMAT_R10G10B10A2_USCALED\b/VK_FORMAT_A2B10G10R10_USCALED_PACK32/g s/VK_FORMAT_R10G10B10A2_SSCALED\b/VK_FORMAT_A2B10G10R10_SSCALED_PACK32/g s/VK_FORMAT_R10G10B10A2_UINT\b/VK_FORMAT_A2B10G10R10_UINT_PACK32/g s/VK_FORMAT_R10G10B10A2_SINT\b/VK_FORMAT_A2B10G10R10_SINT_PACK32/g s/VK_FORMAT_B10G10R10A2_UNORM\b/VK_FORMAT_A2R10G10B10_UNORM_PACK32/g s/VK_FORMAT_B10G10R10A2_SNORM\b/VK_FORMAT_A2R10G10B10_SNORM_PACK32/g s/VK_FORMAT_B10G10R10A2_USCALED\b/VK_FORMAT_A2R10G10B10_USCALED_PACK32/g s/VK_FORMAT_B10G10R10A2_SSCALED\b/VK_FORMAT_A2R10G10B10_SSCALED_PACK32/g s/VK_FORMAT_B10G10R10A2_UINT\b/VK_FORMAT_A2R10G10B10_UINT_PACK32/g s/VK_FORMAT_B10G10R10A2_SINT\b/VK_FORMAT_A2R10G10B10_SINT_PACK32/g s/STR(R11G11B10_UFLOAT\b/STR(B10G11R11_UFLOAT_PACK32/g s/STR(R9G9B9E5_UFLOAT\b/STR(E5B9G9R9_UFLOAT_PACK32/g s/STR(D24_UNORM_X8\b/STR(X8_D24_UNORM_PACK32/g s/STR(R10G10B10A2_UNORM\b/STR(A2B10G10R10_UNORM_PACK32/g s/STR(R10G10B10A2_SNORM\b/STR(A2B10G10R10_SNORM_PACK32/g s/STR(R10G10B10A2_USCALED\b/STR(A2B10G10R10_USCALED_PACK32/g s/STR(R10G10B10A2_SSCALED\b/STR(A2B10G10R10_SSCALED_PACK32/g s/STR(R10G10B10A2_UINT\b/STR(A2B10G10R10_UINT_PACK32/g s/STR(R10G10B10A2_SINT\b/STR(A2B10G10R10_SINT_PACK32/g s/STR(B10G10R10A2_UNORM\b/STR(A2R10G10B10_UNORM_PACK32/g s/STR(B10G10R10A2_SNORM\b/STR(A2R10G10B10_SNORM_PACK32/g s/STR(B10G10R10A2_USCALED\b/STR(A2R10G10B10_USCALED_PACK32/g s/STR(B10G10R10A2_SSCALED\b/STR(A2R10G10B10_SSCALED_PACK32/g s/STR(B10G10R10A2_UINT\b/STR(A2R10G10B10_UINT_PACK32/g s/STR(B10G10R10A2_SINT\b/STR(A2R10G10B10_SINT_PACK32/g
2015-11-06bug 15068: Use hardfp calling convention on Android for 32-bit ARM targetsChia-I Wu
Update python scripts. s/(VKAPI \*/(VKAPI_PTR */g s/void VKAPI\b/VKAPI_ATTR void VKAPI_CALL/g s/VkResult VKAPI\b/VKAPI_ATTR VkResult VKAPI_CALL/g s/PFN_vkVoidFunction VKAPI\b/VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL/g s/void\* VKAPI\b/VKAPI_ATTR void* VKAPI_CALL/g https://cvs.khronos.org/bugzilla/show_bug.cgi?id=15068
2015-11-06Moved header files from include to include/vulkanDavid Pinedo
2015-11-06layers: LX187: Change unused input WARN to PERF_WARNMark Lobodzinski
Shaderchecker will now throw PERF_WARN messages for unused vertex attributes or for unused inputs between shader stages.
2015-11-04misc: Update author informationCourtney Goeltzenleuchter
Author information was added to any file with the standard license text. Authors were added that added/changed >= 3% of the lines of a file.
2015-11-04misc: switch copyright to ValveCourtney Goeltzenleuchter
2015-11-04misc: Remove Vulkan name from CopyrightCourtney Goeltzenleuchter
2015-11-04Add skip call to the shader checker.Michael Lentine
2015-11-03misc: Cleanup Windows compiler warningsCourtney Goeltzenleuchter
2015-11-03bug 15022: Need a way to specify dummy descriptors for unused bindings (WIP)Chia-I Wu
Add binding to VkDescriptorSetLayoutBinding. https://cvs.khronos.org/bugzilla/show_bug.cgi?id=15022
2015-11-03bug 14608: VkShaderModule object lifetime (WIP)Chia-I Wu
Remove VkShader. We add a simple cache to intel_shader_module in place of intel_shader. https://cvs.khronos.org/bugzilla/show_bug.cgi?id=14608
2015-11-03bug 14887: Documenting Valid Behavior in the Spec (WIP)Chia-I Wu
MR544 introduced header changes accidentally and MR573 fixed some of them. Not sure if this pBindings-to-pBinding rename is intensional or not. s/pBindings/pBinding/g https://cvs.khronos.org/bugzilla/show_bug.cgi?id=14887
2015-11-03layers: Allow calling down chain with vkEnumerateDeviceExtensionPropertiesJon Ashburn
2015-11-02bug 14921 part 1: sed renamesChia-I Wu
Workaround header bug (ALLOC_INFO vs AllocateInfo) in vk_helper.py. This affects the debug extensions as well. s/NONDISP/NON_DISPATCHABLE/g s/CmdBuffer/CommandBuffer/g s/cmdBuffer/commandBuffer/g s/CMD_BUFFER/COMMAND_BUFFER/g s/AllocMemory/AllocateMemory/g s/AllocDescriptorSets/AllocateDescriptorSets/g s/AllocCommandBuffers/AllocateCommandBuffers/g s/VkAllocCallbacks/VkAllocationCallbacks/g s/VkSystemAllocScope/VkSystemAllocationScope/g s/allocScope/allocationScope/g s/allocType/allocationType/g s/pfnAlloc\b/pfnAllocation/g s/pfnRealloc\b/pfnReallocation/g s/VK_SYSTEM_ALLOC_/VK_SYSTEM_ALLOCATION_/g s/extName/extensionName/g s/implVersion/implementationVersion/g s/pAppInfo/pApplicationInfo/g s/pMem\b/pMemory/g s/VkMemoryAllocInfo/VkMemoryAllocateInfo/g s/VkDescriptorSetAllocInfo/VkDescriptorSetAllocateInfo/g s/CmdPool/CommandPool/g s/cmdPool/commandPool/g s/CMD_POOL/COMMAND_POOL/g s/VkCommandBufferAllocInfo/VkCommandBufferAllocateInfo/g s/maxTessellationGenLevel/maxTessellationGenerationLevel/g s/maxFragmentDualSourceAttachments/maxFragmentDualSrcAttachments/g s/destSubpass/dstSubpass/g s/destStageMask/dstStageMask/g s/dualSourceBlend/dualSrcBlend/g s/destBlendColor/dstBlendColor/g s/destBlendAlpha/dstBlendAlpha/g s/VK_FORMAT_NUM/VK_FORMAT_RANGE_SIZE/g s/VK_DYNAMIC_STATE_NUM/VK_DYNAMIC_STATE_RANGE_SIZE/g s/pAppName/pApplicationName/g s/appVersion/applicationVersion/g s/numLevels/levelCount/g s/numLayers/layerCount/g s/destOffset/dstOffset/g s/destSubresource/dstSubresource/g s/VK_IMAGE_LAYOUT_TRANSFER_SOURCE_OPTIMAL/VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL/g s/VK_IMAGE_LAYOUT_TRANSFER_DESTINATION_OPTIMAL/VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL/g s/VK_IMAGE_USAGE_TRANSFER_SOURCE_BIT/VK_IMAGE_USAGE_TRANSFER_SRC_BIT/g s/VK_IMAGE_USAGE_TRANSFER_DESTINATION_BIT/VK_IMAGE_USAGE_TRANSFER_DST_BIT/g s/destBuffer/dstBuffer/g s/destQueueFamilyIndex/dstQueueFamilyIndex/g s/destSet/dstSet/g s/destBinding/dstBinding/g s/destArrayElement/dstArrayElement/g s/VK_BLEND_DEST_COLOR/VK_BLEND_DST_COLOR/g s/VK_BLEND_ONE_MINUS_DEST_COLOR/VK_BLEND_ONE_MINUS_DST_COLOR/g s/VK_BLEND_DEST_ALPHA/VK_BLEND_DST_ALPHA/g s/VK_BLEND_ONE_MINUS_DEST_ALPHA/VK_BLEND_ONE_MINUS_DST_ALPHA/g s/VK_FORMAT_FEATURE_BLIT_SOURCE_BIT/VK_FORMAT_FEATURE_BLIT_SRC_BIT/g s/VK_FORMAT_FEATURE_BLIT_DESTINATION_BIT/VK_FORMAT_FEATURE_BLIT_DST_BIT/g s/VK_BUFFER_USAGE_TRANSFER_SOURCE_BIT/VK_BUFFER_USAGE_TRANSFER_SRC_BIT/g s/VK_BUFFER_USAGE_TRANSFER_DESTINATION_BIT/VK_BUFFER_USAGE_TRANSFER_DST_BIT/g s/VK_COMPARE_OP_LESS_EQUAL/VK_COMPARE_OP_LESS_OR_EQUAL/g s/VK_COMPARE_OP_GREATER_EQUAL/VK_COMPARE_OP_GREATER_OR_EQUAL/g s/VkPipelineRasterStateCreateInfo/VkPipelineRasterizationStateCreateInfo/g s/rasterSamples/rasterizationSamples/g s/pRasterState/pRasterizationState/g s/VK_FRONT_FACE_CCW/VK_FRONT_FACE_COUNTER_CLOCKWISE/g s/VK_FRONT_FACE_CW/VK_FRONT_FACE_CLOCKWISE/g s/VK_PRIMITIVE_TOPOLOGY_LINE_LIST_ADJ/VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY/g s/VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_ADJ/VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY/g s/VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_ADJ/VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY/g s/VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_ADJ/VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY/g s/VK_STENCIL_OP_INC_CLAMP/VK_STENCIL_OP_INCREMENT_AND_CLAMP/g s/VK_STENCIL_OP_DEC_CLAMP/VK_STENCIL_OP_DECREMENT_AND_CLAMP/g s/VK_STENCIL_OP_INC_WRAP/VK_STENCIL_OP_INCREMENT_AND_WRAP/g s/VK_STENCIL_OP_DEC_WRAP/VK_STENCIL_OP_DECREMENT_AND_WRAP/g s/VK_LOGIC_OP_NOOP/VK_LOGIC_OP_NO_OP/g s/VK_LOGIC_OP_EQUIV\b/VK_LOGIC_OP_EQUIVALENT/g s/memBarrierCount/memoryBarrierCount/g s/ppMemBarriers/ppMemoryBarriers/g s/destImage/dstImage/g s/destImageLayout/dstImageLayout/g s/destCache/dstCache/g s/memOffset/memoryOffset/g s/vk_print_vkmemoryallocinfo/vk_print_vkmemoryallocateinfo/g s/pAllocInfo/pAllocateInfo/g s/memRangeCount/memoryRangeCount/g s/pMemRanges/pMemoryRanges/g s/VK_IMAGE_TYPE_NUM/VK_IMAGE_TYPE_RANGE_SIZE/g s/VK_PIPELINE_BIND_POINT_NUM/VK_PIPELINE_BIND_POINT_RANGE_SIZE/g s/vk_size_vkdescriptorsetallocinfo/vk_size_vkdescriptorsetallocateinfo/g s/remap_cmdbuffers/remap_commandbuffers/g s/remap_cmdpool/remap_commandpool/g s/add_to_cmdbuffers_map/add_to_commandbuffers_map/g https://cvs.khronos.org/bugzilla/show_bug.cgi?id=14921 a
2015-11-02bug 12921: Memory callback (WIP)Chia-I Wu
The per-object allocator is ignored for now. https://cvs.khronos.org/bugzilla/show_bug.cgi?id=12921
2015-11-02bug 14892: 'count' parameters and members named inconsistently in many cases ↵Chia-I Wu
(WIP) s/waitSemCount/waitSemaphoreCount/g s/signalSemCount/signalSemaphoreCount/g s/cmdBufferCount/commandBufferCount/g s/queueFamilyCount/queueFamilyIndexCount/g s/layerCount/enabledLayerNameCount/g s/extensionCount/enabledExtensionNameCount/g https://cvs.khronos.org/bugzilla/show_bug.cgi?id=14892
2015-11-02layers: Migrate ShaderChecker dispatch tables and global data into ↵Tobin Ehlis
layer_data struct
2015-10-30bug 14362: VK_NULL_HANDLE does not work in C (WIP)Chia-I Wu
Drop type safety on 32-bit. https://cvs.khronos.org/bugzilla/show_bug.cgi?id=14362
2015-10-30bug 14864: Remove redundant VkPipelineShaderStageCreateInfo.stage field? (WIP)Chia-I Wu
Removed. https://cvs.khronos.org/bugzilla/show_bug.cgi?id=14864
2015-10-27misc: Remove dynamic array definititionsCourtney Goeltzenleuchter
Windows doesn't like dynamicly sized arrays. Replace with new'd array of objects or object pointers instead.
2015-10-23WIP bug-14815: VkShaderStageCourtney Goeltzenleuchter
2015-10-08layers: clean up includesCourtney Goeltzenleuchter
2015-10-08layers: Add DEBUG_OUTPUT support to shader_checkerCourtney Goeltzenleuchter
2015-10-07layers: Remove obsolete dbg message logging headerJon Ashburn
2015-09-28layers: Add constructors for layer_dataCody Northrop
2015-09-22layers: ShaderChecker can attempt calls on errorsMike Stroyan
Some errors are non-lethal. Make calls after finding errors. Allow attempts to read an unwritten output or to use a fragment shader that will not write all outputs. Just make the error callback and continue with that API call unless the boolean callback result is true, indicating the call should be prevented.
2015-09-22layers: fix ShaderChecker hang on stage mismatchMike Stroyan
validate_interface_between_stages was sometimes iterating past end of maps.
2015-09-20layers: Make passing a non-SPIRV shader to CreateShaderModule an errorChris Forbes
Various real drivers are not tolerant of the wrapped-GLSL-blob hack that was used early in Vulkan development. Rather than simply bypassing most of the validation when one of these blobs is seen, make it an error. Structurally, move the validation out of the shader_module ctor in preparation for the callback being able to signal whether to bail out. V2: Adjustment for descriptor validation landing Signed-off-by: Chris Forbes <chrisf@ijw.co.nz> Reviewed-by: Tobin Ehlis <tobin@lunarg.com>
2015-09-18layers: Require pipeline layout to contain all referenced descriptorsChris Forbes
If the SPIRV image uses a descriptor (for constant buffer, image, etc) we must declare it in the pipeline layout. We won't complain about unused junk in the pipeline layout, but not declaring something that *is* used is an error. Signed-off-by: Chris Forbes <chrisf@ijw.co.nz> Reviewed-by: Courtney Goeltzenleuchter <courtney@lunarg.com>
2015-09-18layers: Collect descriptor usage from SPIRV imagesChris Forbes
Signed-off-by: Chris Forbes <chrisf@ijw.co.nz> Reviewed-by: Courtney Goeltzenleuchter <courtney@lunarg.com>
2015-09-18layers: Shadow descriptor set layout in ShaderCheckerChris Forbes
Signed-off-by: Chris Forbes <chrisf@ijw.co.nz> Reviewed-by: Courtney Goeltzenleuchter <courtney@lunarg.com>
2015-09-17shader_checker: Do not hold lock across API call.Courtney Goeltzenleuchter
2015-09-17bug-14538: Remove validation error codesCourtney Goeltzenleuchter
https://cvs.khronos.org/bugzilla/show_bug.cgi?id=14538
2015-09-17bug 14509: Rename Layer and Extension queriesCourtney Goeltzenleuchter
https://cvs.khronos.org/bugzilla/show_bug.cgi?id=14509 https://gitlab.khronos.org/vulkan/vulkan/merge_requests/334
2015-09-16layers: Fix layer STDOUT loggingTobin Ehlis
2015-09-10vulkan.h: Change return types of some functions to voidMark Lobodzinski
Functions that should be thought of as "impossible to fail in the face of valid parameters" have had their return types changed to void. This includes all of the vkDestroy functions, vkFreeMemory, and vkUnmapMemory. vkUpdateDescriptorSets is also included, because of the frequency the function is expected to be called.
2015-09-03layers: If layers receive bad filename for output log, report ERROR and ↵Tobin Ehlis
fallback to stdout
2015-09-03layers: Update some layers to avoid repeated call to get_dispatch_key()Tobin Ehlis
2015-08-10layers: port ShaderChecker to SPIR-V v31 (from ChrisF)GregF
2015-08-04v143: Bug 14277 - Follow pointer naming convention in VkSubpassDescriptionCody Northrop
2015-07-27layers: Adjust SC to validate bulk pipeline creationChris Forbes
Previously we passed `count` down to the validator and then dropped it on the floor, ignoring anything other than pipeline 0. Signed-off-by: Chris Forbes <chrisf@ijw.co.nz> Reviewed-by: Courtney Goeltzenleuchter <courtney@lunarg.com>
2015-07-17Windows: more changes for windows compilerTony Barbour
2015-07-17Windows: more fixes for windows compileTony Barbour