mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-27 04:25:12 +00:00
Readd accidentally reverted change
This commit is contained in:
parent
29a0e0c5b0
commit
161cb46c4e
@ -127,16 +127,20 @@ ImageInfo::ImageInfo(const AmdGpu::Image& image, const Shader::ImageResource& de
|
||||
tiling_mode = image.GetTilingMode();
|
||||
pixel_format = LiverpoolToVK::SurfaceFormat(image.GetDataFmt(), image.GetNumberFmt());
|
||||
// Override format if image is forced to be a depth target, except if the image is a dummy one
|
||||
if (desc.is_depth && (image.width != 0 && image.height != 0)) {
|
||||
if (desc.is_depth) {
|
||||
if (image.width != 0 && image.height != 0) {
|
||||
pixel_format = Vulkan::LiverpoolToVK::PromoteFormatToDepth(pixel_format);
|
||||
if (pixel_format == vk::Format::eUndefined) {
|
||||
ASSERT_MSG(
|
||||
image.width == 0 && image.height == 0,
|
||||
"PromoteFormatToDepth failed, info dump: format: {}, size: {}x{}, data_format: {}",
|
||||
ASSERT_MSG(image.width == 0 && image.height == 0,
|
||||
"PromoteFormatToDepth failed, info dump: format: {}, size: {}x{}, "
|
||||
"data_format: {}",
|
||||
vk::to_string(pixel_format), image.width, image.height,
|
||||
AmdGpu::NameOf(image.GetDataFmt()));
|
||||
pixel_format = vk::Format::eD32Sfloat;
|
||||
}
|
||||
} else {
|
||||
pixel_format = vk::Format::eD32Sfloat;
|
||||
}
|
||||
}
|
||||
type = ConvertImageType(image.GetType());
|
||||
props.is_tiled = image.IsTiled();
|
||||
|
@ -38,16 +38,20 @@ ImageViewInfo::ImageViewInfo(const AmdGpu::Image& image, const Shader::ImageReso
|
||||
}
|
||||
format = Vulkan::LiverpoolToVK::SurfaceFormat(dfmt, nfmt);
|
||||
// Override format if image is forced to be a depth target, except if the image is a dummy one
|
||||
if (desc.is_depth && (image.width != 0 && image.height != 0)) {
|
||||
if (desc.is_depth) {
|
||||
if (image.width != 0 && image.height != 0) {
|
||||
format = Vulkan::LiverpoolToVK::PromoteFormatToDepth(format);
|
||||
if (format == vk::Format::eUndefined) {
|
||||
ASSERT_MSG(
|
||||
image.width == 0 && image.height == 0,
|
||||
"PromoteFormatToDepth failed, info dump: format: {}, size: {}x{}, data_format: {}",
|
||||
ASSERT_MSG(image.width == 0 && image.height == 0,
|
||||
"PromoteFormatToDepth failed, info dump: format: {}, size: {}x{}, "
|
||||
"data_format: {}",
|
||||
vk::to_string(format), image.width, image.height,
|
||||
AmdGpu::NameOf(image.GetDataFmt()));
|
||||
format = vk::Format::eD32Sfloat;
|
||||
}
|
||||
} else {
|
||||
format = vk::Format::eD32Sfloat;
|
||||
}
|
||||
}
|
||||
|
||||
range.base.level = image.base_level;
|
||||
|
Loading…
Reference in New Issue
Block a user