src/libANGLE/Texture.cpp


Log

Author Commit Date CI Message
JiangYizhou bddc46b4 2016-12-09T09:50:51 ES31: Implement multisampled Textures. Implement TexStorage2DMultisample and getMultisamplefv entry point. Also modify sample state for Textures and Framebuffers. BUG=angleproject:1590 TEST=angle_unittests TEST=angle_end2end_tests TEST=dEQP-GLES31.functional.texture.multisample.samples_*.sample_position TEST=dEQP-GLES31.functional.texture.multisample.samples_*.use_texture_color_2d TEST=dEQP-GLES31.functional.texture.multisample.samples_*.use_texture_depth_2d TEST=dEQP-GLES31.functional.texture.multisample.negative.fbo_attach_different_sample_count_tex_tex TEST=dEQP-GLES31.functional.texture.multisample.negative.fbo_attach_different_sample_count_tex_rbo TEST=dEQP-GLES31.functional.texture.multisample.negative.fbo_attach_non_zero_level TEST=dEQP-GLES31.functional.texture.multisample.negative.texture_high_sample_count TEST=dEQP-GLES31.functional.texture.multisample.negative.texture_zero_sample_count TEST=dEQP-GLES31.functional.shaders.builtin_functions.texture_size.samples_1_texture_2d TEST=dEQP-GLES31.functional.shaders.builtin_functions.texture_size.samples_4_texture_2d Change-Id: I8fa7bd4e73b95745858a3e16b1b92004b4a18712 Reviewed-on: https://chromium-review.googlesource.com/414309 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yunchao He <yunchao.he@intel.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
He Yunchao 11b038be 2016-11-22T21:24:04 ES31: Implement glGetTexLevelParameter{i|f}v entry point BUG=angleproject:1679 TEST=dEQP-GLES31.functional.state_query.texture_level.* Change-Id: I36cc7406199fc0c3c1585ad48f010d7dba5fe9e4 Reviewed-on: https://chromium-review.googlesource.com/414250 Commit-Queue: Yunchao He <yunchao.he@intel.com> Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 9f09037b 2016-12-02T10:20:43 Change dEQP ES 3.1 expectations from FAIL to SKIP. UNIMPLEMENTED debug spam was causing the tests time time out. We can mark them as FAIL again once the dEQP test setup/tear down code doesn't emmit so many messages. Implement a couple validation cases for ES 3.1 to greatly reduce the spam. BUG=angleproject:1647 BUG=angleproject:1442 Change-Id: Ie7b4ac8737a2df1c0ada6ad53154ddf2f37d9c3c Reviewed-on: https://chromium-review.googlesource.com/415520 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 81c6b577 2016-10-19T14:07:52 Implement GL_EXT_texture_sRGB_decode for GL. BUG=angleproject:1383 BUG=655247 Change-Id: I409b12e1ae418530576de5ec9ce26b7be5d91650 Reviewed-on: https://chromium-review.googlesource.com/400807 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 0b94528b 2016-10-11T08:48:52 Fix synchronization of workaround dirty bits in TextureGL. The local dirty bits were sometimes not synced because gl::Texture doesn't know that they exist. Also fix calculation of when the workaround dirty bits need to be set. BUG=angleproject:1386 Change-Id: I3d9d1a01e5441be783190422093c485ea5da7aec Reviewed-on: https://chromium-review.googlesource.com/396542 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 22416868 2016-06-08T16:14:36 Add dirty bits for internal texture state. Synchronize TextureGL internal state using the dirty bits. TexturesBenchmark scores: Before: 5051 After: 7639 Diff: +51.2% BUG=angleproject:1386 Change-Id: Id04aef778a47175d1a284564495a646045855b4b Reviewed-on: https://chromium-review.googlesource.com/393866 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 47110bf4 2016-04-20T11:13:22 Implement CHROMIUM_copy_compressed_texture for D3D11. BUG=angleproject:1356 Change-Id: Id563997d2921cf558c52a781ae66d8bde58d1f2f Reviewed-on: https://chromium-review.googlesource.com/339847 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 32dd62b8 2016-09-23T14:09:06 Allow LINEAR filtering on OES_depth_texture formats. The ES3 spec and this extension lead to some awkward interactions. The extension doesn't mention allowed filtering modes, so be default it allows both linear and nearest. ES3 however, very clearly restricts any depth texture (any texture with effective internal format which has depth or stencil bits) to only use nearest filtering. This then breaks compatibility with the legazy unsized formats. Choose to be slightly non-conformant here, and allow linear filtering for the older unsized formats. Although this could lead to problems down the line, it is consistent with existing ES drivers in practice. Other future options might be to override the behaviour of the filter to use nearest when using WebGL validation compatibility. BUG=chromium:649200 Change-Id: I4ee7608dd04d1fd238385aefee32c8c9c1e80ca0 Reviewed-on: https://chromium-review.googlesource.com/388759 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 97073d12 2016-04-20T10:42:34 Implement CHROMIUM_copy_texture for D3D11. BUG=angleproject:1356 Change-Id: I70246762411dbeeb3e291e317854139a68d80070 Reviewed-on: https://chromium-review.googlesource.com/339434 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill a3944d4f 2016-07-22T22:13:26 Add gl::Format to represent a texture/rb/surface format. This has a few advantages: it preserves all the information of the internal format, such as if it is sized or unsized. It also saves looking up the format multiple times in the table, which should improve speed in some cases. The extra sized-ness information will allow us to perform the correct validation in CopyTexSubImage calls. BUG=angleproject:1228 Change-Id: I42954771b0a9a968f5d787b8cf6e0af721791855 Reviewed-on: https://chromium-review.googlesource.com/362626 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Martin Radev 1be913cf 2016-07-11T17:59:16 Add support for ES31 context creation The dEQP test for context creation passes. SH_WEBGL3_SPEC has been added, but it should be considered whether we should keep it, remove it or rename it. It was added so that there is a webgl mapping to es 310 shaders. Check Compiler.cpp. The bison file has been modified so that some tokens from es3 can be also used in es31 as well. A separate macro ES3_1_ONLY is added so that some tokens are limited only for es 310 shaders. BUG=angleproject:1442 TEST=angle_unittests Change-Id: I2e5ca227c96046c30dc796ab934f3fda9c533eba Reviewed-on: https://chromium-review.googlesource.com/360300 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 362876b1 2016-06-16T14:46:59 Cache Framebuffer completeness. Improves performance on the render-to-texture microbenchmark by ~3x on the OpenGL back-end. Wipes out several of the top profling hotspots on that benchmark. BUG=angleproject:1388 Change-Id: I6a35a0b435b2ed3c83d32acdb9df090df98214ad Reviewed-on: https://chromium-review.googlesource.com/348957 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Jamie Madill dfde6abf 2016-06-09T07:07:18 Context: Remove mutable gl::State getter. This will preserve layering - the API layer doesn't mutate the state directly, it passes the API call through to the Context. Is also removes the possiblity of any shenanigans of the Validation layer changing the GL state. Also, this CL refactors a few validation entry points to take ValidationContext instead of Context. ValidationContext will be the correct way to interact with the gl::Context in the Validation code. Finally, additional refactorings make ContextState a proper class with private data. This allows the ContextState itself to keep a mutable pointer to the gl::State, so ValidationContext can modify it if necessary (and it will be necessary for Framebuffer completeness caching). BUG=angleproject:1388 Change-Id: I86ab3561573caa9535c8d1b8aad4ab3d0e7cd470 Reviewed-on: https://chromium-review.googlesource.com/348954 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 0f2b1560 2016-05-13T16:15:35 Fix GenerateMipmap when base level or max level are set According to GLES 3.0.4 section 3.8.10, GenerateMipmap should generate levels based on the base level, and generate them at most up to the max level. Levels outside the base/max level range should be unchanged by GenerateMipmap. The Texture class is fixed so that the image descs are set only for the changed mipmap range when GenerateMipmap is called. The D3D backend is fixed so that mipmap generation is correctly started from the base level instead of level 0, and making sure that mipmaps are generated only up to the max level. Generating mipmaps for array textures is also fixed for cases where the base level depth >= max(width, height) * 2. The GL backend is fixed to sync texture state before GenerateMipmap is called, so that base level and max level are set correctly in the driver. The GenerateMipmap entry point is refactored so that it has a separate validation function and a context function which does the work. Validation for out-of-range base levels is added. New tests are added to verify the functionality. One corner case in the tests fails on NVIDIA GL drivers likely due to a driver bug - similar rules for GenerateMipmap are found from newer GLES specs and also OpenGL specs (checked versions 3.3 and 4.4). BUG=angleproject:596 TEST=angle_end2end_tests Change-Id: Ifc7b4126281967fc4f6dc4f9452e5b01e39f83d7 Reviewed-on: https://chromium-review.googlesource.com/344514 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho e8528d89 2016-05-16T17:50:52 Fix determining texture mipmap completeness The code didn't previously take base level properly into account when determining how many levels to check when checking for texture completeness. The code is refactored so that the "q" value in spec, that is the maximum mipmap level for determining completeness, can be queried from TextureState. This value is used now for checking completeness. This requires moving ImageDescs under TextureState. Functions that operate on the ImageDesc array are also moved from Texture to TextureState. TextureState members are also renamed to start with the "m" prefix and made private. Also handle levels outside the base/max level range consistently in eglCreateImageKHR validation. We interpret the spec so that if the level used for the EGL image is not a part of the texture levels that affect texture completeness, an error is generated. BUG=angleproject:596 TEST=angle_end2end_tests Change-Id: I038ef24aa83e0a6905ca3c0bbada5989eecb00d9 Reviewed-on: https://chromium-review.googlesource.com/344880 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Geoff Lang b66a9097 2016-05-16T15:59:14 Add support for OES_EGL_image_external and OES_EGL_image_external_essl3. BUG=angleproject:1372 Change-Id: I8489e7fd0ab409b0775041ad5e9fbf0aab53886d Reviewed-on: https://chromium-review.googlesource.com/344734 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Olli Etuaho be815a4f 2016-05-12T20:38:38 Apply effective base and max level on GL backend This works around GL drivers that neglect to clamp the base level or max level of immutable textures. BUG=angleproject:596 BUG=610800 TEST=angle_end2end_tests Change-Id: Ie4e04aaa9253f2befd73bccefa7759486b3ef487 Reviewed-on: https://chromium-review.googlesource.com/344590 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 77ae8d57 2016-05-06T14:19:01 Share TextureState structure with TextureImpl This refactoring patch removes the need to pass texture state to methods of TextureImpl in some cases. It also adds target value to TextureState, and moves TextureState definition to Texture.h. The effective base level can now also be queried from TextureState, which reduces the need to pass it around. Two different code paths that dealt with the TextureStorage11 SRV cache are combined into one. Besides refactoring, this patch fixes applying mTopLevel twice when determining the amount of mip levels TextureStorage11. BUG=angleproject:596 TEST=angle_end2end_tests, angle_unittests Change-Id: I1add3d9ad847bec56774e394125156cf9cb0fc2a Reviewed-on: https://chromium-review.googlesource.com/342940 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill 7aea7e05 2016-05-10T10:39:45 Add EGLImplFactory. Also rename ImplFactory to GLImplFactory. This will allow us to use the same factory design pattern for EGL objects, and to use State helper classes to share data with Impls. BUG=angleproject:1363 BUG=angleproject:1369 Change-Id: I07a8fe40838d5d4ca32b04910c306edeab4d25a7 Reviewed-on: https://chromium-review.googlesource.com/342051 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Olli Etuaho a314b61c 2016-03-10T16:43:00 Determine D3D texture storage size with correct base level The size of the texture storage is now determined by extrapolating the level zero texture dimensions from the base level dimensions. This fixes crashing when images for levels below the base level are not defined, and also fixes texture storage dimensions being calculated wrong in case the levels outside the used level range have dimensions that are inconsistent with the dimensions inside the used level range. Checking texture level completeness in TextureD3D is now done based on the dimensions of the base level, and levels that are outside the base level to max level range are not taken into account. Textures are marked incomplete in case their base level is greater than their max level. Changing the base level can also affect the size of the storage required for the texture. Old storage is now discarded when the base level is changed and the new base level calls for different storage dimensions. Code in TextureD3D is refactored so that "base level" actually means the base level of the texture specified through the GLES API, and "level zero" is used where TextureD3D would sometimes previously use "base level". Changing either the base level or max level can also affect texture completeness, so invalidate the cached completeness in Texture if they are changed. Some of the added tests are still failing on Intel and NVIDIA OpenGL drivers because of driver bugs. Tests also fail on OSX. BUG=angleproject:596 TEST=angle_end2end_tests, dEQP-GLES3.functional.texture.* (no regressions), dEQP-GLES3.functional.shaders.texture_functions.* (no regressions), dEQP-GLES3.functional.state_query.texture.* (no regressions) Change-Id: Icd73d6e29f84a341ed5ff36d5ec5cb2f469cb4e8 Reviewed-on: https://chromium-review.googlesource.com/333352 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Ian Ewell bda75597 2016-04-18T17:25:54 Finish NV12 support via streams. The main functionality for NV12 texture support through EGL streams has been added. Updates to the compiler, texture code, and stream code were added to support binding to external D3D11 NV12 textures. An end2end test was also added to test sampling of YUV textures and converting to RGB. There is also a new script to convert BMP files to an NV12 texture ready to load into D3D11 for testing purposes. BUG=angleproject:1332 Change-Id: I39b6ec393ea338e2c843fb911acc1b36cd1158a0 Reviewed-on: https://chromium-review.googlesource.com/339454 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Ian Ewell <ewell@google.com> Reviewed-on: https://chromium-review.googlesource.com/341254 Reviewed-by: Ian Ewell <ewell@google.com>
Corentin Wallez 9670b03e 2016-04-29T09:47:47 Revert "Finish NV12 support via streams." Broke Windows Clang compilation, see https://build.chromium.org/p/chromium.gpu.fyi/builders/GPU%20Win%20Clang%20Builder%20%28dbg%29/builds/3583/steps/compile/logs/stdio and search for TextureStorage11.h This reverts commit 9b8b359fa3615be7c7492239a48f61103b2e4fcc. Change-Id: I6e54305eba02b40927a35577594df39e951adb32 Reviewed-on: https://chromium-review.googlesource.com/341430 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 9082b982 2016-04-27T15:21:51 Rename gl::Data to gl::ContextState. Part of the new world order of renaming the Obj::Data classes to ObjState. BUG=angleproject:1363 Change-Id: I15cf002b8b093d687f540b9e86f045874af24a7e Reviewed-on: https://chromium-review.googlesource.com/340740 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Ian Ewell 9b8b359f 2016-04-18T17:25:54 Finish NV12 support via streams. The main functionality for NV12 texture support through EGL streams has been added. Updates to the compiler, texture code, and stream code were added to support binding to external D3D11 NV12 textures. An end2end test was also added to test sampling of YUV textures and converting to RGB. There is also a new script to convert BMP files to an NV12 texture ready to load into D3D11 for testing purposes. BUG=angleproject:1332 Change-Id: I098940e6f25e113dcc4fc8d22ffed4b5a16fd860 Reviewed-on: https://chromium-review.googlesource.com/339454 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Ian Ewell <ewell@google.com>
Olli Etuaho 82c47ad0 2016-04-20T18:28:47 Pass ImplFactory to Texture constructor This improves encapsulation inside the Texture class, and removes duplication of createTexture calls. This is a necessary step towards adding a shared "Data" structure to the Texture classes, following a similar pattern as for example the Framebuffer class. This patch also shares the same MockFactory class among different unit tests. BUG=angleproject:596 TEST=angle_unittests Change-Id: Ie8d3a9aa4ec35565d7ecbabb8c40e7b1ba068721 Reviewed-on: https://chromium-review.googlesource.com/340200 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill 73a84969 2016-02-12T09:27:23 Refactor more Texture entry points to a consistent style. TexImage, SubImage and the Compressed variants were all taking a GL Context as the first parameter, which is a layering violation and also caused problems with reworking how the sync works. Fix this by refactoring them in the same style as the CopyTex* entry points. BUG=angleproject:1260 BUG=angleproject:747 Change-Id: Ibe5e87d0ebc790e2dcadb8ba153cf40fec73d1f6 Reviewed-on: https://chromium-review.googlesource.com/327258 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Olli Etuaho a7416ff7 2016-01-18T12:22:55 Fix texture completeness check when base level > 0 is used ANGLE would previously treat a texture as incomplete whenever its base level was above 0. This was because the base level wasn't being taken into account correctly when determining what size the image at a specific mip level should be. Fix this by taking the base level into account when determining the expected size. BUG=angleproject:596 TEST=angle_end2end_tests Change-Id: I4b05514aed2858797ea46cf3570c3c40e5efc508 Reviewed-on: https://chromium-review.googlesource.com/322132 Tryjob-Request: Olli Etuaho <oetuaho@nvidia.com> Tested-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 70d0f499 2015-12-10T17:45:46 Implement GL_KHR_debug. BUG=angleproject:520 Change-Id: I9ced3e7ab1515feddf2ec103c26b2610a45b1784 Reviewed-on: https://chromium-review.googlesource.com/319830 Tryjob-Request: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 66988745 2015-12-22T19:39:19 Revert "Implement GL_KHR_debug." This reverts commit 6c521b7a70a53b1c9f7762e53e34b5a8146b0f7b. Change-Id: I6ff981198e31f34d3e405edea6277ee75516d6ee Reviewed-on: https://chromium-review.googlesource.com/319820 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 6c521b7a 2015-12-10T17:45:46 Implement GL_KHR_debug. BUG=angleproject:520 Change-Id: I78d14cc8c94f5cef58604220f0ca847473b25bf8 Reviewed-on: https://chromium-review.googlesource.com/317820 Tryjob-Request: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 6b120b9f 2015-11-24T13:00:07 Add checks for FBO attachment layer. We would allow the app to attach layers that were out-of-bounds. Fix this by checking against the underlying resource dimensions. Also rework the code a bit to clean up the texture size query, which is available from the ImageDesc. BUG=angleproject:869 Change-Id: I984f1db16daea6ca650d795884d8ec2cb8f05ebb Reviewed-on: https://chromium-review.googlesource.com/313991 Tryjob-Request: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 69cce580 2015-09-17T13:20:36 Split the SamplerState struct into SamplerState and TextureState. SamplerState is now only the members that are overridden by a sampler object, this makes it easy to update those specific members. Opted for getters and setters for each member in Texture and Sampler because it will be required to enable dirty bits for these states. Added maxAnisotropy to the SamplerState instead of texture state. The sampler objects extension mentions it should be there. BUG=angleproject:1162 Change-Id: I5aa6d702bd5915ee9df1976afef3c8c1f69d27c8 Reviewed-on: https://chromium-review.googlesource.com/300490 Tryjob-Request: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang f826e1a3 2015-09-02T11:31:54 Avoid copy of PixelUnpackState in Texture::setImage. The ternary operator determines that the common type is the value type, causing a copy of PixelUnpackState. If PixelUnpackState::pixelBuffer is non-null then there is an assertion failure in the destructor on any call to Texture::setImage. See:http://stackoverflow.com/a/30088030 BUG=angleproject:1149 Change-Id: I9654e65956339d6b6966ad65a98cf37ad4e00452 Reviewed-on: https://chromium-review.googlesource.com/297084 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez 51706eae 2015-08-07T14:39:22 Make FramebufferAttachmentObject not refcountable Re-land with a fix for an unitialized variable Instead the refcount is done via callbacks. This allows Surface to ignore this refcounting which will be useful in a follow-up CL. BUG=angleproject:891 Change-Id: I1925ccaa4ce7b502b33088660d31c404b8313cb5 Reviewed-on: https://chromium-review.googlesource.com/293712 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Cooper Partin 4d61f7ed 2015-08-12T10:56:50 Reland Fixed compiler warning C4267 'conversion from 'size_t' to 'type', possible loss of data' Additional warnings found with more testing and added C4267 warning disable only for angle_libpng BUG=angleproject:1120 Change-Id: Ic403dcff5a8018056fa51a8c408e64207f3362eb Reviewed-on: https://chromium-review.googlesource.com/293028 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez 0020426e 2015-08-12T19:07:29 Revert "Make FramebufferAttachmentObject not refcountable" BUG= This reverts commit 19ba57469aa02074d094a9aef104f84d0b6d881e. Change-Id: I5dce6c8a81570e22affbcaf32183a97c97849718 Reviewed-on: https://chromium-review.googlesource.com/293351 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 19ba5746 2015-08-07T14:39:22 Make FramebufferAttachmentObject not refcountable Instead the refcount is done via callbacks. This allows Surface to ignore this refcounting which will be useful in a follow-up CL. BUG=angleproject:891 Change-Id: I39b028476e0e3ab1837c033e1121ea21e54d7970 Reviewed-on: https://chromium-review.googlesource.com/291651 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill b195643c 2015-08-12T17:35:20 Revert "Fixed compiler warning C4267 'conversion from 'size_t' to 'type', possible loss of data'" Seems to have quite a few warnings in 64-bit on my machine. BUG=angleproject:1120 This reverts commit c5cf9bc47d0ee028adbbf9e9f94ca567eec601dc. Change-Id: I86768b900aeba52e7a2242d9ae8949f93f1a5ba9 Reviewed-on: https://chromium-review.googlesource.com/293280 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Cooper Partin c5cf9bc4 2015-08-06T10:46:48 Fixed compiler warning C4267 'conversion from 'size_t' to 'type', possible loss of data' BUG=angleproject:1120 Change-Id: I01ef10bea7f487c2b394d030c76628f38d2ea645 Reviewed-on: https://chromium-review.googlesource.com/292780 Tested-by: Cooper Partin <coopp@microsoft.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 1b94d432 2015-08-07T13:23:23 Implement dirty bits for RendererGL's basic state. BUG=angleproject:1040 TEST=angle_end2end_tests,angle_perftests,WebGL Change-Id: I72beaf7e178e042440337fbb8b9669638c5ad016 Reviewed-on: https://chromium-review.googlesource.com/289558 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang a840617a 2015-07-21T16:53:39 Implement the egl and gl layers of EGL Image. Add end2end tests and unittests. BUG=angleproject:970 Change-Id: Ie8306971730a793f08dfd09ead1bfd6ff3e4623d Reviewed-on: https://chromium-review.googlesource.com/291260 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 4274f7d2 2015-08-05T23:07:38 Revert "Implement the egl and gl layers of EGL Image." This reverts commit 22a4f38c2ca9ca430b5f976fc7fc816d88918eba. Change-Id: I07acbfe28d11675236de2ea7f6b050c25f80579a Reviewed-on: https://chromium-review.googlesource.com/290960 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 22a4f38c 2015-07-21T16:53:39 Implement the egl and gl layers of EGL Image. Add end2end tests and unittests. BUG=angleproject:970 Change-Id: I13fc501b24c3f11bfedc810c1ff80fcf1318877c Reviewed-on: https://chromium-review.googlesource.com/287343 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@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 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>
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>
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>
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>
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>
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 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>
Gregoire Payen de La Garanderie 752ce192 2015-04-14T11:11:12 D3D11: Use DX generateMips to generate mipmaps whenever possible. BUG=angleproject:974 Change-Id: I95937fe7a0833de77c52f838ebb3ecba55dfbf8a Reviewed-on: https://chromium-review.googlesource.com/265640 Tested-by: Gregoire Payen de La Garanderie <Gregory.Payen@imgtec.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 79481d65 2015-04-14T08:13:47 Add FramebufferAttachmentObject base class. This lets us share objects (Textures/RBs/Surface) in the attachment class. It will let us squash the attachment classes into one type, which will in turn let us store them by-value, instead of by-pointer. BUG=angleproject:963 Change-Id: Ia9a43dbc3b99475c00f6bc2ed5475deef55addc3 Reviewed-on: https://chromium-review.googlesource.com/263487 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 0fe40534 2015-02-10T12:01:27 Cache sampler completeness in the Texture class. BUG=angle:909 Change-Id: I14e06e01d111e9d5eec415f4c2d831b61dcb1e3d Reviewed-on: https://chromium-review.googlesource.com/248070 Reviewed-by: Nicolas Capens <capn@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang b0eecdfd 2015-02-10T11:09:12 Reduce the calls to get[Width|Height|InternalFormat] in Texture.cpp. BUG=angle:909 Change-Id: I8a66c1d317bcb7a01d79f9475390deb292e1ae2e Reviewed-on: https://chromium-review.googlesource.com/248052 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Nicolas Capens <capn@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 866dd2d1 2015-02-10T11:08:32 Store the texture image information in a std::vector instead of a std::map. BUG=angle:909 Change-Id: Ib595306f6cf0633b16bff6389373c2bb2cc29ec9 Reviewed-on: https://chromium-review.googlesource.com/248051 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Nicolas Capens <capn@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang c223dc6b 2015-01-09T13:10:01 Change Config to a struct and rename it's members. BUG=angle:658 Change-Id: I18dab915730fc28815db8080b3614da821f9c8b1 Reviewed-on: https://chromium-review.googlesource.com/239901 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang b9266276 2015-01-29T13:25:14 Update texture size information on egl[Bind|Release]TexImage. BUG=450257 Change-Id: I7609131d78f255bf9f79b42f39b02303a5c14b60 Reviewed-on: https://chromium-review.googlesource.com/243915 Reviewed-by: Nicolas Capens <capn@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 448d3db5 2015-01-28T16:51:10 Fix 'getDepth' in Texture::isLevelComplete. Was mistakenly inserted as getWidth in 691e58cd84360f. BUG=angle:681 Change-Id: Ibccf056dcb47c8711422efb8bd40fb6f64ff57d9 Reviewed-on: https://chromium-review.googlesource.com/244090 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 19d438d4 2015-01-19T13:42:12 Fix checks for base and max level in Texture. The dEQP unpack buffer tests were failing because they use a max and base level of zero with mipmapping enabled. Update our sampler completeness checks to account for min and max level. We'll have to dig in to our code to find corner cases in D3D with base and max level. Change-Id: I74357c6dc2e1908d0463d2e5cbc8ee91b61a3b7f Reviewed-on: https://chromium-review.googlesource.com/240763 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang b4dedf3e 2015-01-05T14:08:53 Merge the Image class into ImageD3D. BUG=angle:681 Change-Id: I0c0d41fb3ff9592b08ede58a8c2ec2bd2d94a0b2 Reviewed-on: https://chromium-review.googlesource.com/238470 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 909b90ce 2015-01-12T14:07:26 Use the ImageIndex class for indexing the Texture size information. BUG=angle:681 Change-Id: I0c8d1c04ca8eefb9b618ee6635c0643d162c0cc1 Reviewed-on: https://chromium-review.googlesource.com/240241 Reviewed-by: Brandon Jones <bajones@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 691e58cd 2014-12-19T17:03:25 Merge all gl::Texture* classes. The validation for sampler completeness had a lot of duplicated code. The special cases have been merged into the base class by checking mTarget. BUG=angle:681 Change-Id: I11d94c1432f8fc70a1edaaf8228bbc43c3c8fff3 Reviewed-on: https://chromium-review.googlesource.com/236932 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 7c973eaa 2014-12-19T15:58:28 Move egl texture binding to the base texture class. It's still only valid to bind a 2D texture but the validation layer verifies that. BUG=angle:681 Change-Id: I744dc32f9bd0f69b1e1235b8feef7e796167d033 Reviewed-on: https://chromium-review.googlesource.com/236931 Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang a9be0dc6 2014-12-17T12:34:40 Refactor Texture to track image information for size and format queries. BUG=angle:681 Change-Id: Ifb3f52d6348e4479181e66f1c39578f49e9dcf76 Reviewed-on: https://chromium-review.googlesource.com/235613 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 0a4f1e27 2014-12-17T12:33:26 Merge the Texture set*Image methods and use objects for sizes and offsets. BUG=angle:681 Change-Id: If2e981c522ca5ba3eab4484594cb41aa23800ec4 Reviewed-on: https://chromium-review.googlesource.com/236261 Reviewed-by: Brandon Jones <bajones@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang f4134d20 2014-12-15T10:29:47 Use gl::Data as a parameter to Texture::isSamplerComplete. BUG=angle:861 Change-Id: I3fadf954e6d28dd82e361ceac4ba1967dbd7e8bf Reviewed-on: https://chromium-review.googlesource.com/235612 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang d8a2258c 2014-12-17T15:28:23 Remove all uses of "actual" formats. BUG=angle:861 Change-Id: I7cd2d1a56772fdf18bcf926456399322d13e7a4f Reviewed-on: https://chromium-review.googlesource.com/236305 Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill fb0580a6 2014-11-27T14:03:52 MANGLE egl::Surface. This class has its fingers in a lot of other classes. In particular, we will likely need to revisit the context lost handling methods when we implement the robustness extensions on top of desktop GL. For now, we can leave them tied pretty tightly to the D3D implementation. BUG=angle:795 Change-Id: I9b3ac90dfd393f52c5b49bc2bd6b97fb5536ed91 Reviewed-on: https://chromium-review.googlesource.com/228916 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 2b5420c0 2014-11-19T14:20:15 Merge libGLESv2 and libEGL classes into libANGLE. BUG=angle:733 Change-Id: Ic491c971411fe82c56cd97c5c8325ac14ec218df Reviewed-on: https://chromium-review.googlesource.com/230830 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>