aboutsummaryrefslogtreecommitdiff
path: root/layers/shader_checker.cpp
AgeCommit message (Collapse)Author
2015-06-18shaderChecker: Add GetPhysDevExtInfo and fix CreateInstanceJon Ashburn
2015-06-18layers: Use static dispatch table mapsCourtney Goeltzenleuchter
Changes to use dispatch table access functions.
2015-06-18layers: Make dispatch table thread safeJon Ashburn
2015-06-18layers: Initialize debug_report instance proc tableCourtney Goeltzenleuchter
2015-06-18shader_checker: Use DEBUG_REPORT helper functionsCourtney Goeltzenleuchter
Include and use DEBUG_REPORT layer helper functions for create, destroy and GetInstanceProcAddr.
2015-06-17loader: Support layers that don't have an extension entrypointJon Ashburn
Change all layers and loader interface to init dispatch tables on GPA("GetXXXProcAddr"). After that initialization rest of dispatch tables are inited via unwrapped object using the GPA in the dispatch table. This also allows App generated GPA calls that the loader can't resolve to function correctly.
2015-06-17extensions: begin changes for extension supportCourtney Goeltzenleuchter
This patch starts restructuring the various components (loader, driver, layers, etc.) to support global and device extensions. Require GetProcAddr to access the extension functions and related support.
2015-06-17layers: Add DestroyDevice and DestroyInstance hooking to deinitialize tablesJon Ashburn
Table maps need to get cleaned up at DestroyInstance and DestroyDevice
2015-06-17misc: Change vkGetProcAddr to vkGetDeviceProcAddrJon Ashburn
Also cleanup layer/loader GPA's to only return device level entrypoints.
2015-06-17shader_checker: Eliminate redefinition of macroJon Ashburn
2015-06-17misc: Loader and Layers move device chain activation to CreateDeviceJon Ashburn
2015-06-17layers: Add initialization of instance dispatch tableJon Ashburn
Make the layer init separate from either device or instance dispatch table init, since these are done at different times.
2015-06-17layers: Add GetInstanceProcAddr() to all layersJon Ashburn
Loader will use this for constructing instance layer instance chains. Layer instance dispatch table is not yet added.
2015-06-15shader_checker: Check for duplicate VI binding descriptions.Chris Forbes
Signed-off-by: Chris Forbes <chrisf@ijw.co.nz> Reviewed-by: Tobin Ehlis <tobin@lunarg.com>
2015-06-11layers: fix overrun when only one shader presentTony Barbour
2015-06-10shader_checker: fix invalid iterator dereference (LunarXchange #60)Chris Forbes
V2: Fix broken logic; fix another case of the same problem in interface between shader stages. Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
2015-06-06shader_checker: Support pipelines with more stages, and be tolerantChris Forbes
- Don't assume the pipeline is just VS->FS. - Be properly tolerant of non-SPIRV stages, to avoid breaking cases where the driver is being fed GLSL source instead. - Detect the non-SPIRV case more robustly (for whatever reason, we feed the driver GLSL with a *correct* SPIRV magic on it...) Signed-off-by: Chris Forbes <chrisf@ijw.co.nz> Reviewed-by: Tobin Ehlis <tobin@lunarg.com>
2015-06-06shader_checker: Add typechecker support for extra array levelChris Forbes
In the VS->GS, VS->TCS, or TES->GS interfaces, the consuming side of the interface is arrays of the producer's interface, as we're dealing with an array of vertices. This requires a bit more care in the typechecker: - Walking from the complete type down, the first time we see an array, it's the array-of-verts case; strip it off and compare the LHS to the element type. - If we see a leaf type without encountering the array type node, then we mismatch. For the purposes of this check, structs are treated as leaves. V2: Simplify slightly. Signed-off-by: Chris Forbes <chrisf@ijw.co.nz> Reviewed-by: Tobin Ehlis <tobin@lunarg.com>
2015-06-05shader_checker: Also validate vkCreateGraphicsPipelineDerivativeChris Forbes
Signed-off-by: Chris Forbes <chrisf@ijw.co.nz> Reviewed-by: Courtney Goeltzenleuchter <courtney@lunarg.com>
2015-06-05shader_checker: Extract pipeline validation into own functionChris Forbes
There's about to be a second caller. Signed-off-by: Chris Forbes <chrisf@ijw.co.nz> Reviewed-by: Courtney Goeltzenleuchter <courtney@lunarg.com>
2015-06-04shader_checker: remove stray debug output from typechecker implementationChris Forbes
2015-06-04shader_checker: validate VS inputs against VI even when no VIChris Forbes
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>
2015-06-04shader_checker: Only continue with pipeline config if no errorsChris Forbes
The driver may crash in these cases. Signed-off-by: Chris Forbes <chrisf@ijw.co.nz> Reviewed-by: Tobin Ehlis <tobin@lunarg.com>
2015-06-04shader_checker: current object & lockingChris Forbes
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.
2015-06-04shader_checker: Add support for delivering layer messages via callbackChris Forbes
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>
2015-06-04ShaderChecker: do not crash if Shader output count == 0 and PSO attachments ↵scygan
count > 0 (cherry picked from commit 80bb5d63774f2e11bc14d9c5291bb3273f0e79cf)
2015-05-12shader_checker: check types between FS output and CBChris Forbes
2015-05-12shader_checker: add type checking between VF and VSChris Forbes
2015-05-12shader_checker: add helper to walk a type tree and return the basic typeChris Forbes
2015-05-12shader_checker: fix fs output/cb attachment walking after assert fixesChris Forbes
2015-05-12layers: remove assumption that there's a glslang source tree alongsideChris Forbes
We have an in-tree spirv.h now, just use that.
2015-04-29toolchain: Update to newer glslang and LunarGLASS versionsCody Northrop
LUNARGLASS_REVISION=1070 GLSLANG_REVISION=30939
2015-04-29layers: Fix msvc++ iterator issuesDavid Pinedo
2015-04-29Shader Checker Layer: make sure iterated list is of non-zero lengthDavid Pinedo
On MSVC++, need a check to make sure a list is of non-zero length before attempting to iterate on it.
2015-04-22vkEnumerateLayers: Update to match upstreamCourtney Goeltzenleuchter
The upstream vulkan.h header removed maxLayerCount parameter from vkEnumerateLayers. This patch implements that change for the sample driver and layers.
2015-04-17Win: Eliminate compiler errors/warnings in "shader_checker.cpp"Ian Elliott
Key error was MS's compiler not liking a variable named "interface". I renamed it "sinterface", and the compiler was much happier.
2015-04-17layers: Add ShaderChecker as Validation layerTobin Ehlis
2015-04-16vulkan: Remove VkDescriptorSetLayoutChain from vkCmdBindDescriptorSetsChia-I Wu
This is part of r30446 on vulkan.h, discussed in bug 13632. Meaty chunks of this commit done by Olv, basic hook up and testing by Cody.
2015-04-17shader_checker: convert printf to debug outputChris Forbes
2015-04-17shader_checker: add plumbing for debugChris Forbes
2015-04-17shader_checker: first pass at typechecksChris Forbes
2015-04-17shader_checker: validate fs outputs against cbChris Forbes
2015-04-17shader_checker: validate vertex attribs against vs inputsChris Forbes
2015-04-17shader_checker: add validation of interface between vs and fsChris Forbes
2015-04-17shader_checker: collect pipeline stages in vkCreateGraphicsPipelineChris Forbes
2015-04-17shader_checker: add hook for xglCreateGraphicsPipelineChris Forbes
2015-04-17shader_checker: collect interface definitions from shadersChris Forbes
2015-04-17shader_checker: capture spir-v for every shader at vkCreateShader timeChris Forbes
2015-04-17shader_checker: initial plumbingChris Forbes