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