Skip to content

Releases: IrisShaders/glsl-transformer

v2.0.0-pre6 - getPrefixIdentifierIndex and license clarification

28 Dec 14:24
0d2f79b
Compare
Choose a tag to compare
  • Added getPrefixIdentifierIndex that returns a cast prefix identifier for convenience
  • Clarified the license's wording

Full Changelog: v2.0.0-pre5...v2.0.0-pre6

v2.0.0-pre5 - Removed CST-Based Transformation, GPL Licensing, Documentation, Refactoring, Bug Fixes

26 Dec 18:05
a7e656e
Compare
Choose a tag to compare

This is a big update! 🎉

Meta

  • Relicensed to GPLv3 with exception (See license files and the section below)
  • Updated to Gradle 7.6, fixing some IDE problems
  • Added more explicit attribution to the vendored Apache Commons code
  • Excluded vendored code from javadoc

Code Changes

  • Added some transformation examples to the documentation, there's still a lot unfinished though
  • Removed all CST-based transformation and corresponding documentation files
  • Removed ExtendedContext
  • Simplified many of the related classes like removing LifecycleUser
  • Kept the token filters but changed how they receive job parameters to not require connection to an execution planner
  • Instead of the various job parameter subclasses, there is simply an EMPTY job parameter that can be used if there is no job parameter data.
  • Moved classes around in their packages now that many of them have been removed
  • Removed unnecessary documentation and reworked the readme
  • Added getUnique to the indexes. It's like getOne but throws if there is no element or more than one.
  • Renamed wrongly named uivec... lexer tokens, this also resolved a number of errors in the snapshot tests
  • Changed how LiteralExpression handles large values. Known issue: The smallest 64 bit number can't be properly parsed
  • Improved printing of negation expressions
  • Fixed printing of negative literal expressions
  • Added reprint test cases for number formatting
  • Added option to change the caching strategy of the parse cache (separate from the AST tree cache). This caches the CST parse result. Known issue: The cache doesn't take the settings of the lexer into account in the cache key. It's assumed that they aren't changed around usually.
  • Changed many CST-based tests to use the AST-based transformation code or use a bare parse tree visitor if necessary
  • Added a layout attachment transformation test. This is a rather in depth-prototype demonstrating how a layout(location = x) can be attached to declarations including splitting multi-member declarations.

The following section has been added to the README and is reproduced here for announcement purposes:

License

Licensed under GPLv3 with an exception allowing the creation of derivative works in combination with LGPL code or linking with Minecraft. This means you are only allowed to distribute derivative works, including but not limited to software that uses glsl-transformer through Mixin, uses its API without distributing a compiled version of glsl-transformer, or extends or uses it in some other way, if they are licensed with a compatible license (for example LGPL or GPL with exception). You are required to give attribution and provide the source code, which may be done by linking to this repository. See the license files for details.

Full Changelog: v2.0.0-pre4...v2.0.0-pre5

v2.0.0-pre4 - Value Format Metadata on Builtin Fixed Type Specifiers

01 Dec 21:16
eb685e1
Compare
Choose a tag to compare
  • Added ValueFormat on BuiltinFixedTypeSpecifier's type enum that adds metadata about if the values are signed, unsigned or floating point
  • Removed some lines from the longExpressionTest to prevent GH Actions from having a stack overflow on CI

Full Changelog: v2.0.0-pre3...v2.0.0-pre4

v2.0.0-pre3 - AST Building Fix, Transform and AST Snapshot Tests

29 Nov 18:44
6eb7754
Compare
Choose a tag to compare
  • Fix AST Building of layout qualifiers. Previously if there were multiple they would be parsed as a sequence expressions instead of a list of multiple. This has been fixed in the ASTBuilder but not the parser since it would likely incur a performance cost due to making the parsing of layout qualifiers context-sensitive.
  • Fixed ASTListenerVisitor going into infinite recursion if enterContext isn't implemented
  • Changed JobParameters to an interface (the subclasses stay the same)
  • Renamed CSTTransformerTestTree and related files to CSTTransformerTreeTest for consistency
  • Added a snapshot test that ensures the structure of the AST is correct. This differs from reprint tests since they may miss situations where the AST is wrong but the output is correct.
  • Added a reprint (and thereby a AST snapshot test case) for layout qualifiers with multiple parts
  • Added transformation tests testLayoutBindingSearch and testLayoutBindingSearch2 that demonstrate AST traversal and analysis. They also fail if the AST doesn't correctly represent layout qualifiers with multiple parts.

