Change format list from vector to array/span.

This commit is contained in:
squidbus 2024-07-15 03:14:42 -07:00 committed by TheTurtle
parent 68e1a6a596
commit 4fd3af995e
2 changed files with 4 additions and 4 deletions

View File

@ -281,8 +281,8 @@ vk::BorderColor BorderColor(AmdGpu::BorderColor color) {
}
}
const std::vector<vk::Format>& GetAllFormats() {
static const std::vector formats{
std::span<const vk::Format> GetAllFormats() {
static constexpr std::array formats{
vk::Format::eR32G32B32A32Sfloat,
vk::Format::eR32G32B32Uint,
vk::Format::eR8G8B8A8Unorm,

View File

@ -3,7 +3,7 @@
#pragma once
#include <vector>
#include <span>
#include "video_core/amdgpu/liverpool.h"
#include "video_core/amdgpu/pixel_format.h"
#include "video_core/amdgpu/resource.h"
@ -39,7 +39,7 @@ vk::SamplerMipmapMode MipFilter(AmdGpu::MipFilter filter);
vk::BorderColor BorderColor(AmdGpu::BorderColor color);
const std::vector<vk::Format>& GetAllFormats();
std::span<const vk::Format> GetAllFormats();
vk::Format SurfaceFormat(AmdGpu::DataFormat data_format, AmdGpu::NumberFormat num_format);