src/libANGLE/formatutils.cpp


Log

Author Commit Date CI Message
Jamie Madill dd34b3b9 2019-01-16T09:59:54 Pack VertexAttribType enum. This improves performance slightly in vertex array format checks. Instead of needing to switch on GLenum values we can use packed arrays and tables to determine the values we need. Does not significantly affect performance but will enable future work. Bug: angleproject:3074 Change-Id: I6f4821a463e9b41fe3f8c8967eb3ed4c1d6b84be Reviewed-on: https://chromium-review.googlesource.com/c/1393903 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 3f0c4a56 2019-01-10T10:20:35 Vulkan: Faster state transitions. Implements a transition table from Pipeline Cache entry to state change neighbouring Pipeline Cache entries. We use a 64-bit mask to do a quick scan over the pipeline desc. This ends up being a lot faster than doing a full hash and memcmp over the pipeline description. Note that there could be future optimizations to this design. We might keep a hash map of the pipeline transitions instead of a list. Or use a sorted list. This could speed up the search when there are many transitions for cache entries. Also we could skip the transition table and opt to do a full hash when there are more than a configurable number of dirty states. This might be a bit faster in some cases. Likely this will be something we can add performance tests for in the future. Documentation is also added in a README file for the Vulkan back end. This will be extended over time. Improves performance about 30-35% on the VBO state change test. Bug: angleproject:3013 Change-Id: I793f9e3efd8887acf00ad60e4ac2502a54c95dee Reviewed-on: https://chromium-review.googlesource.com/c/1369287 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill dbc605ce 2019-01-04T16:39:14 Vulkan: Optimize VBO state changes. Also has some minor optimizations for the front-end. 12% improvement on the Vulkan VBO change test. Bug: angleproject:3014 Change-Id: I38e1a8194edfc14bfe57424be348cb9688e928f4 Reviewed-on: https://chromium-review.googlesource.com/c/1369286 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill b980c563 2018-11-27T11:34:27 Reformat all cpp and h files. This applies git cl format --full to all ANGLE sources. Bug: angleproject:2986 Change-Id: Ib504e618c1589332a37e97696cdc3515d739308f Reviewed-on: https://chromium-review.googlesource.com/c/1351367 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Markus Tavenrath 0d665139 2018-11-18T15:47:02 Don't generate TypeInfo objects as static objects within GetTypeInfo function Generating static objects within a function results in multithread safe code. This code generates the static objects upon the first execution of the line which declares the object. This results in high runtime cost for synchronization and a bigger code size. Instead introduce a new function uint32_t GetPackedTypeInfo(GLenum type) which returns a packed representation for the Type class. This representation is usually returned in a register on the assembly level. As a result we save constant storage for the TypeInfo object and one indirection when reading any value from this object. The Type constructor accepts the packed representation and unpacks it an inline function. For fields which are not used the compiler also applies dead code elimination which reduces the cost furthermore. As a result of this change the cost of GetTypeInfo is reduced by a factor of 4-5. Bug: angleproject:2974 Change-Id: I8ed0bf2f09d087fa4cffa04f82e3b7f8c183fe30 Reviewed-on: https://chromium-review.googlesource.com/c/1340221 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 836674c2 2018-11-19T11:45:18 Expose GL_CHROMIUM_compressed_texture_etc on top of ES drivers. This allows Chrome to expose the ETC texture formats in WebGL on top of ANGLE. BUG=angleproject:1552 Change-Id: I6a6c3912791e121826b2083421e37df7c0dc38e7 Reviewed-on: https://chromium-review.googlesource.com/c/1342420 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Frank Henigman d633b156 2018-10-04T23:34:31 Get rid of VertexFormatType. The enum VertexFormatType is redundant with angle::FormatID. The Vulkan back end has already eschewed VertexFormatType, this change updates the D3D back ends. BUG=angleproject:2531 Change-Id: I67ea2203ca80be828f4c757a37810fe67a279364 Reviewed-on: https://chromium-review.googlesource.com/c/1263899 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
Olli Etuaho f2ed2995 2018-10-04T13:54:42 Add support for EXT_texture_compression_bptc After validation, the enums are simply forwarded to the native drivers. The BPTC formats are supported on both OpenGL and D3D. The included test coverage covers the API quite well, but only has basic coverage for correct decoding of texture data. More coverage for texture data could be added later. BUG=angleproject:2869 TEST=angle_end2end_tests Change-Id: I3de37972dcf13c6fa3fc1bc429a2627523a4a082 Reviewed-on: https://chromium-review.googlesource.com/c/1261675 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Yuly Novikov d082819c 2018-06-15T15:51:07 Fix format support conditions This fixes format support tables in formatutils.cpp and formatutilsgl.cpp to conform to the core and extension GLES specs, for a large portion of the formats. ExtsOnly SupportRequirement was enhanced to accept multiple sets of extensions. Format is supported if all the extensions in one of the sets are available. Also fixes determining support for extensions based on those formats. And some fixes to tests which fail due to more strict format support. Bug: angleproject:2567 Change-Id: I6050fff9c597f658fdcea2477bff59a603cdb7e8 Reviewed-on: https://chromium-review.googlesource.com/1105612 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@google.com>
Jamie Madill ba365939 2018-07-18T17:23:46 Rename angle::Format::ID to angle::FormatID. This allow for predeclaring the enum. It solves some include dependency issues. Bug: angleproject:2729 Change-Id: Ibbbab0796e466c62848404ba277c5f454fd9ac62 Reviewed-on: https://chromium-review.googlesource.com/1142299 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill ca2ff38b 2018-07-11T09:01:17 Refactor internal format pixel math methods. This removes the use of the ErrorOrResult class from these methods. This will enable more performant Error handling. Also cleans up the ANGLE_TRY_CHECKED_MATH macro to be more general. Bug: angleproject:2713 Change-Id: I349947d320907839ca88ec1f9251e6ddc3858a08 Reviewed-on: https://chromium-review.googlesource.com/1128920 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Geoff Lang cb8a921b 2018-06-28T12:30:36 Vulkan: Support RGB/BGR backbuffers emulated on RGBA/BGRA. BUG=angleproject:2692 BUG=angleproject:2523 BUG=angleproject:2715 BUG=angleproject:2716 Change-Id: I538b385f8b66fb97e176953b0fc4a6299849c005 Reviewed-on: https://chromium-review.googlesource.com/1118713 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Luc Ferron <lucferron@chromium.org>
Yuly Novikov f15f886c 2018-06-04T18:59:41 Differentiate texture and renderbuffer framebuffer attachment capabilities ANGLE used to describe the abitily to attach textures and renderbuffers of a specific format to a framebuffer using a single notion of "renderable". However, for some formats, only one can be supported, but not the other. Split TextureCaps::renderable into textureAttachment and renderbuffer. Also, split InternalFormat::renderSupport into textureAttachmentSupport and renderbufferSupport. The only functional change is in a few places which now explicitly check for texture or renderbuffer attachement support. Information in format support tables was duplicated for the two capabilities, so behavior should remain the same. It should be corrected in future CLs. Note: additional information in those tables may need to be added in order to properly support GenerateMipmap and TexStorage2DMultisample, this is beyond the scope of this CL. Bug: angleproject:2567 Change-Id: I18bce4100525be35709d8bbf4de08ec812aab502 Reviewed-on: https://chromium-review.googlesource.com/1086491 Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Frank Henigman 95fb2a17 2018-05-27T20:17:05 Add vertex formats and lookup function. Add an angle::Format for each ES2 vertex data format. Add function GetVertexFormatID() to get the angle::Format for a vertex attribute. These will be used later to support vertex formats in Vulkan (by mapping angle::Format to Vulkan format) and to eliminate the redundant enum gl::VertexFormatType. No functional change. BUG=angleproject:2405 BUG=angleproject:2531 Change-Id: I871ae23ce9fba57d90c554376e84b03f8514f7fc Reviewed-on: https://chromium-review.googlesource.com/1044874 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
Geoff Lang b0e9ddb5 2018-05-23T11:30:04 Refactor a hex streaming into a generic FmtHex function. The length of the printed value can be determined from size of the type. BUG=angleproject:2546 Change-Id: I39a4f9550f381dd82183f50019b3f7d117c52472 Reviewed-on: https://chromium-review.googlesource.com/1070220 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jeff Gilbert 31d3deb4 2018-05-18T18:32:16 Add `formatType` arg to computeSkipBytes. Fix texture upload format tests: - Format tests should definitely run on ES3 also. - Also set filters to NEAREST since some formats aren't filterable. - Fix RGB9_E5 test reference encoding and add a test for it. - True int/uint textures require i/usamplers. Bug: angleproject:2576 Change-Id: Ia5bac34cdee6554a88db339de443689a71a0cf70 Reviewed-on: https://chromium-review.googlesource.com/1068142 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang e88e4548 2018-05-03T15:05:57 Implement extensions exposing ETC2 compressed texture formats in ES2. BUG=angleproject:2527 Change-Id: I000f68366de4119375b6d3c79bc2eff3ebd5db9e Reviewed-on: https://chromium-review.googlesource.com/1042885 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang e24032a2 2018-03-28T15:41:46 The 'format' of unsized SRGB internal formats should be SRGB too. EXT_sRGB requires calling TexImage with SRGB as the 'format' parameter. This was causing issues when we would take an InternalFormat struct representing an unsized sRGB format and be unable to use it's format member to make GL calls without transforming it. BUG=693090 Change-Id: I8b9baf2591a998a0088e5275f42ffc568e37100d Reviewed-on: https://chromium-review.googlesource.com/984965 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Lingfeng Yang 56e9540a 2018-02-19T16:45:26 GLES1: caps: Allow ES1 to use formats from core ES2 BUG=angleproject:2306 Change-Id: I93e85f3014e7d9a645e13d3c3025b5360e2a63db Reviewed-on: https://chromium-review.googlesource.com/925550 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Nico Weber b5db2b49 2018-02-12T15:31:56 Enable -Wimplicit-fallthrough for ANGLE. Also teach MSVC that ANGLE_CRASH() can't return. Also fix instances of the warning in build configurations where UNREACHABLE() can return (e.g. release without dcheck_always_on or debug). If the UNREACHABLE()s are truly unreachable, this change has no behavior change. Bug: chromium:810767 Change-Id: I68f3587cf3e268c3ef634dce7ae3d70399859d0f Reviewed-on: https://chromium-review.googlesource.com/914842 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Nico Weber <thakis@chromium.org> Commit-Queue: Nico Weber <thakis@chromium.org>
Olli Etuaho ceffd20c 2018-01-08T16:39:45 Set colorspace of D3D pbuffers according to DXGI format When a EGL pbuffer is created based on a D3D SRGB texture using EGL_ANGLE_d3d_texture_client_buffer, SRGB conversions are performed as if it was an SRGB surface. The value of EGL_GL_COLORSPACE now reflects that correctly. If the pbuffer is bound to a texture and used as a framebuffer attachment, querying GL_FRAMEBUFFER_COLOR_ATTACHMENT also reflects that correctly. The behavior is the same on both the D3D backend, where there is no native interop involved, and on the GL backend using WGL_NV_DX_interop(2). There are a few limitations on the GL backend that relies on native interop: 1. SRGB conversion for textures created this way can't be disabled using the GL_FRAMEBUFFER_SRGB_EXT toggle that's exposed in ANGLE through EXT_sRGB_write_control. This is now documented in the EGL_ANGLE_d3d_texture_client_buffer spec. On the D3D backend this is not a problem since EXT_sRGB_write_control is not supported either way. 2. Creating a pbuffer out of a D3D11 texture with the format DXGI_FORMAT_B8G8R8A8_UNORM_SRGB does not work, even though it was listed as one of the supported formats in the EGL_ANGLE_d3d_texture_client_buffer spec. It's now mentioned that support for this format is optional. BUG=angleproject:2300 TEST=angle_white_box_tests Change-Id: I70ee0646680805e4469291a5b2ce59e92fda009e Reviewed-on: https://chromium-review.googlesource.com/866743 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill acf2f3ad 2017-11-21T19:22:44 Apply Chromium style fixes. This addresses several minor code quality issues that are validated in Chromium, but not yet applied to ANGLE: * constructors and destructors must be defined out-of-line * auto is not allowed for simple pointer types * use override everywhere instead of virtual * virtual functions must also be defined out-of-line Slightly reduces binary size for me (~2k on Win, 150k on Linux). Bug: angleproject:1569 Change-Id: I073ca3365188caf5f29fb28d9eb207903c1843e6 Reviewed-on: https://chromium-review.googlesource.com/779959 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jeff Gilbert 48590358 2017-11-07T16:03:38 Remove formatType arg from computeCompressedImageSize. BUG=angleproject:2230 Change-Id: Ie291ba05efa89bc4ea52966e975d5a21431a461f Reviewed-on: https://chromium-review.googlesource.com/757877 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 86f8116b 2017-10-30T15:10:45 Make compressed texture format extensions enableable. Fix allowing CompressedTexSubImage calls on ETC1 texture types (disallowed in the extension spec). BUG=angleproject:1523 Change-Id: Ic90175ff4626da0170b6c94f204a9d31fd0154a7 Reviewed-on: https://chromium-review.googlesource.com/744443 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang d84a00b9 2017-10-27T17:27:26 Make GL_OES_rgb8_rgba8 enableable. Allow unsized RGB/UNSIGNED_BYTE without the rgb8rgba8 extension. BUG=angleproject:1523 Change-Id: Ic7b4236c7b8389952b093719f26840ea2bbd01bf Reviewed-on: https://chromium-review.googlesource.com/742501 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang c71ea661 2017-09-26T17:06:02 Return HALF_FLOAT as an implementation read type in ES3. BUG=765953 Change-Id: I4dc79921766975cd75c489887b7e57ec4666fbbb Reviewed-on: https://chromium-review.googlesource.com/685897 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Kenneth Russell 6938285b 2017-07-21T16:38:44 Fix BlitFramebuffer validation for BGRA sources and targets. It is legal to blit between GL_RGBA8 and GL_BGRA8 sources and destinations when resolving multisampled renderbuffers. Expand BlitFramebuffer's validation to handle this case. Query GL_MAX_VERTEX_OUTPUT_COMPONENTS on the Core Profile to work around an error generated on macOS when querying GL_MAX_VARYING_COMPONENTS. Expand the BlitFramebuffer tests to cover these cases and start running them on the OpenGL backend. Fix detectition of multisampled D3D11 rendertargets when the sample count is 1. BUG=angleproject:891 Change-Id: Ief5531756651caa66f612e647d3d5c05c8c51ff5 Reviewed-on: https://chromium-review.googlesource.com/587459 Reviewed-by: Kenneth Russell <kbr@chromium.org>
Corentin Wallez 26cf35a8 2017-07-26T11:01:02 Revert "Fix BlitFramebuffer validation for BGRA sources and targets." This reverts commit 17d270311efcd8c72f251a67e726518278e81c26. Reason for revert: - New test fails on NVIDIA and AMD on Windows when using the backbuffer FAST_PATH. - SetUp code ASSERT_GL_NO_ERROR (line 269) but a GL error happens on all Windows and Linux Intel OpenGL. Original change's description: > Fix BlitFramebuffer validation for BGRA sources and targets. > > It is legal to blit between GL_RGBA8 and GL_BGRA8 sources and > destinations when resolving multisampled renderbuffers. Expand > BlitFramebuffer's validation to handle this case. > > Work around a bug in macOS' OpenGL driver querying the number of > samples for GL_BGRA8. > > Query GL_MAX_VERTEX_OUTPUT_COMPONENTS on the Core Profile to work > around an error generated on macOS when querying > GL_MAX_VARYING_COMPONENTS. > > Expand the BlitFramebuffer tests to cover these cases and start > running them on the OpenGL backend. > > BUG=angleproject:891 > > Change-Id: I4829585d2b6428ce0bc7509c4734d33709a0930b > Reviewed-on: https://chromium-review.googlesource.com/582268 > Commit-Queue: Geoff Lang <geofflang@chromium.org> > Reviewed-by: Kenneth Russell <kbr@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> TBR=geofflang@chromium.org,kbr@chromium.org Change-Id: I220bc482194cf7fad5e7e732a6d043ce0d504d79 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:891 Reviewed-on: https://chromium-review.googlesource.com/586428 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Kenneth Russell 17d27031 2017-07-21T16:38:44 Fix BlitFramebuffer validation for BGRA sources and targets. It is legal to blit between GL_RGBA8 and GL_BGRA8 sources and destinations when resolving multisampled renderbuffers. Expand BlitFramebuffer's validation to handle this case. Work around a bug in macOS' OpenGL driver querying the number of samples for GL_BGRA8. Query GL_MAX_VERTEX_OUTPUT_COMPONENTS on the Core Profile to work around an error generated on macOS when querying GL_MAX_VARYING_COMPONENTS. Expand the BlitFramebuffer tests to cover these cases and start running them on the OpenGL backend. BUG=angleproject:891 Change-Id: I4829585d2b6428ce0bc7509c4734d33709a0930b Reviewed-on: https://chromium-review.googlesource.com/582268 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Olli Etuaho 50c562de 2017-06-06T14:43:30 Re-land: Don't expose non-conformant multisampling modes on GL Re-landing with a fallback for failed internal format queries to work around issue seen on Shield TV. Also fixed wrong handling of integer RG formats in isRequiredRenderbufferFormat. Some NVIDIA GL drivers expose non-conformant multisampling modes. The conformance of multisampling modes can be queried using the extension NV_internalformat_sample_query. Use it to filter out the non-conformant modes from the modes that are exposed by ANGLE. The MAX_SAMPLES value and other similar values stored in caps also need to be lowered to match the maximum number of samples exposed for required formats. There seems to be an NVIDIA driver bug related to querying STENCIL_INDEX8 multisample format. Work around this by querying DEPTH24_STENCIL8 instead. There's also some confusion around whether RGB9_E5 should be renderable. Once the floating point texture extensions got rolled into the core GL spec, it was eventually made clear that RGB9_E5 is intended not to be renderable. The extension specs that predate float textures in the core spec do suggest that it would be renderable, but in practice drivers that advertise the extension strings don't reliably implement RGB9_E5 as renderable. Solve this by disabling it as a renderable format and adding an explanatory comment. BUG=chromium:682815 TEST=angle_end2end_tests, dEQP-GLES31.functional.state_query.internal_format.renderbuffer.* Change-Id: I727f03045a1534d6764b571e6d839243705d25b3 Reviewed-on: https://chromium-review.googlesource.com/551957 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yuly Novikov c8a8b843 2017-06-28T01:16:41 Revert "Don't expose non-conformant multisampling modes on GL" This reverts commit 3cd0dd370f08e7126fe19b761206280c64f80cd1. Reason for revert: crashes on NVIDIA Shield TV https://build.chromium.org/p/chromium.gpu.fyi/builders/Android%20Release%20%28NVIDIA%20Shield%20TV%29/builds/1816 Original change's description: > Don't expose non-conformant multisampling modes on GL > > Some NVIDIA GL drivers expose non-conformant multisampling modes. The > conformance of multisampling modes can be queried using the extension > NV_internalformat_sample_query. Use it to filter out the > non-conformant modes from the modes that are exposed by ANGLE. > > The MAX_SAMPLES value and other similar values stored in caps also > need to be lowered to match the maximum number of samples exposed > for required formats. > > There seems to be an NVIDIA driver bug related to querying > STENCIL_INDEX8 multisample format. Work around this by querying > DEPTH24_STENCIL8 instead. > > There's also some confusion around whether RGB9_E5 should be > renderable. Once the floating point texture extensions got rolled > into the core GL spec, it was eventually made clear that RGB9_E5 > is intended not to be renderable. The extension specs that predate > float textures in the core spec do suggest that it would be > renderable, but in practice drivers that advertise the extension > strings don't reliably implement RGB9_E5 as renderable. Solve this > by disabling it as a renderable format and adding an explanatory > comment. > > BUG=chromium:682815 > TEST=angle_end2end_tests, > dEQP-GLES31.functional.state_query.internal_format.renderbuffer.* > > Change-Id: I2218e3a23ea7b48a0615fea77a91897dc7d5fe9e > Reviewed-on: https://chromium-review.googlesource.com/525515 > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> TBR=geofflang@chromium.org,jmadill@chromium.org,cwallez@chromium.org,oetuaho@nvidia.com # Not skipping CQ checks because original CL landed > 1 day ago. Bug: chromium:682815 Change-Id: I1ebdf52c3fab1526f5a561ac4c8555e305ef2243 Reviewed-on: https://chromium-review.googlesource.com/551164 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Olli Etuaho 3cd0dd37 2017-06-06T14:43:30 Don't expose non-conformant multisampling modes on GL Some NVIDIA GL drivers expose non-conformant multisampling modes. The conformance of multisampling modes can be queried using the extension NV_internalformat_sample_query. Use it to filter out the non-conformant modes from the modes that are exposed by ANGLE. The MAX_SAMPLES value and other similar values stored in caps also need to be lowered to match the maximum number of samples exposed for required formats. There seems to be an NVIDIA driver bug related to querying STENCIL_INDEX8 multisample format. Work around this by querying DEPTH24_STENCIL8 instead. There's also some confusion around whether RGB9_E5 should be renderable. Once the floating point texture extensions got rolled into the core GL spec, it was eventually made clear that RGB9_E5 is intended not to be renderable. The extension specs that predate float textures in the core spec do suggest that it would be renderable, but in practice drivers that advertise the extension strings don't reliably implement RGB9_E5 as renderable. Solve this by disabling it as a renderable format and adding an explanatory comment. BUG=chromium:682815 TEST=angle_end2end_tests, dEQP-GLES31.functional.state_query.internal_format.renderbuffer.* Change-Id: I2218e3a23ea7b48a0615fea77a91897dc7d5fe9e Reviewed-on: https://chromium-review.googlesource.com/525515 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Geoff Lang dbcced8e 2017-06-06T15:55:54 When validating image size, use format for SubImage calls. internalFormat is GL_NONE when validating these calls for glTexSubImage and leads to an expected minimum size of 0. Add extra unsized formats that are never supported to the format tables. These are needed for determining the size of input data. BUG=angleproject:2054 Change-Id: Ic827a279a246ff92c9f279232574521692b1c6f2 Reviewed-on: https://chromium-review.googlesource.com/526356 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 8d4db1fa 2017-06-02T14:32:01 Fix format info for unsized RG texture formats. The unsized GL_RED and GL_RG formats are only usable with the EXT_texture_rg extension and are always renderable. BUG=720325 Change-Id: I813662f6c90f1a6a640be747ae40b81727e58cdc Reviewed-on: https://chromium-review.googlesource.com/523023 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 677bb6ff 2017-04-05T12:40:40 Update checks for floating point renderability. * Expose GL_CHROMIUM_color_buffer_float_rgb and GL_CHROMIUM_color_buffer_float_rgba * Fix many texture formats that were incorrectly checking the wrong extension for support or renderability. * Make all floating point texture extensions dynamically enableable. BUG=angleproject:1958 BUG=angleproject:1715 Change-Id: Iefccc8b5ae5edd97623affa9de05b1d9af5c9598 Reviewed-on: https://chromium-review.googlesource.com/468450 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 6d1ccf01 2017-04-24T14:09:58 Re-order the error generation for ES3 TexImage calls. Explictly check if the internal format enum is ever valid before checking if it is valid in combination with other parameters. Some WebGL tests expect a certain order for generated errors. BUG=angleproject:2009 TEST=conformance2/textures/misc/tex-input-validation Change-Id: I31166a78d00629f8281ef53eced72575497ae448 Reviewed-on: https://chromium-review.googlesource.com/486099 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang ca27139e 2017-04-05T12:30:00 Key the format tables on internal format and type. Keying the format tables on internal format alone is not enough to fully validate the unsized formats which require additional type information. This CL has no functional changes, it just splits the tables and updates the calls to GetInternalFormat info to provide type information when the format is not sized. BUG=angleproject:1523 BUG=angleproject:1958 BUG=angleproject:1228 Change-Id: I37e5201e7f54fa8eca01b8a6e64b11a6b94484e7 Reviewed-on: https://chromium-review.googlesource.com/468449 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Minmin Gong 390208b5 2017-02-28T18:03:06 Implements ETC lossy decode for ETC2 formats. This is the 2nd payload of GL_ANGLE_lossy_etc_decode feature. In this change, RGB8, SRGB8, RGB8A1, and SRGB8A1 formats in ETC2 family can be converted to BC1. BUG=angleproject:1285 Change-Id: I96fe2f07c62716a31d37f20a202b6cabbb4ebbd2 Reviewed-on: https://chromium-review.googlesource.com/447846 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Yuly Novikov d73f852f 2017-01-13T17:48:57 Reland "Replace gl::trace logging with Chromium style logging" Removing one usage of FormatString() and its static buffer. And preparation for Platform logging. Fix incorrect enabling of ERR() calls in UNIMPLEMENTED() and UNREACHABLE(), resulting in increased code size and <iostream> adding 5 static initializers to chrome because of cerr referenced in statically linked translator. BUG=angleproject:1660 Change-Id: I7caa18036118d532e0544f75278602559172ae04 Reviewed-on: https://chromium-review.googlesource.com/431457 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 6a6b09c9 2017-01-12T21:52:29 Revert "Replace gl::trace logging with Chromium style logging" Failing Chromium static initializers check: FAILED linux-release-64/sizes/chrome-si/initializers: actual 8, expected 7, better lower Possibly due to the static initializer for std::array for the log severity types. We should change it to POD. BUG=angleproject:1660 This reverts commit afcc41cee4ff63e7f6c9e60e55fc061adbba7dd4. Change-Id: Ifb362a4af78542608397c7a0b19e6afe076f2cf3 Reviewed-on: https://chromium-review.googlesource.com/427235 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yuly Novikov afcc41ce 2016-12-13T12:59:39 Replace gl::trace logging with Chromium style logging Removing one usage of FormatString() and its static buffer. And preparation for Platform logging. BUG=angleproject:1660 Change-Id: I58192988ad16196706fe48d0c0ab0fd1a10c0210 Reviewed-on: https://chromium-review.googlesource.com/424173 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Kai Ninomiya 02f075c8 2016-12-22T14:55:46 Support EXT_texture_compression_s3tc_srgb on DX11 Also passes WEBGL_compressed_texture_s3tc_srgb conformance on WebGL 1/2 on DX11 BUG=angleproject:1553 BUG=chromium:630498 Change-Id: If1d17b54b1e8b998410079fd217626410015d7f1 Reviewed-on: https://chromium-review.googlesource.com/422585 Commit-Queue: Kai Ninomiya <kainino@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 0c7baf1b 2016-12-19T15:43:10 Implement the WebGL VertexAttribPointer restrictions BUG=angleproject:1523 BUG=chromium:668223 Change-Id: Ic89c476a6c95824069772e22ede596ba85ac8859 Reviewed-on: https://chromium-review.googlesource.com/422347 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang eb66a6e2 2016-10-31T13:06:12 Replace the GLVersion class with gl::Version. Update code to use gl::Version in as many places as possible to ease ES 3.1 support. BUG=angleproject:1588 Change-Id: I3490b53a81027cf849dac551a9cc66ce04506144 Reviewed-on: https://chromium-review.googlesource.com/404946 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 873d00f4 2016-10-06T13:05:57 Change UNREACHABLE to use ASSERT. The ASSERT macro is enabled with ANGLE_RELEASE_ASSERT, so we should use the same behaviour as the normal ASSERT for the other debug macros. Also remove UNREACHABLEs in the format validation code that were being hit silently. Also make some EGL tests skip instead of fail, since they were hitting UNIMPLEMENTED. BUG=angleproject:1332 BUG=angleproject:1540 BUG=angleproject:1340 Change-Id: Ie3347f2bf2459a5831b66827871998d8fbe7d4b2 Reviewed-on: https://chromium-review.googlesource.com/392490 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill ed4d342e 2016-10-03T15:45:35 Make the "FormatMap" a static switch. This map lives in formatutils.cpp, and maps from a {format,type} to an internal format. Convert this into generated code. BUG=angleproject:1389 Change-Id: Ib12750d83d3f8cf8794d6668874cb025f856b5d4 Reviewed-on: https://chromium-review.googlesource.com/392207 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 0e48719f 2016-10-03T16:30:38 formatutils: allow reusing rowPitch computation for depthPitch This should fix a null D3D11 backend draw call performance regression. BUG=651101 Change-Id: I2eb10cddd15f0e7b25b886c89eccd2906e988c72 Reviewed-on: https://chromium-review.googlesource.com/392227 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 886de369 2016-09-27T10:49:35 Factor code between PixelUnpackState and PixelPackState BUG=angleproject:1512 Change-Id: I4c60472d216bfc5198e635d70fd197a5738dde98 Reviewed-on: https://chromium-review.googlesource.com/390133 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez ece7c5a8 2016-09-21T15:28:23 Add validation for the pack buffer in ReadPixels BUG=angleproject:1512 Change-Id: Ia6bac628c35f04bc5d3adfde1569902475519698 Reviewed-on: https://chromium-review.googlesource.com/387668 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 1db8a26b 2016-09-22T13:53:47 Fix warning in standalone in new validation. BUG=angleproject:1512 Change-Id: Ifdb8d4c38e3c90e03eee42ba9fd6390dffd61363 Reviewed-on: https://chromium-review.googlesource.com/388611 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang f607c60a 2016-09-21T11:46:48 Fix validation of ReadPixels format and type. The validation for ReadPixels allows for two combations of format/type: 1. Based on the current framebuffer's component type. * GL_RGBA/GL_UNSIGNED_BYTE if the framebuffer is a normalized (signed or unsigned). * GL_RGBA_INTEGER/GL_INTEGER if the framebuffer is an integer format. * GL_RGBA_INTEGER/GL_UNSIGNED_INTEGER if the framebuffer is an unsigned integer format. * GL_RGBA/GL_FLOAT if the framebuffer is any type of float framebuffer (added in EXT_color_buffer_float). * These combations are detailed in the ES2 spec on pg 105 or ES3 on pg 193. 2. The implementation read format/type returned from glGetIntegerv. * These formats are added by specs, OES_texture_float, EXT_texture_rg, EXT_read_format_bgra, etc. Update the GL and D3D backends to perform the conversion from GL_HALF_FLOAT to GL_HALF_FLOAT_OES. Continue allowing reading as BGRA_EXT to support Skia. Should be removed in the future. BUG=607283 BUG=angleproject:1478 Change-Id: I0312cad4d5f138ab036f383d221f8ccd19a77f6d Reviewed-on: https://chromium-review.googlesource.com/346232 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez c5cacd60 2016-09-14T14:50:24 Implement a separate last row texture unpack buffer upload workaround When uploading textures from an unpack buffer, some drivers expect an extra row paading, causing them to think the pixel buffer is not big enough. We work around this by uploading the last row separately. BUG=angleproject:1512 Change-Id: I52fb8b35dc450b957f1fafb0b405c81bf0504157 Reviewed-on: https://chromium-review.googlesource.com/385193 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang d13ca30d 2016-09-08T09:35:57 Fix incorrect compressed internal format enum. This error was not exposed since compressed formats use different validation paths. Fixed for completeness. BUG=angleproject:1511 Change-Id: I9b44a795b1e43f52555440f776e00bb4b92354ef Reviewed-on: https://chromium-review.googlesource.com/382653 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@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>
Jamie Madill 1e8dcb5f 2016-07-22T12:01:41 Add missing R16 formats to internal format mapping. These were missing and are in the spec. BUG=angleproject:1228 Change-Id: Ife9d311e76662d467d06b7aec4e674f9699b3573 Reviewed-on: https://chromium-review.googlesource.com/362624 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 6dd2843b 2016-07-22T14:28:42 Fix wrong type for GL_STENCIL_INDEX8. This was stored as DEPTH_STENCIL when it should be STENCIL. BUG=angleproject:1228 Change-Id: I34c226a273cf962e83a040630bedbefa0f9ee382 Reviewed-on: https://chromium-review.googlesource.com/362623 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 3f23406a 2016-07-13T15:35:45 Compute row pitch using the size of the input pixel, not the format pixel. For formats that can be loaded with data that has a different size pixel than the internal format (UNSIGNED_INT -> GL_DEPTH_COMPONENT_24) the row length would be computed as rowLength * 3 which is incorrect. BUG=angleproject:1095 Change-Id: I0f60a3bb9bb387d475ddda1389a3b4b6f4973922 Reviewed-on: https://chromium-review.googlesource.com/360214 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill ec0b580d 2016-07-04T13:11:59 Re-land "D3D11: Fix readback of BGRA-backed formats." For some BGRA-backed formats (RGBA4, R5G6B5, RGB5A1), our ReadPixels implementation wasn't aware the BGRA format didn't exactly match the RGBA format. For these it would do the 'fast path' memcpy method, when it should stop and do the slow pixel-by-pixel packing method. Fixes conformance2/reading/read-pixels-from-fbo-test.html. Reland: fix empty format info that was causing us to only see the first pixel in the FBO in a ReadPixels call. Also fix bugs in the unorm 16-bit format readback code, and add ASSERTs to catch bugs in subsequent new formats. BUG=angleproject:1407 BUG=chromium:616176 Change-Id: I9fd55b9e1dd6a306eb4db195d775c02a1eb1f93f Reviewed-on: https://chromium-review.googlesource.com/357132 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 989cac34 2016-06-08T16:18:49 Validate that unpack skip is in bounds Unpack skip needs to be taken into account when determining which part of the unpack buffer is read. This is now done in the out-of-bounds check when validating texture upload calls. Unpack skip code is removed from D3D9 backend, since skip is not supported in GLES2. BUG=angleproject:1411 TEST=angle_end2end_tests Change-Id: I0db4db0877a352613c57e2820e5b650edb5a73ab Reviewed-on: https://chromium-review.googlesource.com/352450 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 95faa233 2016-06-07T14:01:53 Do not apply UNPACK_SKIP_IMAGES for 2D textures on D3D Resubmitted with test skip added for Intel OpenGL. GLES 3.0.4 section 3.8.3: "For the purposes of decoding the texture image, TexImage2D is equivalent to calling TexImage3D with corresponding arguments and depth of 1, except that UNPACK_SKIP_IMAGES is ignored." An "applySkipImages" boolean parameter is added to the functions in the D3D backend that apply skip offset to the unpack pointer. In case 2D texture data is uploaded, the parameter is set to false and UNPACK_SKIP_IMAGES is not applied. BUG=angleproject:1406 TEST=angle_end2end_tests Change-Id: I5878439e3d38dbae89cc2452a056c2d6bbf9e0b3 Reviewed-on: https://chromium-review.googlesource.com/351330 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Geoff Lang a1d6c4dc 2016-06-09T18:00:42 Revert "Do not apply UNPACK_SKIP_IMAGES for 2D textures on D3D" The Windows Intel GPU FYI bot started failing the Texture2DTestES3.UnpackSkipImages2D/ES3_OPENGL test after this CL. Example: https://build.chromium.org/p/chromium.gpu.fyi/builders/Win7%20Release%20%28New%20Intel%29/builds/866 This reverts commit ac3575b27296398baebeb6c891871c6dac7df338. Change-Id: I5120261f5cf1ece9b21e4a94f63f85e014d2d8e4 Reviewed-on: https://chromium-review.googlesource.com/351280 Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill d2b50a0b 2016-06-09T00:13:35 Move ReadPixels logic to helper methods. These routines were pretty much duplicated between D3D9 and D3D11. Since I was going to have to rewrite them again for Vulkan, I figured it would be best to move them into a common location and clean them up a bit. BUG=angleproject:1319 Change-Id: I15d39b052daf3e1020dbd0880f01ae84f3686a0a Reviewed-on: https://chromium-review.googlesource.com/349630 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Olli Etuaho ac3575b2 2016-06-07T14:01:53 Do not apply UNPACK_SKIP_IMAGES for 2D textures on D3D GLES 3.0.4 section 3.8.3: "For the purposes of decoding the texture image, TexImage2D is equivalent to calling TexImage3D with corresponding arguments and depth of 1, except that UNPACK_SKIP_IMAGES is ignored." An "applySkipImages" boolean parameter is added to the functions in the D3D backend that apply skip offset to the unpack pointer. In case 2D texture data is uploaded, the parameter is set to false and UNPACK_SKIP_IMAGES is not applied. BUG=angleproject:1406 TEST=angle_end2end_tests Change-Id: Iedc2b05377adee8d5c2504511a87421f4b1db18d Reviewed-on: https://chromium-review.googlesource.com/350465 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill 4b4cdff8 2016-06-06T13:53:38 Fix unpack parameter validation. BUG=angleproject:1397 Change-Id: Icdfc99eefcfad730ec887b82ec0758a6d6c0b9a7 Reviewed-on: https://chromium-review.googlesource.com/348064 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 513558d3 2016-06-02T13:04:11 Pass depth to computeBlockSize. This was very wrong for 3D textures. BUG=angleproject:1384 Change-Id: I7f042449e30e1e909778c0524d1ce99d20ddfd65 Reviewed-on: https://chromium-review.googlesource.com/348063 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill e2e406c3 2016-06-02T13:04:10 Add base::numerics for safe math and conversions. This replaces are "IsUnsignedXXXSafe" family of methods. Also add overflow checks to unpack block sizes. BUG=angleproject:1397 Change-Id: Ib47be149b0486c70f795b0d0f8899441faac9340 Reviewed-on: https://chromium-review.googlesource.com/348062 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Vincent Lang 25ab4510 2016-05-13T18:13:59 Implement GL_EXT_texture_norm16 extension BUG=angleproject:1365 Change-Id: I972b156ecb41ff44bc1f6365373ab386bacc85f1 Reviewed-on: https://chromium-review.googlesource.com/346530 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 53ea9cc6 2016-05-17T10:12:52 Replace rx::Renderer with rx::ContextImpl. Previously Context had no Impl class, but had a special relationship with the instanced Renderer class. Having a ContextImpl backing every Context will allow new designs to enable things like multithreading (where each ContextImpl stores a Context-specific device) or non- virtual Contexts on Android or other platforms where it is more efficient. A large refactoring patch that touches every back-end. BUG=angleproject:1363 Change-Id: Icb73a7d37447f08a664eeb499a310ba05d71a57e Reviewed-on: https://chromium-review.googlesource.com/342052 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Minmin Gong e3939b98 2015-12-01T15:36:51 D3D11: Transcode ETC1 to BC1. Adds a new extension to allow transcode ETC formats to suitable BC formats. This commit implements ETC1 to BC1. More formats will be supported soon. BUG=angleproject:1285 Change-Id: Iacbfbc2248dfe1aebf24b92696249a9404e331cd Reviewed-on: https://chromium-review.googlesource.com/316511 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Jamie Madill cd089732 2015-12-17T09:53:09 Re-land "Implement GL_EXT_color_buffer_half_float." This exposes previously enabled functionality. Also update the format support check to be: supported: GLES3 || texture extension renderable: supported && color buffer extension filterable: filtering extension (Note: we silently support float rendering in ES2) Re-land with suppression for newly exposed failing test. BUG=angleproject:445 Change-Id: I4e46699e6b0c2ec8a7d8b36f1f598af1ec6420bc Reviewed-on: https://chromium-review.googlesource.com/318931 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 0a90f527 2015-12-17T14:51:56 Revert "Implement GL_EXT_color_buffer_half_float." Failing dEQP-GLES3.functional.fbo.color.repeated_clear.sample.tex2d.rgb16f http://build.chromium.org/p/chromium.gpu.fyi/builders/Win7%20Release%20dEQP%20%28NVIDIA%29/builds/4651 Likely missing a suppression for this test. It likely passed only because the extension was missing and it was passing as not supported. BUG=angleproject:1229 This reverts commit 39f9251daef5c4ddb4b7c413466a092f4a7f21bf. Change-Id: Ia703378d5aaacafc14503aff0b52a795b7eb4467 Reviewed-on: https://chromium-review.googlesource.com/319080 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 39f9251d 2015-12-14T15:34:09 Implement GL_EXT_color_buffer_half_float. This exposes previously enabled functionality. Also update the format support check to be: supported: GLES3 || texture extension renderable: supported && color buffer extension filterable: filtering extension (Note: we silently support float rendering in ES2) BUG=angleproject:1229 Change-Id: Icf0775891d6e336acd1a0ac07c3b37cf6bb0f101 Reviewed-on: https://chromium-review.googlesource.com/308430 Tryjob-Request: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill f06e607f 2015-12-01T10:44:16 Add support for GL_OES_depth32. This will allow ANGLE to be more conformant when it accepts 32-bit depth as a Renderbuffer format. BUG=angleproject:1230 Change-Id: I9336c6f951d280b2332fc3e6d2e640852473aa03 Reviewed-on: https://chromium-review.googlesource.com/313994 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 60ad73dc 2015-10-23T10:08:44 Add ASTC compressed texture format info to the GL layer. BUG=angleproject:1185 Change-Id: Ie723687e0289812d6c2306589911b548ac321e22 Reviewed-on: https://chromium-review.googlesource.com/308491 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 9c970870 2015-10-23T09:31:26 Revert "Add ASTC compressed texture format info to the GL layer." This reverts commit 3bd6e18d1b6545b94bb82c23bcfa076579adf0ce. Change-Id: I44a82cec1757061897f35f3f63dc6bcc09429866 Reviewed-on: https://chromium-review.googlesource.com/308410 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 6ea6f942 2015-09-11T13:11:22 Support GL_ETC1_RGB8_OES. Passes all dEQP tests related to etc1. Reland: Updated to work with the D3D11 renderer and re-tested with chromium's gles2_conform_test. Change-Id: Id2ce1b0eb58129152f67016ce2dc3ab19208269c Reviewed-on: https://chromium-review.googlesource.com/299770 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 3bd6e18d 2015-09-22T09:30:02 Add ASTC compressed texture format info to the GL layer. BUG=angleproject:1185 Change-Id: Ia0bbe85fe8fa2b6a55289ff291f30e215d7a3ba9 Reviewed-on: https://chromium-review.googlesource.com/301146 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Minmin Gong adff67b5 2015-10-14T10:34:45 Re-land "Implements more pack/unpack states." Pack: row length, skip rows, skip pixels. Unpack: image height, skip images, skip rows, skip pixels. Note that PBOs are not covered by this change. Re-land with fix for test expectations. BUG=angleproject:512 BUG=angleproject:1095 Change-Id: I71d8d3bd8fc1f2c75ca16ac2634d5eafcbd71f26 Reviewed-on: https://chromium-review.googlesource.com/305522 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill c7473924 2015-10-14T14:33:19 Revert "Implements more pack/unpack states. Pack: row length, skip rows, skip pixels. Unpack: image height, skip images, skip rows, skip pixels. Note that PBOs are not covered by this change." Expectations still not correct. This removes suppressions for two failing tests: functional.texture.specification.teximage3d_depth_pbo.depth_component32f_2d_array dEQP-GLES3.functional.texture.specification.teximage3d_depth_pbo.depth32f_stencil8_2d_array BUG=angleproject:512 BUG=angleproject:1095 This reverts commit 72e7013e68a24107b9082629fc52d59a78998eb2. Change-Id: Id81b6e616e61535b8504890ce57591813e22af69 Reviewed-on: https://chromium-review.googlesource.com/305521 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Minmin Gong 72e7013e 2015-10-01T17:19:45 Implements more pack/unpack states. Pack: row length, skip rows, skip pixels. Unpack: image height, skip images, skip rows, skip pixels. Note that PBOs are not covered by this change. BUG=angleproject:512 BUG=angleproject:1095 Change-Id: Ia2fd7e52615d4aa08011dd615fcc20b79672d355 Reviewed-on: https://chromium-review.googlesource.com/304908 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 000b2f49 2015-10-09T15:33:14 Revert "Implements more pack/unpack states. Pack: row length, skip rows, skip pixels. Unpack: image height, skip images, skip rows, skip pixels." This is causing failures in dEQP-GLES3.functional.texture.specification.teximage3d_depth_pbo.depth_component24_2d_array First failing build on the bot: http://build.chromium.org/p/chromium.gpu.fyi/builders/Win7%20Release%20dEQP%20%28NVIDIA%29/builds/3635 Please fix the failure and re-land your CL with the fix. BUG=angleproject:512 BUG=angleproject:1095 This reverts commit f1bb3f0569d5ef41b17f8ad0add7308f9d0f0de1. Change-Id: I30f61db888b0adf73a1d98bbeeb2428068119627 Reviewed-on: https://chromium-review.googlesource.com/304990 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Minmin Gong f1bb3f05 2015-10-01T17:19:45 Implements more pack/unpack states. Pack: row length, skip rows, skip pixels. Unpack: image height, skip images, skip rows, skip pixels. BUG=angleproject:512 BUG=angleproject:1095 Change-Id: I11e3bc05d23419b72c92b96aabd3f0bacd983626 Reviewed-on: https://chromium-review.googlesource.com/304370 Tryjob-Request: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Zhenyao Mo 1170e474 2015-09-11T21:48:20 Revert "Support GL_ETC1_RGB8_OES in the OpenGL renderer." This reverts commit 20bf7034533fbd9ff57296c5f9a5b1b9e06059db. Broke GL2ExtensionTests_compressed_etc1_rgb8_texture_input_run on win bots Change-Id: I2b48aac1512d916671d41e03f0409c404d6d7c88 Reviewed-on: https://chromium-review.googlesource.com/299429 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Tested-by: Zhenyao Mo <zmo@chromium.org>
Geoff Lang 20bf7034 2015-09-11T13:11:22 Support GL_ETC1_RGB8_OES in the OpenGL renderer. Passes all dEQP tests related to etc1. Change-Id: I33f37c44396899d87e9ef19bd7a6e2b2482d232a Reviewed-on: https://chromium-review.googlesource.com/299342 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 1024f382 2015-09-11T19:42:02 Revert "Support GL_ETC1_RGB8_OES in the OpenGL renderer." Failing some ES2 dEQP tests. This reverts commit 4aba0b90ec3d2dcd550ed4111f5739191f022028. Change-Id: Ie39055872d25bce0f387e9e983ebab648c0493f0 Reviewed-on: https://chromium-review.googlesource.com/298972 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 4aba0b90 2015-09-11T13:11:22 Support GL_ETC1_RGB8_OES in the OpenGL renderer. Passes all dEQP tests related to etc1. Change-Id: I3ab2d51b7664cb2411fdc3247ff65a9e3258185a Reviewed-on: https://chromium-review.googlesource.com/299340 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 0d8b7247 2015-09-09T14:56:53 Support ETC2 texture formats with RendererGL. 400 tests in dEQP-GLES3.functional.texture go from unsupported to passing. BUG=angleproject:884 Change-Id: I51927dffbc5931c7d1b80e72f55c620197736724 Reviewed-on: https://chromium-review.googlesource.com/298484 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 9bbad18e 2015-09-04T11:07:29 Mark GL_RGB10_A2UI as a renderable format. dEQP-GLES3.functional.fbo.color.tex3d.rgb10_a2ui was already failing but because the framebuffer was marked as unsupported, dEQP considers the test to be passing. BUG=angleproject:1149 BUG=angleproject:1097 Change-Id: I82223e8e927d1fd6d66f75b5fdea7989c92d706d Reviewed-on: https://chromium-review.googlesource.com/298031 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 47f730fa 2015-09-08T14:29:37 Revert "Mark GL_RGB10_A2UI as a renderable format." Fails the dEQP test: dEQP-GLES3.functional.fbo.color.tex3d.rgb10_a2ui BUG=angleproject:1149 This reverts commit d0f9fdc772d0b286a50978f4a16c94e2af3dfee7. Change-Id: I5b76255be3fc1f0734395dac609e2949fc8c8185 Reviewed-on: https://chromium-review.googlesource.com/298010 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang d0f9fdc7 2015-09-04T11:07:29 Mark GL_RGB10_A2UI as a renderable format. BUG=angleproject:1149 Change-Id: Ia808c0d411133d135eef8e90485ba346086f012c Reviewed-on: https://chromium-review.googlesource.com/296964 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 09e2d93b 2015-07-14T16:40:31 D3D11: Futher optimize input layout cache. *re-land with fix for matrix attributes* *re-re-land with fix for attributes with BindAttribLocation* Using the new vertex format type enum, we can shrink the size of the input layout tables and reduce draw call overhead further. BUG=angleproject:959 Change-Id: I181acd3d7d519f5587cbe180fb1bca8530b7cfc2 Reviewed-on: https://chromium-review.googlesource.com/285348 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 6d45a999 2015-07-14T15:16:57 Revert "D3D11: Futher optimize input layout cache." Causing assertion failures in WebGL CTS in debug. Example build: https://build.chromium.org/p/chromium.gpu.fyi/builders/Win7%20Debug%20%28NVIDIA%29/builds/10215 This reverts commit 2ee580f10052c03a3a0e8c535bd7da82147133c3. Change-Id: Idffcd848adb6898f77b3c758b214eb31ca1f6e05 Reviewed-on: https://chromium-review.googlesource.com/285326 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 2ee580f1 2015-07-10T11:14:58 D3D11: Futher optimize input layout cache. *re-land with fix for matrix attributes* Using the new vertex format type enum, we can shrink the size of the input layout tables and reduce draw call overhead further. BUG=angleproject:959 Change-Id: I6d8ad78a003c41f40e7e1caa5972838f8ff4fce8 Reviewed-on: https://chromium-review.googlesource.com/284811 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Olli Etuaho 0d208976 2015-07-10T15:45:09 Revert "D3D11: Futher optimize input layout cache." This seems to have broken some dEQP tests in debug build, possibly uncovering a previously undetected bug. TEST=dEQP-GLES3.functional.shaders.linkage.varying.basic_types.* This reverts commit d2328a5246d8e0ab8a3dde1b30b80ce5e161e6f3. Change-Id: I9f082d7a6fca38b4c076fecc342ac40d5416ebef Reviewed-on: https://chromium-review.googlesource.com/284780 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill d2328a52 2015-07-09T11:30:30 D3D11: Futher optimize input layout cache. Using the new vertex format type enum, we can shrink the size of the input layout tables and reduce draw call overhead further. BUG=angleproject:959 Change-Id: Iea595fa64edbbd91f669138dfdeb9d2543b83929 Reviewed-on: https://chromium-review.googlesource.com/277291 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill d3dfda2b 2015-07-06T08:28:49 Refactor how we store vertex formats. Instead of storing a vertex format as a struct with the full info, instead use an enum, and look up the info when we need it. This saves a lot of constructor initialization time, operator comparison time, and storage. It also will allow us to look up D3D format info more quickly. BUG=angleproject:959 Change-Id: I202fd1ea96981073bc1b5b232b1ec3efa91485cb Reviewed-on: https://chromium-review.googlesource.com/277289 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@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>
Olli Etuaho 11ffe1b8 2015-03-24T17:28:18 Micro-optimize math in IndexDataManager Use bitwise operations instead of division, which is expensive on multiple CPU architectures. BUG=angleproject:956 TEST=angle_end2end_tests Change-Id: I57ab540d447c03dae5a96bafb4975fc37e310261 Reviewed-on: https://chromium-review.googlesource.com/262181 Tested-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Nicolas Capens <capn@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 31f8f4f5 2015-03-25T16:03:57 Use switch/case in GetTypeInfo instead of a map lookup This should be faster, and also matches the C++ style rules better: static variables should not have complex class types. BUG=angleproject:956 TEST=angle_end2end_tests, WebGL conformance tests Change-Id: I628db95febab309e241be216e2998305525da76e Reviewed-on: https://chromium-review.googlesource.com/262421 Tested-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Minmin Gong b8aee3bc 2015-01-27T14:42:36 Add UNPACK_ROW_LENGTH support to D3D11 renderer Change-Id: I31ccffddcb04a45f19d3c3eb9a396c30e794b218 Reviewed-on: https://chromium-review.googlesource.com/243951 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Minmin Gong <mgong@microsoft.com>