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:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -194,6 +194,11 @@ struct VertexFormatConverter {
|
||||
const GPUVertAttr &source_attribute) const;
|
||||
};
|
||||
|
||||
inline bool VertexFormatConverter::is_initialized() const
|
||||
{
|
||||
return device_format_ != nullptr;
|
||||
}
|
||||
|
||||
/* \} */
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
|
||||
Reference in New Issue
Block a user