blob: 47806f44c080b4e125e153ba4d2cca6d42809d00 [file] [log] [blame]
Chris Forbes6b2ead62015-04-17 10:13:28 +12001/*
Chris Forbes6b2ead62015-04-17 10:13:28 +12002 *
Courtney Goeltzenleuchterfcbe16f2015-10-29 13:50:34 -06003 * Copyright (C) 2015 Valve Corporation
Chris Forbes6b2ead62015-04-17 10:13:28 +12004 *
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the "Software"),
7 * to deal in the Software without restriction, including without limitation
8 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 * and/or sell copies of the Software, and to permit persons to whom the
10 * Software is furnished to do so, subject to the following conditions:
11 *
12 * The above copyright notice and this permission notice shall be included
13 * in all copies or substantial portions of the Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21 * DEALINGS IN THE SOFTWARE.
Courtney Goeltzenleuchter05559522015-10-30 11:14:30 -060022 *
23 * Author: Chris Forbes <chrisf@ijw.co.nz>
Chris Forbes6b2ead62015-04-17 10:13:28 +120024 */
David Pinedo9316d3b2015-11-06 12:54:48 -070025#include "vulkan/vk_layer.h"
David Pinedoabd07722015-11-24 09:00:24 -070026#include "vulkan/vk_lunarg_debug_report.h"
Tobin Ehlis3c6f2e52015-10-29 11:11:53 -060027#include "vk_layer_logging.h"
Chris Forbes6b2ead62015-04-17 10:13:28 +120028
29/* Shader checker error codes */
30typedef enum _SHADER_CHECKER_ERROR
31{
32 SHADER_CHECKER_NONE,
33 SHADER_CHECKER_FS_MIXED_BROADCAST, /* FS writes broadcast output AND custom outputs */
34 SHADER_CHECKER_INTERFACE_TYPE_MISMATCH, /* Type mismatch between shader stages or shader and pipeline */
35 SHADER_CHECKER_OUTPUT_NOT_CONSUMED, /* Entry appears in output interface, but missing in input */
36 SHADER_CHECKER_INPUT_NOT_PRODUCED, /* Entry appears in input interface, but missing in output */
37 SHADER_CHECKER_NON_SPIRV_SHADER, /* Shader image is not SPIR-V */
38 SHADER_CHECKER_INCONSISTENT_SPIRV, /* General inconsistency within a SPIR-V module */
39 SHADER_CHECKER_UNKNOWN_STAGE, /* Stage is not supported by analysis */
Chris Forbes280ba2c2015-06-12 11:16:41 +120040 SHADER_CHECKER_INCONSISTENT_VI, /* VI state contains conflicting binding or attrib descriptions */
Chris Forbes556c76c2015-08-14 12:04:59 +120041 SHADER_CHECKER_MISSING_DESCRIPTOR, /* Shader attempts to use a descriptor binding not declared in the layout */
Chris Forbes6b2ead62015-04-17 10:13:28 +120042} SHADER_CHECKER_ERROR;