зеркало из https://github.com/AvaloniaUI/angle.git
Translator: Remove the SH_VALIDATE flag
The SH_VALIDATE flag is a noop, defined as zero (0). Also move option descriptions up in the file. Bug: angleproject:6501 Change-Id: I898106eb68b4508d8f94534cbff66652a69f4f3e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3207360 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
This commit is contained in:
Родитель
fe943910e8
Коммит
4ca3d7d643
|
@ -82,8 +82,19 @@ enum ShShaderOutput
|
|||
// Compile options.
|
||||
// The Compile options type is defined in ShaderVars.h, to allow ANGLE to import the ShaderVars
|
||||
// header without needing the ShaderLang header. This avoids some conflicts with glslang.
|
||||
|
||||
const ShCompileOptions SH_VALIDATE = 0;
|
||||
// SH_VALIDATE_LOOP_INDEXING: Validates loop and indexing in the shader to
|
||||
// ensure that they do not exceed the minimum
|
||||
// functionality mandated in GLSL 1.0 spec,
|
||||
// Appendix A, Section 4 and 5.
|
||||
// There is no need to specify this parameter when
|
||||
// compiling for WebGL - it is implied.
|
||||
// SH_OBJECT_CODE: Translates intermediate tree to glsl or hlsl shader, or SPIR-V binary.
|
||||
// Can be queried by calling sh::GetObjectCode().
|
||||
// SH_VARIABLES: Extracts attributes, uniforms, and varyings.
|
||||
// Can be queried by calling ShGetVariableInfo().
|
||||
// SH_LINE_DIRECTIVES: Emits #line directives in HLSL.
|
||||
// SH_SOURCE_PATH: Tracks the source path for shaders.
|
||||
// Can be queried with getSourcePath().
|
||||
const ShCompileOptions SH_VALIDATE_LOOP_INDEXING = UINT64_C(1) << 0;
|
||||
const ShCompileOptions SH_INTERMEDIATE_TREE = UINT64_C(1) << 1;
|
||||
const ShCompileOptions SH_OBJECT_CODE = UINT64_C(1) << 2;
|
||||
|
@ -645,22 +656,7 @@ void Destruct(ShHandle handle);
|
|||
// shaderStrings: Specifies an array of pointers to null-terminated strings containing the shader
|
||||
// source code.
|
||||
// numStrings: Specifies the number of elements in shaderStrings array.
|
||||
// compileOptions: A mask containing the following parameters:
|
||||
// SH_VALIDATE: Validates shader to ensure that it conforms to the spec
|
||||
// specified during compiler construction.
|
||||
// SH_VALIDATE_LOOP_INDEXING: Validates loop and indexing in the shader to
|
||||
// ensure that they do not exceed the minimum
|
||||
// functionality mandated in GLSL 1.0 spec,
|
||||
// Appendix A, Section 4 and 5.
|
||||
// There is no need to specify this parameter when
|
||||
// compiling for WebGL - it is implied.
|
||||
// SH_INTERMEDIATE_TREE: Writes intermediate tree to info log.
|
||||
// Can be queried by calling sh::GetInfoLog().
|
||||
// SH_OBJECT_CODE: Translates intermediate tree to glsl or hlsl shader, or SPIR-V binary.
|
||||
// Can be queried by calling sh::GetObjectCode().
|
||||
// SH_VARIABLES: Extracts attributes, uniforms, and varyings.
|
||||
// Can be queried by calling ShGetVariableInfo().
|
||||
//
|
||||
// compileOptions: A mask of compile options defined above.
|
||||
bool Compile(const ShHandle handle,
|
||||
const char *const shaderStrings[],
|
||||
size_t numStrings,
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace
|
|||
|
||||
// Options supported by any output
|
||||
constexpr ShCompileOptions kCommonOptions =
|
||||
SH_VALIDATE | SH_VALIDATE_LOOP_INDEXING | SH_INTERMEDIATE_TREE | SH_OBJECT_CODE | SH_VARIABLES |
|
||||
SH_VALIDATE_LOOP_INDEXING | SH_INTERMEDIATE_TREE | SH_OBJECT_CODE | SH_VARIABLES |
|
||||
SH_LINE_DIRECTIVES | SH_SOURCE_PATH | SH_REMOVE_INVARIANT_AND_CENTROID_FOR_ESSL3 |
|
||||
SH_EMULATE_ABS_INT_FUNCTION | SH_ENFORCE_PACKING_RESTRICTIONS | SH_CLAMP_INDIRECT_ARRAY_BOUNDS |
|
||||
SH_LIMIT_EXPRESSION_COMPLEXITY | SH_LIMIT_CALL_STACK_DEPTH | SH_INIT_GL_POSITION |
|
||||
|
|
Загрузка…
Ссылка в новой задаче