DXIL Debugger Implement DXOp::LegacyDoubleTo*

DXOp::LegacyDoubleToFloat
DXOp::LegacyDoubleToSInt32
DXOp::LegacyDoubleToUInt32
This commit is contained in:
Jake Turner
2024-12-15 12:10:06 +00:00
parent 5c889e9083
commit 9fb4a9aa64
2 changed files with 17 additions and 6 deletions
+17 -3
View File
@@ -2912,6 +2912,23 @@ bool ThreadState::ExecuteInstruction(DebugAPIWrapper *apiWrapper,
result.value.f32v[0] = ConvertFromHalf(arg.value.u16v[0]);
break;
}
case DXOp::LegacyDoubleToFloat:
case DXOp::LegacyDoubleToSInt32:
case DXOp::LegacyDoubleToUInt32:
{
RDCASSERTEQUAL(inst.args[1]->type->type, Type::TypeKind::Scalar);
RDCASSERTEQUAL(inst.args[1]->type->scalarType, Type::Float);
RDCASSERTEQUAL(inst.args[1]->type->bitWidth, 64);
ShaderVariable arg;
RDCASSERT(GetShaderVariable(inst.args[1], opCode, dxOpCode, arg));
if(dxOpCode == DXOp::LegacyDoubleToFloat)
result.value.f32v[0] = (float)arg.value.f64v[0];
else if(dxOpCode == DXOp::LegacyDoubleToSInt32)
result.value.s32v[0] = (int32_t)arg.value.f64v[0];
else if(dxOpCode == DXOp::LegacyDoubleToUInt32)
result.value.u32v[0] = (uint32_t)arg.value.f64v[0];
break;
}
case DXOp::AtomicBinOp:
case DXOp::AtomicCompareExchange:
{
@@ -3505,9 +3522,6 @@ bool ThreadState::ExecuteInstruction(DebugAPIWrapper *apiWrapper,
break;
}
// Likely to implement when required
case DXOp::LegacyDoubleToFloat:
case DXOp::LegacyDoubleToSInt32:
case DXOp::LegacyDoubleToUInt32:
case DXOp::AttributeAtVertex:
case DXOp::InstanceID:
case DXOp::InstanceIndex:
@@ -1846,9 +1846,6 @@ rdcstr Program::GetDebugStatus()
case DXOp::WavePrefixOp:
case DXOp::QuadReadLaneAt:
case DXOp::QuadOp:
case DXOp::LegacyDoubleToFloat:
case DXOp::LegacyDoubleToSInt32:
case DXOp::LegacyDoubleToUInt32:
case DXOp::WaveAllBitCount:
case DXOp::WavePrefixBitCount:
case DXOp::AttributeAtVertex: