Hash :
5e0a8f9b
Author :
Date :
2021-01-27T13:46:08
Translator: Enable geometry and tessellation in ES3.2 Symbols that these extensions introduced were only accepted if the extension directive was present. This is not necessary for es 320 shaders. This change adds a new tag to builtin variable and function declarations in the translator, namely "essl_extension_becomes_core_in" which makes gen_builtin_symbols.py automatically create two entries for the builtin; one with the specified level and extension, one with the core level and without extension. Entries in builtin_function_declarations.txt can potentially be deduplicated as a follow up to take advantage of this tag, though likely an anologous "glsl_extension_becomes_core_in" needs to be introduced. Bug: angleproject:5557 Bug: angleproject:5579 Change-Id: I84c19f48a3ccc89d82d80a4f35f7833205bbc88f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2649449 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
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 92 93 94 95 96 97 98 99 100 101
// 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 >= 3794 && id <= 3863;
}
bool isTextureOffsetBias(const TFunction *func)
{
int id = func->uniqueId().get();
return id >= 3864 && id <= 3883;
}
bool isTextureGatherOffsetsComp(const TFunction *func)
{
int id = func->uniqueId().get();
return id >= 3921 && id <= 3933;
}
bool isTextureGatherOffsetsNoComp(const TFunction *func)
{
int id = func->uniqueId().get();
return id >= 3934 && id <= 3949;
}
bool isTextureGatherOffsets(const TFunction *func)
{
int id = func->uniqueId().get();
return id >= 3921 && id <= 3949;
}
bool isTextureGatherOffsetComp(const TFunction *func)
{
int id = func->uniqueId().get();
return id >= 3950 && id <= 3955;
}
bool isTextureGatherOffsetNoComp(const TFunction *func)
{
int id = func->uniqueId().get();
return id >= 3956 && id <= 3963;
}
bool isTextureGatherOffset(const TFunction *func)
{
int id = func->uniqueId().get();
return id >= 3950 && id <= 3963;
}
bool isTextureGather(const TFunction *func)
{
int id = func->uniqueId().get();
return id >= 3897 && id <= 3963;
}
bool isInterpolationFS(const TFunction *func)
{
int id = func->uniqueId().get();
return id >= 3976 && id <= 3999;
}
bool isAtomicMemory(const TFunction *func)
{
int id = func->uniqueId().get();
return id >= 4004 && id <= 4021;
}
bool isImageLoad(const TFunction *func)
{
int id = func->uniqueId().get();
return id >= 4058 && id <= 4075;
}
bool isImageAtomic(const TFunction *func)
{
int id = func->uniqueId().get();
return id >= 4076 && id <= 4651;
}
bool isImageStore(const TFunction *func)
{
int id = func->uniqueId().get();
return id >= 4652 && id <= 4669;
}
bool isImage(const TFunction *func)
{
int id = func->uniqueId().get();
return id >= 4022 && id <= 4669;
}
} // namespace BuiltInGroup
} // namespace sh
#endif // COMPILER_TRANSLATOR_PARSECONTEXT_AUTOGEN_H_