Supported Features

Supported HLSL version: 5.0

Supported shader types:

  • Vertex Shader
  • Geometry Shader
  • Hull Shader (Tessellation Control Shader)
  • Domain Shader (Tessellation Evaluation Shader)
  • Pixel Shader (Fragment Shader)
  • Compute Shader

List of supported HLSL objects and methods:

  • Texture1D :
    • void GetDimensions (out {int, uint, float} Width);
    • void GetDimensions (in uint MipLevel, out {int, uint, float} Width, out {int, uint, float} NumberOfLevels);
    • ret Sample( sampler_state S, float Location [, int Offset] );
    • ret SampleBias( sampler_state S, float Location, float Bias [, int Offset] );
    • ret SampleLevel( sampler_state S, float Location, float LOD [, int Offset] );
    • ret SampleGrad( sampler_state S, float Location, float DDX, float DDY [, int Offset] );
    • float SampleCmp( SamplerComparisonState S, float Location, float CompareValue, [int Offset] );
    • float SampleCmpLevelZero( SamplerComparisonState S, float Location, float CompareValue, [int Offset] );
    • ret Load( int Location, [int Offset ] );
  • Texture1DArray :
    • void GetDimensions( out {int, uint, float} Width, out {int, uint, float} Elements );
    • void GetDimensions( in uint MipLevel, out {int, uint, float} Width, out {int, uint, float} Elements, out {int, uint, float} NumberOfLevels );
    • ret Sample( sampler_state S, float2 Location [, int Offset] );
    • ret SampleBias( sampler_state S, float2 Location, float Bias [, int Offset] );
    • ret SampleLevel( sampler_state S, float2 Location, float LOD [, int Offset] );
    • ret SampleGrad( sampler_state S, float2 Location, float DDX, float DDY [, int Offset] );
    • float SampleCmp( SamplerComparisonState S, float2 Location, float CompareValue, [int Offset] );
    • float SampleCmpLevelZero( SamplerComparisonState S, float2 Location, float CompareValue, [int Offset] );
    • ret Load( int2 Location, [int Offset ] );
    • Remarks:
      • Array index goes in Location.y
  • Texture2D :
    • void GetDimensions( out {int, uint, float} Width, out {int, uint, float} Height );
    • void GetDimensions( in uint MipLevel, out {int, uint, float} Width, out {int, uint, float} Height, out {int, uint, float} NumberOfLevels );
    • ret Sample( sampler_state S, float2 Location [, int2 Offset] );
    • ret SampleBias( sampler_state S, float2 Location, float Bias [, int2 Offset] );
    • ret SampleLevel( sampler_state S, float2 Location, float LOD [, int2 Offset] );
    • ret SampleGrad( sampler_state S, float2 Location, float2 DDX, float2 DDY [, int2 Offset] );
    • float SampleCmp( SamplerComparisonState S, float2 Location, float CompareValue, [int2 Offset] );
    • float SampleCmpLevelZero( SamplerComparisonState S, float2 Location, float CompareValue [, int2 Offset] );
    • ret Load( int2 Location, [int2 Offset ] );
    • ret Gather( sampler_state S, float2 Location [, int2 Offset] );
    • float4 GatherCmp( SamplerComparisonState S, float2 Location, float CompareValue [, int2 Offset] );
  • Texture2DArray :
    • void GetDimensions( out {int, uint, float} Width, out {int, uint, float} Height, out {int, uint, float} Elements );
    • void GetDimensions( in uint MipLevel, out {int, uint, float} Width, out {int, uint, float} Height, out {int, uint, float} Elements, out {int, uint, float} NumberOfLevels );
    • ret Sample( sampler_state S, float3 Location [, int2 Offset] );
    • ret SampleBias( sampler_state S, float3 Location, float Bias [, int2 Offset] );
    • ret SampleLevel( sampler_state S, float3 Location, float LOD [, int2 Offset] );
    • ret SampleGrad( sampler_state S, float3 Location, float2 DDX, float2 DDY [, int2 Offset] );
    • float SampleCmp( SamplerComparisonState S, float2 Location, float CompareValue [, int2 Offset] );
    • ret Load( int Location3 [, int2 Offset ] );
    • ret Gather( sampler_state S, float3 Location [, int2 Offset] );
    • float4 GatherCmp( SamplerComparisonState S, float3 Location, float CompareValue [, int2 Offset] );
    • Remarks:
      • Array index goes in Location.z
      • SampleCmpLevelZero()  is not supported as there is no corresponding OpenGL instruction. The instruction will always return 0.
  • Texture3D :
    • void GetDimensions( out {int, uint, float} Width, out {int, uint, float} Height, out {int, uint, float} Depth );
    • void GetDimensions( in uint MipLevel, out {int, uint, float} Width, out {int, uint, float} Height, out {int, uint, float} Depth, out {int, uint, float} NumberOfLevels );
    • ret Sample( sampler_state S, float3 Location [, int3 Offset] );
    • ret SampleBias( sampler_state S, float3 Location, float Bias [, int3 Offset] );
    • ret SampleLevel( sampler_state S, float3 Location, float LOD [, int3 Offset] );
    • ret SampleGrad( sampler_state S, float3 Location, float3 DDX, float3 DDY [, int3 Offset] );
    • ret Load( int3 Location [, int3 Offset ] );
  • TextureCube :
    • void GetDimensions( out {int, uint, float} Width, out {int, uint, float} Height );
    • void GetDimensions( in uint MipLevel, out {int, uint, float} Width, out {int, uint, float} Height, out {int, uint, float} NumberOfLevels );
    • ret Sample( sampler_state S, float3 Location );
    • ret SampleBias( sampler_state S, float3 Location, float Bias );
    • ret SampleLevel( sampler_state S, float3 Location, float LOD )  – NO offset version
    • ret SampleGrad( sampler_state S, float3 Location, float3 DDX, float3 DDY );
    • float SampleCmp( SamplerComparisonState S, float3 Location, float CompareValue );
    • ret Gather( sampler_state S, float3 Location );
    • float4 GatherCmp( SamplerComparisonState S, float3 Location, float CompareValue );
    • Remarks:
      • SampleCmpLevelZero()  is not supported as there is no corresponding OpenGL instruction. The instruction will always return 0.
  • TextureCubeArray :
    • void GetDimensions( out {int, uint, float} Width, out {int, uint, float} Height, out {int, uint, float} Elements );
    • void GetDimensions( in uint MipLevel, out {int, uint, float} Width, out {int, uint, float} Height, out {int, uint, float} Elements, out {int, uint, float} NumberOfLevels );
    • ret Sample( sampler_state S, float4 Location );
    • ret SampleBias( sampler_state S, float4 Location, float Bias );
    • ret SampleLevel( sampler_state S, float4 Location, float LOD )  – NO offset version
    • ret SampleGrad( sampler_state S, float4 Location, float3 DDX, float3 DDY );
    • float SampleCmp( SamplerComparisonState S, float4 Location, float CompareValue );
    • ret Gather( sampler_state S, float4 Location );
    • float4 GatherCmp( SamplerComparisonState S, float4 Location, float CompareValue );
    • Remarks:
      • SampleCmpLevelZero()  is not supported as there is no corresponding OpenGL instruction. The instruction will always return 0.
      • Array index goes in Location.w
  • Texture2DMS :
    • void GetDimensions(out {int, uint, float} Width, out {int, uint, float} Height, out {int, uint, float} NumberOfSamples);
    • ret Load( int2 Location, int Sample, [int2 Offset ] );
  • Texture2DMSArray :
    • void GetDimensions( out {int, uint, float} Width, out {int, uint, float} Height, out {int, uint, float} Elements, out {int, uint, float} NumberOfSamples );
    • ret Load( int3 Location, int Sample, [int2 Offset ] );
  • RWTexture1D :
    • void GetDimensions(out {int, uint, float} Width);
  • RWTexture1DArray :
    • void GetDimensions(out {int, uint, float} Width, out {int, uint, float} Elements);
  • RWTexture2D :
    • void GetDimensions(out {int, uint, float} Width, out {int, uint, float} Height);
  • RWTexture2DArray :
    • void GetDimensions(out {int, uint, float} Width, out {int, uint, float} Height, out {int, uint, float} Elements);
  • RWTexture3D :
    • void GetDimensions(out {int, uint, float} Width, out {int, uint, float} Height, out {int, uint, float} Depth);

