2021-03-15 08:43:11 +00:00
|
|
|
# Copyright 2021 The Tint Authors
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
|
|
|
|
import("//build_overrides/build.gni")
|
2022-02-21 15:19:07 +00:00
|
|
|
import("../../tint_overrides_with_defaults.gni")
|
2021-03-15 08:43:11 +00:00
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
# Common - Configs, etc. shared across targets
|
|
|
|
###############################################################################
|
|
|
|
|
|
|
|
config("tint_common_config") {
|
|
|
|
include_dirs = [
|
|
|
|
"${target_gen_dir}",
|
|
|
|
"${tint_root_dir}/",
|
|
|
|
"${tint_spirv_headers_dir}/include",
|
|
|
|
"${tint_spirv_tools_dir}/",
|
|
|
|
"${tint_spirv_tools_dir}/include",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
config("tint_public_config") {
|
|
|
|
defines = []
|
|
|
|
if (tint_build_spv_reader) {
|
|
|
|
defines += [ "TINT_BUILD_SPV_READER=1" ]
|
|
|
|
} else {
|
|
|
|
defines += [ "TINT_BUILD_SPV_READER=0" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
if (tint_build_spv_writer) {
|
|
|
|
defines += [ "TINT_BUILD_SPV_WRITER=1" ]
|
|
|
|
} else {
|
|
|
|
defines += [ "TINT_BUILD_SPV_WRITER=0" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
if (tint_build_wgsl_reader) {
|
|
|
|
defines += [ "TINT_BUILD_WGSL_READER=1" ]
|
|
|
|
} else {
|
|
|
|
defines += [ "TINT_BUILD_WGSL_READER=0" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
if (tint_build_wgsl_writer) {
|
|
|
|
defines += [ "TINT_BUILD_WGSL_WRITER=1" ]
|
|
|
|
} else {
|
|
|
|
defines += [ "TINT_BUILD_WGSL_WRITER=0" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
if (tint_build_msl_writer) {
|
|
|
|
defines += [ "TINT_BUILD_MSL_WRITER=1" ]
|
|
|
|
} else {
|
|
|
|
defines += [ "TINT_BUILD_MSL_WRITER=0" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
if (tint_build_hlsl_writer) {
|
|
|
|
defines += [ "TINT_BUILD_HLSL_WRITER=1" ]
|
|
|
|
} else {
|
|
|
|
defines += [ "TINT_BUILD_HLSL_WRITER=0" ]
|
|
|
|
}
|
|
|
|
|
Implement GLSL writer backend.
This is a modified version of the HLSL writer.
Basic types, arrays, entry points, reserved keywords, uniforms,
builtin uniforms, structs, some builtin functions, zero initialization
are implemented. Textures, SSBOs and storage textures in particular are
unimplemented. All the unit tests "pass", but the output is not correct
in many cases.
triangle.wgsl outputs correct vertex and fragment shaders that pass
GLSL validation via glslang. compute_boids.wgsl outputs a valid but not
correct compute shader.
Change-Id: I96c7aaf60cf2d4237e45d732e5f51b345aea0552
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/57780
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-10-06 18:55:10 +00:00
|
|
|
if (tint_build_glsl_writer) {
|
|
|
|
defines += [ "TINT_BUILD_GLSL_WRITER=1" ]
|
|
|
|
} else {
|
|
|
|
defines += [ "TINT_BUILD_GLSL_WRITER=0" ]
|
|
|
|
}
|
|
|
|
|
2021-03-15 08:43:11 +00:00
|
|
|
include_dirs = [
|
|
|
|
"${tint_root_dir}/",
|
|
|
|
"${tint_root_dir}/include/",
|
|
|
|
"${tint_spirv_headers_dir}/include",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
config("tint_config") {
|
|
|
|
include_dirs = []
|
|
|
|
if (tint_build_spv_reader || tint_build_spv_writer) {
|
|
|
|
include_dirs += [ "${tint_spirv_tools_dir}/include/" ]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-06-02 21:02:34 +00:00
|
|
|
###############################################################################
|
|
|
|
# Helper library for IO operations
|
|
|
|
# Only to be used by tests and sample executable
|
|
|
|
###############################################################################
|
|
|
|
source_set("tint_utils_io") {
|
|
|
|
sources = [
|
|
|
|
"utils/io/command.h",
|
|
|
|
"utils/io/tmpfile.h",
|
|
|
|
]
|
|
|
|
|
|
|
|
if (is_linux || is_mac) {
|
|
|
|
sources += [ "utils/io/command_posix.cc" ]
|
|
|
|
sources += [ "utils/io/tmpfile_posix.cc" ]
|
|
|
|
} else if (is_win) {
|
|
|
|
sources += [ "utils/io/command_windows.cc" ]
|
|
|
|
sources += [ "utils/io/tmpfile_windows.cc" ]
|
|
|
|
} else {
|
|
|
|
sources += [ "utils/io/command_other.cc" ]
|
|
|
|
sources += [ "utils/io/tmpfile_other.cc" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
public_deps = [ ":libtint_core_all_src" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
# Helper library for validating generated shaders
|
|
|
|
# As this depends on tint_utils_io, this is only to be used by tests and sample
|
|
|
|
# executable
|
|
|
|
###############################################################################
|
|
|
|
source_set("tint_val") {
|
|
|
|
sources = [
|
2021-06-08 19:38:27 +00:00
|
|
|
"val/hlsl.cc",
|
|
|
|
"val/msl.cc",
|
2021-06-02 21:02:34 +00:00
|
|
|
"val/val.h",
|
|
|
|
]
|
|
|
|
public_deps = [ ":tint_utils_io" ]
|
|
|
|
}
|
|
|
|
|
2021-03-15 08:43:11 +00:00
|
|
|
###############################################################################
|
|
|
|
# Library - Tint core and optional modules of libtint
|
|
|
|
###############################################################################
|
|
|
|
# libtint source sets are divided into a non-optional core in :libtint_core_src
|
|
|
|
# and optional :libtint_*_src subsets, because ninja does not like having
|
|
|
|
# multiple source files with the same name, like function.cc, in the same
|
|
|
|
# source set
|
|
|
|
# target.
|
|
|
|
#
|
|
|
|
# Targets that want to use tint as a library should depend on ":libtint" and
|
|
|
|
# use the build flags to control what is included, instead of trying to specify
|
|
|
|
# the subsets that they want.
|
|
|
|
|
2021-04-19 15:20:03 +00:00
|
|
|
template("libtint_source_set") {
|
|
|
|
source_set(target_name) {
|
|
|
|
forward_variables_from(invoker, "*", [ "configs" ])
|
|
|
|
|
|
|
|
if (!defined(invoker.deps)) {
|
|
|
|
deps = []
|
|
|
|
}
|
|
|
|
deps += [
|
|
|
|
"${tint_spirv_headers_dir}:spv_headers",
|
2021-07-20 12:34:00 +00:00
|
|
|
"${tint_spirv_tools_dir}:spvtools_core_enums_unified1",
|
|
|
|
"${tint_spirv_tools_dir}:spvtools_core_tables_unified1",
|
2021-09-13 17:11:58 +00:00
|
|
|
"${tint_spirv_tools_dir}:spvtools_headers",
|
2021-07-20 12:34:00 +00:00
|
|
|
"${tint_spirv_tools_dir}:spvtools_language_header_cldebuginfo100",
|
|
|
|
"${tint_spirv_tools_dir}:spvtools_language_header_debuginfo",
|
2021-09-13 17:11:58 +00:00
|
|
|
"${tint_spirv_tools_dir}:spvtools_language_header_vkdebuginfo100",
|
2021-04-19 15:20:03 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
if (defined(invoker.configs)) {
|
|
|
|
configs += invoker.configs
|
|
|
|
}
|
|
|
|
configs += [ ":tint_common_config" ]
|
|
|
|
if (build_with_chromium) {
|
|
|
|
configs -= [ "//build/config/compiler:chromium_code" ]
|
|
|
|
configs += [ "//build/config/compiler:no_chromium_code" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!defined(invoker.public_configs)) {
|
|
|
|
public_configs = []
|
|
|
|
}
|
|
|
|
public_configs += [ ":tint_public_config" ]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
libtint_source_set("libtint_core_all_src") {
|
2021-03-15 08:43:11 +00:00
|
|
|
sources = [
|
2021-06-04 20:41:47 +00:00
|
|
|
"ast/access.cc",
|
|
|
|
"ast/access.h",
|
2021-04-20 15:04:21 +00:00
|
|
|
"ast/alias.cc",
|
|
|
|
"ast/alias.h",
|
|
|
|
"ast/array.cc",
|
|
|
|
"ast/array.h",
|
2021-03-15 08:43:11 +00:00
|
|
|
"ast/assignment_statement.cc",
|
|
|
|
"ast/assignment_statement.h",
|
2021-04-21 09:18:52 +00:00
|
|
|
"ast/ast_type.cc", # TODO(bclayton) - rename to type.cc
|
2021-06-17 15:48:39 +00:00
|
|
|
"ast/atomic.cc",
|
|
|
|
"ast/atomic.h",
|
2022-02-04 22:25:45 +00:00
|
|
|
"ast/attribute.cc",
|
|
|
|
"ast/attribute.h",
|
2021-03-15 08:43:11 +00:00
|
|
|
"ast/binary_expression.cc",
|
|
|
|
"ast/binary_expression.h",
|
2022-02-02 23:07:11 +00:00
|
|
|
"ast/binding_attribute.cc",
|
|
|
|
"ast/binding_attribute.h",
|
2021-03-15 08:43:11 +00:00
|
|
|
"ast/bitcast_expression.cc",
|
|
|
|
"ast/bitcast_expression.h",
|
|
|
|
"ast/block_statement.cc",
|
|
|
|
"ast/block_statement.h",
|
2021-04-20 15:04:21 +00:00
|
|
|
"ast/bool.cc",
|
|
|
|
"ast/bool.h",
|
2021-11-09 09:35:00 +00:00
|
|
|
"ast/bool_literal_expression.cc",
|
|
|
|
"ast/bool_literal_expression.h",
|
2021-03-15 08:43:11 +00:00
|
|
|
"ast/break_statement.cc",
|
|
|
|
"ast/break_statement.h",
|
2021-04-20 15:04:21 +00:00
|
|
|
"ast/builtin.cc",
|
|
|
|
"ast/builtin.h",
|
2022-02-02 23:07:11 +00:00
|
|
|
"ast/builtin_attribute.cc",
|
|
|
|
"ast/builtin_attribute.h",
|
2021-03-15 08:43:11 +00:00
|
|
|
"ast/call_expression.cc",
|
|
|
|
"ast/call_expression.h",
|
|
|
|
"ast/call_statement.cc",
|
|
|
|
"ast/call_statement.h",
|
|
|
|
"ast/case_statement.cc",
|
|
|
|
"ast/case_statement.h",
|
2022-03-31 22:30:10 +00:00
|
|
|
"ast/compound_assignment_statement.cc",
|
|
|
|
"ast/compound_assignment_statement.h",
|
2021-03-15 08:43:11 +00:00
|
|
|
"ast/continue_statement.cc",
|
|
|
|
"ast/continue_statement.h",
|
2021-07-26 22:19:48 +00:00
|
|
|
"ast/depth_multisampled_texture.cc",
|
|
|
|
"ast/depth_multisampled_texture.h",
|
2021-04-20 15:04:21 +00:00
|
|
|
"ast/depth_texture.cc",
|
|
|
|
"ast/depth_texture.h",
|
2022-02-02 23:07:11 +00:00
|
|
|
"ast/disable_validation_attribute.cc",
|
|
|
|
"ast/disable_validation_attribute.h",
|
2021-03-15 08:43:11 +00:00
|
|
|
"ast/discard_statement.cc",
|
|
|
|
"ast/discard_statement.h",
|
|
|
|
"ast/else_statement.cc",
|
|
|
|
"ast/else_statement.h",
|
|
|
|
"ast/expression.cc",
|
|
|
|
"ast/expression.h",
|
2021-04-26 14:55:25 +00:00
|
|
|
"ast/external_texture.cc",
|
|
|
|
"ast/external_texture.h",
|
2021-04-20 15:04:21 +00:00
|
|
|
"ast/f32.cc",
|
|
|
|
"ast/f32.h",
|
2021-03-15 08:43:11 +00:00
|
|
|
"ast/fallthrough_statement.cc",
|
|
|
|
"ast/fallthrough_statement.h",
|
2021-11-09 09:35:00 +00:00
|
|
|
"ast/float_literal_expression.cc",
|
|
|
|
"ast/float_literal_expression.h",
|
2021-07-02 19:27:42 +00:00
|
|
|
"ast/for_loop_statement.cc",
|
|
|
|
"ast/for_loop_statement.h",
|
2021-03-15 08:43:11 +00:00
|
|
|
"ast/function.cc",
|
|
|
|
"ast/function.h",
|
2022-02-02 23:07:11 +00:00
|
|
|
"ast/group_attribute.cc",
|
|
|
|
"ast/group_attribute.h",
|
2021-04-20 15:04:21 +00:00
|
|
|
"ast/i32.cc",
|
|
|
|
"ast/i32.h",
|
2022-02-15 16:36:57 +00:00
|
|
|
"ast/id_attribute.cc",
|
|
|
|
"ast/id_attribute.h",
|
2021-03-15 08:43:11 +00:00
|
|
|
"ast/identifier_expression.cc",
|
|
|
|
"ast/identifier_expression.h",
|
|
|
|
"ast/if_statement.cc",
|
|
|
|
"ast/if_statement.h",
|
2022-04-07 13:42:45 +00:00
|
|
|
"ast/increment_decrement_statement.cc",
|
|
|
|
"ast/increment_decrement_statement.h",
|
2021-11-09 09:35:00 +00:00
|
|
|
"ast/index_accessor_expression.cc",
|
|
|
|
"ast/index_accessor_expression.h",
|
2021-11-09 09:35:00 +00:00
|
|
|
"ast/int_literal_expression.cc",
|
|
|
|
"ast/int_literal_expression.h",
|
2022-02-02 23:07:11 +00:00
|
|
|
"ast/internal_attribute.cc",
|
|
|
|
"ast/internal_attribute.h",
|
|
|
|
"ast/interpolate_attribute.cc",
|
|
|
|
"ast/interpolate_attribute.h",
|
|
|
|
"ast/invariant_attribute.cc",
|
|
|
|
"ast/invariant_attribute.h",
|
2021-11-09 09:35:00 +00:00
|
|
|
"ast/literal_expression.cc",
|
|
|
|
"ast/literal_expression.h",
|
2022-02-02 23:07:11 +00:00
|
|
|
"ast/location_attribute.cc",
|
|
|
|
"ast/location_attribute.h",
|
2021-03-15 08:43:11 +00:00
|
|
|
"ast/loop_statement.cc",
|
|
|
|
"ast/loop_statement.h",
|
2021-04-20 15:04:21 +00:00
|
|
|
"ast/matrix.cc",
|
|
|
|
"ast/matrix.h",
|
2021-03-15 08:43:11 +00:00
|
|
|
"ast/member_accessor_expression.cc",
|
|
|
|
"ast/member_accessor_expression.h",
|
|
|
|
"ast/module.cc",
|
|
|
|
"ast/module.h",
|
2021-04-20 15:04:21 +00:00
|
|
|
"ast/multisampled_texture.cc",
|
|
|
|
"ast/multisampled_texture.h",
|
2021-03-15 08:43:11 +00:00
|
|
|
"ast/node.cc",
|
|
|
|
"ast/node.h",
|
2021-10-21 18:33:14 +00:00
|
|
|
"ast/phony_expression.cc",
|
|
|
|
"ast/phony_expression.h",
|
2021-03-15 08:43:11 +00:00
|
|
|
"ast/pipeline_stage.cc",
|
|
|
|
"ast/pipeline_stage.h",
|
2021-04-20 15:04:21 +00:00
|
|
|
"ast/pointer.cc",
|
|
|
|
"ast/pointer.h",
|
2021-03-15 08:43:11 +00:00
|
|
|
"ast/return_statement.cc",
|
|
|
|
"ast/return_statement.h",
|
2021-04-20 15:04:21 +00:00
|
|
|
"ast/sampled_texture.cc",
|
|
|
|
"ast/sampled_texture.h",
|
|
|
|
"ast/sampler.cc",
|
|
|
|
"ast/sampler.h",
|
2021-11-09 09:35:00 +00:00
|
|
|
"ast/sint_literal_expression.cc",
|
|
|
|
"ast/sint_literal_expression.h",
|
2022-02-02 23:07:11 +00:00
|
|
|
"ast/stage_attribute.cc",
|
|
|
|
"ast/stage_attribute.h",
|
2021-03-15 08:43:11 +00:00
|
|
|
"ast/statement.cc",
|
|
|
|
"ast/statement.h",
|
|
|
|
"ast/storage_class.cc",
|
|
|
|
"ast/storage_class.h",
|
2021-04-20 15:04:21 +00:00
|
|
|
"ast/storage_texture.cc",
|
|
|
|
"ast/storage_texture.h",
|
2022-02-02 23:07:11 +00:00
|
|
|
"ast/stride_attribute.cc",
|
|
|
|
"ast/stride_attribute.h",
|
2021-04-21 09:18:52 +00:00
|
|
|
"ast/struct.cc",
|
|
|
|
"ast/struct.h",
|
|
|
|
"ast/struct_member.cc",
|
|
|
|
"ast/struct_member.h",
|
2022-02-02 23:07:11 +00:00
|
|
|
"ast/struct_member_align_attribute.cc",
|
|
|
|
"ast/struct_member_align_attribute.h",
|
|
|
|
"ast/struct_member_offset_attribute.cc",
|
|
|
|
"ast/struct_member_offset_attribute.h",
|
|
|
|
"ast/struct_member_size_attribute.cc",
|
|
|
|
"ast/struct_member_size_attribute.h",
|
2021-03-15 08:43:11 +00:00
|
|
|
"ast/switch_statement.cc",
|
|
|
|
"ast/switch_statement.h",
|
2021-04-20 15:04:21 +00:00
|
|
|
"ast/texture.cc",
|
|
|
|
"ast/texture.h",
|
2021-10-21 20:38:54 +00:00
|
|
|
"ast/traverse_expressions.h",
|
2021-10-25 19:20:31 +00:00
|
|
|
"ast/type.h",
|
2021-06-09 14:32:14 +00:00
|
|
|
"ast/type_decl.cc",
|
|
|
|
"ast/type_decl.h",
|
2021-04-23 15:41:34 +00:00
|
|
|
"ast/type_name.cc",
|
|
|
|
"ast/type_name.h",
|
2021-04-20 15:04:21 +00:00
|
|
|
"ast/u32.cc",
|
|
|
|
"ast/u32.h",
|
2021-11-09 09:35:00 +00:00
|
|
|
"ast/uint_literal_expression.cc",
|
|
|
|
"ast/uint_literal_expression.h",
|
2021-04-20 15:04:21 +00:00
|
|
|
"ast/unary_op.cc",
|
|
|
|
"ast/unary_op.h",
|
2021-04-21 09:18:52 +00:00
|
|
|
"ast/unary_op_expression.cc",
|
|
|
|
"ast/unary_op_expression.h",
|
2021-04-20 15:04:21 +00:00
|
|
|
"ast/variable.cc",
|
|
|
|
"ast/variable.h",
|
2021-04-21 09:18:52 +00:00
|
|
|
"ast/variable_decl_statement.cc",
|
|
|
|
"ast/variable_decl_statement.h",
|
2021-04-20 15:04:21 +00:00
|
|
|
"ast/vector.cc",
|
|
|
|
"ast/vector.h",
|
|
|
|
"ast/void.cc",
|
|
|
|
"ast/void.h",
|
2022-02-02 23:07:11 +00:00
|
|
|
"ast/workgroup_attribute.cc",
|
|
|
|
"ast/workgroup_attribute.h",
|
2022-02-02 23:07:11 +00:00
|
|
|
"builtin_table.cc",
|
|
|
|
"builtin_table.h",
|
|
|
|
"builtin_table.inl",
|
2021-03-15 08:43:11 +00:00
|
|
|
"castable.cc",
|
|
|
|
"castable.h",
|
|
|
|
"clone_context.cc",
|
|
|
|
"clone_context.h",
|
|
|
|
"debug.cc",
|
|
|
|
"debug.h",
|
|
|
|
"demangler.cc",
|
|
|
|
"demangler.h",
|
|
|
|
"diagnostic/diagnostic.cc",
|
|
|
|
"diagnostic/diagnostic.h",
|
|
|
|
"diagnostic/formatter.cc",
|
|
|
|
"diagnostic/formatter.h",
|
|
|
|
"diagnostic/printer.cc",
|
|
|
|
"diagnostic/printer.h",
|
|
|
|
"inspector/entry_point.cc",
|
|
|
|
"inspector/entry_point.h",
|
|
|
|
"inspector/inspector.cc",
|
|
|
|
"inspector/inspector.h",
|
2021-06-17 23:29:03 +00:00
|
|
|
"inspector/resource_binding.cc",
|
|
|
|
"inspector/resource_binding.h",
|
2021-03-15 08:43:11 +00:00
|
|
|
"inspector/scalar.cc",
|
|
|
|
"inspector/scalar.h",
|
2021-04-21 09:18:52 +00:00
|
|
|
"program.cc",
|
|
|
|
"program.h",
|
2021-03-15 08:43:11 +00:00
|
|
|
"program_builder.cc",
|
|
|
|
"program_builder.h",
|
2021-04-16 19:07:51 +00:00
|
|
|
"program_id.cc",
|
|
|
|
"program_id.h",
|
2021-03-15 08:43:11 +00:00
|
|
|
"reader/reader.cc",
|
|
|
|
"reader/reader.h",
|
2021-11-22 11:44:57 +00:00
|
|
|
"resolver/dependency_graph.cc",
|
|
|
|
"resolver/dependency_graph.h",
|
2021-03-15 08:43:11 +00:00
|
|
|
"resolver/resolver.cc",
|
|
|
|
"resolver/resolver.h",
|
2021-09-13 17:11:58 +00:00
|
|
|
"resolver/resolver_constants.cc",
|
2021-11-18 17:11:56 +00:00
|
|
|
"resolver/resolver_validation.cc",
|
2021-03-15 08:43:11 +00:00
|
|
|
"scope_stack.h",
|
2021-04-21 09:18:52 +00:00
|
|
|
"sem/array.h",
|
2021-06-17 15:48:39 +00:00
|
|
|
"sem/atomic_type.h",
|
2021-11-30 13:25:12 +00:00
|
|
|
"sem/behavior.h",
|
2021-05-10 19:16:46 +00:00
|
|
|
"sem/binding_point.h",
|
2021-04-19 22:54:43 +00:00
|
|
|
"sem/bool_type.h",
|
2022-02-02 23:07:11 +00:00
|
|
|
"sem/builtin.h",
|
|
|
|
"sem/builtin_type.h",
|
2021-04-21 09:18:52 +00:00
|
|
|
"sem/call.h",
|
|
|
|
"sem/call_target.h",
|
2021-07-13 12:18:13 +00:00
|
|
|
"sem/constant.h",
|
2021-07-26 22:19:48 +00:00
|
|
|
"sem/depth_multisampled_texture_type.h",
|
2021-04-19 22:54:43 +00:00
|
|
|
"sem/depth_texture_type.h",
|
2021-04-21 09:18:52 +00:00
|
|
|
"sem/expression.h",
|
2021-04-19 22:54:43 +00:00
|
|
|
"sem/external_texture_type.h",
|
|
|
|
"sem/f32_type.h",
|
2021-07-14 09:44:41 +00:00
|
|
|
"sem/for_loop_statement.h",
|
2021-04-19 22:54:43 +00:00
|
|
|
"sem/i32_type.h",
|
2021-07-14 09:44:41 +00:00
|
|
|
"sem/if_statement.h",
|
2021-04-21 09:18:52 +00:00
|
|
|
"sem/info.h",
|
2021-07-14 09:44:41 +00:00
|
|
|
"sem/loop_statement.h",
|
2021-04-19 22:54:43 +00:00
|
|
|
"sem/matrix_type.h",
|
2022-02-09 23:55:51 +00:00
|
|
|
"sem/module.h",
|
2021-04-19 22:54:43 +00:00
|
|
|
"sem/multisampled_texture_type.h",
|
2021-04-21 09:18:52 +00:00
|
|
|
"sem/node.h",
|
2021-06-01 10:00:10 +00:00
|
|
|
"sem/parameter_usage.h",
|
2021-06-03 16:07:34 +00:00
|
|
|
"sem/pipeline_stage_set.h",
|
2021-04-19 22:54:43 +00:00
|
|
|
"sem/pointer_type.h",
|
2021-05-10 19:45:46 +00:00
|
|
|
"sem/reference_type.h",
|
2021-04-19 22:54:43 +00:00
|
|
|
"sem/sampled_texture_type.h",
|
2022-01-14 20:08:42 +00:00
|
|
|
"sem/sampler_texture_pair.h",
|
2021-04-19 22:54:43 +00:00
|
|
|
"sem/sampler_type.h",
|
|
|
|
"sem/storage_texture_type.h",
|
2021-07-14 09:44:41 +00:00
|
|
|
"sem/switch_statement.h",
|
2021-04-19 22:54:43 +00:00
|
|
|
"sem/texture_type.h",
|
2021-11-24 14:55:05 +00:00
|
|
|
"sem/type.h",
|
2021-11-12 13:53:49 +00:00
|
|
|
"sem/type_constructor.h",
|
2021-11-15 20:45:50 +00:00
|
|
|
"sem/type_conversion.h",
|
2021-04-19 22:54:43 +00:00
|
|
|
"sem/type_manager.h",
|
2021-04-21 09:18:52 +00:00
|
|
|
"sem/type_mappings.h",
|
2021-04-19 22:54:43 +00:00
|
|
|
"sem/u32_type.h",
|
|
|
|
"sem/vector_type.h",
|
|
|
|
"sem/void_type.h",
|
2021-03-15 08:43:11 +00:00
|
|
|
"source.cc",
|
|
|
|
"source.h",
|
2021-04-20 15:04:21 +00:00
|
|
|
"symbol.cc",
|
|
|
|
"symbol.h",
|
2021-04-21 09:18:52 +00:00
|
|
|
"symbol_table.cc",
|
|
|
|
"symbol_table.h",
|
2022-02-17 20:21:19 +00:00
|
|
|
"text/unicode.cc",
|
|
|
|
"text/unicode.h",
|
2021-03-15 08:43:11 +00:00
|
|
|
"traits.h",
|
2021-09-07 18:59:21 +00:00
|
|
|
"transform/add_empty_entry_point.cc",
|
|
|
|
"transform/add_empty_entry_point.h",
|
2022-02-02 23:07:11 +00:00
|
|
|
"transform/add_spirv_block_attribute.cc",
|
|
|
|
"transform/add_spirv_block_attribute.h",
|
2021-06-19 00:33:35 +00:00
|
|
|
"transform/array_length_from_uniform.cc",
|
|
|
|
"transform/array_length_from_uniform.h",
|
2021-03-29 21:25:45 +00:00
|
|
|
"transform/binding_remapper.cc",
|
|
|
|
"transform/binding_remapper.h",
|
2022-02-22 23:13:39 +00:00
|
|
|
"transform/builtin_polyfill.cc",
|
|
|
|
"transform/builtin_polyfill.h",
|
2021-04-09 10:28:48 +00:00
|
|
|
"transform/calculate_array_length.cc",
|
|
|
|
"transform/calculate_array_length.h",
|
2021-03-31 17:44:27 +00:00
|
|
|
"transform/canonicalize_entry_point_io.cc",
|
|
|
|
"transform/canonicalize_entry_point_io.h",
|
2022-01-24 17:17:22 +00:00
|
|
|
"transform/combine_samplers.cc",
|
|
|
|
"transform/combine_samplers.h",
|
2021-06-18 21:15:25 +00:00
|
|
|
"transform/decompose_memory_access.cc",
|
|
|
|
"transform/decompose_memory_access.h",
|
2022-02-04 15:39:34 +00:00
|
|
|
"transform/decompose_strided_array.cc",
|
|
|
|
"transform/decompose_strided_array.h",
|
2021-07-27 08:17:29 +00:00
|
|
|
"transform/decompose_strided_matrix.cc",
|
|
|
|
"transform/decompose_strided_matrix.h",
|
2022-04-07 11:36:06 +00:00
|
|
|
"transform/expand_compound_assignment.cc",
|
|
|
|
"transform/expand_compound_assignment.h",
|
2021-03-15 08:43:11 +00:00
|
|
|
"transform/first_index_offset.cc",
|
|
|
|
"transform/first_index_offset.h",
|
2021-06-18 14:59:51 +00:00
|
|
|
"transform/fold_constants.cc",
|
|
|
|
"transform/fold_constants.h",
|
2021-07-02 21:15:44 +00:00
|
|
|
"transform/fold_trivial_single_use_lets.cc",
|
|
|
|
"transform/fold_trivial_single_use_lets.h",
|
2021-07-08 10:00:17 +00:00
|
|
|
"transform/for_loop_to_loop.cc",
|
|
|
|
"transform/for_loop_to_loop.h",
|
2021-12-13 15:55:11 +00:00
|
|
|
"transform/localize_struct_array_assignment.cc",
|
|
|
|
"transform/localize_struct_array_assignment.h",
|
2021-07-02 22:17:25 +00:00
|
|
|
"transform/loop_to_for_loop.cc",
|
|
|
|
"transform/loop_to_for_loop.h",
|
2021-03-15 08:43:11 +00:00
|
|
|
"transform/manager.cc",
|
|
|
|
"transform/manager.h",
|
2021-09-07 18:59:21 +00:00
|
|
|
"transform/module_scope_var_to_entry_point_param.cc",
|
|
|
|
"transform/module_scope_var_to_entry_point_param.h",
|
2021-11-17 12:10:16 +00:00
|
|
|
"transform/multiplanar_external_texture.cc",
|
|
|
|
"transform/multiplanar_external_texture.h",
|
2021-09-13 17:11:58 +00:00
|
|
|
"transform/num_workgroups_from_uniform.cc",
|
|
|
|
"transform/num_workgroups_from_uniform.h",
|
2022-02-10 18:50:38 +00:00
|
|
|
"transform/promote_initializers_to_const_var.cc",
|
|
|
|
"transform/promote_initializers_to_const_var.h",
|
2022-03-15 15:03:03 +00:00
|
|
|
"transform/promote_side_effects_to_decl.cc",
|
|
|
|
"transform/promote_side_effects_to_decl.h",
|
2022-03-31 15:02:25 +00:00
|
|
|
"transform/remove_continue_in_switch.cc",
|
|
|
|
"transform/remove_continue_in_switch.h",
|
2021-10-21 23:04:44 +00:00
|
|
|
"transform/remove_phonies.cc",
|
|
|
|
"transform/remove_phonies.h",
|
2021-12-03 17:51:48 +00:00
|
|
|
"transform/remove_unreachable_statements.cc",
|
|
|
|
"transform/remove_unreachable_statements.h",
|
2021-03-15 08:43:11 +00:00
|
|
|
"transform/renamer.cc",
|
|
|
|
"transform/renamer.h",
|
2021-06-30 13:23:36 +00:00
|
|
|
"transform/robustness.cc",
|
|
|
|
"transform/robustness.h",
|
2021-11-23 20:45:51 +00:00
|
|
|
"transform/simplify_pointers.cc",
|
|
|
|
"transform/simplify_pointers.h",
|
2021-04-28 15:33:03 +00:00
|
|
|
"transform/single_entry_point.cc",
|
|
|
|
"transform/single_entry_point.h",
|
2021-03-15 08:43:11 +00:00
|
|
|
"transform/transform.cc",
|
|
|
|
"transform/transform.h",
|
2021-11-23 20:45:51 +00:00
|
|
|
"transform/unshadow.cc",
|
|
|
|
"transform/unshadow.h",
|
2022-03-28 20:51:32 +00:00
|
|
|
"transform/unwind_discard_functions.cc",
|
|
|
|
"transform/unwind_discard_functions.h",
|
2022-03-30 20:11:35 +00:00
|
|
|
"transform/utils/get_insertion_point.cc",
|
|
|
|
"transform/utils/get_insertion_point.h",
|
2022-02-10 18:50:38 +00:00
|
|
|
"transform/utils/hoist_to_decl_before.cc",
|
|
|
|
"transform/utils/hoist_to_decl_before.h",
|
|
|
|
"transform/var_for_dynamic_index.cc",
|
|
|
|
"transform/var_for_dynamic_index.h",
|
2021-10-25 19:20:31 +00:00
|
|
|
"transform/vectorize_scalar_matrix_constructors.cc",
|
|
|
|
"transform/vectorize_scalar_matrix_constructors.h",
|
2021-03-15 08:43:11 +00:00
|
|
|
"transform/vertex_pulling.cc",
|
|
|
|
"transform/vertex_pulling.h",
|
2021-06-16 09:19:36 +00:00
|
|
|
"transform/wrap_arrays_in_structs.cc",
|
|
|
|
"transform/wrap_arrays_in_structs.h",
|
2021-06-18 22:44:31 +00:00
|
|
|
"transform/zero_init_workgroup_memory.cc",
|
|
|
|
"transform/zero_init_workgroup_memory.h",
|
2022-03-04 21:09:24 +00:00
|
|
|
"utils/block_allocator.h",
|
2022-01-24 21:07:20 +00:00
|
|
|
"utils/crc32.h",
|
2022-02-04 22:25:45 +00:00
|
|
|
"utils/debugger.cc",
|
|
|
|
"utils/debugger.h",
|
2021-06-03 15:53:34 +00:00
|
|
|
"utils/enum_set.h",
|
2021-03-29 15:13:55 +00:00
|
|
|
"utils/hash.h",
|
2021-11-23 18:37:37 +00:00
|
|
|
"utils/map.h",
|
2021-03-29 15:13:55 +00:00
|
|
|
"utils/math.h",
|
2021-05-19 16:11:04 +00:00
|
|
|
"utils/scoped_assignment.h",
|
2021-10-14 20:24:50 +00:00
|
|
|
"utils/string.h",
|
2022-03-05 00:29:15 +00:00
|
|
|
"utils/unique_allocator.h",
|
2021-03-15 08:43:11 +00:00
|
|
|
"utils/unique_vector.h",
|
|
|
|
"writer/append_vector.cc",
|
|
|
|
"writer/append_vector.h",
|
2021-11-19 04:11:33 +00:00
|
|
|
"writer/array_length_from_uniform_options.cc",
|
|
|
|
"writer/array_length_from_uniform_options.h",
|
2021-03-15 08:43:11 +00:00
|
|
|
"writer/float_to_string.cc",
|
|
|
|
"writer/float_to_string.h",
|
2022-04-06 13:57:54 +00:00
|
|
|
"writer/generate_external_texture_bindings.cc",
|
|
|
|
"writer/generate_external_texture_bindings.h",
|
2021-04-20 15:04:21 +00:00
|
|
|
"writer/text.cc",
|
|
|
|
"writer/text.h",
|
2021-04-21 09:18:52 +00:00
|
|
|
"writer/text_generator.cc",
|
|
|
|
"writer/text_generator.h",
|
2021-03-15 08:43:11 +00:00
|
|
|
"writer/writer.cc",
|
|
|
|
"writer/writer.h",
|
|
|
|
]
|
|
|
|
|
|
|
|
if (is_linux) {
|
|
|
|
sources += [ "diagnostic/printer_linux.cc" ]
|
|
|
|
} else if (is_win) {
|
|
|
|
sources += [ "diagnostic/printer_windows.cc" ]
|
|
|
|
} else {
|
|
|
|
sources += [ "diagnostic/printer_other.cc" ]
|
|
|
|
}
|
2021-04-19 15:20:03 +00:00
|
|
|
}
|
2021-03-15 08:43:11 +00:00
|
|
|
|
2021-04-21 09:18:52 +00:00
|
|
|
libtint_source_set("libtint_sem_src") {
|
|
|
|
sources = [
|
|
|
|
"sem/array.cc",
|
2021-07-14 09:44:41 +00:00
|
|
|
"sem/array.h",
|
|
|
|
"sem/atomic_type.cc",
|
|
|
|
"sem/atomic_type.h",
|
2021-11-30 13:25:12 +00:00
|
|
|
"sem/behavior.cc",
|
|
|
|
"sem/behavior.h",
|
2021-07-14 09:44:41 +00:00
|
|
|
"sem/binding_point.h",
|
2021-05-15 14:48:46 +00:00
|
|
|
"sem/block_statement.cc",
|
2021-07-14 09:44:41 +00:00
|
|
|
"sem/bool_type.cc",
|
|
|
|
"sem/bool_type.h",
|
2022-02-02 23:07:11 +00:00
|
|
|
"sem/builtin.cc",
|
|
|
|
"sem/builtin.h",
|
|
|
|
"sem/builtin_type.cc",
|
|
|
|
"sem/builtin_type.h",
|
2021-04-21 09:18:52 +00:00
|
|
|
"sem/call.cc",
|
2021-07-14 09:44:41 +00:00
|
|
|
"sem/call.h",
|
2021-04-21 09:18:52 +00:00
|
|
|
"sem/call_target.cc",
|
2021-07-14 09:44:41 +00:00
|
|
|
"sem/call_target.h",
|
|
|
|
"sem/constant.cc",
|
|
|
|
"sem/constant.h",
|
2021-07-26 22:19:48 +00:00
|
|
|
"sem/depth_multisampled_texture_type.cc",
|
|
|
|
"sem/depth_multisampled_texture_type.h",
|
2021-07-14 09:44:41 +00:00
|
|
|
"sem/depth_texture_type.cc",
|
|
|
|
"sem/depth_texture_type.h",
|
2021-04-21 09:18:52 +00:00
|
|
|
"sem/expression.cc",
|
2021-07-14 09:44:41 +00:00
|
|
|
"sem/expression.h",
|
|
|
|
"sem/external_texture_type.cc",
|
|
|
|
"sem/external_texture_type.h",
|
|
|
|
"sem/f32_type.cc",
|
|
|
|
"sem/f32_type.h",
|
|
|
|
"sem/for_loop_statement.cc",
|
|
|
|
"sem/for_loop_statement.h",
|
2021-04-21 09:18:52 +00:00
|
|
|
"sem/function.cc",
|
2021-07-14 09:44:41 +00:00
|
|
|
"sem/i32_type.cc",
|
|
|
|
"sem/i32_type.h",
|
|
|
|
"sem/if_statement.cc",
|
|
|
|
"sem/if_statement.h",
|
2021-04-21 09:18:52 +00:00
|
|
|
"sem/info.cc",
|
2021-07-14 09:44:41 +00:00
|
|
|
"sem/info.h",
|
|
|
|
"sem/loop_statement.cc",
|
|
|
|
"sem/loop_statement.h",
|
|
|
|
"sem/matrix_type.cc",
|
|
|
|
"sem/matrix_type.h",
|
2021-04-21 09:18:52 +00:00
|
|
|
"sem/member_accessor_expression.cc",
|
2022-02-09 23:55:51 +00:00
|
|
|
"sem/module.cc",
|
|
|
|
"sem/module.h",
|
2021-07-14 09:44:41 +00:00
|
|
|
"sem/multisampled_texture_type.cc",
|
|
|
|
"sem/multisampled_texture_type.h",
|
2021-04-21 09:18:52 +00:00
|
|
|
"sem/node.cc",
|
2021-07-14 09:44:41 +00:00
|
|
|
"sem/node.h",
|
|
|
|
"sem/parameter_usage.cc",
|
|
|
|
"sem/parameter_usage.h",
|
|
|
|
"sem/pipeline_stage_set.h",
|
|
|
|
"sem/pointer_type.cc",
|
|
|
|
"sem/pointer_type.h",
|
|
|
|
"sem/reference_type.cc",
|
|
|
|
"sem/reference_type.h",
|
|
|
|
"sem/sampled_texture_type.cc",
|
|
|
|
"sem/sampled_texture_type.h",
|
|
|
|
"sem/sampler_type.cc",
|
|
|
|
"sem/sampler_type.h",
|
2021-04-21 09:18:52 +00:00
|
|
|
"sem/statement.cc",
|
2021-07-14 09:44:41 +00:00
|
|
|
"sem/storage_texture_type.cc",
|
|
|
|
"sem/storage_texture_type.h",
|
2021-04-21 09:18:52 +00:00
|
|
|
"sem/struct.cc",
|
2021-07-14 09:44:41 +00:00
|
|
|
"sem/switch_statement.cc",
|
|
|
|
"sem/switch_statement.h",
|
|
|
|
"sem/texture_type.cc",
|
|
|
|
"sem/texture_type.h",
|
2021-11-24 14:55:05 +00:00
|
|
|
"sem/type.cc",
|
|
|
|
"sem/type.h",
|
2021-11-12 13:53:49 +00:00
|
|
|
"sem/type_constructor.cc",
|
|
|
|
"sem/type_constructor.h",
|
2021-11-15 20:45:50 +00:00
|
|
|
"sem/type_conversion.cc",
|
|
|
|
"sem/type_conversion.h",
|
2021-07-14 09:44:41 +00:00
|
|
|
"sem/type_manager.cc",
|
|
|
|
"sem/type_manager.h",
|
|
|
|
"sem/type_mappings.h",
|
|
|
|
"sem/u32_type.cc",
|
|
|
|
"sem/u32_type.h",
|
2021-04-21 09:18:52 +00:00
|
|
|
"sem/variable.cc",
|
2021-07-14 09:44:41 +00:00
|
|
|
"sem/vector_type.cc",
|
|
|
|
"sem/vector_type.h",
|
|
|
|
"sem/void_type.cc",
|
|
|
|
"sem/void_type.h",
|
2021-04-21 09:18:52 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
public_deps = [ ":libtint_core_all_src" ]
|
|
|
|
}
|
|
|
|
|
2021-04-19 15:20:03 +00:00
|
|
|
libtint_source_set("libtint_core_src") {
|
2021-04-21 09:18:52 +00:00
|
|
|
public_deps = [
|
2021-04-19 15:20:03 +00:00
|
|
|
":libtint_core_all_src",
|
|
|
|
":libtint_sem_src",
|
2021-03-15 08:43:11 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2021-04-19 15:20:03 +00:00
|
|
|
libtint_source_set("libtint_spv_reader_src") {
|
2021-03-15 08:43:11 +00:00
|
|
|
sources = [
|
|
|
|
"reader/spirv/construct.cc",
|
|
|
|
"reader/spirv/construct.h",
|
2021-04-29 00:09:04 +00:00
|
|
|
"reader/spirv/entry_point_info.cc",
|
2021-03-15 08:43:11 +00:00
|
|
|
"reader/spirv/entry_point_info.h",
|
|
|
|
"reader/spirv/enum_converter.cc",
|
|
|
|
"reader/spirv/enum_converter.h",
|
|
|
|
"reader/spirv/fail_stream.h",
|
|
|
|
"reader/spirv/function.cc",
|
|
|
|
"reader/spirv/function.h",
|
|
|
|
"reader/spirv/namer.cc",
|
|
|
|
"reader/spirv/namer.h",
|
|
|
|
"reader/spirv/parser.cc",
|
|
|
|
"reader/spirv/parser.h",
|
|
|
|
"reader/spirv/parser_impl.cc",
|
|
|
|
"reader/spirv/parser_impl.h",
|
2021-05-14 17:51:13 +00:00
|
|
|
"reader/spirv/parser_type.cc",
|
|
|
|
"reader/spirv/parser_type.h",
|
2021-03-15 08:43:11 +00:00
|
|
|
"reader/spirv/usage.cc",
|
|
|
|
"reader/spirv/usage.h",
|
|
|
|
]
|
|
|
|
|
2021-04-21 09:18:52 +00:00
|
|
|
public_deps = [
|
|
|
|
":libtint_core_src",
|
|
|
|
"${tint_spirv_tools_dir}/:spvtools_opt",
|
|
|
|
]
|
2021-07-20 12:34:00 +00:00
|
|
|
|
2021-09-13 17:11:58 +00:00
|
|
|
public_configs = [ "${tint_spirv_tools_dir}/:spvtools_internal_config" ]
|
2021-03-15 08:43:11 +00:00
|
|
|
}
|
|
|
|
|
2021-04-19 15:20:03 +00:00
|
|
|
libtint_source_set("libtint_spv_writer_src") {
|
2021-03-15 08:43:11 +00:00
|
|
|
sources = [
|
|
|
|
"writer/spirv/binary_writer.cc",
|
|
|
|
"writer/spirv/binary_writer.h",
|
|
|
|
"writer/spirv/builder.cc",
|
|
|
|
"writer/spirv/builder.h",
|
|
|
|
"writer/spirv/function.cc",
|
|
|
|
"writer/spirv/function.h",
|
|
|
|
"writer/spirv/generator.cc",
|
|
|
|
"writer/spirv/generator.h",
|
2022-04-11 21:10:20 +00:00
|
|
|
"writer/spirv/generator_impl.cc",
|
|
|
|
"writer/spirv/generator_impl.h",
|
2021-03-15 08:43:11 +00:00
|
|
|
"writer/spirv/instruction.cc",
|
|
|
|
"writer/spirv/instruction.h",
|
|
|
|
"writer/spirv/operand.cc",
|
|
|
|
"writer/spirv/operand.h",
|
2021-03-22 15:32:35 +00:00
|
|
|
"writer/spirv/scalar_constant.h",
|
2021-03-15 08:43:11 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
public_deps = [ ":libtint_core_src" ]
|
|
|
|
}
|
|
|
|
|
2021-04-19 15:20:03 +00:00
|
|
|
libtint_source_set("libtint_wgsl_reader_src") {
|
2021-03-15 08:43:11 +00:00
|
|
|
sources = [
|
|
|
|
"reader/wgsl/lexer.cc",
|
|
|
|
"reader/wgsl/lexer.h",
|
|
|
|
"reader/wgsl/parser.cc",
|
|
|
|
"reader/wgsl/parser.h",
|
|
|
|
"reader/wgsl/parser_impl.cc",
|
|
|
|
"reader/wgsl/parser_impl.h",
|
|
|
|
"reader/wgsl/parser_impl_detail.h",
|
|
|
|
"reader/wgsl/token.cc",
|
|
|
|
"reader/wgsl/token.h",
|
|
|
|
]
|
|
|
|
|
|
|
|
public_deps = [ ":libtint_core_src" ]
|
|
|
|
}
|
|
|
|
|
2021-04-19 15:20:03 +00:00
|
|
|
libtint_source_set("libtint_wgsl_writer_src") {
|
2021-03-15 08:43:11 +00:00
|
|
|
sources = [
|
|
|
|
"writer/wgsl/generator.cc",
|
|
|
|
"writer/wgsl/generator.h",
|
|
|
|
"writer/wgsl/generator_impl.cc",
|
|
|
|
"writer/wgsl/generator_impl.h",
|
|
|
|
]
|
|
|
|
|
|
|
|
public_deps = [ ":libtint_core_src" ]
|
|
|
|
}
|
|
|
|
|
2021-04-19 15:20:03 +00:00
|
|
|
libtint_source_set("libtint_msl_writer_src") {
|
2021-03-15 08:43:11 +00:00
|
|
|
sources = [
|
|
|
|
"writer/msl/generator.cc",
|
|
|
|
"writer/msl/generator.h",
|
|
|
|
"writer/msl/generator_impl.cc",
|
|
|
|
"writer/msl/generator_impl.h",
|
|
|
|
]
|
|
|
|
|
|
|
|
public_deps = [ ":libtint_core_src" ]
|
|
|
|
}
|
|
|
|
|
2021-04-19 15:20:03 +00:00
|
|
|
libtint_source_set("libtint_hlsl_writer_src") {
|
2021-03-15 08:43:11 +00:00
|
|
|
sources = [
|
|
|
|
"writer/hlsl/generator.cc",
|
|
|
|
"writer/hlsl/generator.h",
|
|
|
|
"writer/hlsl/generator_impl.cc",
|
|
|
|
"writer/hlsl/generator_impl.h",
|
|
|
|
]
|
|
|
|
|
|
|
|
public_deps = [ ":libtint_core_src" ]
|
|
|
|
}
|
|
|
|
|
Implement GLSL writer backend.
This is a modified version of the HLSL writer.
Basic types, arrays, entry points, reserved keywords, uniforms,
builtin uniforms, structs, some builtin functions, zero initialization
are implemented. Textures, SSBOs and storage textures in particular are
unimplemented. All the unit tests "pass", but the output is not correct
in many cases.
triangle.wgsl outputs correct vertex and fragment shaders that pass
GLSL validation via glslang. compute_boids.wgsl outputs a valid but not
correct compute shader.
Change-Id: I96c7aaf60cf2d4237e45d732e5f51b345aea0552
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/57780
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-10-06 18:55:10 +00:00
|
|
|
libtint_source_set("libtint_glsl_writer_src") {
|
|
|
|
sources = [
|
|
|
|
"writer/glsl/generator.cc",
|
|
|
|
"writer/glsl/generator.h",
|
|
|
|
"writer/glsl/generator_impl.cc",
|
|
|
|
"writer/glsl/generator_impl.h",
|
|
|
|
]
|
|
|
|
|
|
|
|
public_deps = [ ":libtint_core_src" ]
|
|
|
|
}
|
|
|
|
|
2021-03-15 08:43:11 +00:00
|
|
|
source_set("libtint") {
|
|
|
|
public_deps = [ ":libtint_core_src" ]
|
|
|
|
|
|
|
|
if (tint_build_spv_reader) {
|
|
|
|
public_deps += [ ":libtint_spv_reader_src" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
if (tint_build_spv_writer) {
|
|
|
|
public_deps += [ ":libtint_spv_writer_src" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
if (tint_build_wgsl_reader) {
|
|
|
|
public_deps += [ ":libtint_wgsl_reader_src" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
if (tint_build_wgsl_writer) {
|
|
|
|
public_deps += [ ":libtint_wgsl_writer_src" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
if (tint_build_msl_writer) {
|
|
|
|
public_deps += [ ":libtint_msl_writer_src" ]
|
|
|
|
}
|
|
|
|
|
|
|
|
if (tint_build_hlsl_writer) {
|
|
|
|
public_deps += [ ":libtint_hlsl_writer_src" ]
|
|
|
|
}
|
|
|
|
|
Implement GLSL writer backend.
This is a modified version of the HLSL writer.
Basic types, arrays, entry points, reserved keywords, uniforms,
builtin uniforms, structs, some builtin functions, zero initialization
are implemented. Textures, SSBOs and storage textures in particular are
unimplemented. All the unit tests "pass", but the output is not correct
in many cases.
triangle.wgsl outputs correct vertex and fragment shaders that pass
GLSL validation via glslang. compute_boids.wgsl outputs a valid but not
correct compute shader.
Change-Id: I96c7aaf60cf2d4237e45d732e5f51b345aea0552
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/57780
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-10-06 18:55:10 +00:00
|
|
|
if (tint_build_glsl_writer) {
|
|
|
|
public_deps += [ ":libtint_glsl_writer_src" ]
|
|
|
|
}
|
|
|
|
|
2021-03-15 08:43:11 +00:00
|
|
|
configs += [ ":tint_common_config" ]
|
|
|
|
public_configs = [ ":tint_public_config" ]
|
|
|
|
|
|
|
|
if (build_with_chromium) {
|
|
|
|
configs -= [ "//build/config/compiler:chromium_code" ]
|
|
|
|
configs += [ "//build/config/compiler:no_chromium_code" ]
|
|
|
|
}
|
|
|
|
}
|