You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to write to texture and I noticed write_texture takes in data as &[u8], which must mean there is an additional copy to some kind of staging buffer somewhere in its internals. I wonder if I'll be able to cut this additional copy by decoding my image straight into a mapped-at-creation Buffer and then performing a copy_buffer_to_texture instead? Is this a good idea? Would the overhead of creating and discarding a buffer outweigh the additional copy?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am trying to write to texture and I noticed
write_texture
takes in data as&[u8]
, which must mean there is an additional copy to some kind of staging buffer somewhere in its internals. I wonder if I'll be able to cut this additional copy by decoding my image straight into a mapped-at-creationBuffer
and then performing acopy_buffer_to_texture
instead? Is this a good idea? Would the overhead of creating and discarding a buffer outweigh the additional copy?Beta Was this translation helpful? Give feedback.
All reactions