Browse Source

no message

Hongtae Kim 6 years ago
parent
commit
1da7f9916f
1 changed files with 22 additions and 6 deletions
  1. 22
    6
      TestApp1/TestApp1.cpp

+ 22
- 6
TestApp1/TestApp1.cpp View File

@@ -105,8 +105,9 @@ void PrintShaderResource(const DKShaderResource& res)
105 105
 			{
106 106
 				if (mem.count > 1)
107 107
 				{
108
-					DKLogI(" %ls+ %ls[%d] (%s, Offset: %d, Size: %d, Stride: %d)", (const wchar_t*)indentStr,
109
-						(const wchar_t*)mem.name,
108
+					DKLogI(" %ls+ %ls[%d] (%s, Offset: %d, Size: %d, Stride: %d)",
109
+						   (const wchar_t*)indentStr,
110
+						   (const wchar_t*)mem.name,
110 111
 						   mem.count,
111 112
 						   ShaderDataTypeStr(mem.dataType),
112 113
 						   mem.offset, mem.size, mem.stride);
@@ -114,8 +115,9 @@ void PrintShaderResource(const DKShaderResource& res)
114 115
 				}
115 116
 				else
116 117
 				{
117
-					DKLogI(" %ls+ %ls (%s, Offset: %d, Size: %d)", (const wchar_t*)indentStr,
118
-						(const wchar_t*)mem.name,
118
+					DKLogI(" %ls+ %ls (%s, Offset: %d, Size: %d)",
119
+						   (const wchar_t*)indentStr,
120
+						   (const wchar_t*)mem.name,
119 121
 						   ShaderDataTypeStr(mem.dataType),
120 122
 						   mem.offset, mem.size);
121 123
 				}
@@ -123,6 +125,9 @@ void PrintShaderResource(const DKShaderResource& res)
123 125
 				auto* p = res.structTypeMemberMap.Find(mem.typeInfoKey);
124 126
 				if (p)
125 127
 				{
128
+					DKLogI(" %ls+TypeKey: %ls (struct)",
129
+						   (const wchar_t*)indentStr,
130
+						   (const wchar_t*)res.typeInfoKey);
126 131
 					MemberPrinter{ res, indent + 1 }.operator()(p->value);
127 132
 				}
128 133
 			}
@@ -142,10 +147,21 @@ void PrintShaderResource(const DKShaderResource& res)
142 147
 	case DKShaderResource::TypeSampler:	type = "Sampler"; break;
143 148
 	case DKShaderResource::TypeThreadgroupMemory:	type = "Threadinggroup"; break;
144 149
 	}
145
-	DKLogI(" +Type: %s, Writable: %d, Enabled: %d Alignment: %d, Size: %d",
146
-		   type, int(res.writable), int(res.enabled),
150
+	const char* access = "Unknown (ERROR)";
151
+	switch (res.access)
152
+	{
153
+		case DKShaderResource::AccessReadOnly:	access = "ReadOnly"; break;
154
+		case DKShaderResource::AccessWriteOnly:	access = "WriteOnly"; break;
155
+		case DKShaderResource::AccessReadWrite:	access = "ReadWrite"; break;
156
+	}
157
+	DKLogI(" +Type:%s, Access:%s, Enabled:%d Alignment:%d, Size:%d",
158
+		   type,
159
+		   access,
160
+		   int(res.enabled),
147 161
 		   res.typeInfo.buffer.alignment,
148 162
 		   res.typeInfo.buffer.size);
163
+	if (res.typeInfoKey.Length() > 0)
164
+		DKLogI(" +TypeKey: %ls (struct)", (const wchar_t*)res.typeInfoKey);
149 165
 	if (res.type == DKShaderResource::TypeBuffer)
150 166
 	{
151 167
 		auto p = res.structTypeMemberMap.Find(res.typeInfoKey);