Skip to content
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

[SPIR-V] Fixes SPV_KHR_fragment_shading_rate preventing optimizations #6980

Merged
merged 1 commit into from
Oct 28, 2024
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
24 changes: 24 additions & 0 deletions tools/clang/test/CodeGenSPIRV/vk.shading-rate.optimized.hlsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// RUN: %dxc -T vs_6_6 -E main -spirv -fspv-target-env=vulkan1.3 %s | FileCheck %s

// CHECK-NOT: OpDecorate %unused DescriptorSet
// CHECK-NOT: OpDecorate %unused Binding
RWStructuredBuffer<uint> unused;

struct in0
{
float4 position : POSITION;
float2 uv : TEXCOORD0;
};

struct out0
{
float4 pos : SV_Position;
uint sr : SV_ShadingRate;
};

// CHECK-NOT: OpEntryPoint Vertex %main "main" %in_var_POSITION %in_var_TEXCOORD0 %gl_Position %{{.*}} %unused
// CHECK: OpEntryPoint Vertex %main "main" %gl_Position %{{.*}}
out0 main(in0 i)
{
return (out0) 0;
}
Loading