mirror of
https://github.com/SysRay/psOff_public.git
synced 2025-02-21 06:50:35 +00:00
initParams| --bright for srgb (brightness)
This commit is contained in:
parent
7430c41ddd
commit
fb3f1fc01b
@ -79,6 +79,10 @@ bool InitParams::enableValidation() {
|
||||
return _pImpl->m_vm.count("vkValidation");
|
||||
}
|
||||
|
||||
bool InitParams::enableBrightness() {
|
||||
return _pImpl->m_vm.count("bright");
|
||||
}
|
||||
|
||||
bool InitParams::useVSYNC() {
|
||||
return _pImpl->m_vm["vsync"].as<bool>();
|
||||
}
|
||||
|
@ -24,6 +24,7 @@ class InitParams {
|
||||
std::string getUpdateRoot();
|
||||
|
||||
bool enableValidation();
|
||||
bool enableBrightness();
|
||||
bool useVSYNC();
|
||||
~InitParams();
|
||||
};
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
#include "../imageHandler.h"
|
||||
#include "core/imports/exports/graphics.h"
|
||||
#include "core/initParams/initParams.h"
|
||||
#include "logging.h"
|
||||
#include "utility/utility.h"
|
||||
|
||||
@ -34,6 +35,7 @@ std::pair<VkFormat, VkColorSpaceKHR> getDisplayFormat(VulkanObj* obj) {
|
||||
if (obj->surfaceCapabilities.formats.empty()) {
|
||||
return {VK_FORMAT_R8G8B8A8_SRGB, VK_COLOR_SPACE_SRGB_NONLINEAR_KHR};
|
||||
}
|
||||
|
||||
bool found = false;
|
||||
for (auto const& format: obj->surfaceCapabilities.formats) {
|
||||
if (format.format == VK_FORMAT_R8G8B8A8_SRGB) {
|
||||
@ -48,7 +50,11 @@ std::pair<VkFormat, VkColorSpaceKHR> getDisplayFormat(VulkanObj* obj) {
|
||||
}
|
||||
LOG_CRIT(L"VK_FORMAT_B8G8R8A8_SRGB not supported");
|
||||
}
|
||||
return {VK_FORMAT_B8G8R8A8_SRGB, VK_COLOR_SPACE_SRGB_NONLINEAR_KHR};
|
||||
|
||||
if (accessInitParams()->enableBrightness())
|
||||
return {VK_FORMAT_B8G8R8A8_SRGB, VK_COLOR_SPACE_SRGB_NONLINEAR_KHR};
|
||||
else
|
||||
return {VK_FORMAT_B8G8R8A8_UNORM, VK_COLOR_SPACE_SRGB_NONLINEAR_KHR};
|
||||
}
|
||||
|
||||
void submitDisplayTransfer(SwapchainData::DisplayBuffers const* displayBuffer, ImageData const& imageData, QueueInfo const* queue, VkSemaphore waitSema,
|
||||
|
Loading…
x
Reference in New Issue
Block a user