Home | History | Annotate | Download | only in vulkan
      1 #ifndef _VKVALIDATOROPTIONS_HPP
      2 #define _VKVALIDATOROPTIONS_HPP
      3 /*-------------------------------------------------------------------------
      4  * Vulkan CTS Framework
      5  * --------------------
      6  *
      7  * Copyright (c) 2018 Google LLC
      8  *
      9  * Licensed under the Apache License, Version 2.0 (the "License");
     10  * you may not use this file except in compliance with the License.
     11  * You may obtain a copy of the License at
     12  *
     13  *      http://www.apache.org/licenses/LICENSE-2.0
     14  *
     15  * Unless required by applicable law or agreed to in writing, software
     16  * distributed under the License is distributed on an "AS IS" BASIS,
     17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     18  * See the License for the specific language governing permissions and
     19  * limitations under the License.
     20  *
     21  *//*!
     22  * \file
     23  * \brief SPIR-V validator options
     24  *//*--------------------------------------------------------------------*/
     25 
     26 #include "vkDefs.hpp"
     27 
     28 namespace vk
     29 {
     30 
     31 struct SpirvValidatorOptions
     32 {
     33 	enum BlockLayoutRules
     34 	{
     35 		// The default for the target Vulkan environment.
     36 		kDefaultBlockLayout,
     37 		// Don't check block layout
     38 		kNoneBlockLayout,
     39 		// VK_KHR_relaxed_block_layout
     40 		kRelaxedBlockLayout,
     41 		// VK_EXT_scalar_block_layout
     42 		kScalarBlockLayout
     43 	};
     44 
     45 	SpirvValidatorOptions(deUint32 the_vulkan_version = VK_MAKE_VERSION(1, 0, 0), BlockLayoutRules the_layout = kDefaultBlockLayout)
     46 	: vulkanVersion(the_vulkan_version), blockLayout(the_layout) {}
     47 
     48 	// The target Vulkan version.  This determines the SPIR-V environment rules to
     49 	// be checked. The bit pattern is as produced by VK_MAKE_VERSION.
     50 	deUint32 vulkanVersion;
     51 
     52 	// The block layout rules to enforce.
     53 	BlockLayoutRules blockLayout;
     54 };
     55 
     56 }  // namespace vk
     57 
     58 #endif // _VKVALIDATOROPTIONS_HPP
     59