Skip to content

assets should be kept on CPU by default#11212

Merged
alice-i-cecile merged 1 commit intobevyengine:mainfrom
mockersf:unload-keep-by-default
Jan 5, 2024
Merged

assets should be kept on CPU by default#11212
alice-i-cecile merged 1 commit intobevyengine:mainfrom
mockersf:unload-keep-by-default

Conversation

@mockersf
Copy link
Member

@mockersf mockersf commented Jan 4, 2024

Objective

Solution

  • Keep assets on CPU memory by default

@mockersf mockersf added the A-Assets Load files from disk to use for things like images, models, and sounds label Jan 4, 2024
@mockersf mockersf requested a review from JMS55 January 4, 2024 09:49
@alice-i-cecile alice-i-cecile added the C-Bug An unexpected or incorrect behavior label Jan 4, 2024
@alice-i-cecile alice-i-cecile added this to the 0.13 milestone Jan 4, 2024
@alice-i-cecile
Copy link
Member

I think this is a less surprising behavior. The performance gains are huge from doing this, but it's extremely surprising to beginners and very breaking.

Copy link
Contributor

@JMS55 JMS55 left a comment

Choose a reason for hiding this comment

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

I hate to do this, but fair enough :(

@JMS55 JMS55 added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Jan 5, 2024
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Jan 5, 2024
Merged via the queue into bevyengine:main with commit 425570a Jan 5, 2024
maximetinu pushed a commit to Sophya/bevy that referenced this pull request Feb 12, 2024
# Objective

- Since bevyengine#10520, assets are unloaded from RAM by default. This breaks a
number of scenario:
  - using `load_folder`
- loading a gltf, then going through its mesh to transform them /
compute a collider / ...
- any assets/subassets scenario should be `Keep` as you can't know what
the user will do with the assets
  - android suspension, where GPU memory is unloaded

- Alternative to bevyengine#11202 

## Solution

- Keep assets on CPU memory by default
maximetinu pushed a commit to Sophya/bevy that referenced this pull request Feb 12, 2024
# Objective

- Since bevyengine#10520, assets are unloaded from RAM by default. This breaks a
number of scenario:
  - using `load_folder`
- loading a gltf, then going through its mesh to transform them /
compute a collider / ...
- any assets/subassets scenario should be `Keep` as you can't know what
the user will do with the assets
  - android suspension, where GPU memory is unloaded

- Alternative to bevyengine#11202 

## Solution

- Keep assets on CPU memory by default
maximetinu pushed a commit to Sophya/bevy that referenced this pull request Feb 12, 2024
# Objective

- Since bevyengine#10520, assets are unloaded from RAM by default. This breaks a
number of scenario:
  - using `load_folder`
- loading a gltf, then going through its mesh to transform them /
compute a collider / ...
- any assets/subassets scenario should be `Keep` as you can't know what
the user will do with the assets
  - android suspension, where GPU memory is unloaded

- Alternative to bevyengine#11202 

## Solution

- Keep assets on CPU memory by default
maximetinu pushed a commit to Sophya/bevy that referenced this pull request Feb 12, 2024
# Objective

- Since bevyengine#10520, assets are unloaded from RAM by default. This breaks a
number of scenario:
  - using `load_folder`
- loading a gltf, then going through its mesh to transform them /
compute a collider / ...
- any assets/subassets scenario should be `Keep` as you can't know what
the user will do with the assets
  - android suspension, where GPU memory is unloaded

- Alternative to bevyengine#11202 

## Solution

- Keep assets on CPU memory by default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Assets Load files from disk to use for things like images, models, and sounds C-Bug An unexpected or incorrect behavior S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants