Skip to content

Add SV_BaseVertexLocation and SV_StartInstanceLocation to VSIn - #5770

Merged
Xiang Li (python3kgae) merged 14 commits into
microsoft:staging-sm-6.8from
python3kgae:vs_in_68
Oct 31, 2023
Merged

Xiang Li (python3kgae) merged 14 commits into
microsoft:staging-sm-6.8from
python3kgae:vs_in_68

Conversation

@python3kgae

Copy link
Copy Markdown
Contributor

New VS Input semantics SV_BaseVertexLocation and SV_StartInstanceLocation are added for
BaseVertexLocation and StartInstanceLocation of https://learn.microsoft.com/en-us/windows/win32/api/d3d12/nf-d3d12-id3d12graphicscommandlist-drawindexedinstanced

Also added DXIL operation for these 2 input semantics.

Fixes #2907

@llvm-beanz Chris B (llvm-beanz) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably have some tests that verify that users get source errors if they try to use the new system values in older shader models.

@github-actions

Copy link
Copy Markdown
Contributor

PR contains clang-format violations. First 50 lines of the diff:

--- lib/DXIL/DxilMetadataHelper.cpp	(before formatting)
+++ lib/DXIL/DxilMetadataHelper.cpp	(after formatting)
@@ -7,10 +7,10 @@
 //                                                                           //
 ///////////////////////////////////////////////////////////////////////////////
 
+#include "dxc/DXIL/DxilMetadataHelper.h"
 #include "dxc/DXIL/DxilCBuffer.h"
 #include "dxc/DXIL/DxilCounters.h"
 #include "dxc/DXIL/DxilFunctionProps.h"
-#include "dxc/DXIL/DxilMetadataHelper.h"
 #include "dxc/DXIL/DxilModule.h"
 #include "dxc/DXIL/DxilOperations.h"
 #include "dxc/DXIL/DxilResource.h"
--- lib/DXIL/DxilOperations.cpp	(before formatting)
+++ lib/DXIL/DxilOperations.cpp	(after formatting)
@@ -9,9 +9,9 @@
 //                                                                           //
 ///////////////////////////////////////////////////////////////////////////////
 
+#include "dxc/DXIL/DxilOperations.h"
 #include "dxc/DXIL/DxilInstructions.h"
 #include "dxc/DXIL/DxilModule.h"
-#include "dxc/DXIL/DxilOperations.h"
 #include "dxc/Support/Global.h"
 
 #include "llvm/ADT/ArrayRef.h"

See action log for the full diff.

@github-actions

Copy link
Copy Markdown
Contributor

PR contains clang-format violations. First 50 lines of the diff:

--- lib/DXIL/DxilMetadataHelper.cpp	(before formatting)
+++ lib/DXIL/DxilMetadataHelper.cpp	(after formatting)
@@ -7,10 +7,10 @@
 //                                                                           //
 ///////////////////////////////////////////////////////////////////////////////
 
+#include "dxc/DXIL/DxilMetadataHelper.h"
 #include "dxc/DXIL/DxilCBuffer.h"
 #include "dxc/DXIL/DxilCounters.h"
 #include "dxc/DXIL/DxilFunctionProps.h"
-#include "dxc/DXIL/DxilMetadataHelper.h"
 #include "dxc/DXIL/DxilModule.h"
 #include "dxc/DXIL/DxilOperations.h"
 #include "dxc/DXIL/DxilResource.h"
--- lib/DXIL/DxilOperations.cpp	(before formatting)
+++ lib/DXIL/DxilOperations.cpp	(after formatting)
@@ -9,9 +9,9 @@
 //                                                                           //
 ///////////////////////////////////////////////////////////////////////////////
 
+#include "dxc/DXIL/DxilOperations.h"
 #include "dxc/DXIL/DxilInstructions.h"
 #include "dxc/DXIL/DxilModule.h"
-#include "dxc/DXIL/DxilOperations.h"
 #include "dxc/Support/Global.h"
 
 #include "llvm/ADT/ArrayRef.h"

See action log for the full diff.

@github-actions

Copy link
Copy Markdown
Contributor

PR contains clang-format violations. First 50 lines of the diff:

--- lib/DXIL/DxilMetadataHelper.cpp	(before formatting)
+++ lib/DXIL/DxilMetadataHelper.cpp	(after formatting)
@@ -7,10 +7,10 @@
 //                                                                           //
 ///////////////////////////////////////////////////////////////////////////////
 
