-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9ff40a6
commit 30e1bd0
Showing
7 changed files
with
138 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#include "dx_hdr_ext_impl.h" | ||
#include "swap_chain.h" | ||
namespace lc::validation { | ||
SwapchainCreationInfo DXHDRExtImpl::create_swapchain( | ||
const DXSwapchainOption &option, | ||
uint64_t stream_handle) noexcept { | ||
auto sw = ptr->create_swapchain(option, stream_handle); | ||
new SwapChain(sw.handle); | ||
return sw; | ||
} | ||
auto DXHDRExtImpl::set_hdr_meta_data( | ||
uint64_t swapchain_handle, | ||
float max_output_nits, | ||
float min_output_nits, | ||
float max_cll, | ||
float max_fall, | ||
const DisplayChromaticities *custom_chroma) noexcept | ||
-> Meta { | ||
return ptr->set_hdr_meta_data( | ||
swapchain_handle, | ||
max_output_nits, | ||
min_output_nits, | ||
max_cll, | ||
max_fall, | ||
custom_chroma); | ||
} | ||
}// namespace lc::validation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#pragma once | ||
#include <luisa/backends/ext/dx_hdr_ext_interface.h> | ||
|
||
namespace lc::validation { | ||
using namespace luisa::compute; | ||
class DXHDRExtImpl : public DXHDRExt, public vstd::IOperatorNewBase { | ||
public: | ||
DXHDRExt *ptr; | ||
DXHDRExtImpl(DXHDRExt *ptr) : ptr(ptr) {} | ||
SwapchainCreationInfo create_swapchain( | ||
const DXSwapchainOption &option, | ||
uint64_t stream_handle) noexcept override; | ||
Meta set_hdr_meta_data( | ||
uint64_t swapchain_handle, | ||
float max_output_nits = 1000.0f, | ||
float min_output_nits = 0.001f, | ||
float max_cll = 2000.0f, | ||
float max_fall = 500.0f, | ||
const DisplayChromaticities *custom_chroma = nullptr) noexcept override; | ||
}; | ||
}// namespace lc::validation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters