mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-31 14:52:11 +01:00
[dxbc] Correctly report a sample count of 0 for unbound images
This commit is contained in:
parent
a3e0157ab0
commit
04152055b7
@ -3078,7 +3078,6 @@ namespace dxvk {
|
|||||||
// sampleinfo has two operands:
|
// sampleinfo has two operands:
|
||||||
// (dst0) The destination register
|
// (dst0) The destination register
|
||||||
// (src0) Resource to query
|
// (src0) Resource to query
|
||||||
// TODO Check if resource is bound
|
|
||||||
DxbcRegisterValue sampleCount = emitQueryTextureSamples(ins.src[0]);
|
DxbcRegisterValue sampleCount = emitQueryTextureSamples(ins.src[0]);
|
||||||
|
|
||||||
if (ins.controls.returnType() != DxbcInstructionReturnType::Uint) {
|
if (ins.controls.returnType() != DxbcInstructionReturnType::Uint) {
|
||||||
@ -3097,7 +3096,6 @@ namespace dxvk {
|
|||||||
// (dst0) The destination register
|
// (dst0) The destination register
|
||||||
// (src0) Resource to query
|
// (src0) Resource to query
|
||||||
// (src1) Sample index
|
// (src1) Sample index
|
||||||
// TODO Check if resource is bound
|
|
||||||
if (m_samplePositions == 0)
|
if (m_samplePositions == 0)
|
||||||
m_samplePositions = emitSamplePosArray();
|
m_samplePositions = emitSamplePosArray();
|
||||||
|
|
||||||
@ -5056,6 +5054,10 @@ namespace dxvk {
|
|||||||
result.id = m_module.opImageQuerySamples(
|
result.id = m_module.opImageQuerySamples(
|
||||||
getVectorTypeId(result.type),
|
getVectorTypeId(result.type),
|
||||||
m_module.opLoad(info.typeId, info.varId));
|
m_module.opLoad(info.typeId, info.varId));
|
||||||
|
|
||||||
|
// Report a sample count of 0 for unbound images
|
||||||
|
result.id = m_module.opSelect(getVectorTypeId(result.type),
|
||||||
|
info.specId, result.id, m_module.constu32(0));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user