Files
AnyPS5/core/libs/prx/libSceAgcDriver/tests/GraphicsTests.hpp
T
TideOPL 46606e9c73 test(agc): cover depth surface lookups of reused memory
agc_driver_graphics registers a D32 and a D16 surface on a mock device and looks up views at their addresses. Views of the surface's own extent in R32F or R16, and T#s that read the raw depth bits, sample the depth plane; a view of another extent, a 2D array view of another extent, an R11G11B10 view, an R32 uint view without a depth layout and an R32F view of a D16 surface return null and take the ordinary texture path. On main the first of these throws in DepthSurface::Sampled.
2026-10-10 00:44:40 +01:00

40 lines
1.2 KiB
C++

#ifndef CORE_LIBS_PRX_LIBSCEAGCDRIVER_TESTS_GRAPHICSTESTS_HPP
#define CORE_LIBS_PRX_LIBSCEAGCDRIVER_TESTS_GRAPHICSTESTS_HPP
#include "prx/libSceAgcDriver/Graphics/include/Context.hpp"
#include <array>
#include <cstddef>
#include <cstdint>
#include <functional>
#include <vector>
struct DetilerCapture {
std::uint32_t groupsX;
std::uint32_t groupsY;
std::uint32_t groupsZ;
std::vector<std::byte> pushConstants;
VkBuffer sourceBuffer;
VkDeviceSize sourceOffset;
VkDeviceSize sourceRange;
VkBuffer destinationBuffer;
VkDeviceSize destinationOffset;
VkDeviceSize destinationRange;
};
struct TextureDetilerTestAccess {
std::function<VkBuffer(std::uint64_t)> makeBuffer;
std::function<std::vector<std::byte>&(VkBuffer)> bytes;
std::function<DetilerCapture()> lastDispatch;
std::function<std::uint32_t()> pipelineCount;
std::function<std::array<std::uint32_t, 3>()> lastSpecialization;
};
void RunTextureFormatTests();
void RunTextureTilingTests();
void RunGuestTextureResourceTests();
void RunDepthSurfaceReuseTests();
void RunGuestSamplerResourceTests();
void RunTextureDetilerTests(const AgcDriver::Graphics::Context& context, const TextureDetilerTestAccess& access);
#endif