Commit 9b4cfd18 by Jamie Madill Committed by Commit Bot

Vulkan: Optimize Attribute Change Perf (1/5)

This patch series optimizes programs that use the pattern: for (;;) { glVertexAttribPointer(...) glDraw(...) } Change 1: Don't null out pipeline on state change. This allows us to use the transition table for reduced CPU overhead. Note that we don't use a transition table for compute pipelines. In total the patch series reduces test iteration time by 25%. This is the most significant patch, reducing test time by 20%. Test: DrawCallPerfBenchmark.Run/vulkan_attrib_change Bug: angleproject:5045 Bug: b/168493024 Change-Id: I3823bb7d83bc2c66357fc5eb8f5dc3e4e54f6a17 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2407340 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarTim Van Patten <timvp@google.com> Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org>
parent e8d01272
...@@ -796,10 +796,8 @@ class ContextVk : public ContextImpl, public vk::Context ...@@ -796,10 +796,8 @@ class ContextVk : public ContextImpl, public vk::Context
ANGLE_INLINE void invalidateCurrentGraphicsPipeline() ANGLE_INLINE void invalidateCurrentGraphicsPipeline()
{ {
mGraphicsDirtyBits |= mNewGraphicsPipelineDirtyBits; mGraphicsDirtyBits |= mNewGraphicsPipelineDirtyBits;
// The draw mode may have changed, toggling whether line rasterization is
// enabled or not, which means we need to recreate the graphics pipeline.
mCurrentGraphicsPipeline = nullptr;
} }
ANGLE_INLINE void invalidateCurrentComputePipeline() ANGLE_INLINE void invalidateCurrentComputePipeline()
{ {
mComputeDirtyBits.set(DIRTY_BIT_PIPELINE); mComputeDirtyBits.set(DIRTY_BIT_PIPELINE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment