1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-03-15 07:29:17 +01:00

[dxbc] Do not export PointSize on maintenance5-enabled drivers

... or on broken drivers that just explode for no reason at all.
This commit is contained in:
Philip Rebohle 2025-03-09 11:09:53 +01:00
parent 4543c76e39
commit 2856474935
4 changed files with 12 additions and 6 deletions

View File

@ -6899,15 +6899,15 @@ namespace dxvk {
void DxbcCompiler::emitPointSizeStore() { void DxbcCompiler::emitPointSizeStore() {
if (!m_pointSizeOut) { if (m_moduleInfo.options.needsPointSizeExport) {
m_pointSizeOut = emitNewBuiltinVariable(DxbcRegisterInfo { uint32_t pointSizeId = emitNewBuiltinVariable(DxbcRegisterInfo {
{ DxbcScalarType::Float32, 1, 0 }, { DxbcScalarType::Float32, 1, 0 },
spv::StorageClassOutput }, spv::StorageClassOutput },
spv::BuiltInPointSize, spv::BuiltInPointSize,
"point_size"); "point_size");
}
m_module.opStore(m_pointSizeOut, m_module.constf32(1.0f)); m_module.opStore(pointSizeId, m_module.constf32(1.0f));
}
} }

View File

@ -514,8 +514,6 @@ namespace dxvk {
uint32_t m_primitiveIdIn = 0; uint32_t m_primitiveIdIn = 0;
uint32_t m_primitiveIdOut = 0; uint32_t m_primitiveIdOut = 0;
uint32_t m_pointSizeOut = 0;
////////////////////////////////////////////////// //////////////////////////////////////////////////
// Immediate constant buffer. If defined, this is // Immediate constant buffer. If defined, this is
// an array of four-component uint32 vectors. // an array of four-component uint32 vectors.

View File

@ -41,6 +41,11 @@ namespace dxvk {
enableSampleShadingInterlock = device->features().extFragmentShaderInterlock.fragmentShaderSampleInterlock; enableSampleShadingInterlock = device->features().extFragmentShaderInterlock.fragmentShaderSampleInterlock;
supportsTightIcbPacking = device->features().vk12.uniformBufferStandardLayout; supportsTightIcbPacking = device->features().vk12.uniformBufferStandardLayout;
// Qcom just breaks for no reason if we export point size,
// even in an environment where doing so is required.
needsPointSizeExport = !device->features().khrMaintenance5.maintenance5
&& !device->adapter()->matchesDriver(VK_DRIVER_ID_QUALCOMM_PROPRIETARY);
// Figure out float control flags to match D3D11 rules // Figure out float control flags to match D3D11 rules
if (options.floatControls) { if (options.floatControls) {
if (devInfo.vk12.shaderSignedZeroInfNanPreserveFloat32) if (devInfo.vk12.shaderSignedZeroInfNanPreserveFloat32)

View File

@ -57,6 +57,9 @@ namespace dxvk {
/// constant buffers if possible /// constant buffers if possible
bool supportsTightIcbPacking = false; bool supportsTightIcbPacking = false;
/// Whether exporting point size is required
bool needsPointSizeExport = true;
/// Float control flags /// Float control flags
DxbcFloatControlFlags floatControl; DxbcFloatControlFlags floatControl;