src/libANGLE


Log

Author Commit Date CI Message
Corentin Wallez e3b10e8d 2015-05-20T11:06:25 Make eglMakeCurrent validate for config compatibility See section 2.2 of the EGL 1.5 specification. BUG=angleproject:892 Change-Id: I2a43260e53cb045b2e06b0e50915e228cec96f33 Reviewed-on: https://chromium-review.googlesource.com/272370 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 3e589ea6 2015-04-21T10:35:04 Load texture storage extension entry points in RendererGL. BUG=angleproject:884 Change-Id: Iaef596337f9c4d781fb93f517c8f605d119136fb Reviewed-on: https://chromium-review.googlesource.com/266599 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/272746 Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang c76dc21a 2015-05-22T15:21:48 Revert "Load texture storage extension entry points in RendererGL." This reverts commit 5ec636f67cb65438b71ca46375fa45e33eb2e4ba. Change-Id: I68b87279f08e558948216630259349e4db8481d7 Reviewed-on: https://chromium-review.googlesource.com/272785 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 5ec636f6 2015-04-21T10:35:04 Load texture storage extension entry points in RendererGL. BUG=angleproject:884 Change-Id: I30e688ca4304b0a0a1c939edee95d75faf8e8485 Reviewed-on: https://chromium-review.googlesource.com/266599 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez 2f9455e3 2015-05-20T16:43:57 Fix -Winconsistent-override in Mock classes Gmock defines virtual functions without the override keyword so the constructors using override here caused a warning. BUG=angleproject:892 Change-Id: I2a8f0445aa4a1e09694b7f98a6da07f8abaa47fb Reviewed-on: https://chromium-review.googlesource.com/272551 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez f68fd9c4 2015-05-19T16:41:44 Revert "Revert "Call XSync in the GLX EGL impl if we have a new X server connection"" This reverts commit 9c0a421858162673f4232d37bf8c5e2459ec28ea. Change-Id: Ia543daebc240b81950e21930895a7e24ed9f7a1b Reviewed-on: https://chromium-review.googlesource.com/272225 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Corentin Wallez <cwallez@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>
Geoff Lang 42c98f6b 2015-05-20T14:09:25 Handle compressed texture formats in the emulated TextureStorage for TextureGL. BUG=angleproject:884 Change-Id: Id54d9ff2845af52807161e0b589d8b76cfba412d Reviewed-on: https://chromium-review.googlesource.com/272424 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 8509d86e 2015-05-20T14:06:13 Pipe the imageSize parameter from the entry point to avoid recomputation. BUG=angleproject:884 Change-Id: Ic4d5bdc5b65ebcb8c57b960e84708e945db0276a Reviewed-on: https://chromium-review.googlesource.com/272422 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Geoff Lang <geofflang@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>
Jamie Madill b106fac5 2015-05-21T01:30:17 Revert "In D3D11 with DXGI1.2, use B5G6R5 for GL_RGB565" Causing a failure in the end2end_test (in Debug): ClearTest.ClearIssue/1 Renderer11::createRenderTarget returns unsupported when trying to create a BGR565 texture. BUG=angleproject:1002 This reverts commit 72a31d66e9f2b6bd0beff57af5278ef1348d09bd. Change-Id: I9e052c78517abbcb22a678a949fdb81d6ba67eb7 Reviewed-on: https://chromium-review.googlesource.com/272543 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Austin Kinross 72a31d66 2015-05-20T21:23:49 In D3D11 with DXGI1.2, use B5G6R5 for GL_RGB565 *re-land with build fix* BUG=angleproject:1002 Change-Id: Ic1d8ea23dc1bf56e713e5d991ab9edd48978d3d7 Reviewed-on: https://chromium-review.googlesource.com/272515 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill a86a607f 2015-05-21T01:22:22 Revert "In D3D11 with DXGI1.2, use B5G6R5 for GL_RGB565" Build break on Windows due to a rebase conflict (relocated header) 24>..\..\src\tests\gl_tests\SixteenBppTextureTest.cpp(9): fatal error C1083: Cannot open include file: 'end2end_tests/ANGLETest.h': No such file or directory BUG=angleproject:1002 This reverts commit 5224926d11de22e6f0043d6b25ace7d3c4b60b28. Change-Id: I4ed4e918ca5bcd85367ed3e364e29039fcdf5619 Reviewed-on: https://chromium-review.googlesource.com/272542 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Austin Kinross 5224926d 2015-05-14T16:48:34 In D3D11 with DXGI1.2, use B5G6R5 for GL_RGB565 BUG=angleproject:1002 Change-Id: I13dfe218fd9dce6581843d7fab33ce482187e351 Reviewed-on: https://chromium-review.googlesource.com/270771 Tested-by: Austin Kinross <aukinros@microsoft.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 10b7f46a 2015-05-20T14:03:14 Determine packed depth stencil extension support automatically. BUG=angleproject:884 Change-Id: If2b8fd94b0354449ba7e629606d7b1b2c2430fd1 Reviewed-on: https://chromium-review.googlesource.com/272421 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez d229ea6a 2015-05-19T17:31:35 Write the single/double buffer investigation results BUG=angleproject:892 Change-Id: I163e3b674cdb5357cfaf31305f4776dc4c895af1 Reviewed-on: https://chromium-review.googlesource.com/272228 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill bb714f72 2015-05-20T10:22:18 Release egl::Surface on Texture image changes. We would get into a broken state if the user would bind a Texture to an egl::Surface, then change the Texture. This is valid in egl, and should release the Surface when it happens. BUG=485543 Change-Id: Idfaa305ac704f2bc579e79be816e88a23e69351b Reviewed-on: https://chromium-review.googlesource.com/271986 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez a588ef5b 2015-05-19T16:38:47 Fix most occurences of -Winconsistent-missing-override Other occurences are in code generated by macro in googlemock. BUG=angleproject:892 Change-Id: I8b2c6ad4b793be2d9a440687b1b010c9feb8bdae Reviewed-on: https://chromium-review.googlesource.com/272224 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Corentin Wallez <cwallez@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>
Corentin Wallez 3cd0ca3c 2015-05-15T15:05:18 Completely isolate GLX in FunctionsGLX This makes it so it is the only file including glx.h. BUG=angleproject:892 Change-Id: I5c45b659ec102b7a2c92e010a6843fa21b7c664b Reviewed-on: https://chromium-review.googlesource.com/271418 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Austin Kinross 08a5fedd 2015-05-19T15:58:00 In D3D11, return 0 if not conformant, rather than GL_NONE Change-Id: Ica6484d1b5960f162ad88648ff9b2b9b96710930 Reviewed-on: https://chromium-review.googlesource.com/272166 Tested-by: Austin Kinross <aukinros@microsoft.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Austin Kinross 3f65f2e9 2015-05-14T16:46:20 Combine D3D11 FL10_0+ and FL9_3 format support tables BUG=angleproject:1002 Change-Id: I4305db01c0ca40fd0ccf0dd441744b6184d5e945 Reviewed-on: https://chromium-review.googlesource.com/270770 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Austin Kinross <aukinros@microsoft.com>
Austin Kinross 0ab152ab 2015-05-14T16:30:31 Combine D3D11 FL10_0+ and FL9_3 LoadFunctionMaps BUG=angleproject:1002 A 'LoadFunction' is used to load data of a given <GL format, GL type> pair into a specific DXGI_FORMAT. Before this change, BuildD3D11LoadFunctionMap mapped <GL format, GL type> pairs to LoadFunctions. This meant each <GL format, GL type> pair could only loaded using one LoadFunction, and therefore could only be loaded into one specific DXGI_FORMAT. We now want to map <GL format, GL type, DXGI_FORMAT> triples to LoadFunctions. This allows us to use different DXGI_FORMATS for each <GL format, GL type> pair, depending on the capabilities of the underlying D3D11 device. Change-Id: I3b5e24c4bf98f18360ddd45b2022a90b5000f866 Reviewed-on: https://chromium-review.googlesource.com/270561 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Austin Kinross <aukinros@microsoft.com>
Corentin Wallez 9ce754eb 2015-05-15T13:22:40 DisplayGLX: rework the GLXFBConfig selection This allows us to return multiple EGL configs, in particular we can have configs with no depth-stencil buffer. Also includes a description of the investigation I did for this patch. BUG=angleproject:892 Change-Id: I921e254e91e818396dd4c9bd0ee2a43b00a043b9 Reviewed-on: https://chromium-review.googlesource.com/271426 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez f0fce530 2015-05-15T11:25:17 eglGetConfigAttrib: handle EGL_NATIVE_VISUAL_ID BUG=angleproject:892 Change-Id: Idf5496de7006f8fd0658e9d40a4f16dba00d90ea Reviewed-on: https://chromium-review.googlesource.com/271473 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez bc99bb6b 2015-05-14T17:42:20 Enable more warnings on GCC and clang BUG=angleproject:892 Change-Id: I74ca341f29b245f698d1e1ad43149a91db46817f Reviewed-on: https://chromium-review.googlesource.com/271411 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill fb074dd8 2015-05-19T12:34:35 Revert "Clear image descs on Impl errors." Didn't fix the crash, and the crash experiment is complete. BUG=485543 This reverts commit 9674850737bd3e7f44fdc9d1ddc42fffd76f2997. Change-Id: If7d97901b87506bf306ab5558575d0413c76cb68 Reviewed-on: https://chromium-review.googlesource.com/272150 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 8befcff5 2015-05-15T13:21:10 WindowSurfaceGLX: set the border pixel attribute This is so we can use a different visual depth than our parent window so that we can create a subwindow whichever the parent's visual. BUG=angleproject:892 Change-Id: I9bab676761b1f80fad1599adb8e97a3ec710f67f Reviewed-on: https://chromium-review.googlesource.com/271425 Reviewed-by: Kenneth Russell <kbr@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Sunny Sachanandani d176dbd7 2015-05-07T16:25:51 Enable postSubBuffer on D3D11 with DXGI 1.2. BUG=147291 Change-Id: Iafddb83b4949168f1c59272a99ae0244d86ce3f9 Reviewed-on: https://chromium-review.googlesource.com/270572 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Sunny Sachanandani <sunnyps@chromium.org>
Zhenyao Mo 9c0a4218 2015-05-15T17:24:47 Revert "Call XSync in the GLX EGL impl if we have a new X server connection" broke linux builders This reverts commit cedb8ca27f97d3101a22f586671a4668bf09bbec. Change-Id: I57143ec207b454bce7498a4d33f6d54464b55ab8 Reviewed-on: https://chromium-review.googlesource.com/271424 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Tested-by: Zhenyao Mo <zmo@chromium.org>
Corentin Wallez cedb8ca2 2015-05-14T13:28:42 Call XSync in the GLX EGL impl if we have a new X server connection This prevents races between the application's connection and ANGLE's one that could lead to X errors crashing the program. BUG=angleproject:892 Change-Id: Ic09462e76724d1a32c35b32708de97258d99241c Reviewed-on: https://chromium-review.googlesource.com/271178 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 96748507 2015-05-11T10:06:12 Clear image descs on Impl errors. This is a speculative fix for a possible crash, when we could get out-of-sync between the Impl and the GL state. BUG=485543 Change-Id: Id26475f1aae7da05b5ffd802c4a7600e21b40315 Reviewed-on: https://chromium-review.googlesource.com/270194 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 14e95b38 2015-05-07T10:10:41 translator: Reject shaders that use both FragColor+FragData. *re-land with fix for unused var in release* We checked this at link time in the D3D back-end, but this restriction applies to all shaders. TEST=dEQP-GLES2.functional.shaders.fragdata.* BUG=angleproject:995 BUG=478572 Change-Id: I63258f4de47e658812822f31601cc235f48c0826 Reviewed-on: https://chromium-review.googlesource.com/271470 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Olli Etuaho 531e3d22 2015-05-15T11:01:27 Revert "translator: Reject shaders that use both FragColor+FragData." The change introduced a warning in Windows release build. This reverts commit b8e3a568bbd16fca1099a1b54cd82a981cd88a8e. Change-Id: I77bbc35876043c9a164aa2665965f5189ee90052 Reviewed-on: https://chromium-review.googlesource.com/271430 Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Corentin Wallez d64a38b3 2015-05-14T13:03:31 FunctionsGLX: add support for glXWaitX/GL The functions are not used in the code but are useful during development to try to see where race condition with the X server are. BUG=angleproject:892 Change-Id: Ie1267e46ac251bd9ac62e2a146db68ad84644fb8 Reviewed-on: https://chromium-review.googlesource.com/271177 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 582173d9 2015-05-13T15:51:28 FunctionsGLX: make most functions take the display implicitly In later CLs FunctionsGLX will need to store the X display so we take advantage of it to reduce the verbosity of the other GLX files slightly. BUG=angleproject:892 Change-Id: I42ea00d0a37055e5e0752a860978b8ef5afb7a0b Reviewed-on: https://chromium-review.googlesource.com/271163 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill b8e3a568 2015-05-07T10:10:41 translator: Reject shaders that use both FragColor+FragData. We checked this at link time in the D3D back-end, but this restriction applies to all shaders. TEST=dEQP-GLES2.functional.shaders.fragdata.* BUG=angleproject:995 BUG=478572 Change-Id: I99111cc6aa05b9352693f9c3b5bc70d56c9842d4 Reviewed-on: https://chromium-review.googlesource.com/269846 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 558d5eb4 2015-05-14T11:49:13 Use a sparse histogram for D3D11CreateDevice errors. This avoid us needing to capture an enum value for every possible error code. Leave the existing enum values in for now. BUG=477701 Change-Id: Iccaa4d9b732fe4d56432e17578421cba11bcf9ce Reviewed-on: https://chromium-review.googlesource.com/271159 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 72537ef1 2015-05-14T10:16:08 Add collection of D3D11 and DXGI stats. Will require a chromium-side patch to enable boolean histograms. BUG=angleproject:966 BUG=436191 Change-Id: I3026c73894fbbff521503b377955816a8e831df8 Reviewed-on: https://chromium-review.googlesource.com/271174 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill e897cecf 2015-05-14T15:50:41 Revert "Add more D3D11 init errors to stats collection." Going to rework this in favor of a sparse histogram. BUG=477701 This reverts commit c5146c762a5c4fa3df522593f4084767b3d71583. Change-Id: I88ba7b461a1de04324a6ebe164037ea9081f2239 Reviewed-on: https://chromium-review.googlesource.com/271155 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Austin Kinross ba8a0bf8 2015-05-13T09:48:59 Add plumbing for D3D11 device caps BUG=angleproject:1002 Change-Id: Id24783c75377ea92a73a43f2605693e07f63dc15 Reviewed-on: https://chromium-review.googlesource.com/270545 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Austin Kinross <aukinros@microsoft.com>
Jamie Madill c5146c76 2015-05-12T11:00:47 Add more D3D11 init errors to stats collection. We ran into the UNSUPPORTED value when looking at D3D11 on a VM. It's quite possible that systems which don't support D3D11 return this value when initialization fails. Also add a few more severe errors such as device removed. BUG=477701 Change-Id: I2ebbfff5f7eed6fe3939dea86b25845a748caedc Reviewed-on: https://chromium-review.googlesource.com/270346 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 6cd03cf9 2015-05-12T19:28:10 Revert "Create a child window in SurfaceD3D when needed." Reverting until chromium sandbox issues are resolved. This reverts commit b7f1a8b0ab3489a7463749e7fc088187bfafbd35. BUG=484963 BUG=angleproject:961 Change-Id: I4b030329a322d0a96a18e6ae875d500c5f755ddd Reviewed-on: https://chromium-review.googlesource.com/270490 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez 0d3afab8 2015-05-11T14:53:13 Implement Pbuffers for the GLX EGL implementation BUG=angleproject:892 Change-Id: I32b9bbb35d99621f16a055fb544ec0691dfcd5a0 Reviewed-on: https://chromium-review.googlesource.com/270261 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 4298123b 2015-05-11T14:13:35 DisplayGLX: handle EGL_DEFAULT_DISPLAY for ANGLE_platform_angle BUG=angleproject:892 Change-Id: I681e2b92ac2e8b853c7d1271a5518c4b77a67929 Reviewed-on: https://chromium-review.googlesource.com/270260 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang c337e7ab 2015-04-30T10:25:59 Convert floats to integers using doubles and 64-bit integers. Avoids some edge cases that overflow or round incorrectly. Fixes: dEQP-GLES2.functional.state_query.floats.depth_range_getinteger dEQP-GLES2.functional.state_query.floats.color_clear_value_getinteger dEQP-GLES2.functional.state_query.floats.depth_clear_value_getinteger Change-Id: Ib2c7f422dac76094c7ff6c5f8aef3fd392f68e80 Reviewed-on: https://chromium-review.googlesource.com/268510 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez eac64633 2015-05-06T13:14:24 Add a basic GLX EGL implementation BUG=angleproject:892 Change-Id: Ife9955a457d4a6fb3adce17757ccb0de7d0dd274 Reviewed-on: https://chromium-review.googlesource.com/269413 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez f229cb9b 2015-05-08T15:53:39 Add a FunctionsGLX class to dynamically load the GLX entry points BUG=angleproject:892 Change-Id: I516b7d859100cb065871de8e328585a9ca817499 Reviewed-on: https://chromium-review.googlesource.com/270123 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang eaa759c4 2015-04-02T13:02:53 Remove Texture serials and Texture::INCOMPLETE_TEXTURE_ID. Texture serials were not used in any place that pointers could not be used and Texture::INCOMPLETE_TEXTURE_ID was only referenced by RendererD3D. This was the last place that serials are used in the gl layer. BUG=angleproject:681 Change-Id: Iad24321fba57db8ade3c9eb8f04cc20e98ded1b0 Reviewed-on: https://chromium-review.googlesource.com/263659 Reviewed-by: Brandon Jones <bajones@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang c2520564 2015-04-29T11:42:33 Move unsupported depth stencil check to FramebufferD3D. BUG=angleproject:885 Change-Id: I0abc674e365d2b5b65d23e2abf741a02a1146cdd Reviewed-on: https://chromium-review.googlesource.com/268311 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang f51bc795 2015-05-04T14:57:03 Optimize Texture binding by only applying referenced textures. Update ProgramGL to track which the current values of sampler uniforms so that only the currently applied texture units have to be bound for the draw call. BUG=angleproject:882 Change-Id: I280aa106172b13a5fbb31cdefba27b6691c0a0e4 Reviewed-on: https://chromium-review.googlesource.com/264803 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez 9477dc94 2015-05-06T13:13:33 Add GLX EGL implementation stubs BUG=angleproject:892 Change-Id: I1ef1bd0ce60f4585e473f9750c748a1b41c09da2 Reviewed-on: https://chromium-review.googlesource.com/269741 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 0ca53786 2015-05-07T13:49:39 Fix issues with ProgramGL. * Don't re-create the native GL program every link, some program state should persist between re-linking such as bound attribute locations. * Forward glBindAttribLocation calls to the ProgramImpl, fixes some chromium rendering issues because chromium always binds attribute locations, sometimes with gaps. * Query the real attrib location before inserting it into the list of attribs. It was unsafe to rely on the attrib having the same location as its index into the active attributes. BUG=angleproject:882 Change-Id: If14b4c4c2f5ebcdaa4f7c5a890b9519d6d4e6e43 Reviewed-on: https://chromium-review.googlesource.com/269991 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez 98e7d071 2015-05-07T12:35:47 Use a D3D11 renderer by default, when available. Also update SampleApplication to request the default renderer instead of explicitely asking for d3d11 BUG=angleproject:892 Change-Id: I70c431b3c1ba78c3ce7844d7f276cc19ac17d7f5 Reviewed-on: https://chromium-review.googlesource.com/269999 Reviewed-by: Jamie Madill <jmadill@chromium.org> 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>
Jamie Madill f611316b 2015-05-07T11:49:21 Use stream operators for appending to InfoLog. Also add a helper class to keep the previous behaviour of automatically appending a newline after every new message. BUG=angleproject:992 Change-Id: I0ff5d2846175cf19de7a6af295af24a92451456f Reviewed-on: https://chromium-review.googlesource.com/268744 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 71c3b2c7 2015-05-07T11:49:20 Use a std::stringstream for Program's InfoLog. This should help WebKit avoid needing to apply a local patch. Also clean up the style in this file a bit. BUG=angleproject:307,angleproject:992 Change-Id: I41ecf7cbfa20b469b3731215ef28cb36253ba186 Reviewed-on: https://chromium-review.googlesource.com/269849 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 3c74e772 2015-05-07T14:53:59 Revert "Use a std::stringstream for Program's InfoLog." Missing one character for the log length. BUG=angleproject:307,angleproject:992 This reverts commit 8ae74e11d2105104737a7425e3bdd68e6329dcfa. Change-Id: Ifb3658c324cb0aa56ee31352a0fc0e6759979f7b Reviewed-on: https://chromium-review.googlesource.com/269848 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 27464aa9 2015-05-01T11:07:46 Sync the generic vertex attribute data. BUG=angleproject:883 Change-Id: If5616bf24c1ac5477ae80cf1d25efa70b62edea1 Reviewed-on: https://chromium-review.googlesource.com/268750 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 1eb708e1 2015-05-04T14:58:23 Clear cached state when deleting GL objects. Change-Id: I84eac9b3796858e5e19e26851ad83baa1f9b6af2 Reviewed-on: https://chromium-review.googlesource.com/269142 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 716cc88e 2015-05-04T15:30:15 Always sync writemasks and front face. BUG=angleproject:883 Change-Id: Ie1d544c8f30472238d859d8fd7f553a73b066802 Reviewed-on: https://chromium-review.googlesource.com/269145 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 520c4ae2 2015-05-05T13:12:36 Add a Buffer::getIndexRange function. Instead of exposing the index range cache, add a more generic method that allows the buffers to handle their own caching of index ranges. BufferImpl::getData can be hard to implement for BufferGL because there isn't a way to tell the buffer to unmap and glGetBufferSubData can be very expensive, requiring an extra copy of the data. BUG=angleproject:881 Change-Id: Idec645219056132e0d72a410fbe7b971fa02c9e9 Reviewed-on: https://chromium-review.googlesource.com/261892 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 831b1953 2015-05-05T11:02:27 Move the IndexRangeCache and Range types to the gl namespace. BUG=angleproject:881 Change-Id: Ib05149facee9fcc7714cb957ca8647b3498a36b6 Reviewed-on: https://chromium-review.googlesource.com/269254 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Brandon Jones <bajones@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>
Jamie Madill 443e1d9b 2015-05-05T12:57:55 Refactor egl::Surface constructors. We can reduce the code in these classes quite a bit by calling the common code in egl::Display. BUG=angleproject:994 Change-Id: Idf0ffa054fc6a70cf8c65a0b98fd963911715591 Reviewed-on: https://chromium-review.googlesource.com/269258 Reviewed-by: Kenneth Russell <kbr@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez fee03501 2015-05-05T15:08:24 Move comments next to their code block in FunctionsGL BUG=angleproject:892 Change-Id: I7b47e26c81dc91900b17a2062bef0ee10c3290aa Reviewed-on: https://chromium-review.googlesource.com/269209 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 570dae9e 2015-05-05T15:11:08 Remove noop assignment to configId in DisplayWGL It is overwritten by ConfigSet::add. BUG=angleproject:892 Change-Id: I23becb235969c6aeda216014fd06880bd7cc5f67 Reviewed-on: https://chromium-review.googlesource.com/269410 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang b80360f1 2015-05-04T15:01:31 Load the KHR_debug extension entry points and print debug messages. Change-Id: If1b64a7d5cc80205683062586a56fb50da6c1a21 Reviewed-on: https://chromium-review.googlesource.com/269143 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 8ae74e11 2015-05-04T10:34:15 Use a std::stringstream for Program's InfoLog. This should help WebKit avoid needing to apply a local patch. Also clean up the style in this file a bit. BUG=angleproject:307,angleproject:992 Change-Id: I6328cd03901dbf52eccddc7c747a684ed9b23ea1 Reviewed-on: https://chromium-review.googlesource.com/268741 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org>
Jamie Madill 8cf813c7 2015-05-04T12:55:18 Query attachment render targets from Impl class. *re-land with fix for D3D9* This allows us to eradicate the GetAttachmentRenderTarget methods. This improves potential performance, at the cost of exposing a Renderer-specific function at the API object level. BUG=angleproject:963 Change-Id: Iee9f985ddaed668df0c622228004b348eb4d2ea8 Reviewed-on: https://chromium-review.googlesource.com/269006 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez 74e16084 2015-05-04T12:44:30 CompilerGL: Use mOutputType when creating the compiler BUG=angleproject:892 Change-Id: Id6bbc4059f92ff7d8d291583cd30dbd4cd5e9bd3 Reviewed-on: https://chromium-review.googlesource.com/268969 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Scott Graham a897542f 2015-05-01T11:09:12 vs2015: disable warning in generated code, fix another Macro redefinition is for INT8_MIN, etc. which are generated by flex. VS doesn't define __STDC_VERSION__ as >= C99 because it's still only partial support in VS2015. Fix a float->int conversion narrowing warning. Change-Id: I5232eb23426eaf584218137c068e14d74119a1ef Reviewed-on: https://chromium-review.googlesource.com/268821 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Scott Graham <scottmg@chromium.org>
Corentin Wallez 92d7706d 2015-05-04T12:41:54 Fix tautological compare and && in || warnings in FunctionsGL.cpp Change-Id: Icfbd79e3cbb116da9981daeb42d3657146bf673e Reviewed-on: https://chromium-review.googlesource.com/268968 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 55def583 2015-05-04T11:24:57 translator: Fix variable collection for gl_DepthRange. *re-land with Linux fixes, and fix for locations* This built-in uniform wasn't being collected in VariableInfo.cpp. Also remove the existing workaround for D3D gl_DepthRange collection. BUG=angleproject:991 BUG=478570 Change-Id: Iba84651bfc58f82fd4ce039421874f561f83c348 Reviewed-on: https://chromium-review.googlesource.com/268840 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 931c78cb 2015-05-04T12:45:53 Fix typo intialize -> initialize Change-Id: Ia39fffc6f2782b918b37ab7ae25ee16ecc98e93a Reviewed-on: https://chromium-review.googlesource.com/269120 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill e737b06c 2015-05-04T16:53:56 Revert "Query attachment render targets from Impl class." D3D9 bug is causing failures in the WebGL depth texture test. BUG=angleproject:963 This reverts commit 804e8436f91733e1d0f769ec10082e4741f2e549. Change-Id: I660f05033360e97258794138cb50b604f5ac16b6 Reviewed-on: https://chromium-review.googlesource.com/269005 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill c1c1cdc4 2015-04-30T09:42:26 Don't reallocate default FBO on makeCurrent. We can use the flat FBO attachment types to update our data instead of reallocating it. This also lets us delete the DefaultFramebuffer class. BUG=angleproject:963,angleproject:840 Change-Id: Ib8f20d8212d073fb5e248756321cb2e6b4e086dc Reviewed-on: https://chromium-review.googlesource.com/263492 Reviewed-by: Kenneth Russell <kbr@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 804e8436 2015-04-30T09:42:23 Query attachment render targets from Impl class. This allows us to eradicate the GetAttachmentRenderTarget methods. This improves potential performance, at the cost of exposing a Renderer-specific function at the API object level. BUG=angleproject:963 Change-Id: Ifc227b5f42e87bd4deb451d685618cf61fea39f1 Reviewed-on: https://chromium-review.googlesource.com/263491 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 26e1a466 2015-05-01T19:19:19 Revert "translator: Fix variable collection for gl_DepthRange." Build errors on Linux: error: comparison of integers of different signs: 'const int' and 'const unsigned int' BUG=angleproject:991 BUG=478570 This reverts commit f1ae954b660cb058c40665b623f4d689b65180d4. Change-Id: I217aba1b32dc0e70d6153337a1f0ccef0483a0e1 Reviewed-on: https://chromium-review.googlesource.com/268792 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill f1ae954b 2015-05-01T13:33:57 translator: Fix variable collection for gl_DepthRange. This built-in uniform wasn't being collected in VariableInfo.cpp. Also remove the existing workaround for D3D gl_DepthRange collection. BUG=angleproject:991 BUG=478570 Change-Id: Ie254132e37c307323ba9e6e1705d138eea67b520 Reviewed-on: https://chromium-review.googlesource.com/268524 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Jamie Madill 6afcd6dd 2015-04-28T12:39:09 Refactor CreateDevice error checking. Also return a different code for a NULL pointer, vs a failed call. BUG=477701 Change-Id: Ib0584371d51b99760e80ce5481a1e72e1ec673e0 Reviewed-on: https://chromium-review.googlesource.com/267753 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org>
Jamie Madill 4d16f6d8 2015-04-30T09:42:21 Replace NULL with nullptr in Framebuffer9/11. BUG=angleproject:963 Change-Id: I1ba418e7540b9c3ac6611aa3e4f0c1ca27557a1a Reviewed-on: https://chromium-review.googlesource.com/267734 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 7d75e2b7 2015-04-30T09:42:18 Simplify message to FBO Impls of attachment changes. We don't need to pass attachment pointers, since they are now value types, and no longer change their address. BUG=angleproject:963 Change-Id: I02cdce0886512cc847930f61c5bfb62fc1d7cd1a Reviewed-on: https://chromium-review.googlesource.com/265938 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang ec6bae71 2015-04-29T13:54:15 Default buffer usage to GL_STATIC_DRAW. Calling glGetBufferParameteriv with GL_BUFFER_USAGE on a buffer that has never had glBufferData called on it should return GL_STATIC_DRAW. [ES 2.0.25 spec, table 6.3] Fixes: dEQP-GLES2.functional.state_query.buffer_object.buffer_usage_getbufferparameteri Change-Id: I1bf1614b606d20338bb507861164c6ab0b64122f Reviewed-on: https://chromium-review.googlesource.com/267816 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Régis Fénéon 3799c301 2015-04-29T13:06:31 surfaceD3D::swapRect(): always call checkForOutOfDateSwapChain() even if width or height is 0. BUG=angleproject:990 Change-Id: I9fbdd3d341d3f6fa42dfb39950e6b2d3204c4c9b Reviewed-on: https://chromium-review.googlesource.com/267415 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Régis Fénéon <regis.feneon@gmail.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill c185cb8d 2015-04-28T12:39:08 Cache gl::Data in Context to speed up validation. This avoids creating a new Data object and copying it around. Gives a noticable performance increase in the benchmark which tests validation-only draw calls. Gives about a 8% increase in the benchmark. BUG=angleproject:959 Change-Id: Id3a7459753b1b466a06da89f3f8b03b2c2c7a5c1 Reviewed-on: https://chromium-review.googlesource.com/267752 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org>
Jamie Madill aebf9dde 2015-04-28T12:39:07 Cache maximum enabled vertex attribute. This can give us much faster draw call validation, by saving us from checking buffer sizes for non-enabled attribs. Also for checking if vertex buffers are mapped. Gives >100% increase in the benchmark. BUG=angleproject:959 Change-Id: I211c310385bdee46ed06f68ecd9c98385e1f8db9 Reviewed-on: https://chromium-review.googlesource.com/267751 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org>
Jamie Madill 1377689c 2015-04-28T12:39:06 Cache validate samplers result. This gives ~23% increase in the validation-only draw call perf test. BUG=angleproject:959 Change-Id: I384a5c4fbb1c2cd47483bd7cf4bc1d39447a99bc Reviewed-on: https://chromium-review.googlesource.com/267750 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org>
Jamie Madill 3da79b7b 2015-04-27T11:09:17 Reject shaders using attribute aliasing. The current code rejects any shaders that use more than the caps allow, but a bug would crash us before the check. We don't support aliasing in shaders that use a lot of uniforms because this causes problems with the D3D back-end, currently. This changes the crash in the dEQP aliasing tests to a link error. See dEQP-GLES2.functional.attribute_location.bind_aliasing.* BUG=angleproject:901 Change-Id: I6906d3345abe9f89cfa0aa6cec4be26b5b2851d0 Reviewed-on: https://chromium-review.googlesource.com/266928 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org>
Geoff Lang 30cb86d8 2015-04-22T10:07:23 Create a child window in SurfaceD3D when needed. BUG=angleproject:961 BUG=angleproject:860 Change-Id: I137d27bafc4d690b159ffef8cc69d6f1c5a05131 Reviewed-on: https://chromium-review.googlesource.com/267681 Tested-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill e3ef715d 2015-04-28T16:55:17 Revert "Revert "Remove non-const FBO attachment queries."" Fixed build errors in prior patch. This reverts commit 34771622d756adc52f02becd7c2b70c717dcc638. Change-Id: I909b455f2c632a3df7d97149972e167c2adb058f Reviewed-on: https://chromium-review.googlesource.com/267599 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 3fe36ebd 2015-04-28T16:44:12 Revert "Create a child window in SurfaceD3D when needed." Causing errors with D3D9, see build: http://build.chromium.org/p/chromium.gpu.fyi/builders/Win7%20Release%20%28NVIDIA%29/builds/15149 This reverts commit b7f1a8b0ab3489a7463749e7fc088187bfafbd35. Change-Id: I6f1c3fd119f76a298e5b3fb676ddcb208cd1234b Reviewed-on: https://chromium-review.googlesource.com/267673 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 3a12f776 2015-04-28T16:44:59 Revert "Fix compile failure on build systems with UNICODE defined." Earlier patch causing errors on D3D9: http://build.chromium.org/p/chromium.gpu.fyi/builders/Win7%20Release%20%28NVIDIA%29/builds/15149 This reverts commit acb0a1a6d74100833dbccd49d3eca317b56fd004. Change-Id: I1956c57224ecf1c0caee2c3f624d1a871d171686 Reviewed-on: https://chromium-review.googlesource.com/267674 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang acb0a1a6 2015-04-28T10:39:10 Fix compile failure on build systems with UNICODE defined. BUG=angleproject:961 Change-Id: I32053309a8384a27d1c2a991ddfaa195195f88c8 Reviewed-on: https://chromium-review.googlesource.com/267637 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang d3b84ab5 2015-04-22T10:36:48 Don't subclass windows in SurfaceD3D. The subclassing was not used by chromium and caused problems for users that wanted to use a window owned by another thread as an EGL surface. BUG=angleproject:961 Change-Id: I1d91323c758374de317179874320961385b10ae0 Reviewed-on: https://chromium-review.googlesource.com/266658 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: John Bauman <jbauman@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang b7f1a8b0 2015-04-22T10:07:23 Create a child window in SurfaceD3D when needed. BUG=angleproject:961 Change-Id: I61931961f8cb86b47012edd2bc08d0e1e7a5d0f7 Reviewed-on: https://chromium-review.googlesource.com/266515 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: John Bauman <jbauman@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 5b028d18 2015-04-27T10:43:54 Add a special case for binding to GL_FRAMEBUFFER for state tracking. Binding to GL_FRAMEBUFFER is supposed to set the read and draw framebuffer bindings instead of being a separate binding point. BUG=angleproject:885 Change-Id: Ic6d9056a2f8bfa472587c5ed030c15fcc93574c7 Reviewed-on: https://chromium-review.googlesource.com/267460 Reviewed-by: Brandon Jones <bajones@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 0d31828f 2015-04-27T15:08:09 Fixed shadowed error variable. BUG=angleproject:886 Change-Id: I4224ba26fef6783d61a56c294da2bdb6596da7bc Reviewed-on: https://chromium-review.googlesource.com/267552 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 2d06b738 2015-04-20T12:53:28 Store value types for FBO attachments. *re-land with fix for Mac* This prevents us from re-allocating FBO attachments every set. This change requires quite a bit of refactoring. BUG=angleproject:963 Change-Id: Ia1f83e3c427d446ddbe16c6703db136942149e91 Reviewed-on: https://chromium-review.googlesource.com/266691 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>