Merge pull request #2695 from ReinUsesLisp/layer-viewport

gl_shader_decompiler: Implement gl_ViewportIndex and gl_Layer in vertex shaders
This commit is contained in:
Fernando Sahmkow
2019-07-15 16:28:07 -04:00
committed by GitHub
10 changed files with 137 additions and 40 deletions

View File

@ -89,6 +89,22 @@ Node ShaderIR::GetPhysicalInputAttribute(Tegra::Shader::Register physical_addres
}
Node ShaderIR::GetOutputAttribute(Attribute::Index index, u64 element, Node buffer) {
if (index == Attribute::Index::LayerViewportPointSize) {
switch (element) {
case 0:
UNIMPLEMENTED();
break;
case 1:
uses_layer = true;
break;
case 2:
uses_viewport_index = true;
break;
case 3:
uses_point_size = true;
break;
}
}
if (index == Attribute::Index::ClipDistances0123 ||
index == Attribute::Index::ClipDistances4567) {
const auto clip_index =