src/libANGLE/renderer/gen_angle_format_table.py


Log

Author Commit Date CI Message
Jamie Madill 2bfc4119 2016-10-28T11:48:54 Put angle::Format table in a cpp file. The best practice is to expose a non-constexpr query function and hide the constexpr table in a cpp, so it won't be included verbatim in multiple other source files. BUG=angleproject:1389 Change-Id: Ic4e19d14c832643be1552c5a14e441826c41970f Reviewed-on: https://chromium-review.googlesource.com/404478 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
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 e0548ad2 2016-10-06T15:55:35 D3D11: Split off DXGI component type query. This query is currently a part of a std::map. Split it off to its own switch using auto-generation based on the format string. Also introduce a DXGI-to-angle format map. This map is not totally complete because some more esoteric formats don't have corresponding ANGLE formats yet. We should add these other formats (EG NV12) if we need them. BUG=angleproject:1389 BUG=angleproject:1459 Change-Id: I49e045bdc04a52166299c9e22a4c4d3f24069dbc Reviewed-on: https://chromium-review.googlesource.com/392209 Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill b80a5e9c 2016-10-05T16:39:09 Store channel bits info in angle::Format. This allows us to delete some duplicated code in the D3D11-side. BUG=angleproject:1389 BUG=angleproject:1459 Change-Id: Ifdcfcd4a56e06ff2ae8f5ca0bda72281d52c2964 Reviewed-on: https://chromium-review.googlesource.com/392208 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill c99518fc 2016-08-09T11:10:38 Move default ANGLE format map to shared location. This default format mapping serves as a base for a Renderer format mapping. Any formats that require emulation or other representation in a Renderer can be overridden in the renderer layer. BUG=angleproject:1455 Change-Id: I47f070c2ea132bada9cc0fc4353b89b74b8ee8f3 Reviewed-on: https://chromium-review.googlesource.com/367692 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill a5ac1e16 2016-08-09T11:10:28 D3D9: Use angle::Format when possible. This will unify the way we call into PackPixels and also cleans u the code. It required adding a few D3D9-specific formats to the table. BUG=angleproject:1455 Change-Id: Ic8282f40f52cabdb2925e2bb305c26582284082d Reviewed-on: https://chromium-review.googlesource.com/365825 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Zhenyao Mo <zmo@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>