Rremarks

  • All GetDimensions()  functions return valid value in NumberOfLevels  only on Desktop GL 4.3+
  • For multisampled textures, GetDimensions()  always returns 0 in NumberOfSamples .

 

List of supported HLSL intrinsics:

  • abs( {int, int2, int3, int4, float, float2, float3, float4} )
  • acos( {float, float2, float3, float4} )
    • Not supported: acos( {matrix types} )
  • all( {bool2, bool3, bool4})
    • Not supported: all( {bool, int, int2, int3, int4, float, float2, float3, float4, matrix types} )
  • any( {bool2, bool3, bool4})
    • Not supported: any( {bool, int, int2, int3, int4, float, float2, float3, float4, matrix types} )
  • asdouble( {uint} )
  • asfloat( {int, int2, int3, int4, uint, uint2, uint3, uint4, float, float2, float3, float4} )
    • Not supported: asfloat( {matrix types} )
  • asint( {int, int2, int3, int4, uint, uint2, uint3, uint4, float, float2, float3, float4} )
    • Not supported: asint( {matrix types} )
  • asuint( {int, int2, int3, int4, uint, uint2, uint3, uint4, float, float2, float3, float4} )
    • Not supported: asuint( {matrix types} )
  • asin( {float, float2, float3, float4} )
    • Not supported: asin( {matrix types} )
  • atan( {float, float2, float3, float4} )
    • Not supported: atan( {matrix types} )
  • atan2( {float, float2, float3, float4} )
    • Not supported: atan2( {matrix types} )
  • ceil( {float, float2, float3, float4} )
    • Not supported: ceil( {matrix types} )
  • clamp( {int, int2, int3, int4, uint, uint2, uint3, uint4, float, float2, float3, float4} )
    • Not supported: clamp( {matrix types} )
  • cos( {float, float2, float3, float4} )
    • Not supported: cos( {matrix types} )
  • cosh( {float, float2, float3, float4} )
    • Not supported: cosh( {matrix types} )
  • countbits( {int, int2, int3, int4, uint, uint2, uint3, uint4} )
  • cross(float3)
  • ddx()
  • ddx_coarse()  – #defined as ddx()
  • ddx_fine()  – #defined as ddx()
  • ddy()
  • ddy_coarse()  – #defined as ddy()
  • ddy_fine()  – #defined as ddy()
  • degrees( {float, float2, float3, float4} )
    • Not supported: degrees( {matrix types} )
  • determinant()
  • distance( {float, float2, float3, float4} )
  • dot( {float, float2, float3, float4} )
    • Not supported: dot( {int, int2, int3, int4} )
  • dst()  – #defined as distance()
  • exp( {float, float2, float3, float4} )
    • Not supported: exp( {matrix types} )
  • exp2( {float, float2, float3, float4} )
    • Not supported: exp2( {matrix types} )
  • f16tof32( {int, int2, int3, int4, uint, uint2, uint3, uint4} )
  • f32tof16( {float, float2, float3, float4} )  -> {uint, uint2, uint3, uint4}
  • faceforward( {float, float2, float3, float4} )
  • firstbithigh( {int, int2, int3, int4, uint, uint2, uint3, uint4} )
  • firstbitlow( {int, int2, int3, int4, uint, uint2, uint3, uint4} )
  • floor( {float, float2, float3, float4} )
    • Not supported: floor( {matrix types} )
  • fma( {double, double2, double3, double4} )
  • fmod( {float, float2, float3, float4} )
    • Not supported:  fmod( {matrix types} )
  • frac( {float, float2, float3, float4} )
    • Not supported: frac( {matrix types} )
  • frexp( {float, float2, float3, float4}, {int, int2, int3, int4} )
  • Not supported: fwidth( {float, float2, float3, float4} )
    • Not supported: fwidth( {matrix types} )
  • isfinite( {float, float2, float3, float4} ) – implemented as (!isinf(x) && !isnan(x))
  • isinf( {float, float2, float3, float4} )
    • Not supported: isinf( {matrix types} )
  • isnan( {float, float2, float3, float4} )
    • Not supported: isnan( {matrix types} )
  • ldexp( {float, float2, float3, float4}, {int, int2, int3, int4} )
  • length( {float, float2, float3, float4} )
  • lerp( {float, float2, float3, float4} )
    • Not supported: lerp( {matrix types} )
  • log( {float, float2, float3, float4} )
    • Not supported: log( {matrix types} )
  • log2( {float, float2, float3, float4} )
    • Not supported:  log2( {matrix types} )
  • log10( {float, float2, float3, float4} )
    • Not supported: log10( {matrix types} )
  • mad( {float, float2, float3, float4} )
    • Not supported: mad( {matrix types} )
  • max( {int, int2, int3, int4, uint, uint2, uint3, uint4, float, float2, float3, float4} )
    • Not supported: max( {matrix types} )
  • min( {int, int2, int3, int4, uint, uint2, uint3, uint4, float, float2, float3, float4} )
    • Not supported: min( {matrix types} )
  • modf( {float, float2, float3, float4} )
    • Not supported: modf( {int, int2, int3, int4, matrix types} )
  • mul  – defined as a*b
  • noise( {float, float2, float3, float4} )
  • normalize( {float, float2, float3, float4} )
  • pow( {float, float2, float3, float4} )
    • Not supported: pow( {matrix types} )
  • radians( {float, float2, float3, float4} )
    • Not supported: radians( {matrix types} )
  • rcp( {float, float2, float3, float4} ) – defined as 1.0/(x)
  • reflect( {float, float2, float3, float4} )
  • refract( {float, float2, float3, float4} )
  • reversebits( {int, int2, int3, int4, uint, uint2, uint3, uint4} )
  • round( {float, float2, float3, float4} )
    • Not supported: round( {matrix types} )
  • rsqrt( {float, float2, float3, float4} )
    • Not supported: rsqrt( {matrix types} )
  • saturate( {float, float2, float3, float4} )
  • sign( {float, float2, float3, float4, int, int2, int3, int4} )
    • Not supported: sign( {matrix types} )
  • sin( {float, float2, float3, float4} )
    • Not supported: sin( {matrix types} )
  • sinh( {float, float2, float3, float4} )
    • Not supported: sinh( {matrix types} )
  • sincos( {float, float2, float3, float4} )
  • smoothstep( {float, float2, float3, float4} )
    • Not supported: smoothstep( {matrix types} )
  • sqrt( {float, float2, float3, float4} )
    • Not supported: sqrt( {matrix types} )
  • step( {float, float2, float3, float4} )
    • Not supported: step( {matrix types} )
  • tan( {float, float2, float3, float4} )
    • Not supported: tan( {matrix types} )
  • tanh( {float, float2, float3, float4} ) Not supported: tanh( {matrix types} )
  • transpose
  • trunc( {float, float2, float3, float4} )
    • Not supported: trunc( {matrix types} )
  • AllMemoryBarrier()  – calls all memory barrier functions in gl
  • AllMemoryBarrierWithGroupSync()
  • DeviceMemoryBarrier()  – calls image, atomic counter & buffer memory barriers
  • DeviceMemoryBarrierWithGroupSync()
  • GroupMemoryBarrier()  – calls group memory & shared memory barriers
  • GroupMemoryBarrierWithGroupSync()
  • InterlockedAdd( {int, uint} )
  • InterlockedAnd( {int, uint} )
  • InterlockedCompareExchange( {int, uint} )
  • InterlockedCompareStore( {int, uint} )
  • InterlockedExchange( {int, uint} )
  • InterlockedMax( {int, uint} )
  • InterlockedMin( {int, uint} )
  • InterlockedOr( {int, uint} )
  • InterlockedXor( {int, uint} )