rasterizer_cache: Separate texture swizzling to utils

This commit is contained in:
emufan4568
2022-09-07 15:32:02 +03:00
committed by GPUCode
parent cf8bc35d46
commit 06bacfbd72
6 changed files with 122 additions and 45 deletions

View File

@@ -4,6 +4,7 @@
#pragma once
#include <functional>
#include <span>
#include "common/hash.h"
#include "video_core/rasterizer_cache/pixel_format.h"
#include "video_core/rasterizer_cache/types.h"
@@ -47,6 +48,14 @@ struct TextureCubeConfig {
}
};
class SurfaceParams;
void SwizzleTexture(const SurfaceParams& params, u32 flush_start, u32 flush_end,
std::span<std::byte> source, std::span<std::byte> dest);
void UnswizzleTexture(const SurfaceParams& params, u32 load_start, u32 load_end,
std::span<const std::byte> source, std::span<std::byte> dest);
[[nodiscard]] ClearValue MakeClearValue(Aspect aspect, PixelFormat format, const u8* fill_data);
[[nodiscard]] Aspect ToAspect(SurfaceType type);