Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions tools/clang/unittests/HLSLExec/ExecutionTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10855,6 +10855,7 @@ void ExecutionTest::GroupSharedLimitASTest() {
out vertices MeshOutput verts[3],
out indices uint3 tris[1]) {
SetMeshOutputCounts(0, 0);
verts[0].pos = float4(0, 0, 0, 0);
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.

I think a safer approach would be to set output counts to non-zero and output something (like one valid primitive). I don't think the point is to test the empty output case, right?

The requirement that we write to SV_Position even when output counts are zero is an interesting edge case the validator didn't account for. Probably warrants a validator issue being filed. I'm not positive it's technically valid to write to an output outside the count specified, so this might be something to follow up on as well.

}

float4 PSMain() : SV_Target { return float4(0,0,0,0); }
Expand Down Expand Up @@ -10914,6 +10915,7 @@ void ExecutionTest::GroupSharedLimitMSTest() {
out vertices MeshOutput verts[3],
out indices uint3 tris[1]) {
SetMeshOutputCounts(0, 0);
verts[0].pos = float4(0, 0, 0, 0);
for (uint i = GI; i < GSM_DWORDS; i += 64)
g_shared[i] = i;
GroupMemoryBarrierWithGroupSync();
Expand Down
8 changes: 4 additions & 4 deletions tools/clang/unittests/HLSLExec/ShaderOpArith.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1869,13 +1869,13 @@
RootFlags(0),
DescriptorTable(UAV(u0))
</RootSignature>
<Resource Name="UAVBuffer0" Dimension="BUFFER" Width="512" InitialResourceState="COPY_DEST" Init="Zero" Flags="ALLOW_UNORDERED_ACCESS" TransitionTo="UNORDERED_ACCESS" ReadBack="true" />
<Resource Name="UAVBuffer0" Dimension="BUFFER" Width="512" InitialResourceState="COPY_DEST" Init="ByName" Flags="ALLOW_UNORDERED_ACCESS" TransitionTo="UNORDERED_ACCESS" ReadBack="true" />
<Resource Name="RTarget" Dimension="TEXTURE2D" Width="4" Height="4" Format="R8G8B8A8_UNORM" Flags="ALLOW_RENDER_TARGET" InitialResourceState="COPY_DEST" ReadBack="false" />
<RootValues>
<RootValue HeapName="ResHeap" />
</RootValues>
<DescriptorHeap Name="ResHeap" Type="CBV_SRV_UAV">
<Descriptor Name="U0" Kind="UAV" ResName="UAVBuffer0" NumElements="128" StructureByteStride="4" />
<Descriptor Name="U0" Kind="UAV" ResName="UAVBuffer0" NumElements="4096" StructureByteStride="4" />
</DescriptorHeap>
<DescriptorHeap Name="RtvHeap" NumDescriptors="1" Type="RTV">
<Descriptor Name="RTarget" Kind="RTV" />
Expand All @@ -1895,13 +1895,13 @@
RootFlags(0),
DescriptorTable(UAV(u0))
</RootSignature>
<Resource Name="UAVBuffer0" Dimension="BUFFER" Width="512" InitialResourceState="COPY_DEST" Init="Zero" Flags="ALLOW_UNORDERED_ACCESS" TransitionTo="UNORDERED_ACCESS" ReadBack="true" />
<Resource Name="UAVBuffer0" Dimension="BUFFER" Width="512" InitialResourceState="COPY_DEST" Init="ByName" Flags="ALLOW_UNORDERED_ACCESS" TransitionTo="UNORDERED_ACCESS" ReadBack="true" />
<Resource Name="RTarget" Dimension="TEXTURE2D" Width="4" Height="4" Format="R8G8B8A8_UNORM" Flags="ALLOW_RENDER_TARGET" InitialResourceState="COPY_DEST" ReadBack="false" />
<RootValues>
<RootValue HeapName="ResHeap" />
</RootValues>
<DescriptorHeap Name="ResHeap" Type="CBV_SRV_UAV">
<Descriptor Name="U0" Kind="UAV" ResName="UAVBuffer0" NumElements="128" StructureByteStride="4" />
<Descriptor Name="U0" Kind="UAV" ResName="UAVBuffer0" NumElements="4096" StructureByteStride="4" />
</DescriptorHeap>
<DescriptorHeap Name="RtvHeap" NumDescriptors="1" Type="RTV">
<Descriptor Name="RTarget" Kind="RTV" />
Expand Down
Loading