Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/video_core/renderer_vulkan/host_passes/fsr_pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ vk::ImageView FsrPass::Render(vk::CommandBuffer cmdbuf, vk::ImageView input,
}

if (img.dirty) {
CreateImages(img);
CreateImages(img, hdr);
}

if (Config::getVkHostMarkersEnabled()) {
Expand Down Expand Up @@ -404,12 +404,12 @@ void FsrPass::ResizeAndInvalidate(u32 width, u32 height) {
}
}

void FsrPass::CreateImages(Img& img) const {
void FsrPass::CreateImages(Img& img, bool hdr) const {
img.dirty = false;

vk::ImageCreateInfo image_create_info{
.imageType = vk::ImageType::e2D,
.format = vk::Format::eR16G16B16A16Sfloat,
.format = hdr ? vk::Format::eR16G16B16A16Sfloat : vk::Format::eR8G8B8A8Unorm,
.extent{
.width = cur_size.width,
.height = cur_size.height,
Expand All @@ -434,7 +434,7 @@ void FsrPass::CreateImages(Img& img) const {
vk::ImageViewCreateInfo image_view_create_info{
.image = img.intermediary_image,
.viewType = vk::ImageViewType::e2D,
.format = vk::Format::eR16G16B16A16Sfloat,
.format = hdr ? vk::Format::eR16G16B16A16Sfloat : vk::Format::eR8G8B8A8Unorm,
.subresourceRange{
.aspectMask = vk::ImageAspectFlagBits::eColor,
.levelCount = 1,
Expand Down
2 changes: 1 addition & 1 deletion src/video_core/renderer_vulkan/host_passes/fsr_pass.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class FsrPass {
};

void ResizeAndInvalidate(u32 width, u32 height);
void CreateImages(Img& img) const;
void CreateImages(Img& img, bool hdr) const;

vk::Device device{};
u32 num_images{};
Expand Down