Skip to content
This repository was archived by the owner on Dec 25, 2023. It is now read-only.

Commit 2822f60

Browse files
Updated readme and license
1 parent cdaac34 commit 2822f60

File tree

5 files changed

+119
-21
lines changed

5 files changed

+119
-21
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
################################################################################
2+
# This .gitignore file was automatically created by Microsoft(R) Visual Studio.
3+
################################################################################
4+
5+
/.vs

LICENSE

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
MIT License
2-
3-
Copyright (c) 2021 GameTechDev
4-
1+
Copyright (C) 2020-2021 Intel Corporation
2+
53
Permission is hereby granted, free of charge, to any person obtaining a copy
6-
of this software and associated documentation files (the "Software"), to deal
7-
in the Software without restriction, including without limitation the rights
8-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9-
copies of the Software, and to permit persons to whom the Software is
10-
furnished to do so, subject to the following conditions:
11-
12-
The above copyright notice and this permission notice shall be included in all
13-
copies or substantial portions of the Software.
14-
15-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
4+
of this software and associated documentation files (the "Software"),
5+
to deal in the Software without restriction, including without limitation
6+
the rights to use, copy, modify, merge, publish, distribute, sublicense,
7+
and/or sell copies of the Software, and to permit persons to whom
8+
the Software is furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included
11+
in all copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
14+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
16+
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES
17+
OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
18+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
19+
OR OTHER DEALINGS IN THE SOFTWARE.
20+
21+
SPDX-License-Identifier: MIT

README.md

Lines changed: 94 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,95 @@
11
# SamplerFeedbackStreaming
2-
This sample uses D3D12 Sampler Feedback as part of an asynchronous texture streaming solution.
2+
3+
This repository contains a demo of Sampler Feedback Streaming, a technique using sampler feedback 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.
4+
5+
![Sample screenshot](sampler-feedback-streaming.jpg "Sample screenshot")
6+
Textures derived from [Hubble Images](https://www.nasa.gov/mission_pages/hubble/multimedia/index.html), see the [Hubble Copyright](https://hubblesite.org/copyright)
7+
8+
The demo requires at least Windows version 19041 and a GPU with Sampler Feedback Support.
9+
10+
Intel Iris Xe Graphics, as can be found in Gen11 processors, will run this application as of BETA driver [30.0.100.9667](https://downloadcenter.intel.com/download/30522/Intel-Graphics-BETA-Windows-10-DCH-Drivers)
11+
12+
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 BCx format DDS files.
13+
14+
This repository will be updated When DirectStorage for Windows® becomes available.
15+
16+
## License
17+
18+
Copyright 2021 Intel Corporation
19+
20+
Permission is hereby granted, free of charge, to any person obtaining a copy of
21+
this software and associated documentation files (the "Software"), to deal in
22+
the Software without restriction, including without limitation the rights to
23+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
24+
of the Software, and to permit persons to whom the Software is furnished to do
25+
so, subject to the following conditions:
26+
27+
The above copyright notice and this permission notice shall be included in all
28+
copies or substantial portions of the Software.
29+
30+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
31+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
32+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
33+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
34+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
35+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
36+
SOFTWARE.
37+
38+
## Build Instructions
39+
40+
Download the source. Build the solution file with Visual Studio 2019.
41+
42+
Under x64/Release or x64/Debug find the executable and run.
43+
44+
Note the batch files depend on textures that will be posted at a later date.
45+
46+
## Keyboard controls
47+
48+
There are a lot of keyboard controls - a function of giving many demos:
49+
50+
* `qwe / asd` : strafe left, forward, strafe right / rotate left, back, rotate right
51+
* `z c` : levitate up and down
52+
* `x` : toggles "up lock". When hovering over the "terrain" object, locking the up direction "feels right" with mouse navigation. Otherwise, it should be turned off.
53+
* `v b` : rotate around the look direction (z axis)
54+
* `arrow keys` : rotate left/right, pitch down/up
55+
* `shift` : move faster
56+
* `mouse left-click drag` : rotate view
57+
* `page up` : toggle the min mip map viewer for the "terrain" geometry in the center of the universe
58+
* `page down` : while camera animation is non-zero, toggles fly-through "rollercoaster" vs. fly-around "orbit"
59+
* `space` : toggles camera animation on/off.
60+
* `home` : toggles UI. Hold "shift" while UI is enabled to toggle mini UI mode.
61+
* `end` : toggle overlay of min mip map onto every object
62+
* `insert` : toggles frustum. This behaves a little wonky.
63+
* `esc` : while windowed, exit. while full-screen, return to windowed mode
64+
65+
## JSON configuration files and command lines
66+
67+
For a full list of command line options, pass the command line "?"
68+
69+
Most of the detailed controls for the system can be find in a *json* file. The options in the json have corresponding command lines, e.g.:
70+
71+
json:
72+
73+
"mediaDir" : "media"
74+
75+
command line:
76+
77+
-mediadir c:\myMedia
78+
79+
## Misc Notes
80+
81+
Within the source, there is a *TileUpdateManager* library that aspires to be stand-alone. The central object, *TileUpdateManager*, allows for the creation of streaming textures and heaps to contain them. These objects handle all the feedback resource creation, readback, processing, and file/IO.
82+
83+
## Known issues
84+
85+
The demo exhibits texture cracks due to the way feedback is used. Feedback is always read *after* drawing, resulting in loads and evictions corresponding to that frame. That means we never have exactly the texture data we need when we draw (unless no new data is needed). Most of the time this isn't perceptible, but sometimes a fast-moving object enters the view and the system just can't get data there in time resulting in visible artifacts.
86+
87+
The following image shows an exaggerated version of the problem, created by disabling streaming completely then moving the camera:
88+
89+
![Streaming Cracks](streaming-cracks.jpg "Streaming Cracks")
90+
91+
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 neighbors. That visual optimization is TBD.
92+
93+
There are also a few known bugs:
94+
* entering full screen in a multi-gpu system moves the window to a monitor attached to the GPU by design. However, if the window starts on a different monitor, it "disappears" on the first maximization. Hit *escape* then maximize again, and it should work fine.
95+
* full-screen while remote desktop is broken *again*. Will likely fix soon.

sampler-feedback-streaming.jpg

935 KB
Loading

streaming-cracks.jpg

96.7 KB
Loading

0 commit comments

Comments
 (0)