Full Changelog: v2.0.0-pre2...v2.0.0-pre3

v2.0.0-pre2 - Better Custom Indexes, New Include Syntax and Documentation Update

22 Nov 16:46
ff3f8cc
Compare
Choose a tag to compare
  • Added an alternative #include <string> syntax for include directives
  • Added the ability to specify how the Root constructs new instances by default
  • Improved typing on IdentifierIndex and NodeIndex to make using these indexes easier
  • Split the prefix query-related code in IdentifierIndex into its own class
  • Updated the types of many other query-related classes. This makes the definition of custom set types easier

Meta:

  • Updated the documentation and added some explanatory text. More examples are planned

Full Changelog: v2.0.0-pre1...v2.0.0-pre2

v2.0.0-pre1 - Custom and Include Directive

11 Nov 22:54
144952c
Compare
Choose a tag to compare
  • Added the #custom directive that contains any string after a single space following the keyword
  • Added the #include "<string>" directive that contains any string enclosed in the double quotes
  • Added enableCustomDirective and enableIncludeDirective lexer flags. These must be enabled for the new directives to be parsed at all. They will be syntax errors otherwise.
  • Renamed a bunch of directive-related lexer tokens to be more consistent

Full Changelog: v1.0.1...v2.0.0-pre1

v1.0.1 - Fix for parsing .length when not in a method call

12 Oct 16:09
4e5ec05
Compare
Choose a tag to compare
  • Fixed parsing of .length member access by special-casing the method call .length() case

Full Changelog: v1.0.0...v1.0.1

v1.0.0 - Full Release

09 Oct 21:43
c97dbbb
Compare
Choose a tag to compare

Changes since last pre-release: Normalized Profile and Output Options

  • Added getNormalizedProfile to VersionStatement that allows determining if the file will be compiled using core profile or not if the profile is missing depending on the specified version number
  • Added isCore and isCompatibility to the Profile enum
  • Added printing output options that can be used to add a custom header to the generated output string

Changelog: v1.0.0-pre21.2...v1.0.0

Full Release

This is the first full release of glsl-transformer. This project has been the main focus of the last year of programming projects and so far I've reached the majority of the goals I initially set for this project with some remaining items coming in a future release. It's been a great learning experience and touches on many interesting topics I've always wanted to explore in more depth. Thank you to @Burgerguy, @IMS212, @Kroppeb, Builderb0y, @coderbot16, cortex and many others in Iriscord for the feedback, support, and productive conversations. While this project was initiated for Iris, it has already been used by other projects for various purposes related to GLSL in Java. I hope many more people will find just as much joy using glsl-transformer as I had fun writing it so far.

Plans

The following items are currently planned:

  • Line annotation to restore the original line numbers in the output using #line directives.
  • Comprehensive documentation about how to use glsl-transformer and how it works
  • More tests

v1.0.0-pre21.2 - Fix Traversal of Empty Return Statements

02 Oct 17:09
dad95d1
Compare
Choose a tag to compare

The visitor was visiting the null expression in empty return statements which throws a NPR if a method is called on the visited node like in recursive unregistering or root changing. This has been fixed in the visitor and a test has been added.

Full Changelog: v1.0.0-pre21.1...v1.0.0-pre21.2

v1.0.0-pre21.1 - Hotfix For Broken Build

02 Oct 17:05
823ad4d
Compare
Choose a tag to compare

The lexer tokens were not correctly updated in the previous build. This is fixed now.

Full Changelog: v1.0.0-pre21...v1.0.0-pre21.1