コード例 #1
0
ファイル: Enums.cs プロジェクト: msgfx/renderdoc
        public static string Str(this ShaderStageType stage, GraphicsAPI apitype)
        {
            if (apitype.IsD3D())
            {
                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 == GraphicsAPI.OpenGL || apitype == GraphicsAPI.Vulkan)
            {
                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
ファイル: Enums.cs プロジェクト: msgfx/renderdoc
        public static string Str(this ResourceUsage usage, GraphicsAPI apitype)
        {
            if (apitype.IsD3D())
            {
                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.All_Constants: return("All - 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.All_Resource: return("All - 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.All_RWResource: return("All - UAV");

                case ResourceUsage.InputTarget: return("Colour Input");

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

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

                case ResourceUsage.Indirect: return("Indirect argument");

                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");

                case ResourceUsage.Barrier: return("Barrier");
                }
            }
            else if (apitype == GraphicsAPI.OpenGL || apitype == GraphicsAPI.Vulkan)
            {
                bool vk = (apitype == GraphicsAPI.Vulkan);

                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.All_Constants: return("All - 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.All_Resource: return("All - 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.All_RWResource: return("All - Image/SSBO");

                case ResourceUsage.InputTarget: return("FBO Input");

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

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

                case ResourceUsage.Indirect: return("Indirect argument");

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

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

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

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

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

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

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

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

                case ResourceUsage.Barrier: return("Barrier");
                }
            }

            return("Unknown Usage String");
        }
コード例 #3
0
ファイル: Enums.cs プロジェクト: Nexuapex/renderdoc
        public static string Str(this ShaderStageType stage, GraphicsAPI apitype)
        {
            if (apitype.IsD3D())
            {
                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 == GraphicsAPI.OpenGL || apitype == GraphicsAPI.Vulkan)
            {
                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 プロジェクト: Nexuapex/renderdoc
        public static string Str(this ResourceUsage usage, GraphicsAPI apitype)
        {
            if (apitype.IsD3D())
            {
                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.All_Constants: return "All - 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.All_Resource: return "All - 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.All_RWResource: return "All - UAV";

                    case ResourceUsage.InputTarget: return "Colour Input";
                    case ResourceUsage.ColourTarget: return "Rendertarget";
                    case ResourceUsage.DepthStencilTarget: return "Depthstencil";

                    case ResourceUsage.Indirect: return "Indirect argument";

                    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";

                    case ResourceUsage.Barrier: return "Barrier";
                }
            }
            else if (apitype == GraphicsAPI.OpenGL || apitype == GraphicsAPI.Vulkan)
            {
                bool vk = (apitype == GraphicsAPI.Vulkan);

                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.All_Constants: return "All - 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.All_Resource: return "All - 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.All_RWResource: return "All - Image/SSBO";

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

                    case ResourceUsage.Indirect: return "Indirect argument";

                    case ResourceUsage.Clear: return "Clear";

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

                    case ResourceUsage.Barrier: return "Barrier";
                }
            }

            return "Unknown Usage String";
        }