diff --git a/README.md b/README.md index 6ca41e9..81c8b17 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # Sampler Feedback Streaming -This repository contains a demo of `DirectX12 Sampler Feedback Streaming`, a technique using [DirectX12 Sampler Feedback](https://microsoft.github.io/DirectX-Specs/d3d/SamplerFeedback.html) to guide loading of tiles of a reserved resource on-demand per-frame. This allows scenes containing 100s of GBs of resources to be drawn using much less physical memory. The scene below uses just ~200MB of a 1GB heap, despite over 350GB of total texture resources. +This repository contains a demo of `DirectX12 Sampler Feedback Streaming`, a technique using [DirectX12 Sampler Feedback](https://microsoft.github.io/DirectX-Specs/d3d/SamplerFeedback.html) to guide continuous loading and eviction of reserved resource tiles. This allows scenes containing 100s of gigabytes of resources to be drawn on GPUs containing much less physical memory. The scene below uses just ~200MB of a 1GB heap, despite over 350GB of total texture resources. -Sampler Feedback is supported in hardware on Intel Iris Xe Graphics, as can be found in 11th Generation Intel® Core™ processors. +Sampler Feedback is supported in hardware on Intel Iris Xe Graphics, as can be found in 11th Generation Intel® Core™ processors and discrete GPUs. This sample requires BETA driver [30.0.100.9667](https://downloadcenter.intel.com/product/80939/Graphics) ***or later***. -![Sample screenshot](sampler-feedback-streaming.jpg "Sample screenshot") +![Sample screenshot](./readme-images/sampler-feedback-streaming.jpg "Sample screenshot") Textures derived from [Hubble Images](https://www.nasa.gov/mission_pages/hubble/multimedia/index.html), see the [Hubble Copyright](https://hubblesite.org/copyright) ## License @@ -33,11 +33,11 @@ SOFTWARE. The demo requires at least Windows 10 version 19041 and a GPU with Sampler Feedback Support. -Intel Iris Xe Graphics, as can be found in 11th Generation Intel® Core™ processors, require ***at least*** BETA driver [30.0.100.9667](https://downloadcenter.intel.com/product/80939/Graphics) or later. +Intel Iris Xe Graphics, as can be found in 11th Generation Intel® Core™ processors and future discrete GPUs, requires BETA driver [30.0.100.9667](https://downloadcenter.intel.com/product/80939/Graphics) or later. Note this repository does not contain the textures shown above, which total over 13GB. A link to these textures will hopefully be provided soon. Test textures are provided, as is a mechanism to convert from BCx format DDS files into the custom .XET format. UPDATE: The first "release" package (labeled "1") contains a .zip with a few hi-res textures. -This repository will be updated When DirectStorage for Windows® becomes available. +This repository will be updated when DirectStorage for Windows® becomes available. ## Build Instructions @@ -47,13 +47,17 @@ Download the source. Build the solution file with Visual Studio 2019. All executables and .bat files will be found in the x64/Release or x64/Debug directories. -By default, the application starts looking at a single object, "terrain", which allows for exploring sampler feedback streaming. +To run within Visual Studio, change the working directory to $(TargetDir) under Properties/Debugging: + +![set working directory to $(TargetDir)](./readme-images/project-settings.png "set Working Directory to \$(TargetDir)") + +By default (no command line options) the application starts looking at a single object, "terrain", which allows for exploring sampler feedback streaming. In the top right find 2 windows: on the left is the raw GPU min mip feedback, on the right is the min mip map generated by the application. Across the bottom are the mips of the texture, with mip 0 in the bottom left. Left-click drag the terrain to see sampler feedback streaming in action. c:\SamplerFeedbackStreaming\x64\Release> expanse.exe ![default startup](./readme-images/default-startup.jpg "default startup") -There is a batch file, demo.bat, which starts up in a more interesting state: +The batch file `demo.bat` starts in a more interesting state. Note keyboard controls are inactive while `Camera` animation is non-zero. c:\SamplerFeedbackStreaming\x64\Release> demo.bat @@ -118,7 +122,7 @@ The demo exhibits texture cracks due to the way feedback is used. Feedback is al The following image shows an exaggerated version of the problem, created by disabling streaming completely then moving the camera: -![Streaming Cracks](streaming-cracks.jpg "Streaming Cracks") +![Streaming Cracks](./readme-images/streaming-cracks.jpg "Streaming Cracks") In this case, the hardware sampler is reaching across tile boundaries to perform anisotropic sampling, but encounters tiles that are not physically mapped. D3D12 Reserved Resource tiles that are not physically mapped return black to the sampler. I believe this could be mitigated by "eroding" the min mip map such that there is no more than 1 mip level difference between neighboring tiles. That visual optimization is TBD. diff --git a/readme-images/project-settings.png b/readme-images/project-settings.png new file mode 100644 index 0000000..da97918 Binary files /dev/null and b/readme-images/project-settings.png differ diff --git a/sampler-feedback-streaming.jpg b/readme-images/sampler-feedback-streaming.jpg similarity index 100% rename from sampler-feedback-streaming.jpg rename to readme-images/sampler-feedback-streaming.jpg diff --git a/streaming-cracks.jpg b/readme-images/streaming-cracks.jpg similarity index 100% rename from streaming-cracks.jpg rename to readme-images/streaming-cracks.jpg