From 81c8f1f77ede6dc0e872b02bb869d774a2d74c49 Mon Sep 17 00:00:00 2001 From: baldurk Date: Tue, 19 Jul 2016 19:19:57 +0200 Subject: [PATCH] Prefix GL uniforms with 'uniform'. Refs #302 --- renderdocui/Windows/ShaderViewer.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/renderdocui/Windows/ShaderViewer.cs b/renderdocui/Windows/ShaderViewer.cs index 2974e3ea5..11281f484 100644 --- a/renderdocui/Windows/ShaderViewer.cs +++ b/renderdocui/Windows/ShaderViewer.cs @@ -2078,7 +2078,7 @@ namespace renderdocui.Windows if (m_Core.APIProps.pipelineType == APIPipelineStateType.D3D11) CurrentScintilla.InsertText(GetPostVersionInsertPosition(), "uint4 RENDERDOC_TexDim; // xyz == width, height, depth. w == # mips" + Environment.NewLine + Environment.NewLine); else if (m_Core.APIProps.pipelineType == APIPipelineStateType.OpenGL) - CurrentScintilla.InsertText(GetPostVersionInsertPosition(), "uvec4 RENDERDOC_TexDim; // xyz == width, height, depth. w == # mips" + Environment.NewLine + Environment.NewLine); + CurrentScintilla.InsertText(GetPostVersionInsertPosition(), "uniform uvec4 RENDERDOC_TexDim; // xyz == width, height, depth. w == # mips" + Environment.NewLine + Environment.NewLine); else if (m_Core.APIProps.pipelineType == APIPipelineStateType.Vulkan) InsertVulkanUBO(); CurrentScintilla.CurrentPos = 0; @@ -2091,8 +2091,10 @@ namespace renderdocui.Windows if (m_Core.APIProps.pipelineType == APIPipelineStateType.Vulkan) InsertVulkanUBO(); - else + else if (m_Core.APIProps.pipelineType == APIPipelineStateType.D3D11) CurrentScintilla.InsertText(GetPostVersionInsertPosition(), "uint RENDERDOC_SelectedMip; // selected mip in UI" + Environment.NewLine + Environment.NewLine); + else if (m_Core.APIProps.pipelineType == APIPipelineStateType.OpenGL) + CurrentScintilla.InsertText(GetPostVersionInsertPosition(), "uniform uint RENDERDOC_SelectedMip; // selected mip in UI" + Environment.NewLine + Environment.NewLine); CurrentScintilla.CurrentPos = 0; } @@ -2104,7 +2106,7 @@ namespace renderdocui.Windows if(m_Core.APIProps.pipelineType == APIPipelineStateType.D3D11) CurrentScintilla.InsertText(GetPostVersionInsertPosition(), "uint RENDERDOC_TextureType; // 1 = 1D, 2 = 2D, 3 = 3D, 4 = Depth, 5 = Depth + Stencil, 6 = Depth (MS), 7 = Depth + Stencil (MS)" + Environment.NewLine + Environment.NewLine); else if (m_Core.APIProps.pipelineType == APIPipelineStateType.OpenGL) - CurrentScintilla.InsertText(GetPostVersionInsertPosition(), "uint RENDERDOC_TextureType; // 1 = 1D, 2 = 2D, 3 = 3D, 4 = Cube, 5 = 1DArray, 6 = 2DArray, 7 = CubeArray, 8 = Rect, 9 = Buffer, 10 = 2DMS" + Environment.NewLine + Environment.NewLine); + CurrentScintilla.InsertText(GetPostVersionInsertPosition(), "uniform uint RENDERDOC_TextureType; // 1 = 1D, 2 = 2D, 3 = 3D, 4 = Cube, 5 = 1DArray, 6 = 2DArray, 7 = CubeArray, 8 = Rect, 9 = Buffer, 10 = 2DMS" + Environment.NewLine + Environment.NewLine); else if (m_Core.APIProps.pipelineType == APIPipelineStateType.Vulkan) InsertVulkanUBO(); CurrentScintilla.CurrentPos = 0;