From 7a37d88067f3b1a32497e27b99f528df36ddc11e Mon Sep 17 00:00:00 2001 From: Chip Davis Date: Wed, 27 Mar 2019 15:34:20 -0500 Subject: [PATCH] [dxvk] Log vertex attributes and buffers when logging pipeline state. This was invaluable in diagnosing a missing feature from MoltenVK. --- src/dxvk/dxvk_graphics.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/dxvk/dxvk_graphics.cpp b/src/dxvk/dxvk_graphics.cpp index b37c9b38b..7b5891a75 100644 --- a/src/dxvk/dxvk_graphics.cpp +++ b/src/dxvk/dxvk_graphics.cpp @@ -491,8 +491,17 @@ namespace dxvk { if (m_tes != nullptr) Logger::log(level, str::format(" tes : ", m_tes->shader()->debugName())); if (m_gs != nullptr) Logger::log(level, str::format(" gs : ", m_gs ->shader()->debugName())); if (m_fs != nullptr) Logger::log(level, str::format(" fs : ", m_fs ->shader()->debugName())); + + for (uint32_t i = 0; i < state.ilAttributeCount; i++) { + const VkVertexInputAttributeDescription& attr = state.ilAttributes[i]; + Logger::log(level, str::format(" attr ", i, " : location ", attr.location, ", binding ", attr.binding, ", format ", attr.format, ", offset ", attr.offset)); + } + for (uint32_t i = 0; i < state.ilBindingCount; i++) { + const VkVertexInputBindingDescription& bind = state.ilBindings[i]; + Logger::log(level, str::format(" binding ", i, " : binding ", bind.binding, ", stride ", bind.stride, ", rate ", bind.inputRate, ", divisor ", state.ilDivisors[i])); + } // TODO log more pipeline state } -} \ No newline at end of file +}