From 4a88d1cf4f9b4d02c50fea5875704d9a10c30385 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Mon, 4 Jan 2016 13:04:52 -0800 Subject: [PATCH] shaderc: Added HLSL attributes. --- src/bgfx_shader.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/bgfx_shader.sh b/src/bgfx_shader.sh index a82a03e2..18c04993 100644 --- a/src/bgfx_shader.sh +++ b/src/bgfx_shader.sh @@ -12,6 +12,22 @@ #ifndef __cplusplus +#if BGFX_SHADER_LANGUAGE_HLSL > 3 +# define BRANCH [branch] +# define LOOP [loop] +# define UNROLL [unroll] +#else +# define BRANCH +# define LOOP +# define UNROLL +#endif // BGFX_SHADER_LANGUAGE_HLSL > 3 + +#if BGFX_SHADER_LANGUAGE_HLSL > 3 && BGFX_SHADER_TYPE_FRAGMENT +# define EARLY_DEPTH_STENCIL [earlydepthstencil] +#else +# define EARLY_DEPTH_STENCIL +#endif // BGFX_SHADER_LANGUAGE_HLSL > 3 && BGFX_SHADER_TYPE_FRAGMENT + #if BGFX_SHADER_LANGUAGE_HLSL # define dFdx(_x) ddx(_x) # define dFdy(_y) ddy(-_y)