-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add gpu priority control using native plugin
- Loading branch information
Showing
18 changed files
with
220 additions
and
119 deletions.
There are no files selected for viewing
This file contains 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 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
50 changes: 50 additions & 0 deletions
50
Assets/Plugins/AvatarViewer.Native/AvatarViewer.Native.Win.dll.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
17 changes: 17 additions & 0 deletions
17
Assets/Plugins/AvatarViewer.Native/AvatarViewer.Native.asmdef
This file contains 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,17 @@ | ||
{ | ||
"name": "AvatarViewer.Native", | ||
"rootNamespace": "", | ||
"references": [], | ||
"includePlatforms": [ | ||
"Editor", | ||
"WindowsStandalone64" | ||
], | ||
"excludePlatforms": [], | ||
"allowUnsafeCode": false, | ||
"overrideReferences": false, | ||
"precompiledReferences": [], | ||
"autoReferenced": true, | ||
"defineConstraints": [], | ||
"versionDefines": [], | ||
"noEngineReferences": true | ||
} |
7 changes: 7 additions & 0 deletions
7
Assets/Plugins/AvatarViewer.Native/AvatarViewer.Native.asmdef.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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,22 @@ | ||
using System.Runtime.InteropServices; | ||
|
||
namespace AvatarViewer.Native.Win | ||
{ | ||
public enum _D3DKMT_SCHEDULINGPRIORITYCLASS | ||
{ | ||
D3DKMT_SCHEDULINGPRIORITYCLASS_IDLE, | ||
D3DKMT_SCHEDULINGPRIORITYCLASS_BELOW_NORMAL, | ||
D3DKMT_SCHEDULINGPRIORITYCLASS_NORMAL, | ||
D3DKMT_SCHEDULINGPRIORITYCLASS_ABOVE_NORMAL, | ||
D3DKMT_SCHEDULINGPRIORITYCLASS_HIGH, | ||
D3DKMT_SCHEDULINGPRIORITYCLASS_REALTIME | ||
} | ||
|
||
public static class GPUPriority | ||
{ | ||
|
||
[DllImport("AvatarViewer.Native.Win", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] | ||
public static extern void ChangePriority(_D3DKMT_SCHEDULINGPRIORITYCLASS processPriority, int gpuThreadPriority); | ||
|
||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.