-
Notifications
You must be signed in to change notification settings - Fork 249
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
Explicit Resource Bindings in OpenGL #51
base: master
Are you sure you want to change the base?
Conversation
- Fixed issue packMatricesInRowMajor is inverted
…gic/ShaderConductor into ExplicitResourceBindings
@@ -128,7 +128,23 @@ namespace | |||
const char* functionName = "DxcCreateInstance"; | |||
|
|||
#ifdef _WIN32 | |||
m_dxcompilerDll = ::LoadLibraryA(dllName); | |||
HMODULE hm = NULL; | |||
if (GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, (LPCSTR) "DllMain", |
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.
(LPCSTR)"DllMain"
can be changed to
TEXT("DllMain")
to make it compatible to both MBCS and UNICODE. Or just use GetModuleHandleExA without C-style case to DllMain. Same as GetModuleFileName below.
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.
Yes, I think that it is interesting.
@@ -22,24 +22,28 @@ add_dependencies(${DLL_NAME} ShaderConductor) | |||
|
|||
set_target_properties(${DLL_NAME} PROPERTIES FOLDER "Wrapper") | |||
|
|||
set(CSHARP_TEST CSharpPinvoke) | |||
if(SC_WITH_CSHARP) |
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.
Can be:
if(NOT SC_WITH_CSHARP)
return()
endif()
to avoid indent most lines in this file.
Hi @gongminmin,
In this pull request I added several things:
Added Explicit resource bindings in OpenGL translation
HLSL
Produced explicit layout bindings in GLSL
This ensures the resource bindings are the same that in original HLSL.
More flexible load dependencies (dxcompiler) on windows
Before:
m_dxcompilerDll = ::LoadLibraryA(dllName);
Issue: Only search dxcompiler library in executable path and system paths, now is possible load library from ShaderConductor library path.
Included libShaderConductorWrapper to cmake compilation
Now the AzurePipeline artifacts will include libdxcompiler, libShaderConductor, and libShaderConductorWrapper libraries.