Commit 9173e017 by Tim Van Patten Committed by Commit Bot

Revert "Cleanup translator option checks"

This reverts commit 9710c4e4. Reason for revert: Earlier CL breaks pre-rotation: https://chromium-review.googlesource.com/c/angle/angle/+/2598584 Original change's description: > Cleanup translator option checks > > Use comparison with 0 for explicit conversion to bool. > > Bug: angleproject:3606 > Change-Id: Ie0a76d7df829227c1376894535813b54e13491b4 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2631689 > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Charlie Lao <cclao@google.com> > Reviewed-by: Jamie Madill <jmadill@chromium.org> TBR=syoussefi@chromium.org,jmadill@chromium.org,cclao@google.com Change-Id: Ib597a62f3c7078d28f7f5b79d1cc9f8d9e469c31 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:3606 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2634047Reviewed-by: 's avatarTim Van Patten <timvp@google.com> Commit-Queue: Tim Van Patten <timvp@google.com>
parent 9710c4e4
...@@ -177,7 +177,7 @@ void ResetExtensionBehavior(const ShBuiltInResources &resources, ...@@ -177,7 +177,7 @@ void ResetExtensionBehavior(const ShBuiltInResources &resources,
} }
if (resources.ARB_texture_rectangle) if (resources.ARB_texture_rectangle)
{ {
if ((compileOptions & SH_DISABLE_ARB_TEXTURE_RECTANGLE) != 0) if (compileOptions & SH_DISABLE_ARB_TEXTURE_RECTANGLE)
{ {
// Remove ARB_texture_rectangle so it can't be enabled by extension directives. // Remove ARB_texture_rectangle so it can't be enabled by extension directives.
extBehavior.erase(TExtension::ARB_texture_rectangle); extBehavior.erase(TExtension::ARB_texture_rectangle);
......
...@@ -372,7 +372,7 @@ OutputHLSL::OutputHLSL(sh::GLenum shaderType, ...@@ -372,7 +372,7 @@ OutputHLSL::OutputHLSL(sh::GLenum shaderType,
new AtomicCounterFunctionHLSL((compileOptions & SH_FORCE_ATOMIC_VALUE_RESOLUTION) != 0); new AtomicCounterFunctionHLSL((compileOptions & SH_FORCE_ATOMIC_VALUE_RESOLUTION) != 0);
unsigned int firstUniformRegister = unsigned int firstUniformRegister =
(compileOptions & SH_SKIP_D3D_CONSTANT_REGISTER_ZERO) != 0 ? 1u : 0u; ((compileOptions & SH_SKIP_D3D_CONSTANT_REGISTER_ZERO) != 0) ? 1u : 0u;
mResourcesHLSL = new ResourcesHLSL(mStructureHLSL, outputType, uniforms, firstUniformRegister); mResourcesHLSL = new ResourcesHLSL(mStructureHLSL, outputType, uniforms, firstUniformRegister);
if (mOutputType == SH_HLSL_3_0_OUTPUT) if (mOutputType == SH_HLSL_3_0_OUTPUT)
...@@ -3204,7 +3204,7 @@ void OutputHLSL::outputTriplet(TInfoSinkBase &out, ...@@ -3204,7 +3204,7 @@ void OutputHLSL::outputTriplet(TInfoSinkBase &out,
void OutputHLSL::outputLineDirective(TInfoSinkBase &out, int line) void OutputHLSL::outputLineDirective(TInfoSinkBase &out, int line)
{ {
if ((mCompileOptions & SH_LINE_DIRECTIVES) != 0 && line > 0) if ((mCompileOptions & SH_LINE_DIRECTIVES) && (line > 0))
{ {
out << "\n"; out << "\n";
out << "#line " << line; out << "#line " << line;
......
...@@ -2651,7 +2651,7 @@ TIntermDeclaration *TParseContext::parseSingleDeclaration( ...@@ -2651,7 +2651,7 @@ TIntermDeclaration *TParseContext::parseSingleDeclaration(
const ImmutableString &identifier) const ImmutableString &identifier)
{ {
TType *type = new TType(publicType); TType *type = new TType(publicType);
if ((mCompileOptions & SH_FLATTEN_PRAGMA_STDGL_INVARIANT_ALL) != 0 && if ((mCompileOptions & SH_FLATTEN_PRAGMA_STDGL_INVARIANT_ALL) &&
mDirectiveHandler.pragma().stdgl.invariantAll) mDirectiveHandler.pragma().stdgl.invariantAll)
{ {
TQualifier qualifier = type->getQualifier(); TQualifier qualifier = type->getQualifier();
......
...@@ -21,7 +21,7 @@ TranslatorESSL::TranslatorESSL(sh::GLenum type, ShShaderSpec spec) ...@@ -21,7 +21,7 @@ TranslatorESSL::TranslatorESSL(sh::GLenum type, ShShaderSpec spec)
void TranslatorESSL::initBuiltInFunctionEmulator(BuiltInFunctionEmulator *emu, void TranslatorESSL::initBuiltInFunctionEmulator(BuiltInFunctionEmulator *emu,
ShCompileOptions compileOptions) ShCompileOptions compileOptions)
{ {
if ((compileOptions & SH_EMULATE_ATAN2_FLOAT_FUNCTION) != 0) if (compileOptions & SH_EMULATE_ATAN2_FLOAT_FUNCTION)
{ {
InitBuiltInAtanFunctionEmulatorForGLSLWorkarounds(emu); InitBuiltInAtanFunctionEmulatorForGLSLWorkarounds(emu);
} }
......
...@@ -25,17 +25,17 @@ TranslatorGLSL::TranslatorGLSL(sh::GLenum type, ShShaderSpec spec, ShShaderOutpu ...@@ -25,17 +25,17 @@ TranslatorGLSL::TranslatorGLSL(sh::GLenum type, ShShaderSpec spec, ShShaderOutpu
void TranslatorGLSL::initBuiltInFunctionEmulator(BuiltInFunctionEmulator *emu, void TranslatorGLSL::initBuiltInFunctionEmulator(BuiltInFunctionEmulator *emu,
ShCompileOptions compileOptions) ShCompileOptions compileOptions)
{ {
if ((compileOptions & SH_EMULATE_ABS_INT_FUNCTION) != 0) if (compileOptions & SH_EMULATE_ABS_INT_FUNCTION)
{ {
InitBuiltInAbsFunctionEmulatorForGLSLWorkarounds(emu, getShaderType()); InitBuiltInAbsFunctionEmulatorForGLSLWorkarounds(emu, getShaderType());
} }
if ((compileOptions & SH_EMULATE_ISNAN_FLOAT_FUNCTION) != 0) if (compileOptions & SH_EMULATE_ISNAN_FLOAT_FUNCTION)
{ {
InitBuiltInIsnanFunctionEmulatorForGLSLWorkarounds(emu, getShaderVersion()); InitBuiltInIsnanFunctionEmulatorForGLSLWorkarounds(emu, getShaderVersion());
} }
if ((compileOptions & SH_EMULATE_ATAN2_FLOAT_FUNCTION) != 0) if (compileOptions & SH_EMULATE_ATAN2_FLOAT_FUNCTION)
{ {
InitBuiltInAtanFunctionEmulatorForGLSLWorkarounds(emu); InitBuiltInAtanFunctionEmulatorForGLSLWorkarounds(emu);
} }
...@@ -234,7 +234,7 @@ bool TranslatorGLSL::shouldFlattenPragmaStdglInvariantAll() ...@@ -234,7 +234,7 @@ bool TranslatorGLSL::shouldFlattenPragmaStdglInvariantAll()
bool TranslatorGLSL::shouldCollectVariables(ShCompileOptions compileOptions) bool TranslatorGLSL::shouldCollectVariables(ShCompileOptions compileOptions)
{ {
return (compileOptions & SH_FLATTEN_PRAGMA_STDGL_INVARIANT_ALL) != 0 || return (compileOptions & SH_FLATTEN_PRAGMA_STDGL_INVARIANT_ALL) ||
TCompiler::shouldCollectVariables(compileOptions); TCompiler::shouldCollectVariables(compileOptions);
} }
......
...@@ -225,7 +225,7 @@ bool TranslatorMetal::translate(TIntermBlock *root, ...@@ -225,7 +225,7 @@ bool TranslatorMetal::translate(TIntermBlock *root,
// Initialize unused varying outputs to avoid spirv-cross dead-code removing them in later // Initialize unused varying outputs to avoid spirv-cross dead-code removing them in later
// stage. Only do this if SH_INIT_OUTPUT_VARIABLES is not specified. // stage. Only do this if SH_INIT_OUTPUT_VARIABLES is not specified.
if ((getShaderType() == GL_VERTEX_SHADER || getShaderType() == GL_GEOMETRY_SHADER_EXT) && if ((getShaderType() == GL_VERTEX_SHADER || getShaderType() == GL_GEOMETRY_SHADER_EXT) &&
(compileOptions & SH_INIT_OUTPUT_VARIABLES) == 0) !(compileOptions & SH_INIT_OUTPUT_VARIABLES))
{ {
InitVariableList list; InitVariableList list;
for (const sh::ShaderVariable &var : mOutputVaryings) for (const sh::ShaderVariable &var : mOutputVaryings)
......
...@@ -542,7 +542,7 @@ ANGLE_NO_DISCARD bool InsertFragCoordCorrection(TCompiler *compiler, ...@@ -542,7 +542,7 @@ ANGLE_NO_DISCARD bool InsertFragCoordCorrection(TCompiler *compiler,
} }
TIntermTyped *fragRotation = nullptr; TIntermTyped *fragRotation = nullptr;
if ((compileOptions & SH_ADD_PRE_ROTATION) != 0) if (compileOptions & SH_ADD_PRE_ROTATION)
{ {
fragRotation = specConst->getFragRotationMatrix(); fragRotation = specConst->getFragRotationMatrix();
if (!fragRotation) if (!fragRotation)
...@@ -784,7 +784,7 @@ bool TranslatorVulkan::translateImpl(TIntermBlock *root, ...@@ -784,7 +784,7 @@ bool TranslatorVulkan::translateImpl(TIntermBlock *root,
bool rewriteStructSamplersResult; bool rewriteStructSamplersResult;
int removedUniformsCount; int removedUniformsCount;
if ((compileOptions & SH_USE_OLD_REWRITE_STRUCT_SAMPLERS) != 0) if (compileOptions & SH_USE_OLD_REWRITE_STRUCT_SAMPLERS)
{ {
rewriteStructSamplersResult = rewriteStructSamplersResult =
RewriteStructSamplersOld(this, root, &getSymbolTable(), &removedUniformsCount); RewriteStructSamplersOld(this, root, &getSymbolTable(), &removedUniformsCount);
...@@ -812,7 +812,7 @@ bool TranslatorVulkan::translateImpl(TIntermBlock *root, ...@@ -812,7 +812,7 @@ bool TranslatorVulkan::translateImpl(TIntermBlock *root,
// Rewrite samplerCubes as sampler2DArrays. This must be done after rewriting struct samplers // Rewrite samplerCubes as sampler2DArrays. This must be done after rewriting struct samplers
// as it doesn't expect that. // as it doesn't expect that.
if ((compileOptions & SH_EMULATE_SEAMFUL_CUBE_MAP_SAMPLING) != 0) if (compileOptions & SH_EMULATE_SEAMFUL_CUBE_MAP_SAMPLING)
{ {
if (!RewriteCubeMapSamplersAs2DArray(this, root, &getSymbolTable(), if (!RewriteCubeMapSamplersAs2DArray(this, root, &getSymbolTable(),
getShaderType() == GL_FRAGMENT_SHADER)) getShaderType() == GL_FRAGMENT_SHADER))
...@@ -925,7 +925,7 @@ bool TranslatorVulkan::translateImpl(TIntermBlock *root, ...@@ -925,7 +925,7 @@ bool TranslatorVulkan::translateImpl(TIntermBlock *root,
if (gl::ShaderTypeSupportsTransformFeedback(packedShaderType)) if (gl::ShaderTypeSupportsTransformFeedback(packedShaderType))
{ {
if ((compileOptions & SH_ADD_VULKAN_XFB_EXTENSION_SUPPORT_CODE) != 0) if (compileOptions & SH_ADD_VULKAN_XFB_EXTENSION_SUPPORT_CODE)
{ {
// Add support code for transform feedback extension. // Add support code for transform feedback extension.
if (!AddXfbExtensionSupport(this, root, &getSymbolTable(), driverUniforms)) if (!AddXfbExtensionSupport(this, root, &getSymbolTable(), driverUniforms))
...@@ -935,7 +935,7 @@ bool TranslatorVulkan::translateImpl(TIntermBlock *root, ...@@ -935,7 +935,7 @@ bool TranslatorVulkan::translateImpl(TIntermBlock *root,
} }
// Append a macro for transform feedback substitution prior to modifying depth. // Append a macro for transform feedback substitution prior to modifying depth.
if ((compileOptions & SH_ADD_VULKAN_XFB_EMULATION_SUPPORT_CODE) != 0) if (compileOptions & SH_ADD_VULKAN_XFB_EMULATION_SUPPORT_CODE)
{ {
if (!AppendTransformFeedbackOutputToMain(this, root, &getSymbolTable())) if (!AppendTransformFeedbackOutputToMain(this, root, &getSymbolTable()))
{ {
...@@ -979,7 +979,7 @@ bool TranslatorVulkan::translateImpl(TIntermBlock *root, ...@@ -979,7 +979,7 @@ bool TranslatorVulkan::translateImpl(TIntermBlock *root,
} }
} }
if ((compileOptions & SH_ADD_BRESENHAM_LINE_RASTER_EMULATION) != 0) if (compileOptions & SH_ADD_BRESENHAM_LINE_RASTER_EMULATION)
{ {
if (!AddBresenhamEmulationFS(this, compileOptions, sink, root, &getSymbolTable(), if (!AddBresenhamEmulationFS(this, compileOptions, sink, root, &getSymbolTable(),
specConst, driverUniforms, usesFragCoord)) specConst, driverUniforms, usesFragCoord))
...@@ -990,7 +990,7 @@ bool TranslatorVulkan::translateImpl(TIntermBlock *root, ...@@ -990,7 +990,7 @@ bool TranslatorVulkan::translateImpl(TIntermBlock *root,
bool hasGLFragColor = false; bool hasGLFragColor = false;
bool hasGLFragData = false; bool hasGLFragData = false;
bool usePreRotation = (compileOptions & SH_ADD_PRE_ROTATION) != 0; bool usePreRotation = compileOptions & SH_ADD_PRE_ROTATION;
bool hasGLSampleMask = false; bool hasGLSampleMask = false;
for (const ShaderVariable &outputVar : mOutputVariables) for (const ShaderVariable &outputVar : mOutputVariables)
...@@ -1105,7 +1105,7 @@ bool TranslatorVulkan::translateImpl(TIntermBlock *root, ...@@ -1105,7 +1105,7 @@ bool TranslatorVulkan::translateImpl(TIntermBlock *root,
case gl::ShaderType::Vertex: case gl::ShaderType::Vertex:
{ {
if ((compileOptions & SH_ADD_BRESENHAM_LINE_RASTER_EMULATION) != 0) if (compileOptions & SH_ADD_BRESENHAM_LINE_RASTER_EMULATION)
{ {
if (!AddBresenhamEmulationVS(this, root, &getSymbolTable(), specConst, if (!AddBresenhamEmulationVS(this, root, &getSymbolTable(), specConst,
driverUniforms)) driverUniforms))
...@@ -1114,7 +1114,7 @@ bool TranslatorVulkan::translateImpl(TIntermBlock *root, ...@@ -1114,7 +1114,7 @@ bool TranslatorVulkan::translateImpl(TIntermBlock *root,
} }
} }
if ((compileOptions & SH_ADD_VULKAN_XFB_EMULATION_SUPPORT_CODE) != 0) if (compileOptions & SH_ADD_VULKAN_XFB_EMULATION_SUPPORT_CODE)
{ {
// Add support code for transform feedback emulation. Only applies to vertex shader // Add support code for transform feedback emulation. Only applies to vertex shader
// as tessellation and geometry shader transform feedback capture require // as tessellation and geometry shader transform feedback capture require
...@@ -1193,7 +1193,7 @@ bool TranslatorVulkan::translate(TIntermBlock *root, ...@@ -1193,7 +1193,7 @@ bool TranslatorVulkan::translate(TIntermBlock *root,
if (!emulatePrecisionIfNeeded(root, sink, &precisionEmulation, SH_GLSL_VULKAN_OUTPUT)) if (!emulatePrecisionIfNeeded(root, sink, &precisionEmulation, SH_GLSL_VULKAN_OUTPUT))
return false; return false;
bool enablePrecision = (compileOptions & SH_IGNORE_PRECISION_QUALIFIERS) == 0; bool enablePrecision = ((compileOptions & SH_IGNORE_PRECISION_QUALIFIERS) == 0);
TOutputVulkanGLSL outputGLSL(sink, getArrayIndexClampingStrategy(), getHashFunction(), TOutputVulkanGLSL outputGLSL(sink, getArrayIndexClampingStrategy(), getHashFunction(),
getNameMap(), &getSymbolTable(), getShaderType(), getNameMap(), &getSymbolTable(), getShaderType(),
...@@ -1202,7 +1202,7 @@ bool TranslatorVulkan::translate(TIntermBlock *root, ...@@ -1202,7 +1202,7 @@ bool TranslatorVulkan::translate(TIntermBlock *root,
SpecConst specConst(&getSymbolTable(), compileOptions); SpecConst specConst(&getSymbolTable(), compileOptions);
if ((compileOptions & SH_USE_SPECIALIZATION_CONSTANT) != 0) if (compileOptions & SH_USE_SPECIALIZATION_CONSTANT)
{ {
DriverUniform driverUniforms; DriverUniform driverUniforms;
if (!translateImpl(root, compileOptions, perfDiagnostics, &specConst, &driverUniforms, if (!translateImpl(root, compileOptions, perfDiagnostics, &specConst, &driverUniforms,
......
...@@ -163,7 +163,7 @@ bool DeclareAndInitBuiltinsForInstancedMultiview(TCompiler *compiler, ...@@ -163,7 +163,7 @@ bool DeclareAndInitBuiltinsForInstancedMultiview(TCompiler *compiler,
// The AST transformation which adds the expression to select the viewport index should // The AST transformation which adds the expression to select the viewport index should
// be done only for the GLSL and ESSL output. // be done only for the GLSL and ESSL output.
const bool selectView = (compileOptions & SH_SELECT_VIEW_IN_NV_GLSL_VERTEX_SHADER) != 0; const bool selectView = (compileOptions & SH_SELECT_VIEW_IN_NV_GLSL_VERTEX_SHADER) != 0u;
// Assert that if the view is selected in the vertex shader, then the output is // Assert that if the view is selected in the vertex shader, then the output is
// either GLSL or ESSL. // either GLSL or ESSL.
ASSERT(!selectView || IsOutputGLSL(shaderOutput) || IsOutputESSL(shaderOutput)); ASSERT(!selectView || IsOutputGLSL(shaderOutput) || IsOutputESSL(shaderOutput));
......
...@@ -270,7 +270,7 @@ void SpecConst::outputLayoutString(TInfoSinkBase &sink) const ...@@ -270,7 +270,7 @@ void SpecConst::outputLayoutString(TInfoSinkBase &sink) const
TIntermSymbol *SpecConst::getLineRasterEmulation() TIntermSymbol *SpecConst::getLineRasterEmulation()
{ {
if ((mCompileOptions & SH_ADD_BRESENHAM_LINE_RASTER_EMULATION) == 0) if (!(mCompileOptions & SH_ADD_BRESENHAM_LINE_RASTER_EMULATION))
{ {
return nullptr; return nullptr;
} }
...@@ -291,7 +291,7 @@ TIntermSymbol *SpecConst::getFlipRotation() ...@@ -291,7 +291,7 @@ TIntermSymbol *SpecConst::getFlipRotation()
TIntermTyped *SpecConst::getMultiplierXForDFdx() TIntermTyped *SpecConst::getMultiplierXForDFdx()
{ {
if ((mCompileOptions & SH_USE_SPECIALIZATION_CONSTANT) == 0) if (!(mCompileOptions & SH_USE_SPECIALIZATION_CONSTANT))
{ {
return nullptr; return nullptr;
} }
...@@ -302,7 +302,7 @@ TIntermTyped *SpecConst::getMultiplierXForDFdx() ...@@ -302,7 +302,7 @@ TIntermTyped *SpecConst::getMultiplierXForDFdx()
TIntermTyped *SpecConst::getMultiplierYForDFdx() TIntermTyped *SpecConst::getMultiplierYForDFdx()
{ {
if ((mCompileOptions & SH_USE_SPECIALIZATION_CONSTANT) == 0) if (!(mCompileOptions & SH_USE_SPECIALIZATION_CONSTANT))
{ {
return nullptr; return nullptr;
} }
...@@ -313,7 +313,7 @@ TIntermTyped *SpecConst::getMultiplierYForDFdx() ...@@ -313,7 +313,7 @@ TIntermTyped *SpecConst::getMultiplierYForDFdx()
TIntermTyped *SpecConst::getMultiplierXForDFdy() TIntermTyped *SpecConst::getMultiplierXForDFdy()
{ {
if ((mCompileOptions & SH_USE_SPECIALIZATION_CONSTANT) == 0) if (!(mCompileOptions & SH_USE_SPECIALIZATION_CONSTANT))
{ {
return nullptr; return nullptr;
} }
...@@ -324,7 +324,7 @@ TIntermTyped *SpecConst::getMultiplierXForDFdy() ...@@ -324,7 +324,7 @@ TIntermTyped *SpecConst::getMultiplierXForDFdy()
TIntermTyped *SpecConst::getMultiplierYForDFdy() TIntermTyped *SpecConst::getMultiplierYForDFdy()
{ {
if ((mCompileOptions & SH_USE_SPECIALIZATION_CONSTANT) == 0) if (!(mCompileOptions & SH_USE_SPECIALIZATION_CONSTANT))
{ {
return nullptr; return nullptr;
} }
...@@ -335,7 +335,7 @@ TIntermTyped *SpecConst::getMultiplierYForDFdy() ...@@ -335,7 +335,7 @@ TIntermTyped *SpecConst::getMultiplierYForDFdy()
TIntermTyped *SpecConst::getFragRotationMatrix() TIntermTyped *SpecConst::getFragRotationMatrix()
{ {
if ((mCompileOptions & SH_USE_SPECIALIZATION_CONSTANT) == 0) if (!(mCompileOptions & SH_USE_SPECIALIZATION_CONSTANT))
{ {
return nullptr; return nullptr;
} }
...@@ -345,7 +345,7 @@ TIntermTyped *SpecConst::getFragRotationMatrix() ...@@ -345,7 +345,7 @@ TIntermTyped *SpecConst::getFragRotationMatrix()
TIntermTyped *SpecConst::getHalfRenderAreaRotationMatrix() TIntermTyped *SpecConst::getHalfRenderAreaRotationMatrix()
{ {
if ((mCompileOptions & SH_USE_SPECIALIZATION_CONSTANT) == 0) if (!(mCompileOptions & SH_USE_SPECIALIZATION_CONSTANT))
{ {
return nullptr; return nullptr;
} }
...@@ -355,7 +355,7 @@ TIntermTyped *SpecConst::getHalfRenderAreaRotationMatrix() ...@@ -355,7 +355,7 @@ TIntermTyped *SpecConst::getHalfRenderAreaRotationMatrix()
TIntermTyped *SpecConst::getFlipXY() TIntermTyped *SpecConst::getFlipXY()
{ {
if ((mCompileOptions & SH_USE_SPECIALIZATION_CONSTANT) == 0) if (!(mCompileOptions & SH_USE_SPECIALIZATION_CONSTANT))
{ {
return nullptr; return nullptr;
} }
...@@ -365,7 +365,7 @@ TIntermTyped *SpecConst::getFlipXY() ...@@ -365,7 +365,7 @@ TIntermTyped *SpecConst::getFlipXY()
TIntermTyped *SpecConst::getNegFlipXY() TIntermTyped *SpecConst::getNegFlipXY()
{ {
if ((mCompileOptions & SH_USE_SPECIALIZATION_CONSTANT) == 0) if (!(mCompileOptions & SH_USE_SPECIALIZATION_CONSTANT))
{ {
return nullptr; return nullptr;
} }
...@@ -375,7 +375,7 @@ TIntermTyped *SpecConst::getNegFlipXY() ...@@ -375,7 +375,7 @@ TIntermTyped *SpecConst::getNegFlipXY()
TIntermTyped *SpecConst::getFlipY() TIntermTyped *SpecConst::getFlipY()
{ {
if ((mCompileOptions & SH_USE_SPECIALIZATION_CONSTANT) == 0) if (!(mCompileOptions & SH_USE_SPECIALIZATION_CONSTANT))
{ {
return nullptr; return nullptr;
} }
...@@ -385,7 +385,7 @@ TIntermTyped *SpecConst::getFlipY() ...@@ -385,7 +385,7 @@ TIntermTyped *SpecConst::getFlipY()
TIntermTyped *SpecConst::getNegFlipY() TIntermTyped *SpecConst::getNegFlipY()
{ {
if ((mCompileOptions & SH_USE_SPECIALIZATION_CONSTANT) == 0) if (!(mCompileOptions & SH_USE_SPECIALIZATION_CONSTANT))
{ {
return nullptr; return nullptr;
} }
...@@ -395,7 +395,7 @@ TIntermTyped *SpecConst::getNegFlipY() ...@@ -395,7 +395,7 @@ TIntermTyped *SpecConst::getNegFlipY()
TIntermTyped *SpecConst::getFragRotationMultiplyFlipXY() TIntermTyped *SpecConst::getFragRotationMultiplyFlipXY()
{ {
if ((mCompileOptions & SH_USE_SPECIALIZATION_CONSTANT) == 0) if (!(mCompileOptions & SH_USE_SPECIALIZATION_CONSTANT))
{ {
return nullptr; return nullptr;
} }
...@@ -443,7 +443,7 @@ TIntermSymbol *SpecConst::getDrawableHeight() ...@@ -443,7 +443,7 @@ TIntermSymbol *SpecConst::getDrawableHeight()
TIntermBinary *SpecConst::getHalfRenderArea() TIntermBinary *SpecConst::getHalfRenderArea()
{ {
if ((mCompileOptions & SH_USE_SPECIALIZATION_CONSTANT) == 0) if (!(mCompileOptions & SH_USE_SPECIALIZATION_CONSTANT))
{ {
return nullptr; return nullptr;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment