Avoid allocation for spirv shaders
This commit is contained in:
parent
1b75f9eb5d
commit
13398b0127
|
@ -544,10 +544,8 @@ fn main() {
|
|||
];
|
||||
base.device.update_descriptor_sets(&write_desc_sets, &[]);
|
||||
|
||||
let mut vertex_spv_file =
|
||||
Cursor::new(include_bytes!("../../shader/texture/vert.spv").to_vec());
|
||||
let mut frag_spv_file =
|
||||
Cursor::new(include_bytes!("../../shader/texture/frag.spv").to_vec());
|
||||
let mut vertex_spv_file = Cursor::new(&include_bytes!("../../shader/texture/vert.spv")[..]);
|
||||
let mut frag_spv_file = Cursor::new(&include_bytes!("../../shader/texture/frag.spv")[..]);
|
||||
|
||||
let vertex_code =
|
||||
read_spv(&mut vertex_spv_file).expect("Failed to read vertex shader spv file");
|
||||
|
|
|
@ -199,9 +199,8 @@ fn main() {
|
|||
.bind_buffer_memory(vertex_input_buffer, vertex_input_buffer_memory, 0)
|
||||
.unwrap();
|
||||
let mut vertex_spv_file =
|
||||
Cursor::new(include_bytes!("../../shader/triangle/vert.spv").to_vec());
|
||||
let mut frag_spv_file =
|
||||
Cursor::new(include_bytes!("../../shader/triangle/frag.spv").to_vec());
|
||||
Cursor::new(&include_bytes!("../../shader/triangle/vert.spv")[..]);
|
||||
let mut frag_spv_file = Cursor::new(&include_bytes!("../../shader/triangle/frag.spv")[..]);
|
||||
|
||||
let vertex_code =
|
||||
read_spv(&mut vertex_spv_file).expect("Failed to read vertex shader spv file");
|
||||
|
|
Loading…
Reference in a new issue