Testing Shaders

This commit is contained in:
Dmugetsu 2024-09-06 03:55:33 -06:00
parent 270e89c3ea
commit 148e1dcfdc
5 changed files with 9 additions and 10 deletions

View file

@ -6,7 +6,6 @@
"configurationType": "Release",
"buildRoot": "${projectDir}\\Build\\${name}",
"installRoot": "${projectDir}\\Install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"inheritEnvironments": [ "clang_cl_x64_x64" ]

View file

@ -14,7 +14,6 @@ constexpr std::size_t MaxDisplayBuffers = 16;
constexpr std::size_t MaxDisplayBufferGroups = 4;
enum class PixelFormat : u32 {
Unknown,
A8R8G8B8Srgb = 0x80000000,
A8B8G8R8Srgb = 0x80002200,
A2R10G10B10 = 0x88060000,
@ -28,7 +27,7 @@ enum class TilingMode : s32 {
Linear = 1,
};
constexpr std::string_view GetPixelFormatString(PixelFormat format) {
constexpr fmt::string_view GetPixelFormatString(PixelFormat format) {
switch (format) {
case PixelFormat::A8R8G8B8Srgb:
return "A8R8G8B8Srgb";

View file

@ -7,7 +7,7 @@
namespace Loader {
constexpr static u32 PkgMagic = 0x544e437f;
static constexpr u32 PkgMagic = 0x544e437f;
enum class FileTypes {
Unknown,

View file

@ -77,7 +77,7 @@ struct Buffer {
return GetStride() * num_records;
}
};
static_assert(sizeof(Buffer) == 16); // 128bits
static_assert (sizeof(Buffer) == 16); // 256bits
enum class ImageType : u64 {
Invalid = 0,
@ -91,7 +91,7 @@ enum class ImageType : u64 {
Color2DMsaaArray = 15,
};
constexpr std::string_view NameOf(ImageType type) {
constexpr fmt::string_view NameOf(ImageType type) {
switch (type) {
case ImageType::Invalid:
return "Invalid";
@ -124,7 +124,7 @@ enum class TilingMode : u32 {
Texture_MacroTiled = 0xEu,
};
constexpr std::string_view NameOf(TilingMode type) {
constexpr fmt::string_view NameOf(TilingMode type) {
switch (type) {
case TilingMode::Depth_MacroTiled:
return "Depth_MacroTiled";
@ -134,8 +134,7 @@ constexpr std::string_view NameOf(TilingMode type) {
return "Display_MacroTiled";
case TilingMode::Texture_MicroTiled:
return "Texture_MicroTiled";
case TilingMode::Texture_MacroTiled:
return "Texture_MacroTiled";
default:
return "Unknown";
}

View file

@ -179,7 +179,9 @@ const ComputePipeline* PipelineCache::GetComputePipeline() {
}
bool ShouldSkipShader(u64 shader_hash, const char* shader_type) {
static constexpr std::array<u64, 0> skip_hashes = {};
static constexpr std::array<u32, 13> skip_hashes = {
0xa509af23, 0x42f2a521, 0x34d212e1, 0xa954e79d, 0x8634b077, 0x2da7fe60, 0xc1f28ebe, 0xb30dd24a, 0xc0cbc309, 0x8e3f8dc4,
0xb6e87124, 0x4ca76892, 0xc1f28ebe};
if (std::ranges::contains(skip_hashes, shader_hash)) {
LOG_WARNING(Render_Vulkan, "Skipped {} shader hash {:#x}.", shader_type, shader_hash);
return true;