SPIRV-Cross/reference/shaders-hlsl/frag/texture-size-combined-image-sampler.frag
Hans-Kristian Arntzen 6a614cc7f7 Normalize all internal workaround methods to use spv prefix.
We have been interchanging spv and SPIRV_Cross_ for a while, which
causes weirdness since we don't explicitly ban SPIRV_Cross identifiers,
as these identifiers are generally used for interface variable
workarounds.
2020-11-23 15:42:27 +01:00

31 lines
586 B
GLSL

Texture2D<float4> uTex : register(t0);
SamplerState uSampler : register(s1);
static int2 FooOut;
struct SPIRV_Cross_Output
{
int2 FooOut : SV_Target0;
};
uint2 spvTextureSize(Texture2D<float4> Tex, uint Level, out uint Param)
{
uint2 ret;
Tex.GetDimensions(Level, ret.x, ret.y, Param);
return ret;
}
void frag_main()
{
uint _23_dummy_parameter;
FooOut = int2(spvTextureSize(uTex, uint(0), _23_dummy_parameter));
}
SPIRV_Cross_Output main()
{
frag_main();
SPIRV_Cross_Output stage_output;
stage_output.FooOut = FooOut;
return stage_output;
}