-
-
Notifications
You must be signed in to change notification settings - Fork 9.2k
libobs-d3d12: Added D3D12 rendering backend and NVIDIA D3D12 texture encoding #12907
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
Open
wanhongqing123
wants to merge
8
commits into
obsproject:master
Choose a base branch
from
wanhongqing123:master-d3d12-new-2
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
8 commits
Select commit
Hold shift + click to select a range
e23fecf
libobs-d3d12: Add D3D12 graphics backend support
701b579
add nvenc d3d12 hevc encoder
3f008ad
Remove some unnecessary classes, add texture3d supported and code clean
3e64da3
Classify and organize D3D12 related classes
a0d9da0
fix wgc capture sRGB color loss issue and fix win arm64 compile error
dc3dd46
allocate d3d12 allocators based on the number of bufs
0c798cb
add d3d12-rebuild feature
9b40a04
fix H264 Error stuck and code clean
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
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
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 |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| cmake_minimum_required(VERSION 3.28...3.30) | ||
|
|
||
| add_library(libobs-d3d12 MODULE) | ||
| add_library(OBS::libobs-d3d12 ALIAS libobs-d3d12) | ||
|
|
||
| target_sources( | ||
| libobs-d3d12 | ||
| PRIVATE # cmake-format: unsort | ||
| d3d12-common.cpp | ||
| d3d12-common.hpp | ||
| d3d12-linearallocator.cpp | ||
| d3d12-linearallocator.hpp | ||
| d3d12-gpubuffer.cpp | ||
| d3d12-gpubuffer.hpp | ||
| d3d12-rootsignature.cpp | ||
| d3d12-rootsignature.hpp | ||
| d3d12-descriptorallocator.cpp | ||
| d3d12-descriptorallocator.hpp | ||
| d3d12-dynamic-descriptorheap.cpp | ||
| d3d12-dynamic-descriptorheap.hpp | ||
| d3d12-commandqueue.cpp | ||
| d3d12-commandqueue.hpp | ||
| d3d12-pipeline.cpp | ||
| d3d12-pipeline.hpp | ||
| d3d12-context.cpp | ||
| d3d12-context.hpp | ||
| d3d12-deviceinstance.cpp | ||
| d3d12-deviceinstance.hpp | ||
| d3d12-duplicator.cpp | ||
| d3d12-indexbuffer.cpp | ||
| d3d12-samplerstate.cpp | ||
| d3d12-shader.cpp | ||
| d3d12-shaderprocessor.cpp | ||
| d3d12-shaderprocessor.hpp | ||
| d3d12-stagesurf.cpp | ||
| d3d12-subsystem.cpp | ||
| d3d12-subsystem.hpp | ||
| d3d12-texture2d.cpp | ||
| d3d12-texture3d.cpp | ||
| d3d12-vertexbuffer.cpp | ||
| d3d12-zstencilbuffer.cpp | ||
| ) | ||
|
|
||
| configure_file(cmake/windows/obs-module.rc.in libobs-d3d12.rc) | ||
| target_sources(libobs-d3d12 PRIVATE libobs-d3d12.rc) | ||
|
|
||
| target_compile_definitions( | ||
| libobs-d3d12 | ||
| PRIVATE | ||
| $<$<BOOL:${GPU_PRIORITY_VAL}>:USE_GPU_PRIORITY> | ||
| "$<IF:$<BOOL:${GPU_PRIORITY_VAL}>,GPU_PRIORITY_VAL=${GPU_PRIORITY_VAL},GPU_PRIORITY_VAL=0>" | ||
| ) | ||
|
|
||
| target_link_libraries( | ||
| libobs-d3d12 | ||
| PRIVATE OBS::libobs d3d11 d3d12 dxguid d3dcompiler dxgi shcore | ||
| ) | ||
|
|
||
| target_enable_feature(libobs "Direct3D 12 renderer") | ||
|
|
||
| set_target_properties_obs( | ||
| libobs-d3d12 | ||
| PROPERTIES FOLDER core | ||
| VERSION 0 | ||
| SOVERSION ${OBS_VERSION_MAJOR} COMPILE_WARNING_AS_ERROR FALSE | ||
| ) |
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 |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| 1 VERSIONINFO | ||
| FILEVERSION ${OBS_VERSION_MAJOR},${OBS_VERSION_MINOR},${OBS_VERSION_PATCH},0 | ||
| BEGIN | ||
| BLOCK "StringFileInfo" | ||
| BEGIN | ||
| BLOCK "040904B0" | ||
| BEGIN | ||
| VALUE "CompanyName", "${OBS_COMPANY_NAME}" | ||
| VALUE "FileDescription", "OBS Library D3D12 wrapper" | ||
| VALUE "FileVersion", "${OBS_VERSION_CANONICAL}" | ||
| VALUE "ProductName", "${OBS_PRODUCT_NAME}" | ||
| VALUE "ProductVersion", "${OBS_VERSION_CANONICAL}" | ||
| VALUE "Comments", "${OBS_COMMENTS}" | ||
| VALUE "LegalCopyright", "${OBS_LEGAL_COPYRIGHT}" | ||
| VALUE "InternalName", "libobs-d3d12" | ||
| VALUE "OriginalFilename", "libobs-d3d12" | ||
| END | ||
| END | ||
|
|
||
| BLOCK "VarFileInfo" | ||
| BEGIN | ||
| VALUE "Translation", 0x0409, 0x04B0 | ||
| END | ||
| END |
Oops, something went wrong.
Oops, something went wrong.
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.
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.
Should be Direct3D 12(Beta)?