mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +01:00
[dxbc] Remove packDrefValueIntoCoordinates hack
Causes more issues than it solves when the coordinate vector gets too big.
This commit is contained in:
parent
fcb2b6d2d8
commit
8bfd12067a
@ -2633,17 +2633,6 @@ namespace dxvk {
|
|||||||
DxbcRegMask(true, false, false, false))
|
DxbcRegMask(true, false, false, false))
|
||||||
: DxbcRegisterValue();
|
: DxbcRegisterValue();
|
||||||
|
|
||||||
if (isDepthCompare && m_options.packDrefValueIntoCoordinates) {
|
|
||||||
const std::array<uint32_t, 2> packedCoordIds
|
|
||||||
= {{ coord.id, referenceValue.id }};
|
|
||||||
|
|
||||||
coord.type.ccount += 1;
|
|
||||||
coord.id = m_module.opCompositeConstruct(
|
|
||||||
getVectorTypeId(coord.type),
|
|
||||||
packedCoordIds.size(),
|
|
||||||
packedCoordIds.data());
|
|
||||||
}
|
|
||||||
|
|
||||||
// Determine the sampled image type based on the opcode.
|
// Determine the sampled image type based on the opcode.
|
||||||
const uint32_t sampledImageType = isDepthCompare
|
const uint32_t sampledImageType = isDepthCompare
|
||||||
? m_module.defSampledImageType(m_textures.at(textureId).depthTypeId)
|
? m_module.defSampledImageType(m_textures.at(textureId).depthTypeId)
|
||||||
@ -2758,17 +2747,6 @@ namespace dxvk {
|
|||||||
? emitRegisterLoad(ins.src[3], DxbcRegMask(true, false, false, false))
|
? emitRegisterLoad(ins.src[3], DxbcRegMask(true, false, false, false))
|
||||||
: DxbcRegisterValue();
|
: DxbcRegisterValue();
|
||||||
|
|
||||||
if (isDepthCompare && m_options.packDrefValueIntoCoordinates) {
|
|
||||||
const std::array<uint32_t, 2> packedCoordIds
|
|
||||||
= {{ coord.id, referenceValue.id }};
|
|
||||||
|
|
||||||
coord.type.ccount += 1;
|
|
||||||
coord.id = m_module.opCompositeConstruct(
|
|
||||||
getVectorTypeId(coord.type),
|
|
||||||
packedCoordIds.size(),
|
|
||||||
packedCoordIds.data());
|
|
||||||
}
|
|
||||||
|
|
||||||
// Load explicit gradients for sample operations that require them
|
// Load explicit gradients for sample operations that require them
|
||||||
const bool hasExplicitGradients = ins.op == DxbcOpcode::SampleD;
|
const bool hasExplicitGradients = ins.op == DxbcOpcode::SampleD;
|
||||||
|
|
||||||
|
@ -12,18 +12,11 @@ namespace dxvk {
|
|||||||
if (vendor == DxvkGpuVendor::Nvidia) {
|
if (vendor == DxvkGpuVendor::Nvidia) {
|
||||||
// From vkd3d: NMin/NMax/NClamp crash the driver.
|
// From vkd3d: NMin/NMax/NClamp crash the driver.
|
||||||
this->useSimpleMinMaxClamp = true;
|
this->useSimpleMinMaxClamp = true;
|
||||||
|
|
||||||
// From vkd3d: Nvidia expects the depth reference
|
|
||||||
// value to be packed into the coordinate vector.
|
|
||||||
this->packDrefValueIntoCoordinates = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Inform the user about which workarounds are enabled
|
// Inform the user about which workarounds are enabled
|
||||||
if (this->useSimpleMinMaxClamp)
|
if (this->useSimpleMinMaxClamp)
|
||||||
Logger::warn("DxbcOptions: Using FMin/FMax/FClamp instead of NMin/NMax/NClamp");
|
Logger::warn("DxbcOptions: Using FMin/FMax/FClamp instead of NMin/NMax/NClamp");
|
||||||
|
|
||||||
if (this->packDrefValueIntoCoordinates)
|
|
||||||
Logger::warn("DxbcOptions: Packing depth reference value into coordinate vector");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -17,10 +17,6 @@ namespace dxvk {
|
|||||||
|
|
||||||
/// Use Fmin/Fmax instead of Nmin/Nmax.
|
/// Use Fmin/Fmax instead of Nmin/Nmax.
|
||||||
bool useSimpleMinMaxClamp = false;
|
bool useSimpleMinMaxClamp = false;
|
||||||
|
|
||||||
/// Pack the depth reference value into the
|
|
||||||
/// coordinate vector for depth-compare ops.
|
|
||||||
bool packDrefValueIntoCoordinates = false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user