Merge pull request 'perf(image): release static texture staging after upload (#114)' (#136) from claude/issue-114 into master
This commit is contained in:
commit
faf1e5f5e8
4 changed files with 314 additions and 3 deletions
|
|
@ -39,7 +39,11 @@ void FontAtlas::Initialize(GraphicsCommandBuffer cmd) {
|
|||
VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL,
|
||||
// The atlas is sampled by the UI text *compute* shader, not an RT
|
||||
// pipeline — scope the upload barriers to the real consumer.
|
||||
VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT
|
||||
VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT,
|
||||
// Streamed: glyphs are rasterized into buffer.value on the CPU and
|
||||
// re-uploaded every frame via UpdateRegion, so the persistent staging
|
||||
// map must outlive the first upload rather than being released (#114).
|
||||
/*streamed*/ true
|
||||
);
|
||||
std::memset(image.buffer.value, 0, kAtlasSize * kAtlasSize);
|
||||
#else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue