From 2f14e2ac7064adab2eca4d5f91c9f9d2e9c62046 Mon Sep 17 00:00:00 2001 From: baldurk Date: Fri, 25 Nov 2016 14:15:56 +0100 Subject: [PATCH] make displayAsHex a real member of ShaderVariable, for use in qrenderdoc --- renderdoc/api/replay/shader_types.h | 10 ++++++---- renderdocui/Interop/Shader.cs | 3 +-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/renderdoc/api/replay/shader_types.h b/renderdoc/api/replay/shader_types.h index 8d1861b7a..9b0752e09 100644 --- a/renderdoc/api/replay/shader_types.h +++ b/renderdoc/api/replay/shader_types.h @@ -38,7 +38,7 @@ struct ShaderVariable { name = ""; rows = columns = 0; - isStruct = false; + displayAsHex = isStruct = false; type = eVar_Float; for(int i = 0; i < 16; i++) value.uv[i] = 0; @@ -48,7 +48,7 @@ struct ShaderVariable name = n; rows = 1; columns = 4; - isStruct = false; + displayAsHex = isStruct = false; for(int i = 0; i < 16; i++) value.uv[i] = 0; type = eVar_Float; @@ -62,7 +62,7 @@ struct ShaderVariable name = n; rows = 1; columns = 4; - isStruct = false; + displayAsHex = isStruct = false; for(int i = 0; i < 16; i++) value.uv[i] = 0; type = eVar_Int; @@ -76,7 +76,7 @@ struct ShaderVariable name = n; rows = 1; columns = 4; - isStruct = false; + displayAsHex = isStruct = false; for(int i = 0; i < 16; i++) value.uv[i] = 0; type = eVar_UInt; @@ -91,6 +91,8 @@ struct ShaderVariable VarType type; + bool32 displayAsHex; + union { struct diff --git a/renderdocui/Interop/Shader.cs b/renderdocui/Interop/Shader.cs index a457147ba..1f5fee988 100644 --- a/renderdocui/Interop/Shader.cs +++ b/renderdocui/Interop/Shader.cs @@ -38,8 +38,7 @@ namespace renderdoc public VarType type; - [CustomMarshalAs(CustomUnmanagedType.Skip)] - public bool displayAsHex = false; + public bool displayAsHex; [StructLayout(LayoutKind.Sequential)] public struct ValueUnion