+#include "dxc/DXIL/DxilMetadataHelper.h"
 #include "dxc/DXIL/DxilCBuffer.h"
 #include "dxc/DXIL/DxilCounters.h"
 #include "dxc/DXIL/DxilFunctionProps.h"
-#include "dxc/DXIL/DxilMetadataHelper.h"
 #include "dxc/DXIL/DxilModule.h"
 #include "dxc/DXIL/DxilOperations.h"
 #include "dxc/DXIL/DxilResource.h"
--- lib/DXIL/DxilOperations.cpp	(before formatting)
+++ lib/DXIL/DxilOperations.cpp	(after formatting)
@@ -9,9 +9,9 @@
 //                                                                           //
 ///////////////////////////////////////////////////////////////////////////////
 
+#include "dxc/DXIL/DxilOperations.h"
 #include "dxc/DXIL/DxilInstructions.h"
 #include "dxc/DXIL/DxilModule.h"
-#include "dxc/DXIL/DxilOperations.h"
 #include "dxc/Support/Global.h"
 
 #include "llvm/ADT/ArrayRef.h"

See action log for the full diff.

@python3kgae

Copy link
Copy Markdown
Contributor Author

Added test but it still dependent on moving diagnostic to sema.
This is in clang codeGen now :(

Comment thread utils/hct/hctdb.py Resolved
@dmpots

Copy link
Copy Markdown
Contributor

Should we have an execution test for these? How does that work for new features like this?

@s-perron

Copy link
Copy Markdown
Collaborator

This looks like something we should support in spirv as well.

I believe these correspond to the BaseVertex and the BaseInstance builtin.

Cassandra Beckley (@cassiebeckley) Could you add this to your list for Q4? Once this PR is merged it should not take too long.

@cassiebeckley

Copy link
Copy Markdown
Contributor

Steven Perron (@s-perron) sure

@llvm-beanz

Copy link
Copy Markdown
Collaborator

Cassandra Beckley (@cassiebeckley) & Steven Perron (@s-perron), we're going to post a spec for this on the hlsl-specs repo hopefully soon. That may change some details of this implementation.

@github-actions

github-actions Bot commented Oct 2, 2023

Copy link
Copy Markdown
Contributor

PR contains clang-format violations. First 50 lines of the diff:

--- lib/DXIL/DxilMetadataHelper.cpp	(before formatting)
+++ lib/DXIL/DxilMetadataHelper.cpp	(after formatting)
@@ -7,10 +7,10 @@
 //                                                                           //
 ///////////////////////////////////////////////////////////////////////////////
 
+#include "dxc/DXIL/DxilMetadataHelper.h"
 #include "dxc/DXIL/DxilCBuffer.h"
 #include "dxc/DXIL/DxilCounters.h"
 #include "dxc/DXIL/DxilFunctionProps.h"
-#include "dxc/DXIL/DxilMetadataHelper.h"
 #include "dxc/DXIL/DxilModule.h"
 #include "dxc/DXIL/DxilOperations.h"
 #include "dxc/DXIL/DxilResource.h"
--- lib/DXIL/DxilOperations.cpp	(before formatting)
+++ lib/DXIL/DxilOperations.cpp	(after formatting)
@@ -9,9 +9,9 @@
 //                                                                           //
 ///////////////////////////////////////////////////////////////////////////////
 
+#include "dxc/DXIL/DxilOperations.h"
 #include "dxc/DXIL/DxilInstructions.h"
 #include "dxc/DXIL/DxilModule.h"
-#include "dxc/DXIL/DxilOperations.h"
 #include "dxc/Support/Global.h"
 
 #include "llvm/ADT/ArrayRef.h"

See action log for the full diff.

@pow2clk

Copy link
Copy Markdown
Collaborator

Should we have an execution test for these? How does that work for new features like this?

Yes, but that is easier to do once all support for this is available and has been taken on by another team.

@github-actions

github-actions Bot commented Oct 27, 2023 •

Copy link
Copy Markdown
Contributor

✅ With the latest revision this PR passed the Python code formatter.

@tex3d Tex Riddell (tex3d) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SV_StartInstanceLocation should not use Arb in SemanticInterpretationCSV.

Comment thread utils/hct/hctdb.py Resolved

@pow2clk Gregory Roth (pow2clk) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I think all Tex's comments have been addressed

@tex3d Tex Riddell (tex3d) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

7 participants