Browse Source

no message

Hongtae Kim 6 years ago
parent
commit
7a04d23eea
1 changed files with 16 additions and 0 deletions
  1. 16
    0
      TestApp1/TestApp1.cpp

+ 16
- 0
TestApp1/TestApp1.cpp View File

@@ -86,8 +86,24 @@ public:
86 86
 		DKObject<DKRenderPipelineState> pipelineState = device->CreateRenderPipeline(pipelineDescriptor, &reflection);
87 87
 		if (pipelineState)
88 88
 		{
89
+			auto printShaderArg = [](const DKShaderArgument& arg)
90
+			{
91
+				const char* argType = "Unknown";
92
+				switch (arg.type)
93
+				{
94
+				case DKShaderArgument::TypeBuffer:	argType = "Buffer"; break;
95
+				case DKShaderArgument::TypeTexture:	argType = "Texture"; break;
96
+				case DKShaderArgument::TypeSampler:	argType = "Sampler"; break;
97
+				case DKShaderArgument::TypeThreadgroupMemory:	argType = "ThreadMemory"; break;
98
+				}
99
+				DKLog("  --> %ls[%u] binding:%u:%u type:%s", (const wchar_t*)arg.name, uint32_t(arg.arrayLength), arg.set, arg.binding, argType);
100
+			};
89 101
 			DKLog("PipelineReflection.VertexArguments: %d", reflection.vertexArguments.Count());
102
+			for (auto& arg : reflection.vertexArguments)
103
+				printShaderArg(arg);
90 104
 			DKLog("PipelineReflection.FragmentArguments: %d", reflection.fragmentArguments.Count());
105
+			for (auto& arg : reflection.fragmentArguments)
106
+				printShaderArg(arg);
91 107
 		}
92 108
 
93 109
 		DKTimer timer;