* shaderc HLSL profile switch fix
* shader makefiles changed to match new hlsl profile switches
Co-authored-by: Ali Seyedof <ali.seyedof@xyzreality.com>
Adds support on tools.mk for the msys2 environment. The OS is still
considered windows but the command line tools for mkdir and rmdir
behave as if on linux.
The variable SHADER_TMP on the makefiles also had to be quoted to make
it work on msys2.
This echo command on the makefile behaves differently between linux and gnuwin32:
```
-@echo extern const uint8_t* $(basename $(<))_pssl;>> $(@)
```
On linux the semicolon immediately ends the echo command and its output is never piped to the embedded shader's header.
If you try to fix it by quoting the string:
```
-@echo "extern const uint8_t* $(basename $(<))_pssl;" >> $(@)
```
It will work on linux but not on gnuwin32 because the quotes will appear on the outputted string.
The solution was to use printf which works consistently between the two.
Also on gnuwin32 the outputted string has 'CRLF' line endings, which clashes with the rest of the 'LF' line endings
of the embedded shaders header which were produced by shaderc.
The solution was to remove the 'CR' from the outputted string by using the tr command.
In non-embedded shaders there is a separation between essl binaries (examples/runtime/shaders/essl)
and glsl binaries (examples/runtime/shaders/glsl). On embedded shaders there is no such separation
and by default essl shaders are being used by the OpenGL runtime. This usually doesn't cause any
issues but in the case of the debugdraw shaders, that started using uvec4, this now leads to a
runtime error. This patch fixes this by splitting the embedded shaders into essl and glsl.
As asked, this is the first part of the change.
To be able to compile the 'examples/common/debugdraw' shaders, pull
request #2362 is needed.