mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-20 10:54:16 +01:00
[dxbc] Fix EvalSnapped offset interpretation
This commit is contained in:
parent
640758afcf
commit
4709d429ed
@ -3364,8 +3364,20 @@ namespace dxvk {
|
|||||||
} break;
|
} break;
|
||||||
|
|
||||||
case DxbcOpcode::EvalSnapped: {
|
case DxbcOpcode::EvalSnapped: {
|
||||||
const DxbcRegisterValue offset = emitRegisterLoad(
|
// The offset is encoded as a 4-bit fixed point value
|
||||||
|
DxbcRegisterValue offset = emitRegisterLoad(
|
||||||
ins.src[1], DxbcRegMask(true, true, false, false));
|
ins.src[1], DxbcRegMask(true, true, false, false));
|
||||||
|
offset.id = m_module.opBitFieldSExtract(
|
||||||
|
getVectorTypeId(offset.type), offset.id,
|
||||||
|
m_module.consti32(0), m_module.consti32(4));
|
||||||
|
|
||||||
|
offset.type.ctype = DxbcScalarType::Float32;
|
||||||
|
offset.id = m_module.opConvertStoF(
|
||||||
|
getVectorTypeId(offset.type), offset.id);
|
||||||
|
|
||||||
|
offset.id = m_module.opFMul(
|
||||||
|
getVectorTypeId(offset.type), offset.id,
|
||||||
|
m_module.constvec2f32(1.0f / 16.0f, 1.0f / 16.0f));
|
||||||
|
|
||||||
result.id = m_module.opInterpolateAtOffset(
|
result.id = m_module.opInterpolateAtOffset(
|
||||||
getVectorTypeId(result.type),
|
getVectorTypeId(result.type),
|
||||||
|
@ -1035,7 +1035,7 @@ namespace dxvk {
|
|||||||
{ 3, DxbcInstClass::Interpolate, {
|
{ 3, DxbcInstClass::Interpolate, {
|
||||||
{ DxbcOperandKind::DstReg, DxbcScalarType::Float32 },
|
{ DxbcOperandKind::DstReg, DxbcScalarType::Float32 },
|
||||||
{ DxbcOperandKind::SrcReg, DxbcScalarType::Float32 },
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Float32 },
|
||||||
{ DxbcOperandKind::SrcReg, DxbcScalarType::Float32 },
|
{ DxbcOperandKind::SrcReg, DxbcScalarType::Sint32 },
|
||||||
} },
|
} },
|
||||||
/* EvalSampleIndex */
|
/* EvalSampleIndex */
|
||||||
{ 3, DxbcInstClass::Interpolate, {
|
{ 3, DxbcInstClass::Interpolate, {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user