Use SPIR-V decorator in Unity Shader

I am using Vulkan in Unity, and I assuming the custom shaders are compiled to SPIR-V as an intermediate step. How can I go about using the FragSizeEXT SPIR-V decorator in the Unity shader to access the rectangular pixel footprint of a fragment invocation. The following screenshot was taken from Vulkan specification which describes FragSizeEXT.


The following can be done in GLSL to access the FragSize

#version 450
#extension GL_EXT_fragment_invocation_density : enable
void main() {
  ivec2 wh = gl_FragSizeEXT;
}

I was wondering if there is any similar way to access the FragSizeEXT in the default HLSL/Cg setup in Unity while working with Vulkan.

D3D12 equivalent for this extension is SV_ShadingRate semantic. And you should use modern DXC compiler (it supports SPIR-V codegen): Unity is adding a new "DXC" HLSL compiler backend option

Thanks for the information. Sorry I should have been more specific, the platform I am targeting doesn’t support D3D12, it only supports Vulkan. I have edited my question to reflect this detail.