summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-options.cpp
diff options
context:
space:
mode:
authorTheresa Foley <10618364+tangent-vector@users.noreply.github.com>2025-04-16 12:28:39 -0700
committerGitHub <noreply@github.com>2025-04-16 12:28:39 -0700
commit2b20e9e150225f8cb75f7be2061f5ec99cbb2f66 (patch)
tree1ff5065b73021176f9a0dcb10273c2f372feac28 /source/slang/slang-options.cpp
parent786f456c2558f07c5a396e25ecb635a3c5480313 (diff)
Remove support for ad hoc Slang IR compression (#6834)
* Remove support for ad hoc Slang IR compression This change is part of a larger effort to clean up the approach to serialization in the Slang compiler. The overall goal is to simplify and streamline all of the serialization-related logic, so that we are left with code that is less "clever," and easier to understand for contributors to the codebase. Removing support for compression of serialized Slang IR has benefits that include: * Reduction in code complexity: consider things like the subtle way that the `FOURCC`s for compressed chunks were being computed from the uncompressed versions, and the mental overhead that goes into understanding that, for anybody who would dare to touch this code. * Reduction in testing burden: there have been, de facto, two very different code paths for serialization of the Slang IR, and it is not clear that the existing test corpus for Slang has sufficient coverage for both options. By having only a single code path, every test that performs any amount of IR serialization helps with test coverage of that one path. * Opportunity to explore alternatives. This is perhaps a reiteration of the first point, but once the code is stripped down to the simplest thing that could possibly work (I am not claiming it has reached that point yet), it becomes easier for contributors to understand, and it becomes more tractable for somebody to come along with an improved approach that performs better (in either compression ratio or performance) while still being maintainable. In my own local setup, I found that removing support for Slang IR compression led to the `slang-core-module-generated.h` file increasing in size from 46.1MB to 47.4MB. This increase in the `.h` file size for the core library binary only resulted in a release build of `slang.dll` increasing from 20.0MB to 20.2MB. Removing the ad hoc compression support has almost no impact on the size of actual binary Slang modules *so long* as the additional LZ4 compression step is being applied to them. * format code --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
Diffstat (limited to 'source/slang/slang-options.cpp')
-rw-r--r--source/slang/slang-options.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/source/slang/slang-options.cpp b/source/slang/slang-options.cpp
index ed7775e84..b09e36a1b 100644
--- a/source/slang/slang-options.cpp
+++ b/source/slang/slang-options.cpp
@@ -2424,11 +2424,7 @@ SlangResult OptionsParser::_parse(int argc, char const* const* argv)
{
CommandLineArg name;
SLANG_RETURN_ON_FAIL(m_reader.expectArg(name));
- SerialCompressionType compressionType;
- SLANG_RETURN_ON_FAIL(SerialParseUtil::parseCompressionType(
- name.value.getUnownedSlice(),
- compressionType));
- linkage->m_optionSet.set(optionKind, compressionType);
+ // TODO: doagnose deprecated option
break;
}
case OptionKind::EmbedDownstreamIR: