Skip to content

Redundant copies of MeshUniform #11770

Open
@JMS55

Description

@JMS55

Since #9685, each instance of batch_and_prepare_render_phase will append a copy of MeshUniform to the GpuArrayBuffer<MeshUniform> resource for each entity x phase. For 2 cameras, each with 3 phases (shadow, prepass, main pass), that's 6 total copies per entity... Additionally, each batch_and_prepare_render_phase cannot run in parallel with each other due to ResMut<GpuArrayBuffer>.

This was kind of intended as it makes it easy for each draw to find the correct MeshUniform in the shader, but it does have the above downsides.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-RenderingDrawing game state to the screenC-BugAn unexpected or incorrect behaviorC-PerformanceA change motivated by improving speed, memory usage or compile timesD-ComplexQuite challenging from either a design or technical perspective. Ask for help!P-HighThis is particularly urgent, and deserves immediate attentionS-Needs-BenchmarkingThis set of changes needs performance benchmarking to double-check that they helpS-Needs-DesignThis issue requires design work to think about how it would best be accomplishedX-ControversialThere is active debate or serious implications around merging this PR

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions