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
 			{
105
 			{
106
 				if (mem.count > 1)
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
 						   mem.count,
111
 						   mem.count,
111
 						   ShaderDataTypeStr(mem.dataType),
112
 						   ShaderDataTypeStr(mem.dataType),
112
 						   mem.offset, mem.size, mem.stride);
113
 						   mem.offset, mem.size, mem.stride);
114
 				}
115
 				}
115
 				else
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
 						   ShaderDataTypeStr(mem.dataType),
121
 						   ShaderDataTypeStr(mem.dataType),
120
 						   mem.offset, mem.size);
122
 						   mem.offset, mem.size);
121
 				}
123
 				}
123
 				auto* p = res.structTypeMemberMap.Find(mem.typeInfoKey);
125
 				auto* p = res.structTypeMemberMap.Find(mem.typeInfoKey);
124
 				if (p)
126
 				if (p)
125
 				{
127
 				{
128
+					DKLogI(" %ls+TypeKey: %ls (struct)",
129
+						   (const wchar_t*)indentStr,
130
+						   (const wchar_t*)res.typeInfoKey);
126
 					MemberPrinter{ res, indent + 1 }.operator()(p->value);
131
 					MemberPrinter{ res, indent + 1 }.operator()(p->value);
127
 				}
132
 				}
128
 			}
133
 			}
142
 	case DKShaderResource::TypeSampler:	type = "Sampler"; break;
147
 	case DKShaderResource::TypeSampler:	type = "Sampler"; break;
143
 	case DKShaderResource::TypeThreadgroupMemory:	type = "Threadinggroup"; break;
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
 		   res.typeInfo.buffer.alignment,
161
 		   res.typeInfo.buffer.alignment,
148
 		   res.typeInfo.buffer.size);
162
 		   res.typeInfo.buffer.size);
163
+	if (res.typeInfoKey.Length() > 0)
164
+		DKLogI(" +TypeKey: %ls (struct)", (const wchar_t*)res.typeInfoKey);
149
 	if (res.type == DKShaderResource::TypeBuffer)
165
 	if (res.type == DKShaderResource::TypeBuffer)
150
 	{
166
 	{
151
 		auto p = res.structTypeMemberMap.Find(res.typeInfoKey);
167
 		auto p = res.structTypeMemberMap.Find(res.typeInfoKey);