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>
This commit is contained in:
David Neto 2021-01-08 15:44:44 +00:00 committed by Commit Bot service account
parent 4a29008c7e
commit 1e01c2c116
1 changed files with 5 additions and 5 deletions

View File

@ -4077,7 +4077,7 @@ bool FunctionEmitter::EmitImageAccess(const spvtools::opt::Instruction& inst) {
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 @@ bool FunctionEmitter::EmitImageAccess(const spvtools::opt::Instruction& inst) {
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 @@ bool FunctionEmitter::EmitImageAccess(const spvtools::opt::Instruction& inst) {
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);