Fix vulkan vertex shader debugging populating inputs

This commit is contained in:
baldurk
2020-11-10 12:40:52 +00:00
parent daaff29044
commit 5f6f00d175
@@ -3788,6 +3788,8 @@ ShaderDebugTrace *VulkanReplay::DebugVertex(uint32_t eventId, uint32_t vertid, u
{
VkDeviceSize vertexOffset = 0;
found = true;
if(bind.perInstance)
{
if(bind.instanceDivisor == 0)
@@ -3837,6 +3839,11 @@ ShaderDebugTrace *VulkanReplay::DebugVertex(uint32_t eventId, uint32_t vertid, u
"(index %u) in instance %u.",
attr.location, attr.binding, vertid, idx, instid));
if(IsUIntFormat(attr.format) || IsSIntFormat(attr.format))
var.type = VarType::UInt;
else
var.type = VarType::Float;
set0001(var);
}
else
@@ -3851,6 +3858,8 @@ ShaderDebugTrace *VulkanReplay::DebugVertex(uint32_t eventId, uint32_t vertid, u
// this is the only packed UINT format
Vec4u decoded = ConvertFromR10G10B10A2UInt(*(uint32_t *)data.data());
var.type = VarType::UInt;
setUintComp(var, 0, decoded.x);
setUintComp(var, 1, decoded.y);
setUintComp(var, 2, decoded.z);
@@ -3866,6 +3875,8 @@ ShaderDebugTrace *VulkanReplay::DebugVertex(uint32_t eventId, uint32_t vertid, u
{
FloatVector decoded = DecodeFormattedComponents(fmt, data.data());
var.type = VarType::Float;
setFloatComp(var, 0, decoded.x);
setFloatComp(var, 1, decoded.y);
setFloatComp(var, 2, decoded.z);