Commit dfd76005 by Jamie Madill Committed by Commit Bot

Vulkan: Don't update pipeline when only textures change.

We could expand this functionality in the future to only update the pipeline when a signficiant bit of pipeline state changes. For now this is mostly a proof of concept. Significantly improves performance in the textures microbenchmark. Bug: angleproject:3117 Change-Id: I3957dd2f08d7d89694f94ddbe45eeeeb620bac0a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1650790Reviewed-by: 's avatarTobin Ehlis <tobine@google.com> Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent 351e8098
...@@ -222,6 +222,9 @@ ContextVk::ContextVk(const gl::State &state, gl::ErrorSet *errorSet, RendererVk ...@@ -222,6 +222,9 @@ ContextVk::ContextVk(const gl::State &state, gl::ErrorSet *errorSet, RendererVk
mDirtyBits = mNewCommandBufferDirtyBits; mDirtyBits = mNewCommandBufferDirtyBits;
mActiveTextures.fill(nullptr); mActiveTextures.fill(nullptr);
mPipelineDirtyBitsMask.set();
mPipelineDirtyBitsMask.reset(gl::State::DIRTY_BIT_TEXTURE_BINDINGS);
} }
#undef INIT #undef INIT
...@@ -1390,7 +1393,7 @@ angle::Result ContextVk::syncState(const gl::Context *context, ...@@ -1390,7 +1393,7 @@ angle::Result ContextVk::syncState(const gl::Context *context,
const gl::State::DirtyBits &dirtyBits, const gl::State::DirtyBits &dirtyBits,
const gl::State::DirtyBits &bitMask) const gl::State::DirtyBits &bitMask)
{ {
if (dirtyBits.any()) if ((dirtyBits & mPipelineDirtyBitsMask).any())
{ {
invalidateVertexAndIndexBuffers(); invalidateVertexAndIndexBuffers();
} }
......
...@@ -590,6 +590,8 @@ class ContextVk : public ContextImpl, public vk::Context, public vk::CommandBuff ...@@ -590,6 +590,8 @@ class ContextVk : public ContextImpl, public vk::Context, public vk::CommandBuff
// Generator for texure serials. // Generator for texure serials.
SerialFactory mTextureSerialFactory; SerialFactory mTextureSerialFactory;
gl::State::DirtyBits mPipelineDirtyBitsMask;
}; };
} // namespace rx } // namespace rx
......
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