dawn-cmake/src
Antonio Maiorano adbbd0ba66 Validate scalar constructor and implement conversion to vecN<bool> in spir-v backend
After implementing validation and fairly exhaustive tests, discovered
that conversion of scalar vector to bool vector did not work in the
spir-v backend. For module scope variables, we use and rely on the
FoldConstants transform to ensure no conversion needs to take place.
This is necessary because we cannot easily introduce temporary values
and refer to them when casting at module scope. Note that for the same
reason, module-level conversions are always constant foldable, so this
works. For function-level conversions, implemented support to emit a
comparison against a zero value, and store the result in the bool
vector.

Bug: tint:865
Change-Id: I0528045e803f176e03428bc7eac31ae06920bbd7
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54744
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-06-18 15:32:21 +00:00
..
ast ast: Add atomic type 2021-06-17 15:48:39 +00:00
diagnostic diagnostic: Fix stupid bug in Formatter::format 2021-06-07 16:53:32 +00:00
inspector Add sampler targets to inspector data 2021-06-17 23:29:03 +00:00
reader spirv-reader: Set workgroup size, but not specializable 2021-06-17 22:40:43 +00:00
resolver Validate scalar constructor and implement conversion to vecN<bool> in spir-v backend 2021-06-18 15:32:21 +00:00
sem sem: Add BindingPoint() to sem::Variable 2021-06-18 09:27:13 +00:00
transform Validate scalar constructor and implement conversion to vecN<bool> in spir-v backend 2021-06-18 15:32:21 +00:00
utils resolver: Validate pipline stage use for intrinsics 2021-06-03 16:07:34 +00:00
val val: Use the metal API to validate MSL shaders, if available 2021-06-08 19:38:27 +00:00
writer Validate scalar constructor and implement conversion to vecN<bool> in spir-v backend 2021-06-18 15:32:21 +00:00
BUILD.gn Implement a FoldConstants transform that currently folds scalar and vector conversions 2021-06-18 14:59:51 +00:00
CMakeLists.txt Implement a FoldConstants transform that currently folds scalar and vector conversions 2021-06-18 14:59:51 +00:00
block_allocator.h Remove sem::AccessControl 2021-05-14 17:51:13 +00:00
block_allocator_test.cc Add tint::BlockAllocator<T> 2021-01-21 15:30:10 +00:00
castable.cc Pull Is() out of castable and into a new TypeInfo 2021-03-02 20:30:08 +00:00
castable.h castable.h: Fix warning 2021-04-30 21:27:02 +00:00
castable_test.cc Castable: Add FLAGS template argument for Is,As 2021-04-16 15:05:44 +00:00
clone_context.cc Remove ShareableCloneable 2021-05-19 13:25:08 +00:00
clone_context.h ast: Tweak cloning rules for module-scope decls 2021-06-16 09:19:36 +00:00
clone_context_test.cc CloneContext: Add InsertBack() 2021-05-26 15:12:12 +00:00
debug.cc Remove all unnecessary includes 2021-03-09 11:11:17 +00:00
debug.h debug: Add TINT_UNIMPLEMENTED() 2021-03-17 04:55:33 +00:00
debug_test.cc Add TINT_ASSERT() 2021-03-09 13:52:18 +00:00
demangler.cc Validate that Symbols are all part of the same program 2021-04-15 18:20:03 +00:00
demangler.h Simplify calls to ast::Node::[to_]str() 2021-01-29 11:22:40 +00:00
demangler_test.cc Validate that Symbols are all part of the same program 2021-04-15 18:20:03 +00:00
intrinsic_table.cc intrinsic_table.def: Support [[deprecated]] on fn 2021-06-10 17:31:54 +00:00
intrinsic_table.h src: Reimplement IntrinsicTable from intrisics.def 2021-06-01 19:06:31 +00:00
intrinsic_table.inl intrinsics.def: Include access and storage in ptr errors 2021-06-17 20:26:15 +00:00
intrinsic_table.inl.tmpl intrinsic_table.def: Support [[deprecated]] on fn 2021-06-10 17:31:54 +00:00
intrinsic_table_test.cc Add optional access to ptr<> 2021-06-04 22:17:37 +00:00
intrinsics.def intrinsics.def: Include access and storage in ptr errors 2021-06-17 20:26:15 +00:00
program.cc ast: Replace NamedType with TypeDecl 2021-06-09 14:32:14 +00:00
program.h ast: Replace NamedType with TypeDecl 2021-06-09 14:32:14 +00:00
program_builder.cc resolver: Validate that a call statement has no return value 2021-06-11 13:22:27 +00:00
program_builder.h Implement a FoldConstants transform that currently folds scalar and vector conversions 2021-06-18 14:59:51 +00:00
program_builder_test.cc Remove typ::TypePair. 2021-05-20 15:10:48 +00:00
program_id.cc Add ProgramID feed it into all ast::Nodes 2021-04-13 23:27:27 +00:00
program_id.h ast: Validate that ASTs are all part of the same program 2021-04-15 17:47:23 +00:00
program_test.cc Rename 'constructed types' to 'type declarartions' 2021-06-09 14:32:14 +00:00
scope_stack.h Add std::hash<tint::Symbol> specialization 2021-01-11 22:02:42 +00:00
scope_stack_test.cc Validate that Symbols are all part of the same program 2021-04-15 18:20:03 +00:00
source.cc Resolver: Check that every AST node is reached once 2021-04-19 19:16:12 +00:00
source.h wgsl parser: use new TypesBuilder factory functions, and set Source for ast::Type nodes 2021-04-27 17:32:37 +00:00
symbol.cc Validate that Symbols are all part of the same program 2021-04-15 18:20:03 +00:00
symbol.h Validate that Symbols are all part of the same program 2021-04-15 18:20:03 +00:00
symbol_table.cc Validate that Symbols are all part of the same program 2021-04-15 18:20:03 +00:00
symbol_table.h Validate that Symbols are all part of the same program 2021-04-15 18:20:03 +00:00
symbol_table_test.cc Validate that Symbols are all part of the same program 2021-04-15 18:20:03 +00:00
symbol_test.cc Validate that Symbols are all part of the same program 2021-04-15 18:20:03 +00:00
test_main.cc test: Remove HLSL & MSL Validate() logic 2021-06-11 13:22:27 +00:00
traits.h Validate function call arguments 2021-06-09 20:17:59 +00:00
traits_test.cc Remove all unnecessary includes 2021-03-09 11:11:17 +00:00