Răsfoiți Sursa

Don't include compute on HLSL 3 and below.

Branimir Karadžić 4 ani în urmă
părinte
comite
8e75b38207
1 a modificat fișierele cu 5 adăugiri și 1 ștergeri
  1. 5 1
      src/bgfx_compute.sh

+ 5 - 1
src/bgfx_compute.sh

@@ -10,11 +10,15 @@
 
 
 #ifndef __cplusplus
 #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
 #if BGFX_SHADER_LANGUAGE_METAL || BGFX_SHADER_LANGUAGE_SPIRV
 #	define ANNOTATION(_format) [[spv::format_ ## _format]]
 #	define ANNOTATION(_format) [[spv::format_ ## _format]]
 #else
 #else
 #	define ANNOTATION(_format)
 #	define ANNOTATION(_format)
-#endif
+#endif // BGFX_SHADER_LANGUAGE_METAL || BGFX_SHADER_LANGUAGE_SPIRV
 
 
 #if BGFX_SHADER_LANGUAGE_GLSL
 #if BGFX_SHADER_LANGUAGE_GLSL