Fix resource register macro expansion (#2747)
The preprocessor library (fcpp) has issues with ## and doesn't expand properly. We can work around that by using the [reg] syntax which is supported for all shader targets that internally use HLSL through glslang.
This commit is contained in:
parent
3cc0de3335
commit
d7a8e50d26
@ -52,7 +52,7 @@
|
||||
|
||||
// To be able to patch the uav registers on the DXBC SPDB Chunk (D3D11 renderer) the whitespaces around
|
||||
// '_type[_reg]' are necessary. This only affects shaders with debug info (i.e., those that have the SPDB Chunk).
|
||||
# if BGFX_SHADER_LANGUAGE_HLSL > 400
|
||||
# if BGFX_SHADER_LANGUAGE_HLSL > 400 || BGFX_SHADER_LANGUAGE_PSSL || BGFX_SHADER_LANGUAGE_SPIRV || BGFX_SHADER_LANGUAGE_METAL
|
||||
# define REGISTER(_type, _reg) register( _type[_reg] )
|
||||
# else
|
||||
# define REGISTER(_type, _reg) register(_type ## _reg)
|
||||
|
Loading…
Reference in New Issue
Block a user