Skip to content

Commit de85bb0

Browse files
committed
Corrections
1 parent d2fc68c commit de85bb0

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

examples_tests/41.VisibilityBuffer/main.cpp

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ struct PCstruct
146146
float Ni;
147147
uint extra; //flags copied from MTL metadata
148148
};
149+
149150
layout (push_constant) uniform Block {
150151
PCstruct params;
151152
} PC;
@@ -512,10 +513,18 @@ void createVirtualTexture(video::IVideoDriver* driver, core::vector<ICPUMeshBuff
512513
}
513514
assert(pipelineMetadata);
514515

516+
vt->shrink();
517+
for (const auto& cm : vt_commits)
518+
{
519+
vt->commit(cm.addr, cm.texture.get(), cm.subresource, cm.uwrap, cm.vwrap, cm.border);
520+
}
521+
522+
/*TODO: zamieniæ push constants na ssbo (dla ka¿dego mdi)*/
523+
515524
outputGPUvt = core::make_smart_refctd_ptr<video::IGPUVirtualTexture>(driver, vt.get());
516525
}
517526

518-
void setPipeline(IVideoDriver* driver, ICPUSpecializedShader* vs, ICPUSpecializedShader* fs,
527+
void createPipeline(IVideoDriver* driver, ICPUSpecializedShader* vs, ICPUSpecializedShader* fs,
519528
core::smart_refctd_ptr<IGPUBuffer>& vtxBuffer, core::smart_refctd_ptr<IGPUBuffer>& outputUBO, core::smart_refctd_ptr<IGPUBuffer>& virtualAttribBuffer,
520529
core::smart_refctd_ptr<IGPUVirtualTexture>& vt,
521530
core::smart_refctd_ptr<IGPUDescriptorSet>& outputGPUDescriptorSet0,
@@ -759,7 +768,7 @@ int main()
759768

760769
packMeshBuffers(driver, meshBuffers, mdiCallParams, virtualAttribTable);
761770

762-
setPipeline(driver, vs.get(), fs.get(), mdiCallParams.vtxBuffer.buffer, ubo, virtualAttribTable, gpuvt, ds0, ds1, ds2, gpuPipeline);
771+
createPipeline(driver, vs.get(), fs.get(), mdiCallParams.vtxBuffer.buffer, ubo, virtualAttribTable, gpuvt, ds0, ds1, ds2, gpuPipeline);
763772
}
764773

765774
//! we want to move around the scene and view it from different angles

include/nbl/asset/CCPUMeshPackerV2.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,6 @@ bool CCPUMeshPackerV2<MDIStructType>::commit(IMeshPackerBase::PackedMeshBufferDa
6969
size_t batchFirstIdx = ramb.indexAllocationOffset;
7070
size_t verticesAddedCnt = 0u;
7171

72-
_NBL_DEBUG_BREAK_IF(std::distance(mbBegin, it) == 100u || std::distance(mbBegin, it) == 150u);
73-
7472
for (TriangleBatch& batch : triangleBatches)
7573
{
7674
core::unordered_map<uint32_t, uint16_t> usedVertices = constructNewIndicesFromTriangleBatch(batch, indexBuffPtr);

0 commit comments

Comments
 (0)