コード例 #1
0
        public static string Str(this ShaderStageType stage, APIPipelineStateType apitype)
        {
            if (apitype == APIPipelineStateType.D3D11)
            {
                switch (stage)
                {
                case ShaderStageType.Vertex: return("Vertex");

                case ShaderStageType.Hull: return("Hull");

                case ShaderStageType.Domain: return("Domain");

                case ShaderStageType.Geometry: return("Geometry");

                case ShaderStageType.Pixel: return("Pixel");

                case ShaderStageType.Compute: return("Compute");
                }
            }
            else if (apitype == APIPipelineStateType.OpenGL)
            {
                switch (stage)
                {
                case ShaderStageType.Vertex: return("Vertex");

                case ShaderStageType.Tess_Control: return("Tess. Control");

                case ShaderStageType.Tess_Eval: return("Tess. Eval");

                case ShaderStageType.Geometry: return("Geometry");

                case ShaderStageType.Fragment: return("Fragment");

                case ShaderStageType.Compute: return("Compute");
                }
            }

            return(stage.ToString());
        }
コード例 #2
0
        public static string Abbrev(this ShaderStageType stage, APIPipelineStateType apitype)
        {
            if (apitype == APIPipelineStateType.D3D11)
            {
                switch (stage)
                {
                case ShaderStageType.Vertex: return("VS");

                case ShaderStageType.Hull: return("HS");

                case ShaderStageType.Domain: return("DS");

                case ShaderStageType.Geometry: return("GS");

                case ShaderStageType.Pixel: return("PS");

                case ShaderStageType.Compute: return("CS");
                }
            }
            else if (apitype == APIPipelineStateType.OpenGL)
            {
                switch (stage)
                {
                case ShaderStageType.Vertex: return("VS");

                case ShaderStageType.Tess_Control: return("TCS");

                case ShaderStageType.Tess_Eval: return("TES");

                case ShaderStageType.Geometry: return("GS");

                case ShaderStageType.Fragment: return("FS");

                case ShaderStageType.Compute: return("CS");
                }
            }

            return("?S");
        }
コード例 #3
0
ファイル: Enums.cs プロジェクト: hatahet/renderdoc
        public static string Str(this ShaderStageType stage, APIPipelineStateType apitype)
        {
            if (apitype == APIPipelineStateType.D3D11)
            {
                switch (stage)
                {
                    case ShaderStageType.Vertex: return "Vertex";
                    case ShaderStageType.Hull: return "Hull";
                    case ShaderStageType.Domain: return "Domain";
                    case ShaderStageType.Geometry: return "Geometry";
                    case ShaderStageType.Pixel: return "Pixel";
                    case ShaderStageType.Compute: return "Compute";
                }
            }
            else if(apitype == APIPipelineStateType.OpenGL)
            {
                switch (stage)
                {
                    case ShaderStageType.Vertex: return "Vertex";
                    case ShaderStageType.Tess_Control: return "Tess. Control";
                    case ShaderStageType.Tess_Eval: return "Tess. Eval";
                    case ShaderStageType.Geometry: return "Geometry";
                    case ShaderStageType.Fragment: return "Fragment";
                    case ShaderStageType.Compute: return "Compute";
                }
            }

            return stage.ToString();
        }
