From 18d0eebbce594cf211a85966c3eee0c0871bf03e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Tue, 30 May 2017 18:17:41 -0700 Subject: [PATCH] Cleanup. --- src/bgfx_compute.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/bgfx_compute.sh b/src/bgfx_compute.sh index 00ba12982..c04cb06bb 100644 --- a/src/bgfx_compute.sh +++ b/src/bgfx_compute.sh @@ -61,7 +61,11 @@ #define r32f float #define rg16f float2 #define rgba16f float4 -#define rgba8 unorm float4 +#if BGFX_SHADER_LANGUAGE_HLSL +# define rgba8 unorm float4 +#else +# define rgba8 float4 +#endif // BGFX_SHADER_LANGUAGE_HLSL #define rgba32f float4 #define IMAGE2D_RO( _name, _format, _reg) Texture2D<_format> _name : REGISTER(t, _reg) @@ -110,10 +114,12 @@ __IMAGE_IMPL(float, x, vec4, xxxx) __IMAGE_IMPL(vec2, xy, vec4, xyyy) __IMAGE_IMPL(vec3, xyz, vec4, xyzz) __IMAGE_IMPL(vec4, xyzw, vec4, xyzw) +#if BGFX_SHADER_LANGUAGE_HLSL __IMAGE_IMPL(unorm float, x, vec4, xxxx) __IMAGE_IMPL(unorm vec2, xy, vec4, xyyy) __IMAGE_IMPL(unorm vec3, xyz, vec4, xyzz) __IMAGE_IMPL(unorm vec4, xyzw, vec4, xyzw) +#endif // BGFX_SHADER_LANGUAGE_HLSL __IMAGE_IMPL(uint, x, uvec4, xxxx) __IMAGE_IMPL(uvec2, xy, uvec4, xyyy) __IMAGE_IMPL(uvec3, xyz, uvec4, xyzz)