Remove forwardable bit in SPIRVariable.

Was never really used for anything. It's always true.
This commit is contained in:
Hans-Kristian Arntzen 2022-03-04 11:05:21 +01:00
parent 5d9fc2d903
commit 476b6541fa
3 changed files with 3 additions and 4 deletions

View File

@ -1072,7 +1072,6 @@ struct SPIRVariable : IVariant
// Temporaries which can remain forwarded as long as this variable is not modified.
SmallVector<ID> dependees;
bool forwardable = true;
bool deferred_declaration = false;
bool phi_variable = false;

View File

@ -9585,7 +9585,7 @@ bool CompilerGLSL::should_forward(uint32_t id) const
// This is important because otherwise we'll get local sampler copies (highp sampler2D foo = bar) that are invalid in OpenGL GLSL
auto *var = maybe_get<SPIRVariable>(id);
if (var && var->forwardable)
if (var)
return true;
// For debugging emit temporary variables for all expressions
@ -12089,7 +12089,7 @@ void CompilerGLSL::emit_instruction(const Instruction &instruction)
pure = false;
}
if (var && var->forwardable)
if (var)
{
bool forward = forced_temporaries.find(id) == end(forced_temporaries);
auto &e = emit_op(result_type, id, imgexpr, forward);

View File

@ -5359,7 +5359,7 @@ void CompilerHLSL::emit_instruction(const Instruction &instruction)
image_format_to_components(get<SPIRType>(var->basetype).image.format), imgexpr);
}
if (var && var->forwardable)
if (var)
{
bool forward = forced_temporaries.find(id) == end(forced_temporaries);
auto &e = emit_op(result_type, id, imgexpr, forward);