-
Notifications
You must be signed in to change notification settings - Fork 0
DX12 shadow pass shares one 256-byte upload buffer across every shadow caster #166
Copy link
Copy link
Open
Labels
area: renderingRenderer, shaders, post processingRenderer, shaders, post processingbackend: dx12Specific to the dx12 backendSpecific to the dx12 backendbackend: vulkanSpecific to the vulkan backendSpecific to the vulkan backendbugSomething isn't workingSomething isn't workingpriority: criticalCrash, data loss, or blocks other workCrash, data loss, or blocks other workvisualIncorrect or degraded rendering outputIncorrect or degraded rendering output
Milestone
Description
Activity
Metadata
Metadata
Assignees
Labels
area: renderingRenderer, shaders, post processingRenderer, shaders, post processingbackend: dx12Specific to the dx12 backendSpecific to the dx12 backendbackend: vulkanSpecific to the vulkan backendSpecific to the vulkan backendbugSomething isn't workingSomething isn't workingpriority: criticalCrash, data loss, or blocks other workCrash, data loss, or blocks other workvisualIncorrect or degraded rendering outputIncorrect or degraded rendering output
src/Graphics/DirectX12/DirectX12Renderer.cpp:1054-1078; callers atsrc/Graphics/Common/RenderCommandQueue.cpp:196-211; execute at:768The shadow path memcpys each caster's
LightVP * Worldinto the same mapped allocation and binds thesame GPU virtual address.
RenderCommandQueue.cpp:196-211calls it once per caster, but nothing actuallyexecutes until
ExecuteCommandListsat :768: so by then the buffer holds only the last caster's matrix andevery shadow draw rasterizes with it.
Root cause is a mechanical port: this is Vulkan's push-constant path (
VulkanRenderer.cpp:711-721, whosecomment notes the value is "recorded into the command buffer per draw call") transplanted onto a deferred
mechanism where that guarantee does not hold.
Severity: corruption (shadow map contains only one caster).
Found by a full audit of the graphics layer. Assessed severity: corruption.