spirv-reader: rename variable
Rename the state variable describing whether the "Level"
suffix should be used to indicate the level-of-detail variant
of a texture builtin.
Bug: tint:3
Change-Id: I21fdfcace06575e7f9586d7bfc22200f9c1176fa
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/37004
Commit-Queue: David Neto <dneto@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: David Neto <dneto@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
diff --git a/src/reader/spirv/function.cc b/src/reader/spirv/function.cc
index 9c78615..69ec724 100644
--- a/src/reader/spirv/function.cc
+++ b/src/reader/spirv/function.cc
@@ -4077,7 +4077,7 @@
const auto num_args = inst.NumInOperands();
std::string builtin_name;
- bool use_load_suffix = true;
+ bool use_level_of_detail_suffix = true;
switch (opcode) {
case SpvOpImageSampleImplicitLod:
case SpvOpImageSampleExplicitLod:
@@ -4103,16 +4103,16 @@
case SpvOpImageFetch:
// Read a single texel from a sampled image.
builtin_name = "textureLoad";
- use_load_suffix = false;
+ use_level_of_detail_suffix = false;
break;
case SpvOpImageRead:
// Read a single texel from a storage image.
builtin_name = "textureLoad";
- use_load_suffix = false;
+ use_level_of_detail_suffix = false;
break;
case SpvOpImageWrite:
builtin_name = "textureStore";
- use_load_suffix = false;
+ use_level_of_detail_suffix = false;
if (arg_index < num_args) {
auto texel = MakeOperand(inst, arg_index);
auto* converted_texel =
@@ -4147,7 +4147,7 @@
arg_index++;
}
if (arg_index < num_args && (image_operands_mask & SpvImageOperandsLodMask)) {
- if (use_load_suffix) {
+ if (use_level_of_detail_suffix) {
builtin_name += "Level";
}
TypedExpression lod = MakeOperand(inst, arg_index);