texture: Let compiler type inference
Some checks failed
Build legacy Nix package on Ubuntu / build (push) Failing after 9m9s
Some checks failed
Build legacy Nix package on Ubuntu / build (push) Failing after 9m9s
This commit is contained in:
parent
fbb1493b45
commit
122f577a26
1 changed files with 2 additions and 2 deletions
|
@ -54,7 +54,7 @@ impl Texture {
|
||||||
let image_data = image.to_rgba8();
|
let image_data = image.to_rgba8();
|
||||||
let image_dimensions = image_data.dimensions();
|
let image_dimensions = image_data.dimensions();
|
||||||
|
|
||||||
let upload_buffer = Buffer::new_slice::<u8>(
|
let upload_buffer = Buffer::new_slice(
|
||||||
memory_allocator.clone(),
|
memory_allocator.clone(),
|
||||||
BufferCreateInfo {
|
BufferCreateInfo {
|
||||||
usage: BufferUsage::TRANSFER_SRC,
|
usage: BufferUsage::TRANSFER_SRC,
|
||||||
|
@ -70,7 +70,7 @@ impl Texture {
|
||||||
|
|
||||||
{
|
{
|
||||||
let buffer_data = &mut *upload_buffer.write()?;
|
let buffer_data = &mut *upload_buffer.write()?;
|
||||||
buffer_data.copy_from_slice(image_data.as_bytes());
|
buffer_data.copy_from_slice(image_data.as_raw());
|
||||||
}
|
}
|
||||||
|
|
||||||
let image = Image::new(
|
let image = Image::new(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue