mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-08-23 07:56:52 +00:00
[TEST] Quick revert on MSAA clamp
This commit is contained in:
@@ -1769,21 +1769,6 @@ bool TextureCacheRuntime::CanReportMemoryUsage() const {
|
||||
return device.CanReportMemoryUsage();
|
||||
}
|
||||
|
||||
bool TextureCacheRuntime::IsSampleCountSupported(const VideoCommon::ImageInfo& info) const {
|
||||
if (info.num_samples <= 1) {
|
||||
return true;
|
||||
}
|
||||
const auto format_info =
|
||||
MaxwellToVK::SurfaceFormat(device, FormatType::Optimal, false, info.format);
|
||||
const bool allow_storage = device.IsStorageImageMultisampleSupported();
|
||||
const VkImageUsageFlags usage = ImageUsageFlags(format_info, info.format, allow_storage);
|
||||
const VkImageAspectFlags aspect = ImageAspectMask(info.format);
|
||||
const bool is_integer = VideoCore::Surface::IsPixelFormatInteger(info.format);
|
||||
const VkSampleCountFlags supported =
|
||||
device.GetSupportedSampleCounts(usage, aspect, is_integer);
|
||||
return (supported & ConvertSampleCount(info.num_samples)) != 0;
|
||||
}
|
||||
|
||||
void TextureCacheRuntime::TickFrame() {
|
||||
std::erase_if(pending_msaa_images, [this](const auto& pending) {
|
||||
return scheduler.IsFree(pending.first);
|
||||
|
||||
@@ -66,8 +66,6 @@ public:
|
||||
|
||||
bool CanReportMemoryUsage() const;
|
||||
|
||||
bool IsSampleCountSupported(const VideoCommon::ImageInfo& info) const;
|
||||
|
||||
void BlitImage(Framebuffer* dst_framebuffer, ImageView& dst, ImageView& src,
|
||||
const Region2D& dst_region, const Region2D& src_region,
|
||||
Tegra::Engines::Fermi2D::Filter filter,
|
||||
|
||||
@@ -1161,21 +1161,9 @@ void TextureCache<P>::UploadImageContents(Image& image, StagingBuffer& staging)
|
||||
}
|
||||
}
|
||||
|
||||
template <class P>
|
||||
ImageInfo TextureCache<P>::ClampedSampleCount(ImageInfo info) const {
|
||||
if (info.num_samples > 1) {
|
||||
if constexpr (requires { runtime.IsSampleCountSupported(info); }) {
|
||||
if (!runtime.IsSampleCountSupported(info)) {
|
||||
info.num_samples = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return info;
|
||||
}
|
||||
|
||||
template <class P>
|
||||
ImageViewId TextureCache<P>::CreateImageView(const TICEntry& config) {
|
||||
const ImageInfo info = ClampedSampleCount(ImageInfo(config));
|
||||
const ImageInfo info(config);
|
||||
if (info.type == ImageType::Buffer) {
|
||||
const ImageViewInfo view_info(config, 0);
|
||||
return slot_image_views.insert(runtime, info, view_info, config.Address());
|
||||
@@ -1907,8 +1895,7 @@ ImageViewId TextureCache<P>::FindColorBuffer(size_t index) {
|
||||
if (rt.format == Tegra::RenderTargetFormat::NONE) {
|
||||
return ImageViewId{};
|
||||
}
|
||||
const ImageInfo info =
|
||||
ClampedSampleCount(ImageInfo(regs.rt[index], regs.anti_alias_samples_mode));
|
||||
const ImageInfo info(regs.rt[index], regs.anti_alias_samples_mode);
|
||||
return FindRenderTargetView(info, gpu_addr);
|
||||
}
|
||||
|
||||
@@ -1922,8 +1909,7 @@ ImageViewId TextureCache<P>::FindDepthBuffer() {
|
||||
if (gpu_addr == 0) {
|
||||
return ImageViewId{};
|
||||
}
|
||||
const ImageInfo info =
|
||||
ClampedSampleCount(ImageInfo(regs.zeta, regs.zeta_size, regs.anti_alias_samples_mode));
|
||||
const ImageInfo info(regs.zeta, regs.zeta_size, regs.anti_alias_samples_mode);
|
||||
return FindRenderTargetView(info, gpu_addr);
|
||||
}
|
||||
|
||||
|
||||
@@ -416,8 +416,6 @@ private:
|
||||
bool ScaleDown(Image& image);
|
||||
u64 GetScaledImageSizeBytes(const ImageBase& image);
|
||||
|
||||
[[nodiscard]] ImageInfo ClampedSampleCount(ImageInfo info) const;
|
||||
|
||||
void QueueAsyncDecode(Image& image, ImageId image_id);
|
||||
void TickAsyncDecode();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user