yuzu-emu
/
yuzu-mainline
Archived
1
0
Fork 0

Merge pull request #11747 from Kelebek1/image_alias_sample_names

Small things
This commit is contained in:
liamwhite 2023-10-17 11:48:57 -04:00 committed by GitHub
commit fa56518f20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 4 deletions

View File

@ -1436,6 +1436,7 @@ void QueryCacheRuntime::Barriers(bool is_prebarrier) {
.srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT, .srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT,
.dstAccessMask = VK_ACCESS_MEMORY_READ_BIT | VK_ACCESS_MEMORY_WRITE_BIT, .dstAccessMask = VK_ACCESS_MEMORY_READ_BIT | VK_ACCESS_MEMORY_WRITE_BIT,
}; };
impl->scheduler.RequestOutsideRenderPassOperationContext();
if (is_prebarrier) { if (is_prebarrier) {
impl->scheduler.Record([](vk::CommandBuffer cmdbuf) { impl->scheduler.Record([](vk::CommandBuffer cmdbuf) {
cmdbuf.PipelineBarrier(VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, cmdbuf.PipelineBarrier(VK_PIPELINE_STAGE_ALL_COMMANDS_BIT,

View File

@ -19,7 +19,7 @@ VkAttachmentDescription AttachmentDescription(const Device& device, PixelFormat
VkSampleCountFlagBits samples) { VkSampleCountFlagBits samples) {
using MaxwellToVK::SurfaceFormat; using MaxwellToVK::SurfaceFormat;
return { return {
.flags = VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT, .flags = {},
.format = SurfaceFormat(device, FormatType::Optimal, true, format).format, .format = SurfaceFormat(device, FormatType::Optimal, true, format).format,
.samples = samples, .samples = samples,
.loadOp = VK_ATTACHMENT_LOAD_OP_LOAD, .loadOp = VK_ATTACHMENT_LOAD_OP_LOAD,

View File

@ -10,19 +10,23 @@
#include "video_core/texture_cache/image_info.h" #include "video_core/texture_cache/image_info.h"
#include "video_core/texture_cache/image_view_base.h" #include "video_core/texture_cache/image_view_base.h"
#include "video_core/texture_cache/render_targets.h" #include "video_core/texture_cache/render_targets.h"
#include "video_core/texture_cache/samples_helper.h"
namespace VideoCommon { namespace VideoCommon {
std::string Name(const ImageBase& image) { std::string Name(const ImageBase& image) {
const GPUVAddr gpu_addr = image.gpu_addr; const GPUVAddr gpu_addr = image.gpu_addr;
const ImageInfo& info = image.info; const ImageInfo& info = image.info;
const u32 width = info.size.width; u32 width = info.size.width;
const u32 height = info.size.height; u32 height = info.size.height;
const u32 depth = info.size.depth; const u32 depth = info.size.depth;
const u32 num_layers = image.info.resources.layers; const u32 num_layers = image.info.resources.layers;
const u32 num_levels = image.info.resources.levels; const u32 num_levels = image.info.resources.levels;
std::string resource; std::string resource;
if (image.info.num_samples > 1) { if (image.info.num_samples > 1) {
const auto [samples_x, samples_y] = VideoCommon::SamplesLog2(image.info.num_samples);
width >>= samples_x;
height >>= samples_y;
resource += fmt::format(":{}xMSAA", image.info.num_samples); resource += fmt::format(":{}xMSAA", image.info.num_samples);
} }
if (num_layers > 1) { if (num_layers > 1) {

View File

@ -24,7 +24,7 @@ namespace VideoCommon {
return {2, 2}; return {2, 2};
} }
ASSERT_MSG(false, "Invalid number of samples={}", num_samples); ASSERT_MSG(false, "Invalid number of samples={}", num_samples);
return {1, 1}; return {0, 0};
} }
[[nodiscard]] inline int NumSamples(Tegra::Texture::MsaaMode msaa_mode) { [[nodiscard]] inline int NumSamples(Tegra::Texture::MsaaMode msaa_mode) {