From: Jacob Lifshay Date: Fri, 16 Jun 2017 22:24:27 +0000 (-0700) Subject: removed spirv.h; we generate spirv.h automatically X-Git-Tag: gsoc-2017~95 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4d519e03a1e3608d108d356275ec960425d12e6a;p=kazan.git removed spirv.h; we generate spirv.h automatically --- diff --git a/src/spirv/CMakeLists.txt b/src/spirv/CMakeLists.txt index 552aee9..5e0542f 100644 --- a/src/spirv/CMakeLists.txt +++ b/src/spirv/CMakeLists.txt @@ -20,29 +20,23 @@ # cmake_minimum_required(VERSION 3.1 FATAL_ERROR) -set(do_generate_spirv_parser YES) - set(sources spirv.cpp) -if(${do_generate_spirv_parser}) - set(spirv_parser_generated_include_dir ${CMAKE_CURRENT_BINARY_DIR}/generated) - set(spirv_parser_generated_dir ${spirv_parser_generated_include_dir}/spirv) - set(spirv_parser_sources ${spirv_parser_generated_dir}/parser.cpp) - set(spirv_parser_headers ${spirv_parser_generated_dir}/parser.h ${spirv_parser_generated_dir}/spirv.h) - set(spirv_core_grammar_json ${CMAKE_CURRENT_SOURCE_DIR}/../khronos-spirv/spirv.core.grammar.json) - message(STATUS "spirv_parser_generated_dir: " ${spirv_parser_generated_dir}) +set(spirv_parser_generated_include_dir ${CMAKE_CURRENT_BINARY_DIR}/generated) +set(spirv_parser_generated_dir ${spirv_parser_generated_include_dir}/spirv) +set(spirv_parser_sources ${spirv_parser_generated_dir}/parser.cpp) +set(spirv_parser_headers ${spirv_parser_generated_dir}/parser.h ${spirv_parser_generated_dir}/spirv.h) +set(spirv_core_grammar_json ${CMAKE_CURRENT_SOURCE_DIR}/../khronos-spirv/spirv.core.grammar.json) +message(STATUS "spirv_parser_generated_dir: " ${spirv_parser_generated_dir}) - add_custom_command(OUTPUT ${spirv_parser_sources} ${spirv_parser_headers} - COMMAND ${CMAKE_COMMAND} -E make_directory ${spirv_parser_generated_dir} - COMMAND ${CMAKE_COMMAND} -E chdir ${spirv_parser_generated_include_dir} $ ${spirv_core_grammar_json} spirv - MAIN_DEPENDENCY ${spirv_core_grammar_json} - DEPENDS $ - VERBATIM - COMMENT "Generating SPIR-V Parser") - set(sources ${sources} ${spirv_parser_sources}) -endif() +add_custom_command(OUTPUT ${spirv_parser_sources} ${spirv_parser_headers} + COMMAND ${CMAKE_COMMAND} -E make_directory ${spirv_parser_generated_dir} + COMMAND ${CMAKE_COMMAND} -E chdir ${spirv_parser_generated_include_dir} $ ${spirv_core_grammar_json} spirv + MAIN_DEPENDENCY ${spirv_core_grammar_json} + DEPENDS $ + VERBATIM + COMMENT "Generating SPIR-V Parser") +set(sources ${sources} ${spirv_parser_sources}) add_library(spirv STATIC ${sources}) target_link_libraries(spirv util) -if(${do_generate_spirv_parser}) - target_include_directories(spirv PUBLIC ${spirv_parser_generated_include_dir}) -endif() \ No newline at end of file +target_include_directories(spirv PUBLIC ${spirv_parser_generated_include_dir}) diff --git a/src/spirv/spirv.h b/src/spirv/spirv.h deleted file mode 100644 index e9cac89..0000000 --- a/src/spirv/spirv.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2017 Jacob Lifshay - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - */ - -#ifndef SPIRV_SPIRV_H_ -#define SPIRV_SPIRV_H_ - -#include - -namespace vulkan_cpu -{ -namespace spirv -{ -typedef std::uint32_t Word; -constexpr Word magic_number = 0x07230203UL; -} -} - -#endif /* SPIRV_SPIRV_H_ */