Fix readme example code

This commit is contained in:
Lauro Oyen 2024-11-23 23:30:45 +01:00
parent ba20d75cd4
commit dbe941c55e

View File

@ -22,7 +22,7 @@ let target_desc = slang::TargetDescBuilder::new()
let session_desc = slang::SessionDescBuilder::new() let session_desc = slang::SessionDescBuilder::new()
.targets(&[*target_desc]) .targets(&[*target_desc])
.search_paths(&[include_path.as_ptr()]) .search_paths(&[search_path.as_ptr()])
.options(&session_options); .options(&session_options);
let session = self.global_session.create_session(&session_desc).unwrap(); let session = self.global_session.create_session(&session_desc).unwrap();
@ -40,7 +40,7 @@ let linked_program = program.link().unwrap();
// Entry point to the reflection API. // Entry point to the reflection API.
let reflection = linked_program.layout(0).unwrap(); let reflection = linked_program.layout(0).unwrap();
let shader_bytecode = linked_program.get_entry_point_code(0, 0).unwrap(); let shader_bytecode = linked_program.entry_point_code(0, 0).unwrap();
``` ```
## Installation ## Installation