From 93d23ebac5ebe8f1aefc297484fb377ff62aded3 Mon Sep 17 00:00:00 2001 From: baldurk Date: Wed, 24 Apr 2019 13:10:00 +0100 Subject: [PATCH] Add helper for creating D3D12 PSO with MSAA in testbed program --- util/test/demos/d3d12/d3d12_helpers.cpp | 6 ++++++ util/test/demos/d3d12/d3d12_helpers.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/util/test/demos/d3d12/d3d12_helpers.cpp b/util/test/demos/d3d12/d3d12_helpers.cpp index c291d43fd..70383eb66 100644 --- a/util/test/demos/d3d12/d3d12_helpers.cpp +++ b/util/test/demos/d3d12/d3d12_helpers.cpp @@ -946,6 +946,12 @@ D3D12PSOCreator &D3D12PSOCreator::DSV(DXGI_FORMAT fmt) return *this; } +D3D12PSOCreator &D3D12PSOCreator::SampleCount(UINT Samples) +{ + GraphicsDesc.SampleDesc.Count = Samples; + return *this; +} + D3D12PSOCreator::operator ID3D12PipelineStatePtr() const { ID3D12PipelineStatePtr pso; diff --git a/util/test/demos/d3d12/d3d12_helpers.h b/util/test/demos/d3d12/d3d12_helpers.h index 0158fd313..779a5e281 100644 --- a/util/test/demos/d3d12/d3d12_helpers.h +++ b/util/test/demos/d3d12/d3d12_helpers.h @@ -84,6 +84,8 @@ public: D3D12PSOCreator &RTVs(const std::vector &fmts); D3D12PSOCreator &DSV(DXGI_FORMAT fmt); + D3D12PSOCreator &SampleCount(UINT Samples); + operator ID3D12PipelineStatePtr() const; D3D12_GRAPHICS_PIPELINE_STATE_DESC GraphicsDesc = {};