Don't generate potentially unsupported vertex formats to ignore W

* When using VS In we want to ignore the W component, but that already happens
  explicitly for vulkan/GL in the shader. Mirror that same solution to D3D
  instead of trying to force a 3-component format which may not be supported
  (e.g. on AMD R16G16B16_*)
This commit is contained in:
baldurk
2021-09-13 19:11:28 +01:00
parent adb2b65951
commit 90f3417039
5 changed files with 27 additions and 6 deletions
-5
View File
@@ -3230,7 +3230,6 @@ void BufferViewer::UI_CalculateMeshFormats()
}
m_VSInPosition.format = prop.format;
m_VSInPosition.format.compCount = qMin((uint8_t)3, m_VSInPosition.format.compCount);
}
elIdx = m_ModelVSIn->secondaryColumn();
@@ -3285,11 +3284,7 @@ void BufferViewer::UI_CalculateMeshFormats()
// if geometry/tessellation is enabled, don't unproject VS output data
if(m_Ctx.CurPipelineState().GetShader(ShaderStage::Tess_Eval) != ResourceId() ||
m_Ctx.CurPipelineState().GetShader(ShaderStage::Geometry) != ResourceId())
{
m_PostVSPosition.unproject = false;
// ignore any W component that might be there, let it be filled in with 1.0
m_PostVSPosition.format.compCount = qMin((uint8_t)3, m_VSInPosition.format.compCount);
}
elIdx = m_ModelVSOut->secondaryColumn();