Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-09 07:49:03

0001 #pragma once
0002 /**
0003 PIP : OptiX 7 Ray Trace Program Pipeline 
0004 ==========================================
0005 
0006 Aiming to keep this geometry independent, so it is just 
0007 responsible to convert the ptx code into an optix 
0008 ray trace pipeline.  
0009 
0010 The pip(PIP) instance is instanciated in CSGOptiX::initPIP
0011 and passed as ctor argument to SBT
0012 
0013 **/
0014 
0015 #include "plog/Severity.h"
0016 
0017 struct Properties ; 
0018 
0019 struct PIP
0020 {
0021     static const plog::Severity LEVEL ; 
0022     static const int MAX_TRACE_DEPTH ; 
0023 
0024     unsigned max_trace_depth ; 
0025     unsigned num_payload_values ; 
0026     unsigned num_attribute_values ; 
0027     const Properties* properties ; 
0028 
0029     OptixPipelineCompileOptions pipeline_compile_options = {};
0030     OptixProgramGroupOptions program_group_options = {};
0031 
0032     OptixModule module = nullptr;
0033 
0034     OptixProgramGroup raygen_pg   = nullptr;
0035     OptixProgramGroup miss_pg     = nullptr;
0036     OptixProgramGroup hitgroup_pg = nullptr;
0037 
0038     OptixPipeline pipeline = nullptr;
0039 
0040 
0041     static bool OptiXVersionIsSupported(); 
0042 
0043 
0044     static const char*                 CreatePipelineOptions_exceptionFlags ; 
0045     static OptixPipelineCompileOptions CreatePipelineOptions(unsigned numPayloadValues, unsigned numAttributeValues );
0046     static OptixProgramGroupOptions CreateProgramGroupOptions();
0047 
0048     static const char* CreateModule_debugLevel ; 
0049     static const char* CreateModule_optLevel ; 
0050 
0051     static std::string Desc(); 
0052     static std::string Desc_ModuleCompileOptions(const OptixModuleCompileOptions& module_compile_options ); 
0053     static std::string Desc_PipelineCompileOptions(const OptixPipelineCompileOptions& pipeline_compile_options ); 
0054 
0055     static OptixModule CreateModule(const char* ptx_path, OptixPipelineCompileOptions& pipeline_compile_options );
0056     void destroyModule(); 
0057 
0058 
0059 
0060 
0061     PIP(const char* ptx_path_, const Properties* properties_ ); 
0062     ~PIP(); 
0063 
0064     const char* desc() const ; 
0065 
0066     void init(); 
0067     void destroy(); 
0068 
0069     static constexpr const char* RG_DUMMY = "__raygen__rg_dummy" ; 
0070     static constexpr const char* RG = "__raygen__rg" ; 
0071     static constexpr const char* MS = "__miss__ms" ; 
0072     static constexpr const char* IS = "__intersection__is" ; 
0073     static constexpr const char* CH = "__closesthit__ch" ; 
0074     static constexpr const char* AH = "__anyhit__ah" ; 
0075 
0076     void createRaygenPG();
0077     void destroyRaygenPG();
0078 
0079     void createMissPG();
0080     void destroyMissPG();
0081 
0082     void createHitgroupPG();
0083     void destroyHitgroupPG();
0084 
0085 
0086     static const char* linkPipeline_debugLevel ; 
0087     std::string Desc_PipelineLinkOptions(const OptixPipelineLinkOptions& pipeline_link_options ); 
0088     void linkPipeline(unsigned max_trace_depth);
0089     void destroyPipeline(); 
0090 
0091 
0092     void configureStack(); 
0093 }; 
0094 
0095