Commit
a372f1a8
authored
by
Committed by
swiftshader-scoped@luci-project-accounts.iam.gserviceaccount.com
VulkanBenchmarks: refactor TriangleBenchmark into a more reusable base class
* Renamed TriangleBenchmark to DrawBenchmark
* Added a set of hooks (virtual functions) that are invoked at certain
points during execution of DrawBenchmark::init and renderFrame. These
functions are prefixed with "do" to distinguish them.
* Added some resource management functions in DrawBenchmark, such as
addImage and addSampler for child classes to create these resources. We
want these owned by the base class so that resources can be properly
disposed of in the right order.
* Removed enum class FragShadeType, and replaced with three classes
derived from DrawBenchmark that implement the necessary hooks.
* DrawBenchmark tracks the number of vertices provided via
addVertexBuffer so that it can pass it to vk::CommandBuffer::draw().
Derived types can therefore provide as many (triangle) vertices as they
like from doCreateVertexBuffers.
Bug: b/176981107
Change-Id: I687f3d5ca09f7f93a3d6d7f68871a95bd083bf89
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/52108Tested-by:
Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
Showing
This diff is collapsed.
Click to expand it.
Please
register
or
sign in
to comment