-
Notifications
You must be signed in to change notification settings - Fork 709
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[spirv] Move descriptor scalar replacement to legalization stage. (#3261
) * [spirv] `-fspv-flatten-resource-arrays` is not needed for flattening global struct of resources. * [spirv] Move descriptor scalar replacement to legalization stage.
- Loading branch information
Showing
12 changed files
with
45 additions
and
18 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
2 changes: 1 addition & 1 deletion
2
tools/clang/test/CodeGenSPIRV/vk.binding.global-struct-of-resource-mix.error.1.hlsl
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
2 changes: 1 addition & 1 deletion
2
tools/clang/test/CodeGenSPIRV/vk.binding.global-struct-of-resource-mix.error.2.hlsl
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
2 changes: 1 addition & 1 deletion
2
tools/clang/test/CodeGenSPIRV/vk.binding.global-struct-of-resources.1.hlsl
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
2 changes: 1 addition & 1 deletion
2
tools/clang/test/CodeGenSPIRV/vk.binding.global-struct-of-resources.2.hlsl
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
2 changes: 1 addition & 1 deletion
2
tools/clang/test/CodeGenSPIRV/vk.binding.global-struct-of-resources.3.hlsl
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
2 changes: 1 addition & 1 deletion
2
tools/clang/test/CodeGenSPIRV/vk.binding.global-struct-of-resources.4.hlsl
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
2 changes: 1 addition & 1 deletion
2
.../clang/test/CodeGenSPIRV/vk.binding.global-struct-of-resources.contains-buffer-error.hlsl
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
2 changes: 1 addition & 1 deletion
2
tools/clang/test/CodeGenSPIRV/vk.binding.global-struct-of-resources.optimized.hlsl
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
23 changes: 23 additions & 0 deletions
23
tools/clang/test/CodeGenSPIRV/vk.binding.global-struct-of-resources.pass-legalization.hlsl
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,23 @@ | ||
// Run: %dxc -T ps_6_0 -E main -O0 | ||
|
||
// CHECK: OpDecorate %g_CombinedTextureSampler_t DescriptorSet 0 | ||
// CHECK: OpDecorate %g_CombinedTextureSampler_t Binding 0 | ||
// CHECK: OpDecorate %g_CombinedTextureSampler_s DescriptorSet 0 | ||
// CHECK: OpDecorate %g_CombinedTextureSampler_s Binding 1 | ||
|
||
struct sampler2D { | ||
Texture2D t; | ||
SamplerState s; | ||
}; | ||
float4 tex2D(sampler2D x, float2 v) { return x.t.Sample(x.s, v); } | ||
|
||
struct v2f { | ||
float4 vertex : SV_POSITION; | ||
float2 uv : TEXCOORD0; | ||
}; | ||
|
||
sampler2D g_CombinedTextureSampler; | ||
|
||
float4 main(v2f i) : SV_Target { | ||
return tex2D(g_CombinedTextureSampler, i.uv); | ||
} |
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