Skip to content

only log once GPU preprocessing support#23556

Merged
alice-i-cecile merged 1 commit intobevyengine:mainfrom
mockersf:log-once-gpu-preprocessing-support
Mar 29, 2026
Merged

only log once GPU preprocessing support#23556
alice-i-cecile merged 1 commit intobevyengine:mainfrom
mockersf:log-once-gpu-preprocessing-support

Conversation

@mockersf
Copy link
Copy Markdown
Member

Objective

  • Bevy logs twice if GPU preprocessing is enabled

Solution

  • Only log it once

The resource GpuPreprocessingSupport is added twice, I don't know if it can be done only once.
@atlv24 I think you were the last to touch around both place it's added, is there a reason to do it twice? You modified only one of them for renderer recovery, is there a need to keep both that way for now?

@alice-i-cecile alice-i-cecile added A-Rendering Drawing game state to the screen C-Usability A targeted quality-of-life change that makes Bevy easier to use S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it labels Mar 29, 2026
@github-project-automation github-project-automation bot moved this to Needs SME Triage in Rendering Mar 29, 2026
@alice-i-cecile alice-i-cecile added the D-Trivial Nice and easy! A great choice to get started with Bevy label Mar 29, 2026
@alice-i-cecile alice-i-cecile requested a review from atlv24 March 29, 2026 16:07
Copy link
Copy Markdown
Contributor

@atlv24 atlv24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, for reference the reason its added twice is because of this line in bevy_pbr mesh

.init_resource::<GpuPreprocessingSupport>()

and the reason that's needed is that we conditionally init_gpu_resource some things depending on the value of GpuPreprocessingSupport, which itself is added by init_gpu_resource. init_gpu_resource cannot run without SubApp access, so must be called in plugin code. The proper fix here would be to re-initialize gpu limit detection in the same place the render device is inserted as a resource, so everything downstream can read it fine. bevy_limits will probably fix this issue, i'll make note to remove the info_once calls here once that's in

@alice-i-cecile alice-i-cecile added this pull request to the merge queue Mar 29, 2026
Merged via the queue into bevyengine:main with commit 25a2a38 Mar 29, 2026
47 checks passed
@github-project-automation github-project-automation bot moved this from Needs SME Triage to Done in Rendering Mar 29, 2026
splo pushed a commit to splo/bevy that referenced this pull request Mar 31, 2026
# Objective

- Bevy logs twice if GPU preprocessing is enabled

## Solution

- Only log it once

The resource `GpuPreprocessingSupport` is added twice, I don't know if
it can be done only once.
@atlv24 I think you were the last to touch around both place it's added,
is there a reason to do it twice? You modified only one of them for
renderer recovery, is there a need to keep both that way for now?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Rendering Drawing game state to the screen C-Usability A targeted quality-of-life change that makes Bevy easier to use D-Trivial Nice and easy! A great choice to get started with Bevy S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants