gfxreconstruct
gfxreconstruct copied to clipboard
Convert Option --include-binaries=[inline|files|drop] (default=drop)
Resources like shader binaries clutter the JSON and are not human parsable. Storing them into files solves that but wastes space and time for many uses who don't need them at all for their current task and doesn't work for transmitting the complete stream over a pipe/connection or having an all-in-one JSON file.
Currently, for some resources on some platforms --include-binaries
lets us either store binaries in files or drop them and put a short placeholder text string in their place in the JSON. Other resources do not obey the flag. APIs are not consistent in obeying the flag.
To rationalise this we could support three options across all APIs and block types:
- Store binaries in extra files (
--include-binaries=files
).- (-) Breaks the streaming model.
- (-) Requires lots of space on disk.
- (-) Takes time to store them.
- (-) Makes no sense when streaming a capture over a network (future feature) or a pipe for storage on a different device or for immediate consumption.
- Represent binaries inline as text in JSON stream (
--include-binaries=inline
).- This could be via arrays or as encoded strings, for example the one used by data URIs in rfc2397.
- Omit binaries and replace with a short placeholder string in JSON (
--include-binaries=drop
).