コード例 #4
0
ファイル: Enums.cs プロジェクト: hatahet/renderdoc
        public static string Str(this ResourceUsage usage, APIPipelineStateType apitype)
        {
            if (apitype == APIPipelineStateType.D3D11)
            {
                switch (usage)
                {
                    case ResourceUsage.VertexBuffer: return "Vertex Buffer";
                    case ResourceUsage.IndexBuffer: return "Index Buffer";

                    case ResourceUsage.VS_Constants: return "VS - Constant Buffer";
                    case ResourceUsage.GS_Constants: return "GS - Constant Buffer";
                    case ResourceUsage.HS_Constants: return "HS - Constant Buffer";
                    case ResourceUsage.DS_Constants: return "DS - Constant Buffer";
                    case ResourceUsage.CS_Constants: return "CS - Constant Buffer";
                    case ResourceUsage.PS_Constants: return "PS - Constant Buffer";

                    case ResourceUsage.SO: return "Stream Out";

                    case ResourceUsage.VS_Resource: return "VS - Resource";
                    case ResourceUsage.GS_Resource: return "GS - Resource";
                    case ResourceUsage.HS_Resource: return "HS - Resource";
                    case ResourceUsage.DS_Resource: return "DS - Resource";
                    case ResourceUsage.CS_Resource: return "CS - Resource";
                    case ResourceUsage.PS_Resource: return "PS - Resource";

                    case ResourceUsage.VS_RWResource: return "VS - UAV";
                    case ResourceUsage.HS_RWResource: return "HS - UAV";
                    case ResourceUsage.DS_RWResource: return "DS - UAV";
                    case ResourceUsage.GS_RWResource: return "GS - UAV";
                    case ResourceUsage.PS_RWResource: return "PS - UAV";
                    case ResourceUsage.CS_RWResource: return "CS - UAV";

                    case ResourceUsage.ColourTarget: return "Rendertarget";
                    case ResourceUsage.DepthStencilTarget: return "Depthstencil";

                    case ResourceUsage.Clear: return "Clear";

                    case ResourceUsage.GenMips: return "Generate Mips";
                    case ResourceUsage.Resolve: return "Resolve";
                    case ResourceUsage.ResolveSrc: return "Resolve - Source";
                    case ResourceUsage.ResolveDst: return "Resolve - Dest";
                    case ResourceUsage.Copy: return "Copy";
                    case ResourceUsage.CopySrc: return "Copy - Source";
                    case ResourceUsage.CopyDst: return "Copy - Dest";
                }
            }
            else if (apitype == APIPipelineStateType.OpenGL)
            {
                switch (usage)
                {
                    case ResourceUsage.VertexBuffer: return "Vertex Buffer";
                    case ResourceUsage.IndexBuffer: return "Index Buffer";

                    case ResourceUsage.VS_Constants: return "VS - Uniform Buffer";
                    case ResourceUsage.GS_Constants: return "GS - Uniform Buffer";
                    case ResourceUsage.HS_Constants: return "HS - Uniform Buffer";
                    case ResourceUsage.DS_Constants: return "DS - Uniform Buffer";
                    case ResourceUsage.CS_Constants: return "CS - Uniform Buffer";
                    case ResourceUsage.PS_Constants: return "PS - Uniform Buffer";

                    case ResourceUsage.SO: return "Transform Feedback";

                    case ResourceUsage.VS_Resource: return "VS - Texture";
                    case ResourceUsage.GS_Resource: return "GS - Texture";
                    case ResourceUsage.HS_Resource: return "HS - Texture";
                    case ResourceUsage.DS_Resource: return "DS - Texture";
                    case ResourceUsage.CS_Resource: return "CS - Texture";
                    case ResourceUsage.PS_Resource: return "PS - Texture";

                    case ResourceUsage.VS_RWResource: return "VS - Image/SSBO";
                    case ResourceUsage.HS_RWResource: return "HS - Image/SSBO";
                    case ResourceUsage.DS_RWResource: return "DS - Image/SSBO";
                    case ResourceUsage.GS_RWResource: return "GS - Image/SSBO";
                    case ResourceUsage.PS_RWResource: return "PS - Image/SSBO";
                    case ResourceUsage.CS_RWResource: return "CS - Image/SSBO";

                    case ResourceUsage.ColourTarget: return "FBO Colour";
                    case ResourceUsage.DepthStencilTarget: return "FBO Depthstencil";

                    case ResourceUsage.Clear: return "Clear";

                    case ResourceUsage.GenMips: return "Generate Mips";
                    case ResourceUsage.Resolve: return "Framebuffer blit";
                    case ResourceUsage.ResolveSrc: return "Framebuffer blit - Source";
                    case ResourceUsage.ResolveDst: return "Framebuffer blit - Dest";
                    case ResourceUsage.Copy: return "Copy";
                    case ResourceUsage.CopySrc: return "Copy - Source";
                    case ResourceUsage.CopyDst: return "Copy - Dest";
                }
            }

            return "Unknown Usage String";
        }
コード例 #5
0
ファイル: Enums.cs プロジェクト: hatahet/renderdoc
        public static string Abbrev(this ShaderStageType stage, APIPipelineStateType apitype)
        {
            if (apitype == APIPipelineStateType.D3D11)
            {
                switch (stage)
                {
                    case ShaderStageType.Vertex: return "VS";
                    case ShaderStageType.Hull: return "HS";
                    case ShaderStageType.Domain: return "DS";
                    case ShaderStageType.Geometry: return "GS";
                    case ShaderStageType.Pixel: return "PS";
                    case ShaderStageType.Compute: return "CS";
                }
            }
            else if (apitype == APIPipelineStateType.OpenGL)
            {
                switch (stage)
                {
                    case ShaderStageType.Vertex: return "VS";
                    case ShaderStageType.Tess_Control: return "TCS";
                    case ShaderStageType.Tess_Eval: return "TES";
                    case ShaderStageType.Geometry: return "GS";
                    case ShaderStageType.Fragment: return "FS";
                    case ShaderStageType.Compute: return "CS";
                }
            }

            return "?S";
        }
