Implement GLSL writer backend.

This is a modified version of the HLSL writer.
Basic types, arrays, entry points, reserved keywords, uniforms,
builtin uniforms, structs, some builtin functions, zero initialization
are implemented. Textures, SSBOs and storage textures in particular are
unimplemented. All the unit tests "pass", but the output is not correct
in many cases.

triangle.wgsl outputs correct vertex and fragment shaders that pass
GLSL validation via glslang. compute_boids.wgsl outputs a valid but not
correct compute shader.

Change-Id: I96c7aaf60cf2d4237e45d732e5f51b345aea0552
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/57780
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
This commit is contained in:
Stephen White
2021-10-06 18:55:10 +00:00
committed by Tint LUCI CQ
parent 08146e2300
commit a9f8c7db81
46 changed files with 10570 additions and 0 deletions

View File

@@ -59,4 +59,9 @@
#include "src/writer/hlsl/generator.h"
#endif // TINT_BUILD_HLSL_WRITER
#if TINT_BUILD_GLSL_WRITER
#include "src/transform/glsl.h"
#include "src/writer/glsl/generator.h"
#endif // TINT_BUILD_GLSL_WRITER
#endif // INCLUDE_TINT_TINT_H_