Skip to content

Commit

Permalink
Add functions to IRObject and IRCompiler
Browse files Browse the repository at this point in the history
  • Loading branch information
FlannyH committed Jan 8, 2024
1 parent 3627cec commit 7308efe
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ struct IRCompilerFn<'lib> {
set_vertex_viewport_index_id: libloading::Symbol<'lib, unsafe extern "C" fn() -> ()>,
set_int_rt_mask: libloading::Symbol<'lib, unsafe extern "C" fn() -> ()>,
ignore_root_signature: libloading::Symbol<'lib, unsafe extern "C" fn() -> ()>,
set_ray_tracing_pipeline_arguments: libloading::Symbol<'lib, unsafe extern "C" fn() -> ()>,
set_hitgroup_type: libloading::Symbol<'lib, unsafe extern "C" fn() -> ()>,
}

#[repr(u32)]
Expand Down Expand Up @@ -247,6 +249,7 @@ struct IRObjectFn<'lib> {
>,
get_type: libloading::Symbol<'lib, unsafe extern "C" fn(*mut IRObjectOpaque) -> IRObjectType>,
serialize: libloading::Symbol<'lib, unsafe extern "C" fn() -> ()>,
gather_raytracing_intrinsics: libloading::Symbol<'_, _>,
}

pub struct IRObject<'lib> {
Expand All @@ -269,6 +272,7 @@ impl<'lib> IRObject<'lib> {
let funcs = IRObjectFn {
create_from_dxil: lib.get(b"IRObjectCreateFromDXIL")?,
destroy: lib.get(b"IRObjectDestroy")?,
gather_raytracing_intrinsics: lib.get(b"IRObjectGatherRaytracingIntrinsics")?,
get_metal_ir_shader_stage: lib.get(b"IRObjectGetMetalIRShaderStage")?,
get_metal_lib_binary: lib.get(b"IRObjectGetMetalLibBinary")?,
get_reflection: lib.get(b"IRObjectGetReflection")?,
Expand Down Expand Up @@ -686,10 +690,13 @@ impl<'lib> IRCompiler<'lib> {
set_global_root_signature: lib.get(b"IRCompilerSetGlobalRootSignature")?,
set_has_geometry_shader: lib.get(b"IRCompilerSetHasGeometryShader")?,
set_hitgroup_arguments: lib.get(b"IRCompilerSetHitgroupArguments")?,
set_hitgroup_type: lib.get(b"IRCompilerSetHitgroupType")?,
set_input_topology: lib.get(b"IRCompilerSetInputTopology")?,
set_local_root_signature: lib.get(b"IRCompilerSetLocalRootSignature")?,
set_minimum_deployment_target: lib.get(b"IRCompilerSetMinimumDeploymentTarget")?,
set_minimum_gpu_family: lib.get(b"IRCompilerSetMinimumGPUFamily")?,
set_ray_tracing_pipeline_arguments: lib
.get(b"IRCompilerSetRayTracingPipelineArguments")?,
set_shared_rt_arguments: lib.get(b"IRCompilerSetSharedRTArguments")?,
set_stage_in_generation_mode: lib.get(b"IRCompilerSetStageInGenerationMode")?,
set_stream_out_enabled: lib.get(b"IRCompilerSetStreamOutEnabled")?,
Expand Down

0 comments on commit 7308efe

Please sign in to comment.