Crafter.Graphics/interfaces
catbot 5f858509c8 perf(mesh): place RT geometry in device-local memory via #89 upload strategy (#73)
vertexBuffer/indexBuffer/aabbBuffer were HOST_VISIBLE (system RAM), so the
BLAS build, every refit, and any hit-shader geometry fetch read them over
PCIe. The usage flags (SHADER_DEVICE_ADDRESS, plus STORAGE on the index
buffer) exist precisely to expose geometry for hit-shader fetch, the dominant
RT shading pattern.

Add VulkanBuffer::UploadDeviceLocal, which places a CPU-written/GPU-read
buffer in device-local memory and picks the upload mechanism at runtime via
the #89 strategy (Device::PreferDirectDeviceWrite):
  - ReBAR/UMA: allocate HOST_VISIBLE|DEVICE_LOCAL (DEVICE_LOCAL preferred),
    map transiently, memcpy, flush-if-non-coherent. No staging buffer.
  - no/small BAR: allocate pure DEVICE_LOCAL + TRANSFER_DST, fill a transient
    HOST_VISIBLE staging buffer, vkCmdCopyBuffer, then DeferredClear the
    staging buffer onto the fence-keyed deletion queue (#101/#102) so it
    outlives the copy submit.

The geometry buffers become non-mapped so the destination is free to be
device-local-only. Same-size re-uploads reuse the allocation, so the device
address stays stable across an in-place AS UPDATE refit. The compressed Build
path now allocates vertex/index as pure DEVICE_LOCAL — the GPU decompressor
fills them directly, no host write.

Tests: BLASBuildOptions asserts device-local placement on the triangle,
procedural, and (budget-forced) staged paths, and exercises the staged copy +
deferred-deletion + in-place refit under GPU-assisted validation with zero
validation errors.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 17:49:25 +00:00
..
Crafter.Graphics-Animation.cppm cleaned up renderer 2026-03-09 20:10:19 +01:00
Crafter.Graphics-Clipboard.cppm clipboard 2026-05-19 00:45:22 +02:00
Crafter.Graphics-ComputeShader.cppm fix(vulkan-rt): configurable recursion depth + per-shader TLAS push for compute (#21) 2026-06-03 18:35:39 +00:00
Crafter.Graphics-Decompress.cppm browser DOM support 2026-05-18 02:07:48 +02:00
Crafter.Graphics-DescriptorHeapVulkan.cppm fix(device): add preferred mask + required-only fallback to GetMemoryType (#59) 2026-06-16 16:03:50 +00:00
Crafter.Graphics-DescriptorHeapWebGPU.cppm webgpu improvements 2026-05-24 13:32:08 +02:00
Crafter.Graphics-Device.cppm fix(device): fence-keyed deferred resource-deletion queue (#101) 2026-06-17 13:21:12 +00:00
Crafter.Graphics-Dom.cppm browser DOM support 2026-05-18 02:07:48 +02:00
Crafter.Graphics-DomEvents.cppm browser DOM support 2026-05-18 02:07:48 +02:00
Crafter.Graphics-Font.cppm Merge remote-tracking branch 'origin/master' into claude/issue-57 2026-06-16 17:02:48 +00:00
Crafter.Graphics-FontAtlas.cppm Merge pull request 'perf(text): fold Ensure+Lookup into FontAtlas::EnsureAndGet (#53)' (#84) from claude/issue-53 into master 2026-06-16 17:44:20 +02:00
Crafter.Graphics-ForwardDeclarations.cppm rendertargetvulkan 2026-04-11 18:48:00 +02:00
Crafter.Graphics-Gamepad.cppm new input system 2026-05-12 00:24:48 +02:00
Crafter.Graphics-GraphicsTypes.cppm webgpu support 2026-05-18 04:58:52 +02:00
Crafter.Graphics-Image2D.cppm feat(webgpu): HDR post-process primitives — float textures, storage-texture bindings, RESOLVE→HDR target (#27) 2026-06-09 12:55:14 +00:00
Crafter.Graphics-ImageVulkan.cppm perf(image): batch final mip-chain layout transition (#70) 2026-06-16 18:30:44 +00:00
Crafter.Graphics-Input.cppm new input system 2026-05-12 00:24:48 +02:00
Crafter.Graphics-InputField.cppm webgpu improvements 2026-05-24 13:32:08 +02:00
Crafter.Graphics-Keys.cppm browser DOM support 2026-05-18 02:07:48 +02:00
Crafter.Graphics-Mesh.cppm perf(mesh): place RT geometry in device-local memory via #89 upload strategy (#73) 2026-06-17 17:49:25 +00:00
Crafter.Graphics-PipelineRTVulkan.cppm perf(pipeline): shared, disk-persisted VkPipelineCache (#69) 2026-06-16 18:23:25 +00:00
Crafter.Graphics-PipelineRTWebGPU.cppm feat(webgpu): HDR post-process primitives — float textures, storage-texture bindings, RESOLVE→HDR target (#27) 2026-06-09 12:55:14 +00:00
Crafter.Graphics-PlainComputeShader.cppm webgpu improvements 2026-05-24 13:32:08 +02:00
Crafter.Graphics-RenderingElement3D.cppm tlas build options 2026-06-16 15:49:17 +02:00
Crafter.Graphics-RenderPass.cppm webgpu support 2026-05-18 04:58:52 +02:00
Crafter.Graphics-Router.cppm browser DOM support 2026-05-18 02:07:48 +02:00
Crafter.Graphics-RT.cppm feat(webgpu-rt): add intersection stage, procedural hit group, AABB BLAS API 2026-06-02 22:09:14 +00:00
Crafter.Graphics-RTPass.cppm feat(webgpu-rt): atomic pixel accumulator + raysPerPixel for >1 ray/pixel/bounce (#30) 2026-06-09 22:45:25 +00:00
Crafter.Graphics-SamplerVulkan.cppm browser DOM support 2026-05-18 02:07:48 +02:00
Crafter.Graphics-ShaderBindingTableVulkan.cppm fix(vulkan-rt): configurable recursion depth + per-shader TLAS push for compute (#21) 2026-06-03 18:35:39 +00:00
Crafter.Graphics-ShaderBindingTableWebGPU.cppm feat(webgpu-rt): add intersection stage, procedural hit group, AABB BLAS API 2026-06-02 22:09:14 +00:00
Crafter.Graphics-ShaderVulkan.cppm fix(vulkan-rt): configurable recursion depth + per-shader TLAS push for compute (#21) 2026-06-03 18:35:39 +00:00
Crafter.Graphics-Types.cppm browser DOM support 2026-05-18 02:07:48 +02:00
Crafter.Graphics-UI.cppm Merge remote-tracking branch 'origin/master' into claude/issue-47 2026-06-16 17:09:06 +00:00
Crafter.Graphics-UIComponents.cppm perf(text): cache shaped runs in ShapeText (#52) 2026-06-16 15:40:52 +00:00
Crafter.Graphics-VulkanBuffer.cppm perf(mesh): place RT geometry in device-local memory via #89 upload strategy (#73) 2026-06-17 17:49:25 +00:00
Crafter.Graphics-VulkanTransition.cppm browser DOM support 2026-05-18 02:07:48 +02:00
Crafter.Graphics-WebGPU.cppm feat(rt): BuildProcedural/RefitProcedural from a device AABB buffer (#37) 2026-06-16 14:12:04 +00:00
Crafter.Graphics-WebGPUBuffer.cppm webgpu improvements 2026-05-24 13:32:08 +02:00
Crafter.Graphics-WebGPUComputeShader.cppm feat(webgpu): HDR post-process primitives — float textures, storage-texture bindings, RESOLVE→HDR target (#27) 2026-06-09 12:55:14 +00:00
Crafter.Graphics-Window.cppm Merge remote-tracking branch 'origin/master' into claude/issue-40 2026-06-16 15:41:59 +00:00
Crafter.Graphics.cppm webgpu improvements 2026-05-24 13:32:08 +02:00