OSDN Git Service

Support for gl_MaxDrawBuffers in OpenGL ES 3.0
authorAlexis Hetu <sugoi@google.com>
Mon, 30 Oct 2017 18:21:12 +0000 (14:21 -0400)
committerAlexis Hétu <sugoi@google.com>
Mon, 30 Oct 2017 18:37:44 +0000 (18:37 +0000)
gl_MaxDrawBuffers is still available in OpenGL ES 3.0.
It was just a matter of making it part of the common builtins.

Change-Id: Icd3ca9f4f50cba43c345974ef72603800155a573
Reviewed-on: https://swiftshader-review.googlesource.com/13389
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
src/OpenGL/compiler/Initialize.cpp

index c374531..7e7667d 100644 (file)
@@ -441,8 +441,8 @@ void InsertBuiltInFunctions(GLenum type, const ShBuiltInResources &resources, TS
        symbolTable.insertConstInt(COMMON_BUILTINS, "gl_MaxCombinedTextureImageUnits", resources.MaxCombinedTextureImageUnits);
        symbolTable.insertConstInt(COMMON_BUILTINS, "gl_MaxTextureImageUnits", resources.MaxTextureImageUnits);
        symbolTable.insertConstInt(COMMON_BUILTINS, "gl_MaxFragmentUniformVectors", resources.MaxFragmentUniformVectors);
+       symbolTable.insertConstInt(COMMON_BUILTINS, "gl_MaxDrawBuffers", resources.MaxDrawBuffers);
        symbolTable.insertConstInt(ESSL1_BUILTINS, "gl_MaxVaryingVectors", resources.MaxVaryingVectors);
-       symbolTable.insertConstInt(ESSL1_BUILTINS, "gl_MaxDrawBuffers", resources.MaxDrawBuffers);
        symbolTable.insertConstInt(ESSL3_BUILTINS, "gl_MaxVertexOutputVectors", resources.MaxVertexOutputVectors);
        symbolTable.insertConstInt(ESSL3_BUILTINS, "gl_MaxFragmentInputVectors", resources.MaxFragmentInputVectors);
        symbolTable.insertConstInt(ESSL3_BUILTINS, "gl_MinProgramTexelOffset", resources.MinProgramTexelOffset);