test/tint/builtins/gen: Use returned value

It appears that FXC and DXC do some validation post dead-code-elimination.
These tests have been updated so that the return value is assigned to a storage buffer, ensuring that all validation is performed.

Many DXC tests are affected by https://github.com/microsoft/DirectXShaderCompiler/issues/5082, which have been SKIP'ed.

Fixed: tint:1859
Change-Id: I0001a9a9821846cd0855c3d8ce2bec79ab8e64ef
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122662
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: James Price <jrprice@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
diff --git a/test/tint/builtins/gen/literal/quantizeToF16/cba294.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/quantizeToF16/cba294.wgsl.expected.spvasm
index bea6961..df714b9 100644
--- a/test/tint/builtins/gen/literal/quantizeToF16/cba294.wgsl.expected.spvasm
+++ b/test/tint/builtins/gen/literal/quantizeToF16/cba294.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
 ; SPIR-V
 ; Version: 1.3
 ; Generator: Google Tint Compiler; 0
-; Bound: 30
+; Bound: 38
 ; Schema: 0
                OpCapability Shader
                OpMemoryModel Logical GLSL450
@@ -12,6 +12,9 @@
                OpExecutionMode %compute_main LocalSize 1 1 1
                OpName %value "value"
                OpName %vertex_point_size "vertex_point_size"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
                OpName %quantizeToF16_cba294 "quantizeToF16_cba294"
                OpName %res "res"
                OpName %vertex_main_inner "vertex_main_inner"
@@ -20,6 +23,10 @@
                OpName %compute_main "compute_main"
                OpDecorate %value BuiltIn Position
                OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
       %float = OpTypeFloat 32
     %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -28,37 +35,46 @@
 %_ptr_Output_float = OpTypePointer Output %float
           %8 = OpConstantNull %float
 %vertex_point_size = OpVariable %_ptr_Output_float Output %8
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
        %void = OpTypeVoid
-          %9 = OpTypeFunction %void
+         %12 = OpTypeFunction %void
     %float_1 = OpConstant %float 1
-         %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
+         %17 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
 %_ptr_Function_v4float = OpTypePointer Function %v4float
-         %17 = OpTypeFunction %v4float
-%quantizeToF16_cba294 = OpFunction %void None %9
-         %12 = OpLabel
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %25 = OpTypeFunction %v4float
+%quantizeToF16_cba294 = OpFunction %void None %12
+         %15 = OpLabel
         %res = OpVariable %_ptr_Function_v4float Function %5
-               OpStore %res %14
+               OpStore %res %17
+         %23 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %24 = OpLoad %v4float %res
+               OpStore %23 %24
                OpReturn
                OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %17
-         %19 = OpLabel
-         %20 = OpFunctionCall %void %quantizeToF16_cba294
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %quantizeToF16_cba294
                OpReturnValue %5
                OpFunctionEnd
-%vertex_main = OpFunction %void None %9
-         %22 = OpLabel
-         %23 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %23
+%vertex_main = OpFunction %void None %12
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
                OpStore %vertex_point_size %float_1
                OpReturn
                OpFunctionEnd
-%fragment_main = OpFunction %void None %9
-         %25 = OpLabel
-         %26 = OpFunctionCall %void %quantizeToF16_cba294
+%fragment_main = OpFunction %void None %12
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %quantizeToF16_cba294
                OpReturn
                OpFunctionEnd
-%compute_main = OpFunction %void None %9
-         %28 = OpLabel
-         %29 = OpFunctionCall %void %quantizeToF16_cba294
+%compute_main = OpFunction %void None %12
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %quantizeToF16_cba294
                OpReturn
                OpFunctionEnd