Commit fcadd08a by Ken Russell Committed by Commit Bot

Provide build target for angle_shader_translator sample.

This is useful for building the sample within Chromium rather than in ANGLE's standalone build, which has other requirements like a full Visual Studio installation. BUG=angleproject:2095 Change-Id: I785d87ecb5166d8f640a5c8a5f321c3209017cc5 Reviewed-on: https://chromium-review.googlesource.com/553399Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent ab04e6a7
......@@ -747,3 +747,18 @@ foreach(is_shared_library,
}
}
}
# Convenience targets for some of the samples so they can be built
# with Chromium's toolchain.
executable("angle_shader_translator") {
testonly = true
sources = [
"samples/shader_translator/shader_translator.cpp"
]
deps = [
":translator"
]
}
......@@ -125,9 +125,14 @@ int main(int argc, char *argv[])
{
spec = SH_WEBGL2_SPEC;
}
else if (argv[0][4] == 'n')
{
spec = SH_WEBGL_SPEC;
}
else
{
spec = SH_WEBGL_SPEC;
resources.FragmentPrecisionHigh = 1;
}
break;
default:
......@@ -332,10 +337,11 @@ void usage()
" -u : print active attribs, uniforms, varyings and program outputs\n"
" -p : use precision emulation\n"
" -s=e2 : use GLES2 spec (this is by default)\n"
" -s=e3 : use GLES3 spec (in development)\n"
" -s=e3 : use GLES3 spec\n"
" -s=e31 : use GLES31 spec (in development)\n"
" -s=w : use WebGL spec\n"
" -s=w2 : use WebGL 2 spec (in development)\n"
" -s=w : use WebGL 1.0 spec\n"
" -s=wn : use WebGL 1.0 spec with no highp support in fragment shaders\n"
" -s=w2 : use WebGL 2.0 spec\n"
" -b=e : output GLSL ES code (this is by default)\n"
" -b=g : output GLSL code (compatibility profile)\n"
" -b=g[NUM]: output GLSL code (NUM can be 130, 140, 150, 330, 400, 410, 420, 430, "
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment