-
-
Notifications
You must be signed in to change notification settings - Fork 1k
[WIP] Convert from SharpDX to Silk.NET. #1715
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
Draft
Ethereal77
wants to merge
106
commits into
stride3d:master
Choose a base branch
from
Ethereal77:directx-silk
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.
Draft
Changes from all commits
Commits
Show all changes
106 commits
Select commit
Hold shift + click to select a range
bd45f82
Fix Vulkan uses of Utilities.CopyMemory
Ethereal77 98b85cd
Convert Direct3D 11 from SharpDX to Silk
Ethereal77 ede8326
Convert D3DCompiler from SharpDX to Silk
Ethereal77 68b13f0
Convert Direct3D 12 from SharpDX to Silk
Ethereal77 c78fa06
Convert Stride.VirtualReality from SharpDX to Silk
Ethereal77 b7357f8
Convert RenderDoc plugin from SharpDX to Silk
Ethereal77 0ca0586
Fix unneeded old reference to SharpDX
Ethereal77 dbb6a03
Fix type mismatch in comparison of AdapterUid
Ethereal77 fea1ac5
Re-expose several constants that are consumed by API-agnostic code
Ethereal77 cb7b497
Update Stride.Graphics project file and dependencies
Ethereal77 be169d6
Replace custom pointer types with a generic one for use in collections
Ethereal77 7136893
Convert Stride.Video from SharpDX to Silk
Ethereal77 def78fd
Fix an OutOfMemory in adapter outputs enumeration
Ethereal77 704fd05
Fix missing flags
Ethereal77 2588425
Fix obsoletion warning
Ethereal77 a69feff
Fix incorrect GraphicsOutput enumeration and computation of desktop b…
Ethereal77 1b03965
Fix use of invalid Format
Ethereal77 fbfc337
Fix several NullReferenceExceptions in Direct3D 11
Ethereal77 c343803
Fix a NullReferenceException and simplify ShaderCompiler a bit
Ethereal77 c6bb0a4
Replace custom pointer types with generic ones for Direct3D 12
Ethereal77 b98d014
Minor fixes for all graphics APIs
Ethereal77 e07f0df
Fix incorrect flags, initialization, and disposal in Direct3D 11
Ethereal77 78627ab
Add helpers for unsafe pointers and marshalling
Ethereal77 5afdf5b
Refactor the shader compiler to use the new unsafe helpers
Ethereal77 6f0af65
Minor cleanup
Ethereal77 462bb34
Fix a bug in display mode enumeration
Ethereal77 d106845
Simplify adapters and outputs enumeration using ComPtrs
Ethereal77 7ef6246
Simplify the display mode enumeration to reduce allocations
Ethereal77 b0b4d22
Reimplement object lifetimes to fix orphan objects (GraphicsDevice)
Ethereal77 f626fdc
Reimplement object lifetimes to fix orphan objects (GraphicsResource)
Ethereal77 0a0d72d
Reimplement adapter and outputs discovery in Silk
Ethereal77 1ea3a69
Use sizeof(T) instead of Unsafe.SizeOf<T>()
Ethereal77 40f6c4c
Add helpers to ease the use of COM pointers and handles
Ethereal77 f58300a
Update UnsafeUtilities to latest .NET, add `scoped` and `ref readonly`
Ethereal77 71b08cb
Add span to bytes conversion to UnsafeUtilities
Ethereal77 5c08d3c
Add value bit-casting to UnsafeUtilities
Ethereal77 2079d6b
Add the ability to reinterpret a value type as a span of elements (li…
Ethereal77 f436395
Refactor for better use of COM pointers in Graphics Adapters and Outputs
Ethereal77 3c668f0
Upgrade Silk.NET dependencies to the latest version
Ethereal77 1a314ee
Modernize and convert to extensions more of UnsafeUtilities
Ethereal77 0a8d866
Add the ability of reinterpreting an array as a span of another type
Ethereal77 328face
Improve memory handling for name strings in DebugHelpers
Ethereal77 9e13c5d
Add convenience NullComPtr for readability
Ethereal77 dd8cce0
Refactor Buffer to use ComPtrs for clarity and coherence with other t…
Ethereal77 cdd3ca5
Documentation pass for Buffer
Ethereal77 005563e
Refactor Texture to use ComPtrs for clarity and coherence with other …
Ethereal77 72ae5aa
Documentation pass for Texture
Ethereal77 7574678
Cleanup and document PixelFormat
Ethereal77 da33ec6
Expand documentation for Buffer and associated types
Ethereal77 1968725
Refactor CommandList to use ComPtrs for clarity and coherence with ot…
Ethereal77 9df16c1
Documentation pass for CommandList
Ethereal77 2c0e3ca
Refactor GraphicsResource to use ComPtrs
Ethereal77 1f78921
Documentation pass for GraphicsResource
Ethereal77 c89b834
Rename some files to better adhere to its contained type
Ethereal77 5974903
Refactor render state objects to use ComPtrs
Ethereal77 bfbd06b
Documentation pass for render state objects and enums
Ethereal77 9fd73fe
Refactor PipelineState and Shader bindings pipeline to use ComPtrs
Ethereal77 603ba87
Documentation pass for PipelineState
Ethereal77 506e9e1
Refactor GraphicsPresenter to use ComPtrs
Ethereal77 43f6d8d
Documentation pass for GraphicsPresenter
Ethereal77 aa4c550
Rename and expand Direct3DInterop to make it more generic and useful
Ethereal77 120b5c0
Refactor GraphicsDevice to use ComPtrs
Ethereal77 7fdcc4e
Documentation pass for GraphicsDevice
Ethereal77 a0d2dc6
Fix some type mismatches that resulted from changing to use ComPtrs
Ethereal77 ad2b2b2
Corrections from review
Ethereal77 a9f143d
More corrections from review
Ethereal77 2a3f0be
Refactor Buffer (D3D12) to use ComPtrs
Ethereal77 9489bca
Documentation pass for Buffer (D3D12)
Ethereal77 809b9f3
Refactor Texture (D3D12) to use ComPtrs
Ethereal77 f071efe
Documentation pass for Texture (D3D12)
Ethereal77 48b6a9e
Refactor CommandList (D3D12) to use ComPtrs
Ethereal77 6b327d6
Documentation pass for CommandList (D3D12)
Ethereal77 446e9a9
Refactor GraphicsDevice (D3D12) to use ComPtrs
Ethereal77 cdf223b
Documentation pass for GraphicsDevice (D3D12)
Ethereal77 326cd36
Small changes to GraphicsResource (D3D12)
Ethereal77 091cc22
Documentation pass for GraphicsResource (D3D12)
Ethereal77 7c24427
Minor fixes to issues introduced with last changes
Ethereal77 3cf087c
Minor refactor to GraphicsOutput (D3D12) to use ComPtr
Ethereal77 a48768d
Documentation pass for GraphicsOutput (D3D12)
Ethereal77 e3e2acb
Refactor DescriptorPool and DescriptorSet (D3D12) to use ComPtrs
Ethereal77 746b4e8
Documentation pass for DescriptorPool and DescriptorSet (D3D12)
Ethereal77 c4fdfd5
Refactor PipelineState (D3D12) to use ComPtrs
Ethereal77 c30e84c
Documentation pass for PipelineState (D3D12)
Ethereal77 53fa971
Refactor SamplerState (D3D12) to use ComPtrs
Ethereal77 327aebe
Documentation pass for SamplerState (D3D12)
Ethereal77 ea19859
Refactor QueryPool (D3D12) to use ComPtrs
Ethereal77 659e9c6
Documentation pass for QueryPool (D3D12)
Ethereal77 f1bd2af
Add documentation for IndexBufferBinding
Ethereal77 2996b46
Separate GraphicsException in two
Ethereal77 25d9344
Small fix in SwapChainGraphicsPresenter for Direct3D 12
Ethereal77 bdc9fca
Improve and document some of the Stride.Games types related to graphics
Ethereal77 bbb805b
Refactor ShaderCompiler to use ComPtrs
Ethereal77 2718ab5
Documentation pass for ShaderCompiler
Ethereal77 1a4872d
Minor fixes and updates after rebase on 'master'
Ethereal77 63e182e
Fix and improve some Equals() that would cause a NRE
Ethereal77 3594b4a
Fix Release on a null COM pointer
Ethereal77 bae46e1
Fix other APIs so they are up to the latest changes
Ethereal77 b8efb56
Improve DebugHelpers and add a flag to log name changes
Ethereal77 7a30f76
Add debug names for Graphics Resources when debugging
Ethereal77 42f1c1c
Add D3D Info Queue message processing when debugging
Ethereal77 7fe5f95
Minor refactor of PrimitiveQuad
Ethereal77 61e7e51
Documentation pass
Ethereal77 a8cb50a
Fix some resource leaks from misusing reference counting + Dispose
Ethereal77 2e47ba1
Fix a NRE exception due to using an incorrect loop bound
Ethereal77 1ebe1fc
Small improvements, documentation and cleanup
Ethereal77 20c8037
Improve PipelineStateCache to better use COM pointers
Ethereal77 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
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.
nit: inconsistent comment style, spaces in front. Should we apply that style to all files? At least all the one modified in this PR...
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.
Oh, that's my fault. Out of habit, I'm used to write XMLdocs that way at my work and my other projects because I think it separates the documentation text from the XML tags and reads better that way. I have used that style in all the docs in this PR.
I can revert the indentation if you want. It will be a commit touching a lot of lines again, however.
Uh oh!
There was an error while loading. Please reload this page.
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.
Actually I don't mind with the new format. Especially when there are long paragraphs.
If we decide to adopt that style, it would be better to be consistent elsewhere. So while I'm it asking you to change the whole codebase, I think using that same style on all the file currently touched by this PR would be a good start.
Side note: do you do it manually of is there a way to configure that style in Visual Studio?
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.
I do it manually. I have a VS plugin to aid me in viewing how the generated docs would look like and it updates as I type (DocPreview).
Usually, when I enter to edit a file, I like to leave it in a better shape than when I found it. In Stride, I take more care to not introduce a ton of changes because the project is not mine, and that is not something for me to decide.
But when I modify a file so substantially that the change is going to be huge, I go and improve it overall.
Also, I like writing good-looking documentation 😁
(btw, I have many more extended documentation for several parts of Stride, all with this style. I'm just not including them in this PR because those parts are not graphics-related)