From b423197619dd8d9dda1c255a76105bf30e255dae Mon Sep 17 00:00:00 2001 From: gdkchan Date: Sun, 13 Aug 2023 22:26:42 -0300 Subject: Delete ShaderConfig and organize shader resources/definitions better (#5509) * Move some properties out of ShaderConfig * Stop using ShaderConfig on backends * Replace ShaderConfig usages on Translator and passes * Move remaining properties out of ShaderConfig and delete ShaderConfig * Remove ResourceManager property from TranslatorContext * Move Rewriter passes to separate transform pass files * Fix TransformPasses.RunPass on cases where a node is removed * Move remaining ClipDistancePrimitivesWritten and UsedFeatures updates to decode stage * Reduce excessive parameter passing a bit by using structs more * Remove binding parameter from ShaderProperties methods since it is redundant * Replace decoder instruction checks with switch statement * Put GLSL on the same plan as SPIR-V for input/output declaration * Stop mutating TranslatorContext state when Translate is called * Pass most of the graphics state using a struct instead of individual query methods * Auto-format * Auto-format * Add backend logging interface * Auto-format * Remove unnecessary use of interpolated strings * Remove more modifications of AttributeUsage after decode * PR feedback * gl_Layer is not supported on compute --- .../Instructions/InstEmit.cs | 100 ++++++++++----------- 1 file changed, 50 insertions(+), 50 deletions(-) (limited to 'src/Ryujinx.Graphics.Shader/Instructions/InstEmit.cs') diff --git a/src/Ryujinx.Graphics.Shader/Instructions/InstEmit.cs b/src/Ryujinx.Graphics.Shader/Instructions/InstEmit.cs index f105505d..0c2f90b7 100644 --- a/src/Ryujinx.Graphics.Shader/Instructions/InstEmit.cs +++ b/src/Ryujinx.Graphics.Shader/Instructions/InstEmit.cs @@ -9,350 +9,350 @@ namespace Ryujinx.Graphics.Shader.Instructions { context.GetOp(); - context.Config.GpuAccessor.Log("Shader instruction AtomCas is not implemented."); + context.TranslatorContext.GpuAccessor.Log("Shader instruction AtomCas is not implemented."); } public static void AtomsCas(EmitterContext context) { context.GetOp(); - context.Config.GpuAccessor.Log("Shader instruction AtomsCas is not implemented."); + context.TranslatorContext.GpuAccessor.Log("Shader instruction AtomsCas is not implemented."); } public static void B2r(EmitterContext context) { context.GetOp(); - context.Config.GpuAccessor.Log("Shader instruction B2r is not implemented."); + context.TranslatorContext.GpuAccessor.Log("Shader instruction B2r is not implemented."); } public static void Bpt(EmitterContext context) { context.GetOp(); - context.Config.GpuAccessor.Log("Shader instruction Bpt is not implemented."); + context.TranslatorContext.GpuAccessor.Log("Shader instruction Bpt is not implemented."); } public static void Cctl(EmitterContext context) { context.GetOp(); - context.Config.GpuAccessor.Log("Shader instruction Cctl is not implemented."); + context.TranslatorContext.GpuAccessor.Log("Shader instruction Cctl is not implemented."); } public static void Cctll(EmitterContext context) { context.GetOp(); - context.Config.GpuAccessor.Log("Shader instruction Cctll is not implemented."); + context.TranslatorContext.GpuAccessor.Log("Shader instruction Cctll is not implemented."); } public static void Cctlt(EmitterContext context) { context.GetOp(); - context.Config.GpuAccessor.Log("Shader instruction Cctlt is not implemented."); + context.TranslatorContext.GpuAccessor.Log("Shader instruction Cctlt is not implemented."); } public static void Cs2r(EmitterContext context) { context.GetOp(); - context.Config.GpuAccessor.Log("Shader instruction Cs2r is not implemented."); + context.TranslatorContext.GpuAccessor.Log("Shader instruction Cs2r is not implemented."); } public static void FchkR(EmitterContext context) { context.GetOp(); - context.Config.GpuAccessor.Log("Shader instruction FchkR is not implemented."); + context.TranslatorContext.GpuAccessor.Log("Shader instruction FchkR is not implemented."); } public static void FchkI(EmitterContext context) { context.GetOp(); - context.Config.GpuAccessor.Log("Shader instruction FchkI is not implemented."); + context.TranslatorContext.GpuAccessor.Log("Shader instruction FchkI is not implemented."); } public static void FchkC(EmitterContext context) { context.GetOp(); - context.Config.GpuAccessor.Log("Shader instruction FchkC is not implemented."); + context.TranslatorContext.GpuAccessor.Log("Shader instruction FchkC is not implemented."); } public static void Getcrsptr(EmitterContext context) { context.GetOp(); - context.Config.GpuAccessor.Log("Shader instruction Getcrsptr is not implemented."); + context.TranslatorContext.GpuAccessor.Log("Shader instruction Getcrsptr is not implemented."); } public static void Getlmembase(EmitterContext context) { context.GetOp(); - context.Config.GpuAccessor.Log("Shader instruction Getlmembase is not implemented."); + context.TranslatorContext.GpuAccessor.Log("Shader instruction Getlmembase is not implemented."); } public static void Ide(EmitterContext context) { context.GetOp(); - context.Config.GpuAccessor.Log("Shader instruction Ide is not implemented."); + context.TranslatorContext.GpuAccessor.Log("Shader instruction Ide is not implemented."); } public static void IdpR(EmitterContext context) { context.GetOp(); - context.Config.GpuAccessor.Log("Shader instruction IdpR is not implemented."); + context.TranslatorContext.GpuAccessor.Log("Shader instruction IdpR is not implemented."); } public static void IdpC(EmitterContext context) { context.GetOp(); - context.Config.GpuAccessor.Log("Shader instruction IdpC is not implemented."); + context.TranslatorContext.GpuAccessor.Log("Shader instruction IdpC is not implemented."); } public static void ImadspR(EmitterContext context) { context.GetOp(); - context.Config.GpuAccessor.Log("Shader instruction ImadspR is not implemented."); + context.TranslatorContext.GpuAccessor.Log("Shader instruction ImadspR is not implemented."); } public static void ImadspI(EmitterContext context) { context.GetOp(); - context.Config.GpuAccessor.Log("Shader instruction ImadspI is not implemented."); + context.TranslatorContext.GpuAccessor.Log("Shader instruction ImadspI is not implemented."); } public static void ImadspC(EmitterContext context) { context.GetOp(); - context.Config.GpuAccessor.Log("Shader instruction ImadspC is not implemented."); + context.TranslatorContext.GpuAccessor.Log("Shader instruction ImadspC is not implemented."); } public static void ImadspRc(EmitterContext context) { context.GetOp(); - context.Config.GpuAccessor.Log("Shader instruction ImadspRc is not implemented."); + context.TranslatorContext.GpuAccessor.Log("Shader instruction ImadspRc is not implemented."); } public static void Jcal(EmitterContext context) { context.GetOp(); - context.Config.GpuAccessor.Log("Shader instruction Jcal is not implemented."); + context.TranslatorContext.GpuAccessor.Log("Shader instruction Jcal is not implemented."); } public static void Jmp(EmitterContext context) { context.GetOp(); - context.Config.GpuAccessor.Log("Shader instruction Jmp is not implemented."); + context.TranslatorContext.GpuAccessor.Log("Shader instruction Jmp is not implemented."); } public static void Jmx(EmitterContext context) { context.GetOp(); - context.Config.GpuAccessor.Log("Shader instruction Jmx is not implemented."); + context.TranslatorContext.GpuAccessor.Log("Shader instruction Jmx is not implemented."); } public static void Ld(EmitterContext context) { context.GetOp(); - context.Config.GpuAccessor.Log("Shader instruction Ld is not implemented."); + context.TranslatorContext.GpuAccessor.Log("Shader instruction Ld is not implemented."); } public static void Lepc(EmitterContext context) { context.GetOp(); - context.Config.GpuAccessor.Log("Shader instruction Lepc is not implemented."); + context.TranslatorContext.GpuAccessor.Log("Shader instruction Lepc is not implemented."); } public static void Longjmp(EmitterContext context) { context.GetOp(); - context.Config.GpuAccessor.Log("Shader instruction Longjmp is not implemented."); + context.TranslatorContext.GpuAccessor.Log("Shader instruction Longjmp is not implemented."); } public static void Pexit(EmitterContext context) { context.GetOp(); - context.Config.GpuAccessor.Log("Shader instruction Pexit is not implemented."); + context.TranslatorContext.GpuAccessor.Log("Shader instruction Pexit is not implemented."); } public static void Pixld(EmitterContext context) { context.GetOp(); - context.Config.GpuAccessor.Log("Shader instruction Pixld is not implemented."); + context.TranslatorContext.GpuAccessor.Log("Shader instruction Pixld is not implemented."); } public static void Plongjmp(EmitterContext context) { context.GetOp(); - context.Config.GpuAccessor.Log("Shader instruction Plongjmp is not implemented."); + context.TranslatorContext.GpuAccessor.Log("Shader instruction Plongjmp is not implemented."); } public static void Pret(EmitterContext context) { context.GetOp(); - context.Config.GpuAccessor.Log("Shader instruction Pret is not implemented."); + context.TranslatorContext.GpuAccessor.Log("Shader instruction Pret is not implemented."); } public static void PrmtR(EmitterContext context) { context.GetOp(); - context.Config.GpuAccessor.Log("Shader instruction PrmtR is not implemented."); + context.TranslatorContext.GpuAccessor.Log("Shader instruction PrmtR is not implemented."); } public static void PrmtI(EmitterContext context) { context.GetOp(); - context.Config.GpuAccessor.Log("Shader instruction PrmtI is not implemented."); + context.TranslatorContext.GpuAccessor.Log("Shader instruction PrmtI is not implemented."); } public static void PrmtC(EmitterContext context) { context.GetOp(); - context.Config.GpuAccessor.Log("Shader instruction PrmtC is not implemented."); + context.TranslatorContext.GpuAccessor.Log("Shader instruction PrmtC is not implemented."); } public static void PrmtRc(EmitterContext context) { context.GetOp(); - context.Config.GpuAccessor.Log("Shader instruction PrmtRc is not implemented."); + context.TranslatorContext.GpuAccessor.Log("Shader instruction PrmtRc is not implemented."); } public static void R2b(EmitterContext context) { context.GetOp(); - context.Config.GpuAccessor.Log("Shader instruction R2b is not implemented."); + context.TranslatorContext.GpuAccessor.Log("Shader instruction R2b is not implemented."); } public static void Ram(EmitterContext context) { context.GetOp(); - context.Config.GpuAccessor.Log("Shader instruction Ram is not implemented."); + context.TranslatorContext.GpuAccessor.Log("Shader instruction Ram is not implemented."); } public static void Rtt(EmitterContext context) { context.GetOp(); - context.Config.GpuAccessor.Log("Shader instruction Rtt is not implemented."); + context.TranslatorContext.GpuAccessor.Log("Shader instruction Rtt is not implemented."); } public static void Sam(EmitterContext context) { context.GetOp(); - context.Config.GpuAccessor.Log("Shader instruction Sam is not implemented."); + context.TranslatorContext.GpuAccessor.Log("Shader instruction Sam is not implemented."); } public static void Setcrsptr(EmitterContext context) { context.GetOp(); - context.Config.GpuAccessor.Log("Shader instruction Setcrsptr is not implemented."); + context.TranslatorContext.GpuAccessor.Log("Shader instruction Setcrsptr is not implemented."); } public static void Setlmembase(EmitterContext context) { context.GetOp(); - context.Config.GpuAccessor.Log("Shader instruction Setlmembase is not implemented."); + context.TranslatorContext.GpuAccessor.Log("Shader instruction Setlmembase is not implemented."); } public static void St(EmitterContext context) { context.GetOp(); - context.Config.GpuAccessor.Log("Shader instruction St is not implemented."); + context.TranslatorContext.GpuAccessor.Log("Shader instruction St is not implemented."); } public static void Stp(EmitterContext context) { context.GetOp(); - context.Config.GpuAccessor.Log("Shader instruction Stp is not implemented."); + context.TranslatorContext.GpuAccessor.Log("Shader instruction Stp is not implemented."); } public static void Txa(EmitterContext context) { context.GetOp(); - context.Config.GpuAccessor.Log("Shader instruction Txa is not implemented."); + context.TranslatorContext.GpuAccessor.Log("Shader instruction Txa is not implemented."); } public static void Vabsdiff(EmitterContext context) { context.GetOp(); - context.Config.GpuAccessor.Log("Shader instruction Vabsdiff is not implemented."); + context.TranslatorContext.GpuAccessor.Log("Shader instruction Vabsdiff is not implemented."); } public static void Vabsdiff4(EmitterContext context) { context.GetOp(); - context.Config.GpuAccessor.Log("Shader instruction Vabsdiff4 is not implemented."); + context.TranslatorContext.GpuAccessor.Log("Shader instruction Vabsdiff4 is not implemented."); } public static void Vadd(EmitterContext context) { context.GetOp(); - context.Config.GpuAccessor.Log("Shader instruction Vadd is not implemented."); + context.TranslatorContext.GpuAccessor.Log("Shader instruction Vadd is not implemented."); } public static void Votevtg(EmitterContext context) { context.GetOp(); - context.Config.GpuAccessor.Log("Shader instruction Votevtg is not implemented."); + context.TranslatorContext.GpuAccessor.Log("Shader instruction Votevtg is not implemented."); } public static void Vset(EmitterContext context) { context.GetOp(); - context.Config.GpuAccessor.Log("Shader instruction Vset is not implemented."); + context.TranslatorContext.GpuAccessor.Log("Shader instruction Vset is not implemented."); } public static void Vshl(EmitterContext context) { context.GetOp(); - context.Config.GpuAccessor.Log("Shader instruction Vshl is not implemented."); + context.TranslatorContext.GpuAccessor.Log("Shader instruction Vshl is not implemented."); } public static void Vshr(EmitterContext context) { context.GetOp(); - context.Config.GpuAccessor.Log("Shader instruction Vshr is not implemented."); + context.TranslatorContext.GpuAccessor.Log("Shader instruction Vshr is not implemented."); } } } -- cgit v1.2.3