From 601c82a03119450cc174ef8717a0181ed5fbfd66 Mon Sep 17 00:00:00 2001 From: nmzik Date: Sat, 18 Jul 2026 08:56:38 +0200 Subject: [PATCH] format source files --- src/common/platform/sysWindowsFileIO.cpp | 6 +- src/common/platform/sysWindowsVirtual.cpp | 7 +- src/graphics/guest_gpu/gpu_format.cpp | 19 +- src/graphics/guest_gpu/graphicsRun.cpp | 44 +- src/graphics/guest_gpu/tile.cpp | 84 +- src/graphics/host_gpu/graphicContext.h | 20 +- src/graphics/host_gpu/pageManager.cpp | 16 +- .../host_gpu/renderer/bufferCache.cpp | 14 +- .../host_gpu/renderer/colorRenderTarget.cpp | 25 +- src/graphics/host_gpu/renderer/debug.cpp | 2 +- .../host_gpu/renderer/depthRenderTarget.cpp | 7 +- .../host_gpu/renderer/descriptors.cpp | 124 +- src/graphics/host_gpu/renderer/descriptors.h | 3 +- .../host_gpu/renderer/dummyTextureCache.cpp | 2 +- .../host_gpu/renderer/dummyTextureCache.h | 2 +- src/graphics/host_gpu/renderer/image.cpp | 45 +- src/graphics/host_gpu/renderer/image.h | 54 +- src/graphics/host_gpu/renderer/imageInfo.h | 61 +- src/graphics/host_gpu/renderer/imageView.cpp | 46 +- src/graphics/host_gpu/renderer/imageView.h | 16 +- .../host_gpu/renderer/multiLevelPageTable.h | 93 +- .../host_gpu/renderer/renderCompute.cpp | 2 +- src/graphics/host_gpu/renderer/renderDraw.cpp | 20 +- .../renderer/renderTargetBarriers.cpp | 3 +- .../host_gpu/renderer/samplerCache.cpp | 17 +- .../renderer/shaderResourceBarrier.cpp | 2 +- src/graphics/host_gpu/renderer/shaders.cpp | 2 +- .../host_gpu/renderer/streamBuffer.cpp | 26 +- src/graphics/host_gpu/renderer/streamBuffer.h | 17 +- src/graphics/host_gpu/renderer/sync.cpp | 73 +- src/graphics/host_gpu/renderer/sync.h | 10 +- .../host_gpu/renderer/textureCache.cpp | 278 ++- src/graphics/host_gpu/renderer/textureCache.h | 42 +- src/graphics/host_gpu/renderer/tiler.cpp | 24 +- src/graphics/host_gpu/utils.h | 3 +- src/graphics/presentation/displayBuffer.h | 8 +- src/graphics/presentation/videoOut.cpp | 34 +- src/graphics/presentation/window.h | 6 +- .../presentation/window/swapchain.cpp | 7 +- src/graphics/shader/recompiler/BufferFormat.h | 15 +- .../shader/recompiler/shaderIR/ShaderIR.cpp | 4 +- .../recompiler/shaderIR/ShaderIRInternal.h | 52 +- .../recompiler/shaderIR/ShaderIRLog.cpp | 5 +- .../recompiler/shaderIR/ShaderIRMemory.cpp | 7 +- .../recompiler/shaderIR/ShaderIROpcodes.cpp | 6 +- .../spirvEmitter/spirvEmitterInternal.h | 8 +- .../spirvEmitter/spirvEmitterMemory.cpp | 11 +- src/graphics/shader/shader.cpp | 44 +- src/graphics/shader/shader.h | 40 +- src/launcher/src/configurationListWidget.cpp | 4 +- src/libs/agc.cpp | 23 +- src/libs/agcRegisterDefaults.inc | 1710 +++++++++-------- src/libs/libAudio2.cpp | 2 +- 53 files changed, 1622 insertions(+), 1573 deletions(-) diff --git a/src/common/platform/sysWindowsFileIO.cpp b/src/common/platform/sysWindowsFileIO.cpp index 2d6c67b..b066a82 100644 --- a/src/common/platform/sysWindowsFileIO.cpp +++ b/src/common/platform/sysWindowsFileIO.cpp @@ -4,13 +4,17 @@ // #error "KYTY_PLATFORM != KYTY_PLATFORM_WINDOWS" #else +#ifndef NOMINMAX +#define NOMINMAX +#endif +#include // IWYU pragma: keep + #include "common/platform/sysFileIO.h" #include "common/platform/sysTimer.h" #include "common/stringUtils.h" #include #include -#include // IWYU pragma: keep // NOLINTNEXTLINE(readability-identifier-naming) enum sys_file_type_t { diff --git a/src/common/platform/sysWindowsVirtual.cpp b/src/common/platform/sysWindowsVirtual.cpp index 9370787..cf9cd65 100644 --- a/src/common/platform/sysWindowsVirtual.cpp +++ b/src/common/platform/sysWindowsVirtual.cpp @@ -4,12 +4,15 @@ // #error "KYTY_PLATFORM != KYTY_PLATFORM_WINDOWS" #else +#ifndef NOMINMAX +#define NOMINMAX +#endif +#include // IWYU pragma: keep + #include "common/assert.h" #include "common/platform/sysVirtual.h" #include "common/virtualMemory.h" -#include // IWYU pragma: keep - // IWYU pragma: no_include // IWYU pragma: no_include // IWYU pragma: no_include diff --git a/src/graphics/guest_gpu/gpu_format.cpp b/src/graphics/guest_gpu/gpu_format.cpp index 77fdb5f..7045875 100644 --- a/src/graphics/guest_gpu/gpu_format.cpp +++ b/src/graphics/guest_gpu/gpu_format.cpp @@ -28,8 +28,8 @@ constexpr FormatInfo kFormatInfo[] = { {GpuEnumValue(BufferFormat::k16_16UInt), VK_FORMAT_R16G16_UINT, 4, 0, 4, true, true}, {GpuEnumValue(BufferFormat::k16_16SInt), VK_FORMAT_R16G16_SINT, 4, 0, 4, false, false}, {GpuEnumValue(BufferFormat::k16_16Float), VK_FORMAT_R16G16_SFLOAT, 4, 0, 4, true, false}, - {GpuEnumValue(BufferFormat::k11_11_10Float), VK_FORMAT_B10G11R11_UFLOAT_PACK32, 4, 0, 4, - true, false}, + {GpuEnumValue(BufferFormat::k11_11_10Float), VK_FORMAT_B10G11R11_UFLOAT_PACK32, 4, 0, 4, true, + false}, {GpuEnumValue(BufferFormat::k10_10_10_2UNorm), VK_FORMAT_A2B10G10R10_UNORM_PACK32, 4, 0, 4, true, false}, {GpuEnumValue(BufferFormat::k8_8_8_8UNorm), VK_FORMAT_R8G8B8A8_UNORM, 4, 0, 4, true, false}, @@ -50,28 +50,25 @@ constexpr FormatInfo kFormatInfo[] = { {GpuEnumValue(BufferFormat::k16_16_16_16Float), VK_FORMAT_R16G16B16A16_SFLOAT, 8, 0, 8, true, false}, {GpuEnumValue(BufferFormat::k32_32_32UInt), VK_FORMAT_R32G32B32_UINT, 12, 0, 12, true, true}, - {GpuEnumValue(BufferFormat::k32_32_32SInt), VK_FORMAT_R32G32B32_SINT, 12, 0, 12, false, - false}, + {GpuEnumValue(BufferFormat::k32_32_32SInt), VK_FORMAT_R32G32B32_SINT, 12, 0, 12, false, false}, {GpuEnumValue(BufferFormat::k32_32_32Float), VK_FORMAT_R32G32B32_SFLOAT, 12, 0, 12, true, false}, {GpuEnumValue(BufferFormat::k32_32_32_32UInt), VK_FORMAT_R32G32B32A32_UINT, 16, 0, 16, true, true}, {GpuEnumValue(BufferFormat::k32_32_32_32SInt), VK_FORMAT_R32G32B32A32_SINT, 16, 0, 16, false, false}, - {GpuEnumValue(BufferFormat::k32_32_32_32Float), VK_FORMAT_R32G32B32A32_SFLOAT, 16, 0, 16, - true, false}, + {GpuEnumValue(BufferFormat::k32_32_32_32Float), VK_FORMAT_R32G32B32A32_SFLOAT, 16, 0, 16, true, + false}, {GpuEnumValue(BufferFormat::k8_8_8_8Srgb), VK_FORMAT_R8G8B8A8_SRGB, 4, 0, 4, true, false}, {GpuEnumValue(BufferFormat::k9_9_9_5Float), VK_FORMAT_E5B9G9R9_UFLOAT_PACK32, 4, 0, 0, true, false}, - {GpuEnumValue(BufferFormat::k5_6_5UNorm), VK_FORMAT_B5G6R5_UNORM_PACK16, 2, 0, 2, true, - false}, + {GpuEnumValue(BufferFormat::k5_6_5UNorm), VK_FORMAT_B5G6R5_UNORM_PACK16, 2, 0, 2, true, false}, {GpuEnumValue(BufferFormat::k5_5_5_1UNorm), VK_FORMAT_R5G5B5A1_UNORM_PACK16, 2, 0, 2, true, false}, {GpuEnumValue(BufferFormat::k4_4_4_4UNorm), VK_FORMAT_R4G4B4A4_UNORM_PACK16, 2, 0, 2, true, false}, {GpuEnumValue(BufferFormat::kFmask8_S4_F4), VK_FORMAT_R32_SFLOAT, 1, 0, 1, true, false}, - {GpuEnumValue(BufferFormat::kBc1UNorm), VK_FORMAT_BC1_RGBA_UNORM_BLOCK, 0, 8, 0, true, - false}, + {GpuEnumValue(BufferFormat::kBc1UNorm), VK_FORMAT_BC1_RGBA_UNORM_BLOCK, 0, 8, 0, true, false}, {GpuEnumValue(BufferFormat::kBc1Srgb), VK_FORMAT_BC1_RGBA_SRGB_BLOCK, 0, 8, 0, true, false}, {GpuEnumValue(BufferFormat::kBc2UNorm), VK_FORMAT_BC2_UNORM_BLOCK, 0, 16, 0, true, false}, {GpuEnumValue(BufferFormat::kBc2Srgb), VK_FORMAT_BC2_SRGB_BLOCK, 0, 16, 0, true, false}, @@ -88,7 +85,7 @@ constexpr FormatInfo kFormatInfo[] = { }; constexpr auto MakeFormatInfoLookup() { - constexpr uint32_t kMaxFormat = GpuEnumValue(BufferFormat::kBc7Srgb); + constexpr uint32_t kMaxFormat = GpuEnumValue(BufferFormat::kBc7Srgb); std::array lookup {}; for (const auto& info: kFormatInfo) { lookup[info.format] = &info; diff --git a/src/graphics/guest_gpu/graphicsRun.cpp b/src/graphics/guest_gpu/graphicsRun.cpp index 8b9ebed..2316fc7 100644 --- a/src/graphics/guest_gpu/graphicsRun.cpp +++ b/src/graphics/guest_gpu/graphicsRun.cpp @@ -1526,9 +1526,7 @@ void CommandProcessor::WriteAtEndOfPipe(uint32_t cache_policy, uint32_t event_wr switch (interrupt_selector) { case 0x00: case 0x03: with_interrupt = false; break; - case 0x01: - Sync::TriggerEopEventAtEndOfPipe(CurrentBuffer(), interrupt_context_id); - return; + case 0x01: Sync::TriggerEopEventAtEndOfPipe(CurrentBuffer(), interrupt_context_id); return; case 0x02: with_interrupt = true; break; default: EXIT("unknown interrupt_selector\n"); } @@ -1540,11 +1538,11 @@ void CommandProcessor::WriteAtEndOfPipe(uint32_t cache_policy, uint32_t event_wr if (with_interrupt) { if (with_writeback) { - Sync::WriteAtEndOfPipeWithInterruptWriteBack32( - m_submit_id, CurrentBuffer(), dst, data, interrupt_context_id); + Sync::WriteAtEndOfPipeWithInterruptWriteBack32(m_submit_id, CurrentBuffer(), dst, + data, interrupt_context_id); } else { - Sync::WriteAtEndOfPipeWithInterrupt32(m_submit_id, CurrentBuffer(), dst, - data, interrupt_context_id); + Sync::WriteAtEndOfPipeWithInterrupt32(m_submit_id, CurrentBuffer(), dst, data, + interrupt_context_id); } } else if (with_writeback) { Sync::WriteAtEndOfPipeWithWriteBack32(m_submit_id, CurrentBuffer(), dst, data); @@ -1560,8 +1558,8 @@ void CommandProcessor::WriteAtEndOfPipe(uint32_t cache_policy, uint32_t event_wr auto* dst = static_cast(dst_gpu_addr); SynchronizeGpu(); Sync::ReadGds(dst, value & 0xffffu, value >> 16u); - Sync::WriteAtEndOfPipeGds32(m_submit_id, CurrentBuffer(), dst, - value & 0xffffu, value >> 16u); + Sync::WriteAtEndOfPipeGds32(m_submit_id, CurrentBuffer(), dst, value & 0xffffu, + value >> 16u); return; } } else if (eop_event_type == 0x04 && cache_action == 0x00 && event_index == 0x05) { @@ -1588,12 +1586,12 @@ void CommandProcessor::WriteAtEndOfPipe(uint32_t cache_policy, uint32_t event_wr Sync::WriteAtEndOfPipeWithInterruptWriteBack64( m_submit_id, CurrentBuffer(), dst, value, interrupt_context_id); } else { - Sync::WriteAtEndOfPipeWithInterrupt64( - m_submit_id, CurrentBuffer(), dst, value, interrupt_context_id); + Sync::WriteAtEndOfPipeWithInterrupt64(m_submit_id, CurrentBuffer(), dst, + value, interrupt_context_id); } } else if (with_writeback) { - Sync::WriteAtEndOfPipeWithWriteBack64(m_submit_id, CurrentBuffer(), - dst, value); + Sync::WriteAtEndOfPipeWithWriteBack64(m_submit_id, CurrentBuffer(), dst, + value); } else { Sync::WriteAtEndOfPipe64(m_submit_id, CurrentBuffer(), dst, value); } @@ -1669,9 +1667,9 @@ void CommandProcessor::WriteAtEndOfPipe(uint32_t cache_policy, uint32_t event_wr if (((eop_event_type == 0x04 && event_index == 0x05) || (eop_event_type == 0x28 && event_index == 0x00)) && !with_interrupt) { - Sync::WriteAtEndOfPipeClockCounter( - m_submit_id, CurrentBuffer(), static_cast(dst_gpu_addr), - clock); + Sync::WriteAtEndOfPipeClockCounter(m_submit_id, CurrentBuffer(), + static_cast(dst_gpu_addr), + clock); return; } break; @@ -1815,9 +1813,9 @@ void CommandProcessor::Flip() { auto* command = CurrentBuffer(); auto request = Sync::PrepareDisplayBufferFlip(command, m_flip.handle, m_flip.index, - m_flip.flip_mode, m_flip.flip_arg); + m_flip.flip_mode, m_flip.flip_arg); Sync::WriteAtEndOfPipeOnlyFlip(m_submit_id, command, m_flip.handle, m_flip.index, - m_flip.flip_mode, m_flip.flip_arg, request); + m_flip.flip_mode, m_flip.flip_arg, request); m_scheduler.Flush(); } @@ -1836,10 +1834,10 @@ void CommandProcessor::Flip(void* dst_gpu_addr, uint32_t value) { std::memcpy(dst_gpu_addr, &value, sizeof(value)); auto* command = CurrentBuffer(); auto request = Sync::PrepareDisplayBufferFlip(command, m_flip.handle, m_flip.index, - m_flip.flip_mode, m_flip.flip_arg); - Sync::WriteAtEndOfPipeWithFlip32( - m_submit_id, command, static_cast(dst_gpu_addr), value, m_flip.handle, - m_flip.index, m_flip.flip_mode, m_flip.flip_arg, request); + m_flip.flip_mode, m_flip.flip_arg); + Sync::WriteAtEndOfPipeWithFlip32(m_submit_id, command, static_cast(dst_gpu_addr), + value, m_flip.handle, m_flip.index, m_flip.flip_mode, + m_flip.flip_arg, request); m_scheduler.Flush(); } @@ -1864,7 +1862,7 @@ void CommandProcessor::FlipWithInterrupt(uint32_t eop_event_type, uint32_t cache std::memcpy(dst_gpu_addr, &value, sizeof(value)); auto* command = CurrentBuffer(); auto request = Sync::PrepareDisplayBufferFlip(command, m_flip.handle, m_flip.index, - m_flip.flip_mode, m_flip.flip_arg); + m_flip.flip_mode, m_flip.flip_arg); Sync::WriteAtEndOfPipeWithInterruptWriteBackFlip32( m_submit_id, command, static_cast(dst_gpu_addr), value, m_flip.handle, m_flip.index, m_flip.flip_mode, m_flip.flip_arg, request); diff --git a/src/graphics/guest_gpu/tile.cpp b/src/graphics/guest_gpu/tile.cpp index a88e710..2576b88 100644 --- a/src/graphics/guest_gpu/tile.cpp +++ b/src/graphics/guest_gpu/tile.cpp @@ -299,8 +299,7 @@ static bool Gen5Standard64KBLayout(uint32_t format, uint32_t* bytes_per_element, } } -static bool Gen5Thin64KBBlockSizeFromElementBytes(uint32_t bytes_per_element, - uint32_t* block_width, +static bool Gen5Thin64KBBlockSizeFromElementBytes(uint32_t bytes_per_element, uint32_t* block_width, uint32_t* block_height) { // AGC thin 64 KiB block table, shared by depth and render-target tiles. switch (bytes_per_element) { @@ -1181,8 +1180,8 @@ static void ConvertRenderTargetTyped(uint32_t width, uint32_t height, uint32_t p uint32_t block_width = 0; uint32_t block_height = 0; - EXIT_NOT_IMPLEMENTED(!Gen5Thin64KBBlockSizeFromElementBytes( - static_cast(sizeof(T)), &block_width, &block_height)); + EXIT_NOT_IMPLEMENTED(!Gen5Thin64KBBlockSizeFromElementBytes(static_cast(sizeof(T)), + &block_width, &block_height)); const uint64_t blocks_per_row = (static_cast(pitch) + block_width - 1u) / block_width; const uint32_t block_columns = (width == 0 ? 0 : 1u + (width - 1u) / block_width); @@ -1487,9 +1486,9 @@ void TileConvertLinearToTiledStandard64KB32(void* dst, const void* src, uint32_t dst, src, width, height, pitch, size); } - auto* dst32 = static_cast(dst); - const auto* src32 = static_cast(src); - const auto& tables = GetStandard64KB32Tables(); + auto* dst32 = static_cast(dst); + const auto* src32 = static_cast(src); + const auto& tables = GetStandard64KB32Tables(); const auto blocks_per_row = (static_cast(pitch) + 127u) >> 7u; const auto block_rows = (static_cast(height) + 127u) >> 7u; if (blocks_per_row > UINT64_MAX / block_rows / 65536u || @@ -1800,10 +1799,10 @@ static void TileConvertLinearToTiledStandard64KB64Elements( "size=0x%016" PRIx64 " dst_size=0x%016" PRIx64 " dst=%u,%u\n", width_elements, height_elements, pitch_elements, size, dst_size, dst_x, dst_y); } - auto* dst64 = static_cast(dst); - const auto* src64 = static_cast(src); - const auto& tables = GetStandard64KB64Tables(); - const auto size_words = size >> 3u; + auto* dst64 = static_cast(dst); + const auto* src64 = static_cast(src); + const auto& tables = GetStandard64KB64Tables(); + const auto size_words = size >> 3u; const auto dst_size_words = dst_size >> 3u; for (uint32_t y = 0; y < height_elements; y++) { const uint64_t src_row = static_cast(y) * pitch_elements; @@ -2222,14 +2221,12 @@ static void TileConvertDepth(void* dst, const void* src, uint32_t format, uint32 const uint32_t block_width = supported_bpe && bytes_per_element <= 2 ? 256u : 128u; const uint32_t block_height = supported_bpe ? 65536u / (block_width * bytes_per_element) : 0; if (dst == nullptr || src == nullptr || width == 0 || height == 0 || pitch < width || - !supported_bpe || pitch % block_width != 0 || - size == 0 || size % 65536u != 0) { + !supported_bpe || pitch % block_width != 0 || size == 0 || size % 65536u != 0) { EXIT("unsupported depth conversion, dst=%p src=%p format=%u " "extent=%ux%u pitch=%u size=0x%016" PRIx64 "\n", dst, src, format, width, height, pitch, size); } - const uint64_t block_rows = - (static_cast(height) + block_height - 1u) / block_height; + const uint64_t block_rows = (static_cast(height) + block_height - 1u) / block_height; const uint64_t blocks_per_row = pitch / block_width; if (blocks_per_row > UINT64_MAX / block_rows || blocks_per_row * block_rows > UINT64_MAX / 65536u || @@ -2504,13 +2501,13 @@ void TileConvertLinearToTiledRenderTarget(void* dst, const void* src, uint32_t w KYTY_PROFILER_FUNCTION(); const bool tail_block = dst_size != 0 && (dst_x != 0 || dst_y != 0 || size < dst_size); if (tail_block) { - //Not sure about this at all + // Not sure about this at all if (bytes_per_element != 8) { EXIT("unsupported linear-to-tiled render-target tail element size: %u\n", bytes_per_element); } TileConvertLinearToTiledStandard64KB64Elements(dst, src, width, height, pitch, size, - dst_size, dst_x, dst_y); + dst_size, dst_x, dst_y); return; } @@ -2596,8 +2593,8 @@ bool TileGetDepthSize(uint32_t width, uint32_t height, uint32_t pitch, uint32_t uint32_t TileGetRenderTargetPitch(uint32_t width, uint32_t bytes_per_element) { uint32_t block_width = 0; uint32_t block_height = 0; - if (width == 0 || !Gen5Thin64KBBlockSizeFromElementBytes(bytes_per_element, &block_width, - &block_height)) { + if (width == 0 || + !Gen5Thin64KBBlockSizeFromElementBytes(bytes_per_element, &block_width, &block_height)) { return 0; } const uint64_t pitch = (static_cast(width) + block_width - 1u) & @@ -2611,8 +2608,7 @@ bool TileGetRenderTargetSize(uint32_t width, uint32_t height, uint32_t pitch, uint32_t block_width = 0; uint32_t block_height = 0; if (height == 0 || pitch == 0 || - !Gen5Thin64KBBlockSizeFromElementBytes(bytes_per_element, &block_width, - &block_height) || + !Gen5Thin64KBBlockSizeFromElementBytes(bytes_per_element, &block_width, &block_height) || pitch != TileGetRenderTargetPitch(width, bytes_per_element)) { return false; } @@ -2655,8 +2651,8 @@ bool TileGetRenderTargetMipLayout(uint32_t width, uint32_t height, uint32_t pitc default: return false; } TileGetTextureSize(format, width, height, pitch, levels, - Prospero::GpuEnumValue(Prospero::TileMode::kRenderTarget), total_size, level_sizes, - padded_size); + Prospero::GpuEnumValue(Prospero::TileMode::kRenderTarget), total_size, + level_sizes, padded_size); return total_size->size != 0 && total_size->align == 65536; } @@ -2738,8 +2734,8 @@ void TileGetTextureSize(uint32_t format, uint32_t width, uint32_t height, uint32 bytes_per_element != 0 && tile == 27 && levels == 1) { uint32_t block_width = 0; uint32_t block_height = 0; - EXIT_NOT_IMPLEMENTED(!Gen5Thin64KBBlockSizeFromElementBytes( - bytes_per_element, &block_width, &block_height)); + EXIT_NOT_IMPLEMENTED( + !Gen5Thin64KBBlockSizeFromElementBytes(bytes_per_element, &block_width, &block_height)); const uint32_t padded_width = AlignUp(pitch, block_width); const uint32_t padded_height = AlignUp(height, block_height); @@ -2767,8 +2763,8 @@ void TileGetTextureSize(uint32_t format, uint32_t width, uint32_t height, uint32 bytes_per_element != 0 && tile == 27 && levels > 1) { uint32_t block_width = 0; uint32_t block_height = 0; - EXIT_NOT_IMPLEMENTED(!Gen5Thin64KBBlockSizeFromElementBytes( - bytes_per_element, &block_width, &block_height)); + EXIT_NOT_IMPLEMENTED( + !Gen5Thin64KBBlockSizeFromElementBytes(bytes_per_element, &block_width, &block_height)); const uint32_t bytes_log2 = IntLog2(bytes_per_element); const uint32_t tail_width_limit = block_width >> 1u; @@ -2990,11 +2986,11 @@ void TileGetTextureSize(uint32_t format, uint32_t width, uint32_t height, uint32 if (tile == 24 && levels == 1) { const uint32_t bytes_per_element = Prospero::NumBytesPerElement(format); if (bytes_per_element != 0) { - uint32_t block_width = 0; - uint32_t block_height = 0; - const bool supported = bytes_per_element <= 4 && - Gen5Thin64KBBlockSizeFromElementBytes( - bytes_per_element, &block_width, &block_height); + uint32_t block_width = 0; + uint32_t block_height = 0; + const bool supported = + bytes_per_element <= 4 && Gen5Thin64KBBlockSizeFromElementBytes( + bytes_per_element, &block_width, &block_height); if (supported) { const uint32_t padded_width = (pitch + block_width - 1u) & ~(block_width - 1u); @@ -3024,11 +3020,11 @@ void TileGetTextureSize(uint32_t format, uint32_t width, uint32_t height, uint32 if (tile == 24 && levels > 1) { const uint32_t bytes_per_element = Prospero::NumBytesPerElement(format); if (bytes_per_element != 0) { - uint32_t block_width = 0; - uint32_t block_height = 0; - const bool supported = bytes_per_element <= 4 && - Gen5Thin64KBBlockSizeFromElementBytes( - bytes_per_element, &block_width, &block_height); + uint32_t block_width = 0; + uint32_t block_height = 0; + const bool supported = + bytes_per_element <= 4 && Gen5Thin64KBBlockSizeFromElementBytes( + bytes_per_element, &block_width, &block_height); if (supported) { static bool logged = false; @@ -3271,7 +3267,8 @@ uint32_t TileGetTexturePitch(uint32_t format, uint32_t width, uint32_t levels, u uint32_t pitch = width; if (tile == 27) { - if (const uint32_t bytes_per_element = Prospero::NumBytesPerElement(format); bytes_per_element != 0) { + if (const uint32_t bytes_per_element = Prospero::NumBytesPerElement(format); + bytes_per_element != 0) { uint32_t block_width = 0; uint32_t block_height = 0; EXIT_NOT_IMPLEMENTED(!Gen5Thin64KBBlockSizeFromElementBytes( @@ -3281,7 +3278,8 @@ uint32_t TileGetTexturePitch(uint32_t format, uint32_t width, uint32_t levels, u } if (tile == 0) { - if (const auto bytes_per_element = Prospero::NumBytesPerElement(format); bytes_per_element != 0) { + if (const auto bytes_per_element = Prospero::NumBytesPerElement(format); + bytes_per_element != 0) { pitch = AlignUp(pitch * bytes_per_element, 256u) / bytes_per_element; } } @@ -3297,10 +3295,10 @@ uint32_t TileGetTexturePitch(uint32_t format, uint32_t width, uint32_t levels, u } if (tile == 24) { const uint32_t bytes_per_element = Prospero::NumBytesPerElement(format); - uint32_t block_width = 0; - uint32_t block_height = 0; - if (bytes_per_element <= 4 && Gen5Thin64KBBlockSizeFromElementBytes( - bytes_per_element, &block_width, &block_height)) { + uint32_t block_width = 0; + uint32_t block_height = 0; + if (bytes_per_element <= 4 && + Gen5Thin64KBBlockSizeFromElementBytes(bytes_per_element, &block_width, &block_height)) { pitch = AlignUp(pitch, block_width); } } diff --git a/src/graphics/host_gpu/graphicContext.h b/src/graphics/host_gpu/graphicContext.h index ebae4e9..dfb58b6 100644 --- a/src/graphics/host_gpu/graphicContext.h +++ b/src/graphics/host_gpu/graphicContext.h @@ -19,16 +19,16 @@ class CommandBuffer; struct VulkanSwapchain { ~VulkanSwapchain(); - VkSwapchainKHR swapchain = nullptr; - VkFormat swapchain_format = VK_FORMAT_UNDEFINED; - VkExtent2D swapchain_extent = {}; - std::unique_ptr swapchain_images; - std::unique_ptr swapchain_image_views; - uint32_t swapchain_images_count = 0; - std::unique_ptr image_acquired_semaphores; - std::unique_ptr render_complete_semaphores; - uint32_t current_index = 0; - uint32_t present_frame = 0; + VkSwapchainKHR swapchain = nullptr; + VkFormat swapchain_format = VK_FORMAT_UNDEFINED; + VkExtent2D swapchain_extent = {}; + std::unique_ptr swapchain_images; + std::unique_ptr swapchain_image_views; + uint32_t swapchain_images_count = 0; + std::unique_ptr image_acquired_semaphores; + std::unique_ptr render_complete_semaphores; + uint32_t current_index = 0; + uint32_t present_frame = 0; }; struct VulkanCommandPool { diff --git a/src/graphics/host_gpu/pageManager.cpp b/src/graphics/host_gpu/pageManager.cpp index 3240bd6..22fe94f 100644 --- a/src/graphics/host_gpu/pageManager.cpp +++ b/src/graphics/host_gpu/pageManager.cpp @@ -37,9 +37,9 @@ thread_local bool g_in_fault_resolution = false; std::fputs(reason != nullptr ? reason : "invalid page state", stderr); std::fputc('\n', stderr); #if KYTY_PLATFORM == KYTY_PLATFORM_WINDOWS - void* frames[16] {}; - const auto frame_count = CaptureStackBackTrace(0, static_cast(std::size(frames)), frames, - nullptr); + void* frames[16] {}; + const auto frame_count = + CaptureStackBackTrace(0, static_cast(std::size(frames)), frames, nullptr); const auto image_base = reinterpret_cast(GetModuleHandleW(nullptr)); for (uint16_t i = 0; i < frame_count; i++) { const auto address = reinterpret_cast(frames[i]); @@ -572,17 +572,17 @@ bool PageManager::HandleFault(PageFaultAccess access, uint64_t fault_vaddr) noex if (access != PageFaultAccess::Read && access != PageFaultAccess::Write) { return false; } - bool& pending = (access == PageFaultAccess::Read ? page.late_read_pending - : page.late_write_pending); + bool& pending = (access == PageFaultAccess::Read ? page.late_read_pending + : page.late_write_pending); const bool allowed = Impl::AllowsAccess(fault_vaddr, access); pending = false; if (waited && !allowed) { FailFast("page remained inaccessible after waiting for its resolver"); } // More than one CPU can fault before a protection transition becomes visible. The first - // delayed fault consumes the hint bit; later faults must also resume once the mapped page - // already permits the requested access. A genuinely read-only/no-access page still falls - // through to the guest exception path. + // delayed fault consumes the hint bit; later faults must also resume once the mapped + // page already permits the requested access. A genuinely read-only/no-access page still + // falls through to the guest exception path. return allowed; } if ((access != PageFaultAccess::Read && access != PageFaultAccess::Write) || diff --git a/src/graphics/host_gpu/renderer/bufferCache.cpp b/src/graphics/host_gpu/renderer/bufferCache.cpp index 450b4ab..3bf02a7 100644 --- a/src/graphics/host_gpu/renderer/bufferCache.cpp +++ b/src/graphics/host_gpu/renderer/bufferCache.cpp @@ -683,8 +683,8 @@ std::pair BufferCache::ObtainBuffer(CommandBuffer* com // host page protection is irrelevant. if (is_read && !is_written && size <= CACHING_PAGE_SIZE && !m_memory_tracker.IsRegionGpuModified(vaddr, size) && - m_memory_tracker.IsRegionCpuModified(vaddr, size) && - !texture_region.gpu_image_bytes && !texture_region.gpu_metadata_bytes) { + m_memory_tracker.IsRegionCpuModified(vaddr, size) && !texture_region.gpu_image_bytes && + !texture_region.gpu_metadata_bytes) { std::array guest_data; if (Libs::LibKernel::Memory::TryReadBacking(vaddr, guest_data.data(), size)) { VulkanBuffer* stream_buffer = nullptr; @@ -1143,10 +1143,10 @@ void BufferCache::CopyBuffer(CommandBuffer* command, GraphicContext* ctx, uint64 bool dst_image_transition = false; { std::lock_guard transaction(m_resource_mutex); - const auto src_region = m_texture_cache->QueryRegion(src_vaddr, size); - const auto dst_region = m_texture_cache->QueryRegion(dst_vaddr, size); - const bool src_image_gpu = src_region.gpu_image_bytes; - const bool src_meta = src_region.metadata_bytes; + const auto src_region = m_texture_cache->QueryRegion(src_vaddr, size); + const auto dst_region = m_texture_cache->QueryRegion(dst_vaddr, size); + const bool src_image_gpu = src_region.gpu_image_bytes; + const bool src_meta = src_region.metadata_bytes; if (src_region.non_sampled_pages) { EXIT("BufferCache: GPU copy aliases target pages, src=0x%016" PRIx64 " dst=0x%016" PRIx64 " size=0x%016" PRIx64 "\n", @@ -1174,7 +1174,7 @@ void BufferCache::CopyBuffer(CommandBuffer* command, GraphicContext* ctx, uint64 " dst=0x%016" PRIx64 " size=0x%016" PRIx64 "\n", src_vaddr, dst_vaddr, size); } - dst_image_transition = m_texture_cache->InvalidateMemoryFromGPU(dst_vaddr, size); + dst_image_transition = m_texture_cache->InvalidateMemoryFromGPU(dst_vaddr, size); const auto transitioned_dst = m_texture_cache->QueryRegion(dst_vaddr, size); // A clean target destination is handled above like a protected host write. Target // aliases that require an actual GPU buffer copy remain unsupported. diff --git a/src/graphics/host_gpu/renderer/colorRenderTarget.cpp b/src/graphics/host_gpu/renderer/colorRenderTarget.cpp index b863bbb..9218c67 100644 --- a/src/graphics/host_gpu/renderer/colorRenderTarget.cpp +++ b/src/graphics/host_gpu/renderer/colorRenderTarget.cpp @@ -11,8 +11,8 @@ #include "graphics/guest_gpu/tile.h" #include "graphics/host_gpu/graphicContext.h" #include "graphics/host_gpu/objects/textureCommon.h" -#include "graphics/host_gpu/renderer/descriptorCache.h" #include "graphics/host_gpu/renderer/debug.h" +#include "graphics/host_gpu/renderer/descriptorCache.h" #include "graphics/host_gpu/renderer/framebufferCache.h" #include "graphics/host_gpu/renderer/render.h" #include "graphics/host_gpu/renderer/renderContext.h" @@ -374,11 +374,11 @@ void ResolveRenderColorTarget(uint64_t submit_id, CommandBuffer* buffer, const H r->color_clear_enable = false; r->color_clear_value = {}; - uint32_t width = 0; - uint32_t height = 0; - uint32_t pitch = 0; - uint64_t size = 0; - bool tile = false; + uint32_t width = 0; + uint32_t height = 0; + uint32_t pitch = 0; + uint64_t size = 0; + bool tile = false; const bool standard64 = rt.attrib3.tile_mode == Prospero::GpuEnumValue(Prospero::TileMode::kStandard64KB); @@ -402,9 +402,8 @@ void ResolveRenderColorTarget(uint64_t submit_id, CommandBuffer* buffer, const H } if (standard64 && (rt.attrib3.dimension != 1 || rt.attrib3.depth != 0 || levels != 1 || - rt.view.current_mip_level != 0 || - view.base_layer != 0 || view.image_layers != 1 || rt.attrib.num_samples != 0 || - rt.attrib.num_fragments != 0 || bytes_per_element != 4 || + rt.view.current_mip_level != 0 || view.base_layer != 0 || view.image_layers != 1 || + rt.attrib.num_samples != 0 || rt.attrib.num_fragments != 0 || bytes_per_element != 4 || rt.pitch.pitch_div8_minus1 != 0 || (rt.base.addr & 0xffffu) != 0 || rt.info.fmask_compression_enable || rt.info.fmask_data_compression_disable || rt.info.fmask_one_frag_mode || rt.info.cmask_fast_clear_enable || @@ -415,9 +414,8 @@ void ResolveRenderColorTarget(uint64_t submit_id, CommandBuffer* buffer, const H " dimension=%u depth=%u levels=%u layer=%u/%u samples=%u fragments=%u bpe=%u" " cmask=0x%016" PRIx64 " fmask=0x%016" PRIx64 " dcc=0x%016" PRIx64 "\n", rt.base.addr, rt.attrib3.dimension, rt.attrib3.depth, levels, view.base_layer, - view.image_layers, - rt.attrib.num_samples, rt.attrib.num_fragments, bytes_per_element, rt.cmask.addr, - rt.fmask.addr, rt.dcc_addr.addr); + view.image_layers, rt.attrib.num_samples, rt.attrib.num_fragments, bytes_per_element, + rt.cmask.addr, rt.fmask.addr, rt.dcc_addr.addr); } if (rt.pitch.pitch_div8_minus1 != 0) { pitch = (rt.pitch.pitch_div8_minus1 + 1u) << 3u; @@ -438,7 +436,8 @@ void ResolveRenderColorTarget(uint64_t submit_id, CommandBuffer* buffer, const H bool valid_layout = false; if (standard64) { TileGetTextureSize(Prospero::GpuEnumValue(Prospero::BufferFormat::k32Float), width, - height, pitch, levels, rt.attrib3.tile_mode, &layout, nullptr, nullptr); + height, pitch, levels, rt.attrib3.tile_mode, &layout, nullptr, + nullptr); valid_layout = layout.size != 0 && layout.align == 65536; } else { valid_layout = diff --git a/src/graphics/host_gpu/renderer/debug.cpp b/src/graphics/host_gpu/renderer/debug.cpp index 9ae17d4..012b67c 100644 --- a/src/graphics/host_gpu/renderer/debug.cpp +++ b/src/graphics/host_gpu/renderer/debug.cpp @@ -5,8 +5,8 @@ #include "common/emulatorConfig.h" #include "common/logging/log.h" #include "common/stringUtils.h" -#include "graphics/guest_gpu/hardwareContext.h" #include "graphics/guest_gpu/gpu_defs.h" +#include "graphics/guest_gpu/hardwareContext.h" #include "graphics/host_gpu/renderer/render.h" #include diff --git a/src/graphics/host_gpu/renderer/depthRenderTarget.cpp b/src/graphics/host_gpu/renderer/depthRenderTarget.cpp index 374f2e0..f43a273 100644 --- a/src/graphics/host_gpu/renderer/depthRenderTarget.cpp +++ b/src/graphics/host_gpu/renderer/depthRenderTarget.cpp @@ -129,10 +129,9 @@ void ResolveRenderDepthTarget(uint64_t submit_id, CommandBuffer* buffer, const H // DB_DEPTH_SIZE_XY is independent state and may remain programmed after the attachment // formats and addresses are unbound. A zero encoding is the valid 1x1 value, so its // presence alone must not manufacture a depth attachment. - !z.z_info.tile_surface_enable && !z.width_height_valid && - !z.pitch_height_valid && z.size.x_max == 0 && z.size.y_max == 0 && - z.pitch_div8_minus1 == 0 && z.height_div8_minus1 == 0 && z.slice_div64_minus1 == 0 && - z.width == 0 && z.height == 0; + !z.z_info.tile_surface_enable && !z.width_height_valid && !z.pitch_height_valid && + z.size.x_max == 0 && z.size.y_max == 0 && z.pitch_div8_minus1 == 0 && + z.height_div8_minus1 == 0 && z.slice_div64_minus1 == 0 && z.width == 0 && z.height == 0; if (attachment_unbound) { static std::atomic_bool logged = false; if (!logged.exchange(true, std::memory_order_relaxed)) { diff --git a/src/graphics/host_gpu/renderer/descriptors.cpp b/src/graphics/host_gpu/renderer/descriptors.cpp index 20758f1..2820276 100644 --- a/src/graphics/host_gpu/renderer/descriptors.cpp +++ b/src/graphics/host_gpu/renderer/descriptors.cpp @@ -148,61 +148,61 @@ NativeSamplerDescriptor(const ShaderRecompiler::IR::DescriptorValue& descriptor) } static BufferView NativeStorageBuffer(uint64_t submit_id, CommandBuffer* command_buffer, - const ShaderBufferResource& descriptor, - const ShaderRecompiler::IR::BufferResource& resource) { + const ShaderBufferResource& descriptor, + const ShaderRecompiler::IR::BufferResource& resource) { BufferView result; - //Regression - // Bind a null buffer when these four dwords are - // the tracked prefix of an active image sharp. Image validity is encoded by dword 3 bit 31. + // Regression + // Bind a null buffer when these four dwords are + // the tracked prefix of an active image sharp. Image validity is encoded by dword 3 bit 31. /*if (resource.image_alias != ShaderRecompiler::IR::BufferResource::NoImageAlias && (descriptor.Type() & 2u) != 0) { - BindNullStorageBuffer(command_buffer, &result); - return result; + BindNullStorageBuffer(command_buffer, &result); + return result; } // Buffer TYPE is zero. A nonzero value means a buffer instruction received the first four // dwords of an image sharp without a tracked image alias; support the known write-only path. if (descriptor.Type() != 0) { - ShaderTextureResource texture {}; - std::copy_n(descriptor.fields, 4, texture.fields); - const auto width = static_cast(texture.Width5()) + 1u; - const auto height = static_cast(texture.Height5()) + 1u; - const auto format = texture.Format(); - const auto tile = texture.TileMode(); - const auto type = texture.Type(); - const auto address = texture.Base40(); - const auto pitch = TileGetTexturePitch(format, width, 1, tile); - TileSizeAlign footprint {}; - TileGetTextureTotalSize(format, width, height, 1, pitch, 1, tile, false, &footprint); - const bool supported = - resource.formatted && resource.written && !resource.read && !resource.atomic && - format == Prospero::GpuEnumValue(Prospero::BufferFormat::k8_8_8_8UInt) && - tile == Prospero::GpuEnumValue(Prospero::TileMode::kRenderTarget) && - type == Prospero::GpuEnumValue(Prospero::ImageType::kColor2D) && - texture.DstSelXYZW() == DstSel(4, 5, 6, 7) && address != 0 && footprint.size != 0 && - footprint.align == 65536; - if (!supported) { - EXIT("unsupported texture descriptor used as storage buffer: type=%u format=%u" - " tile=%u swizzle=0x%03x extent=%ux%u read=%d written=%d formatted=%d atomic=%d\n", - type, format, tile, texture.DstSelXYZW(), width, height, resource.read, - resource.written, resource.formatted, resource.atomic); - } - auto* ctx = g_render_ctx->GetGraphicCtx(); - g_render_ctx->GetBufferCache()->ValidateGpuAccess(address, footprint.size, false, true); - auto binding = g_render_ctx->GetBufferCache()->ObtainBuffer( - command_buffer, ctx, address, footprint.size, true, false, true); - const auto alignment = ctx->StorageMinAlignment(); - if (alignment == 0 || binding.second % alignment != 0 || - footprint.size > ctx->GetPhysicalDeviceProperties().limits.maxStorageBufferRange) { - EXIT("texture-backed storage buffer binding is unsupported: addr=0x%016" PRIx64 - " size=0x%016" PRIx64 " offset=0x%016" PRIx64 " alignment=0x%016" PRIx64 "\n", - address, footprint.size, static_cast(binding.second), - static_cast(alignment)); - } - result.buffer = binding.first; - result.offset = binding.second; - result.range = footprint.size; - return result; + ShaderTextureResource texture {}; + std::copy_n(descriptor.fields, 4, texture.fields); + const auto width = static_cast(texture.Width5()) + 1u; + const auto height = static_cast(texture.Height5()) + 1u; + const auto format = texture.Format(); + const auto tile = texture.TileMode(); + const auto type = texture.Type(); + const auto address = texture.Base40(); + const auto pitch = TileGetTexturePitch(format, width, 1, tile); + TileSizeAlign footprint {}; + TileGetTextureTotalSize(format, width, height, 1, pitch, 1, tile, false, &footprint); + const bool supported = + resource.formatted && resource.written && !resource.read && !resource.atomic && + format == Prospero::GpuEnumValue(Prospero::BufferFormat::k8_8_8_8UInt) && + tile == Prospero::GpuEnumValue(Prospero::TileMode::kRenderTarget) && + type == Prospero::GpuEnumValue(Prospero::ImageType::kColor2D) && + texture.DstSelXYZW() == DstSel(4, 5, 6, 7) && address != 0 && footprint.size != 0 && + footprint.align == 65536; + if (!supported) { + EXIT("unsupported texture descriptor used as storage buffer: type=%u format=%u" + " tile=%u swizzle=0x%03x extent=%ux%u read=%d written=%d formatted=%d atomic=%d\n", + type, format, tile, texture.DstSelXYZW(), width, height, resource.read, + resource.written, resource.formatted, resource.atomic); + } + auto* ctx = g_render_ctx->GetGraphicCtx(); + g_render_ctx->GetBufferCache()->ValidateGpuAccess(address, footprint.size, false, true); + auto binding = g_render_ctx->GetBufferCache()->ObtainBuffer( + command_buffer, ctx, address, footprint.size, true, false, true); + const auto alignment = ctx->StorageMinAlignment(); + if (alignment == 0 || binding.second % alignment != 0 || + footprint.size > ctx->GetPhysicalDeviceProperties().limits.maxStorageBufferRange) { + EXIT("texture-backed storage buffer binding is unsupported: addr=0x%016" PRIx64 + " size=0x%016" PRIx64 " offset=0x%016" PRIx64 " alignment=0x%016" PRIx64 "\n", + address, footprint.size, static_cast(binding.second), + static_cast(alignment)); + } + result.buffer = binding.first; + result.offset = binding.second; + result.range = footprint.size; + return result; }*/ const auto address = descriptor.Base48(); const auto stride = descriptor.Stride(); @@ -299,9 +299,9 @@ static bool IsSupportedSampledColorResource(const ShaderRecompiler::IR::ImageRes !resource.written && !resource.atomic && !resource.depth_compare; } -TargetTextureViewInfo -ResolveTargetTextureView(const ShaderRecompiler::IR::ImageResource& resource, - Prospero::ImageType type, uint32_t base_layer, uint32_t image_layers) { +TargetTextureViewInfo ResolveTargetTextureView(const ShaderRecompiler::IR::ImageResource& resource, + Prospero::ImageType type, uint32_t base_layer, + uint32_t image_layers) { switch (type) { case Prospero::ImageType::kColor2D: return resource.dimension == ShaderRecompiler::Decoder::ImageDimension::Dim2D && @@ -338,16 +338,15 @@ bool IsSupportedDepthTargetDescriptor(const ShaderTextureResource& descriptor, const auto height = static_cast(descriptor.Height5()) + 1u; const auto pitch = TileGetTexturePitch(descriptor.Format(), width, 1, descriptor.TileMode()); const auto type = static_cast(descriptor.Type()); - const bool supported_type = type == Prospero::ImageType::kColor2D || - type == Prospero::ImageType::kColor2DArray; + const bool supported_type = + type == Prospero::ImageType::kColor2D || type == Prospero::ImageType::kColor2DArray; return image.type == VulkanImageType::DepthStencil && image.layers == 1 && width == image.extent.width && height == image.extent.height && descriptor.Depth() == 0 && descriptor.BaseLevel() == 0 && descriptor.LastLevel() == 0 && descriptor.MaxMip() == 0 && descriptor.MinLod() == 0 && descriptor.BaseArray5() == 0 && descriptor.TileMode() == Prospero::GpuEnumValue(Prospero::TileMode::kDepth) && - supported_type && - descriptor.BCSwizzle() == 0 && !descriptor.MsaaDepth() && pitch >= width && - pitch == image.guest_pitch; + supported_type && descriptor.BCSwizzle() == 0 && !descriptor.MsaaDepth() && + pitch >= width && pitch == image.guest_pitch; } static bool IsSupportedDepthTextureEncoding(const ShaderTextureResource& descriptor) { @@ -355,13 +354,13 @@ static bool IsSupportedDepthTextureEncoding(const ShaderTextureResource& descrip constexpr uint32_t field2_reserved_mask = 0xf0003000u; constexpr uint32_t field3_common = 0x01800000u; constexpr uint32_t field5_expected = 0x00700000u; - const uint32_t field3_expected = + const uint32_t field3_expected = (descriptor.Type() << 28u) | field3_common | descriptor.DstSelXYZW(); return (descriptor.fields[1] & field1_reserved_mask) == 0 && (descriptor.fields[2] & field2_reserved_mask) == 0 && - descriptor.fields[3] == field3_expected && - descriptor.fields[4] == 0 && descriptor.fields[5] == field5_expected && - descriptor.fields[6] == 0 && descriptor.fields[7] == 0; + descriptor.fields[3] == field3_expected && descriptor.fields[4] == 0 && + descriptor.fields[5] == field5_expected && descriptor.fields[6] == 0 && + descriptor.fields[7] == 0; } static void ValidateDepthTargetBinding(const ShaderRecompiler::IR::ImageResource& resource, @@ -567,8 +566,8 @@ NativeTexture(uint64_t submit_id, CommandBuffer* command_buffer, descriptor.MsaaDepth(); if (image == nullptr) { if (check_depth) { - image = g_render_ctx->GetTextureCache()->FindDepthTargetByRange( - command_buffer, address, size.size, true); + image = g_render_ctx->GetTextureCache()->FindDepthTargetByRange(command_buffer, address, + size.size, true); } else { image = g_render_ctx->GetTextureCache()->FindRenderTargetByRange(command_buffer, address, size.size); @@ -594,7 +593,8 @@ NativeTexture(uint64_t submit_id, CommandBuffer* command_buffer, resource, type, descriptor.BaseArray5(), image->layers); ValidateDepthTargetBinding(resource, descriptor, image, view_format, size.size); if (depth_view.type == VK_IMAGE_VIEW_TYPE_MAX_ENUM) { - EXIT("unsupported sampled depth target view: dimension=%u descriptor_type=%u " + EXIT("unsupported sampled depth target view: dimension=%u " + "descriptor_type=%u " "base_array=%u image_layers=%u\n", static_cast(resource.dimension), descriptor.Type(), descriptor.BaseArray5(), image->layers); diff --git a/src/graphics/host_gpu/renderer/descriptors.h b/src/graphics/host_gpu/renderer/descriptors.h index 4c57fc7..ff5ea2f 100644 --- a/src/graphics/host_gpu/renderer/descriptors.h +++ b/src/graphics/host_gpu/renderer/descriptors.h @@ -19,8 +19,7 @@ struct TargetTextureViewInfo { [[nodiscard]] TargetTextureViewInfo ResolveTargetTextureView(const ShaderRecompiler::IR::ImageResource& resource, - Prospero::ImageType type, uint32_t base_layer, - uint32_t image_layers); + Prospero::ImageType type, uint32_t base_layer, uint32_t image_layers); [[nodiscard]] bool IsSupportedDepthTargetDescriptor(const ShaderTextureResource& descriptor, const VulkanImage& image); diff --git a/src/graphics/host_gpu/renderer/dummyTextureCache.cpp b/src/graphics/host_gpu/renderer/dummyTextureCache.cpp index 91114cd..68f35ba 100644 --- a/src/graphics/host_gpu/renderer/dummyTextureCache.cpp +++ b/src/graphics/host_gpu/renderer/dummyTextureCache.cpp @@ -34,7 +34,7 @@ DummyTextureCache::~DummyTextureCache() { } VulkanImage* DummyTextureCache::Get(GraphicContext* ctx, Usage usage, bool uint_format, - bool image_3d) { + bool image_3d) { Common::LockGuard lock(m_mutex); if (ctx == nullptr) { EXIT("TextureCache: dummy texture requires a graphics context\n"); diff --git a/src/graphics/host_gpu/renderer/dummyTextureCache.h b/src/graphics/host_gpu/renderer/dummyTextureCache.h index 2dc0609..e157502 100644 --- a/src/graphics/host_gpu/renderer/dummyTextureCache.h +++ b/src/graphics/host_gpu/renderer/dummyTextureCache.h @@ -12,7 +12,7 @@ namespace Libs::Graphics { class DummyTextureCache final { public: - enum class Usage: uint8_t { Sampled, Storage }; + enum class Usage : uint8_t { Sampled, Storage }; DummyTextureCache() = default; ~DummyTextureCache(); diff --git a/src/graphics/host_gpu/renderer/image.cpp b/src/graphics/host_gpu/renderer/image.cpp index 1cc21e3..7cde47f 100644 --- a/src/graphics/host_gpu/renderer/image.cpp +++ b/src/graphics/host_gpu/renderer/image.cpp @@ -40,10 +40,9 @@ TextureImageCreateParams MakeImageParams(const ImageInfo& info, bool storage) { params.image_layout = TextureUploadDestination::MipLevels; params.allow_cube_view = !storage; params.compatible_format_views = - storage && - (IsRgba8SrgbViewFormat(TextureGetFormat(info.format, params.format_usage)) || - info.format == Prospero::GpuEnumValue(Prospero::BufferFormat::k32UInt) || - info.format == Prospero::GpuEnumValue(Prospero::BufferFormat::k32Float)); + storage && (IsRgba8SrgbViewFormat(TextureGetFormat(info.format, params.format_usage)) || + info.format == Prospero::GpuEnumValue(Prospero::BufferFormat::k32UInt) || + info.format == Prospero::GpuEnumValue(Prospero::BufferFormat::k32Float)); params.owner = storage ? "StorageTextureCache" : "TextureCache"; return params; } @@ -60,7 +59,8 @@ bool RenderTargetSupportsStorage(GraphicContext* ctx, VkFormat format, VkImageCr VkImageCreateFlags RenderTargetCreateFlags(VkFormat format) { const bool compatible_format_view = - IsRgba8SrgbViewFormat(format) || BgraToRgbaSampledViewFormat(format) != VK_FORMAT_UNDEFINED || + IsRgba8SrgbViewFormat(format) || + BgraToRgbaSampledViewFormat(format) != VK_FORMAT_UNDEFINED || format == VK_FORMAT_R8G8B8A8_UINT || format == VK_FORMAT_R16G16B16A16_SFLOAT || format == VK_FORMAT_R16G16B16A16_UINT; return compatible_format_view @@ -69,7 +69,7 @@ VkImageCreateFlags RenderTargetCreateFlags(VkFormat format) { } VkImageUsageFlags RenderTargetUsage(GraphicContext* ctx, VkFormat format, - VkImageCreateFlags flags) { + VkImageCreateFlags flags) { auto usage = static_cast(VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT) | static_cast(VK_IMAGE_USAGE_TRANSFER_SRC_BIT) | static_cast(VK_IMAGE_USAGE_TRANSFER_DST_BIT) | @@ -107,8 +107,7 @@ static constexpr uint32_t DummyTextureSwizzle() { } TextureImageCreateParams MakeDummyTextureParams(bool uint_format, bool image_3d, - TextureFormatUsage usage, - const char* owner) { + TextureFormatUsage usage, const char* owner) { TextureImageCreateParams params {}; params.fmt = static_cast( Prospero::GpuEnumValue(uint_format ? Prospero::BufferFormat::k8_8_8_8UInt @@ -140,7 +139,7 @@ uint32_t RenderTargetTransferFormat(uint32_t bytes_per_element) { } GpuTextureVulkanImage* CreateTexture(GraphicContext* ctx, const ImageInfo& info, bool storage, - VulkanMemory* memory, VkComponentMapping* components) { + VulkanMemory* memory, VkComponentMapping* components) { if (components == nullptr) { EXIT("TextureCache: invalid texture component output\n"); } @@ -151,7 +150,7 @@ GpuTextureVulkanImage* CreateTexture(GraphicContext* ctx, const ImageInfo& info, } void CreateTextureViews(GraphicContext* ctx, GpuTextureVulkanImage* image, const ImageInfo& info, - bool storage, VkComponentMapping components) { + bool storage, VkComponentMapping components) { if (storage) { TextureCreateImageViews(ctx, image, components, info.type, 0, 0, 1, info.depth, false, TextureFormatUsage::Sampled | TextureFormatUsage::Storage); @@ -162,8 +161,8 @@ void CreateTextureViews(GraphicContext* ctx, GpuTextureVulkanImage* image, const } void UploadRenderTargetLayers(GraphicContext* ctx, RenderTextureVulkanImage* image, - const RenderTargetInfo& info, uint32_t base_layer, - uint32_t layer_count, bool refresh) { + const RenderTargetInfo& info, uint32_t base_layer, + uint32_t layer_count, bool refresh) { if (info.layers == 0 || info.size % info.layers != 0 || layer_count == 0 || base_layer >= info.layers || layer_count > info.layers - base_layer || image == nullptr || base_layer >= image->layers || layer_count > image->layers - base_layer) { @@ -218,12 +217,12 @@ void UploadRenderTargetLayers(GraphicContext* ctx, RenderTextureVulkanImage* ima } void UploadRenderTarget(GraphicContext* ctx, RenderTextureVulkanImage* image, - const RenderTargetInfo& info, bool refresh) { + const RenderTargetInfo& info, bool refresh) { UploadRenderTargetLayers(ctx, image, info, 0, info.layers, refresh); } RenderTextureVulkanImage* CreateRenderTarget(GraphicContext* ctx, const RenderTargetInfo& info, - VulkanMemory* memory) { + VulkanMemory* memory) { auto* image = new RenderTextureVulkanImage; image->extent.width = info.width; image->extent.height = info.height; @@ -257,7 +256,7 @@ RenderTextureVulkanImage* CreateRenderTarget(GraphicContext* ctx, const RenderTa } DepthStencilVulkanImage* CreateDepthTarget(GraphicContext* ctx, const DepthTargetInfo& info, - VulkanMemory* memory) { + VulkanMemory* memory) { VkImageCreateInfo create {}; create.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO; create.imageType = VK_IMAGE_TYPE_2D; @@ -333,7 +332,7 @@ void ValidateVideoOut(GraphicContext* ctx, const VideoOutInfo& info) { } VideoOutVulkanImage* CreateVideoOut(GraphicContext* ctx, const VideoOutInfo& info, - VulkanMemory* memory) { + VulkanMemory* memory) { auto* image = new VideoOutVulkanImage; image->extent.width = info.width; image->extent.height = info.height; @@ -365,7 +364,7 @@ VideoOutVulkanImage* CreateVideoOut(GraphicContext* ctx, const VideoOutInfo& inf } void UploadVideoOut(GraphicContext* ctx, VideoOutVulkanImage* image, const VideoOutInfo& info, - bool refresh) { + bool refresh) { if (info.compression != VideoOutCompression::Uncompressed) { EXIT("TextureCache: compressed video-out guest upload is unsupported, " "addr=0x%016" PRIx64 " metadata=0x%016" PRIx64 " dcc=0x%08" PRIx32 "\n", @@ -390,17 +389,17 @@ void UploadVideoOut(GraphicContext* ctx, VideoOutVulkanImage* image, const Video } GpuTextureVulkanImage* CreateDummyTexture(GraphicContext* ctx, bool uint_format, bool image_3d, - bool storage, VulkanMemory* memory) { + bool storage, VulkanMemory* memory) { if (memory == nullptr || memory->allocation != nullptr) { EXIT("TextureCache: invalid dummy texture memory slot, slot=%p allocation=%p storage=%d\n", static_cast(memory), memory == nullptr ? nullptr : static_cast(memory->allocation), storage); } - auto* image = storage ? static_cast(new StorageTextureVulkanImage) - : new TextureVulkanImage; - auto usage = storage ? TextureFormatUsage::Storage : TextureFormatUsage::Sampled; - auto layout = storage ? VK_IMAGE_LAYOUT_GENERAL : VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL; - auto owner = storage ? "DummyStorageTexture" : "DummySampledTexture"; + auto* image = storage ? static_cast(new StorageTextureVulkanImage) + : new TextureVulkanImage; + auto usage = storage ? TextureFormatUsage::Storage : TextureFormatUsage::Sampled; + auto layout = storage ? VK_IMAGE_LAYOUT_GENERAL : VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL; + auto owner = storage ? "DummyStorageTexture" : "DummySampledTexture"; auto params = MakeDummyTextureParams(uint_format, image_3d, usage, owner); auto components = TextureCreateImage(ctx, image, memory, params); diff --git a/src/graphics/host_gpu/renderer/image.h b/src/graphics/host_gpu/renderer/image.h index ea49c1d..0da90c6 100644 --- a/src/graphics/host_gpu/renderer/image.h +++ b/src/graphics/host_gpu/renderer/image.h @@ -23,26 +23,26 @@ struct Image final: ImageInfo { EXIT("dirty sampled image cannot be reassigned\n"); } static_cast(*this) = value; - m_track_begin = address; - m_track_end = address + size; - m_maybe_cpu_hash_valid = false; + m_track_begin = address; + m_track_end = address + size; + m_maybe_cpu_hash_valid = false; return *this; } void InvalidateCpuWrite(uint64_t vaddr, uint64_t size) { if (ImageRangeOverlaps(address, this->size, vaddr, size)) { - m_cpu_dirty = true; - m_maybe_cpu_dirty = false; + m_cpu_dirty = true; + m_maybe_cpu_dirty = false; m_maybe_cpu_hash_valid = false; - m_track_begin = m_track_end; + m_track_begin = m_track_end; } else if (ImagePageRangesOverlap(address, this->size, vaddr, size)) { constexpr uint64_t page_mask = 4096 - 1; if (vaddr + size <= address) { const auto next_page = (address + page_mask) & ~page_mask; - m_track_begin = std::min(m_track_end, std::max(m_track_begin, next_page)); + m_track_begin = std::min(m_track_end, std::max(m_track_begin, next_page)); } else if (vaddr >= address + this->size) { const auto page = (address + this->size) & ~page_mask; - m_track_end = std::max(m_track_begin, std::min(m_track_end, page)); + m_track_end = std::max(m_track_begin, std::min(m_track_end, page)); } m_maybe_cpu_dirty = m_track_begin == m_track_end; } @@ -82,27 +82,27 @@ struct Image final: ImageInfo { if (!IsCpuDirty()) { EXIT("clean sampled image cannot complete a refresh\n"); } - m_cpu_dirty = false; - m_maybe_cpu_dirty = false; + m_cpu_dirty = false; + m_maybe_cpu_dirty = false; m_maybe_cpu_hash_valid = false; - m_track_begin = address; - m_track_end = address + size; + m_track_begin = address; + m_track_end = address + size; } private: - bool m_cpu_dirty = false; - bool m_maybe_cpu_dirty = false; - bool m_maybe_cpu_hash_valid = false; - uint64_t m_track_begin = 0; - uint64_t m_track_end = 0; - uint64_t m_maybe_cpu_hash = 0; + bool m_cpu_dirty = false; + bool m_maybe_cpu_dirty = false; + bool m_maybe_cpu_hash_valid = false; + uint64_t m_track_begin = 0; + uint64_t m_track_end = 0; + uint64_t m_maybe_cpu_hash = 0; }; namespace ImageOps { -[[nodiscard]] GpuTextureVulkanImage* -CreateTexture(GraphicContext* ctx, const ImageInfo& info, bool storage, VulkanMemory* memory, - VkComponentMapping* components); +[[nodiscard]] GpuTextureVulkanImage* CreateTexture(GraphicContext* ctx, const ImageInfo& info, + bool storage, VulkanMemory* memory, + VkComponentMapping* components); void CreateTextureViews(GraphicContext* ctx, GpuTextureVulkanImage* image, const ImageInfo& info, bool storage, VkComponentMapping components); @@ -118,15 +118,15 @@ void UploadRenderTarget(GraphicContext* ctx, RenderTextureVulkanImage* image, [[nodiscard]] DepthStencilVulkanImage* CreateDepthTarget(GraphicContext* ctx, const DepthTargetInfo& info, VulkanMemory* memory); -void ValidateVideoOut(GraphicContext* ctx, const VideoOutInfo& info); -[[nodiscard]] VideoOutVulkanImage* -CreateVideoOut(GraphicContext* ctx, const VideoOutInfo& info, VulkanMemory* memory); +void ValidateVideoOut(GraphicContext* ctx, const VideoOutInfo& info); +[[nodiscard]] VideoOutVulkanImage* CreateVideoOut(GraphicContext* ctx, const VideoOutInfo& info, + VulkanMemory* memory); void UploadVideoOut(GraphicContext* ctx, VideoOutVulkanImage* image, const VideoOutInfo& info, bool refresh); -[[nodiscard]] GpuTextureVulkanImage* -CreateDummyTexture(GraphicContext* ctx, bool uint_format, bool image_3d, bool storage, - VulkanMemory* memory); +[[nodiscard]] GpuTextureVulkanImage* CreateDummyTexture(GraphicContext* ctx, bool uint_format, + bool image_3d, bool storage, + VulkanMemory* memory); void Destroy(GraphicContext* ctx, GpuTextureVulkanImage* image, VulkanMemory* memory); void Destroy(GraphicContext* ctx, RenderTextureVulkanImage* image, VulkanMemory* memory); diff --git a/src/graphics/host_gpu/renderer/imageInfo.h b/src/graphics/host_gpu/renderer/imageInfo.h index a3fcea0..f89def2 100644 --- a/src/graphics/host_gpu/renderer/imageInfo.h +++ b/src/graphics/host_gpu/renderer/imageInfo.h @@ -225,12 +225,7 @@ FindGuestDepthFormatPolicy(uint32_t guest_format) noexcept { : info.format == policy->depth_attachment_format); } -enum class VideoOutCompression : uint8_t { - Uncompressed, - Dcc256_256_0, - Dcc256_64_64, - Unsupported -}; +enum class VideoOutCompression : uint8_t { Uncompressed, Dcc256_256_0, Dcc256_64_64, Unsupported }; struct VideoOutInfo { uint64_t address = 0; @@ -381,15 +376,16 @@ enum class BufferImageWrite : uint8_t { enum class StorageBufferRebind : uint8_t { Reuse, RefreshFromBacking, Unsupported }; enum class MetaImageOverlap : uint8_t { RetainSampled, RetireTarget, Unsupported }; -[[nodiscard]] inline constexpr uint32_t SelectImageBackingBaseLevel(bool storage, - uint32_t view_base_level) { +[[nodiscard]] inline constexpr uint32_t SelectImageBackingBaseLevel(bool storage, + uint32_t view_base_level) { // Storage descriptors select a per-mip view of one full allocation. Backing creation must not // depend on which view happens to be bound first. return storage ? 0u : view_base_level; } -[[nodiscard]] inline constexpr bool IsDepthUintTextureReinterpretation( - VkFormat image_format, uint32_t guest_format, VkFormat view_format) noexcept { +[[nodiscard]] inline constexpr bool +IsDepthUintTextureReinterpretation(VkFormat image_format, uint32_t guest_format, + VkFormat view_format) noexcept { switch (image_format) { case VK_FORMAT_D32_SFLOAT: return guest_format == Prospero::GpuEnumValue(Prospero::BufferFormat::k32UInt) && @@ -399,7 +395,7 @@ enum class MetaImageOverlap : uint8_t { RetainSampled, RetireTarget, Unsupported } [[nodiscard]] inline constexpr bool NeedsStaticSampledArrayView(bool shader_array, - bool dynamic_view_selected) { + bool dynamic_view_selected) { return shader_array && !dynamic_view_selected; } @@ -429,8 +425,8 @@ SelectStorageSampledViewShape(uint32_t type, uint32_t depth, uint32_t backing_la } } -[[nodiscard]] inline constexpr bool IsSupportedDisplayRenderTargetTileMode( - uint32_t tile_mode) noexcept { +[[nodiscard]] inline constexpr bool +IsSupportedDisplayRenderTargetTileMode(uint32_t tile_mode) noexcept { return tile_mode == Prospero::GpuEnumValue(Prospero::TileMode::kRenderTarget); } @@ -637,18 +633,16 @@ SelectDepthTransitionSource(bool depth_load_clear, bool sampled_native_available } [[nodiscard]] inline bool IsRgba16UintFloatReinterpretation(VkFormat cached, - VkFormat requested) noexcept { + VkFormat requested) noexcept { switch (cached) { - case VK_FORMAT_R16G16B16A16_SFLOAT: - return requested == VK_FORMAT_R16G16B16A16_UINT; - case VK_FORMAT_R16G16B16A16_UINT: - return requested == VK_FORMAT_R16G16B16A16_SFLOAT; + case VK_FORMAT_R16G16B16A16_SFLOAT: return requested == VK_FORMAT_R16G16B16A16_UINT; + case VK_FORMAT_R16G16B16A16_UINT: return requested == VK_FORMAT_R16G16B16A16_SFLOAT; default: return false; } } [[nodiscard]] inline bool IsRgba8UnormUintReinterpretation(VkFormat cached, - VkFormat requested) noexcept { + VkFormat requested) noexcept { switch (cached) { case VK_FORMAT_R8G8B8A8_UNORM: return requested == VK_FORMAT_R8G8B8A8_UINT; case VK_FORMAT_R8G8B8A8_UINT: return requested == VK_FORMAT_R8G8B8A8_UNORM; @@ -656,7 +650,7 @@ SelectDepthTransitionSource(bool depth_load_clear, bool sampled_native_available } } -[[nodiscard]] inline bool IsSampledDepthExpansion(const ImageInfo& sampled, +[[nodiscard]] inline bool IsSampledDepthExpansion(const ImageInfo& sampled, const DepthTargetInfo& target) noexcept { const bool array_expansion = sampled.type == Prospero::GpuEnumValue(Prospero::ImageType::kColor2DArray) && @@ -664,14 +658,13 @@ SelectDepthTransitionSource(bool depth_load_clear, bool sampled_native_available sampled.size == target.size * sampled.depth && sampled.width == target.width && sampled.height == target.height && sampled.pitch == target.pitch; return sampled.address == target.address && sampled.size > target.size && - sampled.format == target.guest_format && - target.format == VK_FORMAT_D32_SFLOAT && + sampled.format == target.guest_format && target.format == VK_FORMAT_D32_SFLOAT && target.guest_format == Prospero::GpuEnumValue(Prospero::BufferFormat::k32Float) && target.bytes_per_element == 4 && target.stencil_address == 0 && target.stencil_size == 0 && target.htile_address == 0 && target.htile_size == 0 && - target.layers == 1 && array_expansion && - sampled.base_level == 0 && sampled.levels == 1 && sampled.view_levels == 1 && - sampled.tile == target.tile_mode && sampled.base_array == 0; + target.layers == 1 && array_expansion && sampled.base_level == 0 && + sampled.levels == 1 && sampled.view_levels == 1 && sampled.tile == target.tile_mode && + sampled.base_array == 0; } [[nodiscard]] inline StorageSampledOverlap @@ -776,8 +769,8 @@ ClassifyBufferImageWrite(uint64_t buffer_address, uint64_t buffer_size, uint64_t [[nodiscard]] inline StorageBufferRebind ClassifyStorageBufferRebind(bool buffer_overlap, bool cached_gpu_modified, - bool cached_buffer_modified, bool tracker_gpu_modified, - bool tracker_cpu_modified, bool coherent_guest_source) noexcept { + bool cached_buffer_modified, bool tracker_gpu_modified, + bool tracker_cpu_modified, bool coherent_guest_source) noexcept { if (cached_gpu_modified != tracker_gpu_modified || (tracker_gpu_modified && tracker_cpu_modified)) { return StorageBufferRebind::Unsupported; @@ -832,13 +825,13 @@ ClassifyStorageBufferRebind(bool buffer_overlap, bool cached_gpu_modified, // Mirrors storage -> depth-target binding transition. An inaccessible stencil aspect // does not require the otherwise necessary image content copy. -[[nodiscard]] inline DepthOverlap ClassifyStorageDepthOverlap(const ImageInfo& storage, +[[nodiscard]] inline DepthOverlap ClassifyStorageDepthOverlap(const ImageInfo& storage, const DepthTargetInfo& depth) { - const bool overlaps_depth = ImageRangeOverlaps(storage.address, storage.size, depth.address, - depth.size); - const bool overlaps_stencil = depth.stencil_address != 0 && - ImageRangeOverlaps(storage.address, storage.size, - depth.stencil_address, depth.stencil_size); + const bool overlaps_depth = + ImageRangeOverlaps(storage.address, storage.size, depth.address, depth.size); + const bool overlaps_stencil = + depth.stencil_address != 0 && ImageRangeOverlaps(storage.address, storage.size, + depth.stencil_address, depth.stencil_size); if (!overlaps_depth && !overlaps_stencil) { return DepthOverlap::None; } @@ -857,7 +850,7 @@ ClassifyRenderTargetOverlap(const ImageInfo& sampled, bool sampled_gpu_modified, return RenderTargetOverlap::None; } return !sampled_gpu_modified && same_context ? RenderTargetOverlap::RetireSampled - : RenderTargetOverlap::Unsupported; + : RenderTargetOverlap::Unsupported; } [[nodiscard]] inline RenderTargetOverlap diff --git a/src/graphics/host_gpu/renderer/imageView.cpp b/src/graphics/host_gpu/renderer/imageView.cpp index f48fc04..9d84d2d 100644 --- a/src/graphics/host_gpu/renderer/imageView.cpp +++ b/src/graphics/host_gpu/renderer/imageView.cpp @@ -125,11 +125,11 @@ VkImageView TextureCache::GetRenderTargetAttachmentView(GraphicContext* static_cast(image->format), static_cast(format), level); } - return GetImageView( - ctx, image, - {format, layer_count == 1 ? VK_IMAGE_VIEW_TYPE_2D : VK_IMAGE_VIEW_TYPE_2D_ARRAY, - VK_IMAGE_ASPECT_COLOR_BIT, level, 1, base_layer, layer_count, DstSel(4, 5, 6, 7), - VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT}); + return GetImageView(ctx, image, + {format, + layer_count == 1 ? VK_IMAGE_VIEW_TYPE_2D : VK_IMAGE_VIEW_TYPE_2D_ARRAY, + VK_IMAGE_ASPECT_COLOR_BIT, level, 1, base_layer, layer_count, + DstSel(4, 5, 6, 7), VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT}); } VkImageView TextureCache::GetDepthTargetAttachmentView(GraphicContext* ctx, @@ -151,9 +151,9 @@ VkImageView TextureCache::GetDepthTargetAttachmentView(GraphicContext* VkImageView TextureCache::GetImageView(GraphicContext* ctx, VulkanImage* image, const ImageViewInfo& info) { - const bool supported_type = info.type == VK_IMAGE_VIEW_TYPE_2D || - info.type == VK_IMAGE_VIEW_TYPE_2D_ARRAY || - info.type == VK_IMAGE_VIEW_TYPE_3D; + const bool supported_type = info.type == VK_IMAGE_VIEW_TYPE_2D || + info.type == VK_IMAGE_VIEW_TYPE_2D_ARRAY || + info.type == VK_IMAGE_VIEW_TYPE_3D; const bool supported_usage = info.usage == VK_IMAGE_USAGE_SAMPLED_BIT || info.usage == VK_IMAGE_USAGE_STORAGE_BIT || info.usage == VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT || @@ -189,14 +189,14 @@ VkImageView TextureCache::GetImageView(GraphicContext* ctx, VulkanImage* image, usage.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO; usage.usage = info.usage; VkImageViewCreateInfo create {}; - create.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO; - create.pNext = &usage; - create.image = image->image; - create.viewType = info.type; - create.format = info.format; - create.components = info.usage == VK_IMAGE_USAGE_SAMPLED_BIT - ? TextureGetComponentMapping(info.swizzle) - : VkComponentMapping {}; + create.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO; + create.pNext = &usage; + create.image = image->image; + create.viewType = info.type; + create.format = info.format; + create.components = info.usage == VK_IMAGE_USAGE_SAMPLED_BIT + ? TextureGetComponentMapping(info.swizzle) + : VkComponentMapping {}; create.subresourceRange.aspectMask = info.aspect; create.subresourceRange.baseMipLevel = info.base_level; create.subresourceRange.levelCount = info.level_count; @@ -239,10 +239,10 @@ VkImageView TextureCache::GetDepthTargetSampledView(GraphicContext* ctx } VkImageView TextureCache::GetSampledColorView(GraphicContext* ctx, VulkanImage* image, - VkFormat view_format, uint32_t swizzle, - uint32_t base_level, uint32_t level_count, - VkImageViewType type, uint32_t base_layer, - uint32_t layer_count) { + VkFormat view_format, uint32_t swizzle, + uint32_t base_level, uint32_t level_count, + VkImageViewType type, uint32_t base_layer, + uint32_t layer_count) { if (ctx == nullptr || image == nullptr || image->image == nullptr || view_format == VK_FORMAT_UNDEFINED || base_level >= 16 || (type != VK_IMAGE_VIEW_TYPE_2D && type != VK_IMAGE_VIEW_TYPE_2D_ARRAY) || @@ -309,8 +309,7 @@ VkImageView TextureCache::GetRenderTargetStorageView(GraphicContext* c } return GetImageView(ctx, image, {view_format, type, VK_IMAGE_ASPECT_COLOR_BIT, base_level, level_count, - base_layer, layer_count, DstSel(4, 5, 6, 7), - VK_IMAGE_USAGE_STORAGE_BIT}); + base_layer, layer_count, DstSel(4, 5, 6, 7), VK_IMAGE_USAGE_STORAGE_BIT}); } VkImageView TextureCache::GetStorageTextureSampledView(GraphicContext* ctx, @@ -362,8 +361,7 @@ VkImageView TextureCache::GetStorageTextureStorageView(GraphicContext* } return GetImageView(ctx, image, {image->format, VK_IMAGE_VIEW_TYPE_2D, VK_IMAGE_ASPECT_COLOR_BIT, - base_level, 1, 0, 1, DstSel(4, 5, 6, 7), - VK_IMAGE_USAGE_STORAGE_BIT}); + base_level, 1, 0, 1, DstSel(4, 5, 6, 7), VK_IMAGE_USAGE_STORAGE_BIT}); } } // namespace Libs::Graphics diff --git a/src/graphics/host_gpu/renderer/imageView.h b/src/graphics/host_gpu/renderer/imageView.h index b563cd8..3afd539 100644 --- a/src/graphics/host_gpu/renderer/imageView.h +++ b/src/graphics/host_gpu/renderer/imageView.h @@ -18,8 +18,7 @@ namespace Libs::Graphics { format == Prospero::GpuEnumValue(Prospero::BufferFormat::k16Float) || format == Prospero::GpuEnumValue(Prospero::BufferFormat::k32Float); return swizzle == DstSel(4, 5, 6, 7) || - (single_channel && (swizzle == DstSel(4, 0, 0, 0) || - swizzle == DstSel(4, 0, 0, 1) || + (single_channel && (swizzle == DstSel(4, 0, 0, 0) || swizzle == DstSel(4, 0, 0, 1) || swizzle == DstSel(4, 4, 4, 4))) || (format == Prospero::GpuEnumValue(Prospero::BufferFormat::k32_32UInt) && swizzle == DstSel(4, 5, 0, 1)) || @@ -104,9 +103,8 @@ namespace Libs::Graphics { return true; } -[[nodiscard]] inline bool IsSupportedSampledColorView(VkFormat image_format, - VkFormat view_format, - uint32_t swizzle) noexcept { +[[nodiscard]] inline bool IsSupportedSampledColorView(VkFormat image_format, VkFormat view_format, + uint32_t swizzle) noexcept { if (!IsValidSampledColorSwizzle(swizzle)) { return false; } @@ -118,8 +116,7 @@ namespace Libs::Graphics { swizzle == DstSel(4, 5, 6, 7)) { return true; } - return IsBgraToRgbaSampledView(image_format, view_format) && - swizzle == DstSel(6, 5, 4, 7); + return IsBgraToRgbaSampledView(image_format, view_format) && swizzle == DstSel(6, 5, 4, 7); } [[nodiscard]] inline uint32_t SelectSampledColorView(VkFormat image_format, VkFormat view_format, @@ -177,8 +174,7 @@ IsSupportedSampledDepthUintResource(const ShaderRecompiler::IR::ImageResource& r view_format == VK_FORMAT_R16_SFLOAT || view_format == VK_FORMAT_R32_SFLOAT; const bool swizzle_ok = swizzle == DstSel(4, 5, 6, 7) || - (single_channel && (swizzle == DstSel(4, 0, 0, 0) || - swizzle == DstSel(4, 0, 0, 1) || + (single_channel && (swizzle == DstSel(4, 0, 0, 0) || swizzle == DstSel(4, 0, 0, 1) || swizzle == DstSel(4, 4, 4, 4))) || (view_format == VK_FORMAT_R32G32_UINT && swizzle == DstSel(4, 5, 0, 1)) || ((view_format == VK_FORMAT_R8G8B8A8_UNORM || view_format == VK_FORMAT_R8G8B8A8_UINT) && @@ -217,7 +213,7 @@ ValidateStorageImageResource(const ShaderRecompiler::IR::ImageResource& resource namespace ImageViewOps { [[nodiscard]] VkImageAspectFlags DepthAspectMask(VkFormat format) noexcept; -[[nodiscard]] bool FormatSupportsStorage(GraphicContext* ctx, VkFormat format); +[[nodiscard]] bool FormatSupportsStorage(GraphicContext* ctx, VkFormat format); void CreateRenderTargetViews(GraphicContext* ctx, RenderTextureVulkanImage* image); void CreateDepthViews(GraphicContext* ctx, DepthStencilVulkanImage* image); diff --git a/src/graphics/host_gpu/renderer/multiLevelPageTable.h b/src/graphics/host_gpu/renderer/multiLevelPageTable.h index 3c74c4b..31c048e 100644 --- a/src/graphics/host_gpu/renderer/multiLevelPageTable.h +++ b/src/graphics/host_gpu/renderer/multiLevelPageTable.h @@ -15,7 +15,8 @@ namespace Libs::Graphics { // Sparse two-level lookup for texture-cache page ownership. // Entries are selected by guest page number; queries never allocate L1 buckets. -template +template class MultiLevelPageTable final { public: using Entry = EntryT; @@ -24,14 +25,14 @@ public: static_assert(PageBits < AddressSpaceBits); static_assert(FirstLevelBits > 0 && FirstLevelBits <= AddressSpaceBits - PageBits); - static constexpr size_t kPageBits = PageBits; - static constexpr size_t kAddressSpaceBits = AddressSpaceBits; - static constexpr size_t kFirstLevelBits = FirstLevelBits; - static constexpr size_t kSecondLevelBits = AddressSpaceBits - FirstLevelBits - PageBits; - static constexpr size_t kFirstLevelEntries = size_t{1} << FirstLevelBits; - static constexpr size_t kBucketEntries = size_t{1} << kSecondLevelBits; - static constexpr size_t kPageCount = size_t{1} << (AddressSpaceBits - PageBits); - static constexpr uint64_t kAddressSpaceSize = uint64_t{1} << AddressSpaceBits; + static constexpr size_t kPageBits = PageBits; + static constexpr size_t kAddressSpaceBits = AddressSpaceBits; + static constexpr size_t kFirstLevelBits = FirstLevelBits; + static constexpr size_t kSecondLevelBits = AddressSpaceBits - FirstLevelBits - PageBits; + static constexpr size_t kFirstLevelEntries = size_t {1} << FirstLevelBits; + static constexpr size_t kBucketEntries = size_t {1} << kSecondLevelBits; + static constexpr size_t kPageCount = size_t {1} << (AddressSpaceBits - PageBits); + static constexpr uint64_t kAddressSpaceSize = uint64_t {1} << AddressSpaceBits; struct PageRange final { size_t first = 0; @@ -74,12 +75,13 @@ public: // Returns the half-open page interval touched by a non-empty byte range. // An end exactly at 2^AddressSpaceBits is valid; wrapping or crossing it is not. - [[nodiscard]] static constexpr bool TryGetPageRange(uint64_t address, uint64_t size, PageRange& range) { + [[nodiscard]] static constexpr bool TryGetPageRange(uint64_t address, uint64_t size, + PageRange& range) { if (size == 0 || address >= kAddressSpaceSize || size > kAddressSpaceSize - address) { return false; } - const uint64_t end = address + size; - range.first = static_cast(address >> PageBits); + const uint64_t end = address + size; + range.first = static_cast(address >> PageBits); range.last_exclusive = static_cast(((end - 1) >> PageBits) + 1); return true; } @@ -89,8 +91,12 @@ public: private: using Bucket = std::array; - [[nodiscard]] static constexpr size_t FirstLevelIndex(size_t page) { return page >> kSecondLevelBits; } - [[nodiscard]] static constexpr size_t SecondLevelIndex(size_t page) { return page & (kBucketEntries - 1); } + [[nodiscard]] static constexpr size_t FirstLevelIndex(size_t page) { + return page >> kSecondLevelBits; + } + [[nodiscard]] static constexpr size_t SecondLevelIndex(size_t page) { + return page & (kBucketEntries - 1); + } std::vector> m_first_level; size_t m_allocated_buckets = 0; @@ -151,8 +157,8 @@ public: if (registration == m_registrations.end()) { return false; } - const auto coarse_pages = CollectPages<20>(registration->ranges); - const auto tracking_pages = CollectPages<12>(registration->ranges); + const auto coarse_pages = CollectPages<20>(registration->ranges); + const auto tracking_pages = CollectPages<12>(registration->ranges); const Registration* registration_ptr = &*registration; if (!HasAllMemberships(m_coarse_pages, coarse_pages, registration_ptr) || !HasAllMemberships(m_tracking_pages, tracking_pages, registration_ptr)) { @@ -179,7 +185,8 @@ public: } template - [[nodiscard]] std::vector Query(uint64_t address, uint64_t size, Predicate&& predicate) const { + [[nodiscard]] std::vector Query(uint64_t address, uint64_t size, + Predicate&& predicate) const { return QueryImpl(address, size, true, std::forward(predicate)); } @@ -190,7 +197,8 @@ public: } template - [[nodiscard]] std::vector QueryCandidates(uint64_t address, uint64_t size, Predicate&& predicate) const { + [[nodiscard]] std::vector QueryCandidates(uint64_t address, uint64_t size, + Predicate&& predicate) const { return QueryImpl(address, size, false, std::forward(predicate)); } @@ -206,9 +214,9 @@ public: private: template [[nodiscard]] std::vector QueryImpl(uint64_t address, uint64_t size, bool strict_bytes, - Predicate&& predicate) const { - typename CoarseTable::PageRange coarse_range{}; - typename TrackingTable::PageRange tracking_range{}; + Predicate&& predicate) const { + typename CoarseTable::PageRange coarse_range {}; + typename TrackingTable::PageRange tracking_range {}; if (!CoarseTable::TryGetPageRange(address, size, coarse_range) || !TrackingTable::TryGetPageRange(address, size, tracking_range)) { return {}; @@ -222,7 +230,8 @@ private: std::vector result; for (const Registration* registration: candidates) { if ((!strict_bytes || Overlaps(registration->ranges, address, size)) && - HasTrackingMembership(registration, tracking_range) && predicate(registration->owner)) { + HasTrackingMembership(registration, tracking_range) && + predicate(registration->owner)) { result.push_back(registration->owner); } } @@ -248,20 +257,22 @@ private: [[nodiscard]] static std::vector Normalize(const std::vector& ranges) { std::vector sorted; for (const auto& range: ranges) { - typename CoarseTable::PageRange ignored{}; + typename CoarseTable::PageRange ignored {}; if (!CoarseTable::TryGetPageRange(range.address, range.size, ignored)) { return {}; } sorted.push_back(range); } - std::sort(sorted.begin(), sorted.end(), - [](const ByteRange& lhs, const ByteRange& rhs) { return lhs.address < rhs.address; }); + std::sort(sorted.begin(), sorted.end(), [](const ByteRange& lhs, const ByteRange& rhs) { + return lhs.address < rhs.address; + }); std::vector merged; for (const auto& range: sorted) { if (merged.empty() || range.address > merged.back().address + merged.back().size) { merged.push_back(range); } else { - const uint64_t end = std::max(merged.back().address + merged.back().size, range.address + range.size); + const uint64_t end = std::max(merged.back().address + merged.back().size, + range.address + range.size); merged.back().size = end - merged.back().address; } } @@ -284,29 +295,33 @@ private: } template - [[nodiscard]] static bool HasAllMemberships(const Table& table, const std::vector& pages, - const Registration* registration) { + [[nodiscard]] static bool HasAllMemberships(const Table& table, + const std::vector& pages, + const Registration* registration) { for (const size_t page: pages) { const auto* owners = table.Find(page); - if (owners == nullptr || std::find(owners->begin(), owners->end(), registration) == owners->end()) { + if (owners == nullptr || + std::find(owners->begin(), owners->end(), registration) == owners->end()) { return false; } } return true; } - [[nodiscard]] bool HasTrackingMembership(const Registration* registration, + [[nodiscard]] bool HasTrackingMembership(const Registration* registration, const typename TrackingTable::PageRange& range) const { for (size_t page = range.first; page < range.last_exclusive; ++page) { const auto* owners = m_tracking_pages.Find(page); - if (owners != nullptr && std::find(owners->begin(), owners->end(), registration) != owners->end()) { + if (owners != nullptr && + std::find(owners->begin(), owners->end(), registration) != owners->end()) { return true; } } return false; } - [[nodiscard]] static bool Overlaps(const std::vector& ranges, uint64_t address, uint64_t size) { + [[nodiscard]] static bool Overlaps(const std::vector& ranges, uint64_t address, + uint64_t size) { const uint64_t end = address + size; return std::any_of(ranges.begin(), ranges.end(), [&](const ByteRange& range) { return range.address < end && address < range.address + range.size; @@ -314,26 +329,28 @@ private: } static void AppendUnique(MembershipList& destination, const MembershipList& source) { for (const Registration* registration: source) { - if (std::find(destination.begin(), destination.end(), registration) == destination.end()) { + if (std::find(destination.begin(), destination.end(), registration) == + destination.end()) { destination.push_back(registration); } } } - [[nodiscard]] static std::vector CoalesceTrackingPages(const std::vector& pages) { + [[nodiscard]] static std::vector + CoalesceTrackingPages(const std::vector& pages) { std::vector result; for (const size_t page: pages) { const uint64_t address = static_cast(page) << 12; if (!result.empty() && result.back().address + result.back().size == address) { - result.back().size += uint64_t{1} << 12; + result.back().size += uint64_t {1} << 12; } else { - result.push_back({address, uint64_t{1} << 12}); + result.push_back({address, uint64_t {1} << 12}); } } return result; } - CoarseTable m_coarse_pages; - TrackingTable m_tracking_pages; + CoarseTable m_coarse_pages; + TrackingTable m_tracking_pages; std::list m_registrations; }; diff --git a/src/graphics/host_gpu/renderer/renderCompute.cpp b/src/graphics/host_gpu/renderer/renderCompute.cpp index 8687b78..2370454 100644 --- a/src/graphics/host_gpu/renderer/renderCompute.cpp +++ b/src/graphics/host_gpu/renderer/renderCompute.cpp @@ -268,7 +268,7 @@ static bool TryConsumeComputeMetaClear(const ShaderComputeInputInfo& input, cons } if (resource.written || !resource.read || resource.atomic || descriptor.Base48() == 0 || descriptor_size == 0 || - cache->QueryRegion(descriptor.Base48(), descriptor_size).metadata_pages) { + cache->QueryRegion(descriptor.Base48(), descriptor_size).metadata_pages) { EXIT("unsupported HTile clear side-buffer access\n"); } g_render_ctx->GetBufferCache()->ValidateGpuAccess(descriptor.Base48(), descriptor_size, diff --git a/src/graphics/host_gpu/renderer/renderDraw.cpp b/src/graphics/host_gpu/renderer/renderDraw.cpp index 7f44667..d23ce60 100644 --- a/src/graphics/host_gpu/renderer/renderDraw.cpp +++ b/src/graphics/host_gpu/renderer/renderDraw.cpp @@ -1,3 +1,5 @@ +#include "graphics/host_gpu/renderer/renderDraw.h" + #include "common/assert.h" #include "common/common.h" #include "common/emulatorConfig.h" @@ -20,7 +22,6 @@ #include "graphics/host_gpu/renderer/pipelineCache.h" #include "graphics/host_gpu/renderer/render.h" #include "graphics/host_gpu/renderer/renderContext.h" -#include "graphics/host_gpu/renderer/renderDraw.h" #include "graphics/host_gpu/renderer/renderInternal.h" #include "graphics/host_gpu/renderer/renderVertex.h" #include "graphics/host_gpu/renderer/shaderResourceBarrier.h" @@ -823,9 +824,9 @@ static void BindDrawIndexBuffer(CommandBuffer* buffer, VkCommandBuffer vk_buffer VkDeviceSize index_offset = 0; if (source.host_data != nullptr) { VkDeviceSize range = 0; - if (!g_render_ctx->GetBufferCache()->UploadHostData( - buffer, g_render_ctx->GetGraphicCtx(), source.host_data, source.size, 16, - &index_buffer, &index_offset, &range)) { + if (!g_render_ctx->GetBufferCache()->UploadHostData(buffer, g_render_ctx->GetGraphicCtx(), + source.host_data, source.size, 16, + &index_buffer, &index_offset, &range)) { EXIT("failed to upload host index buffer\n"); } } else { @@ -1126,9 +1127,9 @@ void RenderDrawIndex(uint64_t submit_id, CommandBuffer* buffer, HW::Context* ctx instance_count = 1; } - const DrawCallInfo draw {"DrawIndex", CommandBufferDebugOp::DrawIndex, - index_count, flags, - instance_count, first_instance}; + const DrawCallInfo draw {"DrawIndex", CommandBufferDebugOp::DrawIndex, + index_count, flags, + instance_count, first_instance}; std::vector expanded_indices; if (expand_index8_to_u16) { EXIT_NOT_IMPLEMENTED(index_addr == nullptr); @@ -1144,9 +1145,8 @@ void RenderDrawIndex(uint64_t submit_id, CommandBuffer* buffer, HW::Context* ctx index_source.address = reinterpret_cast(index_addr); index_source.host_data = expanded_indices.empty() ? nullptr : static_cast(expanded_indices.data()); - index_source.size = expanded_indices.empty() - ? index_size - : expanded_indices.size() * sizeof(uint16_t); + index_source.size = + expanded_indices.empty() ? index_size : expanded_indices.size() * sizeof(uint16_t); index_source.type = index_type; DrawRenderState state {}; diff --git a/src/graphics/host_gpu/renderer/renderTargetBarriers.cpp b/src/graphics/host_gpu/renderer/renderTargetBarriers.cpp index dfa55ef..f738ea0 100644 --- a/src/graphics/host_gpu/renderer/renderTargetBarriers.cpp +++ b/src/graphics/host_gpu/renderer/renderTargetBarriers.cpp @@ -217,8 +217,7 @@ void GraphicsRenderDepthStencilBarrier(CommandBuffer* buffer, uint64_t vaddr, ui Common::LockGuard lock(g_render_ctx->GetMutex()); auto* vk_buffer = buffer->GetPool()->buffers[buffer->GetIndex()]; - auto* native = - g_render_ctx->GetTextureCache()->FindDepthTargetByRange(buffer, vaddr, size); + auto* native = g_render_ctx->GetTextureCache()->FindDepthTargetByRange(buffer, vaddr, size); if (native == nullptr) { EXIT("depth-target barrier range has no cached image\n"); } diff --git a/src/graphics/host_gpu/renderer/samplerCache.cpp b/src/graphics/host_gpu/renderer/samplerCache.cpp index 9c33864..c320add 100644 --- a/src/graphics/host_gpu/renderer/samplerCache.cpp +++ b/src/graphics/host_gpu/renderer/samplerCache.cpp @@ -66,15 +66,18 @@ VkSampler SamplerCache::GetSampler(const ShaderSamplerResource& r) { auto to_vk_address_mode = [](uint8_t clamp) { switch (static_cast(clamp)) { case Prospero::SamplerClampMode::kWrap: return VK_SAMPLER_ADDRESS_MODE_REPEAT; - case Prospero::SamplerClampMode::kMirror: return VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT; - case Prospero::SamplerClampMode::kClampLastTexel: return VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; + case Prospero::SamplerClampMode::kMirror: + return VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT; + case Prospero::SamplerClampMode::kClampLastTexel: + return VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE; case Prospero::SamplerClampMode::kMirrorOnceLastTexel: return VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE; case Prospero::SamplerClampMode::kClampHalfBorder: return VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER; case Prospero::SamplerClampMode::kMirrorOnceHalfBorder: return VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE; - case Prospero::SamplerClampMode::kClampBorder: return VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER; + case Prospero::SamplerClampMode::kClampBorder: + return VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER; case Prospero::SamplerClampMode::kMirrorOnceBorder: return VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE; default: EXIT("unknown clamp: %u\n", clamp); @@ -87,8 +90,12 @@ VkSampler SamplerCache::GetSampler(const ShaderSamplerResource& r) { case Prospero::SamplerBorderColor::kTransBlack: border = VK_BORDER_COLOR_INT_TRANSPARENT_BLACK; break; - case Prospero::SamplerBorderColor::kOpaqueBlack: border = VK_BORDER_COLOR_INT_OPAQUE_BLACK; break; - case Prospero::SamplerBorderColor::kOpaqueWhite: border = VK_BORDER_COLOR_INT_OPAQUE_WHITE; break; + case Prospero::SamplerBorderColor::kOpaqueBlack: + border = VK_BORDER_COLOR_INT_OPAQUE_BLACK; + break; + case Prospero::SamplerBorderColor::kOpaqueWhite: + border = VK_BORDER_COLOR_INT_OPAQUE_WHITE; + break; case Prospero::SamplerBorderColor::kFromTable: LOGF( "temporary: approximating table border color as transparent black, index = %" PRIu16 diff --git a/src/graphics/host_gpu/renderer/shaderResourceBarrier.cpp b/src/graphics/host_gpu/renderer/shaderResourceBarrier.cpp index 5865224..9219def 100644 --- a/src/graphics/host_gpu/renderer/shaderResourceBarrier.cpp +++ b/src/graphics/host_gpu/renderer/shaderResourceBarrier.cpp @@ -2,8 +2,8 @@ #include "common/assert.h" #include "graphics/host_gpu/renderer/descriptorCache.h" -#include "graphics/shader/shaderBindings.h" #include "graphics/shader/shader.h" +#include "graphics/shader/shaderBindings.h" #include diff --git a/src/graphics/host_gpu/renderer/shaders.cpp b/src/graphics/host_gpu/renderer/shaders.cpp index 4e62361..5a17684 100644 --- a/src/graphics/host_gpu/renderer/shaders.cpp +++ b/src/graphics/host_gpu/renderer/shaders.cpp @@ -22,7 +22,7 @@ namespace Libs::Graphics { -//IDK: maybe we can remove it? +// IDK: maybe we can remove it? constexpr uint32_t kTemporaryPs5BufferFormat121 = 121u; static bool NarrowInputFormat(VkFormat* format, uint32_t* size, uint32_t used_components) { diff --git a/src/graphics/host_gpu/renderer/streamBuffer.cpp b/src/graphics/host_gpu/renderer/streamBuffer.cpp index 3ea081c..4ad3b27 100644 --- a/src/graphics/host_gpu/renderer/streamBuffer.cpp +++ b/src/graphics/host_gpu/renderer/streamBuffer.cpp @@ -30,24 +30,22 @@ void HostStreamBuffer::EnsureBuffer(GraphicContext* ctx) { return; } KYTY_PROFILER_BLOCK("HostStreamBuffer::create"); - m_ctx = ctx; - m_buffer = std::make_unique(); - m_buffer->usage = VK_BUFFER_USAGE_STORAGE_BUFFER_BIT | VK_BUFFER_USAGE_VERTEX_BUFFER_BIT | - VK_BUFFER_USAGE_INDEX_BUFFER_BIT | VK_BUFFER_USAGE_TRANSFER_SRC_BIT | - VK_BUFFER_USAGE_TRANSFER_DST_BIT; + m_ctx = ctx; + m_buffer = std::make_unique(); + m_buffer->usage = VK_BUFFER_USAGE_STORAGE_BUFFER_BIT | VK_BUFFER_USAGE_VERTEX_BUFFER_BIT | + VK_BUFFER_USAGE_INDEX_BUFFER_BIT | VK_BUFFER_USAGE_TRANSFER_SRC_BIT | + VK_BUFFER_USAGE_TRANSFER_DST_BIT; m_buffer->memory.property = static_cast(VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT | VK_MEMORY_PROPERTY_HOST_CACHED_BIT; VulkanCreateBuffer(ctx, CAPACITY, m_buffer.get()); VulkanMapMemory(ctx, &m_buffer->memory, &m_mapped); const auto count = g_stream_buffer_count.fetch_add(1, std::memory_order_relaxed) + 1; - LOGF("HostStreamBuffer: created serial=%" PRIu64 " capacity=%" PRIu64 "\n", count, - CAPACITY); + LOGF("HostStreamBuffer: created serial=%" PRIu64 " capacity=%" PRIu64 "\n", count, CAPACITY); } -bool HostStreamBuffer::Copy(GraphicContext* ctx, const void* src, uint64_t size, - uint64_t alignment, VulkanBuffer** out_buffer, uint64_t* out_offset, - uint64_t* out_range) { +bool HostStreamBuffer::Copy(GraphicContext* ctx, const void* src, uint64_t size, uint64_t alignment, + VulkanBuffer** out_buffer, uint64_t* out_offset, uint64_t* out_range) { KYTY_PROFILER_FUNCTION(); if (ctx == nullptr || src == nullptr || out_buffer == nullptr || out_offset == nullptr || out_range == nullptr) { @@ -69,10 +67,10 @@ bool HostStreamBuffer::Copy(GraphicContext* ctx, const void* src, uint64_t size, } EnsureBuffer(ctx); std::memcpy(static_cast(m_mapped) + offset, src, static_cast(size)); - m_offset = offset + size; - *out_buffer = m_buffer.get(); - *out_offset = offset; - *out_range = size; + m_offset = offset + size; + *out_buffer = m_buffer.get(); + *out_offset = offset; + *out_range = size; return true; } diff --git a/src/graphics/host_gpu/renderer/streamBuffer.h b/src/graphics/host_gpu/renderer/streamBuffer.h index dd90261..4c09a3b 100644 --- a/src/graphics/host_gpu/renderer/streamBuffer.h +++ b/src/graphics/host_gpu/renderer/streamBuffer.h @@ -22,11 +22,10 @@ public: ~HostStreamBuffer(); KYTY_CLASS_NO_COPY(HostStreamBuffer); - [[nodiscard]] bool Copy(GraphicContext* ctx, const void* src, uint64_t size, - uint64_t alignment, VulkanBuffer** out_buffer, uint64_t* out_offset, - uint64_t* out_range); - void Reset() noexcept; - void Release() noexcept; + [[nodiscard]] bool Copy(GraphicContext* ctx, const void* src, uint64_t size, uint64_t alignment, + VulkanBuffer** out_buffer, uint64_t* out_offset, uint64_t* out_range); + void Reset() noexcept; + void Release() noexcept; private: void EnsureBuffer(GraphicContext* ctx); @@ -36,11 +35,11 @@ private: // replaced by a single 64 MiB scheduler-watched ring; the BufferCache seam stays fixed. static constexpr uint64_t CAPACITY = 16ull * 1024ull * 1024ull; - mutable std::mutex m_mutex; - GraphicContext* m_ctx = nullptr; + mutable std::mutex m_mutex; + GraphicContext* m_ctx = nullptr; std::unique_ptr m_buffer; - void* m_mapped = nullptr; - uint64_t m_offset = 0; + void* m_mapped = nullptr; + uint64_t m_offset = 0; }; } // namespace Libs::Graphics diff --git a/src/graphics/host_gpu/renderer/sync.cpp b/src/graphics/host_gpu/renderer/sync.cpp index 3d7e607..7ec31f6 100644 --- a/src/graphics/host_gpu/renderer/sync.cpp +++ b/src/graphics/host_gpu/renderer/sync.cpp @@ -1,3 +1,5 @@ +#include "graphics/host_gpu/renderer/sync.h" + #include "common/assert.h" #include "common/common.h" #include "common/logging/log.h" @@ -7,7 +9,6 @@ #include "graphics/host_gpu/renderer/bufferCache.h" #include "graphics/host_gpu/renderer/render.h" #include "graphics/host_gpu/renderer/renderContext.h" -#include "graphics/host_gpu/renderer/sync.h" #include "graphics/presentation/displayBuffer.h" #include "kernel/eventQueue.h" #include "kernel/pthread.h" @@ -82,8 +83,8 @@ void TriggerEopEvent(uint32_t context_id) { g_render_ctx->TriggerEopEvent(context_id); } -void WriteAtEndOfPipe32(uint64_t submit_id, CommandBuffer* buffer, - uint32_t* dst_gpu_addr, uint32_t value) { +void WriteAtEndOfPipe32(uint64_t submit_id, CommandBuffer* buffer, uint32_t* dst_gpu_addr, + uint32_t value) { EXIT_IF(g_render_ctx == nullptr); EXIT_IF(dst_gpu_addr == nullptr); EXIT_IF(buffer == nullptr); @@ -93,9 +94,8 @@ void WriteAtEndOfPipe32(uint64_t submit_id, CommandBuffer* buffer, 0, 0, reinterpret_cast(dst_gpu_addr)); } -void WriteAtEndOfPipeGds32(uint64_t submit_id, CommandBuffer* buffer, - uint32_t* dst_gpu_addr, uint32_t dw_offset, - uint32_t dw_num) { +void WriteAtEndOfPipeGds32(uint64_t submit_id, CommandBuffer* buffer, uint32_t* dst_gpu_addr, + uint32_t dw_offset, uint32_t dw_num) { EXIT_IF(g_render_ctx == nullptr); EXIT_IF(dst_gpu_addr == nullptr); EXIT_IF(buffer == nullptr); @@ -105,8 +105,8 @@ void WriteAtEndOfPipeGds32(uint64_t submit_id, CommandBuffer* buffer, dw_offset, dw_num, 0, 0, reinterpret_cast(dst_gpu_addr)); } -void WriteAtEndOfPipe64(uint64_t submit_id, CommandBuffer* buffer, - uint64_t* dst_gpu_addr, uint64_t value) { +void WriteAtEndOfPipe64(uint64_t submit_id, CommandBuffer* buffer, uint64_t* dst_gpu_addr, + uint64_t value) { EXIT_IF(g_render_ctx == nullptr); EXIT_IF(dst_gpu_addr == nullptr); EXIT_IF(buffer == nullptr); @@ -117,8 +117,8 @@ void WriteAtEndOfPipe64(uint64_t submit_id, CommandBuffer* buffer, reinterpret_cast(dst_gpu_addr)); } -void WriteAtEndOfPipeClockCounter(uint64_t submit_id, CommandBuffer* buffer, - uint64_t* dst_gpu_addr, uint64_t value) { +void WriteAtEndOfPipeClockCounter(uint64_t submit_id, CommandBuffer* buffer, uint64_t* dst_gpu_addr, + uint64_t value) { EXIT_IF(g_render_ctx == nullptr); EXIT_IF(dst_gpu_addr == nullptr); EXIT_IF(buffer == nullptr); @@ -132,10 +132,8 @@ void WriteAtEndOfPipeClockCounter(uint64_t submit_id, CommandBuffer* buffer, reinterpret_cast(dst_gpu_addr), value); } -void WriteAtEndOfPipeClockCounterWithWriteBack(uint64_t submit_id, - CommandBuffer* buffer, - uint64_t* dst_gpu_addr, - uint64_t value) { +void WriteAtEndOfPipeClockCounterWithWriteBack(uint64_t submit_id, CommandBuffer* buffer, + uint64_t* dst_gpu_addr, uint64_t value) { EXIT_IF(g_render_ctx == nullptr); EXIT_IF(dst_gpu_addr == nullptr); EXIT_IF(buffer == nullptr); @@ -150,7 +148,7 @@ void WriteAtEndOfPipeClockCounterWithWriteBack(uint64_t submit_id, } void WriteAtEndOfPipeWithWriteBack64(uint64_t submit_id, CommandBuffer* buffer, - uint64_t* dst_gpu_addr, uint64_t value) { + uint64_t* dst_gpu_addr, uint64_t value) { EXIT_IF(g_render_ctx == nullptr); EXIT_IF(dst_gpu_addr == nullptr); EXIT_IF(buffer == nullptr); @@ -162,7 +160,7 @@ void WriteAtEndOfPipeWithWriteBack64(uint64_t submit_id, CommandBuffer* buffer, } void WriteAtEndOfPipeWithWriteBack32(uint64_t submit_id, CommandBuffer* buffer, - uint32_t* dst_gpu_addr, uint32_t value) { + uint32_t* dst_gpu_addr, uint32_t value) { EXIT_IF(g_render_ctx == nullptr); EXIT_IF(dst_gpu_addr == nullptr); EXIT_IF(buffer == nullptr); @@ -172,10 +170,9 @@ void WriteAtEndOfPipeWithWriteBack32(uint64_t submit_id, CommandBuffer* buffer, value, 0, 0, reinterpret_cast(dst_gpu_addr)); } -void WriteAtEndOfPipeWithInterruptWriteBack64(uint64_t submit_id, - CommandBuffer* buffer, - uint64_t* dst_gpu_addr, uint64_t value, - uint32_t context_id) { +void WriteAtEndOfPipeWithInterruptWriteBack64(uint64_t submit_id, CommandBuffer* buffer, + uint64_t* dst_gpu_addr, uint64_t value, + uint32_t context_id) { EXIT_IF(g_render_ctx == nullptr); EXIT_IF(dst_gpu_addr == nullptr); EXIT_IF(buffer == nullptr); @@ -197,10 +194,9 @@ void WriteAtEndOfPipeWithInterruptWriteBack64(uint64_t submit_id, args); } -void WriteAtEndOfPipeWithInterruptWriteBack32(uint64_t submit_id, - CommandBuffer* buffer, - uint32_t* dst_gpu_addr, uint32_t value, - uint32_t context_id) { +void WriteAtEndOfPipeWithInterruptWriteBack32(uint64_t submit_id, CommandBuffer* buffer, + uint32_t* dst_gpu_addr, uint32_t value, + uint32_t context_id) { EXIT_IF(g_render_ctx == nullptr); EXIT_IF(dst_gpu_addr == nullptr); EXIT_IF(buffer == nullptr); @@ -221,8 +217,7 @@ void WriteAtEndOfPipeWithInterruptWriteBack32(uint64_t submit_id, } void WriteAtEndOfPipeWithInterrupt64(uint64_t submit_id, CommandBuffer* buffer, - uint64_t* dst_gpu_addr, uint64_t value, - uint32_t context_id) { + uint64_t* dst_gpu_addr, uint64_t value, uint32_t context_id) { EXIT_IF(g_render_ctx == nullptr); EXIT_IF(dst_gpu_addr == nullptr); EXIT_IF(buffer == nullptr); @@ -245,8 +240,7 @@ void WriteAtEndOfPipeWithInterrupt64(uint64_t submit_id, CommandBuffer* buffer, } void WriteAtEndOfPipeWithInterrupt32(uint64_t submit_id, CommandBuffer* buffer, - uint32_t* dst_gpu_addr, uint32_t value, - uint32_t context_id) { + uint32_t* dst_gpu_addr, uint32_t value, uint32_t context_id) { EXIT_IF(g_render_ctx == nullptr); EXIT_IF(dst_gpu_addr == nullptr); EXIT_IF(buffer == nullptr); @@ -266,8 +260,8 @@ void WriteAtEndOfPipeWithInterrupt32(uint64_t submit_id, CommandBuffer* buffer, args); } -uint64_t PrepareDisplayBufferFlip(CommandBuffer* buffer, int handle, int index, - int flip_mode, int64_t flip_arg) { +uint64_t PrepareDisplayBufferFlip(CommandBuffer* buffer, int handle, int index, int flip_mode, + int64_t flip_arg) { for (;;) { uint64_t request_id = 0; const auto result = Presentation::DisplayBufferSubmitFlipFromGpu( @@ -285,9 +279,10 @@ uint64_t PrepareDisplayBufferFlip(CommandBuffer* buffer, int handle, int index, } } -void WriteAtEndOfPipeWithInterruptWriteBackFlip32( - uint64_t submit_id, CommandBuffer* buffer, uint32_t* dst_gpu_addr, uint32_t value, int handle, - int index, int flip_mode, int64_t flip_arg, uint64_t request_id) { +void WriteAtEndOfPipeWithInterruptWriteBackFlip32(uint64_t submit_id, CommandBuffer* buffer, + uint32_t* dst_gpu_addr, uint32_t value, + int handle, int index, int flip_mode, + int64_t flip_arg, uint64_t request_id) { EXIT_IF(g_render_ctx == nullptr); EXIT_IF(dst_gpu_addr == nullptr); EXIT_IF(buffer == nullptr); @@ -307,10 +302,9 @@ void WriteAtEndOfPipeWithInterruptWriteBackFlip32( args); } -void WriteAtEndOfPipeWithFlip32(uint64_t submit_id, CommandBuffer* buffer, - uint32_t* dst_gpu_addr, uint32_t value, int handle, - int index, int flip_mode, int64_t flip_arg, - uint64_t request_id) { +void WriteAtEndOfPipeWithFlip32(uint64_t submit_id, CommandBuffer* buffer, uint32_t* dst_gpu_addr, + uint32_t value, int handle, int index, int flip_mode, + int64_t flip_arg, uint64_t request_id) { EXIT_IF(g_render_ctx == nullptr); EXIT_IF(dst_gpu_addr == nullptr); EXIT_IF(buffer == nullptr); @@ -323,9 +317,8 @@ void WriteAtEndOfPipeWithFlip32(uint64_t submit_id, CommandBuffer* buffer, SubmitLabel(buffer, CompleteDisplayBufferFlip, nullptr, args); } -void WriteAtEndOfPipeOnlyFlip(uint64_t submit_id, CommandBuffer* buffer, int handle, - int index, int flip_mode, int64_t flip_arg, - uint64_t request_id) { +void WriteAtEndOfPipeOnlyFlip(uint64_t submit_id, CommandBuffer* buffer, int handle, int index, + int flip_mode, int64_t flip_arg, uint64_t request_id) { EXIT_IF(g_render_ctx == nullptr); EXIT_IF(buffer == nullptr); EXIT_IF(buffer->IsInvalid()); diff --git a/src/graphics/host_gpu/renderer/sync.h b/src/graphics/host_gpu/renderer/sync.h index 25286af..6cabccf 100644 --- a/src/graphics/host_gpu/renderer/sync.h +++ b/src/graphics/host_gpu/renderer/sync.h @@ -25,8 +25,8 @@ void WriteAtEndOfPipe64(uint64_t submit_id, CommandBuffer* buffer, uint64_t* dst uint64_t value); void WriteAtEndOfPipeGds32(uint64_t submit_id, CommandBuffer* buffer, uint32_t* dst_gpu_addr, uint32_t dw_offset, uint32_t dw_num); -void WriteAtEndOfPipeClockCounter(uint64_t submit_id, CommandBuffer* buffer, - uint64_t* dst_gpu_addr, uint64_t value); +void WriteAtEndOfPipeClockCounter(uint64_t submit_id, CommandBuffer* buffer, uint64_t* dst_gpu_addr, + uint64_t value); void WriteAtEndOfPipeClockCounterWithWriteBack(uint64_t submit_id, CommandBuffer* buffer, uint64_t* dst_gpu_addr, uint64_t value); void WriteAtEndOfPipeWithWriteBack32(uint64_t submit_id, CommandBuffer* buffer, @@ -50,9 +50,9 @@ void WriteAtEndOfPipeWithInterruptWriteBack64(uint64_t submit_id, CommandBuffer* int flip_mode, int64_t flip_arg); void WriteAtEndOfPipeOnlyFlip(uint64_t submit_id, CommandBuffer* buffer, int handle, int index, int flip_mode, int64_t flip_arg, uint64_t request_id); -void WriteAtEndOfPipeWithFlip32(uint64_t submit_id, CommandBuffer* buffer, - uint32_t* dst_gpu_addr, uint32_t value, int handle, int index, - int flip_mode, int64_t flip_arg, uint64_t request_id); +void WriteAtEndOfPipeWithFlip32(uint64_t submit_id, CommandBuffer* buffer, uint32_t* dst_gpu_addr, + uint32_t value, int handle, int index, int flip_mode, + int64_t flip_arg, uint64_t request_id); void WriteAtEndOfPipeWithInterruptWriteBackFlip32(uint64_t submit_id, CommandBuffer* buffer, uint32_t* dst_gpu_addr, uint32_t value, int handle, int index, int flip_mode, diff --git a/src/graphics/host_gpu/renderer/textureCache.cpp b/src/graphics/host_gpu/renderer/textureCache.cpp index c25a02f..fb14961 100644 --- a/src/graphics/host_gpu/renderer/textureCache.cpp +++ b/src/graphics/host_gpu/renderer/textureCache.cpp @@ -21,8 +21,6 @@ #include "graphics/host_gpu/utils.h" #include "kernel/memory.h" -#include - #include #include #include @@ -30,6 +28,7 @@ #include #include #include +#include namespace Libs::Graphics { @@ -39,13 +38,13 @@ thread_local const void* g_texture_cache_lock_owner = nullptr; thread_local const void* g_texture_fault_owner = nullptr; [[nodiscard]] uint64_t HashSampledImageEdges(const Image& image) { - constexpr uint64_t page_mask = TRACKER_PAGE_SIZE - 1; - const uint64_t begin = image.address; - const uint64_t end = image.address + image.size; - const uint64_t head_end = std::min(end, (begin + page_mask) & ~page_mask); + constexpr uint64_t page_mask = TRACKER_PAGE_SIZE - 1; + const uint64_t begin = image.address; + const uint64_t end = image.address + image.size; + const uint64_t head_end = std::min(end, (begin + page_mask) & ~page_mask); const uint64_t tail_begin = std::max(begin, end & ~page_mask); - const uint64_t head_size = head_end - begin; - const uint64_t tail_size = tail_begin < head_end ? end - head_end : end - tail_begin; + const uint64_t head_size = head_end - begin; + const uint64_t tail_size = tail_begin < head_end ? end - head_end : end - tail_begin; std::array bytes {}; if (head_size + tail_size > bytes.size()) { EXIT("TextureCache: sampled-image edge hash range overflow\n"); @@ -243,10 +242,11 @@ void TextureCache::UnregisterImageLocked(CachedImage& image, bool release_tracki image.registered = false; } -VulkanImage* TextureCache::PublishImage(CommandBuffer* command, +VulkanImage* TextureCache::PublishImage(CommandBuffer* command, std::shared_ptr image) { if (command == nullptr || image == nullptr || image->image == nullptr || image->registered) { - EXIT("TextureCache: invalid image publication, command=%p record=%p image=%p registered=%d\n", + EXIT("TextureCache: invalid image publication, command=%p record=%p image=%p " + "registered=%d\n", static_cast(command), static_cast(image.get()), image != nullptr ? static_cast(image->image) : nullptr, image != nullptr && image->registered); @@ -389,7 +389,7 @@ struct TextureCache::ReadbackWorker { } [[nodiscard]] ReadbackRange DownloadDepthTarget(CachedImage& cached, - bool require_fault_range = true) { + bool require_fault_range = true) { const auto& info = cached.depth; const bool has_stencil = info.stencil_address != 0 || info.stencil_size != 0; const bool has_htile = info.htile_address != 0 || info.htile_size != 0; @@ -423,8 +423,7 @@ struct TextureCache::ReadbackWorker { (!has_htile || (expected_htile.size <= UINT64_MAX / info.layers && info.htile_size == expected_htile.size * info.layers)); if ((require_fault_range && !fault_in_depth) || has_stencil || info.address == 0 || - info.size == 0 || - info.width == 0 || info.height == 0 || info.pitch < info.width || + info.size == 0 || info.width == 0 || info.height == 0 || info.pitch < info.width || info.tile_mode != Prospero::GpuEnumValue(Prospero::TileMode::kDepth) || !prospero_layout || info.pitch != expected_pitch || !layered_sizes || expected_depth.align != 65536u || cached.image->layers != info.layers || @@ -849,11 +848,11 @@ TextureCache::TextureCache(PageManager& page_manager, BufferCache& buffer_cache, EXIT("TextureCache: construction is restricted to the main thread\n"); } m_dummy_textures = std::make_unique(); - m_readback = std::make_unique(*this); + m_readback = std::make_unique(*this); } TextureCache::CachedImage* TextureCache::FindGpuReadbackPageCandidateLocked(uint64_t vaddr, - uint64_t size) { + uint64_t size) { CachedImage* selected = nullptr; for (auto* cached: FindImagesInRegionLocked(vaddr, size, true)) { if (!cached->IsGpuReadbackPageCandidate(vaddr, size)) { @@ -862,8 +861,7 @@ TextureCache::CachedImage* TextureCache::FindGpuReadbackPageCandidateLocked(uint if (selected != nullptr) { EXIT("TextureCache: CPU fault has multiple GPU-modified image page candidates, " "addr=0x%016" PRIx64 " size=0x%016" PRIx64 " first=%p second=%p\n", - vaddr, size, static_cast(selected), - static_cast(cached)); + vaddr, size, static_cast(selected), static_cast(cached)); } selected = cached; } @@ -929,8 +927,8 @@ void TextureCache::RetireSampledTargetAliases(GraphicContext* ctx, const ImageIn const bool contained = delta <= requested.size && cached->depth.size <= requested.size - delta; const bool sampled_expansion = IsSampledDepthExpansion(requested, cached->depth); - const bool exact_range = requested.address == cached->depth.address && - requested.size == cached->depth.size; + const bool exact_range = + requested.address == cached->depth.address && requested.size == cached->depth.size; const bool supported = cached->ctx == ctx && !cached->buffer_modified && cached->depth.stencil_address == 0 && cached->depth.stencil_size == 0 && cached->depth.layers == 1 && @@ -1049,8 +1047,7 @@ void TextureCache::ResolveStorageImageOverlaps(GraphicContext* ctx, const ImageI RetireImages(retire); } -void TextureCache::RetireStorageDepthAliasLocked(GraphicContext* ctx, - const ImageInfo& requested) { +void TextureCache::RetireStorageDepthAliasLocked(GraphicContext* ctx, const ImageInfo& requested) { CachedImage* selected = nullptr; for (auto* entry: FindImagesInRegionLocked(requested.address, requested.size, true)) { auto& cached = *entry; @@ -1059,7 +1056,7 @@ void TextureCache::RetireStorageDepthAliasLocked(GraphicContext* ctx, continue; } const auto& depth = cached.depth; - const bool exact_d32_uint = + const bool exact_d32_uint = cached.ctx == ctx && cached.gpu_modified && !cached.buffer_modified && depth.address == requested.address && depth.size == requested.size && depth.stencil_address == 0 && depth.stencil_size == 0 && depth.htile_address == 0 && @@ -1105,10 +1102,9 @@ TextureCache::~TextureCache() { VulkanImage* TextureCache::FindTexture(CommandBuffer* command, GraphicContext* ctx, const ImageInfo& info, bool metadata_read) { - if (info.address == 0 || info.size == 0 || - info.address >= TRACKER_ADDRESS_SIZE || info.size > TRACKER_ADDRESS_SIZE - info.address || - info.width == 0 || info.height == 0 || info.depth == 0 || info.levels == 0 || - info.levels >= 16 || info.view_levels == 0 || + if (info.address == 0 || info.size == 0 || info.address >= TRACKER_ADDRESS_SIZE || + info.size > TRACKER_ADDRESS_SIZE - info.address || info.width == 0 || info.height == 0 || + info.depth == 0 || info.levels == 0 || info.levels >= 16 || info.view_levels == 0 || info.base_level + info.view_levels > info.levels) { EXIT("TextureCache: invalid sampled-image request, command=%p ctx=%p addr=0x%016" PRIx64 " size=0x%016" PRIx64 " extent=%ux%ux%u levels=%u\n", @@ -1265,10 +1261,10 @@ VulkanImage* TextureCache::FindTexture(CommandBuffer* command, GraphicContext* c } } m_images.reserve(m_images.size() + 1); - auto cached = std::make_shared(); - cached->kind = CachedImage::Kind::Texture; - cached->info = info; - cached->ctx = ctx; + auto cached = std::make_shared(); + cached->kind = CachedImage::Kind::Texture; + cached->info = info; + cached->ctx = ctx; VkComponentMapping components {}; cached->image = ImageOps::CreateTexture(ctx, info, false, &cached->memory, &components); m_memory_tracker.ForEachUploadRange( @@ -1292,11 +1288,10 @@ StorageTextureVulkanImage* TextureCache::FindStorageTexture(CommandBuffer* com const bool supported_depth_tile = info.tile == Prospero::GpuEnumValue(Prospero::TileMode::kDepth) && IsSupportedStorageDepthTile(info.format, info.type, info.width, info.height, info.depth); - if (info.address == 0 || info.size == 0 || - info.address >= TRACKER_ADDRESS_SIZE || info.size > TRACKER_ADDRESS_SIZE - info.address || - info.width == 0 || info.height == 0 || info.depth == 0 || info.levels == 0 || - info.levels > 16 || info.base_level >= info.levels || info.view_levels != 1 || - info.base_array != 0 || !supported_type || + if (info.address == 0 || info.size == 0 || info.address >= TRACKER_ADDRESS_SIZE || + info.size > TRACKER_ADDRESS_SIZE - info.address || info.width == 0 || info.height == 0 || + info.depth == 0 || info.levels == 0 || info.levels > 16 || info.base_level >= info.levels || + info.view_levels != 1 || info.base_array != 0 || !supported_type || (info.tile != Prospero::GpuEnumValue(Prospero::TileMode::kLinear) && info.tile != Prospero::GpuEnumValue(Prospero::TileMode::kRenderTarget) && !supported_depth_tile) || @@ -1354,7 +1349,7 @@ StorageTextureVulkanImage* TextureCache::FindStorageTexture(CommandBuffer* com if (match != nullptr) { const bool cpu_modified = m_memory_tracker.IsRegionCpuModified(info.address, info.size); const bool gpu_modified = m_memory_tracker.IsRegionGpuModified(info.address, info.size); - const auto rebind = ClassifyStorageBufferRebind( + const auto rebind = ClassifyStorageBufferRebind( buffer_overlap, match->gpu_modified, match->buffer_modified, gpu_modified, cpu_modified, IsCoherentGuestImageSource(source, info.address, info.size)); if (rebind == StorageBufferRebind::Unsupported) { @@ -1373,9 +1368,9 @@ StorageTextureVulkanImage* TextureCache::FindStorageTexture(CommandBuffer* com m_memory_tracker.ForEachUploadRange( info.address, info.size, true, [](uint64_t, uint64_t) noexcept {}, [&]() noexcept { - m_tiler.DetileImage( - match->ctx, static_cast(match->image), match->info, - source, true, true); + m_tiler.DetileImage(match->ctx, + static_cast(match->image), + match->info, source, true, true); }); match->buffer_modified = false; match->gpu_modified = true; @@ -1402,10 +1397,10 @@ StorageTextureVulkanImage* TextureCache::FindStorageTexture(CommandBuffer* com ResolveStorageImageOverlaps(ctx, info); m_images.reserve(m_images.size() + 1); - auto cached = std::make_shared(); - cached->kind = CachedImage::Kind::StorageTexture; - cached->info = info; - cached->ctx = ctx; + auto cached = std::make_shared(); + cached->kind = CachedImage::Kind::StorageTexture; + cached->info = info; + cached->ctx = ctx; VkComponentMapping components {}; cached->image = ImageOps::CreateTexture(ctx, info, true, &cached->memory, &components); m_memory_tracker.ForEachUploadRange( @@ -1415,8 +1410,8 @@ StorageTextureVulkanImage* TextureCache::FindStorageTexture(CommandBuffer* com cached->info, source, false, true); }); cached->gpu_modified = true; - ImageOps::CreateTextureViews(ctx, static_cast(cached->image), info, true, - components); + ImageOps::CreateTextureViews(ctx, static_cast(cached->image), info, + true, components); return static_cast(PublishImage(command, std::move(cached))); } @@ -1424,11 +1419,11 @@ RenderTextureVulkanImage* TextureCache::FindRenderTarget(CommandBuffer* GraphicContext* ctx, const RenderTargetInfo& info) { const bool standard64 = IsSupportedStandard64RenderTarget(info); - if (info.address == 0 || info.size == 0 || - info.address >= TRACKER_ADDRESS_SIZE || info.size > TRACKER_ADDRESS_SIZE - info.address || - info.format == VK_FORMAT_UNDEFINED || info.width == 0 || info.height == 0 || - info.pitch < info.width || info.bytes_per_element == 0 || info.levels == 0 || - info.levels > 16 || info.layers == 0 || info.size % info.layers != 0 || + if (info.address == 0 || info.size == 0 || info.address >= TRACKER_ADDRESS_SIZE || + info.size > TRACKER_ADDRESS_SIZE - info.address || info.format == VK_FORMAT_UNDEFINED || + info.width == 0 || info.height == 0 || info.pitch < info.width || + info.bytes_per_element == 0 || info.levels == 0 || info.levels > 16 || info.layers == 0 || + info.size % info.layers != 0 || (info.tile_mode != Prospero::GpuEnumValue(Prospero::TileMode::kLinear) && info.tile_mode != Prospero::GpuEnumValue(Prospero::TileMode::kRenderTarget) && !standard64)) { @@ -1579,9 +1574,10 @@ RenderTextureVulkanImage* TextureCache::FindRenderTarget(CommandBuffer* } break; case RenderTargetOverlap::RetireTarget: - supported = cached.kind == CachedImage::Kind::RenderTarget || - (cached.kind == CachedImage::Kind::DepthTarget && target_buffer_overlap && - IsCoherentGuestImageSource(target_source, info.address, info.size)); + supported = + cached.kind == CachedImage::Kind::RenderTarget || + (cached.kind == CachedImage::Kind::DepthTarget && target_buffer_overlap && + IsCoherentGuestImageSource(target_source, info.address, info.size)); if (supported && cached.kind == CachedImage::Kind::DepthTarget) { buffer_owned_depth_retire.push_back(&cached); } @@ -1632,8 +1628,8 @@ RenderTextureVulkanImage* TextureCache::FindRenderTarget(CommandBuffer* tail_address, tail_size, true, [](uint64_t, uint64_t) noexcept {}, [&]() noexcept { ImageOps::UploadRenderTargetLayers( - ctx, static_cast(cached->image), info, old.layers, - info.layers - old.layers, false); + ctx, static_cast(cached->image), info, + old.layers, info.layers - old.layers, false); }); } std::vector regions; @@ -1658,11 +1654,10 @@ DepthStencilVulkanImage* TextureCache::FindDepthTarget(CommandBuffer* command, G const DepthTargetInfo& info) { const bool has_stencil = info.stencil_address != 0 || info.stencil_size != 0; const bool has_htile = info.htile_address != 0 || info.htile_size != 0; - if (info.address == 0 || info.size == 0 || - info.address >= TRACKER_ADDRESS_SIZE || info.size > TRACKER_ADDRESS_SIZE - info.address || - (info.address & 0xffffu) != 0 || info.width == 0 || info.height == 0 || - info.pitch < info.width || info.layers == 0 || info.size % info.layers != 0 || - info.size > UINT32_MAX || info.stencil_size > UINT32_MAX || + if (info.address == 0 || info.size == 0 || info.address >= TRACKER_ADDRESS_SIZE || + info.size > TRACKER_ADDRESS_SIZE - info.address || (info.address & 0xffffu) != 0 || + info.width == 0 || info.height == 0 || info.pitch < info.width || info.layers == 0 || + info.size % info.layers != 0 || info.size > UINT32_MAX || info.stencil_size > UINT32_MAX || info.tile_mode != Prospero::GpuEnumValue(Prospero::TileMode::kDepth) || (has_stencil && (info.stencil_address == 0 || info.stencil_size == 0 || @@ -1760,9 +1755,8 @@ DepthStencilVulkanImage* TextureCache::FindDepthTarget(CommandBuffer* command, G m_memory_tracker.ForEachUploadRange( info.address, info.size, true, [](uint64_t, uint64_t) noexcept {}, [&]() noexcept { - m_tiler.DetileImage(ctx, - static_cast(match->image), info, - depth_source, true); + m_tiler.DetileImage(ctx, static_cast(match->image), + info, depth_source, true); }); match->buffer_modified = false; match->gpu_modified = true; @@ -1832,17 +1826,15 @@ DepthStencilVulkanImage* TextureCache::FindDepthTarget(CommandBuffer* command, G case DepthOverlap::RetireStorage: supported = cached.kind == CachedImage::Kind::StorageTexture && cached.gpu_modified && !cached.buffer_modified && - !cached.info.IsCpuDirty() && - retired_storage_source == nullptr && native_depth_source == nullptr && - discarded_depth_source == nullptr; + !cached.info.IsCpuDirty() && retired_storage_source == nullptr && + native_depth_source == nullptr && discarded_depth_source == nullptr; if (supported) { retired_storage_source = entry; } break; case DepthOverlap::ExpandTarget: - supported = - cached.kind == CachedImage::Kind::DepthTarget && native_depth_source == nullptr && - retired_storage_source == nullptr; + supported = cached.kind == CachedImage::Kind::DepthTarget && + native_depth_source == nullptr && retired_storage_source == nullptr; if (supported) { native_depth_source = entry; } @@ -1872,11 +1864,10 @@ DepthStencilVulkanImage* TextureCache::FindDepthTarget(CommandBuffer* command, G retired_storage_source->info.size); retired_storage_source->gpu_modified = false; } - const auto* transition_source = native_depth_source != nullptr - ? native_depth_source.get() - : (discarded_depth_source != nullptr - ? discarded_depth_source.get() - : nullptr); + const auto* transition_source = + native_depth_source != nullptr + ? native_depth_source.get() + : (discarded_depth_source != nullptr ? discarded_depth_source.get() : nullptr); RetireImages(retire, transition_source); const bool coherent_guest_stencil = has_stencil && @@ -2050,8 +2041,8 @@ TextureCache::RegisterVideoOutSurfaces(GraphicContext* ctx, m_memory_tracker.ForEachUploadRange( info.address, info.size, false, [](uint64_t, uint64_t) noexcept {}, [&]() noexcept { - ImageOps::UploadVideoOut( - ctx, static_cast(cached->image), info, false); + ImageOps::UploadVideoOut(ctx, static_cast(cached->image), + info, false); }); } else { // A compressed guest surface cannot be decoded without its DCC metadata. Establish the @@ -2180,8 +2171,8 @@ bool TextureCache::ClearImageFromBuffer(CommandBuffer* command, uint64_t vaddr, static_cast(command), vaddr, size); } m_buffer_cache.ValidateGpuAccess(vaddr, size, false, true); - std::lock_guard transaction(m_resource_mutex); - FaultSafeTextureLock lock(this, m_lock); + std::lock_guard transaction(m_resource_mutex); + FaultSafeTextureLock lock(this, m_lock); enum class ClearAspect : uint8_t { None, Color, Depth, Stencil }; auto classify = [vaddr, size](const CachedImage& cached) { const bool color = cached.kind == CachedImage::Kind::VideoOut || @@ -2238,8 +2229,7 @@ bool TextureCache::ClearImageFromBuffer(CommandBuffer* command, uint64_t vaddr, return false; } uint8_t stencil_clear = 0; - if (aspect == ClearAspect::Stencil && - !DecodePackedStencilClear(packed_clear, &stencil_clear)) { + if (aspect == ClearAspect::Stencil && !DecodePackedStencilClear(packed_clear, &stencil_clear)) { return false; } @@ -2257,8 +2247,7 @@ bool TextureCache::ClearImageFromBuffer(CommandBuffer* command, uint64_t vaddr, !buffer_overlap || IsCoherentGuestImageSource(source, vaddr, size); const bool image_cpu_modified = m_memory_tracker.IsRegionCpuModified(vaddr, size); const bool invalid_common = !buffer_source_valid || buffer_cpu_modified || - buffer_gpu_modified || match->buffer_modified || - image_cpu_modified; + buffer_gpu_modified || match->buffer_modified || image_cpu_modified; if (aspect == ClearAspect::Color && invalid_common) { EXIT("TextureCache: compute image clear requires exclusive GPU image ownership, " "addr=0x%016" PRIx64 " size=0x%016" PRIx64 @@ -2276,8 +2265,8 @@ bool TextureCache::ClearImageFromBuffer(CommandBuffer* command, uint64_t vaddr, " gpu_modified=%d buffer_overlap=%d source_valid=%d buffer_cpu_modified=%d" " buffer_gpu_modified=%d buffer_modified=%d image_cpu_modified=%d\n", plane, source_name, vaddr, size, match->gpu_modified, buffer_overlap, - buffer_source_valid, buffer_cpu_modified, buffer_gpu_modified, - match->buffer_modified, image_cpu_modified); + buffer_source_valid, buffer_cpu_modified, buffer_gpu_modified, match->buffer_modified, + image_cpu_modified); } auto* vk_buffer = command->GetPool()->buffers[command->GetIndex()]; @@ -2288,9 +2277,8 @@ bool TextureCache::ClearImageFromBuffer(CommandBuffer* command, uint64_t vaddr, } GraphicsRenderColorImageBarrier(vk_buffer, match->image, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL); - const VkImageSubresourceRange range {VK_IMAGE_ASPECT_COLOR_BIT, 0, - VK_REMAINING_MIP_LEVELS, 0, - match->image->layers}; + const VkImageSubresourceRange range {VK_IMAGE_ASPECT_COLOR_BIT, 0, VK_REMAINING_MIP_LEVELS, + 0, match->image->layers}; vkCmdClearColorImage(vk_buffer, match->image->image, match->image->layout, &clear, 1, &range); GraphicsRenderColorImageBarrier(vk_buffer, match->image, RENDER_COLOR_IMAGE_LAYOUT); @@ -2312,7 +2300,7 @@ bool TextureCache::ClearImageFromBuffer(CommandBuffer* command, uint64_t vaddr, GraphicsRenderDepthStencilImageBarrier(vk_buffer, match->image, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL); const VkClearDepthStencilValue clear {depth_clear, stencil_clear}; - const auto clear_aspect = static_cast( + const auto clear_aspect = static_cast( aspect == ClearAspect::Depth ? VK_IMAGE_ASPECT_DEPTH_BIT : VK_IMAGE_ASPECT_STENCIL_BIT); const VkImageSubresourceRange range {clear_aspect, 0, VK_REMAINING_MIP_LEVELS, 0, match->image->layers}; @@ -2441,9 +2429,8 @@ void TextureCache::PrepareHostWrite(uint64_t vaddr, uint64_t size) { MarkSampledAliasesCpuDirtyLocked(vaddr, size); } -void TextureCache::SynchronizeColorImageToBufferLocked(CachedImage& cached, - uint64_t write_address, - uint64_t write_size) { +void TextureCache::SynchronizeColorImageToBufferLocked(CachedImage& cached, uint64_t write_address, + uint64_t write_size) { const bool render_target = cached.kind == CachedImage::Kind::RenderTarget; const bool video_out = cached.kind == CachedImage::Kind::VideoOut; const bool storage = cached.kind == CachedImage::Kind::StorageTexture; @@ -2485,18 +2472,17 @@ void TextureCache::SynchronizeColorImageToBufferLocked(CachedImage& cached, const bool layered_size = single_slice && static_cast(exact.size) * target.layers == target.size; if (storage && target.levels > 1) { - single_slice = TileGetRenderTargetMipLayout( - target.width, target.height, target.pitch, target.bytes_per_element, target.levels, - &exact, nullptr, nullptr); + single_slice = TileGetRenderTargetMipLayout(target.width, target.height, target.pitch, + target.bytes_per_element, target.levels, &exact, + nullptr, nullptr); } - const bool exact_tiled = - tiled && exact.align == 65536 && - (storage ? single_slice && exact.size == target.size : layered_size); - const bool valid_kind = render_target || storage || (video_out && cached.video_out.compression == - VideoOutCompression::Uncompressed); + const bool exact_tiled = tiled && exact.align == 65536 && + (storage ? single_slice && exact.size == target.size : layered_size); + const bool valid_kind = + render_target || storage || + (video_out && cached.video_out.compression == VideoOutCompression::Uncompressed); if (!valid_kind || !cached.gpu_modified || cached.buffer_modified || - (!storage && target.levels != 1) || - target.size > UINT32_MAX || (!linear && !exact_tiled) || + (!storage && target.levels != 1) || target.size > UINT32_MAX || (!linear && !exact_tiled) || HasMetaOverlapLocked(target.address, target.size)) { EXIT("TextureCache: unsupported color-image buffer synchronization, " "addr=0x%016" PRIx64 " size=0x%016" PRIx64 @@ -2512,8 +2498,7 @@ void TextureCache::SynchronizeColorImageToBufferLocked(CachedImage& cached, write_address - target.address > target.size || write_size > target.size - (write_address - target.address)) { EXIT("TextureCache: image synchronization write is outside backing, " - "write=0x%016" PRIx64 "+0x%016" PRIx64 " image=0x%016" PRIx64 - "+0x%016" PRIx64 "\n", + "write=0x%016" PRIx64 "+0x%016" PRIx64 " image=0x%016" PRIx64 "+0x%016" PRIx64 "\n", write_address, write_size, target.address, target.size); } const auto slice_size = target.size / target.layers; @@ -2550,7 +2535,7 @@ void TextureCache::SynchronizeColorImageToBufferLocked(CachedImage& cached, } } else { regions = MakeLayeredImageBufferCopies(target.layers, slice_size, target.pitch, - target.width, target.height); + target.width, target.height); } UtilFillBuffer(cached.ctx, m_buffer_transition_linear.data(), target.size, regions, cached.image, cached.image->layout); @@ -2580,39 +2565,40 @@ void TextureCache::SynchronizeColorImageToBufferLocked(CachedImage& cached, cached.buffer_modified = true; } -void TextureCache::SynchronizeDepthImageToBufferLocked(CachedImage& cached, - uint64_t write_address, - uint64_t write_size) { - const auto& info = cached.depth; - const bool has_stencil = info.stencil_address != 0 || info.stencil_size != 0; - const bool has_htile = info.htile_address != 0 || info.htile_size != 0; +void TextureCache::SynchronizeDepthImageToBufferLocked(CachedImage& cached, uint64_t write_address, + uint64_t write_size) { + const auto& info = cached.depth; + const bool has_stencil = info.stencil_address != 0 || info.stencil_size != 0; + const bool has_htile = info.htile_address != 0 || info.htile_size != 0; TileSizeAlign expected_stencil {}; TileSizeAlign expected_htile {}; TileSizeAlign expected_depth {}; - const bool d16 = info.guest_format == Prospero::GpuEnumValue(Prospero::BufferFormat::k16UNorm) && - info.format == VK_FORMAT_D16_UNORM && info.bytes_per_element == 2; - const bool d32 = info.guest_format == Prospero::GpuEnumValue(Prospero::BufferFormat::k32Float) && - info.format == VK_FORMAT_D32_SFLOAT && info.bytes_per_element == 4; - const bool layout = (d16 || d32) && - TileGetDepthSize(info.width, info.height, 0, - Prospero::GpuEnumValue(d16 ? Prospero::DepthFormat::kZ16 - : Prospero::DepthFormat::kZ32F), - Prospero::GpuEnumValue(Prospero::StencilFormat::kInvalid), - false, &expected_stencil, &expected_htile, - &expected_depth); + const bool d16 = + info.guest_format == Prospero::GpuEnumValue(Prospero::BufferFormat::k16UNorm) && + info.format == VK_FORMAT_D16_UNORM && info.bytes_per_element == 2; + const bool d32 = + info.guest_format == Prospero::GpuEnumValue(Prospero::BufferFormat::k32Float) && + info.format == VK_FORMAT_D32_SFLOAT && info.bytes_per_element == 4; + const bool layout = + (d16 || d32) && + TileGetDepthSize(info.width, info.height, 0, + Prospero::GpuEnumValue(d16 ? Prospero::DepthFormat::kZ16 + : Prospero::DepthFormat::kZ32F), + Prospero::GpuEnumValue(Prospero::StencilFormat::kInvalid), false, + &expected_stencil, &expected_htile, &expected_depth); if (cached.kind != CachedImage::Kind::DepthTarget || !cached.gpu_modified || cached.buffer_modified || write_address != info.address || write_size != info.size || - has_stencil || has_htile || info.layers != 1 || !layout || - expected_depth.align != 65536 || expected_depth.size != info.size || - cached.image->format != info.format || cached.image->extent.width != info.width || - cached.image->extent.height != info.height || HasMetaOverlapLocked(info.address, info.size)) { + has_stencil || has_htile || info.layers != 1 || !layout || expected_depth.align != 65536 || + expected_depth.size != info.size || cached.image->format != info.format || + cached.image->extent.width != info.width || cached.image->extent.height != info.height || + HasMetaOverlapLocked(info.address, info.size)) { EXIT("TextureCache: unsupported depth-image buffer synchronization, " - "write=0x%016" PRIx64 "+0x%016" PRIx64 " depth=0x%016" PRIx64 - "+0x%016" PRIx64 " extent=%ux%u layers=%u format=%d guest=%u bpe=%u" + "write=0x%016" PRIx64 "+0x%016" PRIx64 " depth=0x%016" PRIx64 "+0x%016" PRIx64 + " extent=%ux%u layers=%u format=%d guest=%u bpe=%u" " stencil=%d htile=%d gpu_modified=%d buffer_modified=%d\n", - write_address, write_size, info.address, info.size, info.width, info.height, info.layers, - static_cast(info.format), info.guest_format, info.bytes_per_element, has_stencil, - has_htile, cached.gpu_modified, cached.buffer_modified); + write_address, write_size, info.address, info.size, info.width, info.height, + info.layers, static_cast(info.format), info.guest_format, info.bytes_per_element, + has_stencil, has_htile, cached.gpu_modified, cached.buffer_modified); } VulkanDeviceWaitIdle(cached.ctx); m_buffer_transition_linear.resize(info.size); @@ -2623,7 +2609,8 @@ void TextureCache::SynchronizeDepthImageToBufferLocked(CachedImage& cached, cached.image->layout); m_buffer_transition_guest.resize(info.size); m_tiler.TileImage(m_buffer_transition_guest.data(), m_buffer_transition_linear.data(), info); - Libs::LibKernel::Memory::WriteBacking(info.address, m_buffer_transition_guest.data(), info.size); + Libs::LibKernel::Memory::WriteBacking(info.address, m_buffer_transition_guest.data(), + info.size); m_memory_tracker.ForEachDownloadRange(info.address, info.size, [](uint64_t, uint64_t) noexcept {}); m_buffer_cache.PublishImageBacking(write_address, write_size); @@ -2687,9 +2674,7 @@ bool TextureCache::InvalidateMemoryFromGPU(uint64_t vaddr, uint64_t size, case BufferImageWrite::InvalidateVideoOut: case BufferImageWrite::InvalidateStorageTexture: case BufferImageWrite::InvalidateDepthTarget: - case BufferImageWrite::InvalidateRenderTarget: - cached.buffer_modified = true; - return true; + case BufferImageWrite::InvalidateRenderTarget: cached.buffer_modified = true; return true; case BufferImageWrite::SynchronizeRenderTarget: case BufferImageWrite::SynchronizeStorageTexture: SynchronizeColorImageToBufferLocked(cached, vaddr, size); @@ -2709,8 +2694,8 @@ bool TextureCache::InvalidateMemoryFromGPU(uint64_t vaddr, uint64_t size, } DepthStencilVulkanImage* TextureCache::FindDepthTargetByRange(CommandBuffer* command, - uint64_t vaddr, uint64_t size, - bool allow_containing_sampled) { + uint64_t vaddr, uint64_t size, + bool allow_containing_sampled) { if (command == nullptr || vaddr == 0 || size == 0 || vaddr >= TRACKER_ADDRESS_SIZE || size > TRACKER_ADDRESS_SIZE - vaddr) { EXIT("TextureCache: invalid depth-target range query, addr=0x%016" PRIx64 @@ -2724,9 +2709,8 @@ DepthStencilVulkanImage* TextureCache::FindDepthTargetByRange(CommandBuffer* com !cached->OverlapsRange(vaddr, size, false)) { continue; } - const bool containing_sampled = allow_containing_sampled && - vaddr == cached->depth.address && - size > cached->depth.size; + const bool containing_sampled = + allow_containing_sampled && vaddr == cached->depth.address && size > cached->depth.size; if ((!IsDepthTargetRangeCompatible(cached->depth, vaddr, size) && !containing_sampled) || found != nullptr) { EXIT("TextureCache: incompatible or ambiguous depth-target range, addr=0x%016" PRIx64 @@ -2766,8 +2750,8 @@ RenderTextureVulkanImage* TextureCache::FindRenderTargetByRange(CommandBuffer* c " size=0x%016" PRIx64 "\n", vaddr, size); } - FaultSafeTextureLock lock(this, m_lock); - CachedImage* found = nullptr; + FaultSafeTextureLock lock(this, m_lock); + CachedImage* found = nullptr; for (auto* cached: FindImagesInRegionLocked(vaddr, size, false)) { if (cached->kind != CachedImage::Kind::RenderTarget || !ImageRangeOverlaps(vaddr, size, cached->Address(), cached->Size())) { @@ -2784,8 +2768,7 @@ RenderTextureVulkanImage* TextureCache::FindRenderTargetByRange(CommandBuffer* c if (found != nullptr) { EXIT("TextureCache: incompatible or ambiguous render-target range, addr=0x%016" PRIx64 " size=0x%016" PRIx64 " cached=0x%016" PRIx64 "+0x%016" PRIx64 " previous=%p\n", - vaddr, size, cached->Address(), cached->Size(), - static_cast(found)); + vaddr, size, cached->Address(), cached->Size(), static_cast(found)); } found = cached; } @@ -2804,14 +2787,13 @@ RenderTextureVulkanImage* TextureCache::FindRenderTargetByRange(CommandBuffer* c TextureCache::RegionInfo TextureCache::QueryRegion(uint64_t vaddr, uint64_t size) { if (vaddr == 0 || size == 0 || vaddr >= TRACKER_ADDRESS_SIZE || size > TRACKER_ADDRESS_SIZE - vaddr) { - EXIT("TextureCache: invalid region query, addr=0x%016" PRIx64 - " size=0x%016" PRIx64 "\n", + EXIT("TextureCache: invalid region query, addr=0x%016" PRIx64 " size=0x%016" PRIx64 "\n", vaddr, size); } FaultSafeTextureLock lock(this, m_lock); - RegionInfo result; - const auto candidates = FindImagesInRegionLocked(vaddr, size, true); - result.image_pages = !candidates.empty(); + RegionInfo result; + const auto candidates = FindImagesInRegionLocked(vaddr, size, true); + result.image_pages = !candidates.empty(); for (const auto* cached: candidates) { const bool bytes = cached->OverlapsRange(vaddr, size, false); result.image_bytes |= bytes; diff --git a/src/graphics/host_gpu/renderer/textureCache.h b/src/graphics/host_gpu/renderer/textureCache.h index f79aa1e..803e002 100644 --- a/src/graphics/host_gpu/renderer/textureCache.h +++ b/src/graphics/host_gpu/renderer/textureCache.h @@ -34,13 +34,13 @@ class ResourceMutex; class TextureCache { public: struct RegionInfo { - bool image_pages = false; - bool image_bytes = false; - bool gpu_image_bytes = false; - bool non_sampled_pages = false; - bool metadata_pages = false; - bool metadata_bytes = false; - bool gpu_metadata_bytes = false; + bool image_pages = false; + bool image_bytes = false; + bool gpu_image_bytes = false; + bool non_sampled_pages = false; + bool metadata_pages = false; + bool metadata_bytes = false; + bool gpu_metadata_bytes = false; }; TextureCache(PageManager& page_manager, BufferCache& buffer_cache, @@ -103,15 +103,15 @@ public: FindDepthTargetByRange(CommandBuffer* command, uint64_t vaddr, uint64_t size, bool allow_containing_sampled = false); [[nodiscard]] RegionInfo QueryRegion(uint64_t vaddr, uint64_t size); - void RegisterMeta(uint64_t vaddr, uint64_t size, uint32_t layers = 1); - [[nodiscard]] bool IsMeta(uint64_t vaddr); - [[nodiscard]] bool IsMetaRange(uint64_t vaddr, uint64_t size); - [[nodiscard]] bool IsMetaCleared(uint64_t vaddr, uint32_t slice); - [[nodiscard]] bool ClearMeta(uint64_t vaddr); - [[nodiscard]] bool TouchMeta(uint64_t vaddr, uint32_t slice, bool is_clear); - [[nodiscard]] bool InvalidateMemory(PageFaultAccess access, uint64_t vaddr, uint64_t size, - PageFaultPhase phase) noexcept; - void UnmapMemory(uint64_t vaddr, uint64_t size); + void RegisterMeta(uint64_t vaddr, uint64_t size, uint32_t layers = 1); + [[nodiscard]] bool IsMeta(uint64_t vaddr); + [[nodiscard]] bool IsMetaRange(uint64_t vaddr, uint64_t size); + [[nodiscard]] bool IsMetaCleared(uint64_t vaddr, uint32_t slice); + [[nodiscard]] bool ClearMeta(uint64_t vaddr); + [[nodiscard]] bool TouchMeta(uint64_t vaddr, uint32_t slice, bool is_clear); + [[nodiscard]] bool InvalidateMemory(PageFaultAccess access, uint64_t vaddr, uint64_t size, + PageFaultPhase phase) noexcept; + void UnmapMemory(uint64_t vaddr, uint64_t size); VulkanImage* GetDummySampledTexture(bool uint_format, bool image_3d); VulkanImage* GetDummyStorageTexture(bool uint_format, bool image_3d); @@ -137,10 +137,10 @@ private: void RetireStorageDepthAliasLocked(GraphicContext* ctx, const ImageInfo& requested); void RegisterImageLocked(CachedImage& image); void UnregisterImageLocked(CachedImage& image, bool release_tracking); - [[nodiscard]] VulkanImage* PublishImage(CommandBuffer* command, - std::shared_ptr image); - [[nodiscard]] std::vector - FindImagesInRegionLocked(uint64_t vaddr, uint64_t size, bool page_overlap); + [[nodiscard]] VulkanImage* PublishImage(CommandBuffer* command, + std::shared_ptr image); + [[nodiscard]] std::vector FindImagesInRegionLocked(uint64_t vaddr, uint64_t size, + bool page_overlap); void RequireRetirementIsolation(const std::vector& retire, const char* operation, uint64_t address, uint64_t size) const; void RetireImages(const std::vector& retire, @@ -150,7 +150,7 @@ private: void SynchronizeDepthImageToBufferLocked(CachedImage& cached, uint64_t write_address, uint64_t write_size); - std::unique_ptr m_dummy_textures; + std::unique_ptr m_dummy_textures; TrackingSpinLock m_lock; std::mutex m_fault_mutex; MemoryTracker m_memory_tracker; diff --git a/src/graphics/host_gpu/renderer/tiler.cpp b/src/graphics/host_gpu/renderer/tiler.cpp index 4b4ce4b..6bdeb1a 100644 --- a/src/graphics/host_gpu/renderer/tiler.cpp +++ b/src/graphics/host_gpu/renderer/tiler.cpp @@ -163,7 +163,7 @@ void Tiler::TileImage(void* dst, const void* src, const RenderTargetInfo& info) auto* linear_slice = static_cast(src) + slice_size * layer; if (standard64) { TileConvertLinearToTiledStandard64KB32(guest_slice, linear_slice, info.width, - info.height, info.pitch, slice_size); + info.height, info.pitch, slice_size); } else { TileConvertLinearToTiledRenderTarget(guest_slice, linear_slice, info.width, info.height, info.pitch, info.bytes_per_element, slice_size); @@ -172,30 +172,30 @@ void Tiler::TileImage(void* dst, const void* src, const RenderTargetInfo& info) } void Tiler::TileImage(void* dst, const void* src, const ImageInfo& info) const { - const bool image_2d = info.type == Prospero::GpuEnumValue(Prospero::ImageType::kColor2D) && - info.depth == 1; + const bool image_2d = + info.type == Prospero::GpuEnumValue(Prospero::ImageType::kColor2D) && info.depth == 1; const auto bytes_per_element = Prospero::RenderTargetBytesPerElement(info.format); if (!image_2d || info.levels == 0 || info.levels > 16 || info.tile != Prospero::GpuEnumValue(Prospero::TileMode::kRenderTarget) || bytes_per_element == 0) { - EXIT("Tiler: unsupported storage-texture tile, addr=0x%016" PRIx64 - "+0x%016" PRIx64 " extent=%ux%ux%u levels=%u tile=%u format=%u\n", + EXIT("Tiler: unsupported storage-texture tile, addr=0x%016" PRIx64 "+0x%016" PRIx64 + " extent=%ux%ux%u levels=%u tile=%u format=%u\n", info.address, info.size, info.width, info.height, info.depth, info.levels, info.tile, info.format); } auto layout = TextureCalcUploadLayout(info.format, info.width, info.height, info.levels, info.depth, info.pitch, info.tile, info.size, true, false, false, "StorageTextureReadback"); - auto regions = TextureBuildUploadRegions( - layout, Prospero::SurfaceFormat(info.format), info.width, info.height, info.depth, - info.levels, false, false, TextureUploadDestination::MipLevels, - TextureUploadSliceLayout::MipChainPerSlice); + auto regions = TextureBuildUploadRegions(layout, Prospero::SurfaceFormat(info.format), + info.width, info.height, info.depth, info.levels, + false, false, TextureUploadDestination::MipLevels, + TextureUploadSliceLayout::MipChainPerSlice); std::memset(dst, 0, info.size); for (uint32_t level = 0; level < info.levels; level++) { const auto& level_size = layout.level_sizes[level]; - const auto guest_offset = level_size.src_size != 0 ? level_size.src_offset - : level_size.offset; - auto* guest = static_cast(dst) + guest_offset; + const auto guest_offset = + level_size.src_size != 0 ? level_size.src_offset : level_size.offset; + auto* guest = static_cast(dst) + guest_offset; const auto* linear = static_cast(src) + regions[level].offset; TileConvertLinearToTiledRenderTarget( guest, linear, regions[level].width, regions[level].height, regions[level].pitch, diff --git a/src/graphics/host_gpu/utils.h b/src/graphics/host_gpu/utils.h index 4a5edb3..6915250 100644 --- a/src/graphics/host_gpu/utils.h +++ b/src/graphics/host_gpu/utils.h @@ -92,8 +92,7 @@ void UtilCopyImageWithBuffer(CommandBuffer* buffer, GraphicContext* ctx, VulkanI uint64_t dst_layout); void UtilBlitPreparedImage(CommandBuffer* buffer, VulkanImage* src_image, VulkanSwapchain* dst_swapchain); -void UtilClearColorImage(CommandBuffer* buffer, VulkanImage* image, - const VkClearColorValue& color); +void UtilClearColorImage(CommandBuffer* buffer, VulkanImage* image, const VkClearColorValue& color); void UtilFillImage(GraphicContext* ctx, VulkanImage* dst_image, const void* src_data, uint64_t size, uint32_t src_pitch, uint64_t dst_layout); void UtilFillImage(GraphicContext* ctx, DepthStencilVulkanImage* dst_image, const void* src_data, diff --git a/src/graphics/presentation/displayBuffer.h b/src/graphics/presentation/displayBuffer.h index b96c6c0..ab2e7ec 100644 --- a/src/graphics/presentation/displayBuffer.h +++ b/src/graphics/presentation/displayBuffer.h @@ -18,11 +18,11 @@ struct DisplayBufferImage { }; DisplayBufferImage DisplayBufferFind(uint64_t addr, bool render_target = false); -int DisplayBufferSubmitFlipFromGpu(Graphics::CommandBuffer* buffer, int handle, int index, - int flip_mode, int64_t flip_arg, uint64_t* request_id); +int DisplayBufferSubmitFlipFromGpu(Graphics::CommandBuffer* buffer, int handle, int index, + int flip_mode, int64_t flip_arg, uint64_t* request_id); uint64_t DisplayBufferPrepareNextFlipOnGpu(Graphics::CommandBuffer* buffer); -void DisplayBufferCompleteFlipFromGpu(uint64_t request_id); -void DisplayBufferWaitForFlipQueueSlot(); +void DisplayBufferCompleteFlipFromGpu(uint64_t request_id); +void DisplayBufferWaitForFlipQueueSlot(); } // namespace Libs::Presentation diff --git a/src/graphics/presentation/videoOut.cpp b/src/graphics/presentation/videoOut.cpp index 96b5a55..02eff1d 100644 --- a/src/graphics/presentation/videoOut.cpp +++ b/src/graphics/presentation/videoOut.cpp @@ -163,28 +163,28 @@ public: virtual ~FlipQueue() { KYTY_NOT_IMPLEMENTED; } KYTY_CLASS_NO_COPY(FlipQueue); - bool Reserve(VideoOutConfig* cfg, int index, int64_t flip_arg, bool gpu_eop, - uint64_t* request_id); - void Prepare(uint64_t request_id, Graphics::CommandBuffer* buffer); + bool Reserve(VideoOutConfig* cfg, int index, int64_t flip_arg, bool gpu_eop, + uint64_t* request_id); + void Prepare(uint64_t request_id, Graphics::CommandBuffer* buffer); uint64_t PrepareNextCpu(Graphics::CommandBuffer* buffer); - void Complete(uint64_t request_id); - void WaitForSubmitSlot(); - bool Flip(uint32_t micros); - bool HasPending(VideoOutConfig* cfg, int start_index, int count); - void GetFlipStatus(VideoOutConfig* cfg, VideoOutFlipStatus* out); - void Wait(VideoOutConfig* cfg, int index); + void Complete(uint64_t request_id); + void WaitForSubmitSlot(); + bool Flip(uint32_t micros); + bool HasPending(VideoOutConfig* cfg, int start_index, int count); + void GetFlipStatus(VideoOutConfig* cfg, VideoOutFlipStatus* out); + void Wait(VideoOutConfig* cfg, int index); private: enum class RequestState { Reserved, Recording, Ready, Presenting }; struct Request { - uint64_t id; - VideoOutConfig* cfg; - int index; - int64_t flip_arg; - uint64_t submit_ptc; - bool gpu_eop; - RequestState state; + uint64_t id; + VideoOutConfig* cfg; + int index; + int64_t flip_arg; + uint64_t submit_ptc; + bool gpu_eop; + RequestState state; Graphics::PreparedFrame* frame; }; @@ -194,7 +194,7 @@ private: Common::CondVar m_done_cond_var; std::list m_requests; std::list m_cpu_requests; - bool m_processing = false; + bool m_processing = false; uint64_t m_next_request_id = 1; }; diff --git a/src/graphics/presentation/window.h b/src/graphics/presentation/window.h index b3d8807..96baa35 100644 --- a/src/graphics/presentation/window.h +++ b/src/graphics/presentation/window.h @@ -17,9 +17,9 @@ VkSurfaceCapabilitiesKHR* VulkanGetSurfaceCapabilities(); GraphicContext* WindowGetGraphicContext(); -void WindowInit(uint32_t width, uint32_t height); -void WindowRun(); -void WindowWaitForGraphicInitialized(); +void WindowInit(uint32_t width, uint32_t height); +void WindowRun(); +void WindowWaitForGraphicInitialized(); PreparedFrame* WindowPrepareFrame(CommandBuffer* buffer, VideoOutVulkanImage* image); PreparedFrame* WindowPrepareBlankFrame(CommandBuffer* buffer, uint32_t width, uint32_t height, bool opaque); diff --git a/src/graphics/presentation/window/swapchain.cpp b/src/graphics/presentation/window/swapchain.cpp index f67f432..6ed6169 100644 --- a/src/graphics/presentation/window/swapchain.cpp +++ b/src/graphics/presentation/window/swapchain.cpp @@ -59,9 +59,9 @@ namespace Libs::Graphics { struct PreparedFrame { - VulkanImage image {VulkanImageType::Unknown}; + VulkanImage image {VulkanImageType::Unknown}; std::unique_ptr present_commands; - bool busy = false; + bool busy = false; }; class PreparedFramePool { @@ -385,7 +385,8 @@ static void VulkanRecreateSwapchain() { } static void ValidatePreparedCommand(CommandBuffer* buffer) { - if (buffer == nullptr || buffer->IsInvalid() || buffer->GetQueue() != GraphicContext::QUEUE_GFX) { + if (buffer == nullptr || buffer->IsInvalid() || + buffer->GetQueue() != GraphicContext::QUEUE_GFX) { EXIT("prepared frames must be recorded on the graphics queue\n"); } EXIT_IF(g_render_ctx == nullptr); diff --git a/src/graphics/shader/recompiler/BufferFormat.h b/src/graphics/shader/recompiler/BufferFormat.h index 5694d42..01cef98 100644 --- a/src/graphics/shader/recompiler/BufferFormat.h +++ b/src/graphics/shader/recompiler/BufferFormat.h @@ -18,16 +18,17 @@ enum class ComponentType { struct BufferFormatInfo { Prospero::BufferFormat format = Prospero::BufferFormat::kInvalid; - ComponentType type = ComponentType::Unknown; - uint32_t component_count = 0; - uint32_t byte_size = 0; - uint32_t component_bits[4] = {}; - uint32_t component_bit_offset[4] = {}; - bool packed_bitfield = false; + ComponentType type = ComponentType::Unknown; + uint32_t component_count = 0; + uint32_t byte_size = 0; + uint32_t component_bits[4] = {}; + uint32_t component_bit_offset[4] = {}; + bool packed_bitfield = false; }; constexpr Prospero::BufferFormat DecodeTBufferFormat(uint32_t data_format, uint32_t number_format) { - return static_cast(((number_format & 0x7u) << 4u) | (data_format & 0xfu)); + return static_cast(((number_format & 0x7u) << 4u) | + (data_format & 0xfu)); } constexpr ComponentType GetFormatComponentType(Prospero::BufferFormat format) { diff --git a/src/graphics/shader/recompiler/shaderIR/ShaderIR.cpp b/src/graphics/shader/recompiler/shaderIR/ShaderIR.cpp index c062f29..42874ad 100644 --- a/src/graphics/shader/recompiler/shaderIR/ShaderIR.cpp +++ b/src/graphics/shader/recompiler/shaderIR/ShaderIR.cpp @@ -1,8 +1,8 @@ #include "graphics/shader/recompiler/ShaderIR.h" -#include "graphics/shader/recompiler/shaderIR/ShaderIRInternal.h" #include "common/assert.h" #include "graphics/shader/recompiler/BufferFormat.h" +#include "graphics/shader/recompiler/shaderIR/ShaderIRInternal.h" #include #include @@ -403,7 +403,6 @@ Decoder::Operand M0Operand() { return operand; } - namespace { bool LowerScalarSelect(const Decoder::Instruction& decoded, BasicBlock* block, std::string* error) { @@ -1145,7 +1144,6 @@ bool LowerDecodedInstruction(const Decoder::Instruction& inst, BasicBlock* block return LowerImplemented(inst, block, error); } - bool LowerImplemented(const Decoder::Instruction& decoded, BasicBlock* block, std::string* error) { Instruction inst; inst.pc = decoded.pc; diff --git a/src/graphics/shader/recompiler/shaderIR/ShaderIRInternal.h b/src/graphics/shader/recompiler/shaderIR/ShaderIRInternal.h index 7081516..c40a83e 100644 --- a/src/graphics/shader/recompiler/shaderIR/ShaderIRInternal.h +++ b/src/graphics/shader/recompiler/shaderIR/ShaderIRInternal.h @@ -14,36 +14,34 @@ bool IsVectorCarryOutOpcode(Decoder::Opcode opcode); bool ScalarResultWritesSccNonZero(Decoder::Opcode opcode); bool ScalarResultIs64Bit(Decoder::Opcode opcode); -Operand MakeSccOperand(); -Operand MakeImmediateU32(uint32_t value); -Operand MakePcRelativeU32(uint32_t value); -bool AppendScalarResultSccNonZero(const Decoder::Instruction& decoded, BasicBlock* block, - std::string* error); +Operand MakeSccOperand(); +Operand MakeImmediateU32(uint32_t value); +Operand MakePcRelativeU32(uint32_t value); +bool AppendScalarResultSccNonZero(const Decoder::Instruction& decoded, BasicBlock* block, + std::string* error); uint32_t VectorByteConvertIndex(Decoder::Opcode opcode); void CopyOperandModifiers(const Decoder::Operand& decoded, Operand& operand); -bool LowerRegisterOperand(const Decoder::Operand& decoded, Operand* operand, - std::string* error); -bool LowerSourceOperand(const Decoder::Operand& decoded, Operand* operand, std::string* error); -void ApplyDppDestinationMask(const Decoder::Instruction& decoded, Operand& dst); -uint32_t ResourceIndexFromOperand(const Decoder::Operand& operand); -MemoryInfo MemoryInfoFromDecoded(const Decoder::Instruction& decoded, ResourceKind kind); -uint32_t RawScalarLoadBase(const Decoder::Operand& operand); -void ClearRegisterOffsetModifiers(Decoder::Operand& operand); -bool TryGetScalarDestinationCode(const Decoder::Operand& operand, uint32_t& code); -bool TryOffsetScalarDestination(const Decoder::Operand& operand, uint32_t index, - Decoder::Operand* result); +bool LowerRegisterOperand(const Decoder::Operand& decoded, Operand* operand, std::string* error); +bool LowerSourceOperand(const Decoder::Operand& decoded, Operand* operand, std::string* error); +void ApplyDppDestinationMask(const Decoder::Instruction& decoded, Operand& dst); +uint32_t ResourceIndexFromOperand(const Decoder::Operand& operand); +MemoryInfo MemoryInfoFromDecoded(const Decoder::Instruction& decoded, ResourceKind kind); +uint32_t RawScalarLoadBase(const Decoder::Operand& operand); +void ClearRegisterOffsetModifiers(Decoder::Operand& operand); +bool TryGetScalarDestinationCode(const Decoder::Operand& operand, uint32_t& code); +bool TryOffsetScalarDestination(const Decoder::Operand& operand, uint32_t index, + Decoder::Operand* result); Decoder::Operand OffsetDecodedRegister(const Decoder::Operand& operand, uint32_t index); -MemoryInfo OffsetMemoryInfo(const Decoder::Instruction& decoded, ResourceKind kind, - uint32_t dword_index); -uint32_t TypedBufferComponentOffsetBytes(const Decoder::Instruction& decoded, - uint32_t component_index); -uint32_t TypedBufferFormatComponentCount(const Decoder::Instruction& decoded); -bool LowerMoveImmediateU32(uint32_t pc, const Decoder::Operand& dst, uint32_t value, - BasicBlock* block, std::string* error); -MemoryInfo OffsetBufferMemoryInfo(const Decoder::Instruction& decoded, - uint32_t component_index); -MemoryInfo ByteOffsetMemoryInfo(const Decoder::Instruction& decoded, ResourceKind kind, - uint32_t byte_offset); +MemoryInfo OffsetMemoryInfo(const Decoder::Instruction& decoded, ResourceKind kind, + uint32_t dword_index); +uint32_t TypedBufferComponentOffsetBytes(const Decoder::Instruction& decoded, + uint32_t component_index); +uint32_t TypedBufferFormatComponentCount(const Decoder::Instruction& decoded); +bool LowerMoveImmediateU32(uint32_t pc, const Decoder::Operand& dst, uint32_t value, + BasicBlock* block, std::string* error); +MemoryInfo OffsetBufferMemoryInfo(const Decoder::Instruction& decoded, uint32_t component_index); +MemoryInfo ByteOffsetMemoryInfo(const Decoder::Instruction& decoded, ResourceKind kind, + uint32_t byte_offset); ResourceKind FlatSegmentResourceKind(uint32_t segment); const Decoder::Operand& DecodedSourceAt(const Decoder::Instruction& decoded, uint32_t index); Decoder::Operand M0Operand(); diff --git a/src/graphics/shader/recompiler/shaderIR/ShaderIRLog.cpp b/src/graphics/shader/recompiler/shaderIR/ShaderIRLog.cpp index 6ce8588..ffedb12 100644 --- a/src/graphics/shader/recompiler/shaderIR/ShaderIRLog.cpp +++ b/src/graphics/shader/recompiler/shaderIR/ShaderIRLog.cpp @@ -1,8 +1,7 @@ -#include "graphics/shader/recompiler/ShaderIR.h" - -#include "graphics/shader/recompiler/shaderIR/ShaderIRInternal.h" #include "common/assert.h" #include "graphics/shader/recompiler/BufferFormat.h" +#include "graphics/shader/recompiler/ShaderIR.h" +#include "graphics/shader/recompiler/shaderIR/ShaderIRInternal.h" #include #include diff --git a/src/graphics/shader/recompiler/shaderIR/ShaderIRMemory.cpp b/src/graphics/shader/recompiler/shaderIR/ShaderIRMemory.cpp index ac3f666..8d5371b 100644 --- a/src/graphics/shader/recompiler/shaderIR/ShaderIRMemory.cpp +++ b/src/graphics/shader/recompiler/shaderIR/ShaderIRMemory.cpp @@ -1,8 +1,7 @@ -#include "graphics/shader/recompiler/ShaderIR.h" - -#include "graphics/shader/recompiler/shaderIR/ShaderIRInternal.h" #include "common/assert.h" #include "graphics/shader/recompiler/BufferFormat.h" +#include "graphics/shader/recompiler/ShaderIR.h" +#include "graphics/shader/recompiler/shaderIR/ShaderIRInternal.h" #include #include @@ -470,7 +469,6 @@ bool LowerImageOperation(const Decoder::Instruction& decoded, BasicBlock* block, return true; } - } // namespace bool LowerMemoryInstruction(const Decoder::Instruction& decoded, BasicBlock* block, @@ -647,7 +645,6 @@ bool LowerMemoryInstruction(const Decoder::Instruction& decoded, BasicBlock* blo } } - bool IsMemoryOpcode(Decoder::Opcode opcode) { switch (opcode) { case Decoder::Opcode::SLoadDword: diff --git a/src/graphics/shader/recompiler/shaderIR/ShaderIROpcodes.cpp b/src/graphics/shader/recompiler/shaderIR/ShaderIROpcodes.cpp index dba907b..fa2b33d 100644 --- a/src/graphics/shader/recompiler/shaderIR/ShaderIROpcodes.cpp +++ b/src/graphics/shader/recompiler/shaderIR/ShaderIROpcodes.cpp @@ -1,8 +1,7 @@ -#include "graphics/shader/recompiler/ShaderIR.h" - -#include "graphics/shader/recompiler/shaderIR/ShaderIRInternal.h" #include "common/assert.h" #include "graphics/shader/recompiler/BufferFormat.h" +#include "graphics/shader/recompiler/ShaderIR.h" +#include "graphics/shader/recompiler/shaderIR/ShaderIRInternal.h" #include #include @@ -425,7 +424,6 @@ constexpr LowerMap LOWER_OPS[] = { {Decoder::Opcode::ImageGather4H, Opcode::ImageGather4}, }; - } // namespace void SetError(std::string* error, const char* message) { diff --git a/src/graphics/shader/recompiler/spirvEmitter/spirvEmitterInternal.h b/src/graphics/shader/recompiler/spirvEmitter/spirvEmitterInternal.h index b2ee662..9a3190d 100644 --- a/src/graphics/shader/recompiler/spirvEmitter/spirvEmitterInternal.h +++ b/src/graphics/shader/recompiler/spirvEmitter/spirvEmitterInternal.h @@ -913,9 +913,11 @@ uint32_t AddressSourceCount(const IR::Instruction& inst, uint32_t first_src); bool IsFormattedBufferComponent(const IR::Instruction& inst); -Prospero::BufferFormat FormattedBufferFormat(const EmitterState& state, const IR::Instruction& inst); +Prospero::BufferFormat FormattedBufferFormat(const EmitterState& state, + const IR::Instruction& inst); -IR::Instruction WithFormatComponentByteOffset(const IR::Instruction& inst, Prospero::BufferFormat format); +IR::Instruction WithFormatComponentByteOffset(const IR::Instruction& inst, + Prospero::BufferFormat format); uint32_t EmitTBufferBitcastF32ToU32(EmitterState* state, uint32_t value); @@ -953,7 +955,7 @@ bool EmitTypedTBufferLoad(EmitterState* state, const IR::Instruction& inst, bool EmitFormattedBufferLoad(EmitterState* state, const IR::Instruction& inst); uint32_t FormattedBufferDwordStoreComponentCount(Prospero::BufferFormat format, - uint32_t opcode_components); + uint32_t opcode_components); bool EmitBufferIntegerFormatStore(EmitterState* state, const IR::Instruction& inst); diff --git a/src/graphics/shader/recompiler/spirvEmitter/spirvEmitterMemory.cpp b/src/graphics/shader/recompiler/spirvEmitter/spirvEmitterMemory.cpp index a25d5b8..1ed9a4f 100644 --- a/src/graphics/shader/recompiler/spirvEmitter/spirvEmitterMemory.cpp +++ b/src/graphics/shader/recompiler/spirvEmitter/spirvEmitterMemory.cpp @@ -726,13 +726,16 @@ bool IsFormattedBufferComponent(const IR::Instruction& inst) { inst.memory.data_dwords == 1u; } -Prospero::BufferFormat FormattedBufferFormat(const EmitterState& state, const IR::Instruction& inst) { +Prospero::BufferFormat FormattedBufferFormat(const EmitterState& state, + const IR::Instruction& inst) { return inst.memory.typed ? Format::DecodeTBufferFormat(inst.memory.data_format, inst.memory.number_format) - : static_cast(StorageBufferFormat(state, inst.memory, inst.pc)); + : static_cast( + StorageBufferFormat(state, inst.memory, inst.pc)); } -IR::Instruction WithFormatComponentByteOffset(const IR::Instruction& inst, Prospero::BufferFormat format) { +IR::Instruction WithFormatComponentByteOffset(const IR::Instruction& inst, + Prospero::BufferFormat format) { auto rebased = inst; if (inst.memory.typed || inst.memory.component_index == 0u) { return rebased; @@ -972,7 +975,7 @@ bool EmitFormattedBufferLoad(EmitterState* state, const IR::Instruction& inst) { } uint32_t FormattedBufferDwordStoreComponentCount(Prospero::BufferFormat format, - uint32_t opcode_components) { + uint32_t opcode_components) { switch (format) { case Prospero::BufferFormat::k32UInt: case Prospero::BufferFormat::k32SInt: diff --git a/src/graphics/shader/shader.cpp b/src/graphics/shader/shader.cpp index 6ccb5d7..3ca1a06 100644 --- a/src/graphics/shader/shader.cpp +++ b/src/graphics/shader/shader.cpp @@ -9,9 +9,9 @@ #include "common/magicEnum.h" #include "common/profiler.h" #include "common/stringUtils.h" +#include "graphics/guest_gpu/gpu_defs.h" #include "graphics/guest_gpu/graphicsRun.h" #include "graphics/guest_gpu/hardwareContext.h" -#include "graphics/guest_gpu/gpu_defs.h" #include "graphics/shader/recompiler/ShaderDecoder.h" #include "graphics/shader/recompiler/ShaderRecompiler.h" #include "graphics/shader/shaderVertexMetadata.h" @@ -562,14 +562,18 @@ static uint32_t VertexAttribFormatToBufferFormat(uint32_t format) { {Prospero::VertexAttribFormat::k10_11_11Float, Prospero::BufferFormat::k10_11_11Float}, {Prospero::VertexAttribFormat::k2_10_10_10UNorm, Prospero::BufferFormat::k2_10_10_10UNorm}, {Prospero::VertexAttribFormat::k2_10_10_10SNorm, Prospero::BufferFormat::k2_10_10_10SNorm}, - {Prospero::VertexAttribFormat::k2_10_10_10UScaled, Prospero::BufferFormat::k2_10_10_10UScaled}, - {Prospero::VertexAttribFormat::k2_10_10_10SScaled, Prospero::BufferFormat::k2_10_10_10SScaled}, + {Prospero::VertexAttribFormat::k2_10_10_10UScaled, + Prospero::BufferFormat::k2_10_10_10UScaled}, + {Prospero::VertexAttribFormat::k2_10_10_10SScaled, + Prospero::BufferFormat::k2_10_10_10SScaled}, {Prospero::VertexAttribFormat::k2_10_10_10UInt, Prospero::BufferFormat::k2_10_10_10UInt}, {Prospero::VertexAttribFormat::k2_10_10_10SInt, Prospero::BufferFormat::k2_10_10_10SInt}, {Prospero::VertexAttribFormat::k10_10_10_2UNorm, Prospero::BufferFormat::k10_10_10_2UNorm}, {Prospero::VertexAttribFormat::k10_10_10_2SNorm, Prospero::BufferFormat::k10_10_10_2SNorm}, - {Prospero::VertexAttribFormat::k10_10_10_2UScaled, Prospero::BufferFormat::k10_10_10_2UScaled}, - {Prospero::VertexAttribFormat::k10_10_10_2SScaled, Prospero::BufferFormat::k10_10_10_2SScaled}, + {Prospero::VertexAttribFormat::k10_10_10_2UScaled, + Prospero::BufferFormat::k10_10_10_2UScaled}, + {Prospero::VertexAttribFormat::k10_10_10_2SScaled, + Prospero::BufferFormat::k10_10_10_2SScaled}, {Prospero::VertexAttribFormat::k10_10_10_2UInt, Prospero::BufferFormat::k10_10_10_2UInt}, {Prospero::VertexAttribFormat::k10_10_10_2SInt, Prospero::BufferFormat::k10_10_10_2SInt}, {Prospero::VertexAttribFormat::k8_8_8_8UNorm, Prospero::BufferFormat::k8_8_8_8UNorm}, @@ -581,19 +585,25 @@ static uint32_t VertexAttribFormatToBufferFormat(uint32_t format) { {Prospero::VertexAttribFormat::k32_32UInt, Prospero::BufferFormat::k32_32UInt}, {Prospero::VertexAttribFormat::k32_32SInt, Prospero::BufferFormat::k32_32SInt}, {Prospero::VertexAttribFormat::k32_32Float, Prospero::BufferFormat::k32_32Float}, - {Prospero::VertexAttribFormat::k16_16_16_16UNorm, Prospero::BufferFormat::k16_16_16_16UNorm}, - {Prospero::VertexAttribFormat::k16_16_16_16SNorm, Prospero::BufferFormat::k16_16_16_16SNorm}, - {Prospero::VertexAttribFormat::k16_16_16_16UScaled, Prospero::BufferFormat::k16_16_16_16UScaled}, - {Prospero::VertexAttribFormat::k16_16_16_16SScaled, Prospero::BufferFormat::k16_16_16_16SScaled}, + {Prospero::VertexAttribFormat::k16_16_16_16UNorm, + Prospero::BufferFormat::k16_16_16_16UNorm}, + {Prospero::VertexAttribFormat::k16_16_16_16SNorm, + Prospero::BufferFormat::k16_16_16_16SNorm}, + {Prospero::VertexAttribFormat::k16_16_16_16UScaled, + Prospero::BufferFormat::k16_16_16_16UScaled}, + {Prospero::VertexAttribFormat::k16_16_16_16SScaled, + Prospero::BufferFormat::k16_16_16_16SScaled}, {Prospero::VertexAttribFormat::k16_16_16_16UInt, Prospero::BufferFormat::k16_16_16_16UInt}, {Prospero::VertexAttribFormat::k16_16_16_16SInt, Prospero::BufferFormat::k16_16_16_16SInt}, - {Prospero::VertexAttribFormat::k16_16_16_16Float, Prospero::BufferFormat::k16_16_16_16Float}, + {Prospero::VertexAttribFormat::k16_16_16_16Float, + Prospero::BufferFormat::k16_16_16_16Float}, {Prospero::VertexAttribFormat::k32_32_32UInt, Prospero::BufferFormat::k32_32_32UInt}, {Prospero::VertexAttribFormat::k32_32_32SInt, Prospero::BufferFormat::k32_32_32SInt}, {Prospero::VertexAttribFormat::k32_32_32Float, Prospero::BufferFormat::k32_32_32Float}, {Prospero::VertexAttribFormat::k32_32_32_32UInt, Prospero::BufferFormat::k32_32_32_32UInt}, {Prospero::VertexAttribFormat::k32_32_32_32SInt, Prospero::BufferFormat::k32_32_32_32SInt}, - {Prospero::VertexAttribFormat::k32_32_32_32Float, Prospero::BufferFormat::k32_32_32_32Float}, + {Prospero::VertexAttribFormat::k32_32_32_32Float, + Prospero::BufferFormat::k32_32_32_32Float}, }; for (const auto& entry: format_map) { @@ -793,9 +803,9 @@ static bool ShaderGetStaticInputInfoVS(const HW::VertexShaderInfo* regs, static void ShaderGetStaticInputInfoPS( const HW::PixelShaderInfo* regs, const HW::ShaderRegisters* sh, - const ShaderVertexInputInfo* vs_info, + const ShaderVertexInputInfo* vs_info, std::span target_export_mapping, - ShaderPixelInputInfo* ps_info) { + ShaderPixelInputInfo* ps_info) { KYTY_PROFILER_FUNCTION(); EXIT_IF(vs_info == nullptr); @@ -834,10 +844,10 @@ static void ShaderGetStaticInputInfoPS( : 0; for (int i = 0; i < 8; i++) { - ps_info->target_output_mode[i] = sh->target_output_mode[i]; - ps_info->target_export_mapping[i] = - sh->target_output_mode[i] != 0 ? target_export_mapping[i] - : Prospero::ColorComponentMapping {}; + ps_info->target_output_mode[i] = sh->target_output_mode[i]; + ps_info->target_export_mapping[i] = sh->target_output_mode[i] != 0 + ? target_export_mapping[i] + : Prospero::ColorComponentMapping {}; } ps_info->mrt_output_mask = 0; } diff --git a/src/graphics/shader/shader.h b/src/graphics/shader/shader.h index b0f9322..ef25b30 100644 --- a/src/graphics/shader/shader.h +++ b/src/graphics/shader/shader.h @@ -96,26 +96,26 @@ struct ShaderComputeInputInfo { }; struct ShaderPixelInputInfo { - uint32_t interpolator_settings[32] = {0}; - uint32_t input_num = 0; - uint32_t ps_system_input_base = 0; - uint8_t target_output_mode[8] = {}; - std::array target_export_mapping = {}; - uint32_t mrt_output_mask = 0; - uint32_t descriptor_set = 0; - bool ps_pos_x = false; - bool ps_pos_y = false; - bool ps_pos_xy = false; - bool ps_pos_z = false; - bool ps_pos_w = false; - bool ps_front_face = false; - bool ps_no_perspective = false; - bool ps_pixel_kill_enable = false; - bool ps_depth_export_enable = false; - bool ps_sample_mask_export_enable = false; - bool ps_early_z = false; - bool ps_execute_on_noop = false; - ShaderStageRuntime stage; + uint32_t interpolator_settings[32] = {0}; + uint32_t input_num = 0; + uint32_t ps_system_input_base = 0; + uint8_t target_output_mode[8] = {}; + std::array target_export_mapping = {}; + uint32_t mrt_output_mask = 0; + uint32_t descriptor_set = 0; + bool ps_pos_x = false; + bool ps_pos_y = false; + bool ps_pos_xy = false; + bool ps_pos_z = false; + bool ps_pos_w = false; + bool ps_front_face = false; + bool ps_no_perspective = false; + bool ps_pixel_kill_enable = false; + bool ps_depth_export_enable = false; + bool ps_sample_mask_export_enable = false; + bool ps_early_z = false; + bool ps_execute_on_noop = false; + ShaderStageRuntime stage; bool HasPositionInput() const { return ps_pos_x || ps_pos_y || ps_pos_z || ps_pos_w; } }; diff --git a/src/launcher/src/configurationListWidget.cpp b/src/launcher/src/configurationListWidget.cpp index 1125424..b25cb50 100644 --- a/src/launcher/src/configurationListWidget.cpp +++ b/src/launcher/src/configurationListWidget.cpp @@ -39,10 +39,10 @@ #include #include -#include "ui_configuration_list_widget.h" - #include +#include "ui_configuration_list_widget.h" + constexpr char CONF_FILE_NAME[] = "Kyty.ini"; constexpr char CONF_ORG_NAME[] = "Kyty"; constexpr char CONF_APP_NAME[] = "Kyty"; diff --git a/src/libs/agc.cpp b/src/libs/agc.cpp index e37ae37..c52dd20 100644 --- a/src/libs/agc.cpp +++ b/src/libs/agc.cpp @@ -6,10 +6,10 @@ #include "common/logging/log.h" #include "common/stringUtils.h" #include "common/virtualMemory.h" +#include "graphics/guest_gpu/gpu_defs.h" #include "graphics/guest_gpu/graphicsRun.h" #include "graphics/guest_gpu/hardwareContext.h" #include "graphics/guest_gpu/pm4.h" -#include "graphics/guest_gpu/gpu_defs.h" #include "graphics/guest_gpu/tile.h" #include "graphics/host_gpu/objects/label.h" #include "graphics/host_gpu/renderer/render.h" @@ -575,8 +575,12 @@ static bool get_shader_program_address_register(uint8_t type, uint32_t* lo_offse case Prospero::ShaderBinaryType::kPs: *lo_offset = Pm4::SPI_SHADER_PGM_LO_PS; return true; case Prospero::ShaderBinaryType::kGs: *lo_offset = Pm4::SPI_SHADER_PGM_LO_ES; return true; case Prospero::ShaderBinaryType::kHs: *lo_offset = Pm4::SPI_SHADER_PGM_LO_LS; return true; - case Prospero::ShaderBinaryType::kGsBack: *lo_offset = Pm4::SPI_SHADER_PGM_LO_GS; return true; - case Prospero::ShaderBinaryType::kHsBack: *lo_offset = Pm4::SPI_SHADER_PGM_LO_HS; return true; + case Prospero::ShaderBinaryType::kGsBack: + *lo_offset = Pm4::SPI_SHADER_PGM_LO_GS; + return true; + case Prospero::ShaderBinaryType::kHsBack: + *lo_offset = Pm4::SPI_SHADER_PGM_LO_HS; + return true; case Prospero::ShaderBinaryType::kGsFront: case Prospero::ShaderBinaryType::kHsFront: case Prospero::ShaderBinaryType::kFs: return false; @@ -1016,12 +1020,14 @@ int KYTY_SYSV_ABI GraphicsSetUcRegIndirectPatchAddRegisters(uint32_t* cmd, uint3 static uint32_t GraphicsPrimitiveTypeToGsOut(uint32_t prim_type) { switch (static_cast(prim_type)) { - case Prospero::PrimitiveType::kPointList: return Prospero::GpuEnumValue(Prospero::GsOutputPrimitiveType::kPoints); + case Prospero::PrimitiveType::kPointList: + return Prospero::GpuEnumValue(Prospero::GsOutputPrimitiveType::kPoints); case Prospero::PrimitiveType::kLineList: case Prospero::PrimitiveType::kLineStrip: case Prospero::PrimitiveType::kLineListAdjacency: case Prospero::PrimitiveType::kLineStripAdjacency: - case Prospero::PrimitiveType::kLineLoop: return Prospero::GpuEnumValue(Prospero::GsOutputPrimitiveType::kLines); + case Prospero::PrimitiveType::kLineLoop: + return Prospero::GpuEnumValue(Prospero::GsOutputPrimitiveType::kLines); case Prospero::PrimitiveType::kRectList: return Prospero::GpuEnumValue(Prospero::GsOutputPrimitiveType::k2dRectangle); case Prospero::PrimitiveType::kRectListLegacy: @@ -1048,9 +1054,10 @@ int KYTY_SYSV_ABI GraphicsCreatePrimState(ShaderRegister* cx_regs, ShaderRegiste EXIT_NOT_IMPLEMENTED(gs == nullptr); - EXIT_NOT_IMPLEMENTED(hs != nullptr && - static_cast(hs->type) != Prospero::ShaderBinaryType::kHs); - EXIT_NOT_IMPLEMENTED(static_cast(gs->type) != Prospero::ShaderBinaryType::kGs); + EXIT_NOT_IMPLEMENTED(hs != nullptr && static_cast(hs->type) != + Prospero::ShaderBinaryType::kHs); + EXIT_NOT_IMPLEMENTED(static_cast(gs->type) != + Prospero::ShaderBinaryType::kGs); if (cx_regs != nullptr) { EXIT_NOT_IMPLEMENTED(hs != nullptr && hs->specials->vgt_shader_stages_en.offset != diff --git a/src/libs/agcRegisterDefaults.inc b/src/libs/agcRegisterDefaults.inc index 709f73a..1d9236d 100644 --- a/src/libs/agcRegisterDefaults.inc +++ b/src/libs/agcRegisterDefaults.inc @@ -21,37 +21,52 @@ static const uint16_t g_agc_internal_reg_defaults_v0_tbl1_ptrs[] = { }; static ShaderRegister g_agc_internal_reg_defaults_v0_tbl3_regs[] = { - {0x026c, 0x00000000}, {0x026e, 0x00000000}, {0x0278, 0x00000000}, {0x0262, 0x00000000}, + {0x026c, 0x00000000}, + {0x026e, 0x00000000}, + {0x0278, 0x00000000}, + {0x0262, 0x00000000}, }; static const uint16_t g_agc_internal_reg_defaults_v0_tbl3_ptrs[] = { - 0x0000, 0x0001, + 0x0000, + 0x0001, }; static uint32_t g_agc_internal_reg_defaults_v0_types[] = { - 0xf58fea31, 0x00040400, 0x00000000, 0x6ac156ef, 0x00040401, 0x00000000, - 0x6ac15610, 0x00040405, 0x00000000, 0x6ac15009, 0x00040409, 0x00000000, - 0x6ac153ba, 0x0004040d, 0x00000000, 0xbe7dcd73, 0x00040411, 0x00000000, - 0x0c4b1438, 0x00040415, 0x00000000, 0xdb00d71a, 0x00040419, 0x00000000, - 0xdb00d249, 0x0004041d, 0x00000000, 0xdb00ec60, 0x00040421, 0x00000000, - 0x0c4d6fe4, 0x00040425, 0x00000000, 0x0c4a80ef, 0x00040429, 0x00000000, - 0x0dd283e7, 0x0004042d, 0x00000000, 0x31f34b9f, 0x00040403, 0x00000000, - 0x929fd95d, 0x00040c07, 0x00000000, + 0xf58fea31, 0x00040400, 0x00000000, 0x6ac156ef, 0x00040401, 0x00000000, 0x6ac15610, 0x00040405, + 0x00000000, 0x6ac15009, 0x00040409, 0x00000000, 0x6ac153ba, 0x0004040d, 0x00000000, 0xbe7dcd73, + 0x00040411, 0x00000000, 0x0c4b1438, 0x00040415, 0x00000000, 0xdb00d71a, 0x00040419, 0x00000000, + 0xdb00d249, 0x0004041d, 0x00000000, 0xdb00ec60, 0x00040421, 0x00000000, 0x0c4d6fe4, 0x00040425, + 0x00000000, 0x0c4a80ef, 0x00040429, 0x00000000, 0x0dd283e7, 0x0004042d, 0x00000000, 0x31f34b9f, + 0x00040403, 0x00000000, 0x929fd95d, 0x00040c07, 0x00000000, }; static CompactRegisterDefaults g_agc_internal_reg_defaults_v0 = { - g_agc_internal_reg_defaults_v0_tbl0_regs, 1, g_agc_internal_reg_defaults_v0_tbl0_ptrs, 1, - g_agc_internal_reg_defaults_v0_tbl1_regs, 12, g_agc_internal_reg_defaults_v0_tbl1_ptrs, 12, - nullptr, 0, nullptr, 0, - g_agc_internal_reg_defaults_v0_tbl3_regs, 4, g_agc_internal_reg_defaults_v0_tbl3_ptrs, 2, - g_agc_internal_reg_defaults_v0_types, 15, + g_agc_internal_reg_defaults_v0_tbl0_regs, + 1, + g_agc_internal_reg_defaults_v0_tbl0_ptrs, + 1, + g_agc_internal_reg_defaults_v0_tbl1_regs, + 12, + g_agc_internal_reg_defaults_v0_tbl1_ptrs, + 12, + nullptr, + 0, + nullptr, + 0, + g_agc_internal_reg_defaults_v0_tbl3_regs, + 4, + g_agc_internal_reg_defaults_v0_tbl3_ptrs, + 2, + g_agc_internal_reg_defaults_v0_types, + 15, }; // g_agc_internal_reg_defaults_v10: regs=(9, 15, 1, 6), ptrs=(9, 15, 1, 3), types=28. static ShaderRegister g_agc_internal_reg_defaults_v10_tbl0_regs[] = { - {0x000e, 0x00000002}, {0x02af, 0x00040000}, {0x02d3, 0x00000000}, {0x0207, 0x00000000}, - {0x0314, 0x00000202}, {0x01b5, 0x00000001}, {0x01b1, 0x00000000}, {0x02e4, 0x00000000}, - {0x0291, 0x00000000}, + {0x000e, 0x00000002}, {0x02af, 0x00040000}, {0x02d3, 0x00000000}, + {0x0207, 0x00000000}, {0x0314, 0x00000202}, {0x01b5, 0x00000001}, + {0x01b1, 0x00000000}, {0x02e4, 0x00000000}, {0x0291, 0x00000000}, }; static const uint16_t g_agc_internal_reg_defaults_v10_tbl0_ptrs[] = { @@ -66,8 +81,8 @@ static ShaderRegister g_agc_internal_reg_defaults_v10_tbl1_regs[] = { }; static const uint16_t g_agc_internal_reg_defaults_v10_tbl1_ptrs[] = { - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000a, 0x000b, - 0x000c, 0x000d, 0x000e, + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, + 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, }; static ShaderRegister g_agc_internal_reg_defaults_v10_tbl2_regs[] = { @@ -79,37 +94,36 @@ static const uint16_t g_agc_internal_reg_defaults_v10_tbl2_ptrs[] = { }; static ShaderRegister g_agc_internal_reg_defaults_v10_tbl3_regs[] = { - {0x026c, 0x00000000}, {0x0094, 0x00000000}, {0x0095, 0x00000000}, {0x026e, 0x00000000}, - {0x0278, 0x00000000}, {0x0262, 0x00000000}, + {0x026c, 0x00000000}, {0x0094, 0x00000000}, {0x0095, 0x00000000}, + {0x026e, 0x00000000}, {0x0278, 0x00000000}, {0x0262, 0x00000000}, }; static const uint16_t g_agc_internal_reg_defaults_v10_tbl3_ptrs[] = { - 0x0000, 0x0001, 0x0003, + 0x0000, + 0x0001, + 0x0003, }; static uint32_t g_agc_internal_reg_defaults_v10_types[] = { - 0x8fb4edb5, 0x00040400, 0x00000000, 0xb994ad29, 0x00040404, 0x00000000, - 0x700e23c3, 0x00040408, 0x00000000, 0x51a1d306, 0x0004040c, 0x00000000, - 0xd427322f, 0x00040410, 0x00000000, 0xf58fea31, 0x00040414, 0x00000000, - 0xa7fbef3f, 0x00040418, 0x00000000, 0xe7d3ab13, 0x0004041c, 0x00000000, - 0x1b1658df, 0x00040420, 0x00000000, 0x6ac156ef, 0x00040401, 0x00000000, - 0x6ac15610, 0x00040405, 0x00000000, 0x6ac15009, 0x00040409, 0x00000000, - 0x6ac153ba, 0x0004040d, 0x00000000, 0xbe7dcd73, 0x00040411, 0x00000000, - 0x0c4b1438, 0x00040415, 0x00000000, 0xdb00d71a, 0x00040419, 0x00000000, - 0xdb00d249, 0x0004041d, 0x00000000, 0xdb00ec60, 0x00040421, 0x00000000, - 0x0c4d6fe4, 0x00040425, 0x00000000, 0x0c4a80ef, 0x00040429, 0x00000000, - 0x0dd283e7, 0x0004042d, 0x00000000, 0xe27f8fe6, 0x00040431, 0x00000000, - 0xc67efacf, 0x00040435, 0x00000000, 0xd9e6d9f7, 0x00040439, 0x00000000, - 0x60289246, 0x00040402, 0x00000000, 0x31f34b9f, 0x00040403, 0x00000000, - 0xac0f9e76, 0x00080407, 0x00000000, 0x929fd95d, 0x00040c0b, 0x00000000, + 0x8fb4edb5, 0x00040400, 0x00000000, 0xb994ad29, 0x00040404, 0x00000000, 0x700e23c3, 0x00040408, + 0x00000000, 0x51a1d306, 0x0004040c, 0x00000000, 0xd427322f, 0x00040410, 0x00000000, 0xf58fea31, + 0x00040414, 0x00000000, 0xa7fbef3f, 0x00040418, 0x00000000, 0xe7d3ab13, 0x0004041c, 0x00000000, + 0x1b1658df, 0x00040420, 0x00000000, 0x6ac156ef, 0x00040401, 0x00000000, 0x6ac15610, 0x00040405, + 0x00000000, 0x6ac15009, 0x00040409, 0x00000000, 0x6ac153ba, 0x0004040d, 0x00000000, 0xbe7dcd73, + 0x00040411, 0x00000000, 0x0c4b1438, 0x00040415, 0x00000000, 0xdb00d71a, 0x00040419, 0x00000000, + 0xdb00d249, 0x0004041d, 0x00000000, 0xdb00ec60, 0x00040421, 0x00000000, 0x0c4d6fe4, 0x00040425, + 0x00000000, 0x0c4a80ef, 0x00040429, 0x00000000, 0x0dd283e7, 0x0004042d, 0x00000000, 0xe27f8fe6, + 0x00040431, 0x00000000, 0xc67efacf, 0x00040435, 0x00000000, 0xd9e6d9f7, 0x00040439, 0x00000000, + 0x60289246, 0x00040402, 0x00000000, 0x31f34b9f, 0x00040403, 0x00000000, 0xac0f9e76, 0x00080407, + 0x00000000, 0x929fd95d, 0x00040c0b, 0x00000000, }; static CompactRegisterDefaults g_agc_internal_reg_defaults_v10 = { - g_agc_internal_reg_defaults_v10_tbl0_regs, 9, g_agc_internal_reg_defaults_v10_tbl0_ptrs, 9, + g_agc_internal_reg_defaults_v10_tbl0_regs, 9, g_agc_internal_reg_defaults_v10_tbl0_ptrs, 9, g_agc_internal_reg_defaults_v10_tbl1_regs, 15, g_agc_internal_reg_defaults_v10_tbl1_ptrs, 15, - g_agc_internal_reg_defaults_v10_tbl2_regs, 1, g_agc_internal_reg_defaults_v10_tbl2_ptrs, 1, - g_agc_internal_reg_defaults_v10_tbl3_regs, 6, g_agc_internal_reg_defaults_v10_tbl3_ptrs, 3, - g_agc_internal_reg_defaults_v10_types, 28, + g_agc_internal_reg_defaults_v10_tbl2_regs, 1, g_agc_internal_reg_defaults_v10_tbl2_ptrs, 1, + g_agc_internal_reg_defaults_v10_tbl3_regs, 6, g_agc_internal_reg_defaults_v10_tbl3_ptrs, 3, + g_agc_internal_reg_defaults_v10_types, 28, }; // g_agc_internal_reg_defaults_v11: regs=(8, 12, 1, 6), ptrs=(8, 12, 1, 3), types=24. @@ -141,44 +155,45 @@ static const uint16_t g_agc_internal_reg_defaults_v11_tbl2_ptrs[] = { }; static ShaderRegister g_agc_internal_reg_defaults_v11_tbl3_regs[] = { - {0x026c, 0x00000000}, {0x0094, 0x00000000}, {0x0095, 0x00000000}, {0x026e, 0x00000000}, - {0x0278, 0x00000000}, {0x0262, 0x00000000}, + {0x026c, 0x00000000}, {0x0094, 0x00000000}, {0x0095, 0x00000000}, + {0x026e, 0x00000000}, {0x0278, 0x00000000}, {0x0262, 0x00000000}, }; static const uint16_t g_agc_internal_reg_defaults_v11_tbl3_ptrs[] = { - 0x0000, 0x0001, 0x0003, + 0x0000, + 0x0001, + 0x0003, }; static uint32_t g_agc_internal_reg_defaults_v11_types[] = { - 0x8fb4edb5, 0x00040400, 0x00000000, 0x700e23c3, 0x00040404, 0x00000000, - 0x51a1d306, 0x00040408, 0x00000000, 0xd427322f, 0x0004040c, 0x00000000, - 0xf58fea31, 0x00040410, 0x00000000, 0xa7fbef3f, 0x00040414, 0x00000000, - 0xe7d3ab13, 0x00040418, 0x00000000, 0x1b1658df, 0x0004041c, 0x00000000, - 0x6ac156ef, 0x00040401, 0x00000000, 0x6ac15610, 0x00040405, 0x00000000, - 0x6ac15009, 0x00040409, 0x00000000, 0x6ac153ba, 0x0004040d, 0x00000000, - 0xbe7dcd73, 0x00040411, 0x00000000, 0xdb00d71a, 0x00040415, 0x00000000, - 0xdb00d249, 0x00040419, 0x00000000, 0xdb00ec60, 0x0004041d, 0x00000000, - 0x0c4a80ef, 0x00040421, 0x00000000, 0xe27f8fe6, 0x00040425, 0x00000000, - 0xc67efacf, 0x00040429, 0x00000000, 0xd9e6d9f7, 0x0004042d, 0x00000000, - 0x60289246, 0x00040402, 0x00000000, 0x31f34b9f, 0x00040403, 0x00000000, - 0xac0f9e76, 0x00080407, 0x00000000, 0x929fd95d, 0x00040c0b, 0x00000000, + 0x8fb4edb5, 0x00040400, 0x00000000, 0x700e23c3, 0x00040404, 0x00000000, 0x51a1d306, 0x00040408, + 0x00000000, 0xd427322f, 0x0004040c, 0x00000000, 0xf58fea31, 0x00040410, 0x00000000, 0xa7fbef3f, + 0x00040414, 0x00000000, 0xe7d3ab13, 0x00040418, 0x00000000, 0x1b1658df, 0x0004041c, 0x00000000, + 0x6ac156ef, 0x00040401, 0x00000000, 0x6ac15610, 0x00040405, 0x00000000, 0x6ac15009, 0x00040409, + 0x00000000, 0x6ac153ba, 0x0004040d, 0x00000000, 0xbe7dcd73, 0x00040411, 0x00000000, 0xdb00d71a, + 0x00040415, 0x00000000, 0xdb00d249, 0x00040419, 0x00000000, 0xdb00ec60, 0x0004041d, 0x00000000, + 0x0c4a80ef, 0x00040421, 0x00000000, 0xe27f8fe6, 0x00040425, 0x00000000, 0xc67efacf, 0x00040429, + 0x00000000, 0xd9e6d9f7, 0x0004042d, 0x00000000, 0x60289246, 0x00040402, 0x00000000, 0x31f34b9f, + 0x00040403, 0x00000000, 0xac0f9e76, 0x00080407, 0x00000000, 0x929fd95d, 0x00040c0b, 0x00000000, }; static CompactRegisterDefaults g_agc_internal_reg_defaults_v11 = { - g_agc_internal_reg_defaults_v11_tbl0_regs, 8, g_agc_internal_reg_defaults_v11_tbl0_ptrs, 8, + g_agc_internal_reg_defaults_v11_tbl0_regs, 8, g_agc_internal_reg_defaults_v11_tbl0_ptrs, 8, g_agc_internal_reg_defaults_v11_tbl1_regs, 12, g_agc_internal_reg_defaults_v11_tbl1_ptrs, 12, - g_agc_internal_reg_defaults_v11_tbl2_regs, 1, g_agc_internal_reg_defaults_v11_tbl2_ptrs, 1, - g_agc_internal_reg_defaults_v11_tbl3_regs, 6, g_agc_internal_reg_defaults_v11_tbl3_ptrs, 3, - g_agc_internal_reg_defaults_v11_types, 24, + g_agc_internal_reg_defaults_v11_tbl2_regs, 1, g_agc_internal_reg_defaults_v11_tbl2_ptrs, 1, + g_agc_internal_reg_defaults_v11_tbl3_regs, 6, g_agc_internal_reg_defaults_v11_tbl3_ptrs, 3, + g_agc_internal_reg_defaults_v11_types, 24, }; // g_agc_internal_reg_defaults_v4: regs=(2, 15, 0, 4), ptrs=(2, 15, 0, 2), types=19. static ShaderRegister g_agc_internal_reg_defaults_v4_tbl0_regs[] = { - {0x02af, 0x00040000}, {0x01b5, 0x00000001}, + {0x02af, 0x00040000}, + {0x01b5, 0x00000001}, }; static const uint16_t g_agc_internal_reg_defaults_v4_tbl0_ptrs[] = { - 0x0000, 0x0001, + 0x0000, + 0x0001, }; static ShaderRegister g_agc_internal_reg_defaults_v4_tbl1_regs[] = { @@ -189,46 +204,65 @@ static ShaderRegister g_agc_internal_reg_defaults_v4_tbl1_regs[] = { }; static const uint16_t g_agc_internal_reg_defaults_v4_tbl1_ptrs[] = { - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000a, 0x000b, - 0x000c, 0x000d, 0x000e, + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, + 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, }; static ShaderRegister g_agc_internal_reg_defaults_v4_tbl3_regs[] = { - {0x026c, 0x00000000}, {0x026e, 0x00000000}, {0x0278, 0x00000000}, {0x0262, 0x00000000}, + {0x026c, 0x00000000}, + {0x026e, 0x00000000}, + {0x0278, 0x00000000}, + {0x0262, 0x00000000}, }; static const uint16_t g_agc_internal_reg_defaults_v4_tbl3_ptrs[] = { - 0x0000, 0x0001, + 0x0000, + 0x0001, }; static uint32_t g_agc_internal_reg_defaults_v4_types[] = { - 0xb994ad29, 0x00040400, 0x00000000, 0xf58fea31, 0x00040404, 0x00000000, - 0x6ac156ef, 0x00040401, 0x00000000, 0x6ac15610, 0x00040405, 0x00000000, - 0x6ac15009, 0x00040409, 0x00000000, 0x6ac153ba, 0x0004040d, 0x00000000, - 0xbe7dcd73, 0x00040411, 0x00000000, 0x0c4b1438, 0x00040415, 0x00000000, - 0xdb00d71a, 0x00040419, 0x00000000, 0xdb00d249, 0x0004041d, 0x00000000, - 0xdb00ec60, 0x00040421, 0x00000000, 0x0c4d6fe4, 0x00040425, 0x00000000, - 0x0c4a80ef, 0x00040429, 0x00000000, 0x0dd283e7, 0x0004042d, 0x00000000, - 0xc620e68c, 0x00040431, 0x00000000, 0xc67efacf, 0x00040435, 0x00000000, - 0xd9e6d9f7, 0x00040439, 0x00000000, 0x31f34b9f, 0x00040403, 0x00000000, - 0x929fd95d, 0x00040c07, 0x00000000, + 0xb994ad29, 0x00040400, 0x00000000, 0xf58fea31, 0x00040404, 0x00000000, 0x6ac156ef, 0x00040401, + 0x00000000, 0x6ac15610, 0x00040405, 0x00000000, 0x6ac15009, 0x00040409, 0x00000000, 0x6ac153ba, + 0x0004040d, 0x00000000, 0xbe7dcd73, 0x00040411, 0x00000000, 0x0c4b1438, 0x00040415, 0x00000000, + 0xdb00d71a, 0x00040419, 0x00000000, 0xdb00d249, 0x0004041d, 0x00000000, 0xdb00ec60, 0x00040421, + 0x00000000, 0x0c4d6fe4, 0x00040425, 0x00000000, 0x0c4a80ef, 0x00040429, 0x00000000, 0x0dd283e7, + 0x0004042d, 0x00000000, 0xc620e68c, 0x00040431, 0x00000000, 0xc67efacf, 0x00040435, 0x00000000, + 0xd9e6d9f7, 0x00040439, 0x00000000, 0x31f34b9f, 0x00040403, 0x00000000, 0x929fd95d, 0x00040c07, + 0x00000000, }; static CompactRegisterDefaults g_agc_internal_reg_defaults_v4 = { - g_agc_internal_reg_defaults_v4_tbl0_regs, 2, g_agc_internal_reg_defaults_v4_tbl0_ptrs, 2, - g_agc_internal_reg_defaults_v4_tbl1_regs, 15, g_agc_internal_reg_defaults_v4_tbl1_ptrs, 15, - nullptr, 0, nullptr, 0, - g_agc_internal_reg_defaults_v4_tbl3_regs, 4, g_agc_internal_reg_defaults_v4_tbl3_ptrs, 2, - g_agc_internal_reg_defaults_v4_types, 19, + g_agc_internal_reg_defaults_v4_tbl0_regs, + 2, + g_agc_internal_reg_defaults_v4_tbl0_ptrs, + 2, + g_agc_internal_reg_defaults_v4_tbl1_regs, + 15, + g_agc_internal_reg_defaults_v4_tbl1_ptrs, + 15, + nullptr, + 0, + nullptr, + 0, + g_agc_internal_reg_defaults_v4_tbl3_regs, + 4, + g_agc_internal_reg_defaults_v4_tbl3_ptrs, + 2, + g_agc_internal_reg_defaults_v4_types, + 19, }; // g_agc_internal_reg_defaults_v5: regs=(3, 15, 0, 6), ptrs=(3, 15, 0, 3), types=21. static ShaderRegister g_agc_internal_reg_defaults_v5_tbl0_regs[] = { - {0x000e, 0x00000002}, {0x02af, 0x00040000}, {0x01b5, 0x00000001}, + {0x000e, 0x00000002}, + {0x02af, 0x00040000}, + {0x01b5, 0x00000001}, }; static const uint16_t g_agc_internal_reg_defaults_v5_tbl0_ptrs[] = { - 0x0000, 0x0001, 0x0002, + 0x0000, + 0x0001, + 0x0002, }; static ShaderRegister g_agc_internal_reg_defaults_v5_tbl1_regs[] = { @@ -239,48 +273,66 @@ static ShaderRegister g_agc_internal_reg_defaults_v5_tbl1_regs[] = { }; static const uint16_t g_agc_internal_reg_defaults_v5_tbl1_ptrs[] = { - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000a, 0x000b, - 0x000c, 0x000d, 0x000e, + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, + 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, }; static ShaderRegister g_agc_internal_reg_defaults_v5_tbl3_regs[] = { - {0x026c, 0x00000000}, {0x0094, 0x00000000}, {0x0095, 0x00000000}, {0x026e, 0x00000000}, - {0x0278, 0x00000000}, {0x0262, 0x00000000}, + {0x026c, 0x00000000}, {0x0094, 0x00000000}, {0x0095, 0x00000000}, + {0x026e, 0x00000000}, {0x0278, 0x00000000}, {0x0262, 0x00000000}, }; static const uint16_t g_agc_internal_reg_defaults_v5_tbl3_ptrs[] = { - 0x0000, 0x0001, 0x0003, + 0x0000, + 0x0001, + 0x0003, }; static uint32_t g_agc_internal_reg_defaults_v5_types[] = { - 0x8fb4edb5, 0x00040400, 0x00000000, 0xb994ad29, 0x00040404, 0x00000000, - 0xf58fea31, 0x00040408, 0x00000000, 0x6ac156ef, 0x00040401, 0x00000000, - 0x6ac15610, 0x00040405, 0x00000000, 0x6ac15009, 0x00040409, 0x00000000, - 0x6ac153ba, 0x0004040d, 0x00000000, 0xbe7dcd73, 0x00040411, 0x00000000, - 0x0c4b1438, 0x00040415, 0x00000000, 0xdb00d71a, 0x00040419, 0x00000000, - 0xdb00d249, 0x0004041d, 0x00000000, 0xdb00ec60, 0x00040421, 0x00000000, - 0x0c4d6fe4, 0x00040425, 0x00000000, 0x0c4a80ef, 0x00040429, 0x00000000, - 0x0dd283e7, 0x0004042d, 0x00000000, 0xc620e68c, 0x00040431, 0x00000000, - 0xc67efacf, 0x00040435, 0x00000000, 0xd9e6d9f7, 0x00040439, 0x00000000, - 0x31f34b9f, 0x00040403, 0x00000000, 0xac0f9e76, 0x00080407, 0x00000000, - 0x929fd95d, 0x00040c0b, 0x00000000, + 0x8fb4edb5, 0x00040400, 0x00000000, 0xb994ad29, 0x00040404, 0x00000000, 0xf58fea31, 0x00040408, + 0x00000000, 0x6ac156ef, 0x00040401, 0x00000000, 0x6ac15610, 0x00040405, 0x00000000, 0x6ac15009, + 0x00040409, 0x00000000, 0x6ac153ba, 0x0004040d, 0x00000000, 0xbe7dcd73, 0x00040411, 0x00000000, + 0x0c4b1438, 0x00040415, 0x00000000, 0xdb00d71a, 0x00040419, 0x00000000, 0xdb00d249, 0x0004041d, + 0x00000000, 0xdb00ec60, 0x00040421, 0x00000000, 0x0c4d6fe4, 0x00040425, 0x00000000, 0x0c4a80ef, + 0x00040429, 0x00000000, 0x0dd283e7, 0x0004042d, 0x00000000, 0xc620e68c, 0x00040431, 0x00000000, + 0xc67efacf, 0x00040435, 0x00000000, 0xd9e6d9f7, 0x00040439, 0x00000000, 0x31f34b9f, 0x00040403, + 0x00000000, 0xac0f9e76, 0x00080407, 0x00000000, 0x929fd95d, 0x00040c0b, 0x00000000, }; static CompactRegisterDefaults g_agc_internal_reg_defaults_v5 = { - g_agc_internal_reg_defaults_v5_tbl0_regs, 3, g_agc_internal_reg_defaults_v5_tbl0_ptrs, 3, - g_agc_internal_reg_defaults_v5_tbl1_regs, 15, g_agc_internal_reg_defaults_v5_tbl1_ptrs, 15, - nullptr, 0, nullptr, 0, - g_agc_internal_reg_defaults_v5_tbl3_regs, 6, g_agc_internal_reg_defaults_v5_tbl3_ptrs, 3, - g_agc_internal_reg_defaults_v5_types, 21, + g_agc_internal_reg_defaults_v5_tbl0_regs, + 3, + g_agc_internal_reg_defaults_v5_tbl0_ptrs, + 3, + g_agc_internal_reg_defaults_v5_tbl1_regs, + 15, + g_agc_internal_reg_defaults_v5_tbl1_ptrs, + 15, + nullptr, + 0, + nullptr, + 0, + g_agc_internal_reg_defaults_v5_tbl3_regs, + 6, + g_agc_internal_reg_defaults_v5_tbl3_ptrs, + 3, + g_agc_internal_reg_defaults_v5_types, + 21, }; // g_agc_internal_reg_defaults_v7: regs=(4, 15, 0, 6), ptrs=(4, 15, 0, 3), types=22. static ShaderRegister g_agc_internal_reg_defaults_v7_tbl0_regs[] = { - {0x000e, 0x00000002}, {0x02af, 0x00040000}, {0x0314, 0x00000202}, {0x01b5, 0x00000001}, + {0x000e, 0x00000002}, + {0x02af, 0x00040000}, + {0x0314, 0x00000202}, + {0x01b5, 0x00000001}, }; static const uint16_t g_agc_internal_reg_defaults_v7_tbl0_ptrs[] = { - 0x0000, 0x0001, 0x0002, 0x0003, + 0x0000, + 0x0001, + 0x0002, + 0x0003, }; static ShaderRegister g_agc_internal_reg_defaults_v7_tbl1_regs[] = { @@ -291,48 +343,67 @@ static ShaderRegister g_agc_internal_reg_defaults_v7_tbl1_regs[] = { }; static const uint16_t g_agc_internal_reg_defaults_v7_tbl1_ptrs[] = { - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000a, 0x000b, - 0x000c, 0x000d, 0x000e, + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, + 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, }; static ShaderRegister g_agc_internal_reg_defaults_v7_tbl3_regs[] = { - {0x026c, 0x00000000}, {0x0094, 0x00000000}, {0x0095, 0x00000000}, {0x026e, 0x00000000}, - {0x0278, 0x00000000}, {0x0262, 0x00000000}, + {0x026c, 0x00000000}, {0x0094, 0x00000000}, {0x0095, 0x00000000}, + {0x026e, 0x00000000}, {0x0278, 0x00000000}, {0x0262, 0x00000000}, }; static const uint16_t g_agc_internal_reg_defaults_v7_tbl3_ptrs[] = { - 0x0000, 0x0001, 0x0003, + 0x0000, + 0x0001, + 0x0003, }; static uint32_t g_agc_internal_reg_defaults_v7_types[] = { - 0x8fb4edb5, 0x00040400, 0x00000000, 0xb994ad29, 0x00040404, 0x00000000, - 0xd427322f, 0x00040408, 0x00000000, 0xf58fea31, 0x0004040c, 0x00000000, - 0x6ac156ef, 0x00040401, 0x00000000, 0x6ac15610, 0x00040405, 0x00000000, - 0x6ac15009, 0x00040409, 0x00000000, 0x6ac153ba, 0x0004040d, 0x00000000, - 0xbe7dcd73, 0x00040411, 0x00000000, 0x0c4b1438, 0x00040415, 0x00000000, - 0xdb00d71a, 0x00040419, 0x00000000, 0xdb00d249, 0x0004041d, 0x00000000, - 0xdb00ec60, 0x00040421, 0x00000000, 0x0c4d6fe4, 0x00040425, 0x00000000, - 0x0c4a80ef, 0x00040429, 0x00000000, 0x0dd283e7, 0x0004042d, 0x00000000, - 0xc620e68c, 0x00040431, 0x00000000, 0xc67efacf, 0x00040435, 0x00000000, - 0xd9e6d9f7, 0x00040439, 0x00000000, 0x31f34b9f, 0x00040403, 0x00000000, - 0xac0f9e76, 0x00080407, 0x00000000, 0x929fd95d, 0x00040c0b, 0x00000000, + 0x8fb4edb5, 0x00040400, 0x00000000, 0xb994ad29, 0x00040404, 0x00000000, 0xd427322f, 0x00040408, + 0x00000000, 0xf58fea31, 0x0004040c, 0x00000000, 0x6ac156ef, 0x00040401, 0x00000000, 0x6ac15610, + 0x00040405, 0x00000000, 0x6ac15009, 0x00040409, 0x00000000, 0x6ac153ba, 0x0004040d, 0x00000000, + 0xbe7dcd73, 0x00040411, 0x00000000, 0x0c4b1438, 0x00040415, 0x00000000, 0xdb00d71a, 0x00040419, + 0x00000000, 0xdb00d249, 0x0004041d, 0x00000000, 0xdb00ec60, 0x00040421, 0x00000000, 0x0c4d6fe4, + 0x00040425, 0x00000000, 0x0c4a80ef, 0x00040429, 0x00000000, 0x0dd283e7, 0x0004042d, 0x00000000, + 0xc620e68c, 0x00040431, 0x00000000, 0xc67efacf, 0x00040435, 0x00000000, 0xd9e6d9f7, 0x00040439, + 0x00000000, 0x31f34b9f, 0x00040403, 0x00000000, 0xac0f9e76, 0x00080407, 0x00000000, 0x929fd95d, + 0x00040c0b, 0x00000000, }; static CompactRegisterDefaults g_agc_internal_reg_defaults_v7 = { - g_agc_internal_reg_defaults_v7_tbl0_regs, 4, g_agc_internal_reg_defaults_v7_tbl0_ptrs, 4, - g_agc_internal_reg_defaults_v7_tbl1_regs, 15, g_agc_internal_reg_defaults_v7_tbl1_ptrs, 15, - nullptr, 0, nullptr, 0, - g_agc_internal_reg_defaults_v7_tbl3_regs, 6, g_agc_internal_reg_defaults_v7_tbl3_ptrs, 3, - g_agc_internal_reg_defaults_v7_types, 22, + g_agc_internal_reg_defaults_v7_tbl0_regs, + 4, + g_agc_internal_reg_defaults_v7_tbl0_ptrs, + 4, + g_agc_internal_reg_defaults_v7_tbl1_regs, + 15, + g_agc_internal_reg_defaults_v7_tbl1_ptrs, + 15, + nullptr, + 0, + nullptr, + 0, + g_agc_internal_reg_defaults_v7_tbl3_regs, + 6, + g_agc_internal_reg_defaults_v7_tbl3_ptrs, + 3, + g_agc_internal_reg_defaults_v7_types, + 22, }; // g_agc_internal_reg_defaults_v8: regs=(4, 15, 0, 6), ptrs=(4, 15, 0, 3), types=22. static ShaderRegister g_agc_internal_reg_defaults_v8_tbl0_regs[] = { - {0x000e, 0x00000002}, {0x02af, 0x00040000}, {0x0314, 0x00000202}, {0x01b5, 0x00000001}, + {0x000e, 0x00000002}, + {0x02af, 0x00040000}, + {0x0314, 0x00000202}, + {0x01b5, 0x00000001}, }; static const uint16_t g_agc_internal_reg_defaults_v8_tbl0_ptrs[] = { - 0x0000, 0x0001, 0x0002, 0x0003, + 0x0000, + 0x0001, + 0x0002, + 0x0003, }; static ShaderRegister g_agc_internal_reg_defaults_v8_tbl1_regs[] = { @@ -343,48 +414,67 @@ static ShaderRegister g_agc_internal_reg_defaults_v8_tbl1_regs[] = { }; static const uint16_t g_agc_internal_reg_defaults_v8_tbl1_ptrs[] = { - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000a, 0x000b, - 0x000c, 0x000d, 0x000e, + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, + 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, }; static ShaderRegister g_agc_internal_reg_defaults_v8_tbl3_regs[] = { - {0x026c, 0x00000000}, {0x0094, 0x00000000}, {0x0095, 0x00000000}, {0x026e, 0x00000000}, - {0x0278, 0x00000000}, {0x0262, 0x00000000}, + {0x026c, 0x00000000}, {0x0094, 0x00000000}, {0x0095, 0x00000000}, + {0x026e, 0x00000000}, {0x0278, 0x00000000}, {0x0262, 0x00000000}, }; static const uint16_t g_agc_internal_reg_defaults_v8_tbl3_ptrs[] = { - 0x0000, 0x0001, 0x0003, + 0x0000, + 0x0001, + 0x0003, }; static uint32_t g_agc_internal_reg_defaults_v8_types[] = { - 0x8fb4edb5, 0x00040400, 0x00000000, 0xb994ad29, 0x00040404, 0x00000000, - 0xd427322f, 0x00040408, 0x00000000, 0xf58fea31, 0x0004040c, 0x00000000, - 0x6ac156ef, 0x00040401, 0x00000000, 0x6ac15610, 0x00040405, 0x00000000, - 0x6ac15009, 0x00040409, 0x00000000, 0x6ac153ba, 0x0004040d, 0x00000000, - 0xbe7dcd73, 0x00040411, 0x00000000, 0x0c4b1438, 0x00040415, 0x00000000, - 0xdb00d71a, 0x00040419, 0x00000000, 0xdb00d249, 0x0004041d, 0x00000000, - 0xdb00ec60, 0x00040421, 0x00000000, 0x0c4d6fe4, 0x00040425, 0x00000000, - 0x0c4a80ef, 0x00040429, 0x00000000, 0x0dd283e7, 0x0004042d, 0x00000000, - 0xc620e68c, 0x00040431, 0x00000000, 0xc67efacf, 0x00040435, 0x00000000, - 0xd9e6d9f7, 0x00040439, 0x00000000, 0x31f34b9f, 0x00040403, 0x00000000, - 0xac0f9e76, 0x00080407, 0x00000000, 0x929fd95d, 0x00040c0b, 0x00000000, + 0x8fb4edb5, 0x00040400, 0x00000000, 0xb994ad29, 0x00040404, 0x00000000, 0xd427322f, 0x00040408, + 0x00000000, 0xf58fea31, 0x0004040c, 0x00000000, 0x6ac156ef, 0x00040401, 0x00000000, 0x6ac15610, + 0x00040405, 0x00000000, 0x6ac15009, 0x00040409, 0x00000000, 0x6ac153ba, 0x0004040d, 0x00000000, + 0xbe7dcd73, 0x00040411, 0x00000000, 0x0c4b1438, 0x00040415, 0x00000000, 0xdb00d71a, 0x00040419, + 0x00000000, 0xdb00d249, 0x0004041d, 0x00000000, 0xdb00ec60, 0x00040421, 0x00000000, 0x0c4d6fe4, + 0x00040425, 0x00000000, 0x0c4a80ef, 0x00040429, 0x00000000, 0x0dd283e7, 0x0004042d, 0x00000000, + 0xc620e68c, 0x00040431, 0x00000000, 0xc67efacf, 0x00040435, 0x00000000, 0xd9e6d9f7, 0x00040439, + 0x00000000, 0x31f34b9f, 0x00040403, 0x00000000, 0xac0f9e76, 0x00080407, 0x00000000, 0x929fd95d, + 0x00040c0b, 0x00000000, }; static CompactRegisterDefaults g_agc_internal_reg_defaults_v8 = { - g_agc_internal_reg_defaults_v8_tbl0_regs, 4, g_agc_internal_reg_defaults_v8_tbl0_ptrs, 4, - g_agc_internal_reg_defaults_v8_tbl1_regs, 15, g_agc_internal_reg_defaults_v8_tbl1_ptrs, 15, - nullptr, 0, nullptr, 0, - g_agc_internal_reg_defaults_v8_tbl3_regs, 6, g_agc_internal_reg_defaults_v8_tbl3_ptrs, 3, - g_agc_internal_reg_defaults_v8_types, 22, + g_agc_internal_reg_defaults_v8_tbl0_regs, + 4, + g_agc_internal_reg_defaults_v8_tbl0_ptrs, + 4, + g_agc_internal_reg_defaults_v8_tbl1_regs, + 15, + g_agc_internal_reg_defaults_v8_tbl1_ptrs, + 15, + nullptr, + 0, + nullptr, + 0, + g_agc_internal_reg_defaults_v8_tbl3_regs, + 6, + g_agc_internal_reg_defaults_v8_tbl3_ptrs, + 3, + g_agc_internal_reg_defaults_v8_types, + 22, }; // g_agc_internal_reg_defaults_v9: regs=(4, 14, 1, 6), ptrs=(4, 14, 1, 3), types=22. static ShaderRegister g_agc_internal_reg_defaults_v9_tbl0_regs[] = { - {0x000e, 0x00000002}, {0x02af, 0x00040000}, {0x0314, 0x00000202}, {0x01b5, 0x00000001}, + {0x000e, 0x00000002}, + {0x02af, 0x00040000}, + {0x0314, 0x00000202}, + {0x01b5, 0x00000001}, }; static const uint16_t g_agc_internal_reg_defaults_v9_tbl0_ptrs[] = { - 0x0000, 0x0001, 0x0002, 0x0003, + 0x0000, + 0x0001, + 0x0002, + 0x0003, }; static ShaderRegister g_agc_internal_reg_defaults_v9_tbl1_regs[] = { @@ -395,8 +485,8 @@ static ShaderRegister g_agc_internal_reg_defaults_v9_tbl1_regs[] = { }; static const uint16_t g_agc_internal_reg_defaults_v9_tbl1_ptrs[] = { - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000a, 0x000b, - 0x000c, 0x000d, + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, + 0x0007, 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, }; static ShaderRegister g_agc_internal_reg_defaults_v9_tbl2_regs[] = { @@ -408,34 +498,34 @@ static const uint16_t g_agc_internal_reg_defaults_v9_tbl2_ptrs[] = { }; static ShaderRegister g_agc_internal_reg_defaults_v9_tbl3_regs[] = { - {0x026c, 0x00000000}, {0x0094, 0x00000000}, {0x0095, 0x00000000}, {0x026e, 0x00000000}, - {0x0278, 0x00000000}, {0x0262, 0x00000000}, + {0x026c, 0x00000000}, {0x0094, 0x00000000}, {0x0095, 0x00000000}, + {0x026e, 0x00000000}, {0x0278, 0x00000000}, {0x0262, 0x00000000}, }; static const uint16_t g_agc_internal_reg_defaults_v9_tbl3_ptrs[] = { - 0x0000, 0x0001, 0x0003, + 0x0000, + 0x0001, + 0x0003, }; static uint32_t g_agc_internal_reg_defaults_v9_types[] = { - 0x8fb4edb5, 0x00040400, 0x00000000, 0xb994ad29, 0x00040404, 0x00000000, - 0xd427322f, 0x00040408, 0x00000000, 0xf58fea31, 0x0004040c, 0x00000000, - 0x6ac156ef, 0x00040401, 0x00000000, 0x6ac15610, 0x00040405, 0x00000000, - 0x6ac15009, 0x00040409, 0x00000000, 0x6ac153ba, 0x0004040d, 0x00000000, - 0xbe7dcd73, 0x00040411, 0x00000000, 0x0c4b1438, 0x00040415, 0x00000000, - 0xdb00d71a, 0x00040419, 0x00000000, 0xdb00d249, 0x0004041d, 0x00000000, - 0xdb00ec60, 0x00040421, 0x00000000, 0x0c4d6fe4, 0x00040425, 0x00000000, - 0x0c4a80ef, 0x00040429, 0x00000000, 0x0dd283e7, 0x0004042d, 0x00000000, - 0xc67efacf, 0x00040431, 0x00000000, 0xd9e6d9f7, 0x00040435, 0x00000000, - 0x60289246, 0x00040402, 0x00000000, 0x31f34b9f, 0x00040403, 0x00000000, - 0xac0f9e76, 0x00080407, 0x00000000, 0x929fd95d, 0x00040c0b, 0x00000000, + 0x8fb4edb5, 0x00040400, 0x00000000, 0xb994ad29, 0x00040404, 0x00000000, 0xd427322f, 0x00040408, + 0x00000000, 0xf58fea31, 0x0004040c, 0x00000000, 0x6ac156ef, 0x00040401, 0x00000000, 0x6ac15610, + 0x00040405, 0x00000000, 0x6ac15009, 0x00040409, 0x00000000, 0x6ac153ba, 0x0004040d, 0x00000000, + 0xbe7dcd73, 0x00040411, 0x00000000, 0x0c4b1438, 0x00040415, 0x00000000, 0xdb00d71a, 0x00040419, + 0x00000000, 0xdb00d249, 0x0004041d, 0x00000000, 0xdb00ec60, 0x00040421, 0x00000000, 0x0c4d6fe4, + 0x00040425, 0x00000000, 0x0c4a80ef, 0x00040429, 0x00000000, 0x0dd283e7, 0x0004042d, 0x00000000, + 0xc67efacf, 0x00040431, 0x00000000, 0xd9e6d9f7, 0x00040435, 0x00000000, 0x60289246, 0x00040402, + 0x00000000, 0x31f34b9f, 0x00040403, 0x00000000, 0xac0f9e76, 0x00080407, 0x00000000, 0x929fd95d, + 0x00040c0b, 0x00000000, }; static CompactRegisterDefaults g_agc_internal_reg_defaults_v9 = { - g_agc_internal_reg_defaults_v9_tbl0_regs, 4, g_agc_internal_reg_defaults_v9_tbl0_ptrs, 4, + g_agc_internal_reg_defaults_v9_tbl0_regs, 4, g_agc_internal_reg_defaults_v9_tbl0_ptrs, 4, g_agc_internal_reg_defaults_v9_tbl1_regs, 14, g_agc_internal_reg_defaults_v9_tbl1_ptrs, 14, - g_agc_internal_reg_defaults_v9_tbl2_regs, 1, g_agc_internal_reg_defaults_v9_tbl2_ptrs, 1, - g_agc_internal_reg_defaults_v9_tbl3_regs, 6, g_agc_internal_reg_defaults_v9_tbl3_ptrs, 3, - g_agc_internal_reg_defaults_v9_types, 22, + g_agc_internal_reg_defaults_v9_tbl2_regs, 1, g_agc_internal_reg_defaults_v9_tbl2_ptrs, 1, + g_agc_internal_reg_defaults_v9_tbl3_regs, 6, g_agc_internal_reg_defaults_v9_tbl3_ptrs, 3, + g_agc_internal_reg_defaults_v9_types, 22, }; // g_agc_public_reg_defaults_v0: regs=(523, 161, 43, 0), ptrs=(80, 28, 42, 0), types=150. @@ -628,9 +718,9 @@ static ShaderRegister g_agc_public_reg_defaults_v0_tbl1_regs[] = { }; static const uint16_t g_agc_public_reg_defaults_v0_tbl1_ptrs[] = { - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000a, 0x000b, - 0x000f, 0x0015, 0x0017, 0x0019, 0x001b, 0x001d, 0x001f, 0x0021, 0x0025, 0x0029, 0x002d, 0x002f, - 0x0031, 0x0041, 0x0061, 0x0081, + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, + 0x000a, 0x000b, 0x000f, 0x0015, 0x0017, 0x0019, 0x001b, 0x001d, 0x001f, 0x0021, + 0x0025, 0x0029, 0x002d, 0x002f, 0x0031, 0x0041, 0x0061, 0x0081, }; static ShaderRegister g_agc_public_reg_defaults_v0_tbl2_regs[] = { @@ -648,96 +738,91 @@ static ShaderRegister g_agc_public_reg_defaults_v0_tbl2_regs[] = { }; static const uint16_t g_agc_public_reg_defaults_v0_tbl2_ptrs[] = { - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000a, 0x000b, - 0x000c, 0x000d, 0x000e, 0x000f, 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, 0x0020, 0x0021, 0x0022, 0x0023, - 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000a, + 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, + 0x0016, 0x0017, 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, 0x0020, + 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, }; static uint32_t g_agc_public_reg_defaults_v0_types[] = { - 0xe24f806d, 0x00040400, 0x00000000, 0xf6c28182, 0x00040404, 0x00000000, - 0x6f6e55a5, 0x00040408, 0x00000000, 0x0bc65da4, 0x0004040c, 0x00000000, - 0x9e5ad592, 0x00040410, 0x00000000, 0xbb513b98, 0x00040414, 0x00000000, - 0xab64b23b, 0x00040418, 0x00000000, 0xac198e0b, 0x0004041c, 0x00000000, - 0x53c39964, 0x00040420, 0x00000000, 0x01396b11, 0x00040424, 0x00000000, - 0x7d42019a, 0x00040428, 0x00000000, 0x3548f523, 0x0004042c, 0x00000000, - 0xf43ad28a, 0x00040430, 0x00000000, 0x6de4c312, 0x00040434, 0x00000000, - 0x00a77ae0, 0x00040438, 0x00000000, 0x00a779b7, 0x0004043c, 0x00000000, - 0x5100100c, 0x00040440, 0x00000000, 0x59958bba, 0x00040444, 0x00000000, - 0x7f7bd53e, 0x00040448, 0x00000000, 0x0c06f17c, 0x0004044c, 0x00000000, - 0x6f104b72, 0x00040450, 0x00000000, 0x25c70d9c, 0x00040454, 0x00000000, - 0x3881201e, 0x00040458, 0x00000000, 0x09afddaf, 0x0004045c, 0x00000000, - 0x367d63cf, 0x00040460, 0x00000000, 0x43707db8, 0x00040464, 0x00000000, - 0xf6ae26ba, 0x00040468, 0x00000000, 0x1b917652, 0x0004046c, 0x00000000, - 0x2cac726e, 0x00040470, 0x00000000, 0x2cac7111, 0x00040474, 0x00000000, - 0x94b1e4f7, 0x00040478, 0x00000000, 0xe3661b6c, 0x0004047c, 0x00000000, - 0x1eb8d73a, 0x00040480, 0x00000000, 0x15051fa3, 0x00040484, 0x00000000, - 0x9c51a7f1, 0x00040488, 0x00000000, 0xa20efc70, 0x0004048c, 0x00000000, - 0x0ec09f6e, 0x00040490, 0x00000000, 0x34a7d6d3, 0x00040494, 0x00000000, - 0xce831b94, 0x00040498, 0x00000000, 0x5cc72a74, 0x0004049c, 0x00000000, - 0x3b77713c, 0x000404a0, 0x00000000, 0x40f64410, 0x000404a4, 0x00000000, - 0x69441268, 0x000404a8, 0x00000000, 0x2e418b83, 0x000404ac, 0x00000000, - 0xa00d0c8d, 0x000404b0, 0x00000000, 0xb1289fb3, 0x000404b4, 0x00000000, - 0x144832fb, 0x000404b8, 0x00000000, 0x9890d9fa, 0x000404bc, 0x00000000, - 0x9016faf1, 0x000404c0, 0x00000000, 0x4b73ce27, 0x000404c4, 0x00000000, - 0x5f5a3e7b, 0x000404c8, 0x00000000, 0xd4af3a51, 0x000404cc, 0x00000000, - 0x6cf4f543, 0x000404d0, 0x00000000, 0x5fb86ccb, 0x000404d4, 0x00000000, - 0xedefa188, 0x000404d8, 0x00000000, 0xd0de9ee6, 0x000404dc, 0x00000000, - 0xc5831803, 0x000404e0, 0x00000000, 0x8e6de84b, 0x000404e4, 0x00000000, - 0xd0771662, 0x000408e8, 0x00000000, 0x569f7444, 0x004004ec, 0x00000000, - 0x5c6637cd, 0x000408f0, 0x00000000, 0xcae3e690, 0x000408f4, 0x00000000, - 0x43fbd769, 0x000410f8, 0x00000000, 0xef550356, 0x002004fc, 0x00000000, - 0x8f52e279, 0x00040900, 0x00000000, 0x1f2d8149, 0x00100904, 0x00000000, - 0x4413c6f9, 0x00040908, 0x00000000, 0x67096014, 0x0004450c, 0x00000000, - 0x88f5e915, 0x00040910, 0x00000000, 0x918106bb, 0x00040914, 0x00000000, - 0x95f0e7ac, 0x00041118, 0x00000000, 0xb48cbab2, 0x0004091c, 0x00000000, - 0x05bb3bc6, 0x00040920, 0x00000000, 0x94faba07, 0x00040924, 0x00000000, - 0x38e92c91, 0x00205128, 0x00000000, 0x0b177b43, 0x0004092c, 0x00000000, - 0x48531062, 0x00800530, 0x00000000, 0xaaa964b9, 0x00201134, 0x00000000, - 0x7690af6f, 0x00402938, 0x00000000, 0x078d7060, 0x0004093c, 0x00000000, - 0x5d6e3ec7, 0x00040401, 0x00000000, 0x57e7079a, 0x00040405, 0x00000000, - 0x7467fafd, 0x00040409, 0x00000000, 0x9e826b50, 0x0004040d, 0x00000000, - 0xdc484f18, 0x00040411, 0x00000000, 0x5da8bca3, 0x00040415, 0x00000000, - 0x5ca726d8, 0x00040419, 0x00000000, 0x5dd28360, 0x0004041d, 0x00000000, - 0x57efa0be, 0x00040421, 0x00000000, 0x502363d5, 0x00040425, 0x00000000, - 0x506d14bd, 0x00040429, 0x00000000, 0xb2609506, 0x0010042d, 0x00000000, - 0x9e5cfb8a, 0x00041831, 0x00000000, 0xc918df3e, 0x00040835, 0x00000000, - 0xc9751c9c, 0x00040839, 0x00000000, 0xc97ef77a, 0x0004083d, 0x00000000, - 0xc927c6b9, 0x00040841, 0x00000000, 0xc92a1ec5, 0x00040845, 0x00000000, - 0xc9e01b31, 0x00040849, 0x00000000, 0xb26219ca, 0x0010044d, 0x00000000, - 0xb25b6cf9, 0x00100451, 0x00000000, 0xb2f86101, 0x00100455, 0x00000000, - 0x07e3b155, 0x00040859, 0x00000000, 0x07e383c6, 0x0004085d, 0x00000000, - 0xbda98653, 0x00400461, 0x00000000, 0xbdbd1d0f, 0x00800465, 0x00000000, - 0xbd946fd4, 0x00800469, 0x00000000, 0xbdf02a4c, 0x0080046d, 0x00000000, - 0x19e93e85, 0x00040402, 0x00000000, 0x3b5c2af3, 0x00040406, 0x00000000, - 0x47974a35, 0x0004040a, 0x00000000, 0x105971c2, 0x0004040e, 0x00000000, - 0x7d137765, 0x00040412, 0x00000000, 0xd187febc, 0x00040416, 0x00000000, - 0x12f854ac, 0x0004041a, 0x00000000, 0x40d49ad1, 0x0004041e, 0x00000000, - 0x8c0923da, 0x00040422, 0x00000000, 0xf6be6f25, 0x00040426, 0x00000000, - 0xf6908bad, 0x0004042a, 0x00000000, 0x862ee1be, 0x0004042e, 0x00000000, - 0x8631d396, 0x00040432, 0x00000000, 0x89d7d386, 0x00040436, 0x00000000, - 0xd1006f62, 0x0004043a, 0x00000000, 0x7e51d354, 0x0004043e, 0x00000000, - 0x7e712edc, 0x00040442, 0x00000000, 0x141f6002, 0x00040446, 0x00000000, - 0x140c761a, 0x0004044a, 0x00000000, 0x14f68dfa, 0x0004044e, 0x00000000, - 0x6fea32c3, 0x00040452, 0x00000000, 0x8f378499, 0x00040456, 0x00000000, - 0x5d9ed616, 0x0004045a, 0x00000000, 0x2bbfa784, 0x0004045e, 0x00000000, - 0x2b45f28c, 0x00040462, 0x00000000, 0x5f4aaed9, 0x00040466, 0x00000000, - 0x5f477465, 0x0004046a, 0x00000000, 0x5ec84729, 0x0004046e, 0x00000000, - 0x48ca8407, 0x00040472, 0x00000000, 0x5f355d79, 0x00040476, 0x00000000, - 0x5f0f3449, 0x0004047a, 0x00000000, 0xee4a4919, 0x0004047e, 0x00000000, - 0xee49852d, 0x00040482, 0x00000000, 0xee4f8201, 0x00040486, 0x00000000, - 0x8a3f99a1, 0x0004048a, 0x00000000, 0x381fc91f, 0x0004048e, 0x00000000, - 0x19d8287b, 0x00040492, 0x00000000, 0xbb8df494, 0x00040496, 0x00000000, - 0xf6d8a76e, 0x0004049a, 0x00000000, 0x7620f1e9, 0x0004049e, 0x00000000, - 0x9ebfab10, 0x000404a2, 0x00000000, 0x98a09d0e, 0x000408a6, 0x00000000, + 0xe24f806d, 0x00040400, 0x00000000, 0xf6c28182, 0x00040404, 0x00000000, 0x6f6e55a5, 0x00040408, + 0x00000000, 0x0bc65da4, 0x0004040c, 0x00000000, 0x9e5ad592, 0x00040410, 0x00000000, 0xbb513b98, + 0x00040414, 0x00000000, 0xab64b23b, 0x00040418, 0x00000000, 0xac198e0b, 0x0004041c, 0x00000000, + 0x53c39964, 0x00040420, 0x00000000, 0x01396b11, 0x00040424, 0x00000000, 0x7d42019a, 0x00040428, + 0x00000000, 0x3548f523, 0x0004042c, 0x00000000, 0xf43ad28a, 0x00040430, 0x00000000, 0x6de4c312, + 0x00040434, 0x00000000, 0x00a77ae0, 0x00040438, 0x00000000, 0x00a779b7, 0x0004043c, 0x00000000, + 0x5100100c, 0x00040440, 0x00000000, 0x59958bba, 0x00040444, 0x00000000, 0x7f7bd53e, 0x00040448, + 0x00000000, 0x0c06f17c, 0x0004044c, 0x00000000, 0x6f104b72, 0x00040450, 0x00000000, 0x25c70d9c, + 0x00040454, 0x00000000, 0x3881201e, 0x00040458, 0x00000000, 0x09afddaf, 0x0004045c, 0x00000000, + 0x367d63cf, 0x00040460, 0x00000000, 0x43707db8, 0x00040464, 0x00000000, 0xf6ae26ba, 0x00040468, + 0x00000000, 0x1b917652, 0x0004046c, 0x00000000, 0x2cac726e, 0x00040470, 0x00000000, 0x2cac7111, + 0x00040474, 0x00000000, 0x94b1e4f7, 0x00040478, 0x00000000, 0xe3661b6c, 0x0004047c, 0x00000000, + 0x1eb8d73a, 0x00040480, 0x00000000, 0x15051fa3, 0x00040484, 0x00000000, 0x9c51a7f1, 0x00040488, + 0x00000000, 0xa20efc70, 0x0004048c, 0x00000000, 0x0ec09f6e, 0x00040490, 0x00000000, 0x34a7d6d3, + 0x00040494, 0x00000000, 0xce831b94, 0x00040498, 0x00000000, 0x5cc72a74, 0x0004049c, 0x00000000, + 0x3b77713c, 0x000404a0, 0x00000000, 0x40f64410, 0x000404a4, 0x00000000, 0x69441268, 0x000404a8, + 0x00000000, 0x2e418b83, 0x000404ac, 0x00000000, 0xa00d0c8d, 0x000404b0, 0x00000000, 0xb1289fb3, + 0x000404b4, 0x00000000, 0x144832fb, 0x000404b8, 0x00000000, 0x9890d9fa, 0x000404bc, 0x00000000, + 0x9016faf1, 0x000404c0, 0x00000000, 0x4b73ce27, 0x000404c4, 0x00000000, 0x5f5a3e7b, 0x000404c8, + 0x00000000, 0xd4af3a51, 0x000404cc, 0x00000000, 0x6cf4f543, 0x000404d0, 0x00000000, 0x5fb86ccb, + 0x000404d4, 0x00000000, 0xedefa188, 0x000404d8, 0x00000000, 0xd0de9ee6, 0x000404dc, 0x00000000, + 0xc5831803, 0x000404e0, 0x00000000, 0x8e6de84b, 0x000404e4, 0x00000000, 0xd0771662, 0x000408e8, + 0x00000000, 0x569f7444, 0x004004ec, 0x00000000, 0x5c6637cd, 0x000408f0, 0x00000000, 0xcae3e690, + 0x000408f4, 0x00000000, 0x43fbd769, 0x000410f8, 0x00000000, 0xef550356, 0x002004fc, 0x00000000, + 0x8f52e279, 0x00040900, 0x00000000, 0x1f2d8149, 0x00100904, 0x00000000, 0x4413c6f9, 0x00040908, + 0x00000000, 0x67096014, 0x0004450c, 0x00000000, 0x88f5e915, 0x00040910, 0x00000000, 0x918106bb, + 0x00040914, 0x00000000, 0x95f0e7ac, 0x00041118, 0x00000000, 0xb48cbab2, 0x0004091c, 0x00000000, + 0x05bb3bc6, 0x00040920, 0x00000000, 0x94faba07, 0x00040924, 0x00000000, 0x38e92c91, 0x00205128, + 0x00000000, 0x0b177b43, 0x0004092c, 0x00000000, 0x48531062, 0x00800530, 0x00000000, 0xaaa964b9, + 0x00201134, 0x00000000, 0x7690af6f, 0x00402938, 0x00000000, 0x078d7060, 0x0004093c, 0x00000000, + 0x5d6e3ec7, 0x00040401, 0x00000000, 0x57e7079a, 0x00040405, 0x00000000, 0x7467fafd, 0x00040409, + 0x00000000, 0x9e826b50, 0x0004040d, 0x00000000, 0xdc484f18, 0x00040411, 0x00000000, 0x5da8bca3, + 0x00040415, 0x00000000, 0x5ca726d8, 0x00040419, 0x00000000, 0x5dd28360, 0x0004041d, 0x00000000, + 0x57efa0be, 0x00040421, 0x00000000, 0x502363d5, 0x00040425, 0x00000000, 0x506d14bd, 0x00040429, + 0x00000000, 0xb2609506, 0x0010042d, 0x00000000, 0x9e5cfb8a, 0x00041831, 0x00000000, 0xc918df3e, + 0x00040835, 0x00000000, 0xc9751c9c, 0x00040839, 0x00000000, 0xc97ef77a, 0x0004083d, 0x00000000, + 0xc927c6b9, 0x00040841, 0x00000000, 0xc92a1ec5, 0x00040845, 0x00000000, 0xc9e01b31, 0x00040849, + 0x00000000, 0xb26219ca, 0x0010044d, 0x00000000, 0xb25b6cf9, 0x00100451, 0x00000000, 0xb2f86101, + 0x00100455, 0x00000000, 0x07e3b155, 0x00040859, 0x00000000, 0x07e383c6, 0x0004085d, 0x00000000, + 0xbda98653, 0x00400461, 0x00000000, 0xbdbd1d0f, 0x00800465, 0x00000000, 0xbd946fd4, 0x00800469, + 0x00000000, 0xbdf02a4c, 0x0080046d, 0x00000000, 0x19e93e85, 0x00040402, 0x00000000, 0x3b5c2af3, + 0x00040406, 0x00000000, 0x47974a35, 0x0004040a, 0x00000000, 0x105971c2, 0x0004040e, 0x00000000, + 0x7d137765, 0x00040412, 0x00000000, 0xd187febc, 0x00040416, 0x00000000, 0x12f854ac, 0x0004041a, + 0x00000000, 0x40d49ad1, 0x0004041e, 0x00000000, 0x8c0923da, 0x00040422, 0x00000000, 0xf6be6f25, + 0x00040426, 0x00000000, 0xf6908bad, 0x0004042a, 0x00000000, 0x862ee1be, 0x0004042e, 0x00000000, + 0x8631d396, 0x00040432, 0x00000000, 0x89d7d386, 0x00040436, 0x00000000, 0xd1006f62, 0x0004043a, + 0x00000000, 0x7e51d354, 0x0004043e, 0x00000000, 0x7e712edc, 0x00040442, 0x00000000, 0x141f6002, + 0x00040446, 0x00000000, 0x140c761a, 0x0004044a, 0x00000000, 0x14f68dfa, 0x0004044e, 0x00000000, + 0x6fea32c3, 0x00040452, 0x00000000, 0x8f378499, 0x00040456, 0x00000000, 0x5d9ed616, 0x0004045a, + 0x00000000, 0x2bbfa784, 0x0004045e, 0x00000000, 0x2b45f28c, 0x00040462, 0x00000000, 0x5f4aaed9, + 0x00040466, 0x00000000, 0x5f477465, 0x0004046a, 0x00000000, 0x5ec84729, 0x0004046e, 0x00000000, + 0x48ca8407, 0x00040472, 0x00000000, 0x5f355d79, 0x00040476, 0x00000000, 0x5f0f3449, 0x0004047a, + 0x00000000, 0xee4a4919, 0x0004047e, 0x00000000, 0xee49852d, 0x00040482, 0x00000000, 0xee4f8201, + 0x00040486, 0x00000000, 0x8a3f99a1, 0x0004048a, 0x00000000, 0x381fc91f, 0x0004048e, 0x00000000, + 0x19d8287b, 0x00040492, 0x00000000, 0xbb8df494, 0x00040496, 0x00000000, 0xf6d8a76e, 0x0004049a, + 0x00000000, 0x7620f1e9, 0x0004049e, 0x00000000, 0x9ebfab10, 0x000404a2, 0x00000000, 0x98a09d0e, + 0x000408a6, 0x00000000, }; static CompactRegisterDefaults g_agc_public_reg_defaults_v0 = { - g_agc_public_reg_defaults_v0_tbl0_regs, 523, g_agc_public_reg_defaults_v0_tbl0_ptrs, 80, - g_agc_public_reg_defaults_v0_tbl1_regs, 161, g_agc_public_reg_defaults_v0_tbl1_ptrs, 28, - g_agc_public_reg_defaults_v0_tbl2_regs, 43, g_agc_public_reg_defaults_v0_tbl2_ptrs, 42, - nullptr, 0, nullptr, 0, - g_agc_public_reg_defaults_v0_types, 150, + g_agc_public_reg_defaults_v0_tbl0_regs, + 523, + g_agc_public_reg_defaults_v0_tbl0_ptrs, + 80, + g_agc_public_reg_defaults_v0_tbl1_regs, + 161, + g_agc_public_reg_defaults_v0_tbl1_ptrs, + 28, + g_agc_public_reg_defaults_v0_tbl2_regs, + 43, + g_agc_public_reg_defaults_v0_tbl2_ptrs, + 42, + nullptr, + 0, + nullptr, + 0, + g_agc_public_reg_defaults_v0_types, + 150, }; // g_agc_public_reg_defaults_v10: regs=(482, 159, 55, 0), ptrs=(79, 29, 20, 0), types=128. @@ -919,9 +1004,9 @@ static ShaderRegister g_agc_public_reg_defaults_v10_tbl1_regs[] = { }; static const uint16_t g_agc_public_reg_defaults_v10_tbl1_ptrs[] = { - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000a, 0x000b, - 0x000f, 0x0012, 0x0014, 0x0016, 0x0018, 0x001a, 0x001c, 0x001e, 0x001f, 0x0023, 0x0027, 0x002b, - 0x002d, 0x002f, 0x003f, 0x005f, 0x007f, + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, + 0x000a, 0x000b, 0x000f, 0x0012, 0x0014, 0x0016, 0x0018, 0x001a, 0x001c, 0x001e, + 0x001f, 0x0023, 0x0027, 0x002b, 0x002d, 0x002f, 0x003f, 0x005f, 0x007f, }; static ShaderRegister g_agc_public_reg_defaults_v10_tbl2_regs[] = { @@ -942,83 +1027,80 @@ static ShaderRegister g_agc_public_reg_defaults_v10_tbl2_regs[] = { }; static const uint16_t g_agc_public_reg_defaults_v10_tbl2_ptrs[] = { - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000a, 0x000b, - 0x000c, 0x000d, 0x000f, 0x0017, 0x0027, 0x002b, 0x0033, 0x0034, + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, + 0x000a, 0x000b, 0x000c, 0x000d, 0x000f, 0x0017, 0x0027, 0x002b, 0x0033, 0x0034, }; static uint32_t g_agc_public_reg_defaults_v10_types[] = { - 0xe24f806d, 0x00040400, 0x00000000, 0xf6c28182, 0x00040404, 0x00000000, - 0xa6d12629, 0x00040408, 0x00000000, 0x6f6e55a5, 0x0004040c, 0x00000000, - 0x0bc65da4, 0x00040410, 0x00000000, 0x9e5ad592, 0x00040414, 0x00000000, - 0xbb513b98, 0x00040418, 0x00000000, 0xab64b23b, 0x0004041c, 0x00000000, - 0x53c39964, 0x00040420, 0x00000000, 0x01396b11, 0x00040424, 0x00000000, - 0x7d42019a, 0x00040428, 0x00000000, 0x3548f523, 0x0004042c, 0x00000000, - 0xf43ad28a, 0x00040430, 0x00000000, 0x6de4c312, 0x00040434, 0x00000000, - 0x00a77ae0, 0x00040438, 0x00000000, 0x00a779b7, 0x0004043c, 0x00000000, - 0x5100100c, 0x00040440, 0x00000000, 0x59958bba, 0x00040444, 0x00000000, - 0x0c06f17c, 0x00040448, 0x00000000, 0x6f104b72, 0x0004044c, 0x00000000, - 0x25c70d9c, 0x00040450, 0x00000000, 0x3881201e, 0x00040454, 0x00000000, - 0x09afddaf, 0x00040458, 0x00000000, 0x367d63cf, 0x0004045c, 0x00000000, - 0x43707db8, 0x00040460, 0x00000000, 0xf6ae26ba, 0x00040464, 0x00000000, - 0x1b917652, 0x00040468, 0x00000000, 0x94b1e4f7, 0x0004046c, 0x00000000, - 0xe3661b6c, 0x00040470, 0x00000000, 0x1eb8d73a, 0x00040474, 0x00000000, - 0x15051fa3, 0x00040478, 0x00000000, 0x9c51a7f1, 0x0004047c, 0x00000000, - 0xa20efc70, 0x00040480, 0x00000000, 0x0ec09f6e, 0x00040484, 0x00000000, - 0x34a7d6d3, 0x00040488, 0x00000000, 0xce831b94, 0x0004048c, 0x00000000, - 0x5cc72a74, 0x00040490, 0x00000000, 0x3b77713c, 0x00040494, 0x00000000, - 0x40f64410, 0x00040498, 0x00000000, 0x69441268, 0x0004049c, 0x00000000, - 0x2e418b83, 0x000404a0, 0x00000000, 0xa00d0c8d, 0x000404a4, 0x00000000, - 0xb1289fb3, 0x000404a8, 0x00000000, 0x144832fb, 0x000404ac, 0x00000000, - 0x9890d9fa, 0x000404b0, 0x00000000, 0x9016faf1, 0x000404b4, 0x00000000, - 0x4b73ce27, 0x000404b8, 0x00000000, 0x5f5a3e7b, 0x000404bc, 0x00000000, - 0xd4af3a51, 0x000404c0, 0x00000000, 0x6cf4f543, 0x000404c4, 0x00000000, - 0x5fb86ccb, 0x000404c8, 0x00000000, 0xedefa188, 0x000404cc, 0x00000000, - 0xd0de9ee6, 0x000404d0, 0x00000000, 0xc5831803, 0x000404d4, 0x00000000, - 0x8e6de84b, 0x000404d8, 0x00000000, 0xd0771662, 0x000408dc, 0x00000000, - 0x569f7444, 0x004004e0, 0x00000000, 0x5c6637cd, 0x000408e4, 0x00000000, - 0xcae3e690, 0x000408e8, 0x00000000, 0x43fbd769, 0x000410ec, 0x00000000, - 0xef550356, 0x002004f0, 0x00000000, 0x8f52e279, 0x000408f4, 0x00000000, - 0x1f2d8149, 0x001008f8, 0x00000000, 0x853d0614, 0x000404fc, 0x00000000, - 0x4413c6f9, 0x00040900, 0x00000000, 0x67096014, 0x00044104, 0x00000000, - 0x88f5e915, 0x00040908, 0x00000000, 0x033f1eff, 0x0004090c, 0x00000000, - 0x918106bb, 0x00040910, 0x00000000, 0x95f0e7ac, 0x00041114, 0x00000000, - 0xb48cbab2, 0x00040918, 0x00000000, 0x05bb3bc6, 0x0004091c, 0x00000000, - 0x94faba07, 0x00040920, 0x00000000, 0x38e92c91, 0x00204124, 0x00000000, - 0x0b177b43, 0x00040928, 0x00000000, 0x48531062, 0x0080052c, 0x00000000, - 0xaaa964b9, 0x00181130, 0x00000000, 0x7690af6f, 0x00402934, 0x00000000, - 0x078d7060, 0x00040938, 0x00000000, 0x5d6e3ec7, 0x00040401, 0x00000000, - 0x57e7079a, 0x00040405, 0x00000000, 0x7467fafd, 0x00040409, 0x00000000, - 0x9e826b50, 0x0004040d, 0x00000000, 0xdc484f18, 0x00040411, 0x00000000, - 0x5da8bca3, 0x00040415, 0x00000000, 0x5ca726d8, 0x00040419, 0x00000000, - 0x5dd28360, 0x0004041d, 0x00000000, 0x57efa0be, 0x00040421, 0x00000000, - 0x502363d5, 0x00040425, 0x00000000, 0x506d14bd, 0x00040429, 0x00000000, - 0xb2609506, 0x0010042d, 0x00000000, 0x9e5cfb8a, 0x00040c31, 0x00000000, - 0xc918df3e, 0x00040835, 0x00000000, 0xc9751c9c, 0x00040839, 0x00000000, - 0xc97ef77a, 0x0004083d, 0x00000000, 0xc927c6b9, 0x00040841, 0x00000000, - 0xc92a1ec5, 0x00040845, 0x00000000, 0xc9e01b31, 0x00040849, 0x00000000, - 0x50685f29, 0x0004044d, 0x00000000, 0xb26219ca, 0x00100451, 0x00000000, - 0xb25b6cf9, 0x00100455, 0x00000000, 0xb2f86101, 0x00100459, 0x00000000, - 0x07e3b155, 0x0004085d, 0x00000000, 0x07e383c6, 0x00040861, 0x00000000, - 0xbda98653, 0x00400465, 0x00000000, 0xbdbd1d0f, 0x00800469, 0x00000000, - 0xbd946fd4, 0x0080046d, 0x00000000, 0xbdf02a4c, 0x00800471, 0x00000000, - 0x19e93e85, 0x00040402, 0x00000000, 0x3b5c2af3, 0x00040406, 0x00000000, - 0x47974a35, 0x0004040a, 0x00000000, 0x105971c2, 0x0004040e, 0x00000000, - 0x7d137765, 0x00040412, 0x00000000, 0xd187febc, 0x00040416, 0x00000000, - 0x12f854ac, 0x0004041a, 0x00000000, 0x40d49ad1, 0x0004041e, 0x00000000, - 0x8c0923da, 0x00040422, 0x00000000, 0xbb8df494, 0x00040426, 0x00000000, - 0xf6d8a76e, 0x0004042a, 0x00000000, 0x7620f1e9, 0x0004042e, 0x00000000, - 0x9ebfab10, 0x00040432, 0x00000000, 0x98a09d0e, 0x00040836, 0x00000000, - 0x195d37d2, 0x0010083a, 0x00000000, 0xf9ec4f85, 0x0010103e, 0x00000000, - 0x4626b750, 0x00080842, 0x00000000, 0x4cc673a0, 0x00200446, 0x00000000, - 0xde5b3431, 0x0004044a, 0x00000000, 0x036ac8a6, 0x000c044e, 0x00000000, + 0xe24f806d, 0x00040400, 0x00000000, 0xf6c28182, 0x00040404, 0x00000000, 0xa6d12629, 0x00040408, + 0x00000000, 0x6f6e55a5, 0x0004040c, 0x00000000, 0x0bc65da4, 0x00040410, 0x00000000, 0x9e5ad592, + 0x00040414, 0x00000000, 0xbb513b98, 0x00040418, 0x00000000, 0xab64b23b, 0x0004041c, 0x00000000, + 0x53c39964, 0x00040420, 0x00000000, 0x01396b11, 0x00040424, 0x00000000, 0x7d42019a, 0x00040428, + 0x00000000, 0x3548f523, 0x0004042c, 0x00000000, 0xf43ad28a, 0x00040430, 0x00000000, 0x6de4c312, + 0x00040434, 0x00000000, 0x00a77ae0, 0x00040438, 0x00000000, 0x00a779b7, 0x0004043c, 0x00000000, + 0x5100100c, 0x00040440, 0x00000000, 0x59958bba, 0x00040444, 0x00000000, 0x0c06f17c, 0x00040448, + 0x00000000, 0x6f104b72, 0x0004044c, 0x00000000, 0x25c70d9c, 0x00040450, 0x00000000, 0x3881201e, + 0x00040454, 0x00000000, 0x09afddaf, 0x00040458, 0x00000000, 0x367d63cf, 0x0004045c, 0x00000000, + 0x43707db8, 0x00040460, 0x00000000, 0xf6ae26ba, 0x00040464, 0x00000000, 0x1b917652, 0x00040468, + 0x00000000, 0x94b1e4f7, 0x0004046c, 0x00000000, 0xe3661b6c, 0x00040470, 0x00000000, 0x1eb8d73a, + 0x00040474, 0x00000000, 0x15051fa3, 0x00040478, 0x00000000, 0x9c51a7f1, 0x0004047c, 0x00000000, + 0xa20efc70, 0x00040480, 0x00000000, 0x0ec09f6e, 0x00040484, 0x00000000, 0x34a7d6d3, 0x00040488, + 0x00000000, 0xce831b94, 0x0004048c, 0x00000000, 0x5cc72a74, 0x00040490, 0x00000000, 0x3b77713c, + 0x00040494, 0x00000000, 0x40f64410, 0x00040498, 0x00000000, 0x69441268, 0x0004049c, 0x00000000, + 0x2e418b83, 0x000404a0, 0x00000000, 0xa00d0c8d, 0x000404a4, 0x00000000, 0xb1289fb3, 0x000404a8, + 0x00000000, 0x144832fb, 0x000404ac, 0x00000000, 0x9890d9fa, 0x000404b0, 0x00000000, 0x9016faf1, + 0x000404b4, 0x00000000, 0x4b73ce27, 0x000404b8, 0x00000000, 0x5f5a3e7b, 0x000404bc, 0x00000000, + 0xd4af3a51, 0x000404c0, 0x00000000, 0x6cf4f543, 0x000404c4, 0x00000000, 0x5fb86ccb, 0x000404c8, + 0x00000000, 0xedefa188, 0x000404cc, 0x00000000, 0xd0de9ee6, 0x000404d0, 0x00000000, 0xc5831803, + 0x000404d4, 0x00000000, 0x8e6de84b, 0x000404d8, 0x00000000, 0xd0771662, 0x000408dc, 0x00000000, + 0x569f7444, 0x004004e0, 0x00000000, 0x5c6637cd, 0x000408e4, 0x00000000, 0xcae3e690, 0x000408e8, + 0x00000000, 0x43fbd769, 0x000410ec, 0x00000000, 0xef550356, 0x002004f0, 0x00000000, 0x8f52e279, + 0x000408f4, 0x00000000, 0x1f2d8149, 0x001008f8, 0x00000000, 0x853d0614, 0x000404fc, 0x00000000, + 0x4413c6f9, 0x00040900, 0x00000000, 0x67096014, 0x00044104, 0x00000000, 0x88f5e915, 0x00040908, + 0x00000000, 0x033f1eff, 0x0004090c, 0x00000000, 0x918106bb, 0x00040910, 0x00000000, 0x95f0e7ac, + 0x00041114, 0x00000000, 0xb48cbab2, 0x00040918, 0x00000000, 0x05bb3bc6, 0x0004091c, 0x00000000, + 0x94faba07, 0x00040920, 0x00000000, 0x38e92c91, 0x00204124, 0x00000000, 0x0b177b43, 0x00040928, + 0x00000000, 0x48531062, 0x0080052c, 0x00000000, 0xaaa964b9, 0x00181130, 0x00000000, 0x7690af6f, + 0x00402934, 0x00000000, 0x078d7060, 0x00040938, 0x00000000, 0x5d6e3ec7, 0x00040401, 0x00000000, + 0x57e7079a, 0x00040405, 0x00000000, 0x7467fafd, 0x00040409, 0x00000000, 0x9e826b50, 0x0004040d, + 0x00000000, 0xdc484f18, 0x00040411, 0x00000000, 0x5da8bca3, 0x00040415, 0x00000000, 0x5ca726d8, + 0x00040419, 0x00000000, 0x5dd28360, 0x0004041d, 0x00000000, 0x57efa0be, 0x00040421, 0x00000000, + 0x502363d5, 0x00040425, 0x00000000, 0x506d14bd, 0x00040429, 0x00000000, 0xb2609506, 0x0010042d, + 0x00000000, 0x9e5cfb8a, 0x00040c31, 0x00000000, 0xc918df3e, 0x00040835, 0x00000000, 0xc9751c9c, + 0x00040839, 0x00000000, 0xc97ef77a, 0x0004083d, 0x00000000, 0xc927c6b9, 0x00040841, 0x00000000, + 0xc92a1ec5, 0x00040845, 0x00000000, 0xc9e01b31, 0x00040849, 0x00000000, 0x50685f29, 0x0004044d, + 0x00000000, 0xb26219ca, 0x00100451, 0x00000000, 0xb25b6cf9, 0x00100455, 0x00000000, 0xb2f86101, + 0x00100459, 0x00000000, 0x07e3b155, 0x0004085d, 0x00000000, 0x07e383c6, 0x00040861, 0x00000000, + 0xbda98653, 0x00400465, 0x00000000, 0xbdbd1d0f, 0x00800469, 0x00000000, 0xbd946fd4, 0x0080046d, + 0x00000000, 0xbdf02a4c, 0x00800471, 0x00000000, 0x19e93e85, 0x00040402, 0x00000000, 0x3b5c2af3, + 0x00040406, 0x00000000, 0x47974a35, 0x0004040a, 0x00000000, 0x105971c2, 0x0004040e, 0x00000000, + 0x7d137765, 0x00040412, 0x00000000, 0xd187febc, 0x00040416, 0x00000000, 0x12f854ac, 0x0004041a, + 0x00000000, 0x40d49ad1, 0x0004041e, 0x00000000, 0x8c0923da, 0x00040422, 0x00000000, 0xbb8df494, + 0x00040426, 0x00000000, 0xf6d8a76e, 0x0004042a, 0x00000000, 0x7620f1e9, 0x0004042e, 0x00000000, + 0x9ebfab10, 0x00040432, 0x00000000, 0x98a09d0e, 0x00040836, 0x00000000, 0x195d37d2, 0x0010083a, + 0x00000000, 0xf9ec4f85, 0x0010103e, 0x00000000, 0x4626b750, 0x00080842, 0x00000000, 0x4cc673a0, + 0x00200446, 0x00000000, 0xde5b3431, 0x0004044a, 0x00000000, 0x036ac8a6, 0x000c044e, 0x00000000, }; static CompactRegisterDefaults g_agc_public_reg_defaults_v10 = { - g_agc_public_reg_defaults_v10_tbl0_regs, 482, g_agc_public_reg_defaults_v10_tbl0_ptrs, 79, - g_agc_public_reg_defaults_v10_tbl1_regs, 159, g_agc_public_reg_defaults_v10_tbl1_ptrs, 29, - g_agc_public_reg_defaults_v10_tbl2_regs, 55, g_agc_public_reg_defaults_v10_tbl2_ptrs, 20, - nullptr, 0, nullptr, 0, - g_agc_public_reg_defaults_v10_types, 128, + g_agc_public_reg_defaults_v10_tbl0_regs, + 482, + g_agc_public_reg_defaults_v10_tbl0_ptrs, + 79, + g_agc_public_reg_defaults_v10_tbl1_regs, + 159, + g_agc_public_reg_defaults_v10_tbl1_ptrs, + 29, + g_agc_public_reg_defaults_v10_tbl2_regs, + 55, + g_agc_public_reg_defaults_v10_tbl2_ptrs, + 20, + nullptr, + 0, + nullptr, + 0, + g_agc_public_reg_defaults_v10_types, + 128, }; // g_agc_public_reg_defaults_v11: regs=(488, 162, 56, 0), ptrs=(84, 32, 21, 0), types=137. @@ -1202,9 +1284,9 @@ static ShaderRegister g_agc_public_reg_defaults_v11_tbl1_regs[] = { }; static const uint16_t g_agc_public_reg_defaults_v11_tbl1_ptrs[] = { - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000a, 0x000b, - 0x000c, 0x000d, 0x000e, 0x0012, 0x0015, 0x0017, 0x0019, 0x001b, 0x001d, 0x001f, 0x0021, 0x0022, - 0x0026, 0x002a, 0x002e, 0x0030, 0x0032, 0x0042, 0x0062, 0x0082, + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000a, + 0x000b, 0x000c, 0x000d, 0x000e, 0x0012, 0x0015, 0x0017, 0x0019, 0x001b, 0x001d, 0x001f, + 0x0021, 0x0022, 0x0026, 0x002a, 0x002e, 0x0030, 0x0032, 0x0042, 0x0062, 0x0082, }; static ShaderRegister g_agc_public_reg_defaults_v11_tbl2_regs[] = { @@ -1225,88 +1307,84 @@ static ShaderRegister g_agc_public_reg_defaults_v11_tbl2_regs[] = { }; static const uint16_t g_agc_public_reg_defaults_v11_tbl2_ptrs[] = { - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000a, 0x000b, - 0x000c, 0x000d, 0x000e, 0x0010, 0x0018, 0x0028, 0x002c, 0x0034, 0x0035, + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000a, + 0x000b, 0x000c, 0x000d, 0x000e, 0x0010, 0x0018, 0x0028, 0x002c, 0x0034, 0x0035, }; static uint32_t g_agc_public_reg_defaults_v11_types[] = { - 0xe24f806d, 0x00040400, 0x00000000, 0xf6c28182, 0x00040404, 0x00000000, - 0xa6d12629, 0x00040408, 0x00000000, 0x6f6e55a5, 0x0004040c, 0x00000000, - 0x0bc65da4, 0x00040410, 0x00000000, 0x9e5ad592, 0x00040414, 0x00000000, - 0xbb513b98, 0x00040418, 0x00000000, 0xab64b23b, 0x0004041c, 0x00000000, - 0x53c39964, 0x00040420, 0x00000000, 0x01396b11, 0x00040424, 0x00000000, - 0xb994ad29, 0x00040428, 0x00000000, 0x7d42019a, 0x0004042c, 0x00000000, - 0x3548f523, 0x00040430, 0x00000000, 0xf43ad28a, 0x00040434, 0x00000000, - 0x6de4c312, 0x00040438, 0x00000000, 0x26ae2080, 0x0004043c, 0x00000000, - 0x00a77ae0, 0x00040440, 0x00000000, 0x00a779b7, 0x00040444, 0x00000000, - 0x5100100c, 0x00040448, 0x00000000, 0x59958bba, 0x0004044c, 0x00000000, - 0x0c06f17c, 0x00040450, 0x00000000, 0x9e0feb34, 0x00040454, 0x00000000, - 0x6f104b72, 0x00040458, 0x00000000, 0x25c70d9c, 0x0004045c, 0x00000000, - 0x3881201e, 0x00040460, 0x00000000, 0x381c673c, 0x00040464, 0x00000000, - 0x09afddaf, 0x00040468, 0x00000000, 0x367d63cf, 0x0004046c, 0x00000000, - 0x43707db8, 0x00040470, 0x00000000, 0xf6ae26ba, 0x00040474, 0x00000000, - 0x1b917652, 0x00040478, 0x00000000, 0x94b1e4f7, 0x0004047c, 0x00000000, - 0xe3661b6c, 0x00040480, 0x00000000, 0x1eb8d73a, 0x00040484, 0x00000000, - 0x15051fa3, 0x00040488, 0x00000000, 0x9c51a7f1, 0x0004048c, 0x00000000, - 0xa20efc70, 0x00040490, 0x00000000, 0x0ec09f6e, 0x00040494, 0x00000000, - 0x34a7d6d3, 0x00040498, 0x00000000, 0xce831b94, 0x0004049c, 0x00000000, - 0x5cc72a74, 0x000404a0, 0x00000000, 0x3b77713c, 0x000404a4, 0x00000000, - 0x40f64410, 0x000404a8, 0x00000000, 0x69441268, 0x000404ac, 0x00000000, - 0x2e418b83, 0x000404b0, 0x00000000, 0xa00d0c8d, 0x000404b4, 0x00000000, - 0xb1289fb3, 0x000404b8, 0x00000000, 0x144832fb, 0x000404bc, 0x00000000, - 0xa14657c5, 0x000404c0, 0x00000000, 0x9890d9fa, 0x000404c4, 0x00000000, - 0x9016faf1, 0x000404c8, 0x00000000, 0x4b73ce27, 0x000404cc, 0x00000000, - 0x5f5a3e7b, 0x000404d0, 0x00000000, 0xd4af3a51, 0x000404d4, 0x00000000, - 0x6cf4f543, 0x000404d8, 0x00000000, 0x5fb86ccb, 0x000404dc, 0x00000000, - 0xedefa188, 0x000404e0, 0x00000000, 0xd0de9ee6, 0x000404e4, 0x00000000, - 0xc5831803, 0x000404e8, 0x00000000, 0x8e6de84b, 0x000404ec, 0x00000000, - 0xd0771662, 0x000408f0, 0x00000000, 0x569f7444, 0x004004f4, 0x00000000, - 0x5c6637cd, 0x000408f8, 0x00000000, 0xcae3e690, 0x000408fc, 0x00000000, - 0x43fbd769, 0x00041100, 0x00000000, 0xef550356, 0x00200504, 0x00000000, - 0x8f52e279, 0x00040908, 0x00000000, 0x1f2d8149, 0x0010090c, 0x00000000, - 0x853d0614, 0x00040510, 0x00000000, 0x4413c6f9, 0x00040914, 0x00000000, - 0x67096014, 0x00044518, 0x00000000, 0x88f5e915, 0x0004091c, 0x00000000, - 0x033f1eff, 0x00040920, 0x00000000, 0x918106bb, 0x00040924, 0x00000000, - 0x95f0e7ac, 0x00041128, 0x00000000, 0xb48cbab2, 0x0004092c, 0x00000000, - 0x05bb3bc6, 0x00040930, 0x00000000, 0x94faba07, 0x00040934, 0x00000000, - 0x38e92c91, 0x00204138, 0x00000000, 0x0b177b43, 0x0004093c, 0x00000000, - 0x48531062, 0x00800540, 0x00000000, 0xaaa964b9, 0x00181144, 0x00000000, - 0x7690af6f, 0x00402948, 0x00000000, 0x078d7060, 0x0004094c, 0x00000000, - 0x5d6e3ec7, 0x00040401, 0x00000000, 0x57e7079a, 0x00040405, 0x00000000, - 0x7467fafd, 0x00040409, 0x00000000, 0x9e826b50, 0x0004040d, 0x00000000, - 0xf899653a, 0x00040411, 0x00000000, 0xdc484f18, 0x00040415, 0x00000000, - 0xf9754e16, 0x00040419, 0x00000000, 0xf8e274f5, 0x0004041d, 0x00000000, - 0x5da8bca3, 0x00040421, 0x00000000, 0x5ca726d8, 0x00040425, 0x00000000, - 0x5dd28360, 0x00040429, 0x00000000, 0x57efa0be, 0x0004042d, 0x00000000, - 0x502363d5, 0x00040431, 0x00000000, 0x506d14bd, 0x00040435, 0x00000000, - 0xb2609506, 0x00100439, 0x00000000, 0x9e5cfb8a, 0x00040c3d, 0x00000000, - 0xc918df3e, 0x00040841, 0x00000000, 0xc9751c9c, 0x00040845, 0x00000000, - 0xc97ef77a, 0x00040849, 0x00000000, 0xc927c6b9, 0x0004084d, 0x00000000, - 0xc92a1ec5, 0x00040851, 0x00000000, 0xc9e01b31, 0x00040855, 0x00000000, - 0x50685f29, 0x00040459, 0x00000000, 0xb26219ca, 0x0010045d, 0x00000000, - 0xb25b6cf9, 0x00100461, 0x00000000, 0xb2f86101, 0x00100465, 0x00000000, - 0x07e3b155, 0x00040869, 0x00000000, 0x07e383c6, 0x0004086d, 0x00000000, - 0xbda98653, 0x00400471, 0x00000000, 0xbdbd1d0f, 0x00800475, 0x00000000, - 0xbd946fd4, 0x00800479, 0x00000000, 0xbdf02a4c, 0x0080047d, 0x00000000, - 0x19e93e85, 0x00040402, 0x00000000, 0x3b5c2af3, 0x00040406, 0x00000000, - 0x47974a35, 0x0004040a, 0x00000000, 0x105971c2, 0x0004040e, 0x00000000, - 0x7d137765, 0x00040412, 0x00000000, 0xd187febc, 0x00040416, 0x00000000, - 0x12f854ac, 0x0004041a, 0x00000000, 0x40d49ad1, 0x0004041e, 0x00000000, - 0xe3a37123, 0x00040422, 0x00000000, 0x8c0923da, 0x00040426, 0x00000000, - 0xbb8df494, 0x0004042a, 0x00000000, 0xf6d8a76e, 0x0004042e, 0x00000000, - 0x7620f1e9, 0x00040432, 0x00000000, 0x9ebfab10, 0x00040436, 0x00000000, - 0x98a09d0e, 0x0004083a, 0x00000000, 0x195d37d2, 0x0010083e, 0x00000000, - 0xf9ec4f85, 0x00101042, 0x00000000, 0x4626b750, 0x00080846, 0x00000000, - 0x4cc673a0, 0x0020044a, 0x00000000, 0xde5b3431, 0x0004044e, 0x00000000, + 0xe24f806d, 0x00040400, 0x00000000, 0xf6c28182, 0x00040404, 0x00000000, 0xa6d12629, 0x00040408, + 0x00000000, 0x6f6e55a5, 0x0004040c, 0x00000000, 0x0bc65da4, 0x00040410, 0x00000000, 0x9e5ad592, + 0x00040414, 0x00000000, 0xbb513b98, 0x00040418, 0x00000000, 0xab64b23b, 0x0004041c, 0x00000000, + 0x53c39964, 0x00040420, 0x00000000, 0x01396b11, 0x00040424, 0x00000000, 0xb994ad29, 0x00040428, + 0x00000000, 0x7d42019a, 0x0004042c, 0x00000000, 0x3548f523, 0x00040430, 0x00000000, 0xf43ad28a, + 0x00040434, 0x00000000, 0x6de4c312, 0x00040438, 0x00000000, 0x26ae2080, 0x0004043c, 0x00000000, + 0x00a77ae0, 0x00040440, 0x00000000, 0x00a779b7, 0x00040444, 0x00000000, 0x5100100c, 0x00040448, + 0x00000000, 0x59958bba, 0x0004044c, 0x00000000, 0x0c06f17c, 0x00040450, 0x00000000, 0x9e0feb34, + 0x00040454, 0x00000000, 0x6f104b72, 0x00040458, 0x00000000, 0x25c70d9c, 0x0004045c, 0x00000000, + 0x3881201e, 0x00040460, 0x00000000, 0x381c673c, 0x00040464, 0x00000000, 0x09afddaf, 0x00040468, + 0x00000000, 0x367d63cf, 0x0004046c, 0x00000000, 0x43707db8, 0x00040470, 0x00000000, 0xf6ae26ba, + 0x00040474, 0x00000000, 0x1b917652, 0x00040478, 0x00000000, 0x94b1e4f7, 0x0004047c, 0x00000000, + 0xe3661b6c, 0x00040480, 0x00000000, 0x1eb8d73a, 0x00040484, 0x00000000, 0x15051fa3, 0x00040488, + 0x00000000, 0x9c51a7f1, 0x0004048c, 0x00000000, 0xa20efc70, 0x00040490, 0x00000000, 0x0ec09f6e, + 0x00040494, 0x00000000, 0x34a7d6d3, 0x00040498, 0x00000000, 0xce831b94, 0x0004049c, 0x00000000, + 0x5cc72a74, 0x000404a0, 0x00000000, 0x3b77713c, 0x000404a4, 0x00000000, 0x40f64410, 0x000404a8, + 0x00000000, 0x69441268, 0x000404ac, 0x00000000, 0x2e418b83, 0x000404b0, 0x00000000, 0xa00d0c8d, + 0x000404b4, 0x00000000, 0xb1289fb3, 0x000404b8, 0x00000000, 0x144832fb, 0x000404bc, 0x00000000, + 0xa14657c5, 0x000404c0, 0x00000000, 0x9890d9fa, 0x000404c4, 0x00000000, 0x9016faf1, 0x000404c8, + 0x00000000, 0x4b73ce27, 0x000404cc, 0x00000000, 0x5f5a3e7b, 0x000404d0, 0x00000000, 0xd4af3a51, + 0x000404d4, 0x00000000, 0x6cf4f543, 0x000404d8, 0x00000000, 0x5fb86ccb, 0x000404dc, 0x00000000, + 0xedefa188, 0x000404e0, 0x00000000, 0xd0de9ee6, 0x000404e4, 0x00000000, 0xc5831803, 0x000404e8, + 0x00000000, 0x8e6de84b, 0x000404ec, 0x00000000, 0xd0771662, 0x000408f0, 0x00000000, 0x569f7444, + 0x004004f4, 0x00000000, 0x5c6637cd, 0x000408f8, 0x00000000, 0xcae3e690, 0x000408fc, 0x00000000, + 0x43fbd769, 0x00041100, 0x00000000, 0xef550356, 0x00200504, 0x00000000, 0x8f52e279, 0x00040908, + 0x00000000, 0x1f2d8149, 0x0010090c, 0x00000000, 0x853d0614, 0x00040510, 0x00000000, 0x4413c6f9, + 0x00040914, 0x00000000, 0x67096014, 0x00044518, 0x00000000, 0x88f5e915, 0x0004091c, 0x00000000, + 0x033f1eff, 0x00040920, 0x00000000, 0x918106bb, 0x00040924, 0x00000000, 0x95f0e7ac, 0x00041128, + 0x00000000, 0xb48cbab2, 0x0004092c, 0x00000000, 0x05bb3bc6, 0x00040930, 0x00000000, 0x94faba07, + 0x00040934, 0x00000000, 0x38e92c91, 0x00204138, 0x00000000, 0x0b177b43, 0x0004093c, 0x00000000, + 0x48531062, 0x00800540, 0x00000000, 0xaaa964b9, 0x00181144, 0x00000000, 0x7690af6f, 0x00402948, + 0x00000000, 0x078d7060, 0x0004094c, 0x00000000, 0x5d6e3ec7, 0x00040401, 0x00000000, 0x57e7079a, + 0x00040405, 0x00000000, 0x7467fafd, 0x00040409, 0x00000000, 0x9e826b50, 0x0004040d, 0x00000000, + 0xf899653a, 0x00040411, 0x00000000, 0xdc484f18, 0x00040415, 0x00000000, 0xf9754e16, 0x00040419, + 0x00000000, 0xf8e274f5, 0x0004041d, 0x00000000, 0x5da8bca3, 0x00040421, 0x00000000, 0x5ca726d8, + 0x00040425, 0x00000000, 0x5dd28360, 0x00040429, 0x00000000, 0x57efa0be, 0x0004042d, 0x00000000, + 0x502363d5, 0x00040431, 0x00000000, 0x506d14bd, 0x00040435, 0x00000000, 0xb2609506, 0x00100439, + 0x00000000, 0x9e5cfb8a, 0x00040c3d, 0x00000000, 0xc918df3e, 0x00040841, 0x00000000, 0xc9751c9c, + 0x00040845, 0x00000000, 0xc97ef77a, 0x00040849, 0x00000000, 0xc927c6b9, 0x0004084d, 0x00000000, + 0xc92a1ec5, 0x00040851, 0x00000000, 0xc9e01b31, 0x00040855, 0x00000000, 0x50685f29, 0x00040459, + 0x00000000, 0xb26219ca, 0x0010045d, 0x00000000, 0xb25b6cf9, 0x00100461, 0x00000000, 0xb2f86101, + 0x00100465, 0x00000000, 0x07e3b155, 0x00040869, 0x00000000, 0x07e383c6, 0x0004086d, 0x00000000, + 0xbda98653, 0x00400471, 0x00000000, 0xbdbd1d0f, 0x00800475, 0x00000000, 0xbd946fd4, 0x00800479, + 0x00000000, 0xbdf02a4c, 0x0080047d, 0x00000000, 0x19e93e85, 0x00040402, 0x00000000, 0x3b5c2af3, + 0x00040406, 0x00000000, 0x47974a35, 0x0004040a, 0x00000000, 0x105971c2, 0x0004040e, 0x00000000, + 0x7d137765, 0x00040412, 0x00000000, 0xd187febc, 0x00040416, 0x00000000, 0x12f854ac, 0x0004041a, + 0x00000000, 0x40d49ad1, 0x0004041e, 0x00000000, 0xe3a37123, 0x00040422, 0x00000000, 0x8c0923da, + 0x00040426, 0x00000000, 0xbb8df494, 0x0004042a, 0x00000000, 0xf6d8a76e, 0x0004042e, 0x00000000, + 0x7620f1e9, 0x00040432, 0x00000000, 0x9ebfab10, 0x00040436, 0x00000000, 0x98a09d0e, 0x0004083a, + 0x00000000, 0x195d37d2, 0x0010083e, 0x00000000, 0xf9ec4f85, 0x00101042, 0x00000000, 0x4626b750, + 0x00080846, 0x00000000, 0x4cc673a0, 0x0020044a, 0x00000000, 0xde5b3431, 0x0004044e, 0x00000000, 0x036ac8a6, 0x000c0452, 0x00000000, }; static CompactRegisterDefaults g_agc_public_reg_defaults_v11 = { - g_agc_public_reg_defaults_v11_tbl0_regs, 488, g_agc_public_reg_defaults_v11_tbl0_ptrs, 84, - g_agc_public_reg_defaults_v11_tbl1_regs, 162, g_agc_public_reg_defaults_v11_tbl1_ptrs, 32, - g_agc_public_reg_defaults_v11_tbl2_regs, 56, g_agc_public_reg_defaults_v11_tbl2_ptrs, 21, - nullptr, 0, nullptr, 0, - g_agc_public_reg_defaults_v11_types, 137, + g_agc_public_reg_defaults_v11_tbl0_regs, + 488, + g_agc_public_reg_defaults_v11_tbl0_ptrs, + 84, + g_agc_public_reg_defaults_v11_tbl1_regs, + 162, + g_agc_public_reg_defaults_v11_tbl1_ptrs, + 32, + g_agc_public_reg_defaults_v11_tbl2_regs, + 56, + g_agc_public_reg_defaults_v11_tbl2_ptrs, + 21, + nullptr, + 0, + nullptr, + 0, + g_agc_public_reg_defaults_v11_types, + 137, }; // g_agc_public_reg_defaults_v4: regs=(488, 158, 43, 0), ptrs=(80, 28, 42, 0), types=150. @@ -1489,9 +1567,9 @@ static ShaderRegister g_agc_public_reg_defaults_v4_tbl1_regs[] = { }; static const uint16_t g_agc_public_reg_defaults_v4_tbl1_ptrs[] = { - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000a, 0x000b, - 0x000f, 0x0012, 0x0014, 0x0016, 0x0018, 0x001a, 0x001c, 0x001e, 0x0022, 0x0026, 0x002a, 0x002c, - 0x002e, 0x003e, 0x005e, 0x007e, + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, + 0x000a, 0x000b, 0x000f, 0x0012, 0x0014, 0x0016, 0x0018, 0x001a, 0x001c, 0x001e, + 0x0022, 0x0026, 0x002a, 0x002c, 0x002e, 0x003e, 0x005e, 0x007e, }; static ShaderRegister g_agc_public_reg_defaults_v4_tbl2_regs[] = { @@ -1509,96 +1587,91 @@ static ShaderRegister g_agc_public_reg_defaults_v4_tbl2_regs[] = { }; static const uint16_t g_agc_public_reg_defaults_v4_tbl2_ptrs[] = { - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000a, 0x000b, - 0x000c, 0x000d, 0x000e, 0x000f, 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, - 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, 0x0020, 0x0021, 0x0022, 0x0023, - 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000a, + 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, + 0x0016, 0x0017, 0x0018, 0x0019, 0x001a, 0x001b, 0x001c, 0x001d, 0x001e, 0x001f, 0x0020, + 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, }; static uint32_t g_agc_public_reg_defaults_v4_types[] = { - 0xe24f806d, 0x00040400, 0x00000000, 0xf6c28182, 0x00040404, 0x00000000, - 0x6f6e55a5, 0x00040408, 0x00000000, 0x0bc65da4, 0x0004040c, 0x00000000, - 0x9e5ad592, 0x00040410, 0x00000000, 0xbb513b98, 0x00040414, 0x00000000, - 0xab64b23b, 0x00040418, 0x00000000, 0xac198e0b, 0x0004041c, 0x00000000, - 0x53c39964, 0x00040420, 0x00000000, 0x01396b11, 0x00040424, 0x00000000, - 0x7d42019a, 0x00040428, 0x00000000, 0x3548f523, 0x0004042c, 0x00000000, - 0xf43ad28a, 0x00040430, 0x00000000, 0x6de4c312, 0x00040434, 0x00000000, - 0x00a77ae0, 0x00040438, 0x00000000, 0x00a779b7, 0x0004043c, 0x00000000, - 0x5100100c, 0x00040440, 0x00000000, 0x59958bba, 0x00040444, 0x00000000, - 0x7f7bd53e, 0x00040448, 0x00000000, 0x0c06f17c, 0x0004044c, 0x00000000, - 0x6f104b72, 0x00040450, 0x00000000, 0x25c70d9c, 0x00040454, 0x00000000, - 0x3881201e, 0x00040458, 0x00000000, 0x09afddaf, 0x0004045c, 0x00000000, - 0x367d63cf, 0x00040460, 0x00000000, 0x43707db8, 0x00040464, 0x00000000, - 0xf6ae26ba, 0x00040468, 0x00000000, 0x1b917652, 0x0004046c, 0x00000000, - 0x2cac726e, 0x00040470, 0x00000000, 0x2cac7111, 0x00040474, 0x00000000, - 0x94b1e4f7, 0x00040478, 0x00000000, 0xe3661b6c, 0x0004047c, 0x00000000, - 0x1eb8d73a, 0x00040480, 0x00000000, 0x15051fa3, 0x00040484, 0x00000000, - 0x9c51a7f1, 0x00040488, 0x00000000, 0xa20efc70, 0x0004048c, 0x00000000, - 0x0ec09f6e, 0x00040490, 0x00000000, 0x34a7d6d3, 0x00040494, 0x00000000, - 0xce831b94, 0x00040498, 0x00000000, 0x5cc72a74, 0x0004049c, 0x00000000, - 0x3b77713c, 0x000404a0, 0x00000000, 0x40f64410, 0x000404a4, 0x00000000, - 0x69441268, 0x000404a8, 0x00000000, 0x2e418b83, 0x000404ac, 0x00000000, - 0xa00d0c8d, 0x000404b0, 0x00000000, 0xb1289fb3, 0x000404b4, 0x00000000, - 0x144832fb, 0x000404b8, 0x00000000, 0x9890d9fa, 0x000404bc, 0x00000000, - 0x9016faf1, 0x000404c0, 0x00000000, 0x4b73ce27, 0x000404c4, 0x00000000, - 0x5f5a3e7b, 0x000404c8, 0x00000000, 0xd4af3a51, 0x000404cc, 0x00000000, - 0x6cf4f543, 0x000404d0, 0x00000000, 0x5fb86ccb, 0x000404d4, 0x00000000, - 0xedefa188, 0x000404d8, 0x00000000, 0xd0de9ee6, 0x000404dc, 0x00000000, - 0xc5831803, 0x000404e0, 0x00000000, 0x8e6de84b, 0x000404e4, 0x00000000, - 0xd0771662, 0x000408e8, 0x00000000, 0x569f7444, 0x004004ec, 0x00000000, - 0x5c6637cd, 0x000408f0, 0x00000000, 0xcae3e690, 0x000408f4, 0x00000000, - 0x43fbd769, 0x000410f8, 0x00000000, 0xef550356, 0x002004fc, 0x00000000, - 0x8f52e279, 0x00040900, 0x00000000, 0x1f2d8149, 0x00100904, 0x00000000, - 0x4413c6f9, 0x00040908, 0x00000000, 0x67096014, 0x0004390c, 0x00000000, - 0x88f5e915, 0x00040910, 0x00000000, 0x918106bb, 0x00040914, 0x00000000, - 0x95f0e7ac, 0x00041118, 0x00000000, 0xb48cbab2, 0x0004091c, 0x00000000, - 0x05bb3bc6, 0x00040920, 0x00000000, 0x94faba07, 0x00040924, 0x00000000, - 0x38e92c91, 0x00204128, 0x00000000, 0x0b177b43, 0x0004092c, 0x00000000, - 0x48531062, 0x00800530, 0x00000000, 0xaaa964b9, 0x00201134, 0x00000000, - 0x7690af6f, 0x00402938, 0x00000000, 0x078d7060, 0x0004093c, 0x00000000, - 0x5d6e3ec7, 0x00040401, 0x00000000, 0x57e7079a, 0x00040405, 0x00000000, - 0x7467fafd, 0x00040409, 0x00000000, 0x9e826b50, 0x0004040d, 0x00000000, - 0xdc484f18, 0x00040411, 0x00000000, 0x5da8bca3, 0x00040415, 0x00000000, - 0x5ca726d8, 0x00040419, 0x00000000, 0x5dd28360, 0x0004041d, 0x00000000, - 0x57efa0be, 0x00040421, 0x00000000, 0x502363d5, 0x00040425, 0x00000000, - 0x506d14bd, 0x00040429, 0x00000000, 0xb2609506, 0x0010042d, 0x00000000, - 0x9e5cfb8a, 0x00040c31, 0x00000000, 0xc918df3e, 0x00040835, 0x00000000, - 0xc9751c9c, 0x00040839, 0x00000000, 0xc97ef77a, 0x0004083d, 0x00000000, - 0xc927c6b9, 0x00040841, 0x00000000, 0xc92a1ec5, 0x00040845, 0x00000000, - 0xc9e01b31, 0x00040849, 0x00000000, 0xb26219ca, 0x0010044d, 0x00000000, - 0xb25b6cf9, 0x00100451, 0x00000000, 0xb2f86101, 0x00100455, 0x00000000, - 0x07e3b155, 0x00040859, 0x00000000, 0x07e383c6, 0x0004085d, 0x00000000, - 0xbda98653, 0x00400461, 0x00000000, 0xbdbd1d0f, 0x00800465, 0x00000000, - 0xbd946fd4, 0x00800469, 0x00000000, 0xbdf02a4c, 0x0080046d, 0x00000000, - 0x19e93e85, 0x00040402, 0x00000000, 0x3b5c2af3, 0x00040406, 0x00000000, - 0x47974a35, 0x0004040a, 0x00000000, 0x105971c2, 0x0004040e, 0x00000000, - 0x7d137765, 0x00040412, 0x00000000, 0xd187febc, 0x00040416, 0x00000000, - 0x12f854ac, 0x0004041a, 0x00000000, 0x40d49ad1, 0x0004041e, 0x00000000, - 0x8c0923da, 0x00040422, 0x00000000, 0xf6be6f25, 0x00040426, 0x00000000, - 0xf6908bad, 0x0004042a, 0x00000000, 0x862ee1be, 0x0004042e, 0x00000000, - 0x8631d396, 0x00040432, 0x00000000, 0x89d7d386, 0x00040436, 0x00000000, - 0xd1006f62, 0x0004043a, 0x00000000, 0x7e51d354, 0x0004043e, 0x00000000, - 0x7e712edc, 0x00040442, 0x00000000, 0x141f6002, 0x00040446, 0x00000000, - 0x140c761a, 0x0004044a, 0x00000000, 0x14f68dfa, 0x0004044e, 0x00000000, - 0x6fea32c3, 0x00040452, 0x00000000, 0x8f378499, 0x00040456, 0x00000000, - 0x5d9ed616, 0x0004045a, 0x00000000, 0x2bbfa784, 0x0004045e, 0x00000000, - 0x2b45f28c, 0x00040462, 0x00000000, 0x5f4aaed9, 0x00040466, 0x00000000, - 0x5f477465, 0x0004046a, 0x00000000, 0x5ec84729, 0x0004046e, 0x00000000, - 0x48ca8407, 0x00040472, 0x00000000, 0x5f355d79, 0x00040476, 0x00000000, - 0x5f0f3449, 0x0004047a, 0x00000000, 0xee4a4919, 0x0004047e, 0x00000000, - 0xee49852d, 0x00040482, 0x00000000, 0xee4f8201, 0x00040486, 0x00000000, - 0x8a3f99a1, 0x0004048a, 0x00000000, 0x381fc91f, 0x0004048e, 0x00000000, - 0x19d8287b, 0x00040492, 0x00000000, 0xbb8df494, 0x00040496, 0x00000000, - 0xf6d8a76e, 0x0004049a, 0x00000000, 0x7620f1e9, 0x0004049e, 0x00000000, - 0x9ebfab10, 0x000404a2, 0x00000000, 0x98a09d0e, 0x000408a6, 0x00000000, + 0xe24f806d, 0x00040400, 0x00000000, 0xf6c28182, 0x00040404, 0x00000000, 0x6f6e55a5, 0x00040408, + 0x00000000, 0x0bc65da4, 0x0004040c, 0x00000000, 0x9e5ad592, 0x00040410, 0x00000000, 0xbb513b98, + 0x00040414, 0x00000000, 0xab64b23b, 0x00040418, 0x00000000, 0xac198e0b, 0x0004041c, 0x00000000, + 0x53c39964, 0x00040420, 0x00000000, 0x01396b11, 0x00040424, 0x00000000, 0x7d42019a, 0x00040428, + 0x00000000, 0x3548f523, 0x0004042c, 0x00000000, 0xf43ad28a, 0x00040430, 0x00000000, 0x6de4c312, + 0x00040434, 0x00000000, 0x00a77ae0, 0x00040438, 0x00000000, 0x00a779b7, 0x0004043c, 0x00000000, + 0x5100100c, 0x00040440, 0x00000000, 0x59958bba, 0x00040444, 0x00000000, 0x7f7bd53e, 0x00040448, + 0x00000000, 0x0c06f17c, 0x0004044c, 0x00000000, 0x6f104b72, 0x00040450, 0x00000000, 0x25c70d9c, + 0x00040454, 0x00000000, 0x3881201e, 0x00040458, 0x00000000, 0x09afddaf, 0x0004045c, 0x00000000, + 0x367d63cf, 0x00040460, 0x00000000, 0x43707db8, 0x00040464, 0x00000000, 0xf6ae26ba, 0x00040468, + 0x00000000, 0x1b917652, 0x0004046c, 0x00000000, 0x2cac726e, 0x00040470, 0x00000000, 0x2cac7111, + 0x00040474, 0x00000000, 0x94b1e4f7, 0x00040478, 0x00000000, 0xe3661b6c, 0x0004047c, 0x00000000, + 0x1eb8d73a, 0x00040480, 0x00000000, 0x15051fa3, 0x00040484, 0x00000000, 0x9c51a7f1, 0x00040488, + 0x00000000, 0xa20efc70, 0x0004048c, 0x00000000, 0x0ec09f6e, 0x00040490, 0x00000000, 0x34a7d6d3, + 0x00040494, 0x00000000, 0xce831b94, 0x00040498, 0x00000000, 0x5cc72a74, 0x0004049c, 0x00000000, + 0x3b77713c, 0x000404a0, 0x00000000, 0x40f64410, 0x000404a4, 0x00000000, 0x69441268, 0x000404a8, + 0x00000000, 0x2e418b83, 0x000404ac, 0x00000000, 0xa00d0c8d, 0x000404b0, 0x00000000, 0xb1289fb3, + 0x000404b4, 0x00000000, 0x144832fb, 0x000404b8, 0x00000000, 0x9890d9fa, 0x000404bc, 0x00000000, + 0x9016faf1, 0x000404c0, 0x00000000, 0x4b73ce27, 0x000404c4, 0x00000000, 0x5f5a3e7b, 0x000404c8, + 0x00000000, 0xd4af3a51, 0x000404cc, 0x00000000, 0x6cf4f543, 0x000404d0, 0x00000000, 0x5fb86ccb, + 0x000404d4, 0x00000000, 0xedefa188, 0x000404d8, 0x00000000, 0xd0de9ee6, 0x000404dc, 0x00000000, + 0xc5831803, 0x000404e0, 0x00000000, 0x8e6de84b, 0x000404e4, 0x00000000, 0xd0771662, 0x000408e8, + 0x00000000, 0x569f7444, 0x004004ec, 0x00000000, 0x5c6637cd, 0x000408f0, 0x00000000, 0xcae3e690, + 0x000408f4, 0x00000000, 0x43fbd769, 0x000410f8, 0x00000000, 0xef550356, 0x002004fc, 0x00000000, + 0x8f52e279, 0x00040900, 0x00000000, 0x1f2d8149, 0x00100904, 0x00000000, 0x4413c6f9, 0x00040908, + 0x00000000, 0x67096014, 0x0004390c, 0x00000000, 0x88f5e915, 0x00040910, 0x00000000, 0x918106bb, + 0x00040914, 0x00000000, 0x95f0e7ac, 0x00041118, 0x00000000, 0xb48cbab2, 0x0004091c, 0x00000000, + 0x05bb3bc6, 0x00040920, 0x00000000, 0x94faba07, 0x00040924, 0x00000000, 0x38e92c91, 0x00204128, + 0x00000000, 0x0b177b43, 0x0004092c, 0x00000000, 0x48531062, 0x00800530, 0x00000000, 0xaaa964b9, + 0x00201134, 0x00000000, 0x7690af6f, 0x00402938, 0x00000000, 0x078d7060, 0x0004093c, 0x00000000, + 0x5d6e3ec7, 0x00040401, 0x00000000, 0x57e7079a, 0x00040405, 0x00000000, 0x7467fafd, 0x00040409, + 0x00000000, 0x9e826b50, 0x0004040d, 0x00000000, 0xdc484f18, 0x00040411, 0x00000000, 0x5da8bca3, + 0x00040415, 0x00000000, 0x5ca726d8, 0x00040419, 0x00000000, 0x5dd28360, 0x0004041d, 0x00000000, + 0x57efa0be, 0x00040421, 0x00000000, 0x502363d5, 0x00040425, 0x00000000, 0x506d14bd, 0x00040429, + 0x00000000, 0xb2609506, 0x0010042d, 0x00000000, 0x9e5cfb8a, 0x00040c31, 0x00000000, 0xc918df3e, + 0x00040835, 0x00000000, 0xc9751c9c, 0x00040839, 0x00000000, 0xc97ef77a, 0x0004083d, 0x00000000, + 0xc927c6b9, 0x00040841, 0x00000000, 0xc92a1ec5, 0x00040845, 0x00000000, 0xc9e01b31, 0x00040849, + 0x00000000, 0xb26219ca, 0x0010044d, 0x00000000, 0xb25b6cf9, 0x00100451, 0x00000000, 0xb2f86101, + 0x00100455, 0x00000000, 0x07e3b155, 0x00040859, 0x00000000, 0x07e383c6, 0x0004085d, 0x00000000, + 0xbda98653, 0x00400461, 0x00000000, 0xbdbd1d0f, 0x00800465, 0x00000000, 0xbd946fd4, 0x00800469, + 0x00000000, 0xbdf02a4c, 0x0080046d, 0x00000000, 0x19e93e85, 0x00040402, 0x00000000, 0x3b5c2af3, + 0x00040406, 0x00000000, 0x47974a35, 0x0004040a, 0x00000000, 0x105971c2, 0x0004040e, 0x00000000, + 0x7d137765, 0x00040412, 0x00000000, 0xd187febc, 0x00040416, 0x00000000, 0x12f854ac, 0x0004041a, + 0x00000000, 0x40d49ad1, 0x0004041e, 0x00000000, 0x8c0923da, 0x00040422, 0x00000000, 0xf6be6f25, + 0x00040426, 0x00000000, 0xf6908bad, 0x0004042a, 0x00000000, 0x862ee1be, 0x0004042e, 0x00000000, + 0x8631d396, 0x00040432, 0x00000000, 0x89d7d386, 0x00040436, 0x00000000, 0xd1006f62, 0x0004043a, + 0x00000000, 0x7e51d354, 0x0004043e, 0x00000000, 0x7e712edc, 0x00040442, 0x00000000, 0x141f6002, + 0x00040446, 0x00000000, 0x140c761a, 0x0004044a, 0x00000000, 0x14f68dfa, 0x0004044e, 0x00000000, + 0x6fea32c3, 0x00040452, 0x00000000, 0x8f378499, 0x00040456, 0x00000000, 0x5d9ed616, 0x0004045a, + 0x00000000, 0x2bbfa784, 0x0004045e, 0x00000000, 0x2b45f28c, 0x00040462, 0x00000000, 0x5f4aaed9, + 0x00040466, 0x00000000, 0x5f477465, 0x0004046a, 0x00000000, 0x5ec84729, 0x0004046e, 0x00000000, + 0x48ca8407, 0x00040472, 0x00000000, 0x5f355d79, 0x00040476, 0x00000000, 0x5f0f3449, 0x0004047a, + 0x00000000, 0xee4a4919, 0x0004047e, 0x00000000, 0xee49852d, 0x00040482, 0x00000000, 0xee4f8201, + 0x00040486, 0x00000000, 0x8a3f99a1, 0x0004048a, 0x00000000, 0x381fc91f, 0x0004048e, 0x00000000, + 0x19d8287b, 0x00040492, 0x00000000, 0xbb8df494, 0x00040496, 0x00000000, 0xf6d8a76e, 0x0004049a, + 0x00000000, 0x7620f1e9, 0x0004049e, 0x00000000, 0x9ebfab10, 0x000404a2, 0x00000000, 0x98a09d0e, + 0x000408a6, 0x00000000, }; static CompactRegisterDefaults g_agc_public_reg_defaults_v4 = { - g_agc_public_reg_defaults_v4_tbl0_regs, 488, g_agc_public_reg_defaults_v4_tbl0_ptrs, 80, - g_agc_public_reg_defaults_v4_tbl1_regs, 158, g_agc_public_reg_defaults_v4_tbl1_ptrs, 28, - g_agc_public_reg_defaults_v4_tbl2_regs, 43, g_agc_public_reg_defaults_v4_tbl2_ptrs, 42, - nullptr, 0, nullptr, 0, - g_agc_public_reg_defaults_v4_types, 150, + g_agc_public_reg_defaults_v4_tbl0_regs, + 488, + g_agc_public_reg_defaults_v4_tbl0_ptrs, + 80, + g_agc_public_reg_defaults_v4_tbl1_regs, + 158, + g_agc_public_reg_defaults_v4_tbl1_ptrs, + 28, + g_agc_public_reg_defaults_v4_tbl2_regs, + 43, + g_agc_public_reg_defaults_v4_tbl2_ptrs, + 42, + nullptr, + 0, + nullptr, + 0, + g_agc_public_reg_defaults_v4_types, + 150, }; // g_agc_public_reg_defaults_v5: regs=(491, 159, 75, 0), ptrs=(80, 29, 47, 0), types=156. @@ -1782,9 +1855,9 @@ static ShaderRegister g_agc_public_reg_defaults_v5_tbl1_regs[] = { }; static const uint16_t g_agc_public_reg_defaults_v5_tbl1_ptrs[] = { - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000a, 0x000b, - 0x000f, 0x0012, 0x0014, 0x0016, 0x0018, 0x001a, 0x001c, 0x001e, 0x001f, 0x0023, 0x0027, 0x002b, - 0x002d, 0x002f, 0x003f, 0x005f, 0x007f, + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, + 0x000a, 0x000b, 0x000f, 0x0012, 0x0014, 0x0016, 0x0018, 0x001a, 0x001c, 0x001e, + 0x001f, 0x0023, 0x0027, 0x002b, 0x002d, 0x002f, 0x003f, 0x005f, 0x007f, }; static ShaderRegister g_agc_public_reg_defaults_v5_tbl2_regs[] = { @@ -1817,92 +1890,86 @@ static const uint16_t g_agc_public_reg_defaults_v5_tbl2_ptrs[] = { }; static uint32_t g_agc_public_reg_defaults_v5_types[] = { - 0xe24f806d, 0x00040400, 0x00000000, 0xf6c28182, 0x00040404, 0x00000000, - 0x6f6e55a5, 0x00040408, 0x00000000, 0x0bc65da4, 0x0004040c, 0x00000000, - 0x9e5ad592, 0x00040410, 0x00000000, 0xbb513b98, 0x00040414, 0x00000000, - 0xab64b23b, 0x00040418, 0x00000000, 0x53c39964, 0x0004041c, 0x00000000, - 0x01396b11, 0x00040420, 0x00000000, 0x7d42019a, 0x00040424, 0x00000000, - 0x3548f523, 0x00040428, 0x00000000, 0xf43ad28a, 0x0004042c, 0x00000000, - 0x6de4c312, 0x00040430, 0x00000000, 0x00a77ae0, 0x00040434, 0x00000000, - 0x00a779b7, 0x00040438, 0x00000000, 0x5100100c, 0x0004043c, 0x00000000, - 0x59958bba, 0x00040440, 0x00000000, 0x0c06f17c, 0x00040444, 0x00000000, - 0x6f104b72, 0x00040448, 0x00000000, 0x25c70d9c, 0x0004044c, 0x00000000, - 0x3881201e, 0x00040450, 0x00000000, 0x09afddaf, 0x00040454, 0x00000000, - 0x367d63cf, 0x00040458, 0x00000000, 0x43707db8, 0x0004045c, 0x00000000, - 0xf6ae26ba, 0x00040460, 0x00000000, 0x1b917652, 0x00040464, 0x00000000, - 0x2cac726e, 0x00040468, 0x00000000, 0x2cac7111, 0x0004046c, 0x00000000, - 0x94b1e4f7, 0x00040470, 0x00000000, 0xe3661b6c, 0x00040474, 0x00000000, - 0x1eb8d73a, 0x00040478, 0x00000000, 0x15051fa3, 0x0004047c, 0x00000000, - 0x9c51a7f1, 0x00040480, 0x00000000, 0xa20efc70, 0x00040484, 0x00000000, - 0x0ec09f6e, 0x00040488, 0x00000000, 0x34a7d6d3, 0x0004048c, 0x00000000, - 0xce831b94, 0x00040490, 0x00000000, 0x5cc72a74, 0x00040494, 0x00000000, - 0x3b77713c, 0x00040498, 0x00000000, 0x40f64410, 0x0004049c, 0x00000000, - 0x69441268, 0x000404a0, 0x00000000, 0x2e418b83, 0x000404a4, 0x00000000, - 0xa00d0c8d, 0x000404a8, 0x00000000, 0xb1289fb3, 0x000404ac, 0x00000000, - 0x144832fb, 0x000404b0, 0x00000000, 0x9890d9fa, 0x000404b4, 0x00000000, - 0x9016faf1, 0x000404b8, 0x00000000, 0x4b73ce27, 0x000404bc, 0x00000000, - 0x5f5a3e7b, 0x000404c0, 0x00000000, 0xd4af3a51, 0x000404c4, 0x00000000, - 0x6cf4f543, 0x000404c8, 0x00000000, 0x5fb86ccb, 0x000404cc, 0x00000000, - 0xedefa188, 0x000404d0, 0x00000000, 0xd0de9ee6, 0x000404d4, 0x00000000, - 0xc5831803, 0x000404d8, 0x00000000, 0x8e6de84b, 0x000404dc, 0x00000000, - 0xd0771662, 0x000408e0, 0x00000000, 0x569f7444, 0x004004e4, 0x00000000, - 0x5c6637cd, 0x000408e8, 0x00000000, 0xcae3e690, 0x000408ec, 0x00000000, - 0x43fbd769, 0x000410f0, 0x00000000, 0xef550356, 0x002004f4, 0x00000000, - 0x8f52e279, 0x000408f8, 0x00000000, 0x1f2d8149, 0x001008fc, 0x00000000, - 0x853d0614, 0x00040500, 0x00000000, 0x4413c6f9, 0x00040904, 0x00000000, - 0x67096014, 0x00044108, 0x00000000, 0x88f5e915, 0x0004090c, 0x00000000, - 0x033f1eff, 0x00040910, 0x00000000, 0x918106bb, 0x00040914, 0x00000000, - 0x95f0e7ac, 0x00041118, 0x00000000, 0xb48cbab2, 0x0004091c, 0x00000000, - 0x05bb3bc6, 0x00040920, 0x00000000, 0x94faba07, 0x00040924, 0x00000000, - 0x38e92c91, 0x00204128, 0x00000000, 0x0b177b43, 0x0004092c, 0x00000000, - 0x48531062, 0x00800530, 0x00000000, 0xaaa964b9, 0x00201134, 0x00000000, - 0x7690af6f, 0x00402938, 0x00000000, 0x078d7060, 0x0004093c, 0x00000000, - 0x5d6e3ec7, 0x00040401, 0x00000000, 0x57e7079a, 0x00040405, 0x00000000, - 0x7467fafd, 0x00040409, 0x00000000, 0x9e826b50, 0x0004040d, 0x00000000, - 0xdc484f18, 0x00040411, 0x00000000, 0x5da8bca3, 0x00040415, 0x00000000, - 0x5ca726d8, 0x00040419, 0x00000000, 0x5dd28360, 0x0004041d, 0x00000000, - 0x57efa0be, 0x00040421, 0x00000000, 0x502363d5, 0x00040425, 0x00000000, - 0x506d14bd, 0x00040429, 0x00000000, 0xb2609506, 0x0010042d, 0x00000000, - 0x9e5cfb8a, 0x00040c31, 0x00000000, 0xc918df3e, 0x00040835, 0x00000000, - 0xc9751c9c, 0x00040839, 0x00000000, 0xc97ef77a, 0x0004083d, 0x00000000, - 0xc927c6b9, 0x00040841, 0x00000000, 0xc92a1ec5, 0x00040845, 0x00000000, - 0xc9e01b31, 0x00040849, 0x00000000, 0x50685f29, 0x0004044d, 0x00000000, - 0xb26219ca, 0x00100451, 0x00000000, 0xb25b6cf9, 0x00100455, 0x00000000, - 0xb2f86101, 0x00100459, 0x00000000, 0x07e3b155, 0x0004085d, 0x00000000, - 0x07e383c6, 0x00040861, 0x00000000, 0xbda98653, 0x00400465, 0x00000000, - 0xbdbd1d0f, 0x00800469, 0x00000000, 0xbd946fd4, 0x0080046d, 0x00000000, - 0xbdf02a4c, 0x00800471, 0x00000000, 0x19e93e85, 0x00040402, 0x00000000, - 0x3b5c2af3, 0x00040406, 0x00000000, 0x47974a35, 0x0004040a, 0x00000000, - 0x105971c2, 0x0004040e, 0x00000000, 0x7d137765, 0x00040412, 0x00000000, - 0xd187febc, 0x00040416, 0x00000000, 0x12f854ac, 0x0004041a, 0x00000000, - 0x40d49ad1, 0x0004041e, 0x00000000, 0x8c0923da, 0x00040422, 0x00000000, - 0xf6be6f25, 0x00040426, 0x00000000, 0xf6908bad, 0x0004042a, 0x00000000, - 0x862ee1be, 0x0004042e, 0x00000000, 0x8631d396, 0x00040432, 0x00000000, - 0x89d7d386, 0x00040436, 0x00000000, 0xd1006f62, 0x0004043a, 0x00000000, - 0x7e51d354, 0x0004043e, 0x00000000, 0x7e712edc, 0x00040442, 0x00000000, - 0x141f6002, 0x00040446, 0x00000000, 0x140c761a, 0x0004044a, 0x00000000, - 0x14f68dfa, 0x0004044e, 0x00000000, 0x6fea32c3, 0x00040452, 0x00000000, - 0x8f378499, 0x00040456, 0x00000000, 0x5d9ed616, 0x0004045a, 0x00000000, - 0x2bbfa784, 0x0004045e, 0x00000000, 0x2b45f28c, 0x00040462, 0x00000000, - 0x5f4aaed9, 0x00040466, 0x00000000, 0x5f477465, 0x0004046a, 0x00000000, - 0x5ec84729, 0x0004046e, 0x00000000, 0x48ca8407, 0x00040472, 0x00000000, - 0x5f355d79, 0x00040476, 0x00000000, 0x5f0f3449, 0x0004047a, 0x00000000, - 0xee4a4919, 0x0004047e, 0x00000000, 0xee49852d, 0x00040482, 0x00000000, - 0xee4f8201, 0x00040486, 0x00000000, 0x8a3f99a1, 0x0004048a, 0x00000000, - 0x381fc91f, 0x0004048e, 0x00000000, 0x19d8287b, 0x00040492, 0x00000000, - 0xbb8df494, 0x00040496, 0x00000000, 0xf6d8a76e, 0x0004049a, 0x00000000, - 0x7620f1e9, 0x0004049e, 0x00000000, 0x9ebfab10, 0x000404a2, 0x00000000, - 0x98a09d0e, 0x000408a6, 0x00000000, 0x195d37d2, 0x001008aa, 0x00000000, - 0xf9ec4f85, 0x001010ae, 0x00000000, 0x4626b750, 0x000808b2, 0x00000000, - 0xde5b3431, 0x000404b6, 0x00000000, 0x036ac8a6, 0x000c04ba, 0x00000000, + 0xe24f806d, 0x00040400, 0x00000000, 0xf6c28182, 0x00040404, 0x00000000, 0x6f6e55a5, 0x00040408, + 0x00000000, 0x0bc65da4, 0x0004040c, 0x00000000, 0x9e5ad592, 0x00040410, 0x00000000, 0xbb513b98, + 0x00040414, 0x00000000, 0xab64b23b, 0x00040418, 0x00000000, 0x53c39964, 0x0004041c, 0x00000000, + 0x01396b11, 0x00040420, 0x00000000, 0x7d42019a, 0x00040424, 0x00000000, 0x3548f523, 0x00040428, + 0x00000000, 0xf43ad28a, 0x0004042c, 0x00000000, 0x6de4c312, 0x00040430, 0x00000000, 0x00a77ae0, + 0x00040434, 0x00000000, 0x00a779b7, 0x00040438, 0x00000000, 0x5100100c, 0x0004043c, 0x00000000, + 0x59958bba, 0x00040440, 0x00000000, 0x0c06f17c, 0x00040444, 0x00000000, 0x6f104b72, 0x00040448, + 0x00000000, 0x25c70d9c, 0x0004044c, 0x00000000, 0x3881201e, 0x00040450, 0x00000000, 0x09afddaf, + 0x00040454, 0x00000000, 0x367d63cf, 0x00040458, 0x00000000, 0x43707db8, 0x0004045c, 0x00000000, + 0xf6ae26ba, 0x00040460, 0x00000000, 0x1b917652, 0x00040464, 0x00000000, 0x2cac726e, 0x00040468, + 0x00000000, 0x2cac7111, 0x0004046c, 0x00000000, 0x94b1e4f7, 0x00040470, 0x00000000, 0xe3661b6c, + 0x00040474, 0x00000000, 0x1eb8d73a, 0x00040478, 0x00000000, 0x15051fa3, 0x0004047c, 0x00000000, + 0x9c51a7f1, 0x00040480, 0x00000000, 0xa20efc70, 0x00040484, 0x00000000, 0x0ec09f6e, 0x00040488, + 0x00000000, 0x34a7d6d3, 0x0004048c, 0x00000000, 0xce831b94, 0x00040490, 0x00000000, 0x5cc72a74, + 0x00040494, 0x00000000, 0x3b77713c, 0x00040498, 0x00000000, 0x40f64410, 0x0004049c, 0x00000000, + 0x69441268, 0x000404a0, 0x00000000, 0x2e418b83, 0x000404a4, 0x00000000, 0xa00d0c8d, 0x000404a8, + 0x00000000, 0xb1289fb3, 0x000404ac, 0x00000000, 0x144832fb, 0x000404b0, 0x00000000, 0x9890d9fa, + 0x000404b4, 0x00000000, 0x9016faf1, 0x000404b8, 0x00000000, 0x4b73ce27, 0x000404bc, 0x00000000, + 0x5f5a3e7b, 0x000404c0, 0x00000000, 0xd4af3a51, 0x000404c4, 0x00000000, 0x6cf4f543, 0x000404c8, + 0x00000000, 0x5fb86ccb, 0x000404cc, 0x00000000, 0xedefa188, 0x000404d0, 0x00000000, 0xd0de9ee6, + 0x000404d4, 0x00000000, 0xc5831803, 0x000404d8, 0x00000000, 0x8e6de84b, 0x000404dc, 0x00000000, + 0xd0771662, 0x000408e0, 0x00000000, 0x569f7444, 0x004004e4, 0x00000000, 0x5c6637cd, 0x000408e8, + 0x00000000, 0xcae3e690, 0x000408ec, 0x00000000, 0x43fbd769, 0x000410f0, 0x00000000, 0xef550356, + 0x002004f4, 0x00000000, 0x8f52e279, 0x000408f8, 0x00000000, 0x1f2d8149, 0x001008fc, 0x00000000, + 0x853d0614, 0x00040500, 0x00000000, 0x4413c6f9, 0x00040904, 0x00000000, 0x67096014, 0x00044108, + 0x00000000, 0x88f5e915, 0x0004090c, 0x00000000, 0x033f1eff, 0x00040910, 0x00000000, 0x918106bb, + 0x00040914, 0x00000000, 0x95f0e7ac, 0x00041118, 0x00000000, 0xb48cbab2, 0x0004091c, 0x00000000, + 0x05bb3bc6, 0x00040920, 0x00000000, 0x94faba07, 0x00040924, 0x00000000, 0x38e92c91, 0x00204128, + 0x00000000, 0x0b177b43, 0x0004092c, 0x00000000, 0x48531062, 0x00800530, 0x00000000, 0xaaa964b9, + 0x00201134, 0x00000000, 0x7690af6f, 0x00402938, 0x00000000, 0x078d7060, 0x0004093c, 0x00000000, + 0x5d6e3ec7, 0x00040401, 0x00000000, 0x57e7079a, 0x00040405, 0x00000000, 0x7467fafd, 0x00040409, + 0x00000000, 0x9e826b50, 0x0004040d, 0x00000000, 0xdc484f18, 0x00040411, 0x00000000, 0x5da8bca3, + 0x00040415, 0x00000000, 0x5ca726d8, 0x00040419, 0x00000000, 0x5dd28360, 0x0004041d, 0x00000000, + 0x57efa0be, 0x00040421, 0x00000000, 0x502363d5, 0x00040425, 0x00000000, 0x506d14bd, 0x00040429, + 0x00000000, 0xb2609506, 0x0010042d, 0x00000000, 0x9e5cfb8a, 0x00040c31, 0x00000000, 0xc918df3e, + 0x00040835, 0x00000000, 0xc9751c9c, 0x00040839, 0x00000000, 0xc97ef77a, 0x0004083d, 0x00000000, + 0xc927c6b9, 0x00040841, 0x00000000, 0xc92a1ec5, 0x00040845, 0x00000000, 0xc9e01b31, 0x00040849, + 0x00000000, 0x50685f29, 0x0004044d, 0x00000000, 0xb26219ca, 0x00100451, 0x00000000, 0xb25b6cf9, + 0x00100455, 0x00000000, 0xb2f86101, 0x00100459, 0x00000000, 0x07e3b155, 0x0004085d, 0x00000000, + 0x07e383c6, 0x00040861, 0x00000000, 0xbda98653, 0x00400465, 0x00000000, 0xbdbd1d0f, 0x00800469, + 0x00000000, 0xbd946fd4, 0x0080046d, 0x00000000, 0xbdf02a4c, 0x00800471, 0x00000000, 0x19e93e85, + 0x00040402, 0x00000000, 0x3b5c2af3, 0x00040406, 0x00000000, 0x47974a35, 0x0004040a, 0x00000000, + 0x105971c2, 0x0004040e, 0x00000000, 0x7d137765, 0x00040412, 0x00000000, 0xd187febc, 0x00040416, + 0x00000000, 0x12f854ac, 0x0004041a, 0x00000000, 0x40d49ad1, 0x0004041e, 0x00000000, 0x8c0923da, + 0x00040422, 0x00000000, 0xf6be6f25, 0x00040426, 0x00000000, 0xf6908bad, 0x0004042a, 0x00000000, + 0x862ee1be, 0x0004042e, 0x00000000, 0x8631d396, 0x00040432, 0x00000000, 0x89d7d386, 0x00040436, + 0x00000000, 0xd1006f62, 0x0004043a, 0x00000000, 0x7e51d354, 0x0004043e, 0x00000000, 0x7e712edc, + 0x00040442, 0x00000000, 0x141f6002, 0x00040446, 0x00000000, 0x140c761a, 0x0004044a, 0x00000000, + 0x14f68dfa, 0x0004044e, 0x00000000, 0x6fea32c3, 0x00040452, 0x00000000, 0x8f378499, 0x00040456, + 0x00000000, 0x5d9ed616, 0x0004045a, 0x00000000, 0x2bbfa784, 0x0004045e, 0x00000000, 0x2b45f28c, + 0x00040462, 0x00000000, 0x5f4aaed9, 0x00040466, 0x00000000, 0x5f477465, 0x0004046a, 0x00000000, + 0x5ec84729, 0x0004046e, 0x00000000, 0x48ca8407, 0x00040472, 0x00000000, 0x5f355d79, 0x00040476, + 0x00000000, 0x5f0f3449, 0x0004047a, 0x00000000, 0xee4a4919, 0x0004047e, 0x00000000, 0xee49852d, + 0x00040482, 0x00000000, 0xee4f8201, 0x00040486, 0x00000000, 0x8a3f99a1, 0x0004048a, 0x00000000, + 0x381fc91f, 0x0004048e, 0x00000000, 0x19d8287b, 0x00040492, 0x00000000, 0xbb8df494, 0x00040496, + 0x00000000, 0xf6d8a76e, 0x0004049a, 0x00000000, 0x7620f1e9, 0x0004049e, 0x00000000, 0x9ebfab10, + 0x000404a2, 0x00000000, 0x98a09d0e, 0x000408a6, 0x00000000, 0x195d37d2, 0x001008aa, 0x00000000, + 0xf9ec4f85, 0x001010ae, 0x00000000, 0x4626b750, 0x000808b2, 0x00000000, 0xde5b3431, 0x000404b6, + 0x00000000, 0x036ac8a6, 0x000c04ba, 0x00000000, }; static CompactRegisterDefaults g_agc_public_reg_defaults_v5 = { - g_agc_public_reg_defaults_v5_tbl0_regs, 491, g_agc_public_reg_defaults_v5_tbl0_ptrs, 80, - g_agc_public_reg_defaults_v5_tbl1_regs, 159, g_agc_public_reg_defaults_v5_tbl1_ptrs, 29, - g_agc_public_reg_defaults_v5_tbl2_regs, 75, g_agc_public_reg_defaults_v5_tbl2_ptrs, 47, - nullptr, 0, nullptr, 0, - g_agc_public_reg_defaults_v5_types, 156, + g_agc_public_reg_defaults_v5_tbl0_regs, + 491, + g_agc_public_reg_defaults_v5_tbl0_ptrs, + 80, + g_agc_public_reg_defaults_v5_tbl1_regs, + 159, + g_agc_public_reg_defaults_v5_tbl1_ptrs, + 29, + g_agc_public_reg_defaults_v5_tbl2_regs, + 75, + g_agc_public_reg_defaults_v5_tbl2_ptrs, + 47, + nullptr, + 0, + nullptr, + 0, + g_agc_public_reg_defaults_v5_types, + 156, }; // g_agc_public_reg_defaults_v7: regs=(489, 159, 55, 0), ptrs=(78, 29, 20, 0), types=127. @@ -2086,9 +2153,9 @@ static ShaderRegister g_agc_public_reg_defaults_v7_tbl1_regs[] = { }; static const uint16_t g_agc_public_reg_defaults_v7_tbl1_ptrs[] = { - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000a, 0x000b, - 0x000f, 0x0012, 0x0014, 0x0016, 0x0018, 0x001a, 0x001c, 0x001e, 0x001f, 0x0023, 0x0027, 0x002b, - 0x002d, 0x002f, 0x003f, 0x005f, 0x007f, + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, + 0x000a, 0x000b, 0x000f, 0x0012, 0x0014, 0x0016, 0x0018, 0x001a, 0x001c, 0x001e, + 0x001f, 0x0023, 0x0027, 0x002b, 0x002d, 0x002f, 0x003f, 0x005f, 0x007f, }; static ShaderRegister g_agc_public_reg_defaults_v7_tbl2_regs[] = { @@ -2109,83 +2176,80 @@ static ShaderRegister g_agc_public_reg_defaults_v7_tbl2_regs[] = { }; static const uint16_t g_agc_public_reg_defaults_v7_tbl2_ptrs[] = { - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000a, 0x000b, - 0x000c, 0x000d, 0x000f, 0x0017, 0x0027, 0x002b, 0x0033, 0x0034, + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, + 0x000a, 0x000b, 0x000c, 0x000d, 0x000f, 0x0017, 0x0027, 0x002b, 0x0033, 0x0034, }; static uint32_t g_agc_public_reg_defaults_v7_types[] = { - 0xe24f806d, 0x00040400, 0x00000000, 0xf6c28182, 0x00040404, 0x00000000, - 0x6f6e55a5, 0x00040408, 0x00000000, 0x0bc65da4, 0x0004040c, 0x00000000, - 0x9e5ad592, 0x00040410, 0x00000000, 0xbb513b98, 0x00040414, 0x00000000, - 0xab64b23b, 0x00040418, 0x00000000, 0x53c39964, 0x0004041c, 0x00000000, - 0x01396b11, 0x00040420, 0x00000000, 0x7d42019a, 0x00040424, 0x00000000, - 0x3548f523, 0x00040428, 0x00000000, 0xf43ad28a, 0x0004042c, 0x00000000, - 0x6de4c312, 0x00040430, 0x00000000, 0x00a77ae0, 0x00040434, 0x00000000, - 0x00a779b7, 0x00040438, 0x00000000, 0x5100100c, 0x0004043c, 0x00000000, - 0x59958bba, 0x00040440, 0x00000000, 0x0c06f17c, 0x00040444, 0x00000000, - 0x6f104b72, 0x00040448, 0x00000000, 0x25c70d9c, 0x0004044c, 0x00000000, - 0x3881201e, 0x00040450, 0x00000000, 0x09afddaf, 0x00040454, 0x00000000, - 0x367d63cf, 0x00040458, 0x00000000, 0x43707db8, 0x0004045c, 0x00000000, - 0xf6ae26ba, 0x00040460, 0x00000000, 0x1b917652, 0x00040464, 0x00000000, - 0x94b1e4f7, 0x00040468, 0x00000000, 0xe3661b6c, 0x0004046c, 0x00000000, - 0x1eb8d73a, 0x00040470, 0x00000000, 0x15051fa3, 0x00040474, 0x00000000, - 0x9c51a7f1, 0x00040478, 0x00000000, 0xa20efc70, 0x0004047c, 0x00000000, - 0x0ec09f6e, 0x00040480, 0x00000000, 0x34a7d6d3, 0x00040484, 0x00000000, - 0xce831b94, 0x00040488, 0x00000000, 0x5cc72a74, 0x0004048c, 0x00000000, - 0x3b77713c, 0x00040490, 0x00000000, 0x40f64410, 0x00040494, 0x00000000, - 0x69441268, 0x00040498, 0x00000000, 0x2e418b83, 0x0004049c, 0x00000000, - 0xa00d0c8d, 0x000404a0, 0x00000000, 0xb1289fb3, 0x000404a4, 0x00000000, - 0x144832fb, 0x000404a8, 0x00000000, 0x9890d9fa, 0x000404ac, 0x00000000, - 0x9016faf1, 0x000404b0, 0x00000000, 0x4b73ce27, 0x000404b4, 0x00000000, - 0x5f5a3e7b, 0x000404b8, 0x00000000, 0xd4af3a51, 0x000404bc, 0x00000000, - 0x6cf4f543, 0x000404c0, 0x00000000, 0x5fb86ccb, 0x000404c4, 0x00000000, - 0xedefa188, 0x000404c8, 0x00000000, 0xd0de9ee6, 0x000404cc, 0x00000000, - 0xc5831803, 0x000404d0, 0x00000000, 0x8e6de84b, 0x000404d4, 0x00000000, - 0xd0771662, 0x000408d8, 0x00000000, 0x569f7444, 0x004004dc, 0x00000000, - 0x5c6637cd, 0x000408e0, 0x00000000, 0xcae3e690, 0x000408e4, 0x00000000, - 0x43fbd769, 0x000410e8, 0x00000000, 0xef550356, 0x002004ec, 0x00000000, - 0x8f52e279, 0x000408f0, 0x00000000, 0x1f2d8149, 0x001008f4, 0x00000000, - 0x853d0614, 0x000404f8, 0x00000000, 0x4413c6f9, 0x000408fc, 0x00000000, - 0x67096014, 0x00044100, 0x00000000, 0x88f5e915, 0x00040904, 0x00000000, - 0x033f1eff, 0x00040908, 0x00000000, 0x918106bb, 0x0004090c, 0x00000000, - 0x95f0e7ac, 0x00041110, 0x00000000, 0xb48cbab2, 0x00040914, 0x00000000, - 0x05bb3bc6, 0x00040918, 0x00000000, 0x94faba07, 0x0004091c, 0x00000000, - 0x38e92c91, 0x00204120, 0x00000000, 0x0b177b43, 0x00040924, 0x00000000, - 0x48531062, 0x00800528, 0x00000000, 0xaaa964b9, 0x0020112c, 0x00000000, - 0x7690af6f, 0x00402930, 0x00000000, 0x078d7060, 0x00040934, 0x00000000, - 0x5d6e3ec7, 0x00040401, 0x00000000, 0x57e7079a, 0x00040405, 0x00000000, - 0x7467fafd, 0x00040409, 0x00000000, 0x9e826b50, 0x0004040d, 0x00000000, - 0xdc484f18, 0x00040411, 0x00000000, 0x5da8bca3, 0x00040415, 0x00000000, - 0x5ca726d8, 0x00040419, 0x00000000, 0x5dd28360, 0x0004041d, 0x00000000, - 0x57efa0be, 0x00040421, 0x00000000, 0x502363d5, 0x00040425, 0x00000000, - 0x506d14bd, 0x00040429, 0x00000000, 0xb2609506, 0x0010042d, 0x00000000, - 0x9e5cfb8a, 0x00040c31, 0x00000000, 0xc918df3e, 0x00040835, 0x00000000, - 0xc9751c9c, 0x00040839, 0x00000000, 0xc97ef77a, 0x0004083d, 0x00000000, - 0xc927c6b9, 0x00040841, 0x00000000, 0xc92a1ec5, 0x00040845, 0x00000000, - 0xc9e01b31, 0x00040849, 0x00000000, 0x50685f29, 0x0004044d, 0x00000000, - 0xb26219ca, 0x00100451, 0x00000000, 0xb25b6cf9, 0x00100455, 0x00000000, - 0xb2f86101, 0x00100459, 0x00000000, 0x07e3b155, 0x0004085d, 0x00000000, - 0x07e383c6, 0x00040861, 0x00000000, 0xbda98653, 0x00400465, 0x00000000, - 0xbdbd1d0f, 0x00800469, 0x00000000, 0xbd946fd4, 0x0080046d, 0x00000000, - 0xbdf02a4c, 0x00800471, 0x00000000, 0x19e93e85, 0x00040402, 0x00000000, - 0x3b5c2af3, 0x00040406, 0x00000000, 0x47974a35, 0x0004040a, 0x00000000, - 0x105971c2, 0x0004040e, 0x00000000, 0x7d137765, 0x00040412, 0x00000000, - 0xd187febc, 0x00040416, 0x00000000, 0x12f854ac, 0x0004041a, 0x00000000, - 0x40d49ad1, 0x0004041e, 0x00000000, 0x8c0923da, 0x00040422, 0x00000000, - 0xbb8df494, 0x00040426, 0x00000000, 0xf6d8a76e, 0x0004042a, 0x00000000, - 0x7620f1e9, 0x0004042e, 0x00000000, 0x9ebfab10, 0x00040432, 0x00000000, - 0x98a09d0e, 0x00040836, 0x00000000, 0x195d37d2, 0x0010083a, 0x00000000, - 0xf9ec4f85, 0x0010103e, 0x00000000, 0x4626b750, 0x00080842, 0x00000000, - 0x4cc673a0, 0x00200446, 0x00000000, 0xde5b3431, 0x0004044a, 0x00000000, - 0x036ac8a6, 0x000c044e, 0x00000000, + 0xe24f806d, 0x00040400, 0x00000000, 0xf6c28182, 0x00040404, 0x00000000, 0x6f6e55a5, 0x00040408, + 0x00000000, 0x0bc65da4, 0x0004040c, 0x00000000, 0x9e5ad592, 0x00040410, 0x00000000, 0xbb513b98, + 0x00040414, 0x00000000, 0xab64b23b, 0x00040418, 0x00000000, 0x53c39964, 0x0004041c, 0x00000000, + 0x01396b11, 0x00040420, 0x00000000, 0x7d42019a, 0x00040424, 0x00000000, 0x3548f523, 0x00040428, + 0x00000000, 0xf43ad28a, 0x0004042c, 0x00000000, 0x6de4c312, 0x00040430, 0x00000000, 0x00a77ae0, + 0x00040434, 0x00000000, 0x00a779b7, 0x00040438, 0x00000000, 0x5100100c, 0x0004043c, 0x00000000, + 0x59958bba, 0x00040440, 0x00000000, 0x0c06f17c, 0x00040444, 0x00000000, 0x6f104b72, 0x00040448, + 0x00000000, 0x25c70d9c, 0x0004044c, 0x00000000, 0x3881201e, 0x00040450, 0x00000000, 0x09afddaf, + 0x00040454, 0x00000000, 0x367d63cf, 0x00040458, 0x00000000, 0x43707db8, 0x0004045c, 0x00000000, + 0xf6ae26ba, 0x00040460, 0x00000000, 0x1b917652, 0x00040464, 0x00000000, 0x94b1e4f7, 0x00040468, + 0x00000000, 0xe3661b6c, 0x0004046c, 0x00000000, 0x1eb8d73a, 0x00040470, 0x00000000, 0x15051fa3, + 0x00040474, 0x00000000, 0x9c51a7f1, 0x00040478, 0x00000000, 0xa20efc70, 0x0004047c, 0x00000000, + 0x0ec09f6e, 0x00040480, 0x00000000, 0x34a7d6d3, 0x00040484, 0x00000000, 0xce831b94, 0x00040488, + 0x00000000, 0x5cc72a74, 0x0004048c, 0x00000000, 0x3b77713c, 0x00040490, 0x00000000, 0x40f64410, + 0x00040494, 0x00000000, 0x69441268, 0x00040498, 0x00000000, 0x2e418b83, 0x0004049c, 0x00000000, + 0xa00d0c8d, 0x000404a0, 0x00000000, 0xb1289fb3, 0x000404a4, 0x00000000, 0x144832fb, 0x000404a8, + 0x00000000, 0x9890d9fa, 0x000404ac, 0x00000000, 0x9016faf1, 0x000404b0, 0x00000000, 0x4b73ce27, + 0x000404b4, 0x00000000, 0x5f5a3e7b, 0x000404b8, 0x00000000, 0xd4af3a51, 0x000404bc, 0x00000000, + 0x6cf4f543, 0x000404c0, 0x00000000, 0x5fb86ccb, 0x000404c4, 0x00000000, 0xedefa188, 0x000404c8, + 0x00000000, 0xd0de9ee6, 0x000404cc, 0x00000000, 0xc5831803, 0x000404d0, 0x00000000, 0x8e6de84b, + 0x000404d4, 0x00000000, 0xd0771662, 0x000408d8, 0x00000000, 0x569f7444, 0x004004dc, 0x00000000, + 0x5c6637cd, 0x000408e0, 0x00000000, 0xcae3e690, 0x000408e4, 0x00000000, 0x43fbd769, 0x000410e8, + 0x00000000, 0xef550356, 0x002004ec, 0x00000000, 0x8f52e279, 0x000408f0, 0x00000000, 0x1f2d8149, + 0x001008f4, 0x00000000, 0x853d0614, 0x000404f8, 0x00000000, 0x4413c6f9, 0x000408fc, 0x00000000, + 0x67096014, 0x00044100, 0x00000000, 0x88f5e915, 0x00040904, 0x00000000, 0x033f1eff, 0x00040908, + 0x00000000, 0x918106bb, 0x0004090c, 0x00000000, 0x95f0e7ac, 0x00041110, 0x00000000, 0xb48cbab2, + 0x00040914, 0x00000000, 0x05bb3bc6, 0x00040918, 0x00000000, 0x94faba07, 0x0004091c, 0x00000000, + 0x38e92c91, 0x00204120, 0x00000000, 0x0b177b43, 0x00040924, 0x00000000, 0x48531062, 0x00800528, + 0x00000000, 0xaaa964b9, 0x0020112c, 0x00000000, 0x7690af6f, 0x00402930, 0x00000000, 0x078d7060, + 0x00040934, 0x00000000, 0x5d6e3ec7, 0x00040401, 0x00000000, 0x57e7079a, 0x00040405, 0x00000000, + 0x7467fafd, 0x00040409, 0x00000000, 0x9e826b50, 0x0004040d, 0x00000000, 0xdc484f18, 0x00040411, + 0x00000000, 0x5da8bca3, 0x00040415, 0x00000000, 0x5ca726d8, 0x00040419, 0x00000000, 0x5dd28360, + 0x0004041d, 0x00000000, 0x57efa0be, 0x00040421, 0x00000000, 0x502363d5, 0x00040425, 0x00000000, + 0x506d14bd, 0x00040429, 0x00000000, 0xb2609506, 0x0010042d, 0x00000000, 0x9e5cfb8a, 0x00040c31, + 0x00000000, 0xc918df3e, 0x00040835, 0x00000000, 0xc9751c9c, 0x00040839, 0x00000000, 0xc97ef77a, + 0x0004083d, 0x00000000, 0xc927c6b9, 0x00040841, 0x00000000, 0xc92a1ec5, 0x00040845, 0x00000000, + 0xc9e01b31, 0x00040849, 0x00000000, 0x50685f29, 0x0004044d, 0x00000000, 0xb26219ca, 0x00100451, + 0x00000000, 0xb25b6cf9, 0x00100455, 0x00000000, 0xb2f86101, 0x00100459, 0x00000000, 0x07e3b155, + 0x0004085d, 0x00000000, 0x07e383c6, 0x00040861, 0x00000000, 0xbda98653, 0x00400465, 0x00000000, + 0xbdbd1d0f, 0x00800469, 0x00000000, 0xbd946fd4, 0x0080046d, 0x00000000, 0xbdf02a4c, 0x00800471, + 0x00000000, 0x19e93e85, 0x00040402, 0x00000000, 0x3b5c2af3, 0x00040406, 0x00000000, 0x47974a35, + 0x0004040a, 0x00000000, 0x105971c2, 0x0004040e, 0x00000000, 0x7d137765, 0x00040412, 0x00000000, + 0xd187febc, 0x00040416, 0x00000000, 0x12f854ac, 0x0004041a, 0x00000000, 0x40d49ad1, 0x0004041e, + 0x00000000, 0x8c0923da, 0x00040422, 0x00000000, 0xbb8df494, 0x00040426, 0x00000000, 0xf6d8a76e, + 0x0004042a, 0x00000000, 0x7620f1e9, 0x0004042e, 0x00000000, 0x9ebfab10, 0x00040432, 0x00000000, + 0x98a09d0e, 0x00040836, 0x00000000, 0x195d37d2, 0x0010083a, 0x00000000, 0xf9ec4f85, 0x0010103e, + 0x00000000, 0x4626b750, 0x00080842, 0x00000000, 0x4cc673a0, 0x00200446, 0x00000000, 0xde5b3431, + 0x0004044a, 0x00000000, 0x036ac8a6, 0x000c044e, 0x00000000, }; static CompactRegisterDefaults g_agc_public_reg_defaults_v7 = { - g_agc_public_reg_defaults_v7_tbl0_regs, 489, g_agc_public_reg_defaults_v7_tbl0_ptrs, 78, - g_agc_public_reg_defaults_v7_tbl1_regs, 159, g_agc_public_reg_defaults_v7_tbl1_ptrs, 29, - g_agc_public_reg_defaults_v7_tbl2_regs, 55, g_agc_public_reg_defaults_v7_tbl2_ptrs, 20, - nullptr, 0, nullptr, 0, - g_agc_public_reg_defaults_v7_types, 127, + g_agc_public_reg_defaults_v7_tbl0_regs, + 489, + g_agc_public_reg_defaults_v7_tbl0_ptrs, + 78, + g_agc_public_reg_defaults_v7_tbl1_regs, + 159, + g_agc_public_reg_defaults_v7_tbl1_ptrs, + 29, + g_agc_public_reg_defaults_v7_tbl2_regs, + 55, + g_agc_public_reg_defaults_v7_tbl2_ptrs, + 20, + nullptr, + 0, + nullptr, + 0, + g_agc_public_reg_defaults_v7_types, + 127, }; // g_agc_public_reg_defaults_v8: regs=(489, 159, 55, 0), ptrs=(78, 29, 20, 0), types=127. @@ -2369,9 +2433,9 @@ static ShaderRegister g_agc_public_reg_defaults_v8_tbl1_regs[] = { }; static const uint16_t g_agc_public_reg_defaults_v8_tbl1_ptrs[] = { - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000a, 0x000b, - 0x000f, 0x0012, 0x0014, 0x0016, 0x0018, 0x001a, 0x001c, 0x001e, 0x001f, 0x0023, 0x0027, 0x002b, - 0x002d, 0x002f, 0x003f, 0x005f, 0x007f, + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, + 0x000a, 0x000b, 0x000f, 0x0012, 0x0014, 0x0016, 0x0018, 0x001a, 0x001c, 0x001e, + 0x001f, 0x0023, 0x0027, 0x002b, 0x002d, 0x002f, 0x003f, 0x005f, 0x007f, }; static ShaderRegister g_agc_public_reg_defaults_v8_tbl2_regs[] = { @@ -2392,83 +2456,80 @@ static ShaderRegister g_agc_public_reg_defaults_v8_tbl2_regs[] = { }; static const uint16_t g_agc_public_reg_defaults_v8_tbl2_ptrs[] = { - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000a, 0x000b, - 0x000c, 0x000d, 0x000f, 0x0017, 0x0027, 0x002b, 0x0033, 0x0034, + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, + 0x000a, 0x000b, 0x000c, 0x000d, 0x000f, 0x0017, 0x0027, 0x002b, 0x0033, 0x0034, }; static uint32_t g_agc_public_reg_defaults_v8_types[] = { - 0xe24f806d, 0x00040400, 0x00000000, 0xf6c28182, 0x00040404, 0x00000000, - 0x6f6e55a5, 0x00040408, 0x00000000, 0x0bc65da4, 0x0004040c, 0x00000000, - 0x9e5ad592, 0x00040410, 0x00000000, 0xbb513b98, 0x00040414, 0x00000000, - 0xab64b23b, 0x00040418, 0x00000000, 0x53c39964, 0x0004041c, 0x00000000, - 0x01396b11, 0x00040420, 0x00000000, 0x7d42019a, 0x00040424, 0x00000000, - 0x3548f523, 0x00040428, 0x00000000, 0xf43ad28a, 0x0004042c, 0x00000000, - 0x6de4c312, 0x00040430, 0x00000000, 0x00a77ae0, 0x00040434, 0x00000000, - 0x00a779b7, 0x00040438, 0x00000000, 0x5100100c, 0x0004043c, 0x00000000, - 0x59958bba, 0x00040440, 0x00000000, 0x0c06f17c, 0x00040444, 0x00000000, - 0x6f104b72, 0x00040448, 0x00000000, 0x25c70d9c, 0x0004044c, 0x00000000, - 0x3881201e, 0x00040450, 0x00000000, 0x09afddaf, 0x00040454, 0x00000000, - 0x367d63cf, 0x00040458, 0x00000000, 0x43707db8, 0x0004045c, 0x00000000, - 0xf6ae26ba, 0x00040460, 0x00000000, 0x1b917652, 0x00040464, 0x00000000, - 0x94b1e4f7, 0x00040468, 0x00000000, 0xe3661b6c, 0x0004046c, 0x00000000, - 0x1eb8d73a, 0x00040470, 0x00000000, 0x15051fa3, 0x00040474, 0x00000000, - 0x9c51a7f1, 0x00040478, 0x00000000, 0xa20efc70, 0x0004047c, 0x00000000, - 0x0ec09f6e, 0x00040480, 0x00000000, 0x34a7d6d3, 0x00040484, 0x00000000, - 0xce831b94, 0x00040488, 0x00000000, 0x5cc72a74, 0x0004048c, 0x00000000, - 0x3b77713c, 0x00040490, 0x00000000, 0x40f64410, 0x00040494, 0x00000000, - 0x69441268, 0x00040498, 0x00000000, 0x2e418b83, 0x0004049c, 0x00000000, - 0xa00d0c8d, 0x000404a0, 0x00000000, 0xb1289fb3, 0x000404a4, 0x00000000, - 0x144832fb, 0x000404a8, 0x00000000, 0x9890d9fa, 0x000404ac, 0x00000000, - 0x9016faf1, 0x000404b0, 0x00000000, 0x4b73ce27, 0x000404b4, 0x00000000, - 0x5f5a3e7b, 0x000404b8, 0x00000000, 0xd4af3a51, 0x000404bc, 0x00000000, - 0x6cf4f543, 0x000404c0, 0x00000000, 0x5fb86ccb, 0x000404c4, 0x00000000, - 0xedefa188, 0x000404c8, 0x00000000, 0xd0de9ee6, 0x000404cc, 0x00000000, - 0xc5831803, 0x000404d0, 0x00000000, 0x8e6de84b, 0x000404d4, 0x00000000, - 0xd0771662, 0x000408d8, 0x00000000, 0x569f7444, 0x004004dc, 0x00000000, - 0x5c6637cd, 0x000408e0, 0x00000000, 0xcae3e690, 0x000408e4, 0x00000000, - 0x43fbd769, 0x000410e8, 0x00000000, 0xef550356, 0x002004ec, 0x00000000, - 0x8f52e279, 0x000408f0, 0x00000000, 0x1f2d8149, 0x001008f4, 0x00000000, - 0x853d0614, 0x000404f8, 0x00000000, 0x4413c6f9, 0x000408fc, 0x00000000, - 0x67096014, 0x00044100, 0x00000000, 0x88f5e915, 0x00040904, 0x00000000, - 0x033f1eff, 0x00040908, 0x00000000, 0x918106bb, 0x0004090c, 0x00000000, - 0x95f0e7ac, 0x00041110, 0x00000000, 0xb48cbab2, 0x00040914, 0x00000000, - 0x05bb3bc6, 0x00040918, 0x00000000, 0x94faba07, 0x0004091c, 0x00000000, - 0x38e92c91, 0x00204120, 0x00000000, 0x0b177b43, 0x00040924, 0x00000000, - 0x48531062, 0x00800528, 0x00000000, 0xaaa964b9, 0x0020112c, 0x00000000, - 0x7690af6f, 0x00402930, 0x00000000, 0x078d7060, 0x00040934, 0x00000000, - 0x5d6e3ec7, 0x00040401, 0x00000000, 0x57e7079a, 0x00040405, 0x00000000, - 0x7467fafd, 0x00040409, 0x00000000, 0x9e826b50, 0x0004040d, 0x00000000, - 0xdc484f18, 0x00040411, 0x00000000, 0x5da8bca3, 0x00040415, 0x00000000, - 0x5ca726d8, 0x00040419, 0x00000000, 0x5dd28360, 0x0004041d, 0x00000000, - 0x57efa0be, 0x00040421, 0x00000000, 0x502363d5, 0x00040425, 0x00000000, - 0x506d14bd, 0x00040429, 0x00000000, 0xb2609506, 0x0010042d, 0x00000000, - 0x9e5cfb8a, 0x00040c31, 0x00000000, 0xc918df3e, 0x00040835, 0x00000000, - 0xc9751c9c, 0x00040839, 0x00000000, 0xc97ef77a, 0x0004083d, 0x00000000, - 0xc927c6b9, 0x00040841, 0x00000000, 0xc92a1ec5, 0x00040845, 0x00000000, - 0xc9e01b31, 0x00040849, 0x00000000, 0x50685f29, 0x0004044d, 0x00000000, - 0xb26219ca, 0x00100451, 0x00000000, 0xb25b6cf9, 0x00100455, 0x00000000, - 0xb2f86101, 0x00100459, 0x00000000, 0x07e3b155, 0x0004085d, 0x00000000, - 0x07e383c6, 0x00040861, 0x00000000, 0xbda98653, 0x00400465, 0x00000000, - 0xbdbd1d0f, 0x00800469, 0x00000000, 0xbd946fd4, 0x0080046d, 0x00000000, - 0xbdf02a4c, 0x00800471, 0x00000000, 0x19e93e85, 0x00040402, 0x00000000, - 0x3b5c2af3, 0x00040406, 0x00000000, 0x47974a35, 0x0004040a, 0x00000000, - 0x105971c2, 0x0004040e, 0x00000000, 0x7d137765, 0x00040412, 0x00000000, - 0xd187febc, 0x00040416, 0x00000000, 0x12f854ac, 0x0004041a, 0x00000000, - 0x40d49ad1, 0x0004041e, 0x00000000, 0x8c0923da, 0x00040422, 0x00000000, - 0xbb8df494, 0x00040426, 0x00000000, 0xf6d8a76e, 0x0004042a, 0x00000000, - 0x7620f1e9, 0x0004042e, 0x00000000, 0x9ebfab10, 0x00040432, 0x00000000, - 0x98a09d0e, 0x00040836, 0x00000000, 0x195d37d2, 0x0010083a, 0x00000000, - 0xf9ec4f85, 0x0010103e, 0x00000000, 0x4626b750, 0x00080842, 0x00000000, - 0x4cc673a0, 0x00200446, 0x00000000, 0xde5b3431, 0x0004044a, 0x00000000, - 0x036ac8a6, 0x000c044e, 0x00000000, + 0xe24f806d, 0x00040400, 0x00000000, 0xf6c28182, 0x00040404, 0x00000000, 0x6f6e55a5, 0x00040408, + 0x00000000, 0x0bc65da4, 0x0004040c, 0x00000000, 0x9e5ad592, 0x00040410, 0x00000000, 0xbb513b98, + 0x00040414, 0x00000000, 0xab64b23b, 0x00040418, 0x00000000, 0x53c39964, 0x0004041c, 0x00000000, + 0x01396b11, 0x00040420, 0x00000000, 0x7d42019a, 0x00040424, 0x00000000, 0x3548f523, 0x00040428, + 0x00000000, 0xf43ad28a, 0x0004042c, 0x00000000, 0x6de4c312, 0x00040430, 0x00000000, 0x00a77ae0, + 0x00040434, 0x00000000, 0x00a779b7, 0x00040438, 0x00000000, 0x5100100c, 0x0004043c, 0x00000000, + 0x59958bba, 0x00040440, 0x00000000, 0x0c06f17c, 0x00040444, 0x00000000, 0x6f104b72, 0x00040448, + 0x00000000, 0x25c70d9c, 0x0004044c, 0x00000000, 0x3881201e, 0x00040450, 0x00000000, 0x09afddaf, + 0x00040454, 0x00000000, 0x367d63cf, 0x00040458, 0x00000000, 0x43707db8, 0x0004045c, 0x00000000, + 0xf6ae26ba, 0x00040460, 0x00000000, 0x1b917652, 0x00040464, 0x00000000, 0x94b1e4f7, 0x00040468, + 0x00000000, 0xe3661b6c, 0x0004046c, 0x00000000, 0x1eb8d73a, 0x00040470, 0x00000000, 0x15051fa3, + 0x00040474, 0x00000000, 0x9c51a7f1, 0x00040478, 0x00000000, 0xa20efc70, 0x0004047c, 0x00000000, + 0x0ec09f6e, 0x00040480, 0x00000000, 0x34a7d6d3, 0x00040484, 0x00000000, 0xce831b94, 0x00040488, + 0x00000000, 0x5cc72a74, 0x0004048c, 0x00000000, 0x3b77713c, 0x00040490, 0x00000000, 0x40f64410, + 0x00040494, 0x00000000, 0x69441268, 0x00040498, 0x00000000, 0x2e418b83, 0x0004049c, 0x00000000, + 0xa00d0c8d, 0x000404a0, 0x00000000, 0xb1289fb3, 0x000404a4, 0x00000000, 0x144832fb, 0x000404a8, + 0x00000000, 0x9890d9fa, 0x000404ac, 0x00000000, 0x9016faf1, 0x000404b0, 0x00000000, 0x4b73ce27, + 0x000404b4, 0x00000000, 0x5f5a3e7b, 0x000404b8, 0x00000000, 0xd4af3a51, 0x000404bc, 0x00000000, + 0x6cf4f543, 0x000404c0, 0x00000000, 0x5fb86ccb, 0x000404c4, 0x00000000, 0xedefa188, 0x000404c8, + 0x00000000, 0xd0de9ee6, 0x000404cc, 0x00000000, 0xc5831803, 0x000404d0, 0x00000000, 0x8e6de84b, + 0x000404d4, 0x00000000, 0xd0771662, 0x000408d8, 0x00000000, 0x569f7444, 0x004004dc, 0x00000000, + 0x5c6637cd, 0x000408e0, 0x00000000, 0xcae3e690, 0x000408e4, 0x00000000, 0x43fbd769, 0x000410e8, + 0x00000000, 0xef550356, 0x002004ec, 0x00000000, 0x8f52e279, 0x000408f0, 0x00000000, 0x1f2d8149, + 0x001008f4, 0x00000000, 0x853d0614, 0x000404f8, 0x00000000, 0x4413c6f9, 0x000408fc, 0x00000000, + 0x67096014, 0x00044100, 0x00000000, 0x88f5e915, 0x00040904, 0x00000000, 0x033f1eff, 0x00040908, + 0x00000000, 0x918106bb, 0x0004090c, 0x00000000, 0x95f0e7ac, 0x00041110, 0x00000000, 0xb48cbab2, + 0x00040914, 0x00000000, 0x05bb3bc6, 0x00040918, 0x00000000, 0x94faba07, 0x0004091c, 0x00000000, + 0x38e92c91, 0x00204120, 0x00000000, 0x0b177b43, 0x00040924, 0x00000000, 0x48531062, 0x00800528, + 0x00000000, 0xaaa964b9, 0x0020112c, 0x00000000, 0x7690af6f, 0x00402930, 0x00000000, 0x078d7060, + 0x00040934, 0x00000000, 0x5d6e3ec7, 0x00040401, 0x00000000, 0x57e7079a, 0x00040405, 0x00000000, + 0x7467fafd, 0x00040409, 0x00000000, 0x9e826b50, 0x0004040d, 0x00000000, 0xdc484f18, 0x00040411, + 0x00000000, 0x5da8bca3, 0x00040415, 0x00000000, 0x5ca726d8, 0x00040419, 0x00000000, 0x5dd28360, + 0x0004041d, 0x00000000, 0x57efa0be, 0x00040421, 0x00000000, 0x502363d5, 0x00040425, 0x00000000, + 0x506d14bd, 0x00040429, 0x00000000, 0xb2609506, 0x0010042d, 0x00000000, 0x9e5cfb8a, 0x00040c31, + 0x00000000, 0xc918df3e, 0x00040835, 0x00000000, 0xc9751c9c, 0x00040839, 0x00000000, 0xc97ef77a, + 0x0004083d, 0x00000000, 0xc927c6b9, 0x00040841, 0x00000000, 0xc92a1ec5, 0x00040845, 0x00000000, + 0xc9e01b31, 0x00040849, 0x00000000, 0x50685f29, 0x0004044d, 0x00000000, 0xb26219ca, 0x00100451, + 0x00000000, 0xb25b6cf9, 0x00100455, 0x00000000, 0xb2f86101, 0x00100459, 0x00000000, 0x07e3b155, + 0x0004085d, 0x00000000, 0x07e383c6, 0x00040861, 0x00000000, 0xbda98653, 0x00400465, 0x00000000, + 0xbdbd1d0f, 0x00800469, 0x00000000, 0xbd946fd4, 0x0080046d, 0x00000000, 0xbdf02a4c, 0x00800471, + 0x00000000, 0x19e93e85, 0x00040402, 0x00000000, 0x3b5c2af3, 0x00040406, 0x00000000, 0x47974a35, + 0x0004040a, 0x00000000, 0x105971c2, 0x0004040e, 0x00000000, 0x7d137765, 0x00040412, 0x00000000, + 0xd187febc, 0x00040416, 0x00000000, 0x12f854ac, 0x0004041a, 0x00000000, 0x40d49ad1, 0x0004041e, + 0x00000000, 0x8c0923da, 0x00040422, 0x00000000, 0xbb8df494, 0x00040426, 0x00000000, 0xf6d8a76e, + 0x0004042a, 0x00000000, 0x7620f1e9, 0x0004042e, 0x00000000, 0x9ebfab10, 0x00040432, 0x00000000, + 0x98a09d0e, 0x00040836, 0x00000000, 0x195d37d2, 0x0010083a, 0x00000000, 0xf9ec4f85, 0x0010103e, + 0x00000000, 0x4626b750, 0x00080842, 0x00000000, 0x4cc673a0, 0x00200446, 0x00000000, 0xde5b3431, + 0x0004044a, 0x00000000, 0x036ac8a6, 0x000c044e, 0x00000000, }; static CompactRegisterDefaults g_agc_public_reg_defaults_v8 = { - g_agc_public_reg_defaults_v8_tbl0_regs, 489, g_agc_public_reg_defaults_v8_tbl0_ptrs, 78, - g_agc_public_reg_defaults_v8_tbl1_regs, 159, g_agc_public_reg_defaults_v8_tbl1_ptrs, 29, - g_agc_public_reg_defaults_v8_tbl2_regs, 55, g_agc_public_reg_defaults_v8_tbl2_ptrs, 20, - nullptr, 0, nullptr, 0, - g_agc_public_reg_defaults_v8_types, 127, + g_agc_public_reg_defaults_v8_tbl0_regs, + 489, + g_agc_public_reg_defaults_v8_tbl0_ptrs, + 78, + g_agc_public_reg_defaults_v8_tbl1_regs, + 159, + g_agc_public_reg_defaults_v8_tbl1_ptrs, + 29, + g_agc_public_reg_defaults_v8_tbl2_regs, + 55, + g_agc_public_reg_defaults_v8_tbl2_ptrs, + 20, + nullptr, + 0, + nullptr, + 0, + g_agc_public_reg_defaults_v8_types, + 127, }; // g_agc_public_reg_defaults_v9: regs=(489, 160, 55, 0), ptrs=(78, 29, 20, 0), types=127. @@ -2652,9 +2713,9 @@ static ShaderRegister g_agc_public_reg_defaults_v9_tbl1_regs[] = { }; static const uint16_t g_agc_public_reg_defaults_v9_tbl1_ptrs[] = { - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000a, 0x000b, - 0x000f, 0x0013, 0x0015, 0x0017, 0x0019, 0x001b, 0x001d, 0x001f, 0x0020, 0x0024, 0x0028, 0x002c, - 0x002e, 0x0030, 0x0040, 0x0060, 0x0080, + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, + 0x000a, 0x000b, 0x000f, 0x0013, 0x0015, 0x0017, 0x0019, 0x001b, 0x001d, 0x001f, + 0x0020, 0x0024, 0x0028, 0x002c, 0x002e, 0x0030, 0x0040, 0x0060, 0x0080, }; static ShaderRegister g_agc_public_reg_defaults_v9_tbl2_regs[] = { @@ -2675,112 +2736,109 @@ static ShaderRegister g_agc_public_reg_defaults_v9_tbl2_regs[] = { }; static const uint16_t g_agc_public_reg_defaults_v9_tbl2_ptrs[] = { - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, 0x000a, 0x000b, - 0x000c, 0x000d, 0x000f, 0x0017, 0x0027, 0x002b, 0x0033, 0x0034, + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, 0x0008, 0x0009, + 0x000a, 0x000b, 0x000c, 0x000d, 0x000f, 0x0017, 0x0027, 0x002b, 0x0033, 0x0034, }; static uint32_t g_agc_public_reg_defaults_v9_types[] = { - 0xe24f806d, 0x00040400, 0x00000000, 0xf6c28182, 0x00040404, 0x00000000, - 0x6f6e55a5, 0x00040408, 0x00000000, 0x0bc65da4, 0x0004040c, 0x00000000, - 0x9e5ad592, 0x00040410, 0x00000000, 0xbb513b98, 0x00040414, 0x00000000, - 0xab64b23b, 0x00040418, 0x00000000, 0x53c39964, 0x0004041c, 0x00000000, - 0x01396b11, 0x00040420, 0x00000000, 0x7d42019a, 0x00040424, 0x00000000, - 0x3548f523, 0x00040428, 0x00000000, 0xf43ad28a, 0x0004042c, 0x00000000, - 0x6de4c312, 0x00040430, 0x00000000, 0x00a77ae0, 0x00040434, 0x00000000, - 0x00a779b7, 0x00040438, 0x00000000, 0x5100100c, 0x0004043c, 0x00000000, - 0x59958bba, 0x00040440, 0x00000000, 0x0c06f17c, 0x00040444, 0x00000000, - 0x6f104b72, 0x00040448, 0x00000000, 0x25c70d9c, 0x0004044c, 0x00000000, - 0x3881201e, 0x00040450, 0x00000000, 0x09afddaf, 0x00040454, 0x00000000, - 0x367d63cf, 0x00040458, 0x00000000, 0x43707db8, 0x0004045c, 0x00000000, - 0xf6ae26ba, 0x00040460, 0x00000000, 0x1b917652, 0x00040464, 0x00000000, - 0x94b1e4f7, 0x00040468, 0x00000000, 0xe3661b6c, 0x0004046c, 0x00000000, - 0x1eb8d73a, 0x00040470, 0x00000000, 0x15051fa3, 0x00040474, 0x00000000, - 0x9c51a7f1, 0x00040478, 0x00000000, 0xa20efc70, 0x0004047c, 0x00000000, - 0x0ec09f6e, 0x00040480, 0x00000000, 0x34a7d6d3, 0x00040484, 0x00000000, - 0xce831b94, 0x00040488, 0x00000000, 0x5cc72a74, 0x0004048c, 0x00000000, - 0x3b77713c, 0x00040490, 0x00000000, 0x40f64410, 0x00040494, 0x00000000, - 0x69441268, 0x00040498, 0x00000000, 0x2e418b83, 0x0004049c, 0x00000000, - 0xa00d0c8d, 0x000404a0, 0x00000000, 0xb1289fb3, 0x000404a4, 0x00000000, - 0x144832fb, 0x000404a8, 0x00000000, 0x9890d9fa, 0x000404ac, 0x00000000, - 0x9016faf1, 0x000404b0, 0x00000000, 0x4b73ce27, 0x000404b4, 0x00000000, - 0x5f5a3e7b, 0x000404b8, 0x00000000, 0xd4af3a51, 0x000404bc, 0x00000000, - 0x6cf4f543, 0x000404c0, 0x00000000, 0x5fb86ccb, 0x000404c4, 0x00000000, - 0xedefa188, 0x000404c8, 0x00000000, 0xd0de9ee6, 0x000404cc, 0x00000000, - 0xc5831803, 0x000404d0, 0x00000000, 0x8e6de84b, 0x000404d4, 0x00000000, - 0xd0771662, 0x000408d8, 0x00000000, 0x569f7444, 0x004004dc, 0x00000000, - 0x5c6637cd, 0x000408e0, 0x00000000, 0xcae3e690, 0x000408e4, 0x00000000, - 0x43fbd769, 0x000410e8, 0x00000000, 0xef550356, 0x002004ec, 0x00000000, - 0x8f52e279, 0x000408f0, 0x00000000, 0x1f2d8149, 0x001008f4, 0x00000000, - 0x853d0614, 0x000404f8, 0x00000000, 0x4413c6f9, 0x000408fc, 0x00000000, - 0x67096014, 0x00044100, 0x00000000, 0x88f5e915, 0x00040904, 0x00000000, - 0x033f1eff, 0x00040908, 0x00000000, 0x918106bb, 0x0004090c, 0x00000000, - 0x95f0e7ac, 0x00041110, 0x00000000, 0xb48cbab2, 0x00040914, 0x00000000, - 0x05bb3bc6, 0x00040918, 0x00000000, 0x94faba07, 0x0004091c, 0x00000000, - 0x38e92c91, 0x00204120, 0x00000000, 0x0b177b43, 0x00040924, 0x00000000, - 0x48531062, 0x00800528, 0x00000000, 0xaaa964b9, 0x0020112c, 0x00000000, - 0x7690af6f, 0x00402930, 0x00000000, 0x078d7060, 0x00040934, 0x00000000, - 0x5d6e3ec7, 0x00040401, 0x00000000, 0x57e7079a, 0x00040405, 0x00000000, - 0x7467fafd, 0x00040409, 0x00000000, 0x9e826b50, 0x0004040d, 0x00000000, - 0xdc484f18, 0x00040411, 0x00000000, 0x5da8bca3, 0x00040415, 0x00000000, - 0x5ca726d8, 0x00040419, 0x00000000, 0x5dd28360, 0x0004041d, 0x00000000, - 0x57efa0be, 0x00040421, 0x00000000, 0x502363d5, 0x00040425, 0x00000000, - 0x506d14bd, 0x00040429, 0x00000000, 0xb2609506, 0x0010042d, 0x00000000, - 0x9e5cfb8a, 0x00041031, 0x00000000, 0xc918df3e, 0x00040835, 0x00000000, - 0xc9751c9c, 0x00040839, 0x00000000, 0xc97ef77a, 0x0004083d, 0x00000000, - 0xc927c6b9, 0x00040841, 0x00000000, 0xc92a1ec5, 0x00040845, 0x00000000, - 0xc9e01b31, 0x00040849, 0x00000000, 0x50685f29, 0x0004044d, 0x00000000, - 0xb26219ca, 0x00100451, 0x00000000, 0xb25b6cf9, 0x00100455, 0x00000000, - 0xb2f86101, 0x00100459, 0x00000000, 0x07e3b155, 0x0004085d, 0x00000000, - 0x07e383c6, 0x00040861, 0x00000000, 0xbda98653, 0x00400465, 0x00000000, - 0xbdbd1d0f, 0x00800469, 0x00000000, 0xbd946fd4, 0x0080046d, 0x00000000, - 0xbdf02a4c, 0x00800471, 0x00000000, 0x19e93e85, 0x00040402, 0x00000000, - 0x3b5c2af3, 0x00040406, 0x00000000, 0x47974a35, 0x0004040a, 0x00000000, - 0x105971c2, 0x0004040e, 0x00000000, 0x7d137765, 0x00040412, 0x00000000, - 0xd187febc, 0x00040416, 0x00000000, 0x12f854ac, 0x0004041a, 0x00000000, - 0x40d49ad1, 0x0004041e, 0x00000000, 0x8c0923da, 0x00040422, 0x00000000, - 0xbb8df494, 0x00040426, 0x00000000, 0xf6d8a76e, 0x0004042a, 0x00000000, - 0x7620f1e9, 0x0004042e, 0x00000000, 0x9ebfab10, 0x00040432, 0x00000000, - 0x98a09d0e, 0x00040836, 0x00000000, 0x195d37d2, 0x0010083a, 0x00000000, - 0xf9ec4f85, 0x0010103e, 0x00000000, 0x4626b750, 0x00080842, 0x00000000, - 0x4cc673a0, 0x00200446, 0x00000000, 0xde5b3431, 0x0004044a, 0x00000000, - 0x036ac8a6, 0x000c044e, 0x00000000, + 0xe24f806d, 0x00040400, 0x00000000, 0xf6c28182, 0x00040404, 0x00000000, 0x6f6e55a5, 0x00040408, + 0x00000000, 0x0bc65da4, 0x0004040c, 0x00000000, 0x9e5ad592, 0x00040410, 0x00000000, 0xbb513b98, + 0x00040414, 0x00000000, 0xab64b23b, 0x00040418, 0x00000000, 0x53c39964, 0x0004041c, 0x00000000, + 0x01396b11, 0x00040420, 0x00000000, 0x7d42019a, 0x00040424, 0x00000000, 0x3548f523, 0x00040428, + 0x00000000, 0xf43ad28a, 0x0004042c, 0x00000000, 0x6de4c312, 0x00040430, 0x00000000, 0x00a77ae0, + 0x00040434, 0x00000000, 0x00a779b7, 0x00040438, 0x00000000, 0x5100100c, 0x0004043c, 0x00000000, + 0x59958bba, 0x00040440, 0x00000000, 0x0c06f17c, 0x00040444, 0x00000000, 0x6f104b72, 0x00040448, + 0x00000000, 0x25c70d9c, 0x0004044c, 0x00000000, 0x3881201e, 0x00040450, 0x00000000, 0x09afddaf, + 0x00040454, 0x00000000, 0x367d63cf, 0x00040458, 0x00000000, 0x43707db8, 0x0004045c, 0x00000000, + 0xf6ae26ba, 0x00040460, 0x00000000, 0x1b917652, 0x00040464, 0x00000000, 0x94b1e4f7, 0x00040468, + 0x00000000, 0xe3661b6c, 0x0004046c, 0x00000000, 0x1eb8d73a, 0x00040470, 0x00000000, 0x15051fa3, + 0x00040474, 0x00000000, 0x9c51a7f1, 0x00040478, 0x00000000, 0xa20efc70, 0x0004047c, 0x00000000, + 0x0ec09f6e, 0x00040480, 0x00000000, 0x34a7d6d3, 0x00040484, 0x00000000, 0xce831b94, 0x00040488, + 0x00000000, 0x5cc72a74, 0x0004048c, 0x00000000, 0x3b77713c, 0x00040490, 0x00000000, 0x40f64410, + 0x00040494, 0x00000000, 0x69441268, 0x00040498, 0x00000000, 0x2e418b83, 0x0004049c, 0x00000000, + 0xa00d0c8d, 0x000404a0, 0x00000000, 0xb1289fb3, 0x000404a4, 0x00000000, 0x144832fb, 0x000404a8, + 0x00000000, 0x9890d9fa, 0x000404ac, 0x00000000, 0x9016faf1, 0x000404b0, 0x00000000, 0x4b73ce27, + 0x000404b4, 0x00000000, 0x5f5a3e7b, 0x000404b8, 0x00000000, 0xd4af3a51, 0x000404bc, 0x00000000, + 0x6cf4f543, 0x000404c0, 0x00000000, 0x5fb86ccb, 0x000404c4, 0x00000000, 0xedefa188, 0x000404c8, + 0x00000000, 0xd0de9ee6, 0x000404cc, 0x00000000, 0xc5831803, 0x000404d0, 0x00000000, 0x8e6de84b, + 0x000404d4, 0x00000000, 0xd0771662, 0x000408d8, 0x00000000, 0x569f7444, 0x004004dc, 0x00000000, + 0x5c6637cd, 0x000408e0, 0x00000000, 0xcae3e690, 0x000408e4, 0x00000000, 0x43fbd769, 0x000410e8, + 0x00000000, 0xef550356, 0x002004ec, 0x00000000, 0x8f52e279, 0x000408f0, 0x00000000, 0x1f2d8149, + 0x001008f4, 0x00000000, 0x853d0614, 0x000404f8, 0x00000000, 0x4413c6f9, 0x000408fc, 0x00000000, + 0x67096014, 0x00044100, 0x00000000, 0x88f5e915, 0x00040904, 0x00000000, 0x033f1eff, 0x00040908, + 0x00000000, 0x918106bb, 0x0004090c, 0x00000000, 0x95f0e7ac, 0x00041110, 0x00000000, 0xb48cbab2, + 0x00040914, 0x00000000, 0x05bb3bc6, 0x00040918, 0x00000000, 0x94faba07, 0x0004091c, 0x00000000, + 0x38e92c91, 0x00204120, 0x00000000, 0x0b177b43, 0x00040924, 0x00000000, 0x48531062, 0x00800528, + 0x00000000, 0xaaa964b9, 0x0020112c, 0x00000000, 0x7690af6f, 0x00402930, 0x00000000, 0x078d7060, + 0x00040934, 0x00000000, 0x5d6e3ec7, 0x00040401, 0x00000000, 0x57e7079a, 0x00040405, 0x00000000, + 0x7467fafd, 0x00040409, 0x00000000, 0x9e826b50, 0x0004040d, 0x00000000, 0xdc484f18, 0x00040411, + 0x00000000, 0x5da8bca3, 0x00040415, 0x00000000, 0x5ca726d8, 0x00040419, 0x00000000, 0x5dd28360, + 0x0004041d, 0x00000000, 0x57efa0be, 0x00040421, 0x00000000, 0x502363d5, 0x00040425, 0x00000000, + 0x506d14bd, 0x00040429, 0x00000000, 0xb2609506, 0x0010042d, 0x00000000, 0x9e5cfb8a, 0x00041031, + 0x00000000, 0xc918df3e, 0x00040835, 0x00000000, 0xc9751c9c, 0x00040839, 0x00000000, 0xc97ef77a, + 0x0004083d, 0x00000000, 0xc927c6b9, 0x00040841, 0x00000000, 0xc92a1ec5, 0x00040845, 0x00000000, + 0xc9e01b31, 0x00040849, 0x00000000, 0x50685f29, 0x0004044d, 0x00000000, 0xb26219ca, 0x00100451, + 0x00000000, 0xb25b6cf9, 0x00100455, 0x00000000, 0xb2f86101, 0x00100459, 0x00000000, 0x07e3b155, + 0x0004085d, 0x00000000, 0x07e383c6, 0x00040861, 0x00000000, 0xbda98653, 0x00400465, 0x00000000, + 0xbdbd1d0f, 0x00800469, 0x00000000, 0xbd946fd4, 0x0080046d, 0x00000000, 0xbdf02a4c, 0x00800471, + 0x00000000, 0x19e93e85, 0x00040402, 0x00000000, 0x3b5c2af3, 0x00040406, 0x00000000, 0x47974a35, + 0x0004040a, 0x00000000, 0x105971c2, 0x0004040e, 0x00000000, 0x7d137765, 0x00040412, 0x00000000, + 0xd187febc, 0x00040416, 0x00000000, 0x12f854ac, 0x0004041a, 0x00000000, 0x40d49ad1, 0x0004041e, + 0x00000000, 0x8c0923da, 0x00040422, 0x00000000, 0xbb8df494, 0x00040426, 0x00000000, 0xf6d8a76e, + 0x0004042a, 0x00000000, 0x7620f1e9, 0x0004042e, 0x00000000, 0x9ebfab10, 0x00040432, 0x00000000, + 0x98a09d0e, 0x00040836, 0x00000000, 0x195d37d2, 0x0010083a, 0x00000000, 0xf9ec4f85, 0x0010103e, + 0x00000000, 0x4626b750, 0x00080842, 0x00000000, 0x4cc673a0, 0x00200446, 0x00000000, 0xde5b3431, + 0x0004044a, 0x00000000, 0x036ac8a6, 0x000c044e, 0x00000000, }; static CompactRegisterDefaults g_agc_public_reg_defaults_v9 = { - g_agc_public_reg_defaults_v9_tbl0_regs, 489, g_agc_public_reg_defaults_v9_tbl0_ptrs, 78, - g_agc_public_reg_defaults_v9_tbl1_regs, 160, g_agc_public_reg_defaults_v9_tbl1_ptrs, 29, - g_agc_public_reg_defaults_v9_tbl2_regs, 55, g_agc_public_reg_defaults_v9_tbl2_ptrs, 20, - nullptr, 0, nullptr, 0, - g_agc_public_reg_defaults_v9_types, 127, + g_agc_public_reg_defaults_v9_tbl0_regs, + 489, + g_agc_public_reg_defaults_v9_tbl0_ptrs, + 78, + g_agc_public_reg_defaults_v9_tbl1_regs, + 160, + g_agc_public_reg_defaults_v9_tbl1_ptrs, + 29, + g_agc_public_reg_defaults_v9_tbl2_regs, + 55, + g_agc_public_reg_defaults_v9_tbl2_ptrs, + 20, + nullptr, + 0, + nullptr, + 0, + g_agc_public_reg_defaults_v9_types, + 127, }; static CompactRegisterDefaults* g_agc_public_reg_defaults_by_version[] = { - &g_agc_public_reg_defaults_v0, // version 0 - &g_agc_public_reg_defaults_v0, // version 1 - &g_agc_public_reg_defaults_v0, // version 2 - &g_agc_public_reg_defaults_v0, // version 3 - &g_agc_public_reg_defaults_v4, // version 4 - &g_agc_public_reg_defaults_v5, // version 5 - &g_agc_public_reg_defaults_v5, // version 6 - &g_agc_public_reg_defaults_v7, // version 7 - &g_agc_public_reg_defaults_v8, // version 8 - &g_agc_public_reg_defaults_v9, // version 9 + &g_agc_public_reg_defaults_v0, // version 0 + &g_agc_public_reg_defaults_v0, // version 1 + &g_agc_public_reg_defaults_v0, // version 2 + &g_agc_public_reg_defaults_v0, // version 3 + &g_agc_public_reg_defaults_v4, // version 4 + &g_agc_public_reg_defaults_v5, // version 5 + &g_agc_public_reg_defaults_v5, // version 6 + &g_agc_public_reg_defaults_v7, // version 7 + &g_agc_public_reg_defaults_v8, // version 8 + &g_agc_public_reg_defaults_v9, // version 9 &g_agc_public_reg_defaults_v10, // version 10 &g_agc_public_reg_defaults_v11, // version 11 &g_agc_public_reg_defaults_v10, // version 12 }; static CompactRegisterDefaults* g_agc_internal_reg_defaults_by_version[] = { - &g_agc_internal_reg_defaults_v0, // version 0 - &g_agc_internal_reg_defaults_v0, // version 1 - &g_agc_internal_reg_defaults_v0, // version 2 - &g_agc_internal_reg_defaults_v0, // version 3 - &g_agc_internal_reg_defaults_v4, // version 4 - &g_agc_internal_reg_defaults_v5, // version 5 - &g_agc_internal_reg_defaults_v5, // version 6 - &g_agc_internal_reg_defaults_v7, // version 7 - &g_agc_internal_reg_defaults_v8, // version 8 - &g_agc_internal_reg_defaults_v9, // version 9 + &g_agc_internal_reg_defaults_v0, // version 0 + &g_agc_internal_reg_defaults_v0, // version 1 + &g_agc_internal_reg_defaults_v0, // version 2 + &g_agc_internal_reg_defaults_v0, // version 3 + &g_agc_internal_reg_defaults_v4, // version 4 + &g_agc_internal_reg_defaults_v5, // version 5 + &g_agc_internal_reg_defaults_v5, // version 6 + &g_agc_internal_reg_defaults_v7, // version 7 + &g_agc_internal_reg_defaults_v8, // version 8 + &g_agc_internal_reg_defaults_v9, // version 9 &g_agc_internal_reg_defaults_v10, // version 10 &g_agc_internal_reg_defaults_v11, // version 11 &g_agc_internal_reg_defaults_v10, // version 12 diff --git a/src/libs/libAudio2.cpp b/src/libs/libAudio2.cpp index 24a5106..cc8b879 100644 --- a/src/libs/libAudio2.cpp +++ b/src/libs/libAudio2.cpp @@ -366,7 +366,7 @@ static void audioout2_queue_context_audio(AudioOut2ContextHandle ctx, bool block } (void)AudioInternal::AudioOutOutputs(params.data(), static_cast(params.size()), - blocking); + blocking); } static void audioout2_close_audio_handle(int audio_handle) {