compilation warnings and dead code elimination
This commit is contained in:
parent
b2c05dc09d
commit
c752341818
|
@ -38,9 +38,9 @@ struct UniqueBuffer {
|
||||||
UniqueBuffer& operator=(const UniqueBuffer&) = delete;
|
UniqueBuffer& operator=(const UniqueBuffer&) = delete;
|
||||||
|
|
||||||
UniqueBuffer(UniqueBuffer&& other)
|
UniqueBuffer(UniqueBuffer&& other)
|
||||||
: buffer{std::exchange(other.buffer, VK_NULL_HANDLE)},
|
: allocator{std::exchange(other.allocator, VK_NULL_HANDLE)},
|
||||||
allocator{std::exchange(other.allocator, VK_NULL_HANDLE)},
|
allocation{std::exchange(other.allocation, VK_NULL_HANDLE)},
|
||||||
allocation{std::exchange(other.allocation, VK_NULL_HANDLE)} {}
|
buffer{std::exchange(other.buffer, VK_NULL_HANDLE)} {}
|
||||||
UniqueBuffer& operator=(UniqueBuffer&& other) {
|
UniqueBuffer& operator=(UniqueBuffer&& other) {
|
||||||
buffer = std::exchange(other.buffer, VK_NULL_HANDLE);
|
buffer = std::exchange(other.buffer, VK_NULL_HANDLE);
|
||||||
allocator = std::exchange(other.allocator, VK_NULL_HANDLE);
|
allocator = std::exchange(other.allocator, VK_NULL_HANDLE);
|
||||||
|
|
|
@ -138,8 +138,8 @@ void Rasterizer::BeginRendering() {
|
||||||
using StencilFormat = AmdGpu::Liverpool::DepthBuffer::StencilFormat;
|
using StencilFormat = AmdGpu::Liverpool::DepthBuffer::StencilFormat;
|
||||||
if (regs.depth_buffer.Address() != 0 &&
|
if (regs.depth_buffer.Address() != 0 &&
|
||||||
((regs.depth_control.depth_enable && regs.depth_buffer.z_info.format != ZFormat::Invalid) ||
|
((regs.depth_control.depth_enable && regs.depth_buffer.z_info.format != ZFormat::Invalid) ||
|
||||||
regs.depth_control.stencil_enable &&
|
(regs.depth_control.stencil_enable &&
|
||||||
regs.depth_buffer.stencil_info.format != StencilFormat::Invalid)) {
|
regs.depth_buffer.stencil_info.format != StencilFormat::Invalid))) {
|
||||||
const auto htile_address = regs.depth_htile_data_base.GetAddress();
|
const auto htile_address = regs.depth_htile_data_base.GetAddress();
|
||||||
const bool is_clear = regs.depth_render_control.depth_clear_enable ||
|
const bool is_clear = regs.depth_render_control.depth_clear_enable ||
|
||||||
texture_cache.IsMetaCleared(htile_address);
|
texture_cache.IsMetaCleared(htile_address);
|
||||||
|
|
|
@ -43,9 +43,9 @@ struct UniqueImage {
|
||||||
UniqueImage& operator=(const UniqueImage&) = delete;
|
UniqueImage& operator=(const UniqueImage&) = delete;
|
||||||
|
|
||||||
UniqueImage(UniqueImage&& other)
|
UniqueImage(UniqueImage&& other)
|
||||||
: image{std::exchange(other.image, VK_NULL_HANDLE)},
|
: allocator{std::exchange(other.allocator, VK_NULL_HANDLE)},
|
||||||
allocator{std::exchange(other.allocator, VK_NULL_HANDLE)},
|
allocation{std::exchange(other.allocation, VK_NULL_HANDLE)},
|
||||||
allocation{std::exchange(other.allocation, VK_NULL_HANDLE)} {}
|
image{std::exchange(other.image, VK_NULL_HANDLE)} {}
|
||||||
UniqueImage& operator=(UniqueImage&& other) {
|
UniqueImage& operator=(UniqueImage&& other) {
|
||||||
image = std::exchange(other.image, VK_NULL_HANDLE);
|
image = std::exchange(other.image, VK_NULL_HANDLE);
|
||||||
allocator = std::exchange(other.allocator, VK_NULL_HANDLE);
|
allocator = std::exchange(other.allocator, VK_NULL_HANDLE);
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
|
#include "video_core/amdgpu/resource.h"
|
||||||
#include "video_core/renderer_vulkan/liverpool_to_vk.h"
|
#include "video_core/renderer_vulkan/liverpool_to_vk.h"
|
||||||
#include "video_core/renderer_vulkan/vk_instance.h"
|
#include "video_core/renderer_vulkan/vk_instance.h"
|
||||||
#include "video_core/texture_cache/image.h"
|
#include "video_core/texture_cache/image.h"
|
||||||
|
@ -110,7 +111,7 @@ ImageViewInfo::ImageViewInfo(const AmdGpu::Liverpool::DepthBuffer& depth_buffer,
|
||||||
|
|
||||||
ImageView::ImageView(const Vulkan::Instance& instance, const ImageViewInfo& info_, Image& image,
|
ImageView::ImageView(const Vulkan::Instance& instance, const ImageViewInfo& info_, Image& image,
|
||||||
ImageId image_id_, std::optional<vk::ImageUsageFlags> usage_override /*= {}*/)
|
ImageId image_id_, std::optional<vk::ImageUsageFlags> usage_override /*= {}*/)
|
||||||
: info{info_}, image_id{image_id_} {
|
: image_id{image_id_}, info{info_} {
|
||||||
vk::ImageViewUsageCreateInfo usage_ci{};
|
vk::ImageViewUsageCreateInfo usage_ci{};
|
||||||
if (usage_override) {
|
if (usage_override) {
|
||||||
usage_ci.usage = usage_override.value();
|
usage_ci.usage = usage_override.value();
|
||||||
|
|
|
@ -342,12 +342,6 @@ TileManager::ScratchBuffer TileManager::AllocBuffer(u32 size, bool is_storage /*
|
||||||
.usage = usage,
|
.usage = usage,
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef __APPLE__
|
|
||||||
// Fix for detiler artifacts on macOS
|
|
||||||
const bool is_large_buffer = true;
|
|
||||||
#else
|
|
||||||
const bool is_large_buffer = size > 128_MB;
|
|
||||||
#endif
|
|
||||||
VmaAllocationCreateInfo alloc_info{
|
VmaAllocationCreateInfo alloc_info{
|
||||||
.flags = !is_storage ? VMA_ALLOCATION_CREATE_HOST_ACCESS_ALLOW_TRANSFER_INSTEAD_BIT |
|
.flags = !is_storage ? VMA_ALLOCATION_CREATE_HOST_ACCESS_ALLOW_TRANSFER_INSTEAD_BIT |
|
||||||
VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT
|
VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT
|
||||||
|
@ -462,7 +456,6 @@ std::optional<vk::Buffer> TileManager::TryDetile(Image& image) {
|
||||||
(m > 0 ? params.sizes[m - 1] : 0);
|
(m > 0 ? params.sizes[m - 1] : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
auto pitch = image.info.pitch;
|
|
||||||
cmdbuf.pushConstants(*detiler->pl_layout, vk::ShaderStageFlagBits::eCompute, 0u, sizeof(params),
|
cmdbuf.pushConstants(*detiler->pl_layout, vk::ShaderStageFlagBits::eCompute, 0u, sizeof(params),
|
||||||
¶ms);
|
¶ms);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue