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


Log

Author Commit Date CI Message
Jamie Madill d3e213bc 2017-11-27T18:33:41 Add a gl::AttribArray helper type. This is a generic std::array sized to gl::MAX_VERTEX_ATTRIBS. Bug: angleproject:2264 Change-Id: I788659ad25be5708dbab422ac4a16dff60abf154 Reviewed-on: https://chromium-review.googlesource.com/790750 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 8e4bb4b1 2017-11-22T18:59:51 D3D11: Cache element array buffer updates. This attempts to reduce the amount of redundant validation done between indexed draw calls. It keeps the cached info in the VertexArray11 class. It also includes a fix to a missing direct buffer invalidation in CopyBufferSubData which was turning up with the new caching. Reduces overhead in the D3D11 indexed rendering perf test such that it leads to an increased score of about 20%. BUG=angleproject:2229 Change-Id: I63121bea19a9c8198e1925ed6a1460838e8f8955 Reviewed-on: https://chromium-review.googlesource.com/765262 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
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>
Jamie Madill 378734c5 2017-11-20T16:32:56 D3D11: Lazy evaluation for draw call vertex params. The vertex params are the 'start' vertex index and the number of vertices in the draw call. For indexed draws, they sometimes mean we need to compute the index range. In other cases, we don't. Defer computing the index range as long as possible so we don't end up computing the index range when we don't have to. BUG=angleproject:2229 Change-Id: I8e125416ef6767787a14509b322efa8dcd8e4a34 Reviewed-on: https://chromium-review.googlesource.com/764676 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Kai Ninomiya 8c5b69cb 2017-09-18T20:23:08 Replace MurmurHash3 with PMurHash PMurHash comes from the smhasher repository at chromium/src/third_party/smhasher Bug: 697758 Change-Id: Id2859edf37ae66bf27509d53db7f22db8831fe44 Reviewed-on: https://chromium-review.googlesource.com/687970 Commit-Queue: Kai Ninomiya <kainino@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill f1581583 2017-09-20T21:57:28 Minor cleanup to setIndexBuffer. This cleans up the point sprites dirtying logic into applyIndexBuffer. This series of small optimizations gives about a 15% improvement on the draw call benchmark for the D3D11 backend with the null driver. BUG=angleproject:1155 Change-Id: I210dd408d11ef5a0b58b0ad32d1255c787a55fba Reviewed-on: https://chromium-review.googlesource.com/666047 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 33510107 2017-09-20T10:39:18 Pass gl::Context to more Buffer methods. This will allow us to pull out the Renderer from the Context in more places in Buffer11, for state update. Impacts a few method calls in a few places. BUG=angleproject:2151 Change-Id: I1360caea65a94d3de4cd9f52d1b74b10439b02b3 Reviewed-on: https://chromium-review.googlesource.com/673136 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 5c307292 2017-09-12T18:59:45 Consolidate Index buffer application. Was used in a couple other places. BUG=angleproject:2052 Change-Id: Ib335271a42c9569bbb452b6de8b683023cfc5900 Reviewed-on: https://chromium-review.googlesource.com/659399 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Martin Radev ced5c86c 2017-08-17T16:05:29 D3D11: Handle multi-view Draw* calls Because the ANGLE_multiview extension uses instancing to multiply geometry for each view, Draw* calls with an active multiview program have to be handled in the follwing way: 1) Convert non-instanced Draw calls to their instanced versions. 2) Multiply the number of instances in an instanced Draw call by the number of views. The patch also applies the viewport offsets to the viewport and scissor rectangle and propagates the computed viewports and scissors to the D3D11 runtime. BUG=angleproject:2062 TEST=angle_end2end_tests Change-Id: I8b4295c95c2cc0c1046c67e1fb1a782a46703292 Reviewed-on: https://chromium-review.googlesource.com/618331 Commit-Queue: Martin Radev <mradev@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill e3d8628d 2017-08-22T11:50:01 D3D11: Split input layout and VB application. This will enable future optimizations that only update either the applied vertex buffers or the input layout independenty. It also makes debugging a bit easier since we can force an update of the vertex buffer or input layout to diagnose potential state sync bugs. BUG=angleproject:1156 Change-Id: Ib375561528da539e136ff4fd02398b03c9caabb7 Reviewed-on: https://chromium-review.googlesource.com/627077 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 4c19a8a8 2017-07-24T11:46:06 D3D11: Update cached dynamically recompiled programs. This change makes it so that when we need to recompile a program on a draw call, we also update the cache. It also streamlines the internal queries of the dynamic vertex and fragment shaders such that we only update the input and output signatures a single time per draw. This should also facilitate dirty bit implementations for the D3D11 back- end. BUG=angleproject:2116 Change-Id: Iccb0501b700bc894f40a8c68d7f297ff0c8f46bd Reviewed-on: https://chromium-review.googlesource.com/531798 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill d222d454 2017-06-06T17:48:35 Use HashingMRUCache in InputLayoutCache. This simplifies the state management code inside this manager. Also it should improve the speed of lookups due to using hashing instead of a tree lookup. BUG=angleproject:1156 BUG=angleproject:2044 Change-Id: I19ea8dbac6f2dfd7d30dd403d77b66ba0aa85d73 Reviewed-on: https://chromium-review.googlesource.com/527693 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Martin Radev dd5f27ee 2017-06-07T10:17:09 Make VertexBinding's member variables private The patch decorates all members in VertexBinding as private and limits access to them only through getters and setters. This makes it easier to debug and keep track of any assignments to the class members. BUG=angleproject:2062 TEST=angle_end2end_tests Change-Id: Iddd49063d060f136bc9cf11c313a5af0931d433c Reviewed-on: https://chromium-review.googlesource.com/530786 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Kai Ninomiya 0492d447 2017-06-07T13:45:15 Move murmurhash to src/common/third_party Bug: chromium:697758 Change-Id: I8a3a990b14cde0fdd45319d593040bfc571abf3e Reviewed-on: https://chromium-review.googlesource.com/527602 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 2cd45629 2017-06-08T20:14:13 D3D11: Consolidate Vertex Buffer application. With this change, IASetVertexBuffers is only called from a single code site in StateManager11. All other classes call through to here. This will make adopting the dirty bits for InputLayouts and VBs much simpler. BUG=angleproject:2052 Change-Id: I6e7b6146deb7f80f5f0e75dd0aff18eb4cc2bfc2 Reviewed-on: https://chromium-review.googlesource.com/524232 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill dcc9b51d 2017-06-05T15:28:45 D3D11: Consolidate input layout application. This merges all calls to IASetInputLayout to a single place in StateManager11. This means we no longer have to invalidate the state for D3D11, and can always lazily apply the input layout state. Introduces a new ResourceSerial class to replace the uintptr_t and DirtyPointer design. BUG=angleproject:2052 Change-Id: I76b874218b754395f25a129967c769b1f8f82115 Reviewed-on: https://chromium-review.googlesource.com/523025 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 5978e28d 2017-06-02T11:49:31 D3D11: Consolidate InputLayout allocation. This introduces a helper type to act as the initialization data type for input element arrays. A WrappedArray class acts as a helper class to wrap a C array and size into a C++ class, similar to std::array but without the data storage. Also move resource deallocation memory counting into a single code path. BUG=angleproject:2034 Change-Id: I5e108254777f0df65f5f60fe26e760c71b95b542 Reviewed-on: https://chromium-review.googlesource.com/506775 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill bdc1e2a2 2017-05-24T14:40:27 D3D11: Consolidate Buffer allocation. We now allocate and release all buffer resources from a single place, allowing us to allocate junk memory, clear on init, and track the currently allocated buffer memory. BUG=angleproject:2034 Change-Id: Id60b63a7f77bc369dfc494a7587ab06c8d34a8e2 Reviewed-on: https://chromium-review.googlesource.com/503253 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill caafd890 2017-05-19T14:31:25 D3D11: Don't store device in InputLayoutCache. We will need the Renderer pointer for resource allocation, so pass it around instead of storing the device and context. BUG=angleproject:2034 Change-Id: Iaf271913f88c5402895aa81de310aa22fcd72cc4 Reviewed-on: https://chromium-review.googlesource.com/509930 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 6de51858 2017-04-12T09:53:01 Optimize angle::BitSetIterator. Adds a new custom bitset template to handle packing as many bits as possible into a single variable. Intelligently select the right class depending on platform features and bit sizes. For now, always use a packed 64-bit set on 64-bit, instead of using a 32-bit set for smaller bitsets. BUG=angleproject:1814 Change-Id: I3ffef815c15515555833f6fc9302d8a4eee5423b Reviewed-on: https://chromium-review.googlesource.com/471827 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 20e005b2 2017-04-07T14:19:22 Rename BitSetIterator.h to bitset_utils.h BUG=angleproject:1814 Change-Id: I152ae13b6b7cf0ba72259967f0f124e199b20e07 Reviewed-on: https://chromium-review.googlesource.com/471826 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jiawei-Shao 2597fb64 2016-12-09T16:38:02 ES31: Refactor VertexArray for Vertex Attrib Binding OpenGL ES3.1 feature Vertex Attrib Binding requires vertex arrays should be split into two arrays: 1. an array of vertex buffer binding points, each of which specifies: - a bound buffer object, - a starting offset for vertex attribute data in that buffer object, - a stride used by all attributes using that binding point, - a frequency divisor used by all attributes using that binding point. 2. an array of generic vertex attribute format information records, each of which specifies: - a reference to one of the new buffer binding points above, - a component count and format, and a normalization flag for the attribute data, - the offset of the attribute data relative to the base offset of each vertex found at the associated binding point. Current ANGLE implementation simply uses a struct to represent a vertex attribute object, which does not meet the requirements above. This patch aims to be the the basis of the implementation of all ES3.1 Vertex Attrib Binding APIs by refactoring the struct VertexAttribute and the class VertexArray to fit the new data layout and ensuring all current functionality is retained. BUG=angleproject:1593 TEST=angle_unittests, angle_end2end_tests, gpu_unittests Change-Id: Ieb41f1bf503f815fd0476d2ea045dcb863465254 Reviewed-on: https://chromium-review.googlesource.com/418880 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@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>
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>
Jamie Madill 52b09c2f 2016-04-11T14:12:31 Re-re-land "D3D11: Implement dirty bits for VertexArray11."" Translated attributes are now stored in the VertexArray11 in a cache, and only updated when dirty bits change. Currently dynamic attributes must be re-translated every call, so these are stored in a list and processed repeatedly. This skips doing a lot of the VertexDataManager work for vertex attributes that don't change between draw calls. Current value attributes, which correspond to disabled attributes that the program will pulls vertex data from, are owned by the Context, so these need to be handled outside of the VertexArray11. Further changes will be necessary to reduce the redundant work we do in the InputLayoutCache. We shouldn't need to re-check the cache if nothing relevant changed. This give about a 23% performance improvement on the draw call benchmark on my machine. Re-land with a fix for the start vertex offset. Re-re-land with a fix for using XFB with deleted buffers. BUG=angleproject:1327 Change-Id: I0fba49515375c149bbf54d933f8d1f747fbb8158 Reviewed-on: https://chromium-review.googlesource.com/338003 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 53a36004 2016-04-08T19:03:18 Revert "Re-land "D3D11: Implement dirty bits for VertexArray11.""" Seems to make the following dEQP test flaky: dEQP-GLES3.functional.lifetime.attach.deleted_output.buffer_transform_feedback doesn't show up on every bot test, but run it a few times and it'll flake. Reverting while I investigate. BUG=angleproject:1327 This reverts commit 3477f3a62dc139a253a0b361ee138116e9fa881f. Change-Id: Ic23a392526f5f6e107cf0aa06448389804d6b208 Reviewed-on: https://chromium-review.googlesource.com/337961 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 3477f3a6 2016-03-29T17:15:29 Re-land "D3D11: Implement dirty bits for VertexArray11."" Translated attributes are now stored in the VertexArray11 in a cache, and only updated when dirty bits change. Currently dynamic attributes must be re-translated every call, so these are stored in a list and processed repeatedly. This skips doing a lot of the VertexDataManager work for vertex attributes that don't change between draw calls. Current value attributes, which correspond to disabled attributes that the program will pulls vertex data from, are owned by the Context, so these need to be handled outside of the VertexArray11. Further changes will be necessary to reduce the redundant work we do in the InputLayoutCache. We shouldn't need to re-check the cache if nothing relevant changed. This give about a 23% performance improvement on the draw call benchmark on my machine. Re-land with a fix for the start vertex offset. BUG=angleproject:1327 Change-Id: Ic23e48fb18ed7f29c1999914a2f799ac04aa03e9 Reviewed-on: https://chromium-review.googlesource.com/334225 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill da123308 2016-03-29T17:00:48 Add ANGLE_TRY macros to reduce boilerplate with gl/egl Errors. The macros don't need to disambiguate between GL/EGL. Also make helpers to deal with ErrorOrResult. BUG=angleproject:1310 BUG=angleproject:1327 Change-Id: I8041c4b17a859fe1f236bca3ad266453d67a8fd4 Reviewed-on: https://chromium-review.googlesource.com/335826 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 7d712e7d 2016-03-29T21:54:33 Re-land "Clean up Buffer11." This cleans up some messy stuff from the emulated index buffers, which were caching variables that didn't need to be cached. Also add in missing error checks. This touches a lot of code. Re-land with a fix for clang-win build. BUG=angleproject:1327 BUG=angleproject:1310 Change-Id: I31ed81c7242782bef7c5f6cde2192552f7ff9403 Reviewed-on: https://chromium-review.googlesource.com/336052 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill e34deaa3 2016-03-30T01:50:40 Revert "Clean up Buffer11." Fails Clang-win because of std::forward ..\..\third_party\angle\src\libANGLE/Error.h(60,40): error: no matching function for call to 'forward' BUG=598944 BUG=angleproject:1327 BUG=angleproject:1310 This reverts commit 041d678b4764484386f934df927f00a5df48a351. Change-Id: I9fb0685cd01090b1faf8417ffa3c9b49eeb4510e Reviewed-on: https://chromium-review.googlesource.com/336040 Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 041d678b 2016-03-29T17:00:47 Clean up Buffer11. This cleans up some messy stuff from the emulated index buffers, which were caching variables that didn't need to be cached. Also add in missing error checks. This touches a lot of code. BUG=angleproject:1327 BUG=angleproject:1310 Change-Id: Icd722d57d9449388fbabc62c7ea37f0526a568ff Reviewed-on: https://chromium-review.googlesource.com/334731 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 00f394ec 2016-03-16T12:09:11 Revert Dirty bits for VertexArray11 This is a combination of two reverts: Revert "D3D11: Remove unused mRenderer from VertexArray11." Revert "D3D11: Implement dirty bits for VertexArray11." Reverting only the first commit would trigger warnings on the Windows clang bot. BUG=594509 BUG=angleproject:1327 This reverts commit fc4712b5ed270436f2993bfda9e916d4f92684a4. This reverts commit 7d8585b802b7eb741b380bd0d05769281d9507c9. Change-Id: I612dbba0816d6144f71ce815701c13a798585bc7 Reviewed-on: https://chromium-review.googlesource.com/332989 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 7d8585b8 2016-03-09T15:53:12 D3D11: Implement dirty bits for VertexArray11. Translated attributes are now stored in the VertexArray11 in a cache, and only updated when dirty bits change. Currently dynamic attributes must be re-translated every call, so these are stored in a list and processed repeatedly. This skips doing a lot of the VertexDataManager work for vertex attributes that don't change between draw calls. Current value attributes, which correspond to disabled attributes that the program will pulls vertex data from, are owned by the Context, so these need to be handled outside of the VertexArray11. Further changes will be necessary to reduce the redundant work we do in the InputLayoutCache. We shouldn't need to re-check the cache if nothing relevant changed. This give about a 23% performance improvement on the draw call benchmark on my machine. BUG=angleproject:1327 Change-Id: I7fb944d32ea7e6c78b9e478406bdb7e10a7fc05b Reviewed-on: https://chromium-review.googlesource.com/330173 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill b5abec33 2016-03-08T11:21:20 D3D11: Remove unused field in InputLayoutCache. The mCounter field became exposed as unused after it was initialied in the constructor initializer list. Previously this was hidden because it was initialized in the body of the constructor. BUG=angleproject:1327 Change-Id: I18d9aa8a377d234f4c161ace845edfb9fc7f226c Reviewed-on: https://chromium-review.googlesource.com/331385 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 8047c0d2 2016-03-07T13:02:12 D3D11: Clean up InputLayoutCache. This change does a couple things. First, it uses the 'active attribs' mask in the gl::Program to sort the translated attributes, instead of checking the translated attribute themselves. This means we don't have to consult the 'active' field of the translated attributes, which in turns means we don't have to update the active field in the attributes, which breaks the dependency of the attributes on the gl::Program. Second, use a dynamically sized array for storing the cached vertex attributes in the InputLayoutCache. This is nice because it means we don't have to store the size of the array separately. Also some other refactoring cleanups. Refactoring change only. BUG=angleproject:1327 Change-Id: Iab22de92840b30674b92eca72e450673ed9f6d6d Reviewed-on: https://chromium-review.googlesource.com/330172 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill e36b92d4 2016-03-04T15:46:58 D3D: Use a single D3D buffer per static vertex attribute. The current caching logic stores multiple static attributes in a single buffer if the attributes share a D3D buffer - sometimes. If a buffer is 'committed' (has been used in a draw) then we would make a new D3D buffer for the next set of static attributes. Instead use a simpler scheme of a single D3D buffer for each static attribute. Also change rx::VertexBuffer to a reference counted class. This simplifies the caching logic for static vertex buffers (translated attributes) considerably. We only need to release the buffers when the ref count is zero, and ensure we track the ref count correctly when bound to D3D. This leads the way towards using a simpler dirty bit scheme for intelligent state updates, and less overhead doing work with buffer state updates. BUG=angleproject:1327 Change-Id: I99461d50b9663024eaa654cd56b42a63f1416d08 Reviewed-on: https://chromium-review.googlesource.com/330170 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Cooper Partin 8613f494 2016-02-11T10:28:05 Fixed clang build for InputLayoutCache. Change-Id: I0757874fad5f665cf4629092ad2d0d5982ca4856 Reviewed-on: https://chromium-review.googlesource.com/327301 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Cooper Partin 534bf87b 2016-02-09T11:33:29 Implemented instanced rendering for emulated point sprites Non-instanced PointSprite emulation for lower feature levels is implemented using D3D DrawIndexedInstanced and an instanced vertex buffer containing a pointsprite quad. GL instanced rendering using glDrawArraysInstanced and glDrawElementsInstanced with pointsprite emulation is performed using a for-loop. The loop iterates over each instance to render and adjusts the buffer offsets accordingly. This is not performant and is only used and required by this chosen pointsprite emulation method. Indexed instanced (glDrawElementsInstanced), uses the same offset loop because the vertex buffer containing the data to be rendered has already been expanded using getEmulatedIndexedBuffer(). Expanding the buffer makes the two rendering operations similar enough to share code. BUG=angleproject:1279 TEST=angle_end2end_tests Change-Id: If46cc9f158e29f5518c70ad630b3228f474a9f8b Reviewed-on: https://chromium-review.googlesource.com/321407 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill c674abeb 2016-02-05T17:24:20 Refactor InputLayoutCache::applyVertexBuffers. The redesigned code places the internal buffers and input elements for instance point sprite emulation (FL9_3) at the start of the arrays, instead of swapping with the first non-instanced element. This makes the tracking logic of the caching somewhat cleaner. This facilitates the work of implementing instancing-on-instancing for FL9_3 conformance. BUG=angleproject:1279 Change-Id: Ifb030816a313b1e8b916c57ef05915914443312a Reviewed-on: https://chromium-review.googlesource.com/325090 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 91d3e94f 2015-12-08T11:26:15 D3D11: Apply null InputLayout with no attributes. In some cases in ES3, we can render without vertex attributes. For this, don't bind or create an empty input layout, but instead bind null. This silences a D3D11 warning in Debug, when viewing the system out. BUG=angleproject:667 Change-Id: Ib88dc1177d7f9bb6a5fa15e44c74da022be137f6 Reviewed-on: https://chromium-review.googlesource.com/316612 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tryjob-Request: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Cooper Partin e115c3be 2015-10-14T13:55:10 Fixed incorrect buffer count for emulated points rendering Emulated points rendering for FL9_3 was getting lucky because the value of maxDiff just happened to be large enuough to include the additional pointsprite vertex buffer in the total buffer count used in IASetVertexBuffers. maxDiff is calculated while buffers and offsets are being configured. The pointsprite buffer was not updating maxDiff resulting in an off-by one calculation which causes TDRs on some Qualcomm chipsets. This issue was discovered using Cocos2dx. BUG=angleproject:1176 Change-Id: I3b3af1757e1cef48bbc62e68695a3e239fef77bf Reviewed-on: https://chromium-review.googlesource.com/305752 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tryjob-Request: Jamie Madill <jmadill@chromium.org> Tested-by: Cooper Partin <coopp@microsoft.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Cooper Partin 7a041518 2015-09-16T08:58:47 Fixed FL9_3 shaders that use glPointSize without GL_POINTS mode This change fixes rendering on FL9_3 with shaders that reference glPointSize and are not used with GL_POINTS rendering mode. A TDR occurs on some hardware because of missing vertex buffers specified by the vertex layout. Change-Id: Ie49b75f7177c32c7f021a0409d15c27b18140c4b Reviewed-on: https://chromium-review.googlesource.com/299719 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Cooper Partin <coopp@microsoft.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill c349ec03 2015-08-21T16:53:12 Re-land "Move shader attributes into Program shared data." Re-land with a fix for a warning in 32-bit Windows. Making the Program own the attribs, and the Impl only see a read-only copy cleans up the Impl object. It also allows us to more cleanly isolate certain coded into D3D. BUG=angleproject:1123 Change-Id: I73bda4b6d9e675d87d087d44757c598437d607f2 Reviewed-on: https://chromium-review.googlesource.com/295191 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 4e10722d 2015-08-24T14:12:17 Revert "Move shader attributes into Program shared data." Once again a signed/unsigned mismatch warning in 32-bit. src\libangle\renderer\gl\programgl.cpp(190) : warning C4018: '<' : signed/unsigned mismatch BUG=angleproject:1123 This reverts commit 2d7731838722a53102e5086dba445e37f6e98d7e. Change-Id: Icd26906ead1eaa06b4bd3ff7fc2b10bef4f46022 Reviewed-on: https://chromium-review.googlesource.com/295241 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 2d773183 2015-08-18T10:27:28 Move shader attributes into Program shared data. Making the Program own the attribs, and the Impl only see a read-only copy cleans up the Impl object. It also allows us to more cleanly isolate certain coded into D3D. BUG=angleproject:1123 Change-Id: I469051eb066fc56e55282affa2d5398b394ab8d2 Reviewed-on: https://chromium-review.googlesource.com/293826 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 5f116e5d 2015-08-20T11:13:32 Fix regression with GetNextGLSLAttributeType. A refactoring bug slipped in that used the non-transposed row count for non-square matrices, causing an ASSERT failure in Debug. It's unfortunately not easy to revert the previous change, so instead fix it here. BUG=angleproject:1129 Change-Id: I0de66de46a24b402c93da68f189a2c65616c2006 Reviewed-on: https://chromium-review.googlesource.com/294641 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 5c6b7bfe 2015-08-17T12:53:35 Add a Program::Data shared state structure. Similar to the Framebuffer and other classes, this gives the Impl class a read-only view of the object's state. BUG=angleproject:1123 Change-Id: I580eaebe2de236adf8131d6e3f54633cecce8c25 Reviewed-on: https://chromium-review.googlesource.com/293760 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
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 b195643c 2015-08-12T17:35:20 Revert "Fixed compiler warning C4267 'conversion from 'size_t' to 'type', possible loss of data'" Seems to have quite a few warnings in 64-bit on my machine. BUG=angleproject:1120 This reverts commit c5cf9bc47d0ee028adbbf9e9f94ca567eec601dc. Change-Id: I86768b900aeba52e7a2242d9ae8949f93f1a5ba9 Reviewed-on: https://chromium-review.googlesource.com/293280 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Cooper Partin c5cf9bc4 2015-08-06T10:46:48 Fixed compiler warning C4267 'conversion from 'size_t' to 'type', possible loss of data' BUG=angleproject:1120 Change-Id: I01ef10bea7f487c2b394d030c76628f38d2ea645 Reviewed-on: https://chromium-review.googlesource.com/292780 Tested-by: Cooper Partin <coopp@microsoft.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill bd136f9a 2015-08-10T14:51:37 Reland of "D3D11: Fix draw perf regression with input layouts." f8dd7b10 fixed unnecessary shader compiles, but introduced a draw call perf regression. Fix the regression robustly by storing a minimal set of input layout elements/vertex attribute info, but also handle the case where the vector sizes mismatch between a cached and new vertex layout. Reland with fix for comparison warning. BUG=510151 Change-Id: I578ddbb5b5bb12e7c1a901f23c7b5fcbd64b5d23 Reviewed-on: https://chromium-review.googlesource.com/292460 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 00c782e8 2015-08-10T17:54:30 Revert "D3D11: Fix draw perf regression with input layouts." size_t comparison warning in Win32. src\libangle\renderer\d3d\programd3d.cpp(2084) : warning C4018: '<' : signed/unsigned mismatch BUG=510151 This reverts commit bf3f780c0a281cfe6192aa5635b02a01314f7fd3. Change-Id: I5565b697ca29270375049f3e855437fa19157de9 Reviewed-on: https://chromium-review.googlesource.com/292331 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill bf3f780c 2015-08-10T10:47:57 D3D11: Fix draw perf regression with input layouts. f8dd7b10 fixed unnecessary shader compiles, but introduced a draw call perf regression. Fix the regression robustly by storing a minimal set of input layout elements/vertex attribute info, but also handle the case where the vector sizes mismatch between a cached and new vertex layout. BUG=510151 Change-Id: If5e9ea4a4c9edaa7a78c8daa44bbe7d9927dc4e4 Reviewed-on: https://chromium-review.googlesource.com/292390 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill f8dd7b10 2015-08-05T13:50:08 Refactor input layout & vertex signatures. Always size input layouts to gl::MAX_VERTEX_ATTRIBS, and use '1' bits to signal where we have a GPU conversion. The simplification allows us to more cleanly match the vertex executable signatures and makes our default VertexExecutable hit much more often. BUG=510151 TEST=angle_end2end_tests,Canary WebGL, manual testing with Chromium Change-Id: I5009323c4e7e208e7a2595be46658c344517a4ff Reviewed-on: https://chromium-review.googlesource.com/290740 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@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>
Corentin Wallez bc3b5e63 2015-07-07T10:08:05 D3D11: map index buffers only when needed. Before this patch, index buffers where always mapped in case we needed the index data for the indexed point sprites workaround. This patch makes it so the index buffer is only mapped in this case, when we need to stream index data or when we need to fill the static copies of the index buffers. This make the memory usage of http://alteredqualia.com/xg/examples/mammoth.html go down from 41MB to 28MB. BUG=angleproject:516 Change-Id: I937506d06fd6f074ef2120469dbd235e20245fca Reviewed-on: https://chromium-review.googlesource.com/283626 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Corentin Wallez <cwallez@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>
Jamie Madill 531d5f45 2015-07-06T08:26:45 D3D11: Refactor InputLayout cache. *re-land with fix for cache overflowing* Using a much more compact input layout structure allows us to save quite a bit of time comparing input layouts, or computing hashes. A subsequent patch shrinks the size of the structure further. BUG=angleproject:959 Change-Id: If240bb7c84d78fc8c9fb6f9049bf71d8a81c97c6 Reviewed-on: https://chromium-review.googlesource.com/283227 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Cooper Partin 558f2b5a 2015-06-02T09:34:11 Added emulated indexed pointsprite rendering support. This emulation is for renderers that do not support Geometry Shaders. BUG=angleproject:949 Change-Id: I7acf003e83ea6661f10a703486e6d07eb28786f8 Reviewed-on: https://chromium-review.googlesource.com/274851 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Cooper Partin <coopp@microsoft.com>
Jamie Madill 2c70e64b 2015-07-02T15:09:58 Revert "D3D11: Refactor InputLayout cache." Seems to be failing maps_pixel_test on the bots. BUG=angleproject:959 This reverts commit 53fd1552ba7dbf91a726fce139d748860bd8a5f5. Change-Id: I1f2593caca58f701d284993d2ee313846806491b Reviewed-on: https://chromium-review.googlesource.com/283157 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 53fd1552 2015-07-02T07:26:19 D3D11: Refactor InputLayout cache. Using a much more compact input layout structure allows us to save quite a bit of time comparing input layouts, or computing hashes. A subsequent patch shrinks the size of the structure further. BUG=angleproject:959 Change-Id: I7a0f10428cc7e96967e60cc085ff2e8779718978 Reviewed-on: https://chromium-review.googlesource.com/277288 Reviewed-by: Kenneth Russell <kbr@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 476682e6 2015-06-30T10:04:29 Use std::vector for TranslatedAttribs. This allows us to cache a std::vector between calls, and avoids us calling allocation/constructors for locals, which saves us some time. It also allows us to use the vector's size to limit the range of attribs we look at. BUG=angleproject:959 Change-Id: I799ed6c92fa8fca96e92e235b125a11d2d551aab Reviewed-on: https://chromium-review.googlesource.com/277286 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill f9327d33 2015-06-22T13:57:16 D3D11: Optimize ProgramD3D::sortAttributesByLayout. We can use pointer math here, instead of copying values. BUG=angleproject:959 Change-Id: I3b87956224d0846c9011f5d8edb811bc5e4f2b85 Reviewed-on: https://chromium-review.googlesource.com/277119 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Austin Kinross fbd7820c 2015-05-28T15:33:55 Fix flaky WebGL point-sprites test when using instanced point sprites Change-Id: I7d417016d9fa3a2e49806543d981ab98a3e71cbc Reviewed-on: https://chromium-review.googlesource.com/273914 Tested-by: Austin Kinross <aukinros@microsoft.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Minmin Gong 794e0009 2015-04-07T18:31:54 Fix and enable warning C4244 (Conversion from 'type1' to 'type2', possible loss of data) Change-Id: Id0e06d7d6600344d858f00dabc219d79289bbc82 Reviewed-on: https://chromium-review.googlesource.com/265020 Tested-by: Minmin Gong <mgong@microsoft.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill b3584fb4 2015-04-09T17:34:21 Revert "Fix and enable warning C4244 (Conversion from 'type1' to 'type2', possible loss of data)" Causing a build failure on Mac/Clang: ./Tokenizer.cpp:551:7: error: extra tokens at end of #else directive [-Werror,-Wextra-tokens] #else if defined(_MSC_VER) http://build.chromium.org/p/chromium.gpu.fyi/builders/GPU%20Mac%20Builder/builds/29136 This reverts commit 3b26e231d99154814eb428f75a67bbe7a21adadc. Change-Id: I2d11ddcc18130d908fd2ec3d6f5ab890cfccd5e7 Reviewed-on: https://chromium-review.googlesource.com/264983 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Minmin Gong 3b26e231 2015-04-07T18:31:54 Fix and enable warning C4244 (Conversion from 'type1' to 'type2', possible loss of data) Change-Id: I73d9a2b9ad16f032be974b9c819de0dc1247c2ea Reviewed-on: https://chromium-review.googlesource.com/264533 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill f4bf3811 2015-04-01T16:15:32 Use GetAs/GetImplAs whenever possible. This patch cleans up the rest of our custom casting helper functions. Change-Id: I41975c736765fca855c4498acca31116df3e8317 Reviewed-on: https://chromium-review.googlesource.com/263477 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org>
Austin Kinross b8af723d 2015-03-16T22:33:25 Fix and enable warning C4245 (signed/unsigned mismatch) Change-Id: If48043835fcc98341a0626e3ece7d0e3f7958059 Reviewed-on: https://chromium-review.googlesource.com/260630 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cooper Partin <coopp@microsoft.com> Tested-by: Austin Kinross <aukinros@microsoft.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Cooper Partin 4e47b92f 2015-02-03T09:04:20 Fix instanced point sprites when gl_PointSize is specified but not used Change-Id: I2350fa60cae55f02d7b484c34544c035acaba6ad Reviewed-on: https://chromium-review.googlesource.com/245703 Reviewed-by: Austin Kinross <aukinros@microsoft.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 9236b418 2015-02-02T16:51:52 Add generic Impl casting helper methods. GetAs and GetImplAs are template helpers that can replace all of our custom "makeTextureD3D", etc methods. This will help save code across different back-ends. Change-Id: Ib3215c005bfac5a819c5d8f7d60a73a725241332 Reviewed-on: https://chromium-review.googlesource.com/245390 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Austin Kinross 3ae6465f 2015-01-26T15:51:39 Fix lots of variable shadowing in ANGLE BUG=angle:877 Change-Id: I3df0fffb19f5ecbe439fbc2a8d6d239a5dc6b638 Reviewed-on: https://chromium-review.googlesource.com/243334 Tested-by: Austin Kinross <aukinros@microsoft.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 74cafab1 2015-01-23T23:17:32 Revert "Fix lots of variable shadowing in ANGLE" Caused WebGL CTS failures on the texture-npot test: https://www.khronos.org/registry/webgl/sdk/tests/conformance/textures/texture-npot.html This reverts commit c67e6e9fade44ef8938724e82db11db725e9c8e5. Change-Id: I089e99859231e0d657084ac3647257c650a9da92 Reviewed-on: https://chromium-review.googlesource.com/243041 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Austin Kinross c67e6e9f 2015-01-21T16:01:07 Fix lots of variable shadowing in ANGLE BUG=angle:877 Change-Id: I15168ae32605b26aee08274464ffe68adb5a7e87 Reviewed-on: https://chromium-review.googlesource.com/242351 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Austin Kinross <aukinros@microsoft.com>
Cooper Partin e6664f06 2015-01-09T16:22:24 Added PointSprites Support for renderers that do not support Geometry Shaders Change-Id: Iae9ac5f8fbba68dba5e49ccda7bb7eebb05c8e9a Reviewed-on: https://chromium-review.googlesource.com/240450 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 359ef269 2015-01-05T14:42:29 Rename ShaderExecutable to ShaderExecutableD3D and move it to the D3D folder. BUG=angle:681 Change-Id: I097d6591be4e873c9a6f210cc91e3f4eb60f036b Reviewed-on: https://chromium-review.googlesource.com/238473 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Austin Kinross edd84e41 2015-01-05T15:50:47 Fix assertion in D3D11 Feature Level 9_3 instancing implementation BUG=angle:858 Change-Id: I6197d0f86536cb4613aa1aeb2d73a8173b4e4631 Reviewed-on: https://chromium-review.googlesource.com/238530 Tested-by: Austin Kinross <aukinros@microsoft.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Austin Kinross 324bcc46 2014-12-22T13:43:02 Fix instancing on D3D11 9_3, by ensuring slot zero contains non-instanced data D3D11 Feature Level 9_3 supports instancing, but slot 0 in the input layout must not be instanced. D3D9 has a similar restriction, where stream 0 must not be instanced. This restriction can be worked around by remapping any non-instanced slot to slot 0. This works because HLSL uses shader semantics to match the vertex inputs to the elements in the input layout, rather than the slots. BUG=angle:858 Change-Id: I67b2be9095afc206a4b9f107ed61356820551afe Reviewed-on: https://chromium-review.googlesource.com/237270 Tested-by: Austin Kinross <aukinros@microsoft.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 97399235 2014-12-23T12:31:15 Enable conditional InfoLog for HLSL link failures. We don't always have an InfoLog available for dynamic shaders, but we can still capture data in some cases for default shaders. Change-Id: Iccd022f24d5c2b8922e9254580705675cd4e405f Reviewed-on: https://chromium-review.googlesource.com/237328 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Austin Kinross c9878cb1 2014-12-11T10:43:48 Fix normalized GL_BYTE vertex attributes on D3D11 9_3 Feature Level 9_3 doesn't support as many formats for Input Layouts as 10_0+. On 9_3, we have to make sure that GL vertex attributes are converted into formats that 9_3 supports. Change-Id: I27b9a85a6eb21a37bd36e60bf011b83fce743fd0 Reviewed-on: https://chromium-review.googlesource.com/234523 Tested-by: Austin Kinross <aukinros@microsoft.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 437d2662 2014-12-05T14:23:35 Move some D3D-specific stuff into ProgramD3D. BUG=angle:773 Change-Id: I48b42e7a3e82a43d3dde16a8d1016d28280eae39 Reviewed-on: https://chromium-review.googlesource.com/232968 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 7dd2e10d 2014-11-10T15:19:26 Merge the ProgramBinary class into Program. BUG=angle:731 Change-Id: I2ee97155841dc62f04bb71c1f2035d210fd3883c Reviewed-on: https://chromium-review.googlesource.com/232694 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 21329414 2014-12-02T20:50:30 Revert "Merge the ProgramBinary class into Program." Issues appeared on the FYI waterfall, content_gl_tests hangs. This reverts commit 2195a6d6032883ed05468d5ecd019e7cb9a27bce. Change-Id: I9fe1a53cf40887ae5a98fd77b4872f41085fcea7 Reviewed-on: https://chromium-review.googlesource.com/232386 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 2195a6d6 2014-11-10T15:19:26 Merge the ProgramBinary class into Program. BUG=angle:731 Change-Id: Ia0a356c0684f3a3576c71dfd04b00874318dd084 Reviewed-on: https://chromium-review.googlesource.com/228701 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-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>