src/libANGLE/renderer/d3d/d3d11/texture_format_table.cpp


Log

Author Commit Date CI Message
Jamie Madill 4f57e5f9 2016-10-27T17:36:53 D3D11: Make several format tables constexpr. This should guarantee the best memory access patterns. It introduces some indirections for some format queries, but most of these should be direct array lookups, or used infrequently. We can optimize this later if necessary. BUG=angleproject:1389 Change-Id: I5e2c8c530a07798494afd3ea36b6164d7564c02c Reviewed-on: https://chromium-review.googlesource.com/403314 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 0ea0caeb 2016-08-10T12:39:29 Move load functions table to renderer layer. We will be able to use it for the Vulkan formats table. BUG=angleproject:1455 Change-Id: Iddc09fe560b06880af72a6fa8eb03fa2792e2f8c Reviewed-on: https://chromium-review.googlesource.com/367454 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 17605b61 2016-08-10T11:48:29 Replace DXGI with ANGLE format in the load tables. BUG=angleproject:1455 Change-Id: I851848d8a28bd70ff921d76b19902f40a5e8b17d Reviewed-on: https://chromium-review.googlesource.com/367453 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill b2e4863c 2016-08-09T18:08:03 Replace std::map with switch in load functions. BUG=angleproject:1455 Change-Id: Ica74ea5503efc0315bc4d98aa322da523a30b24c Reviewed-on: https://chromium-review.googlesource.com/367696 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 9a39224b 2016-08-09T11:10:31 D3D11: Move the swizzle format set into ANGLEFormatSet. The only piece of data left in the d3d11::TextureFormat is the initializer function, which could just as easily be in the ANGLEFormatSet. BUG=angleproject:1455 Change-Id: Iee8eb84f71807575c2a46bf4fcbf283aa1b7f565 Reviewed-on: https://chromium-review.googlesource.com/367090 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill a5b1561e 2016-08-09T11:10:27 Place format info in angle::Format. Some bits of information, like the copy functions and mipmap gen functions, can be shared across back-ends in the angle::Format class. Also name the info struct angle::Format, and use an enum class angle::Format::ID to identify the particular format. This patch introduces a new table generator for angle formats and updates the D3D11 generator accordingly. BUG=angleproject:1455 Change-Id: I13b8b98822b1186c6a9e436dc232c18fef50980c Reviewed-on: https://chromium-review.googlesource.com/365824 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 20f69ce5 2016-08-09T11:10:26 Introduce angle::Format enum. This general enum can encapsulate different formats between GL/Vulkan/D3D9/D3D11/etc so we can use them in common routines like PackPixels. It also can help us get rid of the ANGLEX enums which we use to represent internal formats not present in GL. It is currently used for Textures/Renderbuffers/Surfaces, but can also be extended in the future to cover things like vertex formats. It mirrors something like a DXGI_FORMAT in D3D11 or VkFormat. BUG=angleproject:1455 Change-Id: I467d7b36d8fc92bb45239d56b9243d06f4e29378 Reviewed-on: https://chromium-review.googlesource.com/365413 Reviewed-by: Zhenyao Mo <zmo@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 f7ccaf73 2016-08-03T14:10:04 D3D11: Move texture format code out of the python script. It's better to maintain the code outside of a generator script. It gives easier formatting and updating. BUG=angleproject:1455 Change-Id: I2b4383f1ed01545004de10024d03879201e2bf41 Reviewed-on: https://chromium-review.googlesource.com/365410 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 15e890e6 2016-02-08T16:06:11 Remove unused texture format source files These files are not included in the build, they have been replaced by autogenerated files. TEST=build on Windows Change-Id: I6b8448d6f2426bc05c01b7ec6db605e6047ee207 Reviewed-on: https://chromium-review.googlesource.com/326660 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
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 de6144f1 2015-10-20T10:55:44 Add support for EAC and ETC2 texture formats with D3D11. Passes: * dEQP-GLES3.functional.implementation_limits.num_compressed_texture_formats * dEQP-GLES3.functional.implementation_limits.compressed_texture_formats * dEQP-GLES3.functional.texture.*eac* * dEQP-GLES3.functional.texture.*etc2* BUG=angleproject:598 Change-Id: Iaec1756b540f8f44c821fd8b9ba63f115ebe6de0 Reviewed-on: https://chromium-review.googlesource.com/305520 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 9bf70365 2015-09-30T15:07:48 Fix a possible OOB read in InsertD3D11FormatInfo. It's unclear how this might happen, as it's during static map init, but add a fail-safe to be sure. BUG=526779 Change-Id: I5aa33f9bed30d4a8c1e9937a0b8c5fd11a7503d7 Reviewed-on: https://chromium-review.googlesource.com/302385 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tryjob-Request: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
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>