Commit fedb85b7 by Ian Elliott Committed by Commit Bot

Vulkan: Warn for unsupported vertex attrib format

Provide both a performance warning and a debug-util label (for AGI) when loading a vertex attribute requires a format conversion. Bug: b/184355822 Change-Id: Id8cbb34f70214327e1f5cc96559e4ea66dc17889 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2801154 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: 's avatarTim Van Patten <timvp@google.com>
parent 795d7543
...@@ -578,6 +578,17 @@ angle::Result VertexArrayVk::syncDirtyAttrib(ContextVk *contextVk, ...@@ -578,6 +578,17 @@ angle::Result VertexArrayVk::syncDirtyAttrib(ContextVk *contextVk,
if (vertexFormat.getVertexLoadRequiresConversion(compressed) || !bindingIsAligned) if (vertexFormat.getVertexLoadRequiresConversion(compressed) || !bindingIsAligned)
{ {
if (vertexFormat.getVertexLoadRequiresConversion(compressed))
{
std::ostringstream stream;
stream << "The Vulkan driver does not support the 0x" << std::hex
<< vertexFormat.intendedFormat().glInternalFormat
<< " vertex attribute format; emulating with 0x"
<< vertexFormat.actualBufferFormat(compressed).glInternalFormat;
ANGLE_PERF_WARNING(contextVk->getDebug(), GL_DEBUG_SEVERITY_LOW,
stream.str().c_str());
ANGLE_TRY(contextVk->insertEventMarker(0, stream.str().c_str()));
}
ConversionBuffer *conversion = bufferVk->getVertexConversionBuffer( ConversionBuffer *conversion = bufferVk->getVertexConversionBuffer(
renderer, intendedFormat.id, binding.getStride(), renderer, intendedFormat.id, binding.getStride(),
binding.getOffset() + attrib.relativeOffset, !bindingIsAligned); binding.getOffset() + attrib.relativeOffset, !bindingIsAligned);
......
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