src/libANGLE/renderer/vulkan/vk_cache_utils.h


Log

Author Commit Date CI Message
Shahbaz Youssefi e397949e 2019-03-01T13:06:50 Vulkan: shave off 60 bytes from AttachmentOpsArray Bug: angleproject:2361 Change-Id: I39eb34b3c415fa165fa7803b2bc09338833f6773 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1496039 Reviewed-by: Jamie Madill <jmadill@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi d838178d 2019-03-04T11:07:47 Vulkan: Rename vk::Shared* to vk::RefCounted* To be specific regarding what being "shared" entails. Also, avoids confusion w.r.t to an upcoming vk::Shared class. Bug: angleproject:2464 Change-Id: Ib9c112bbb822ae30dab39c75a8cde25dd79b2258 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1499693 Reviewed-by: Jamie Madill <jmadill@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Frank Henigman 52047de4 2018-11-13T17:22:36 Vulkan: support instanced draws. (reland) Enable instanced draws with the Vulkan backend. So far it only works when Vulkan has VK_EXT_vertex_attribute_divisor. BUG=angleproject:2672 Change-Id: Ib6655625776344305911a1a742c85f17638cee8f Reviewed-on: https://chromium-review.googlesource.com/c/1469263 Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
Shahbaz Youssefi 341304d8 2019-02-12T20:58:54 Revert "Vulkan: support instanced draws." This reverts commit 199a9f385f5489b957fe1e42bf08f3f40edd38ca. Reason for revert: Causes a validation error when the extension is not present. See failures here: https://ci.chromium.org/p/chromium/builders/luci.chromium.try/win-angle-rel/693 Original change's description: > Vulkan: support instanced draws. > > Enable instanced draws with the Vulkan backend. > So far it only works when Vulkan has VK_EXT_vertex_attribute_divisor. > > BUG=angleproject:2672 > > Change-Id: I9445ba64282fa00a6eaee207b15efa2c7a9abbd3 > Reviewed-on: https://chromium-review.googlesource.com/c/1334973 > Commit-Queue: Frank Henigman <fjhenigman@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> TBR=fjhenigman@chromium.org,jmadill@chromium.org,syoussefi@chromium.org Change-Id: Iffccc2cca259bcd19c068a87a415d4e196901f45 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:2672 Reviewed-on: https://chromium-review.googlesource.com/c/1468201 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Frank Henigman 199a9f38 2018-11-13T17:22:36 Vulkan: support instanced draws. Enable instanced draws with the Vulkan backend. So far it only works when Vulkan has VK_EXT_vertex_attribute_divisor. BUG=angleproject:2672 Change-Id: I9445ba64282fa00a6eaee207b15efa2c7a9abbd3 Reviewed-on: https://chromium-review.googlesource.com/c/1334973 Commit-Queue: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 7403dd2c 2019-01-16T13:27:17 Vulkan: Inline transition query. Slight speed improvement in the Vulkan vertex array state change test. Bug: angleproject:3014 Change-Id: I4a5cd26849cd247b7e67cd6bda083aabeb4e34c0 Reviewed-on: https://chromium-review.googlesource.com/c/1406890 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill ab2bfa81 2019-01-15T19:06:47 Enable Chromium clang style plugin for libANGLE. This fixes a few style warnings: * auto should not deduce to raw pointer type * inlined virtual methods are not allowed * non-trivial constructors and destructors should be explicit * inlined non-trivial constructors should not be in-class * missing override keywords Bug: angleproject:3069 Change-Id: I3b3e55683691da3ebf6da06a5d3c729c71b6ee53 Reviewed-on: https://chromium-review.googlesource.com/c/1407640 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 633d5e69 2018-12-23T19:58:01 Vulkan: Put viewport and scissor back in pipeline desc. Turns out this is much faster than using dynamic state. When we support multiple viewports it might be easier to use dynamic state since we won't need to make an overly large pipeline description. We could support both methods using a flag to indicate the viewport and/or scissor regions are invalid. Until then we can remove the pipeline and scissor dirty bits. Improves perf by about 15% in the Vulkan VBO state change test. Bug: angleproject:3013 Change-Id: I4572250626a9a0f0ca3451b17e8f0de186416cae Reviewed-on: https://chromium-review.googlesource.com/c/1390359 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 2450d8dd 2019-01-11T14:41:04 Vulkan: Squash Vertex Pipeline info. Instead of using 8 bytes per vertex we can reduce the space used for the divisor to 8 bytes. For larger values than 255 we can emulate the divisor by unrolling the draw call. We will likely need to do this in any case for instanced draws when the instancing extension isn't available. The tighter packing will allow for us to move the viewport and scissor back into the pipeline description. It seems this is much faster than using dynamic state. Every state change that would pull in a new Pipeline would need the viewport and scissor re-applied. It seems these driver calls are costly. Does not improve perf significantly but enables future improvements. Bug: angleproject:3013 Change-Id: I1a41c3acadc6fbd47c7a7b961c706e82f78de936 Reviewed-on: https://chromium-review.googlesource.com/c/1390358 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 3f0c4a56 2019-01-10T10:20:35 Vulkan: Faster state transitions. Implements a transition table from Pipeline Cache entry to state change neighbouring Pipeline Cache entries. We use a 64-bit mask to do a quick scan over the pipeline desc. This ends up being a lot faster than doing a full hash and memcmp over the pipeline description. Note that there could be future optimizations to this design. We might keep a hash map of the pipeline transitions instead of a list. Or use a sorted list. This could speed up the search when there are many transitions for cache entries. Also we could skip the transition table and opt to do a full hash when there are more than a configurable number of dirty states. This might be a bit faster in some cases. Likely this will be something we can add performance tests for in the future. Documentation is also added in a README file for the Vulkan back end. This will be extended over time. Improves performance about 30-35% on the VBO state change test. Bug: angleproject:3013 Change-Id: I793f9e3efd8887acf00ad60e4ac2502a54c95dee Reviewed-on: https://chromium-review.googlesource.com/c/1369287 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 80766cfa 2019-01-10T10:20:34 Vulkan: Update individual VAO attribs when dirty. This simplifies the dirty state updates in VertexArrayVk. It also lets us use a smaller dirty bit mask when a single attribute is marked dirty in a vertex array. Improves performance by about 1-2% in the VBO state change test. Will allow for better performance using a pipeline transition table. Bug: angleproject:3013 Change-Id: I25c5172b3f41b7abac6b8273c8f9cd42eb46cc9f Reviewed-on: https://chromium-review.googlesource.com/c/1403958 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill dbc605ce 2019-01-04T16:39:14 Vulkan: Optimize VBO state changes. Also has some minor optimizations for the front-end. 12% improvement on the Vulkan VBO change test. Bug: angleproject:3014 Change-Id: I38e1a8194edfc14bfe57424be348cb9688e928f4 Reviewed-on: https://chromium-review.googlesource.com/c/1369286 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi b51eb09f 2018-11-29T10:48:36 Vulkan: Allow bindings to compute stage Includes both binding of resources and updating push constants on the compute shader stage. Bug: angleproject:2958 Change-Id: I5686cbac81e0dd83d0e938cb40f9f9ac7d2ef48a Reviewed-on: https://chromium-review.googlesource.com/c/1355500 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill b980c563 2018-11-27T11:34:27 Reformat all cpp and h files. This applies git cl format --full to all ANGLE sources. Bug: angleproject:2986 Change-Id: Ib504e618c1589332a37e97696cdc3515d739308f Reviewed-on: https://chromium-review.googlesource.com/c/1351367 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill dc65c5bd 2018-11-21T11:07:26 Vulkan: Cache pipelines with Shader Programs. This allows for a few nice things. First and foremost it reduces the size of the PipelineDesc, which is now 232 bytes. It also allows us to completely forego pipeline caches for compute shaders. We also allow sharing vertex and fragment shaders among multiple programs for internal shaders. This is good for memory savings. To allow this we keep the shaders as ref counted objects. Bug: angleproject:2522 Change-Id: I2322be5061979d9669a0b25c152359561eeb80ee Reviewed-on: https://chromium-review.googlesource.com/c/1344449 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi c30f45d3 2018-11-12T16:37:59 Vulkan: Rename PipelineDesc/Cache to Graphics& PipelineDesc describes a Vertex-Fragment pipeline and PipelineCache (not to be confused with vk::PipelineCache) implements a cache of such pipeline objects. In preparation for Compute support, these data structures are prefixed with Graphics. Bug: angleproject:2959 Change-Id: I9181586fb946b787216ca0b2ad6340f90c3ab55f Reviewed-on: https://chromium-review.googlesource.com/c/1333971 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill bc5834cd 2018-11-06T11:13:50 Vulkan: Use dynamic state for Viewport and Scissor. This reduces the size of the pipeline cache descriptor under 256 bytes. Further improves the speed of cache query. Has the minor cost of needing more state application during a new command buffer or render pass. Bug: angleproject:2522 Change-Id: I3d71e457a36084ac4748d04fe3c9bab4caad503c Reviewed-on: https://chromium-review.googlesource.com/c/1316888 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 77b2436e 2018-11-05T22:39:29 Vulkan: Reduce PipelineDesc size. This packs the desc into 288 bytes. Down from over 400. The hashing and memcmp functions are sped up considerably. Improves performance in the VulkanPipelineCachePerf test by 50% and also improves performance in the state changing draw call test by 20%. Bug: angleproject:2522 Change-Id: I72ed191a93721b875684f647f806c09be4e66821 Reviewed-on: https://chromium-review.googlesource.com/c/1308460 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 502d2e21 2018-11-01T11:06:23 Vulkan: Crunch RenderPassDesc. This reduces the size of the RenderPass desc from 64 to 12 bytes. Bug: angleproject:2522 Change-Id: Iff2df87ba65be0bd976bba81c76c285cb0fa1ceb Reviewed-on: https://chromium-review.googlesource.com/c/1308459 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 763cec07 2018-10-26T14:19:54 Vulkan: Add warnings for cache struct packing. This adds diagnostic warnings for packed cache structures. It ensures the packed versions of the structures don't have any unexpected misalignments or inserted members. This gives us consistent behaviour and ensures all memory is initialized. Implemented for Clang/GCC/MSVC. Bug: angleproject:2522 Change-Id: I6ec453a40d292e4a498319ffa767988a502d225e Reviewed-on: https://chromium-review.googlesource.com/c/1302533 Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 78bcd2be 2018-10-16T15:05:20 Vulkan: Fix deleting in-use descriptor sets. Sequences of many frames with uniform updates could lead to a bug where we attempt to delete descriptor sets that are still in use. To trigger the bug we need to write enough uniform data to trigger a descriptor set to be freed. This would correctly trigger refresh sets in the Program. But if there was a second program idle in the background that also allocated descriptors from the old pool, the bug would manifest. Fix this by storing a shared handle to the descriptor pool in the Program. The dynamic descriptor pool won't recycle descriptor pools internally unless there are zero outstanding references to the pool. We could also improve this in a resource sharing situation by keeping a single shared dynamic descriptor pool per share group. Includes a contribution from tobine@google.com that adds a test to cover the bug. Bug: angleproject:2863 Change-Id: Id585b85f33f8cfa3772ceff3af512d1e4fb0b75a Reviewed-on: https://chromium-review.googlesource.com/c/1271919 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 996628a4 2018-09-24T16:39:26 Vulkan: Add support for VkPipelineCache The cache is initialized from the application's blob cache and is occasionally written back to it for disk storage. Bug: angleproject:2516 Change-Id: I4cba4b00a7b9641c2983ef07159bc62cd10a5519 Reviewed-on: https://chromium-review.googlesource.com/1241373 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill d511948b 2018-09-18T11:32:42 Use FastVector in angle::Subject. This improves object binding performance. We no longer need to check two containers when manipulating the bound subjects/observers. Bug: angleproject:2763 Change-Id: I0ccb2e76be47bd8a28fba5a0c3eff857aa166bb7 Reviewed-on: https://chromium-review.googlesource.com/1227795 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Frank Henigman d731ff82 2018-08-13T18:18:51 Vulkan: support depth offset. Update pipeline description with depth offset state. Enable test. BUG=angleproject:2353 Change-Id: Ib087bbff8e145b0e6e862eb6616a4943a989a7b2 Reviewed-on: https://chromium-review.googlesource.com/1173447 Commit-Queue: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang c16f518e 2018-07-18T10:40:03 Vulkan: Disable the depth/stencil states when there are no depth/stencil buffers We sometimes emulate depth-only or stencil-only buffers with depth-stencil buffers. Disable depth-stencil states that allow reading or writing to these buffers that should not exist. BUG=angleproject:2739 Change-Id: I4f54800404f340eb53f04176e208f19a83a2899c Reviewed-on: https://chromium-review.googlesource.com/1141932 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 21061026 2018-07-12T23:56:30 Vulkan: Use angle::Result error handling. Introduces a vk::Context class to contain an error handler and Renderer pointer. This abtracts the common code path for ContextVk + DisplayVk. Removes vk::Error in favor of the POD angle::Result class. There are a few remaining usages of gl::Error that will have to be cleaned up when we can change the front-end APIs. Bug: angleproject:2713 Change-Id: I5e68f223d595c6c561b59d6a85759e5738ed43c6 Reviewed-on: https://chromium-review.googlesource.com/1128924 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Luc Ferron b70ad524 2018-07-09T16:06:26 Vulkan: Fix all depth/stencil related failures due to Y flip - Fixes all deqp functional_fragment_ops_depth_stencil_* with Y flipping enabled. Bug: angleproject:2673 Change-Id: I94a4225dec8adf9113309e8b8b2c8aa61f6a2bb9 Reviewed-on: https://chromium-review.googlesource.com/1129857 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 834a3a10 2018-07-09T13:32:39 Vulkan: Add driver uniforms set. This will be used to specify the applied Vulkan. We will use this to implement OpenGL line rasterization rules. Bug: angleproject:2717 Change-Id: I3395bf620a01c4b84b19a00037d05f148e5523f3 Reviewed-on: https://chromium-review.googlesource.com/1120151 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Luc Ferron <lucferron@chromium.org>
Luc Ferron 1a135adc 2018-07-04T10:35:31 Vulkan: Fix how the viewport is calculated with Y flip - This fixes all ViewportTest.* and MipmapTest.* - Tests left to fix in end2end: - BlitFramebuffer* - MaxTextureSizeTest.* - PointSpritesTest.* Every other test in angle_end2end_tests are working. Bug: angleproject:2673 Change-Id: I162083bc847c15fa5490ab524ad4c22747d232ea Reviewed-on: https://chromium-review.googlesource.com/1126333 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Luc Ferron bf6dc379 2018-06-28T15:24:19 Vulkan: Flip viewport on y for the backbuffer only - Hide the implementation behind a feature flag, currently disabled permanently as I'm working on fixing the different failures. - SimpleOperationTest.* passing Bug: angleproject:2673 Change-Id: Ic86520c3cc478d62bebbaeaf4c6b33c439a67b0f Reviewed-on: https://chromium-review.googlesource.com/1119089 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 8a4c49fb 2018-06-21T15:43:06 Vulkan: Refactor DynamicDescriptorPool. Changes the set counting to use a free count by descriptor type. Also changes the init to take a pool size count that more closely mirrors Vulkan. Will lead to a fix for descriptor set recreation. Bug: angleproject:2678 Change-Id: I26816befec28ebb866fb0f3aaba27d2bc1d3be43 Reviewed-on: https://chromium-review.googlesource.com/1110661 Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Luc Ferron <lucferron@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Luc Ferron 5fd3693e 2018-06-19T14:55:50 Vulkan: Mask the alpha channel for draw when needed When the angleFormat we have has no alpha channel, but the actual texture underneath has one, we shouldn't be drawing over the alpha channel, so we apply a mask on it when we're in this situation. Bug: angleproject:2597 Change-Id: Ia7110709e6ee32bb61988d08f5049e4e80e7e24e Reviewed-on: https://chromium-review.googlesource.com/1106759 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill c7918ceb 2018-06-13T13:25:31 Vulkan: Add PipelineLayout and DescriptorSetLayout caches. This will be necessary to support more than one PipelineLayout per instance of ANGLE. Sampler array handling requires different layouts for different sampler uses. Bug: angleproject:2462 Change-Id: I1d8b4919eed1a589002ad1898b05186f420061c7 Reviewed-on: https://chromium-review.googlesource.com/1089806 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Luc Ferron <lucferron@chromium.org>
Jamie Madill aaca96ee 2018-06-12T10:19:48 Vulkan: Minor style fixes. Makes some methods const or static. Fixes parameter names. explicit single argument constructors. Other small style fixes. Bug: angleproject:2462 Change-Id: Ie2bf96603e9eda81d6f2aa788867978de10e9992 Reviewed-on: https://chromium-review.googlesource.com/1089805 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Luc Ferron <lucferron@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Jamie Madill 493f9571 2018-05-24T19:52:15 Add PrimitiveMode packed GLenum. Bug: angleproject:2574 Change-Id: I3d7bd7ca0d69a364a611dc04799ea34906fc4a6c Reviewed-on: https://chromium-review.googlesource.com/1067114 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 9aef3670 2018-04-27T11:45:06 Vulkan: Implement masked color clears. This implements masked color clear using clear shaders. The shaders themselves were introduced in a prior patch. In order to get the right setup for the draw call to trigger the shaders, we create an internal pipeline from the pipeline cache. We also use a special pipeline layout with only uniform buffers. The masked out color channels are disabled via settings on the pipeline. This fixes the dEQP masked color clear tests. It doesn't handle masked color clears combined with the depth clear bit. It's likely we don't have test coverage for this case. Bug: angleproject:2455 Change-Id: I513248cc0f7e58f490fc16ac9afb40119d730ccc Reviewed-on: https://chromium-review.googlesource.com/1031373 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 78feddc2 2018-04-27T11:45:05 Vulkan: Take serials in PipelineDesc::updateShaders. This makes the API easy to use with internal shaders and pipelines. This is useful for the implementation of masked color clear. Also renames the serials as shader serials. This is more precise than program serials. Bug: angleproject:2455 Change-Id: Ie6247d1212ed4df856b561a5e9f16c0378202588 Reviewed-on: https://chromium-review.googlesource.com/1032857 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 33318de4 2018-05-01T11:22:54 Vulkan: Use ShaderType enum. This re-uses the same machinery as the GL front-end. It saves a lot of custom casting and array sizing. Currently we only support vertex and fragment shaders in Vulkan. Because of the Pipeline cache sizing, it's easier to stick with just VS/FS and introduce the full set of shaders when we move to packing the cache better. Bug: angleproject:2522 Bug: angleproject:2455 Change-Id: I21432a335c741885af87970d8ee52b4a36338304 Reviewed-on: https://chromium-review.googlesource.com/1036927 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jiawei Shao <jiawei.shao@intel.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Luc Ferron 0986f1cc 2018-04-16T13:47:23 Vulkan: Implement depth_range dirty bit and enable tests - Additional fix in GlslWrapper.cpp to remove the @@ markers for unused attributes. - Enables 28 dEQP gles2 tests in functional.depth_range.* Bug: angleproject:2454 Change-Id: I1a6f72d846b476ba681140d4b242208d24e18b95 Reviewed-on: https://chromium-review.googlesource.com/1014262 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Luc Ferron 14f4817c 2018-04-11T08:43:28 Vulkan: Simplify viewport / scissor updates Stop tying the viewport and the scissor together. Instead, we simply use a very large (0->maxInt) scissor when scissor isn't enabled and we use the clipped scissor to the renderArea size when its enabled. Bug: angleproject:2443 Change-Id: If7454793a050b1833c7d3166ea6b380192085c8f Reviewed-on: https://chromium-review.googlesource.com/1006996 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Luc Ferron d17bdfe5 2018-04-05T13:50:10 Vulkan: 3 Final bugfixes to enable all dEQP depth_stencil tests - The scissor when clearing should not be clipped against the viewport. - The render pass was created with a render area == to the current viewport, but the viewport can be changed by the tests multiple times per render pass, so we should always keep the renderArea to the full framebuffer instead. - Enables an additional 163 dEQP tests. - We should clip the scissor to the framebuffer dimensions instead of the viewport. Its valid to do a cmdClearAttachments outside the viewport, but not outside the full framebuffer's dimension. Bug: angleproject:2443 Change-Id: I79168e9f0c782d6dec77470fef938b85ad7a8794 Reviewed-on: https://chromium-review.googlesource.com/998448 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 6c7ab7fe 2018-03-31T14:19:15 Vulkan: Reorganize helper classes. This renames ResourceVk to vk::CommandGraphResource, which should help clarify its usage. This also moves LineLoopHandler, ImageHelper, and the DynamicBuffer and DynamicCommandPool classes into a new vk_helpers module. This file contains helper classes that manage other resources. Also this makes DynamicBuffer and DynamicDescriptorPool no longer inherit from CommandGraphResource. In the future, only Impl objects will be allowed to be graph resources. Bug: angleproject:2318 Change-Id: I0fa23da2ac853d90f3c822547a4a314f247cc757 Reviewed-on: https://chromium-review.googlesource.com/985200 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Luc Ferron dd196e0b 2018-04-04T11:41:44 Vulkan: Implement color mask and depth mask bits These two features are heavily used in the functional.depth_stencil_clear.* dEQP tests. Enable a bunch of color/depth/stencil clear tests, however there is still 2 tests in particular that are giving me trouble. I will work on them separately in a subsequent change. Bug: angleproject:2443 Bug: angleproject:2455 Change-Id: Ic93420c7b525b424e9641f78265e264ddb163ab1 Reviewed-on: https://chromium-review.googlesource.com/996035 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Luc Ferron 364a9557 2018-03-29T09:44:51 Vulkan: Implement stencil test support All the fragment_ops.depth and the fragment_ops.depth tests in dEQP are now working, but not the fragment_ops.depth_stencil. Still debugging these separately and will come up with a fix for them in another commit. Bug: angleproject:2443 Change-Id: I84c3a22f612fb6dcf30598434f96c2100fd29f9c Reviewed-on: https://chromium-review.googlesource.com/993654 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill bc54342b 2018-03-30T10:43:19 Vulkan: Make RenderTargetVk use ImageHelper. Bug: angleproject:2318 Change-Id: I9bc4bb7f5bcd3029a31c8570809f253cf5e4b12a Reviewed-on: https://chromium-review.googlesource.com/980773 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Luc Ferron <lucferron@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Jamie Madill 0cec82a5 2018-03-14T09:21:07 Vulkan: Implement basic depth/stencil buffers. This implements basic depth/stencil states and clearing. This also implements "fallback" texture formats in the texture generation. Fallback formats are those that are chosen at runtime for replacements for main formats which lack driver support. They are different from override formats, which are always used because we assume there is no driver support. The Vulkan spec only asserts that one of the two of D32 or D24 has mandatory support. In the case of AMD, D24 is not supported fully, and we need the fallback format support emulation. Bug: angleproject:2357 Change-Id: Ic86cede3c69ff9893a06b3a55c3b5d2d897fa55f Reviewed-on: https://chromium-review.googlesource.com/916701 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Luc Ferron 5242d5bf 2018-02-15T07:14:35 Vulkan: Implement scissored clears. Bug: angleproject:2356 Change-Id: I33888f9b4ebaf4b0b5af4ad59b12ad963325a790 Reviewed-on: https://chromium-review.googlesource.com/921882 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill e4c5a23b 2018-03-02T21:00:31 Vulkan: Always use LOAD for RenderPass attachments. The RenderPass load/store ops allow us to specify how we want to use the data from the attachments. Previously we had the load op set to CLEAR always, which would prevent us from doing multiple kinds of operation. Using LOAD should conversatively work in any situation as long as we can ensure each Image is cleared before we use it. To this effect this patch also inserts a preliminary clear into each Texture or Renderbuffer Image's initialization. We already had this for Surfaces. In the future we'll improve this by inserting proper load/store ops, but this unblocks a lot more functionality in the interim. Bug: angleproject:2361 Change-Id: I7610eaa39d81b23dd74b4a24b7f28a66a6dfffc6 Reviewed-on: https://chromium-review.googlesource.com/948782 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Luc Ferron <lucferron@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Luc Ferron f8be756e 2018-02-06T15:59:11 Vulkan: Implement blend states and add a simple test for it Bug: angleproject:2346 Change-Id: I462a2cb29ceda5563f48b4a3cc1d0aa20f4a49fc Reviewed-on: https://chromium-review.googlesource.com/907169 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Luc Ferron 00155d58 2018-02-06T10:48:47 Vulkan: Implement scissor test and add a simple test for it Bug: angleproject:2338 Change-Id: I699189fcd41feca1656c8553fdf4c1078421524d Reviewed-on: https://chromium-review.googlesource.com/904861 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Luc Ferron ceb7190b 2018-02-05T15:18:47 Vulkan: Fix bug in reuse of vertex input bindings Fix bug that used previously used vertex bindings. Now we use the current program mask to only initialize the vulkan pipeline with the active vertex input bindings. + adjust dEQP expectations Bug: angleproject:2334 Change-Id: Ie6176eee99f87dc7a95f664d28e8312b9cb274bc Reviewed-on: https://chromium-review.googlesource.com/902434 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Luc Ferron <lucferron@chromium.org>
Jamie Madill 5dd4ad89 2018-01-29T13:53:43 Vulkan: Add a perf test for the Pipeline cache. This micro-benchmark can be used to measure the performance impact of changing the Pipeline cache. For instance, we can check if changing the size of the hash key affects performance significantly. Also updates the build files so angle_perftests can see vulkan.h, and makes the Vulkan headers an explicit source set. This test currently shows that a lot of time is spent in PMurmurHash, with some time also spent in memcmp. Bug: angleproject:2163 Change-Id: Ie8bb3e31d58590f373d28cbbb59f7e372b80cc29 Reviewed-on: https://chromium-review.googlesource.com/884882 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill ffa4cbb6 2018-01-23T13:04:07 Vulkan: Implement the Pipeline cache. This currently keeps a cache of every PSO compiled and does not trim the cache or evict old members on memory pressure. This will be done as a follow-up. Improves the speed of the Draw Call microbenchmark 50x when using a single state change. Bug: angleproject:2163 Change-Id: I2cceb38ca57ae639f36a944f4571b627481b92da Reviewed-on: https://chromium-review.googlesource.com/876954 Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 112a3a8e 2018-01-23T13:04:06 Vulkan: De-couple Program from VertexArrayVk dirtyiness. The VertexArrayVk is responsible for filling out the packed shader input info in ANGLE's packed PipelineDesc info structure. This packed info structure is used for Pipeline init and caching lookup. The prior design had this info depend on the active inputs in the current Program. This was undesirable because then, on a Program change, the ContextVk would have to call into the VertexArrayVk to invalidate this info. Instead, keep a working copy of the VertexArrayVk bits and only update the bits corresponding to dirty vertex attributes. This simplifies the cached state management a little bit for ContextVk. This also means we don't have to update the cached copy in the VertexArray on a change in VertexArray binding. Bug: angleproject:2163 Change-Id: I5ba74535367aed74957d17bdc61f882508562d0e Reviewed-on: https://chromium-review.googlesource.com/881703 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Jamie Madill 3c424b48 2018-01-19T12:35:09 Vulkan: Add vk_cache_utils.h. This file contains the Pipeline and RenderPass cache utils. Also renames renderervk_utils.h to vk_utils.h and the format utils file. Refactoring change only. Bug: angleproject:2163 Change-Id: I5113a9a2c6f0b0960d38e6c2d8e391fa2d9f5f6a Reviewed-on: https://chromium-review.googlesource.com/876505 Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>