Lines Matching +full:opencl +full:- +full:spirv
1 # Copyright (c) 2015-2016 The Khronos Group Inc.
7 # http://www.apache.org/licenses/LICENSE-2.0
15 set(GRAMMAR_PROCESSING_SCRIPT "${spirv-tools_SOURCE_DIR}/utils/generate_grammar_tables.py")
16 set(VIMSYNTAX_PROCESSING_SCRIPT "${spirv-tools_SOURCE_DIR}/utils/generate_vim_syntax.py")
17 set(XML_REGISTRY_PROCESSING_SCRIPT "${spirv-tools_SOURCE_DIR}/utils/generate_registry_tables.py")
18 set(LANG_HEADER_PROCESSING_SCRIPT "${spirv-tools_SOURCE_DIR}/utils/generate_language_headers.py")
20 # Pull in grammar files that have migrated to SPIRV-Headers
21 set(DEBUGINFO_GRAMMAR_JSON_FILE "${SPIRV_HEADER_INCLUDE_DIR}/spirv/unified1/extinst.debuginfo.gramm…
22 set(CLDEBUGINFO100_GRAMMAR_JSON_FILE "${SPIRV_HEADER_INCLUDE_DIR}/spirv/unified1/extinst.opencl.deb…
23 set(VKDEBUGINFO100_GRAMMAR_JSON_FILE "${SPIRV_HEADER_INCLUDE_DIR}/spirv/unified1/extinst.nonsemanti…
30 …set(GRAMMAR_JSON_FILE "${SPIRV_HEADER_INCLUDE_DIR}/spirv/${CONFIG_VERSION}/spirv.core.grammar.json…
31 set(GRAMMAR_INSTS_INC_FILE "${spirv-tools_BINARY_DIR}/core.insts-${CONFIG_VERSION}.inc")
32 set(GRAMMAR_KINDS_INC_FILE "${spirv-tools_BINARY_DIR}/operand.kinds-${CONFIG_VERSION}.inc")
35 --spirv-core-grammar=${GRAMMAR_JSON_FILE}
36 --extinst-debuginfo-grammar=${DEBUGINFO_GRAMMAR_JSON_FILE}
37 --extinst-cldebuginfo100-grammar=${CLDEBUGINFO100_GRAMMAR_JSON_FILE}
38 --core-insts-output=${GRAMMAR_INSTS_INC_FILE}
39 --operand-kinds-output=${GRAMMAR_KINDS_INC_FILE}
44 COMMENT "Generate info tables for SPIR-V v${CONFIG_VERSION} core instructions and operands.")
50 …set(GRAMMAR_JSON_FILE "${SPIRV_HEADER_INCLUDE_DIR}/spirv/${CONFIG_VERSION}/spirv.core.grammar.json…
51 set(GRAMMAR_EXTENSION_ENUM_INC_FILE "${spirv-tools_BINARY_DIR}/extension_enum.inc")
52 set(GRAMMAR_ENUM_STRING_MAPPING_INC_FILE "${spirv-tools_BINARY_DIR}/enum_string_mapping.inc")
56 --spirv-core-grammar=${GRAMMAR_JSON_FILE}
57 --extinst-debuginfo-grammar=${DEBUGINFO_GRAMMAR_JSON_FILE}
58 --extinst-cldebuginfo100-grammar=${CLDEBUGINFO100_GRAMMAR_JSON_FILE}
59 --extension-enum-output=${GRAMMAR_EXTENSION_ENUM_INC_FILE}
60 --enum-string-mapping-output=${GRAMMAR_ENUM_STRING_MAPPING_INC_FILE}
65 COMMENT "Generate enum-string mapping for SPIR-V v${CONFIG_VERSION}.")
71 …set(GRAMMAR_JSON_FILE "${SPIRV_HEADER_INCLUDE_DIR}/spirv/${CONFIG_VERSION}/spirv.core.grammar.json…
72 …set(GLSL_GRAMMAR_JSON_FILE "${SPIRV_HEADER_INCLUDE_DIR}/spirv/${CONFIG_VERSION}/extinst.glsl.std.4…
73 …set(OPENCL_GRAMMAR_JSON_FILE "${SPIRV_HEADER_INCLUDE_DIR}/spirv/${CONFIG_VERSION}/extinst.opencl.s…
74 set(VIMSYNTAX_FILE "${spirv-tools_BINARY_DIR}/spvasm.vim")
77 --spirv-core-grammar=${GRAMMAR_JSON_FILE}
78 --extinst-debuginfo-grammar=${DEBUGINFO_GRAMMAR_JSON_FILE}
79 --extinst-glsl-grammar=${GLSL_GRAMMAR_JSON_FILE}
80 --extinst-opencl-grammar=${OPENCL_GRAMMAR_JSON_FILE}
84 COMMENT "Generate spvasm.vim: Vim syntax file for SPIR-V assembly.")
88 …set(CORE_GRAMMAR_JSON_FILE "${SPIRV_HEADER_INCLUDE_DIR}/spirv/${CONFIG_VERSION}/spirv.core.grammar…
89 …set(GLSL_GRAMMAR_JSON_FILE "${SPIRV_HEADER_INCLUDE_DIR}/spirv/${CONFIG_VERSION}/extinst.glsl.std.4…
90 set(GRAMMAR_INC_FILE "${spirv-tools_BINARY_DIR}/glsl.std.450.insts.inc")
93 --extinst-glsl-grammar=${GLSL_GRAMMAR_JSON_FILE}
94 --glsl-insts-output=${GRAMMAR_INC_FILE}
101 …set(CORE_GRAMMAR_JSON_FILE "${SPIRV_HEADER_INCLUDE_DIR}/spirv/${CONFIG_VERSION}/spirv.core.grammar…
102 …set(OPENCL_GRAMMAR_JSON_FILE "${SPIRV_HEADER_INCLUDE_DIR}/spirv/${CONFIG_VERSION}/extinst.opencl.s…
103 set(GRAMMAR_INC_FILE "${spirv-tools_BINARY_DIR}/opencl.std.insts.inc")
106 --extinst-opencl-grammar=${OPENCL_GRAMMAR_JSON_FILE}
107 --opencl-insts-output=${GRAMMAR_INC_FILE}
109 … COMMENT "Generate info tables for OpenCL extended instructions and operands v${CONFIG_VERSION}.")
114 set(INSTS_FILE "${spirv-tools_BINARY_DIR}/${VENDOR_TABLE}.insts.inc")
115 …set(GRAMMAR_FILE "${SPIRV_HEADER_INCLUDE_DIR}/spirv/unified1/extinst.${VENDOR_TABLE}.grammar.json")
117 set(GRAMMAR_FILE "${spirv-tools_SOURCE_DIR}/source/extinst.${VENDOR_TABLE}.grammar.json")
121 --extinst-vendor-grammar=${GRAMMAR_FILE}
122 --vendor-insts-output=${INSTS_FILE}
123 --vendor-operand-kind-prefix=${OPERAND_KIND_PREFIX}
126 add_custom_target(spv-tools-${SHORT_NAME} DEPENDS ${INSTS_FILE})
127 set_property(TARGET spv-tools-${SHORT_NAME} PROPERTY FOLDER "SPIRV-Tools build")
128 list(APPEND EXTINST_CPP_DEPENDS spv-tools-${SHORT_NAME})
132 set(OUT_H ${spirv-tools_BINARY_DIR}/${NAME}.h)
135 --extinst-grammar=${GRAMMAR_FILE}
136 --extinst-output-path=${OUT_H}
139 add_custom_target(spirv-tools-header-${NAME} DEPENDS ${OUT_H})
140 set_property(TARGET spirv-tools-header-${NAME} PROPERTY FOLDER "SPIRV-Tools build")
141 list(APPEND EXTINST_CPP_DEPENDS spirv-tools-header-${NAME})
148 spvtools_vendor_tables("spv-amd-shader-explicit-vertex-parameter" "spv-amd-sevp" "")
149 spvtools_vendor_tables("spv-amd-shader-trinary-minmax" "spv-amd-stm" "")
150 spvtools_vendor_tables("spv-amd-gcn-shader" "spv-amd-gs" "")
151 spvtools_vendor_tables("spv-amd-shader-ballot" "spv-amd-sb" "")
153 spvtools_vendor_tables("opencl.debuginfo.100" "cldi100" "CLDEBUG100_")
161 add_custom_target(spirv-tools-vimsyntax DEPENDS ${VIMSYNTAX_FILE})
162 set_property(TARGET spirv-tools-vimsyntax PROPERTY FOLDER "SPIRV-Tools utilities")
164 # Extract the list of known generators from the SPIR-V XML registry file.
165 set(GENERATOR_INC_FILE ${spirv-tools_BINARY_DIR}/generators.inc)
166 set(SPIRV_XML_REGISTRY_FILE ${SPIRV_HEADER_INCLUDE_DIR}/spirv/spir-v.xml)
169 --xml=${SPIRV_XML_REGISTRY_FILE}
170 --generator-output=${GENERATOR_INC_FILE}
172 COMMENT "Generate tables based on the SPIR-V XML registry.")
192 ${spirv-tools_BINARY_DIR}/build-version.inc)
194 ${spirv-tools_SOURCE_DIR}/utils/update_build_version.py)
196 ${spirv-tools_SOURCE_DIR}/CHANGES)
203 COMMENT "Update build-version.inc in the SPIRV-Tools build directory (if necessary).")
204 # Convenience target for standalone generation of the build-version.inc file.
206 add_custom_target(spirv-tools-build-version
208 set_property(TARGET spirv-tools-build-version PROPERTY FOLDER "SPIRV-Tools build")
223 ${spirv-tools_SOURCE_DIR}/include/spirv-tools/libspirv.h
344 # The software_version.cpp file includes build-version.inc.
346 # build-version.inc or whenever build-version.inc itself is out of
347 # date. In the latter case, rebuild build-version.inc first.
352 # missing source file build-version.inc. That occurs before the
367 $<BUILD_INTERFACE:${spirv-tools_SOURCE_DIR}/include>
369 PRIVATE ${spirv-tools_BINARY_DIR}
372 set_property(TARGET ${target} PROPERTY FOLDER "SPIRV-Tools libraries")
374 …add_dependencies(${target} spirv-tools-build-version core_tables enum_string_mapping extinst_table…
377 # Always build ${SPIRV_TOOLS}-shared. This is expected distro packages, and
379 add_library(${SPIRV_TOOLS}-shared SHARED ${SPIRV_SOURCES})
380 spirv_tools_default_target_options(${SPIRV_TOOLS}-shared)
381 set_target_properties(${SPIRV_TOOLS}-shared PROPERTIES CXX_VISIBILITY_PRESET hidden)
382 target_compile_definitions(${SPIRV_TOOLS}-shared
388 add_library(${SPIRV_TOOLS}-static STATIC ${SPIRV_SOURCES})
389 spirv_tools_default_target_options(${SPIRV_TOOLS}-static)
390 # The static target does not have the '-static' suffix.
391 set_target_properties(${SPIRV_TOOLS}-static PROPERTIES OUTPUT_NAME "${SPIRV_TOOLS}")
393 # Create the "${SPIRV_TOOLS}" target as an alias to either "${SPIRV_TOOLS}-static"
394 # or "${SPIRV_TOOLS}-shared" depending on the value of BUILD_SHARED_LIBS.
396 add_library(${SPIRV_TOOLS} ALIAS ${SPIRV_TOOLS}-shared)
398 add_library(${SPIRV_TOOLS} ALIAS ${SPIRV_TOOLS}-static)
401 set(SPIRV_TOOLS_TARGETS ${SPIRV_TOOLS}-static ${SPIRV_TOOLS}-shared)
405 set(SPIRV_TOOLS_TARGETS ${SPIRV_TOOLS} ${SPIRV_TOOLS}-shared)