mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +01:00
[dxbc] Fix layer count in resinfo instruction
For non-layered types, this instruction is supposed to return 0, not 1.
This commit is contained in:
parent
f71f527b4d
commit
0bf97993c6
@ -4558,6 +4558,16 @@ namespace dxvk {
|
|||||||
getVectorTypeId(result.type),
|
getVectorTypeId(result.type),
|
||||||
m_module.opLoad(info.typeId, info.varId));
|
m_module.opLoad(info.typeId, info.varId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (info.image.array && !info.image.layered) {
|
||||||
|
const uint32_t index = result.type.ccount - 1;
|
||||||
|
const uint32_t zero = m_module.constu32(0);
|
||||||
|
|
||||||
|
result.id = m_module.opCompositeInsert(
|
||||||
|
getVectorTypeId(result.type),
|
||||||
|
zero, result.id, 1, &index);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4613,7 +4623,6 @@ namespace dxvk {
|
|||||||
}
|
}
|
||||||
}();
|
}();
|
||||||
|
|
||||||
|
|
||||||
coordVector.id = m_module.opCompositeInsert(
|
coordVector.id = m_module.opCompositeInsert(
|
||||||
getVectorTypeId(coordVector.type),
|
getVectorTypeId(coordVector.type),
|
||||||
zero, coordVector.id, 1, &index);
|
zero, coordVector.id, 1, &index);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user