dawn-cmake/test/types
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
..
texture writer/hlsl: Simplify emission logic, clean up output 2021-06-16 09:19:36 +00:00
function_scope_declarations.wgsl writer/msl: Fix array type emission 2021-05-20 21:20:47 +00:00
function_scope_declarations.wgsl.expected.hlsl writer/hlsl: Use the WrapArraysInStructs transform 2021-06-16 09:19:36 +00:00
function_scope_declarations.wgsl.expected.msl transform/msl: Run InlinePointerLets and Simplify 2021-06-18 09:47:23 +00:00
function_scope_declarations.wgsl.expected.spvasm transform/spirv: Use InlinePointerLets & Simplify 2021-06-10 17:34:44 +00:00
function_scope_declarations.wgsl.expected.wgsl writer/msl: Fix array type emission 2021-05-20 21:20:47 +00:00
function_scope_var_conversions.wgsl Validate scalar constructor and implement conversion to vecN<bool> in spir-v backend 2021-06-18 15:32:21 +00:00
function_scope_var_conversions.wgsl.expected.hlsl Validate scalar constructor and implement conversion to vecN<bool> in spir-v backend 2021-06-18 15:32:21 +00:00
function_scope_var_conversions.wgsl.expected.msl Validate scalar constructor and implement conversion to vecN<bool> in spir-v backend 2021-06-18 15:32:21 +00:00
function_scope_var_conversions.wgsl.expected.spvasm Validate scalar constructor and implement conversion to vecN<bool> in spir-v backend 2021-06-18 15:32:21 +00:00
function_scope_var_conversions.wgsl.expected.wgsl Validate scalar constructor and implement conversion to vecN<bool> in spir-v backend 2021-06-18 15:32:21 +00:00
module_scope_let.wgsl writer/msl: Handle private and workgroup variables 2021-05-26 15:41:02 +00:00
module_scope_let.wgsl.expected.hlsl writer/hlsl: Use the WrapArraysInStructs transform 2021-06-16 09:19:36 +00:00
module_scope_let.wgsl.expected.msl Add transform/WrapArraysInStructs 2021-06-16 09:19:36 +00:00
module_scope_let.wgsl.expected.spvasm writer/msl: Handle private and workgroup variables 2021-05-26 15:41:02 +00:00
module_scope_let.wgsl.expected.wgsl writer/msl: Handle private and workgroup variables 2021-05-26 15:41:02 +00:00
module_scope_var.wgsl writer/msl: Handle private and workgroup variables 2021-05-26 15:41:02 +00:00
module_scope_var.wgsl.expected.hlsl writer/hlsl: Use the WrapArraysInStructs transform 2021-06-16 09:19:36 +00:00
module_scope_var.wgsl.expected.msl Add transform/WrapArraysInStructs 2021-06-16 09:19:36 +00:00
module_scope_var.wgsl.expected.spvasm writer/msl: Handle private and workgroup variables 2021-05-26 15:41:02 +00:00
module_scope_var.wgsl.expected.wgsl writer/msl: Handle private and workgroup variables 2021-05-26 15:41:02 +00:00
module_scope_var_conversions.wgsl Validate scalar constructor and implement conversion to vecN<bool> in spir-v backend 2021-06-18 15:32:21 +00:00
module_scope_var_conversions.wgsl.expected.hlsl Validate scalar constructor and implement conversion to vecN<bool> in spir-v backend 2021-06-18 15:32:21 +00:00
module_scope_var_conversions.wgsl.expected.msl Validate scalar constructor and implement conversion to vecN<bool> in spir-v backend 2021-06-18 15:32:21 +00:00
module_scope_var_conversions.wgsl.expected.spvasm Validate scalar constructor and implement conversion to vecN<bool> in spir-v backend 2021-06-18 15:32:21 +00:00
module_scope_var_conversions.wgsl.expected.wgsl Validate scalar constructor and implement conversion to vecN<bool> in spir-v backend 2021-06-18 15:32:21 +00:00
module_scope_var_initializers.wgsl writer/msl: Handle private and workgroup variables 2021-05-26 15:41:02 +00:00
module_scope_var_initializers.wgsl.expected.hlsl writer/hlsl: Use the WrapArraysInStructs transform 2021-06-16 09:19:36 +00:00
module_scope_var_initializers.wgsl.expected.msl Add transform/WrapArraysInStructs 2021-06-16 09:19:36 +00:00
module_scope_var_initializers.wgsl.expected.spvasm writer/msl: Handle private and workgroup variables 2021-05-26 15:41:02 +00:00
module_scope_var_initializers.wgsl.expected.wgsl writer/msl: Handle private and workgroup variables 2021-05-26 15:41:02 +00:00
parameters.wgsl writer/msl: Fix array type emission 2021-05-20 21:20:47 +00:00
parameters.wgsl.expected.hlsl writer/hlsl: Use the WrapArraysInStructs transform 2021-06-16 09:19:36 +00:00
parameters.wgsl.expected.msl Add transform/WrapArraysInStructs 2021-06-16 09:19:36 +00:00
parameters.wgsl.expected.spvasm writer/msl: Fix array type emission 2021-05-20 21:20:47 +00:00
parameters.wgsl.expected.wgsl writer/msl: Fix array type emission 2021-05-20 21:20:47 +00:00
return_types.wgsl writer/msl: Fix array type emission 2021-05-20 21:20:47 +00:00
return_types.wgsl.expected.hlsl writer/hlsl: Use the WrapArraysInStructs transform 2021-06-16 09:19:36 +00:00
return_types.wgsl.expected.msl Add transform/WrapArraysInStructs 2021-06-16 09:19:36 +00:00
return_types.wgsl.expected.spvasm writer/msl: Fix array type emission 2021-05-20 21:20:47 +00:00
return_types.wgsl.expected.wgsl writer/msl: Fix array type emission 2021-05-20 21:20:47 +00:00
sampler.wgsl writer/msl: Handle texture and sampler variables 2021-06-11 12:34:26 +00:00
sampler.wgsl.expected.hlsl writer/hlsl: Simplify emission logic, clean up output 2021-06-16 09:19:36 +00:00
sampler.wgsl.expected.msl writer/msl: Handle texture and sampler variables 2021-06-11 12:34:26 +00:00
sampler.wgsl.expected.spvasm writer/msl: Handle texture and sampler variables 2021-06-11 12:34:26 +00:00
sampler.wgsl.expected.wgsl writer/msl: Handle texture and sampler variables 2021-06-11 12:34:26 +00:00
struct_members.wgsl writer/msl: Fix array type emission 2021-05-20 21:20:47 +00:00
struct_members.wgsl.expected.hlsl writer/hlsl: Use the WrapArraysInStructs transform 2021-06-16 09:19:36 +00:00
struct_members.wgsl.expected.msl Add transform/WrapArraysInStructs 2021-06-16 09:19:36 +00:00
struct_members.wgsl.expected.spvasm writer/msl: Fix array type emission 2021-05-20 21:20:47 +00:00
struct_members.wgsl.expected.wgsl writer/msl: Fix array type emission 2021-05-20 21:20:47 +00:00