src/libANGLE/renderer/d3d/d3d9/formatutils9.cpp


Log

Author Commit Date CI Message
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>
Yunchao He f81ce4a3 2017-04-24T10:49:17 Refactoring: replace NULL by nullptr for pointers (3rd CL). This CL mainly handles passing/returning NULL to/from a function. BUG=angleproject:2001 Change-Id: I34802f792e710e3d7ff697cbe4701dc1bf5ab009 Reviewed-on: https://chromium-review.googlesource.com/485060 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 032e3702 2016-10-31T16:14:14 D3D9: Make GetD3DFormatInfo constexpr. This removes another static global map initializer. BUG=angleproject:1389 BUG=angleproject:1459 Change-Id: I302f349ea4e95d079077866a07b0d57758c40892 Reviewed-on: https://chromium-review.googlesource.com/405488 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Geoff Lang <geofflang@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 30712068 2016-08-09T11:10:36 Move fast copy functions into angle::Format. These tables were duplicated in D3D11 and D3D9, and would have to be further duplicated into Vulkan. BUG=angleproject:1455 Change-Id: Ice1b81417d7b14f933b61861c4a9997c260ef72e Reviewed-on: https://chromium-review.googlesource.com/367690 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>
Geoff Lang 5695fc99 2016-07-05T14:47:30 Clean up the SSE detection logic. * Include the correct header right in the SSE check in platform.h. * Don't use separate SSE versions of the load functions, have them use SSE automatically. BUG=612205 Change-Id: I70f9a5513e144db4d16c1f3ad922debeb6c50268 Reviewed-on: https://chromium-review.googlesource.com/358108 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 6e4cfceb 2016-06-13T15:06:31 Refactor ANGLE's image manipulation code into a static library. Allows for chromium to make use of some of the functionality. BUG=612205 Change-Id: Ib4435ca44775a3a554b0fb3bd384bd4d31d7952d Reviewed-on: https://chromium-review.googlesource.com/351753 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: 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>
Corentin Wallez 1eabcf41 2016-02-02T13:54:00 Replace '> >' with '>>' BUG=angleproject:1308 Change-Id: I00bd2ea939b633817662205eb7879efb7f99965f Reviewed-on: https://chromium-review.googlesource.com/326400 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Austin Kinross 5cf0f982 2015-08-12T09:35:10 Reland "Fix memory layout of imageformats.h's 16-bit structs" Changes since last patch: - Disable tests on D3D11 Intel Change-Id: Ie65f56b7ed107f8901ea3be7d96036d7c882d189 Reviewed-on: https://chromium-review.googlesource.com/285218 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Austin Kinross <aukinros@microsoft.com>
Geoff Lang 8e17a496 2015-07-13T22:24:42 Revert "Fix memory layout of imageformats.h's 16-bit structs" Seeing failures in the new tests on Chrome's Intel bot: http://build.chromium.org/p/chromium.gpu.fyi/waterfall?builder=Win7%20Release%20(Intel) Also seeing failures in the BlendMinMaxTest.RGBA16F test, may be related. Reverting for now, can help diagnose the problems tomorrow if needed. This reverts commit 61d46d8740f1f93878ef324e11e4d72c57de8c3a. Change-Id: Id227f6ce8dafca24fbd2de92a2c4974e6a564c1f Reviewed-on: https://chromium-review.googlesource.com/285227 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Austin Kinross 61d46d87 2015-07-09T13:47:09 Fix memory layout of imageformats.h's 16-bit structs Change-Id: I87c363f68394d868d2a72e84bfdfd64db0c6e1d0 Reviewed-on: https://chromium-review.googlesource.com/284652 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Austin Kinross <aukinros@microsoft.com>
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 931c78cb 2015-05-04T12:45:53 Fix typo intialize -> initialize Change-Id: Ia39fffc6f2782b918b37ab7ae25ee16ecc98e93a Reviewed-on: https://chromium-review.googlesource.com/269120 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 19a43dbe 2015-03-20T16:14:04 Add a perf test for draw call overhead. These perf tests use the D3D NULL renderers to measure pure CPU time, with no GPU limitations. Also fix our D3D9 SwapChain code to skip creating a SwapChain for NULLREF D3D9 devices, and the vertex decl code to reinitialize the formats when finding a mismatch with the previous value. BUG=angleproject:955 Change-Id: I449e63177b48afd1559c36244de0bc252814e813 Reviewed-on: https://chromium-review.googlesource.com/262208 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 051dbc79 2015-01-05T15:48:58 Create a formatutilsD3D and move some functions from formatutils. BUG=angle:681 Change-Id: I694073c50dccd05c3117761e446eba0d15c03293 Reviewed-on: https://chromium-review.googlesource.com/238480 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang c2ca196e 2015-01-05T15:02:18 Move loadimage to the d3d folder. BUG=angle:681 Change-Id: Id901d9ae66207ac5e7d2844b8cd1f6a58c4492f6 Reviewed-on: https://chromium-review.googlesource.com/238478 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 04185ac7 2015-01-05T14:58:09 Move GenerateMip to the D3D folder. BUG=angle:681 Change-Id: Icdffe7eb8f975ee0966e9fb241835ac541eb39f0 Reviewed-on: https://chromium-review.googlesource.com/238477 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 59c4debe 2015-01-05T14:49:56 Move copyimage to the D3D folder. BUG=angle:681 Change-Id: I2ce237281cc75fdae11b5ddb4eca52058c395e7a Reviewed-on: https://chromium-review.googlesource.com/238475 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 6f5dc074 2015-01-05T14:46:20 Move vertexconversion.h to the d3d9 folder. BUG=angle:681 Change-Id: I87ef6856040978a9a6045d1df20fe3117def35a3 Reviewed-on: https://chromium-review.googlesource.com/238474 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang eca8561e 2014-12-17T15:24:38 Add format size information for D3DFORMATs. Change-Id: Id8d884df31726546e871d75a719bc419dd767d6b Reviewed-on: https://chromium-review.googlesource.com/236303 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 8e7c8a13 2014-12-04T16:16:32 Fix texture format support queries on AMD-D3D9. We were allowing calls to the device to check support for D3DFMT_NULL, which AMD reports as a usable texture type. This was causing crashes with the WebGL CTS and angle_end2end_tests, when the user tries to use an sRGB or other type, which we incorrectly reported as available. BUG=angle:839 Change-Id: I4941baac6a2b14a09c0ad2c924f29189ccfc6a07 Reviewed-on: https://chromium-review.googlesource.com/232728 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Kenneth Russell <kbr@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>