Included bgfx_shader.sh to bgfx_compute.sh.

This commit is contained in:
Branimir Karadžić 2014-12-16 20:48:16 -08:00
parent efcb10aef6
commit 9ae934ffd7

View file

@ -6,10 +6,17 @@
#ifndef BGFX_COMPUTE_H_HEADER_GUARD
#define BGFX_COMPUTE_H_HEADER_GUARD
#include "bgfx_shader.sh"
#ifndef __cplusplus
#if BGFX_SHADER_LANGUAGE_HLSL
float uintBitsToFloat(uint _x) { return asfloat(_x); }
uint floatBitsToUint(float _x) { return asuint(_x); }
#define SHARED groupshared
#define IMAGE2D_RO(_name, _reg) Texture2D _name : register(t[_reg])
#define IMAGE2D_RW(_name, _reg) RWTexture2D<float4> _name : register(u[_reg])
#define IMAGE2D_WR(_name, _reg) IMAGE2D_RW(_name, _reg)
@ -95,6 +102,8 @@ uint atomicCompSwap(uint _mem, uint _compare, uint _data)
#else
#define SHARED shared
#define __IMAGE2D_XX(_name, _reg, _access) \
layout(rgba8, binding=_reg) _access uniform highp image2D _name