diff options
| author | 2021-12-18 14:03:40 +0800 | |
|---|---|---|
| committer | 2021-12-18 14:03:40 +0800 | |
| commit | 94652e122dcf627b451fcd3d91156a663ae3dafe (patch) | |
| tree | d19e482d310882b90a901eaea4d3a80fc52f4313 /src/shader_recompiler/backend/glsl/glsl_emit_context.cpp | |
| parent | Merge branch 'yuzu-emu:master' into convert_legacy (diff) | |
| download | yuzu-94652e122dcf627b451fcd3d91156a663ae3dafe.tar.gz yuzu-94652e122dcf627b451fcd3d91156a663ae3dafe.tar.xz yuzu-94652e122dcf627b451fcd3d91156a663ae3dafe.zip | |
Remove glsl handle legacy related code
Diffstat (limited to 'src/shader_recompiler/backend/glsl/glsl_emit_context.cpp')
| -rw-r--r-- | src/shader_recompiler/backend/glsl/glsl_emit_context.cpp | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/src/shader_recompiler/backend/glsl/glsl_emit_context.cpp b/src/shader_recompiler/backend/glsl/glsl_emit_context.cpp index 1de017e76..bc9d2a904 100644 --- a/src/shader_recompiler/backend/glsl/glsl_emit_context.cpp +++ b/src/shader_recompiler/backend/glsl/glsl_emit_context.cpp | |||
| @@ -211,27 +211,6 @@ std::string_view OutputPrimitive(OutputTopology topology) { | |||
| 211 | throw InvalidArgument("Invalid output topology {}", topology); | 211 | throw InvalidArgument("Invalid output topology {}", topology); |
| 212 | } | 212 | } |
| 213 | 213 | ||
| 214 | void SetupLegacyOutPerVertex(EmitContext& ctx, std::string& header) { | ||
| 215 | if (!ctx.info.stores.Legacy()) { | ||
| 216 | return; | ||
| 217 | } | ||
| 218 | if (ctx.info.stores.FixedFunctionTexture()) { | ||
| 219 | header += "vec4 gl_TexCoord[8];"; | ||
| 220 | } | ||
| 221 | if (ctx.info.stores.AnyComponent(IR::Attribute::ColorFrontDiffuseR)) { | ||
| 222 | header += "vec4 gl_FrontColor;"; | ||
| 223 | } | ||
| 224 | if (ctx.info.stores.AnyComponent(IR::Attribute::ColorFrontSpecularR)) { | ||
| 225 | header += "vec4 gl_FrontSecondaryColor;"; | ||
| 226 | } | ||
| 227 | if (ctx.info.stores.AnyComponent(IR::Attribute::ColorBackDiffuseR)) { | ||
| 228 | header += "vec4 gl_BackColor;"; | ||
| 229 | } | ||
| 230 | if (ctx.info.stores.AnyComponent(IR::Attribute::ColorBackSpecularR)) { | ||
| 231 | header += "vec4 gl_BackSecondaryColor;"; | ||
| 232 | } | ||
| 233 | } | ||
| 234 | |||
| 235 | void SetupOutPerVertex(EmitContext& ctx, std::string& header) { | 214 | void SetupOutPerVertex(EmitContext& ctx, std::string& header) { |
| 236 | if (!StoresPerVertexAttributes(ctx.stage)) { | 215 | if (!StoresPerVertexAttributes(ctx.stage)) { |
| 237 | return; | 216 | return; |
| @@ -250,7 +229,6 @@ void SetupOutPerVertex(EmitContext& ctx, std::string& header) { | |||
| 250 | ctx.profile.support_viewport_index_layer_non_geometry && ctx.stage != Stage::Geometry) { | 229 | ctx.profile.support_viewport_index_layer_non_geometry && ctx.stage != Stage::Geometry) { |
| 251 | header += "int gl_ViewportIndex;"; | 230 | header += "int gl_ViewportIndex;"; |
| 252 | } | 231 | } |
| 253 | SetupLegacyOutPerVertex(ctx, header); | ||
| 254 | header += "};"; | 232 | header += "};"; |
| 255 | if (ctx.info.stores[IR::Attribute::ViewportIndex] && ctx.stage == Stage::Geometry) { | 233 | if (ctx.info.stores[IR::Attribute::ViewportIndex] && ctx.stage == Stage::Geometry) { |
| 256 | header += "out int gl_ViewportIndex;"; | 234 | header += "out int gl_ViewportIndex;"; |
| @@ -282,21 +260,6 @@ void SetupInPerVertex(EmitContext& ctx, std::string& header) { | |||
| 282 | } | 260 | } |
| 283 | header += "}gl_in[gl_MaxPatchVertices];"; | 261 | header += "}gl_in[gl_MaxPatchVertices];"; |
| 284 | } | 262 | } |
| 285 | |||
| 286 | void SetupLegacyInPerFragment(EmitContext& ctx, std::string& header) { | ||
| 287 | if (!ctx.info.loads.Legacy()) { | ||
| 288 | return; | ||
| 289 | } | ||
| 290 | header += "in gl_PerFragment{"; | ||
| 291 | if (ctx.info.loads.FixedFunctionTexture()) { | ||
| 292 | header += "vec4 gl_TexCoord[8];"; | ||
| 293 | } | ||
| 294 | if (ctx.info.loads.AnyComponent(IR::Attribute::ColorFrontDiffuseR)) { | ||
| 295 | header += "vec4 gl_Color;"; | ||
| 296 | } | ||
| 297 | header += "};"; | ||
| 298 | } | ||
| 299 | |||
| 300 | } // Anonymous namespace | 263 | } // Anonymous namespace |
| 301 | 264 | ||
| 302 | EmitContext::EmitContext(IR::Program& program, Bindings& bindings, const Profile& profile_, | 265 | EmitContext::EmitContext(IR::Program& program, Bindings& bindings, const Profile& profile_, |
| @@ -361,7 +324,6 @@ EmitContext::EmitContext(IR::Program& program, Bindings& bindings, const Profile | |||
| 361 | } | 324 | } |
| 362 | SetupOutPerVertex(*this, header); | 325 | SetupOutPerVertex(*this, header); |
| 363 | SetupInPerVertex(*this, header); | 326 | SetupInPerVertex(*this, header); |
| 364 | SetupLegacyInPerFragment(*this, header); | ||
| 365 | 327 | ||
| 366 | for (size_t index = 0; index < IR::NUM_GENERICS; ++index) { | 328 | for (size_t index = 0; index < IR::NUM_GENERICS; ++index) { |
| 367 | if (!info.loads.Generic(index) || !runtime_info.previous_stage_stores.Generic(index)) { | 329 | if (!info.loads.Generic(index) || !runtime_info.previous_stage_stores.Generic(index)) { |