Version: 2021.2
  • C#


Suggest a change


Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.


Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.



Switch to Manual


public bool IsSupported(int kernelIndex);


kernelIndex Which kernel to query.


bool True if the specified compute kernel is able to run on the current end user device, false otherwise.


Allows you to check whether the current end user device supports the features required to run the specified compute shader kernel.

The result of this call depends on which hardware requirements the compute shader in question is expected to rely on (as defined by the `#pragma require <requirement_a> <requirement_b> <requirement_c> ...` shader syntax). This method implicitly refers to the compute shader variant defined by the set of currently enabled shader keywords (the variant that would be run if ComputeShader.Dispatch were called instead). This means that when the source code of the shader in question contains per-keyword requirements defined using the '#pragma require KEYWORD_A KEYWORD_B ... : <requirement_a> <requirement_b> <requirement_c>...' syntax the result of IsSupported might depend on which shader keywords are enabled.

See Also: Shader variants and keywords, Declaring and using shader keywords in HLSL, Targeting shader models and GPU features in HLSL.