summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/ir_opt
diff options
context:
space:
mode:
authorGravatar ameerj2021-06-12 20:14:56 -0400
committerGravatar ameerj2021-07-22 21:51:38 -0400
commit6aa1bf7b6ff86bb7325e5b50709ddf5477b1e855 (patch)
treef433baa37a2a5d258a2b991b327881f971214ccf /src/shader_recompiler/ir_opt
parentgl_shader_cache: Remove const from pipeline source arguments (diff)
downloadyuzu-6aa1bf7b6ff86bb7325e5b50709ddf5477b1e855.tar.gz
yuzu-6aa1bf7b6ff86bb7325e5b50709ddf5477b1e855.tar.xz
yuzu-6aa1bf7b6ff86bb7325e5b50709ddf5477b1e855.zip
glsl: Implement legacy varyings
Diffstat (limited to 'src/shader_recompiler/ir_opt')
-rw-r--r--src/shader_recompiler/ir_opt/collect_shader_info_pass.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/shader_recompiler/ir_opt/collect_shader_info_pass.cpp b/src/shader_recompiler/ir_opt/collect_shader_info_pass.cpp
index dc78cdefb..10d2822ae 100644
--- a/src/shader_recompiler/ir_opt/collect_shader_info_pass.cpp
+++ b/src/shader_recompiler/ir_opt/collect_shader_info_pass.cpp
@@ -35,6 +35,7 @@ void GetAttribute(Info& info, IR::Attribute attr) {
35 } 35 }
36 if (attr >= IR::Attribute::FixedFncTexture0S && attr <= IR::Attribute::FixedFncTexture9Q) { 36 if (attr >= IR::Attribute::FixedFncTexture0S && attr <= IR::Attribute::FixedFncTexture9Q) {
37 info.loads_fixed_fnc_textures = true; 37 info.loads_fixed_fnc_textures = true;
38 info.loads_legacy_varyings = true;
38 return; 39 return;
39 } 40 }
40 switch (attr) { 41 switch (attr) {
@@ -52,6 +53,7 @@ void GetAttribute(Info& info, IR::Attribute attr) {
52 case IR::Attribute::ColorFrontDiffuseB: 53 case IR::Attribute::ColorFrontDiffuseB:
53 case IR::Attribute::ColorFrontDiffuseA: 54 case IR::Attribute::ColorFrontDiffuseA:
54 info.loads_color_front_diffuse = true; 55 info.loads_color_front_diffuse = true;
56 info.loads_legacy_varyings = true;
55 break; 57 break;
56 case IR::Attribute::PointSpriteS: 58 case IR::Attribute::PointSpriteS:
57 case IR::Attribute::PointSpriteT: 59 case IR::Attribute::PointSpriteT:
@@ -82,6 +84,7 @@ void SetAttribute(Info& info, IR::Attribute attr) {
82 } 84 }
83 if (attr >= IR::Attribute::FixedFncTexture0S && attr <= IR::Attribute::FixedFncTexture9Q) { 85 if (attr >= IR::Attribute::FixedFncTexture0S && attr <= IR::Attribute::FixedFncTexture9Q) {
84 info.stores_fixed_fnc_textures = true; 86 info.stores_fixed_fnc_textures = true;
87 info.stores_legacy_varyings = true;
85 return; 88 return;
86 } 89 }
87 switch (attr) { 90 switch (attr) {
@@ -105,24 +108,28 @@ void SetAttribute(Info& info, IR::Attribute attr) {
105 case IR::Attribute::ColorFrontDiffuseB: 108 case IR::Attribute::ColorFrontDiffuseB:
106 case IR::Attribute::ColorFrontDiffuseA: 109 case IR::Attribute::ColorFrontDiffuseA:
107 info.stores_color_front_diffuse = true; 110 info.stores_color_front_diffuse = true;
111 info.stores_legacy_varyings = true;
108 break; 112 break;
109 case IR::Attribute::ColorFrontSpecularR: 113 case IR::Attribute::ColorFrontSpecularR:
110 case IR::Attribute::ColorFrontSpecularG: 114 case IR::Attribute::ColorFrontSpecularG:
111 case IR::Attribute::ColorFrontSpecularB: 115 case IR::Attribute::ColorFrontSpecularB:
112 case IR::Attribute::ColorFrontSpecularA: 116 case IR::Attribute::ColorFrontSpecularA:
113 info.stores_color_front_specular = true; 117 info.stores_color_front_specular = true;
118 info.stores_legacy_varyings = true;
114 break; 119 break;
115 case IR::Attribute::ColorBackDiffuseR: 120 case IR::Attribute::ColorBackDiffuseR:
116 case IR::Attribute::ColorBackDiffuseG: 121 case IR::Attribute::ColorBackDiffuseG:
117 case IR::Attribute::ColorBackDiffuseB: 122 case IR::Attribute::ColorBackDiffuseB:
118 case IR::Attribute::ColorBackDiffuseA: 123 case IR::Attribute::ColorBackDiffuseA:
119 info.stores_color_back_diffuse = true; 124 info.stores_color_back_diffuse = true;
125 info.stores_legacy_varyings = true;
120 break; 126 break;
121 case IR::Attribute::ColorBackSpecularR: 127 case IR::Attribute::ColorBackSpecularR:
122 case IR::Attribute::ColorBackSpecularG: 128 case IR::Attribute::ColorBackSpecularG:
123 case IR::Attribute::ColorBackSpecularB: 129 case IR::Attribute::ColorBackSpecularB:
124 case IR::Attribute::ColorBackSpecularA: 130 case IR::Attribute::ColorBackSpecularA:
125 info.stores_color_front_specular = true; 131 info.stores_color_back_specular = true;
132 info.stores_legacy_varyings = true;
126 break; 133 break;
127 case IR::Attribute::ClipDistance0: 134 case IR::Attribute::ClipDistance0:
128 case IR::Attribute::ClipDistance1: 135 case IR::Attribute::ClipDistance1: