mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-17 20:52:36 +01:00
shaderc: Allow passing CS buffers into all shader stages in GLSL.
This commit is contained in:
@@ -76,7 +76,6 @@ function bgfxProjectBase(_kind, _defines)
|
||||
|
||||
includedirs {
|
||||
path.join(BGFX_DIR, "3rdparty"),
|
||||
path.join(BGFX_DIR, "3rdparty/dxsdk/include"),
|
||||
path.join(BX_DIR, "include"),
|
||||
path.join(BIMG_DIR, "include"),
|
||||
}
|
||||
@@ -121,6 +120,11 @@ function bgfxProjectBase(_kind, _defines)
|
||||
"BGFX_CONFIG_DEBUG=1",
|
||||
}
|
||||
|
||||
configuration { "vs*", "not durango" }
|
||||
includedirs {
|
||||
path.join(BGFX_DIR, "3rdparty/dxsdk/include"),
|
||||
}
|
||||
|
||||
configuration { "android*" }
|
||||
links {
|
||||
"EGL",
|
||||
|
||||
@@ -1792,6 +1792,11 @@ namespace bgfx
|
||||
{
|
||||
std::string code;
|
||||
|
||||
if (NULL != bx::strFind(preprocessor.m_preprocessed.c_str(), "layout(std430") )
|
||||
{
|
||||
glsl = 430;
|
||||
}
|
||||
|
||||
if (glsl < 400)
|
||||
{
|
||||
const bool usesTextureLod = false
|
||||
@@ -2004,6 +2009,15 @@ namespace bgfx
|
||||
else
|
||||
{
|
||||
bx::stringPrintf(code, "#version %d\n", glsl);
|
||||
|
||||
bx::stringPrintf(code
|
||||
, "#define texture2DLod textureLod\n"
|
||||
"#define texture2DGrad textureGrad\n"
|
||||
"#define texture2DProjLod textureProjLod\n"
|
||||
"#define texture2DProjGrad textureProjGrad\n"
|
||||
"#define textureCubeLod textureLod\n"
|
||||
"#define textureCubeGrad textureGrad\n"
|
||||
);
|
||||
}
|
||||
|
||||
code += preprocessor.m_preprocessed;
|
||||
|
||||
Reference in New Issue
Block a user