src/libANGLE/renderer/gl/renderergl_utils.cpp


Log

Author Commit Date CI Message
Geoff Lang ecc9688d 2015-07-20T15:35:58 When the GL version is below 3.0, use GL_MAX_VARYING_FLOATS. It should be equivalent to GL_MAX_VARYING_COMPONENTS for ES2. BUG=angleproject:1038 Change-Id: Ic2fe6c27a0ebd6259d70f8d28edb7d4bdd5d0c35 Reviewed-on: https://chromium-review.googlesource.com/286526 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 862c0ba4 2015-05-25T15:31:16 Implement the remaining caps queries. Limit the supported ES version based on these caps. BUG=angleproject:879 Change-Id: If3a097576465b33af0015fcb28dab10e88fdc4d9 Reviewed-on: https://chromium-review.googlesource.com/273160 Reviewed-by: Kenneth Russell <kbr@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 08dcfed6 2015-05-25T13:38:42 Encapsulate GL version and standard into a struct and enum. Change-Id: I9f51971c1bfd51424605b2687b5fd107d58c9a67 Reviewed-on: https://chromium-review.googlesource.com/273139 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/273572 Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 51d4f044 2015-05-27T21:10:42 Revert "Encapsulate GL version and standard into a struct and enum." Linux didn't like compiling this. This reverts commit 03f589122ed796060f1345f9ccfc64455c547fef. Change-Id: Ifd0824caeb02791b4acc5e4bca330ecdc8164b11 Reviewed-on: https://chromium-review.googlesource.com/273583 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 03f58912 2015-05-25T13:38:42 Encapsulate GL version and standard into a struct and enum. Change-Id: Ib3c37627298976040d5a333f4c845a7b2620dd30 Reviewed-on: https://chromium-review.googlesource.com/273139 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang f34d1db9 2015-05-20T14:10:46 Add table entries for almost all the remaining GL texture formats. BUG=angleproject:884 BUG=angleproject:967 Change-Id: I113757dd9e1fae8fe0241a7286be979a90891b53 Reviewed-on: https://chromium-review.googlesource.com/270275 Reviewed-by: Brandon Jones <bajones@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/273135
Geoff Lang 859dcb88 2015-05-25T15:12:54 Revert "Add table entries for almost all the remaining GL texture formats." Missing include of <limits> for linux. This reverts commit aa3a5fadebb2bad0be07eb2963a9d23f901c4c49. Change-Id: Iafebfbc6154b4fe3a94e3f8b91b5ff496631c1f1 Reviewed-on: https://chromium-review.googlesource.com/273134 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang aa3a5fad 2015-05-20T14:10:46 Add table entries for almost all the remaining GL texture formats. BUG=angleproject:884 BUG=angleproject:967 Change-Id: I0b05841272f4410c33ee4e4c3654846f07b7c39b Reviewed-on: https://chromium-review.googlesource.com/270275 Reviewed-by: Brandon Jones <bajones@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 8c5aeb6c 2015-05-21T08:17:18 Add some string helper classes. *re-land with build fix for Clang* These helper functions mirror some utilities in Chrome, for splitting strings along whitespace, or reading file contents into a string. Also remove the hack for skipping the doubly-defined GLX header. BUG=angleproject:892,angleproject:998 Change-Id: Ife43fbf5035a3be7820460bea1b26d0e632a4fb0 Reviewed-on: https://chromium-review.googlesource.com/272518 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill a30c78ae 2015-05-21T12:15:43 Revert "Add some string helper classes." Build errors on Clang: FAILED: /b/build/goma/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/third_party/angle/src/common/angle_common.string_utils.o.d -DV8_DEPRECATION_WARNINGS -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0 -DCHROMIUM_BUILD -DCR_CLANG_REVISION=233105-2 -DTOOLKIT_VIEWS=1 -DUSE_LIBJPEG_TURBO=1 -DENABLE_ONE_CLICK_SIGNIN -DENABLE_PRE_SYNC_BACKUP -DENABLE_REMOTING=1 -DENABLE_WEBRTC=1 -DENABLE_MEDIA_ROUTER=1 -DUSE_PROPRIETARY_CODECS -DENABLE_PEPPER_CDMS -DENABLE_CONFIGURATION_POLICY -DENABLE_NOTIFICATIONS -DENABLE_HIDPI=1 -DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE -DDONT_EMBED_BUILD_METADATA -DDCHECK_ALWAYS_ON=1 -DENABLE_TASK_MANAGER=1 -DENABLE_EXTENSIONS=1 -DENABLE_PLUGIN_INSTALLATION=1 -DENABLE_PLUGINS=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_THEMES=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_BACKGROUND=1 -DENABLE_GOOGLE_NOW=1 -DCLD_VERSION=2 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_APP_LIST=1 -DENABLE_SETTINGS_APP=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_SERVICE_DISCOVERY=1 -DENABLE_WIFI_BOOTSTRAPPING=1 -DV8_USE_EXTERNAL_STARTUP_DATA -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DSAFE_BROWSING_SERVICE -DUSE_LIBPCI=1 -DUSE_OPENSSL=1 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -Igen -I../../third_party/angle/src -I../../third_party/angle/include -isysroot /Applications/Xcode5.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -O2 -gdwarf-2 -fvisibility=hidden -Werror -Wnewline-eof -mmacosx-version-min=10.6 -arch x86_64 -Wendif-labels -Wno-unused-parameter -Wno-missing-field-initializers -Wno-selector-type-mismatch -Wpartial-availability -Wheader-hygiene -Wno-char-subscripts -Wno-unneeded-internal-declaration -Wno-covered-switch-default -Wstring-conversion -Wno-c++11-narrowing -Wno-deprecated-register -Wno-inconsistent-missing-override -std=c++11 -fno-rtti -fno-exceptions -fvisibility-inlines-hidden -fno-threadsafe-statics -Xclang -load -Xclang /b/build/slave/GPU_Mac_Builder/build/src/third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib -Xclang -add-plugin -Xclang find-bad-constructs -fcolor-diagnostics -fno-strict-aliasing -c ../../third_party/angle/src/common/string_utils.cpp -o obj/third_party/angle/src/common/angle_common.string_utils.o ../../third_party/angle/src/common/string_utils.cpp:72:19: error: no matching constructor for initialization of 'std::ifstream' (aka 'basic_ifstream<char>') std::ifstream inFile(path); ^ ~~~~ /Applications/Xcode5.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/c++/4.2.1/fstream:465:7: note: candidate constructor not viable: no known conversion from 'const std::string' (aka 'const basic_string<char>') to 'const char *' for 1st argument basic_ifstream(const char* __s, ios_base::openmode __mode = ios_base::in) ^ /Applications/Xcode5.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/c++/4.2.1/bits/fstream.tcc:894:25: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'const std::string' (aka 'const basic_string<char>') to 'const std::basic_ifstream<char>' for 1st argument extern template class basic_ifstream<char>; ^ /Applications/Xcode5.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/c++/4.2.1/fstream:451:7: note: candidate constructor not viable: requires 0 arguments, but 1 was provided basic_ifstream() : __istream_type(), _M_filebuf() ^ 1 error generated. FAILED: /b/build/goma/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/third_party/angle/src/common/angle_unittests.string_utils_unittest.o.d -DV8_DEPRECATION_WARNINGS -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0 -DCHROMIUM_BUILD -DCR_CLANG_REVISION=233105-2 -DTOOLKIT_VIEWS=1 -DUSE_LIBJPEG_TURBO=1 -DENABLE_ONE_CLICK_SIGNIN -DENABLE_PRE_SYNC_BACKUP -DENABLE_REMOTING=1 -DENABLE_WEBRTC=1 -DENABLE_MEDIA_ROUTER=1 -DUSE_PROPRIETARY_CODECS -DENABLE_PEPPER_CDMS -DENABLE_CONFIGURATION_POLICY -DENABLE_NOTIFICATIONS -DENABLE_HIDPI=1 -DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE -DDONT_EMBED_BUILD_METADATA -DDCHECK_ALWAYS_ON=1 -DENABLE_TASK_MANAGER=1 -DENABLE_EXTENSIONS=1 -DENABLE_PLUGIN_INSTALLATION=1 -DENABLE_PLUGINS=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_THEMES=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_BACKGROUND=1 -DENABLE_GOOGLE_NOW=1 -DCLD_VERSION=2 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_APP_LIST=1 -DENABLE_SETTINGS_APP=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_SERVICE_DISCOVERY=1 -DENABLE_WIFI_BOOTSTRAPPING=1 -DV8_USE_EXTERNAL_STARTUP_DATA -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DSAFE_BROWSING_SERVICE -DGTEST_HAS_POSIX_RE=0 -DGTEST_LANG_CXX11=0 -DGL_APICALL= -DGL_GLEXT_PROTOTYPES= -DEGLAPI= '-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ "d3dcompiler_47.dll", "d3dcompiler_46.dll", "d3dcompiler_43.dll" }' -DANGLE_TRANSLATOR_STATIC -DUSE_LIBPCI=1 -DUSE_OPENSSL=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -D_FORTIFY_SOURCE=2 -Igen -I../.. -I../../third_party/angle/include -I../../third_party/angle/src -I../../third_party/angle/src/compiler/preprocessor -I../../third_party/angle/src/tests -Igen/angle -I../../testing/gmock/include -I../../testing/gtest/include -isysroot /Applications/Xcode5.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -O2 -gdwarf-2 -fvisibility=hidden -Werror -Wnewline-eof -mmacosx-version-min=10.6 -arch x86_64 -Wall -Wendif-labels -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-selector-type-mismatch -Wpartial-availability -Wheader-hygiene -Wno-char-subscripts -Wno-unneeded-internal-declaration -Wno-covered-switch-default -Wstring-conversion -Wno-c++11-narrowing -Wno-deprecated-register -Wno-inconsistent-missing-override -std=c++11 -fno-rtti -fno-exceptions -fvisibility-inlines-hidden -fno-threadsafe-statics -Xclang -load -Xclang /b/build/slave/GPU_Mac_Builder/build/src/third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib -Xclang -add-plugin -Xclang find-bad-constructs -fcolor-diagnostics -fno-strict-aliasing -c ../../third_party/angle/src/common/string_utils_unittest.cpp -o obj/third_party/angle/src/common/angle_unittests.string_utils_unittest.o In file included from ../../third_party/angle/src/common/string_utils_unittest.cpp:12: ../../testing/gtest/include/gtest/gtest.h:1481:16: error: comparison of integers of different signs: 'const int' and 'const unsigned int' [-Werror,-Wsign-compare] if (expected == actual) { ~~~~~~~~ ^ ~~~~~~ ../../testing/gtest/include/gtest/gtest.h:1511:12: note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<int, unsigned int>' requested here return CmpHelperEQ(expected_expression, actual_expression, expected, ^ ../../third_party/angle/src/common/string_utils_unittest.cpp:55:5: note: in instantiation of function template specialization 'testing::internal::EqHelper<false>::Compare<int, unsigned int>' requested here EXPECT_EQ(0xBADF00D, uintValue); ^ ../../testing/gtest/include/gtest/gtest.h:2017:67: note: expanded from macro 'EXPECT_EQ' EqHelper<GTEST_IS_NULL_LITERAL_(expected)>::Compare, \ ^ ../../testing/gtest/include/gtest/gtest_pred_impl.h:162:23: note: expanded from macro 'EXPECT_PRED_FORMAT2' GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_NONFATAL_FAILURE_) ^ ../../testing/gtest/include/gtest/gtest_pred_impl.h:147:17: note: expanded from macro 'GTEST_PRED_FORMAT2_' GTEST_ASSERT_(pred_format(#v1, #v2, v1, v2), \ ^ ../../testing/gtest/include/gtest/gtest_pred_impl.h:77:52: note: expanded from macro 'GTEST_ASSERT_' if (const ::testing::AssertionResult gtest_ar = (expression)) \ ^ BUG=angleproject:892,angleproject:998 This reverts commit fa5fb6f1ef685af316b320530ffbb425bb63446e. Change-Id: I949debbd365926301ec19225f262484fa3b8e13b Reviewed-on: https://chromium-review.googlesource.com/272548 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill fa5fb6f1 2015-05-20T16:13:48 Add some string helper classes. These helper functions mirror some utilities in Chrome, for splitting strings along whitespace, or reading file contents into a string. Also remove the hack for skipping the doubly-defined GLX header. BUG=angleproject:892,angleproject:998 Change-Id: Ie617be7e02c2ccc684028500aabb54561c9c6c14 Reviewed-on: https://chromium-review.googlesource.com/272436 Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 4f691690 2015-05-19T13:40:28 FunctionsGLX: Remove all but one of the ANGLE dependencies A follow-up CL will make it so the dependencies on TokenizeExtensionString doesn't pull the GL headers, this will then allow use to remove the hack for the inclusion of glx.h BUG=angleproject:892 Change-Id: I51c5466617057e2c580bd5e8056307515bcecc4b Reviewed-on: https://chromium-review.googlesource.com/272206 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 0e201cb7 2015-05-04T15:02:57 Load the blit framebuffer extension entry points. Change-Id: I654f944aea25661d3fb1e2381b93780771300f32 Reviewed-on: https://chromium-review.googlesource.com/269144 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez 94b3a078 2015-05-05T17:00:07 Factor GL extension parsing in renderergl_utils.cpp DisplayGLX will use it for the GLX extensions too. BUG=angleproject:892 Change-Id: I5e4f80776a558fcdcc7e7b83767145112bcfee98 Reviewed-on: https://chromium-review.googlesource.com/269461 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang b11ad26b 2015-04-09T14:43:34 Implement FenceNVGL. BUG=angleproject:888 Change-Id: Iea6993fe5459cf829f4bd23b0df5e223f22903f5 Reviewed-on: https://chromium-review.googlesource.com/264989 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang a4903b70 2015-03-02T16:02:48 Support multisampled framebuffers with the GL backend. Move validation of sample counts into the Renderbuffer implementations because the exact supported sample counts are not always known. BUG=angleoproject:886 Change-Id: I9c90d9d435e940b852343a29a6aa11d6cb1ad23b Reviewed-on: https://chromium-review.googlesource.com/255513 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang def624bc 2015-04-13T10:46:56 Move maxSamples from Extensions to Caps because it is an ES3 limit. BUG=angleproject:886 Change-Id: Ibcfc2f06e8308e2e6eb1a6c38206b803f689d7af Reviewed-on: https://chromium-review.googlesource.com/265470 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 8a6f19d7 2015-04-02T15:57:55 Add support for GL_OES_fbo_render_mipmap with OpenGL. BUG=angle:905 Change-Id: Idde35172cfa495c8b74b961f4ab8c4e657653074 Reviewed-on: https://chromium-review.googlesource.com/263763 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang dab84368 2015-03-02T15:43:57 Add texture format utilities for GL and generate GL texture caps. BUG=angleproject:884 Change-Id: Ib1b13f59a6b21399c4b35695c704c369f572914e Reviewed-on: https://chromium-review.googlesource.com/264399 Tested-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang d16daa29 2015-04-07T19:27:57 Revert "Add texture format utilities for GL and generate GL texture caps." This reverts commit 69bde01adf1f9d94cb1ea91c2902267ef3340f02. Change-Id: If21c22e91cf5d72364839bbcc21cb83901a3f2cd Reviewed-on: https://chromium-review.googlesource.com/264418 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 69bde01a 2015-03-02T15:43:57 Add texture format utilities for GL and generate GL texture caps. BUG=angleproject:884 Change-Id: Iba0108b22e6a404842ec1013d22c00d206c865d3 Reviewed-on: https://chromium-review.googlesource.com/255512 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Maks Naumov f1bd2d90 2015-03-30T22:36:04 Fix maxVertexUniformComponents initialization in GenerateCaps() Change-Id: Ie10398e148dc0b88e5d7a5330307dc49553c6665 Reviewed-on: https://chromium-review.googlesource.com/263092 Tested-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang cd69f1c9 2015-03-18T14:33:23 Implement RenderbufferGL. BUG=angleproject:886 Change-Id: I7480943d678b2cdf6e997c3f8316acdef32f5f0d Reviewed-on: https://chromium-review.googlesource.com/260889 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 4ad1709f 2015-03-10T16:47:44 Implement FramebufferGL. BUG=angleproject:885 Change-Id: Ifb5818f185236c671cd7f20ed352edb887b49675 Reviewed-on: https://chromium-review.googlesource.com/258420 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jacek Caban e842eabd 2015-03-26T16:50:35 Fixed compilation with mingw. Change-Id: I027cedc383efbd215e55a7ddf4e41eb1c368a1ae Reviewed-on: https://chromium-review.googlesource.com/262590 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jacek Caban <cjacek@gmail.com>
Geoff Lang c05f7065 2015-03-10T09:50:57 TextureGL implementation. BUG=angleproject:884 Change-Id: I877c0a9f753dacff96bbb82486bee71d1996ecb7 Reviewed-on: https://chromium-review.googlesource.com/252982 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang ddc7446d 2015-02-25T11:48:09 Move RendererGL caps generation to renderergl_utils. Change-Id: Ia385fc9739174472d698367e2c6093ba1963b1fe Reviewed-on: https://chromium-review.googlesource.com/253634 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>