Skip to content

Commit

Permalink
Check for compute shader support as per GH-77.
Browse files Browse the repository at this point in the history
  • Loading branch information
thargy committed May 30, 2018
1 parent 6be9b0e commit a930183
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/ShaderGen.Tests/ShaderBuiltinsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,12 @@ private void TestShaderBuiltins(ToolChain toolChain)
*/
using (GraphicsDevice graphicsDevice = toolChain.CreateHeadless())
{
if (!graphicsDevice.Features.ComputeShader)
{
throw new RequiredToolFeatureMissingException(
$"The {graphicsDevice.BackendType} backend does not support compute shaders!");
}

ResourceFactory factory = graphicsDevice.ResourceFactory;
using (DeviceBuffer inOutBuffer = factory.CreateBuffer(
new BufferDescription(
Expand Down

0 comments on commit a930183

Please sign in to comment.