shader: emit precise and invariant specifiers before interpolation specifier

The interpolation identifier must come after the precise and invariant
specifier. Also add a newline after these specifiers to make it easier
parsable.

Fixes  #128

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
macos/master
Gert Wollny 6 years ago
parent a9ca391a86
commit a573ba498b
  1. 12
      src/vrend_shader.c

@ -5852,10 +5852,10 @@ emit_ios_generic(struct dump_ctx *ctx, enum io_type iot, const char *prefix,
if (io->first == io->last) { if (io->first == io->last) {
emit_hdr(ctx, layout); emit_hdr(ctx, layout);
/* ugly leave spaces to patch interp in later */ /* ugly leave spaces to patch interp in later */
emit_hdrf(ctx, "%s%s%s %s %s %s%s;\n", emit_hdrf(ctx, "%s%s\n%s %s %s %s%s;\n",
prefix,
io->precise ? "precise" : "", io->precise ? "precise" : "",
io->invariant ? "invariant" : "", io->invariant ? "invariant" : "",
prefix,
inout, inout,
t, t,
io->glsl_name, io->glsl_name,
@ -5881,20 +5881,20 @@ emit_ios_generic(struct dump_ctx *ctx, enum io_type iot, const char *prefix,
emit_hdrf(ctx, "%s %s {\n", inout, blockname); emit_hdrf(ctx, "%s %s {\n", inout, blockname);
emit_hdr(ctx, layout); emit_hdr(ctx, layout);
emit_hdrf(ctx, "%s%s%s %s %s[%d]; \n} %s;\n", emit_hdrf(ctx, "%s%s\n%s %s %s[%d]; \n} %s;\n",
prefix,
io->precise ? "precise" : "", io->precise ? "precise" : "",
io->invariant ? "invariant" : "", io->invariant ? "invariant" : "",
prefix,
t, t,
io->glsl_name, io->glsl_name,
io->last - io->first +1, io->last - io->first +1,
blockvarame); blockvarame);
} else { } else {
emit_hdr(ctx, layout); emit_hdr(ctx, layout);
emit_hdrf(ctx, "%s%s%s %s %s %s%s[%d];\n", emit_hdrf(ctx, "%s%s\n%s %s %s %s%s[%d];\n",
prefix,
io->precise ? "precise" : "", io->precise ? "precise" : "",
io->invariant ? "invariant" : "", io->invariant ? "invariant" : "",
prefix,
inout, inout,
t, t,
io->glsl_name, io->glsl_name,

Loading…
Cancel
Save