This repository was archived by the owner on Aug 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 258
Explicit Resource Bindings in OpenGL #51
Open
Jorgemagic
wants to merge
17
commits into
microsoft:master
Choose a base branch
from
Jorgemagic:ExplicitResourceBindings
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
43e1141
Merge remote-tracking branch 'origin/master'
Jorgemagic 4af4d94
Merge remote-tracking branch 'origin/master'
Jorgemagic fd42b6f
508c680
4dd3cfd
3c0484d
Applied clang-format
Jorgemagic 4cb44f6
Fixed expected tests
Jorgemagic dcaad94
Merge remote-tracking branch 'origin/master' into AddShiftBindings
Jorgemagic 83be04e
Merge branch 'AddShiftBindings' into ExplicitResourceBindings
Jorgemagic 3b40005
Configure Wrapper entrypoints on LInux and Mac
Jorgemagic cfcb706
Clang format
Jorgemagic a67cf62
Fixed wrapper library export symbols
Jorgemagic 5ef3487
a2b626c
- Passed clang-format to ShaderConductor.cpp
Jorgemagic d943581
Merge branch 'master' into ExplicitResourceBindings
Jorgemagic f0c6a82
- Fixed expected ToneMapping PS 310 GLES (included layout binding)
Jorgemagic 1fbb9f4
Merge branch 'ExplicitResourceBindings' of https://github.com/Jorgema…
Jorgemagic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. (LPCSTR)"DllMain" 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. Yes, I think that it is interesting. |
||
&hm) != 0) | ||
{ | ||
char path[MAX_PATH]; | ||
if (GetModuleFileName(hm, path, sizeof(path)) != 0) | ||
{ | ||
PathRemoveFileSpec(path); | ||
char finalPath[MAX_PATH]; | ||
m_dxcompilerDll = ::LoadLibraryA(PathCombine(finalPath, path, dllName)); | ||
} | ||
} | ||
|
||
if (m_dxcompilerDll == nullptr) | ||
{ | ||
m_dxcompilerDll = ::LoadLibraryA(dllName); | ||
} | ||
#else | ||
m_dxcompilerDll = ::dlopen(dllName, RTLD_LAZY); | ||
#endif | ||
|
@@ -719,6 +735,8 @@ namespace | |
|
||
for (auto& remap : compiler->get_combined_image_samplers()) | ||
{ | ||
uint32_t binding = compiler->get_decoration(remap.image_id, spv::DecorationBinding); // or sampler_id. | ||
compiler->set_decoration(remap.combined_id, spv::DecorationBinding, binding); | ||
compiler->set_name(remap.combined_id, | ||
"SPIRV_Cross_Combined" + compiler->get_name(remap.image_id) + compiler->get_name(remap.sampler_id)); | ||
} | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. Can be: |
||
|
||
set(SOURCE_FILES | ||
Program.cs | ||
Wrapper.cs | ||
) | ||
set(CSHARP_TEST CSharpPinvoke) | ||
|
||
set(DATA_FILES | ||
shader.hlsl | ||
) | ||
set(SOURCE_FILES | ||
Program.cs | ||
Wrapper.cs | ||
) | ||
|
||
set_source_files_properties(${DATA_FILES} | ||
PROPERTIES VS_TOOL_OVERRIDE "None" | ||
VS_COPY_TO_OUT_DIR "PreserveNewest" | ||
) | ||
set(DATA_FILES | ||
shader.hlsl | ||
) | ||
|
||
set_source_files_properties(${DATA_FILES} | ||
PROPERTIES VS_TOOL_OVERRIDE "None" | ||
VS_COPY_TO_OUT_DIR "PreserveNewest" | ||
) | ||
|
||
add_executable(${CSHARP_TEST} ${SOURCE_FILES} ${DATA_FILES}) | ||
add_dependencies(${CSHARP_TEST} ShaderConductorWrapper) | ||
|
||
add_executable(${CSHARP_TEST} ${SOURCE_FILES} ${DATA_FILES}) | ||
add_dependencies(${CSHARP_TEST} ShaderConductorWrapper) | ||
set_target_properties(${CSHARP_TEST} PROPERTIES FOLDER "Wrapper") | ||
|
||
set_target_properties(${CSHARP_TEST} PROPERTIES FOLDER "Wrapper") | ||
endif() | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.