tint/writer/spirv: Inline constant expressions

This is required to handle materialized values, and for constant
expressions.

Bug: tint:1504
Change-Id: If0a49e9b03566c06aa6e4e4c284fc427e1541e91
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92082
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
diff --git a/src/tint/writer/spirv/builder_builtin_texture_test.cc b/src/tint/writer/spirv/builder_builtin_texture_test.cc
index e76e478..b4abfcf 100644
--- a/src/tint/writer/spirv/builder_builtin_texture_test.cc
+++ b/src/tint/writer/spirv/builder_builtin_texture_test.cc
@@ -589,7 +589,7 @@
 %16 = OpConstant %4 2
 %17 = OpConstantComposite %14 %15 %16
 %18 = OpTypeInt 32 1
-%19 = OpConstant %18 0
+%19 = OpConstantNull %18
 )",
                     R"(
 %10 = OpLoad %7 %5
@@ -615,7 +615,7 @@
 %16 = OpConstant %4 2
 %17 = OpConstantComposite %14 %15 %16
 %18 = OpTypeInt 32 1
-%19 = OpConstant %18 0
+%19 = OpConstantNull %18
 %20 = OpTypeVector %18 2
 %21 = OpConstant %18 3
 %22 = OpConstant %18 4
@@ -645,7 +645,7 @@
 %16 = OpConstant %4 2
 %18 = OpTypeInt 32 1
 %19 = OpConstant %18 3
-%21 = OpConstant %18 0
+%21 = OpConstantNull %18
 )",
                     R"(
 %10 = OpLoad %7 %5
@@ -673,7 +673,7 @@
 %16 = OpConstant %4 2
 %18 = OpTypeInt 32 1
 %19 = OpConstant %18 3
-%21 = OpConstant %18 0
+%21 = OpConstantNull %18
 %22 = OpTypeVector %18 2
 %23 = OpConstant %18 4
 %24 = OpConstant %18 5
@@ -706,7 +706,7 @@
 %17 = OpConstant %4 3
 %18 = OpConstantComposite %14 %15 %16 %17
 %19 = OpTypeInt 32 1
-%20 = OpConstant %19 0
+%20 = OpConstantNull %19
 )",
                     R"(
 %10 = OpLoad %7 %5
@@ -732,7 +732,7 @@
 %16 = OpConstant %4 3
 %18 = OpTypeInt 32 1
 %19 = OpConstant %18 4
-%21 = OpConstant %18 0
+%21 = OpConstantNull %18
 )",
                     R"(
 %10 = OpLoad %7 %5