Hash :
5a7356ae
Author :
Date :
2020-01-16T23:22:31
Add support for non-float mix The non-float variations of the mix builtin were conditioned to desktop GLSL, but they are present in ESSL 3.1+. This change also implements constant folding of these builtins as exercised by dEQP. Bug: angleproject:4300 Change-Id: Iec34de4cf370e00d67fd605148cd7848f9e122f8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2006809 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
// GENERATED FILE - DO NOT EDIT.
// Generated by gen_builtin_symbols.py using data from builtin_variables.json and
// builtin_function_declarations.txt.
//
// Copyright 2020 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// ParseContext_ESSL_autogen.h:
// Helpers for built-in related checks.
#ifndef COMPILER_TRANSLATOR_PARSECONTEXT_AUTOGEN_H_
#define COMPILER_TRANSLATOR_PARSECONTEXT_AUTOGEN_H_
namespace sh
{
namespace BuiltInGroup
{
bool isTextureOffsetNoBias(const TFunction *func)
{
int id = func->uniqueId().get();
return id >= 3058 && id <= 3127;
}
bool isTextureOffsetBias(const TFunction *func)
{
int id = func->uniqueId().get();
return id >= 3128 && id <= 3147;
}
bool isTextureGatherOffsetsComp(const TFunction *func)
{
int id = func->uniqueId().get();
return id >= 3185 && id <= 3197;
}
bool isTextureGatherOffsetsNoComp(const TFunction *func)
{
int id = func->uniqueId().get();
return id >= 3198 && id <= 3213;
}
bool isTextureGatherOffsets(const TFunction *func)
{
int id = func->uniqueId().get();
return id >= 3185 && id <= 3213;
}
bool isTextureGatherOffsetComp(const TFunction *func)
{
int id = func->uniqueId().get();
return id >= 3214 && id <= 3219;
}
bool isTextureGatherOffsetNoComp(const TFunction *func)
{
int id = func->uniqueId().get();
return id >= 3220 && id <= 3227;
}
bool isTextureGatherOffset(const TFunction *func)
{
int id = func->uniqueId().get();
return id >= 3214 && id <= 3227;
}
bool isTextureGather(const TFunction *func)
{
int id = func->uniqueId().get();
return id >= 3161 && id <= 3227;
}
bool isAtomicMemory(const TFunction *func)
{
int id = func->uniqueId().get();
return id >= 3244 && id <= 3261;
}
bool isImageLoad(const TFunction *func)
{
int id = func->uniqueId().get();
return id >= 3286 && id <= 3297;
}
bool isImageStore(const TFunction *func)
{
int id = func->uniqueId().get();
return id >= 3298 && id <= 3309;
}
bool isImage(const TFunction *func)
{
int id = func->uniqueId().get();
return id >= 3262 && id <= 3309;
}
} // namespace BuiltInGroup
} // namespace sh
#endif // COMPILER_TRANSLATOR_PARSECONTEXT_AUTOGEN_H_