コード例 #6
0
        public static string Str(this ResourceUsage usage, APIPipelineStateType apitype)
        {
            if (apitype == APIPipelineStateType.D3D11)
            {
                switch (usage)
                {
                case ResourceUsage.VertexBuffer: return("Vertex Buffer");

                case ResourceUsage.IndexBuffer: return("Index Buffer");

                case ResourceUsage.VS_Constants: return("VS - Constant Buffer");

                case ResourceUsage.GS_Constants: return("GS - Constant Buffer");

                case ResourceUsage.HS_Constants: return("HS - Constant Buffer");

                case ResourceUsage.DS_Constants: return("DS - Constant Buffer");

                case ResourceUsage.CS_Constants: return("CS - Constant Buffer");

                case ResourceUsage.PS_Constants: return("PS - Constant Buffer");

                case ResourceUsage.SO: return("Stream Out");

                case ResourceUsage.VS_Resource: return("VS - Resource");

                case ResourceUsage.GS_Resource: return("GS - Resource");

                case ResourceUsage.HS_Resource: return("HS - Resource");

                case ResourceUsage.DS_Resource: return("DS - Resource");

                case ResourceUsage.CS_Resource: return("CS - Resource");

                case ResourceUsage.PS_Resource: return("PS - Resource");

                case ResourceUsage.VS_RWResource: return("VS - UAV");

                case ResourceUsage.HS_RWResource: return("HS - UAV");

                case ResourceUsage.DS_RWResource: return("DS - UAV");

                case ResourceUsage.GS_RWResource: return("GS - UAV");

                case ResourceUsage.PS_RWResource: return("PS - UAV");

                case ResourceUsage.CS_RWResource: return("CS - UAV");

                case ResourceUsage.ColourTarget: return("Rendertarget");

                case ResourceUsage.DepthStencilTarget: return("Depthstencil");

                case ResourceUsage.Clear: return("Clear");

                case ResourceUsage.GenMips: return("Generate Mips");

                case ResourceUsage.Resolve: return("Resolve");

                case ResourceUsage.ResolveSrc: return("Resolve - Source");

                case ResourceUsage.ResolveDst: return("Resolve - Dest");

                case ResourceUsage.Copy: return("Copy");

                case ResourceUsage.CopySrc: return("Copy - Source");

                case ResourceUsage.CopyDst: return("Copy - Dest");
                }
            }
            else if (apitype == APIPipelineStateType.OpenGL)
            {
                switch (usage)
                {
                case ResourceUsage.VertexBuffer: return("Vertex Buffer");

                case ResourceUsage.IndexBuffer: return("Index Buffer");

                case ResourceUsage.VS_Constants: return("VS - Uniform Buffer");

                case ResourceUsage.GS_Constants: return("GS - Uniform Buffer");

                case ResourceUsage.HS_Constants: return("HS - Uniform Buffer");

                case ResourceUsage.DS_Constants: return("DS - Uniform Buffer");

                case ResourceUsage.CS_Constants: return("CS - Uniform Buffer");

                case ResourceUsage.PS_Constants: return("PS - Uniform Buffer");

                case ResourceUsage.SO: return("Transform Feedback");

                case ResourceUsage.VS_Resource: return("VS - Texture");

                case ResourceUsage.GS_Resource: return("GS - Texture");

                case ResourceUsage.HS_Resource: return("HS - Texture");

                case ResourceUsage.DS_Resource: return("DS - Texture");

                case ResourceUsage.CS_Resource: return("CS - Texture");

                case ResourceUsage.PS_Resource: return("PS - Texture");

                case ResourceUsage.VS_RWResource: return("VS - Image/SSBO");

                case ResourceUsage.HS_RWResource: return("HS - Image/SSBO");

                case ResourceUsage.DS_RWResource: return("DS - Image/SSBO");

                case ResourceUsage.GS_RWResource: return("GS - Image/SSBO");

                case ResourceUsage.PS_RWResource: return("PS - Image/SSBO");

                case ResourceUsage.CS_RWResource: return("CS - Image/SSBO");

                case ResourceUsage.ColourTarget: return("FBO Colour");

                case ResourceUsage.DepthStencilTarget: return("FBO Depthstencil");

                case ResourceUsage.Clear: return("Clear");

                case ResourceUsage.GenMips: return("Generate Mips");

                case ResourceUsage.Resolve: return("Framebuffer blit");

                case ResourceUsage.ResolveSrc: return("Framebuffer blit - Source");

                case ResourceUsage.ResolveDst: return("Framebuffer blit - Dest");

                case ResourceUsage.Copy: return("Copy");

                case ResourceUsage.CopySrc: return("Copy - Source");

                case ResourceUsage.CopyDst: return("Copy - Dest");
                }
            }

            return("Unknown Usage String");
        }