1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-03-13 19:29:14 +01:00

[dxbc] Handle shaders without refactoringAllowed flag

This commit is contained in:
Philip Rebohle 2021-03-18 17:46:45 +01:00
parent 38649372bf
commit cf4ff820be
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
2 changed files with 10 additions and 3 deletions

View File

@ -360,6 +360,9 @@ namespace dxvk {
void DxbcCompiler::emitDclGlobalFlags(const DxbcShaderInstruction& ins) {
const DxbcGlobalFlags flags = ins.controls.globalFlags();
if (flags.test(DxbcGlobalFlag::RefactoringAllowed))
m_precise = false;
if (flags.test(DxbcGlobalFlag::EarlyFragmentTests))
m_module.setExecutionMode(m_entryPointId, spv::ExecutionModeEarlyFragmentTests);
}
@ -1768,7 +1771,7 @@ namespace dxvk {
return;
}
if (ins.controls.precise())
if (ins.controls.precise() || m_precise)
m_module.decorate(dst.id, spv::DecorationNoContraction);
// Store computed value
@ -2020,7 +2023,7 @@ namespace dxvk {
src.at(0).id,
src.at(1).id);
if (ins.controls.precise())
if (ins.controls.precise() || m_precise)
m_module.decorate(dst.id, spv::DecorationNoContraction);
dst = emitDstOperandModifiers(dst, ins.modifiers);

View File

@ -538,7 +538,11 @@ namespace dxvk {
/////////////////////////////
// Enabled SPIR-V extensions
DxbcSpirvExtensions m_extensions;
//////////////////////
// Global state stuff
bool m_precise = true;
/////////////////////////////////////////////////////
// Shader interface and metadata declaration methods
void emitDcl(