Vulkan: Inline small data conversion function

In a profile of sculpting with the Vulkan GPU backend enabled,
This function made up 0.7% of samples. Since it's just a single
comparison, inlining it should be helpful for the compiler.

Pull Request: https://projects.blender.org/blender/blender/pulls/138210
This commit is contained in:
Hans Goudey
2025-05-01 13:37:36 +02:00
committed by Hans Goudey
parent e1e0c041cf
commit 2894fd79d4
2 changed files with 5 additions and 5 deletions

View File

@@ -1278,11 +1278,6 @@ void VertexFormatConverter::reset()
needs_conversion_ = false;
}
bool VertexFormatConverter::is_initialized() const
{
return device_format_ != nullptr;
}
void VertexFormatConverter::init(const GPUVertFormat *vertex_format,
const VKWorkarounds &workarounds)
{

View File

@@ -194,6 +194,11 @@ struct VertexFormatConverter {
const GPUVertAttr &source_attribute) const;
};
inline bool VertexFormatConverter::is_initialized() const
{
return device_format_ != nullptr;
}
/* \} */
/* -------------------------------------------------------------------- */