mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-06 02:33:15 +00:00
video_out: HDR support (#2381)
* Initial HDR support * fix for crashes when debug tools used
This commit is contained in:
parent
fb0871dbc8
commit
8f2883a388
16 changed files with 186 additions and 16 deletions
|
@ -1265,4 +1265,20 @@ void Shutdown() {
|
|||
IM_DELETE(bd);
|
||||
}
|
||||
|
||||
void OnSurfaceFormatChange(vk::Format surface_format) {
|
||||
VkData* bd = GetBackendData();
|
||||
const InitInfo& v = bd->init_info;
|
||||
auto& pl_format = const_cast<vk::Format&>(
|
||||
bd->init_info.pipeline_rendering_create_info.pColorAttachmentFormats[0]);
|
||||
if (pl_format != surface_format) {
|
||||
pl_format = surface_format;
|
||||
if (bd->pipeline) {
|
||||
v.device.destroyPipeline(bd->pipeline, v.allocator);
|
||||
bd->pipeline = VK_NULL_HANDLE;
|
||||
CreatePipeline(v.device, v.allocator, v.pipeline_cache, nullptr, &bd->pipeline,
|
||||
v.subpass);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace ImGui::Vulkan
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue