-
Notifications
You must be signed in to change notification settings - Fork 68
Precompile Fri Ext #993
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: new_pt
Are you sure you want to change the base?
Precompile Fri Ext #993
Changes from all commits
2685e21
a8ce292
3a5d058
6d8b42d
37be95b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| +1 −3 | 40_PathTracer/CMakeLists.txt | |
| +4 −0 | 40_PathTracer/app_resources/present/default.hlsl | |
| +7 −9 | 40_PathTracer/src/renderer/present/CWindowPresenter.cpp |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,6 +35,12 @@ struct ProtoPipeline final | |
| inline ProtoPipeline(asset::IAssetManager* assMan, video::ILogicalDevice* device, system::ILogger* logger=nullptr) | ||
| { | ||
| m_vxShader = createDefaultVertexShader(assMan,device,logger); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is there no way for this extension to have a builtin archive where the vertex shader is a precompiled
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's easy, if you want separate |
||
| m_vxEntryPoint = "main"; | ||
| } | ||
|
|
||
| inline ProtoPipeline(core::smart_refctd_ptr<asset::IShader> vertexShader, const char* vertexEntryPoint="main") : m_vxShader(std::move(vertexShader)) | ||
| { | ||
| m_vxEntryPoint = vertexEntryPoint ? vertexEntryPoint : "main"; | ||
| } | ||
|
|
||
| inline operator bool() const {return m_vxShader.get();} | ||
|
|
@@ -63,7 +69,7 @@ struct ProtoPipeline final | |
|
|
||
| IGPUGraphicsPipeline::SCreationParams params[1]; | ||
| params[0].layout = layout; | ||
| params[0].vertexShader = { .shader = m_vxShader.get(), .entryPoint = "main", .entries = &specConstants }; | ||
| params[0].vertexShader = { .shader = m_vxShader.get(), .entryPoint = m_vxEntryPoint, .entries = &specConstants }; | ||
| params[0].fragmentShader = fragShader; | ||
| params[0].cached = { | ||
| .vertexInput = {}, // The Full Screen Triangle doesn't use any HW vertex input state | ||
|
|
@@ -82,6 +88,7 @@ struct ProtoPipeline final | |
|
|
||
|
|
||
| core::smart_refctd_ptr<asset::IShader> m_vxShader; | ||
| std::string m_vxEntryPoint = "main"; | ||
| // The default is correct for us | ||
| constexpr static inline asset::SRasterizationParams DefaultRasterParams = { | ||
| .faceCullingMode = asset::EFCM_NONE, | ||
|
|
@@ -103,4 +110,4 @@ static inline bool recordDrawCall(video::IGPUCommandBuffer* commandBuffer) | |
| return commandBuffer->draw(VERTEX_COUNT,INSTANCE_COUNT,0,0); | ||
| } | ||
| } | ||
| #endif | ||
| #endif | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is truly weird, couldn't we just name mangle the entrypoint? like
__nbl__hlsl__ext__FullScreenTriangle__vertex_main?