Skip to content

Commit

Permalink
Hide commands related to openxr_loader_negotiation.h
Browse files Browse the repository at this point in the history
  • Loading branch information
rasmusgo committed Apr 24, 2024
1 parent b153fce commit 0e66453
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 20 deletions.
7 changes: 6 additions & 1 deletion generator/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1308,8 +1308,13 @@ impl Parser {
/// Generate high-level code
#[allow(clippy::cognitive_complexity)] // TODO
fn generate_hl(&self) -> TokenStream {
const BLACKLISTED_COMMANDS: [&str; 3] = [
"xrNegotiateLoaderRuntimeInterface",
"xrNegotiateLoaderApiLayerInterface",
"xrCreateApiLayerInstance",
];
let (instance_pfn_fields, instance_pfn_inits) = self.commands.iter().map(|(name, command)| {
if command.extension.is_some() {
if command.extension.is_some() || BLACKLISTED_COMMANDS.contains(&name.as_str()) {
return (quote! {}, quote! {});
}
let pfn_ident = xr_command_name(name);
Expand Down
19 changes: 0 additions & 19 deletions openxr/src/generated.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3305,9 +3305,6 @@ pub mod raw {
use sys::pfn;
#[derive(Copy, Clone)]
pub struct Instance {
pub negotiate_loader_runtime_interface: pfn::NegotiateLoaderRuntimeInterface,
pub negotiate_loader_api_layer_interface: pfn::NegotiateLoaderApiLayerInterface,
pub create_api_layer_instance: pfn::CreateApiLayerInstance,
pub get_instance_proc_addr: pfn::GetInstanceProcAddr,
pub enumerate_api_layer_properties: pfn::EnumerateApiLayerProperties,
pub enumerate_instance_extension_properties: pfn::EnumerateInstanceExtensionProperties,
Expand Down Expand Up @@ -3373,22 +3370,6 @@ pub mod raw {
#[doc = r" `instance` must be a valid instance handle."]
pub unsafe fn load(entry: &Entry, instance: sys::Instance) -> Result<Self> {
Ok(Self {
negotiate_loader_runtime_interface: mem::transmute(entry.get_instance_proc_addr(
instance,
CStr::from_bytes_with_nul_unchecked(b"xrNegotiateLoaderRuntimeInterface\0"),
)?),
negotiate_loader_api_layer_interface: mem::transmute(
entry.get_instance_proc_addr(
instance,
CStr::from_bytes_with_nul_unchecked(
b"xrNegotiateLoaderApiLayerInterface\0",
),
)?,
),
create_api_layer_instance: mem::transmute(entry.get_instance_proc_addr(
instance,
CStr::from_bytes_with_nul_unchecked(b"xrCreateApiLayerInstance\0"),
)?),
get_instance_proc_addr: mem::transmute(entry.get_instance_proc_addr(
instance,
CStr::from_bytes_with_nul_unchecked(b"xrGetInstanceProcAddr\0"),
Expand Down

0 comments on commit 0e66453

Please sign in to comment.