Change format list from vector to array/span.
This commit is contained in:
parent
68e1a6a596
commit
4fd3af995e
|
@ -281,8 +281,8 @@ vk::BorderColor BorderColor(AmdGpu::BorderColor color) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::vector<vk::Format>& GetAllFormats() {
|
std::span<const vk::Format> GetAllFormats() {
|
||||||
static const std::vector formats{
|
static constexpr std::array formats{
|
||||||
vk::Format::eR32G32B32A32Sfloat,
|
vk::Format::eR32G32B32A32Sfloat,
|
||||||
vk::Format::eR32G32B32Uint,
|
vk::Format::eR32G32B32Uint,
|
||||||
vk::Format::eR8G8B8A8Unorm,
|
vk::Format::eR8G8B8A8Unorm,
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <vector>
|
#include <span>
|
||||||
#include "video_core/amdgpu/liverpool.h"
|
#include "video_core/amdgpu/liverpool.h"
|
||||||
#include "video_core/amdgpu/pixel_format.h"
|
#include "video_core/amdgpu/pixel_format.h"
|
||||||
#include "video_core/amdgpu/resource.h"
|
#include "video_core/amdgpu/resource.h"
|
||||||
|
@ -39,7 +39,7 @@ vk::SamplerMipmapMode MipFilter(AmdGpu::MipFilter filter);
|
||||||
|
|
||||||
vk::BorderColor BorderColor(AmdGpu::BorderColor color);
|
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);
|
vk::Format SurfaceFormat(AmdGpu::DataFormat data_format, AmdGpu::NumberFormat num_format);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue