1e5c31af7Sopenharmony_ci#ifndef _VKVALIDATOROPTIONS_HPP 2e5c31af7Sopenharmony_ci#define _VKVALIDATOROPTIONS_HPP 3e5c31af7Sopenharmony_ci/*------------------------------------------------------------------------- 4e5c31af7Sopenharmony_ci * Vulkan CTS Framework 5e5c31af7Sopenharmony_ci * -------------------- 6e5c31af7Sopenharmony_ci * 7e5c31af7Sopenharmony_ci * Copyright (c) 2018 Google LLC 8e5c31af7Sopenharmony_ci * 9e5c31af7Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 10e5c31af7Sopenharmony_ci * you may not use this file except in compliance with the License. 11e5c31af7Sopenharmony_ci * You may obtain a copy of the License at 12e5c31af7Sopenharmony_ci * 13e5c31af7Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 14e5c31af7Sopenharmony_ci * 15e5c31af7Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 16e5c31af7Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 17e5c31af7Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18e5c31af7Sopenharmony_ci * See the License for the specific language governing permissions and 19e5c31af7Sopenharmony_ci * limitations under the License. 20e5c31af7Sopenharmony_ci * 21e5c31af7Sopenharmony_ci *//*! 22e5c31af7Sopenharmony_ci * \file 23e5c31af7Sopenharmony_ci * \brief SPIR-V validator options 24e5c31af7Sopenharmony_ci *//*--------------------------------------------------------------------*/ 25e5c31af7Sopenharmony_ci 26e5c31af7Sopenharmony_ci#include "vkDefs.hpp" 27e5c31af7Sopenharmony_ci 28e5c31af7Sopenharmony_cinamespace vk 29e5c31af7Sopenharmony_ci{ 30e5c31af7Sopenharmony_ci 31e5c31af7Sopenharmony_cistruct SpirvValidatorOptions 32e5c31af7Sopenharmony_ci{ 33e5c31af7Sopenharmony_ci enum BlockLayoutRules 34e5c31af7Sopenharmony_ci { 35e5c31af7Sopenharmony_ci // The default for the target Vulkan environment. 36e5c31af7Sopenharmony_ci kDefaultBlockLayout, 37e5c31af7Sopenharmony_ci // Don't check block layout 38e5c31af7Sopenharmony_ci kNoneBlockLayout, 39e5c31af7Sopenharmony_ci // VK_KHR_relaxed_block_layout 40e5c31af7Sopenharmony_ci kRelaxedBlockLayout, 41e5c31af7Sopenharmony_ci // VK_EXT_uniform_buffer_standard_layout 42e5c31af7Sopenharmony_ci kUniformStandardLayout, 43e5c31af7Sopenharmony_ci // VK_EXT_scalar_block_layout 44e5c31af7Sopenharmony_ci kScalarBlockLayout 45e5c31af7Sopenharmony_ci }; 46e5c31af7Sopenharmony_ci 47e5c31af7Sopenharmony_ci enum Flags 48e5c31af7Sopenharmony_ci { 49e5c31af7Sopenharmony_ci FLAG_SPIRV_VALIDATOR_WORKGROUP_SCALAR_BLOCK_LAYOUT = (1u<<0), 50e5c31af7Sopenharmony_ci FLAG_SPIRV_VALIDATOR_ALLOW_LOCALSIZEID = (1u<<1) 51e5c31af7Sopenharmony_ci }; 52e5c31af7Sopenharmony_ci 53e5c31af7Sopenharmony_ci SpirvValidatorOptions(deUint32 the_vulkan_version = VK_MAKE_API_VERSION(0, 1, 0, 0), BlockLayoutRules the_layout = kDefaultBlockLayout, bool allowSpirv14 = false, deUint32 the_flags = 0) 54e5c31af7Sopenharmony_ci : vulkanVersion(the_vulkan_version), blockLayout(the_layout), supports_VK_KHR_spirv_1_4(allowSpirv14), flags(the_flags) {} 55e5c31af7Sopenharmony_ci 56e5c31af7Sopenharmony_ci // The target Vulkan version. This determines the SPIR-V environment rules to 57e5c31af7Sopenharmony_ci // be checked. The bit pattern is as produced by VK_MAKE_API_VERSION. 58e5c31af7Sopenharmony_ci deUint32 vulkanVersion; 59e5c31af7Sopenharmony_ci 60e5c31af7Sopenharmony_ci // The block layout rules to enforce. 61e5c31af7Sopenharmony_ci BlockLayoutRules blockLayout; 62e5c31af7Sopenharmony_ci 63e5c31af7Sopenharmony_ci // Does the device support VK_KHR_spirv_1_4? 64e5c31af7Sopenharmony_ci // (Camelcase would just be wrong here.) 65e5c31af7Sopenharmony_ci bool supports_VK_KHR_spirv_1_4; 66e5c31af7Sopenharmony_ci 67e5c31af7Sopenharmony_ci deUint32 flags; 68e5c31af7Sopenharmony_ci}; 69e5c31af7Sopenharmony_ci 70e5c31af7Sopenharmony_ci} // namespace vk 71e5c31af7Sopenharmony_ci 72e5c31af7Sopenharmony_ci#endif // _VKVALIDATOROPTIONS_HPP 73