Skip to content

Commit 8a208a6

Browse files
committed
Got rid of unused code in ex06
1 parent c8143cb commit 8a208a6

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

examples_tests/06.MeshLoaders/main.cpp

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -17,36 +17,6 @@
1717
using namespace nbl;
1818
using namespace core;
1919

20-
static std::size_t pipeline_hash(asset::ICPURenderpassIndependentPipeline* _ppln)
21-
{
22-
constexpr size_t bytesToHash =
23-
asset::SVertexInputParams::serializedSize() +
24-
asset::SBlendParams::serializedSize() +
25-
asset::SRasterizationParams::serializedSize() +
26-
asset::SPrimitiveAssemblyParams::serializedSize() +
27-
sizeof(void*) * asset::ICPURenderpassIndependentPipeline::SHADER_STAGE_COUNT +//shaders
28-
sizeof(void*);//layout
29-
uint8_t mem[bytesToHash]{};
30-
uint32_t offset = 0u;
31-
_ppln->getVertexInputParams().serialize(mem + offset);
32-
offset += asset::SVertexInputParams::serializedSize();
33-
_ppln->getBlendParams().serialize(mem + offset);
34-
offset += asset::SBlendParams::serializedSize();
35-
_ppln->getRasterizationParams().serialize(mem + offset);
36-
offset += sizeof(asset::SRasterizationParams);
37-
_ppln->getPrimitiveAssemblyParams().serialize(mem + offset);
38-
offset += sizeof(asset::SPrimitiveAssemblyParams);
39-
const asset::ICPUSpecializedShader** shaders = reinterpret_cast<const asset::ICPUSpecializedShader**>(mem + offset);
40-
for (uint32_t i = 0u; i < asset::ICPURenderpassIndependentPipeline::SHADER_STAGE_COUNT; ++i)
41-
shaders[i] = _ppln->getShaderAtIndex(i);
42-
offset += asset::ICPURenderpassIndependentPipeline::SHADER_STAGE_COUNT * sizeof(void*);
43-
reinterpret_cast<const asset::ICPUPipelineLayout**>(mem + offset)[0] = _ppln->getLayout();
44-
45-
const std::size_t hs = std::hash<std::string_view>{}(std::string_view(reinterpret_cast<const char*>(mem), bytesToHash));
46-
47-
return hs;
48-
}
49-
5020
int main()
5121
{
5222
// create device with full flexibility over creation parameters

0 commit comments

Comments
 (0)