summaryrefslogtreecommitdiffstats
path: root/tools/gfx
Commit message (Collapse)AuthorAge
...
* add support for callable shaders in gfx (#3460)skallweitNV2024-05-27
| | | | Co-authored-by: Jay Kwak <82421531+jkwak-work@users.noreply.github.com> Co-authored-by: Yong He <yonghe@outlook.com>
* [gfx] metal backend skeleton (#4223)Simon Kallweit2024-05-27
| | | | | | | | | | | | | | | | | | | | * add metal-cpp submodule * add metal-cpp cmake target * gfx metal backend skeleton * add premake support * add foundation framework * add metal-cpp include to premake * update vs project file --------- Co-authored-by: Simon Kallweit <skallweit@nvidia.com> Co-authored-by: Jay Kwak <82421531+jkwak-work@users.noreply.github.com>
* Fix all Clang-14 warnings (#4203)ArielG-NV2024-05-22
| | | | | * fix all Clang-14 warnings * remove a clang-14 warning fix because it is a MSVC warning...
* [gfx] specify resource view buffer range in bytes (#4149)skallweitNV2024-05-13
| | | | | | | | | | | | | * refactor gfx buffer range to use byte range * create buffer view with zero struct stride for ClearUnorderedAccessViewUint/Float * create buffer descriptors on demand * avoid copying gfx.dll --------- Co-authored-by: Yong He <yonghe@outlook.com>
* add missing Result to IRayTracingCommandEncoder::bindPipline (#4148)skallweitNV2024-05-11
|
* [gfx] Cache mutable root shader object in Vulkan (#4119)skallweitNV2024-05-08
| | | | | | | | | | | * fix comment * add caching of mutable root shader objects in vulkan * Fix. --------- Co-authored-by: Yong He <yonghe@outlook.com>
* Add variable pointers to render-test-vk and a related failing test-case (#4041)ArielG-NV2024-04-28
| | | * add variable pointers to render-test-vk and failing (but ignored with workarounds) test-case
* create empty vulkan framebuffer with max dimensions (#3996)skallweitNV2024-04-22
| | | Co-authored-by: Yong He <yonghe@outlook.com>
* [GFX] Fix d3d12 buffer view creation logic for StructuredBuffers. (#3954)Yong He2024-04-15
|
* fix vulkan shared fence (#3911)skallweitNV2024-04-10
| | | Co-authored-by: Yong He <yonghe@outlook.com>
* gfx vulkan fixes (#3897)skallweitNV2024-04-05
|
* Implement GLSL gimageDim & memory qualifiers with optional extension(s); ↵ArielG-NV2024-03-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | resolves #3587 for GLSL & SPIR-V targets #3631 (#3810) * [early push of code since memory qualifiers may be made into a seperate branch & pr and I rather make it simple to split the implementation if required] all type & functions impl. for GLSL image type added all memory qualifiers & tests for direct read/write [GLSL syntax] (DID NOT test or implement parameter qualifiers, that is next commit) * this inlcudes emit-glsl & emit-spirv for qualifier decorations * this also includes error handling * this includes parsing * full implementation other than Rect; all errors and basic tests are done & working what is left: 1. need to now add Rect type support (additional TextureImpl flag) 2. tests 3. testing infrastructure to support variety of types * testing framework now works with images of all types and imageBuffers -- next steps are actual tests * push code for mostly working image atomics; missing int64/uint64 tests and slightly broken feature likley due to missing code from master which I pushed for regular atomics * fix all remaining shader image atomic issues and tests to work with float & i64/u64 fully will now clean up code and squash the commits (since they are quite all over the place) * refactor code to work & look correct, fix all regressions Turned off tests for texture format R64 due to the shader use limitation of currently being only for storage buffers on most hardware (test fail cause, this is not allowed) Changed raygen.slang & nv-ray-tracing-motion-blur.slang since both cross-compiled with glslang, which does not respect layout(rgba8) for RWBuffer's, in this scenario making the type into a SPIR-V rgba32f, which is incorrect and a known problem, this causes different code to be outputted from Slang & HLSL+GLSL->Slang paths Clean up all code and better explain the "why" for the gimageDim definition we use various strings of Slang code, the gist is: 1. Parameters are structured as per IMAGE_PARAM keyword in spec, and we respect this in order to match specification (to allow easy code iteration) 2. sample parameters are required for functions 3. types are inconsistently named fixed regression of breaking l-value lowering when r-value should be lowered (lower-to-ir) fix compiler warnings remove unneeded lambdas `expr->type.isLeftValue = isMutableGLSLBufferBlockVarExpr(baseExpr) && (expr->type.hasReadOnlyOnTarget == false);` is an adjustment made such that a buffer block is mutable only if the block is mutable and the base expression is mutable (to handle case of readonly buffer block, immutable) * remove rectangle parameter * use proper const syntax and struct naming * adjust syntax * adjust modifier capabilitites: HLSL+GLSL --> GLSL. Notice most specifically, if the parent is a global struct we can put a memory qualifier, this does not include, struct inside a struct, with a member variable with a memory qualifier (since then you could use the struct in invalid ways). Added test for struct inside struct with member variable with memory qualifier. adjust syntax and remove code which will rot * adjust formatting for consistency * addressing review feedback addressing review feedback: change testing code to handle int and float/half correctly in all cases adjust testing code syntax as requested change vkdevice code to fit a different form as requested * adjust code as per requested for review: 1. adjusted testing code logic to handle non 0-1 values appropriately, notice int8_t will likley be the range and set order of {[0,127],[-1,-128]}, this is intentional 2. syntax adjustments for correctness * trying to fix falcor regressions * add back removed code for regression testing * test removing changes which may break falcor * Revert "test removing changes which may break falcor" This reverts commit 240da97f06c23e98a26ac23cf1d385995c67b251. * disable R64 support in attempt to fix falcor tests * Revert "disable R64 support in attempt to fix falcor tests" This reverts commit 317cb632eb2f47e980fc4aeafe418f8060f4c473. * disable major device changes (still trying to figure out falcor fails -- locally working different than CI) * test removing d3d changes * remove all format changes * add back removed code for regression testing * try something to get code to work with falcor * address review * Add way to handle constref/ref/encapsulated texture objects with memory qualifiers as a parameter. Fixed an issue (and improved codegen) for when we have a store(dst,load(src)) pattern, where dst is supposed to be equal to src for when resolving globalParam's (no need for work-arounds anymore) * move recent-fix/change to textureType loading into a proper optimization pass which now runs after SPIR-V legalization to catch odd SPIR-V emitting after legalizing types for SPIR-V * Revert most recent optimization pass change, add work around getting a unmangled global parameter address through a intrinsic op instead of spir-v intrinsic (works same as `__imagePointer()`) * remove unneeded changes * remove unneeded `__constref` in glsl.meta * move memory qualifier checks to visitInvoke of check-expr.cpp move GetLegalizedSPIRVGlobalParamAddr resolving to spirv-legalization pass move error for "if using non texture type with memory qualifer in param" earlier such that we error with this first. No point in telling user "you are not putting correct memory qualifiers" when memory qualifiers should not have been used. * add memory qualifier folding modifier 'MemoryQualifierCollectionModifier' to reduce searching and processing (later will be adapted to whole system) as suggested/asked. The utility is a method to track memory qualifiers without doing a expensive linked-list traversal (image's have 4 modifiers normally). * properly pass multiple qualifiers from checkModifier down to the `modifier`s list * addressing review comments: * change implementation to properly handle restrict modifier * add comments about implementation for clarity
* [gfx] compile shaders when creating programs for d3d12/vulkan (#3774)skallweitNV2024-03-16
|
* [gfx] use CUDA driver API (#3776)skallweitNV2024-03-15
|
* Implement glsl atomic's [non image or memory scope] with optional ↵ArielG-NV2024-03-13
| | | | | | | | | | | | | | extension(s); resolves #3587 for GLSL & SPIR-V targets (#3755) The following commit implements atomic operations & types associated with OpenGL 4.6, GL_EXT_vulkan_glsl_relaxed, GLSL_EXT_shader_atomic_float, GLSL_EXT_shader_atomic_float2, for GLSL & SPIR-V targets. Fully implements all functions, and built-in type's, resolves https://github.com/shader-slang/slang/issues/3560 for GLSL & SPRI-V targets. [Atomic extensions for GLSL can be found here](https://github.com/KhronosGroup/GLSL/tree/main) Notes of worth: * atomic_uint is well defined in GLSL->OpenGL, although was removed in GLSL->VK unless a compiler extension is supported (GL_EXT_vulkan_glsl_relaxed). This support entails transforming all atomic_uint operations and references into a storage buffer. SPIR-V has AtomicCounter+AtomicStorage (atomic_uint parallel) but does not implement these capabilities for SPIR-V->VK in any scenario. Due to the case we transform atomic_uint ourselves (GLSL_Syntax->Slang_IR) to accommodate transforming atomic_uint into valid syntax. * GLSL_EXT_shader_atomic_float2 (all float16_t & some float/double operations) support is minimal and worth watching out for if enabling the tests.
* gfx: return error when vulkan fails to create buffer/pipeline (#3741)skallweitNV2024-03-12
| | | | | | | | | * return buffer creation errors in vulkan * return pipeline creation errors in vulkan --------- Co-authored-by: Yong He <yonghe@outlook.com>
* set VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT for device local memory (#3698)skallweitNV2024-03-07
|
* [SPIRV] Add NonSemanticDebugInfo for step-through debugging. (#3644)Yong He2024-02-28
| | | | | | | * [SPIRV] Add NonSemanticDebugInfo for step-through debugging. * Fix. * Fix.
* add support for shared resources on vulkan/linux (#3636)skallweitNV2024-02-27
|
* switch to vkCreateMetalSurfaceEXT and create metal layer in swapchain (#3627)Simon Kallweit2024-02-26
| | | | | | | | | * switch to vkCreateMetalSurfaceEXT and create metal layer in swapchain * fix window content size on macos --------- Co-authored-by: Yong He <yonghe@outlook.com>
* derive approximate DX12 shader model in vulkan (#3596)skallweitNV2024-02-20
| | | Co-authored-by: Yong He <yonghe@outlook.com>
* Refactor compiler option representations. (#3598)Yong He2024-02-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Refactor compiler option representation. * Fix binary compatibility. * Add a test for specifying compiler options at link time. * Fix binary compatibility. * Fix binary compatibility. * Fix backward compatibility on matrix layout. * Fix. * Fix. * Fix. * Fix gfx. * Fix gfx. * Fix dynamic dispatch. * Polish.
* gfx:Add callback to IPipelineCreationAPIDispatcher (#3556)kaizhangNV2024-02-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | * gfx:Add callback to IPipelineCreationAPIDispatcher Add the callback to IPipelineCreationAPIDispatcher in Vulkan backend in slang-gfx lib. * gfx:add uuid for vulkan pipeline dispatcher Add a define of SLANG_UUID_IVulkanPipelineCreationAPIDispatcher for Vulkan specific IPipelineCreationAPIDispatcher such that libgfx.so can have special handle to Vulkan pipeline dispatcher without break binary compatibility. In the RendererBase::initialize call, we will provide this new UUID when the DeviceType is Vulkan. * gfx: add new variable to GfxGUID Add new variable to GfxGUID IID_IVulkanPipelineCreationAPIDispatcher with initialization of SLANG_UUID_IVulkanPipelineCreationAPIDispatcher to make the implementation aligned with existing GfxGUID::IID_IPipelineCreationAPIDispatcher. --------- Co-authored-by: Yong He <yonghe@outlook.com>
* Atomics+Wave ops intrinsics fixes. (#3542)Yong He2024-02-02
| | | | | | | | | | | | | | | * Fix atomics intrinsics, increase kMaxDescriptorSets. * Add SPIRVASM to known non-differentiable insts. * Support fp16 wave ops when targeting glsl. * Fixes. * Fix vk validation errors. * Fix. * Add to allowed failures.
* adding required extensions to gfx to enable basic vulkan printf ↵Nathan V. Morrical2024-02-02
| | | | functionality (#3541)
* macos/vulkan support (#3418)skallweitNV2023-12-18
|
* Support visibility control and default to `internal`. (#3380)Yong He2023-12-06
| | | | | | | | | | | | | | | | | | | * Support visibility control and default to `internal`. * Fix wip. * Fixes. * Fix. * Fix test. * Add legacy language detection and compatibility for existing code. * Add doc. --------- Co-authored-by: Yong He <yhe@nvidia.com>
* squash warnings (#3378)Ellie Hermaszewska2023-12-05
| | | Co-authored-by: Yong He <yonghe@outlook.com>
* warnings (#3335)Ellie Hermaszewska2023-11-17
| | | | | | | | | | | * ignores * Remove unused variables * Squash out of bounds warning --------- Co-authored-by: Yong He <yonghe@outlook.com>
* Parameter binding and gfx fixes. (#3302)Yong He2023-11-01
| | | | | | | | | | | * Parameter binding and gfx fixes. * Add diagnostics on entry point parameters. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com>
* Fix warnings for gcc 12.3 (#3286)Ellie Hermaszewska2023-10-25
| | | | | | | | | | | | | | | | | | | * Silence a few gcc out of bounds warnings * Search upwards from executable for prelude directory instead of assuming depth * comment wording * Check return values of read and write * Correct path to vulkan headers in gfx * Correct diagnostic on missing file in slang-embed * Do not use absolute path to libraries in test-context.cpp --------- Co-authored-by: Yong He <yonghe@outlook.com>
* Use GLSL Scalar layout for vulkan device. (#3285)Yong He2023-10-25
| | | Co-authored-by: Yong He <yhe@nvidia.com>
* Add a tool to dump/replay compute pipeline creation from gfx. (#3275)Yong He2023-10-19
| | | | | | | | | * Add a tool to dump/replay compute pipeline creation from gfx. * Fix x86 build. --------- Co-authored-by: Yong He <yhe@nvidia.com>
* Type layouts for structured buffers with counters (#3269)Ellie Hermaszewska2023-10-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * More tests for append structured buffer * Append and Consume structured buffer tests for DX12 * neaten * test wobble * Add counter layout information to append/consume structured buffers * add getRWStructuredBufferType * Correct definition of get size for append/consume structured buffers * tweak append structured buffer test * Allow initializing counter buffer in render test * vulkan test for consume structured buffer * Handle null counterVarLayout in getExplicitCounterBindingRangeOffset * remove dead code * Implement atomic counter increment/decrement for spirv * explicit spirv test * Add missing check on result * Hold on to counter resources --------- Co-authored-by: Yong He <yonghe@outlook.com>
* Run curated spirv-opt passes through slang-glslang. (#3266)Yong He2023-10-09
| | | | | | | | | | | | | * Run curated spirv-opt passes through slang-glslang. * Cleanup. * Replace spirv-dis downstream compiler with glslang. * delete slang-spirv-opt.cpp. --------- Co-authored-by: Yong He <yhe@nvidia.com>
* Check for extension support before enabling a feature (#3262)Ellie Hermaszewska2023-10-05
| | | Co-authored-by: Yong He <yonghe@outlook.com>
* More direct-SPIRV fixes. (#3257)Yong He2023-10-02
| | | | | | | | | * More direct-SPIRV fixes. * Fix array-reg-to-mem. --------- Co-authored-by: Yong He <yhe@nvidia.com>
* Add SPIRV intrinsics for ShaderExecutionReordering and RW/Buffer. (#3252)Yong He2023-10-02
| | | | | | | | | | | | | | | | | * Add SPIRV intrinsics for ShaderExecutionReordering. * Add intrinsics for `Buffer` and `RWBuffer`. * Various spirv fixes. * Marshal bool vector type. * Inline global constants + OpFOrdNotEqual->OpFUnordNotEqual. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com>
* Use direct spirv in hello-world example. (#3207)Yong He2023-09-18
| | | | | | | | | | | | | | | * Use direct spirv in hello-world example. * Use vulkan 1.1 * Use vulkan 1.2. * fix. * Fix test. --------- Co-authored-by: Yong He <yhe@nvidia.com>
* Fix build with --enable-xlib=false (#3203)Ellie Hermaszewska2023-09-13
| | | | | | | | | * Fix build with --enable-xlib=false * Correct brace location --------- Co-authored-by: Yong He <yonghe@outlook.com>
* Add gfx d3d12 TextureCube UAV case (#3205)SirKero2023-09-13
| | | Co-authored-by: Yong He <yonghe@outlook.com>
* Add Mesh and Task shader support to GFX (#3190)Ellie Hermaszewska2023-09-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Bump vulkan headers Also just use vulkan-headers as a submodule * Add drawMeshTasks to gfx graphics pipelines * Add DispatchMesh overload with no payload, with GLSL intrinsic * Require spirv 1.4 for mesh shaders * Add vulkan mesh shader feature discovery * Add mesh shader stage bits to vk-util * Add mesh and task shader support to render-test * Add mesh and task tests * Preserve "payload" specifier in task shaders * Add mesh shader pipeline support to gfx * Add TODO * Add numThreads attribute for amplification stage * Add payload to task shader test * Drop dependency on d3dx12 * Allow passing payloads from task to mesh shaders * regenerate vs projects * check DispatchMesh name correctly * Add mesh shader tests to failing tests * Detect wave-ops feature on vulkan * Add fuse-product to expected failures This fails because the global varaible `count` is not initialized * Add required extension to WaveMaskMatch SPIR-V impl * Remove meshShader member from pipeline desc * Identify mesh shader support on d3d12
* Fix HLSL SER Intrinsics. (#3183)Yong He2023-09-05
| | | | | | | | | * Fix HLSL SER Intrinsics. * Fix GFX Vulkan shader creation bug. --------- Co-authored-by: Yong He <yhe@nvidia.com>
* Add support for getting external semaphore handles (#3181)skallweitNV2023-09-06
| | | | | | | | | | | | | * Add support for getting external semaphore handles * Fixes * Linux fix * Address reviewer comments --------- Co-authored-by: Yong He <yonghe@outlook.com>
* Remove redundant define form synchapi emulation (#3169)Ellie Hermaszewska2023-08-31
|
* Bail out of infinite timeouts in our posix synchapi emulation (#3129)Ellie Hermaszewska2023-08-18
| | | This can happen if vkd3d-proton triggered a VK_DEVICE_LOST
* Use ankerl/unordered_dense as a hashmap implementation (#3036)Ellie Hermaszewska2023-08-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Correct namespace for getClockFrequency * missing const * Add missing assignment operator * Remove unused variables * Return correct modified variable * Use stable hash code for file system identity * terse static_assert * Structured binding for map iteration * Make (==) and getHashCode const on many structs * Add ConstIterator for LinkedList * Replace uses of ItemProxy::getValue with Dictionary::at * Extract list of loads from gradientsMap before updating it * Const correctness in type layout * Add unordered_dense hashmap submodule * Use wyhash or getHashCode in slang-hash.h * refactor slang-hash.h * Use ankerl/unordered_dense as a hashmap implementation Notable changes: - The subscript operator returns a reference directly to the value, rather than a lazy ItemProxy (pair of dict pointer and key) slang-profile time (95% over 10 runs): - Before: 6.3913906 (±0.0746) - After: 5.9276123 (±0.0964) * 64 bit hash for strings So they have the same hash as char buffers with the same contents * Narrowing warnings for gcc to match msvc * revert back to c++17 * Correct c++ version for msvc * Use path to unordered_dense which keeps tests happy * Do not assign to and read from map in same expression * Remove redundant map operations in primal-hoist * Split out stable hash functions into slang-stable-hash.h * 64 bit hash by default * regenerate vs projects * Correct return type from HashSetBase::getCount() * correct width for call to Dictionary::reserve * Use stable hash for obfuscated module ids * Signed int for reserve * clearer variable naming * Parameterize Dictionary on hash and equality functors * Allow heterogenous lookup for Dictionary * missing const * Use set over operator[] in some places * Remove unused function * s/at/getValue
* SPIR-V WIP (#3064)Ellie Hermaszewska2023-08-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add type layout for structured buffer * Default to generating spirv directly * vk test for compute simple * Add spirv-dis as a downstream compiler * Emit Array types in SPIR-V * makevector for spirv * Dump whole spirv module on validation failure * register array types todo, use emitTypeInst * Neater formatting for unhandled inst printing * break out emitCompositeConstruct * Correct array type generation * neaten * Allow getElement for vector * Remove unused * Allow predicating target intrinsics on types * Consider functions with intrinsics to have definitions We need to specialize these if they are predicated on types * Correct array type generation * makeArray for spir-v * replace getElement with getElementPtr for spirv * Correct translation of field access for spirv * Push layouts to types for spirv * Spirv intrinsics * operator now makes a pointer * Add structured buffer of struct test * Preserve type layout in spirv structured buffer legalization * neaten * makeVectorFromScalar for SPIRV * placeholder for layouts on param groups * More type safe spirv op construction * Know that constants and types only go in one section * Remove emitTypeInst * Add todo for spirv sampling * Add links to spirv documentation on emit functions * OpTypeImage support for SPIR-V * Add simpler texture test for spirv * s/spirv_direct/spirv/g * Allow several string literals in target_intrinsic * Handle global params without a var layour for SPIR-V For example groupshared vars * uint spirv asm type * Add todo for isDefinition It is currently too broad * Some atomic op spirv intrinsics * Strip ConstantBuffer wrappers for spirv * Add todo for matrix annotations * Do not associate decorations insts with spirv counterparts * Correct entry point parameter generation * Spelling * Assert that fieldAddress is returning a pointer * Add error for existential type layout getting to spir-v emit * Add IRTupleTypeLayout Unused so far * Allow getElementPtr to work with vectors * Correct target name in test * Hide default spirv direct behind a premake option --default-spirv-direct=true * Do not insert space at start of intrinsic def * Correct asm rendering in tests * remove redundant option * Emit directly from direct test * Add source language options for spirv-dis * Add comments to spirv dis * Add dead debug print for before spirv module * Correct asm rendering in tests * s/spirv_direct/spirv/g * Only specialize intrinsic functions with predicates * regenerate vs projects * squash warnings * squash warnings * remove duplication * Silence warnings from msvc * squash warnings * Overload for zero sized array * More msvc warnings * warnings * Add spirv-tools to path for tests * Do not be specific about dxc version for diag test * Normalize line endings from spirv-dis * Correct filecheck matches * Temporarily disable two spirv tests Failing on CI, undebuggable hang :/ * Do not emit storage class more than once for spirv snippet * Do not pass spir-v to spirv-dis by stdin * Do not get spirv-dis output via stream, use file * normalize file endings in spirv-dis output
* Added D3D12 RenderTargetView TextureCube case (#3048)SirKero2023-08-04
| | | | | | | | | * Added D3D12 RenderTargetView TextureCube case * Added D3D12 DepthStencilView TextureCube case --------- Co-authored-by: jsmall-nvidia <jsmall@nvidia.com>
* nsight Aftermath crash example (#2984)jsmall-nvidia2023-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Small fixes and improvements around reflection tool. * Make PrettyWriter printing a class. * Aftermath crash demo WIP. * Enable aftermath in test project. * Setting failCount. * Dumping out of source maps. * Improve comments. Simplify handling of compile products. * Other small fixes to aftermath example. * Added Emit SourceLocType. Track sourcemap association meaning. Improved documentation. * Small improvements. * Capture debug information for D3D11/D3D12/Vulkan. * Enable debug info. * Small improvements. * Improve aftermath example README.md.