src/tests/gl_tests/D3D11FormatTablesTest.cpp


Log

Author Commit Date CI Message
Jamie Madill 7b62cf97 2017-11-02T15:20:49 Refactor TextureFormatMap to store an array. std::map lookups are already showing up as a hot spot during some profile trace analysis. We can elimintate these by only doing a single switch at the entry point level to convert the GL internal format to an internal identifier or type info pointer. This change doesn't completely fix the hot spot, since now we are doing multiple switch statements, but it does remove the std::map storage in TextureCapsMap. It replaces it with a flat std::array indexed by angle::Format::ID, and gives us the option in the future to eliminate all by one switch statement. This should allow for a faster texture caps implementation in Vulkan. This also fixes the missing ANGLE format entries for ETC1 compressed formats. BUG=angleproject:2207 Change-Id: I74ea2082e582a6790d5fde90e33246a618a2da0e Reviewed-on: https://chromium-review.googlesource.com/742375 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@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>
Jamie Madill b7fe49db 2016-10-05T16:39:11 D3D11: Fold mipmap gen caps into the support table. This change is two-fold: first it allows us to remove the std::map for D3D11 format info, which was only being used in a single place. Secondly, it fixed the support table to use the correct 9_3 caps for texture support, determined by running the D3D11FormatTablesTest. This should reduce the number of format queries we need to run on 9_3 startup. BUG=angleproject:1389 BUG=angleproject:1459 Change-Id: I2435a47fc221e73c96337bc7c1c4ed37b527bc1f Reviewed-on: https://chromium-review.googlesource.com/392210 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 8cf70d55 2016-08-09T11:10:35 D3D11: Rename ANGLEFormatSet to Format. BUG=angleproject:1455 Change-Id: I896b3ed2d5e4ff3ad72de9a3a4b554841129e4e9 Reviewed-on: https://chromium-review.googlesource.com/367093 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill c98cd326 2016-08-09T11:10:33 D3D11: Merge d3d11::TextureFormat and ANGLEFormatSet. BUG=angleproject:1455 Change-Id: I7fc2640ec9d73528feb526b4d8b89cabccda4d17 Reviewed-on: https://chromium-review.googlesource.com/367092 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 17b10a9a 2016-08-03T14:10:06 D3D11: Store more format info by-reference. This CL stores the d3d11::TextureFormat by reference in the texture storage. Adding the internalFormat to the TextureFormat allows us to store a single ref instead of three per TextureStorage11. Also store the format sets in a d3d11::TextureFormat by-ref instead of by-pointer, making the code a bit cleaner. BUG=angleproject:1455 Change-Id: I3c0e966d948c694435577d7d45dc0cd156480cdb Reviewed-on: https://chromium-review.googlesource.com/365412 Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Geoff Lang <geofflang@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>
Olli Etuaho 1a4523f3 2016-03-18T15:33:55 Avoid copying of texture format info structures Use const pointers to the statically allocated structures instead of copying them in TextureStorage11. This avoids the cost of copying and saves a little bit of memory. BUG=angleproject:1244 TEST=angle_end2end_tests Change-Id: Ib59fddd68ba9bc53e491d55683416c0661f26e0e Reviewed-on: https://chromium-review.googlesource.com/333930 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho f434906c 2016-02-22T14:53:26 Group D3D11 DXGI format info under a struct This patch refactors how DXGI format info is stored. The goal is to make it easier to make changes that affect both swizzle formats and regular texture formats, and make it easier to pass the format sets around. BUG=angleproject:1244 TEST=angle_end2end_tests Change-Id: I1cc220bccbbdde9200a41829fdc37c8ec123c6a1 Reviewed-on: https://chromium-review.googlesource.com/329072 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 6151af8c 2016-02-19T15:22:07 Remove renderFormat from TextureFormat structure The renderFormat is only ever needed in renderer11_utils when determining which multisample sample counts a format supports. Determine the renderFormat in the context where it is needed instead of storing it in the TextureFormat structure. Extra fallbacks can also be removed from the code. The D3D11FormatTablesTest is restructured so that it doesn't need to use the renderFormat field. This refactoring is done to make it simpler to expand usage of the ANGLE format enumeration in the C++ code. BUG=angleproject:1244 TEST=angle_end2end_tests, dEQP-GLES3.functional.fbo.* (no regressions) Change-Id: I980152eb2f3fdaaa1cc5b08e3c9b695c1625e9e5 Reviewed-on: https://chromium-review.googlesource.com/328680 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Dian Xiang db3dd083 2015-09-16T20:16:01 Refactoring TextureFormat and its helper functions to individual classes BUG=angleproject:1160 This is the first step to BUG=angleproject:1160, optimizing GetTextureFormatInfo to use static switching rather than building maps and using the find function. Also reordered the includes in alphabetical, src files first format The next step is to modify the GetTextureFormatInfo not to build a map but to use static switching. The step after that is to use a JSON generator to generate the switching, hence refactoring TextureFormat to be in its own class so we only need to generate what's necesary. The helper functions such as swizzle texture format can also be done using the same approach. Hence, they're also refactored into their own files. Change-Id: I753f437ca0df69ee5584d254fe0d2ea8b09a857e Reviewed-on: https://chromium-review.googlesource.com/300288 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tryjob-Request: Jamie Madill <jmadill@chromium.org> Tested-by: Dian Xiang <dianx@google.com>
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>
Jamie Madill 5d121e1e 2015-06-10T18:56:04 Add generated tables to mirror D3D11 format support. *re-land with fix for test build* These tables can save us on startup time. Instead of querying the tables, we can keep certain assumptions about texture formats because certain formats are guaranteed to be supported in various feature levels. Testing with angle_perftests indicates this patch series will save about 50% of the time we spend in Renderer11::initializeDevice. BUG=angleproject:1014 Change-Id: I5477eea3e8433d36119cd099fb0c08eea168489a Reviewed-on: https://chromium-review.googlesource.com/276758 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 00787935 2015-06-10T22:52:51 Revert "Add generated tables to mirror D3D11 format support." Hidden conflict with Geoff's test refactor patch. BUG=angleproject:1014 This reverts commit 396ee48b639189465039cd62ef8409e86d5f6dd1. Change-Id: I8182acb350b61b31f4040a20c86652e23706905a Reviewed-on: https://chromium-review.googlesource.com/276774 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 396ee48b 2015-06-10T14:54:07 Add generated tables to mirror D3D11 format support. These tables can save us on startup time. Instead of querying the tables, we can keep certain assumptions about texture formats because certain formats are guaranteed to be supported in various feature levels. Testing with angle_perftests indicates this patch series will save about 50% of the time we spend in Renderer11::initializeDevice. BUG=angleproject:1014 Change-Id: I84dbeaba1d1c635ad60c8413705cc41af8a51f06 Reviewed-on: https://chromium-review.googlesource.com/275772 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>