In D3D11 (hlsl), the uav buffers are bound to ux registers, but in GL3Plus (glsl) with glBindBufferRange( GL_SHADER_STORAGE_BUFFER, ...).
For read-only buffers, the D3D11 uses tx registers, but Gl3Plus uses either SSBO, texture buffer or GL_TEXTURE0+slot/GL_PIXEL_UNPACK_BUFFER.
Regardless of the macros for HLMS to cover such differences, I am confused about the consistency of the binding slots on c++ side. For example if my HLSL shader uses 2 read-only buffers and 2 uav buffers, I can bind them to t0, t1 and u0, u1. However in GLSL I cannot use same slots. On modern hardware, both buffer types are created as SSBO and I have to use bindings 0, 1, 2, 3.
What is the idea in Ogre to handle different binding slots in HLSL and GLSL? Is it intended to use conditions in c++ code to verify whether we are in d3d11 or gl3plus and whether ssbo is supported, etc. (actually I need to assume it is, as I need to use uav buffers).
Another idea is to use in HLSL the registers tx and ux as identical - assuming e.g. u0 is same as t0 and don't bind the buffers to both and keep the gl3plus happy, but it sounds like a waste.