mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-06-06 14:43:31 +00:00
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:
parent
4a29008c7e
commit
1e01c2c116
@ -4077,7 +4077,7 @@ bool FunctionEmitter::EmitImageAccess(const spvtools::opt::Instruction& inst) {
|
|||||||
const auto num_args = inst.NumInOperands();
|
const auto num_args = inst.NumInOperands();
|
||||||
|
|
||||||
std::string builtin_name;
|
std::string builtin_name;
|
||||||
bool use_load_suffix = true;
|
bool use_level_of_detail_suffix = true;
|
||||||
switch (opcode) {
|
switch (opcode) {
|
||||||
case SpvOpImageSampleImplicitLod:
|
case SpvOpImageSampleImplicitLod:
|
||||||
case SpvOpImageSampleExplicitLod:
|
case SpvOpImageSampleExplicitLod:
|
||||||
@ -4103,16 +4103,16 @@ bool FunctionEmitter::EmitImageAccess(const spvtools::opt::Instruction& inst) {
|
|||||||
case SpvOpImageFetch:
|
case SpvOpImageFetch:
|
||||||
// Read a single texel from a sampled image.
|
// Read a single texel from a sampled image.
|
||||||
builtin_name = "textureLoad";
|
builtin_name = "textureLoad";
|
||||||
use_load_suffix = false;
|
use_level_of_detail_suffix = false;
|
||||||
break;
|
break;
|
||||||
case SpvOpImageRead:
|
case SpvOpImageRead:
|
||||||
// Read a single texel from a storage image.
|
// Read a single texel from a storage image.
|
||||||
builtin_name = "textureLoad";
|
builtin_name = "textureLoad";
|
||||||
use_load_suffix = false;
|
use_level_of_detail_suffix = false;
|
||||||
break;
|
break;
|
||||||
case SpvOpImageWrite:
|
case SpvOpImageWrite:
|
||||||
builtin_name = "textureStore";
|
builtin_name = "textureStore";
|
||||||
use_load_suffix = false;
|
use_level_of_detail_suffix = false;
|
||||||
if (arg_index < num_args) {
|
if (arg_index < num_args) {
|
||||||
auto texel = MakeOperand(inst, arg_index);
|
auto texel = MakeOperand(inst, arg_index);
|
||||||
auto* converted_texel =
|
auto* converted_texel =
|
||||||
@ -4147,7 +4147,7 @@ bool FunctionEmitter::EmitImageAccess(const spvtools::opt::Instruction& inst) {
|
|||||||
arg_index++;
|
arg_index++;
|
||||||
}
|
}
|
||||||
if (arg_index < num_args && (image_operands_mask & SpvImageOperandsLodMask)) {
|
if (arg_index < num_args && (image_operands_mask & SpvImageOperandsLodMask)) {
|
||||||
if (use_load_suffix) {
|
if (use_level_of_detail_suffix) {
|
||||||
builtin_name += "Level";
|
builtin_name += "Level";
|
||||||
}
|
}
|
||||||
TypedExpression lod = MakeOperand(inst, arg_index);
|
TypedExpression lod = MakeOperand(inst, arg_index);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user