Fix identification of vendor UAV on SM5.1+

This commit is contained in:
baldurk
2021-04-12 16:04:39 +01:00
parent cf8785db90
commit 3bc996116d
2 changed files with 3 additions and 2 deletions
+1
View File
@@ -3032,6 +3032,7 @@ bool WrappedID3D12Device::Serialise_SetShaderExtUAV(SerialiserType &ser, GPUVend
}
else if(vendor == GPUVendor::AMD)
{
m_GlobalEXTUAVSpace = space;
// do nothing, it was configured at device create time. This is purely informational
}
else
@@ -1862,13 +1862,13 @@ DXBCContainer::DXBCContainer(bytebuf &ByteCode, const rdcstr &debugInfoPath, Gra
if(shaderExtReg != ~0U)
{
bool found = false;
const bool sm51 = (m_Version.Major == 5 && m_Version.Minor == 1);
const bool pre_sm51 = (m_Version.Major * 10 + m_Version.Minor) < 51;
// see if we can find the magic UAV. If so remove it from the reflection
for(size_t i = 0; i < m_Reflection->UAVs.size(); i++)
{
const ShaderInputBind &uav = m_Reflection->UAVs[i];
if(uav.reg == shaderExtReg && (!sm51 || shaderExtSpace == ~0U || shaderExtSpace == uav.space))
if(uav.reg == shaderExtReg && (pre_sm51 || shaderExtSpace == uav.space))
{
found = true;
m_Reflection->UAVs.erase(i);