1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-11 10:24:10 +01:00

[dxbc] Decorate integer fragment shader builtins as flat

Fixes yellow tint in Unreal Engine 4 games on RADV and AMDGPU-PRO.
This commit is contained in:
Philip Rebohle 2019-02-23 14:33:59 +01:00
parent b65520d627
commit d12a8e09a8
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -7098,8 +7098,14 @@ namespace dxvk {
const char* name) { const char* name) {
const uint32_t varId = emitNewVariable(info); const uint32_t varId = emitNewVariable(info);
m_module.decorateBuiltIn(varId, builtIn);
m_module.setDebugName(varId, name); m_module.setDebugName(varId, name);
m_module.decorateBuiltIn(varId, builtIn);
if (m_programInfo.type() == DxbcProgramType::PixelShader
&& info.type.ctype != DxbcScalarType::Float32
&& info.type.ctype != DxbcScalarType::Bool
&& info.sclass == spv::StorageClassInput)
m_module.decorate(varId, spv::DecorationFlat);
m_entryPointInterfaces.push_back(varId); m_entryPointInterfaces.push_back(varId);
return varId; return varId;