-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate a .kkp source map #361
Comments
This is effectively #334 with a different format. |
WIP hack here: https://github.com/therontarigo/Shader_Minifier/blob/kkpsourcemap/src/printer.fs Parsing emitted The following applies also to #334 : Ultimately all emitted tokens should provide line info, even when it must be contrived, for example: float varA = expr1;
float varB = expr2; Output float // assign it line 1, even though both source lines declare floats
a=expr1 // all tokens trivially line 1 (unless something is inlined here)
, // it did not exist in source, but it can be line 1 (all declarations end in "," or ";")
b=expr2 // all tokens trivially line 2 (unless something is inlined here)
; // assign it line 2, even though both source lines were declarations
Also, it would be wise to keep in mind the future possibility of file numbers in addition to line numbers, in case of multiple source files, for example if the input uses |
The kkpView tool shows a report of executable compression, organized by symbols such as C++ functions or string constants (such as shaders).
kkpView also displays source file+line information per-byte when included in the KKP file.
8f68b48 added support for exporting SYM files breaking a shader symbol down to sub-sections such as functions.
Since a2511dc , the minifier records source line information, used by the JS web interface.
If a KKP file is generated, the same information may be provided to kkpView as well.
This introduces a new use of the KKP file format: instead of representing a real executable file, it is representing one or more symbols only - the contents of the "described binary" are exactly the bytes of the minified shader/shaders. This may be viewed as-is in kkpView or combined with a KKP representing a real executable using kkpmerge.
https://github.com/ConspiracyHu/kkpView-public
https://github.com/therontarigo/kkpmerge
The KKP format:
The text was updated successfully, but these errors were encountered: