|
6 | 6 | #include "d3d11/d3d11_helper.h"
|
7 | 7 | #include "d3d11/d3d11_injector.h"
|
8 | 8 | #include "d3d11/d3d11_post_processor.h"
|
| 9 | +#include "d3d11/d3d11_variable_rate_shading.h" |
9 | 10 |
|
10 | 11 | #include <wrl/client.h>
|
11 | 12 | #include <d3d11.h>
|
@@ -65,6 +66,7 @@ namespace vrperfkit {
|
65 | 66 |
|
66 | 67 | struct OculusD3D11Resources {
|
67 | 68 | std::unique_ptr<D3D11Injector> injector;
|
| 69 | + std::unique_ptr<D3D11VariableRateShading> variableRateShading; |
68 | 70 | std::unique_ptr<D3D11PostProcessor> postProcessor;
|
69 | 71 | ComPtr<ID3D11Device> device;
|
70 | 72 | ComPtr<ID3D11DeviceContext> context;
|
@@ -260,8 +262,10 @@ namespace vrperfkit {
|
260 | 262 | }
|
261 | 263 |
|
262 | 264 | d3d11Res->postProcessor.reset(new D3D11PostProcessor(d3d11Res->device));
|
| 265 | + d3d11Res->variableRateShading.reset(new D3D11VariableRateShading(d3d11Res->device)); |
263 | 266 | d3d11Res->injector.reset(new D3D11Injector(d3d11Res->device));
|
264 | 267 | d3d11Res->injector->AddListener(d3d11Res->postProcessor.get());
|
| 268 | + d3d11Res->injector->AddListener(d3d11Res->variableRateShading.get()); |
265 | 269 |
|
266 | 270 | LOG_INFO << "D3D11 resource creation complete";
|
267 | 271 | initialized = true;
|
@@ -324,6 +328,10 @@ namespace vrperfkit {
|
324 | 328 | eyeLayer.Viewport[eye].Size.w = outputViewport.width;
|
325 | 329 | eyeLayer.Viewport[eye].Size.h = outputViewport.height;
|
326 | 330 | }
|
| 331 | + |
| 332 | + D3D11_TEXTURE2D_DESC td; |
| 333 | + input.inputTexture->GetDesc(&td); |
| 334 | + d3d11Res->variableRateShading->UpdateTargetInformation(td.Width, td.Height, input.mode, projCenters.eyeCenter[0].x, projCenters.eyeCenter[0].y, projCenters.eyeCenter[1].x, projCenters.eyeCenter[1].y); |
327 | 335 | }
|
328 | 336 | }
|
329 | 337 | }
|
0 commit comments