From 8e75b38207ea8a2b556dd505b7f205aaaf1fffa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Sun, 28 Feb 2021 13:41:16 -0800 Subject: [PATCH] Don't include compute on HLSL 3 and below. --- src/bgfx_compute.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/bgfx_compute.sh b/src/bgfx_compute.sh index d8be0bd9c..556972ebd 100644 --- a/src/bgfx_compute.sh +++ b/src/bgfx_compute.sh @@ -10,11 +10,15 @@ #ifndef __cplusplus +#if BGFX_SHADER_LANGUAGE_HLSL > 0 && BGFX_SHADER_LANGUAGE_HLSL < 400 +# error "Compute is not supported!" +#endif // BGFX_SHADER_LANGUAGE_HLSL + #if BGFX_SHADER_LANGUAGE_METAL || BGFX_SHADER_LANGUAGE_SPIRV # define ANNOTATION(_format) [[spv::format_ ## _format]] #else # define ANNOTATION(_format) -#endif +#endif // BGFX_SHADER_LANGUAGE_METAL || BGFX_SHADER_LANGUAGE_SPIRV #if BGFX_SHADER_LANGUAGE_GLSL