diff options
| author | Rodrigo Locatti <reinuseslisp@airmail.cc> | 2021-03-30 19:31:52 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-30 19:31:52 -0300 |
| commit | 5ee669466fcebd2258229ed6bfe6b5e5529e0200 (patch) | |
| tree | 6dbf84fb5c2c9656f1d1ef6c46b2527ea1a205ff /src/video_core/textures/decoders.cpp | |
| parent | eeea426c745e26f20f1cf6c6929c377897ef3e68 (diff) | |
| parent | 2f83d9a61bca42d9ef24074beb2b11b19bd4cecd (diff) | |
Merge pull request #5927 from ameerj/astc-compute
video_core: Accelerate ASTC texture decoding using compute shaders
Diffstat (limited to 'src/video_core/textures/decoders.cpp')
| -rw-r--r-- | src/video_core/textures/decoders.cpp | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/src/video_core/textures/decoders.cpp b/src/video_core/textures/decoders.cpp index 62685a183..3a463d5db 100644 --- a/src/video_core/textures/decoders.cpp +++ b/src/video_core/textures/decoders.cpp @@ -17,26 +17,7 @@ #include "video_core/textures/texture.h" namespace Tegra::Texture { - namespace { -/** - * This table represents the internal swizzle of a gob, in format 16 bytes x 2 sector packing. - * Calculates the offset of an (x, y) position within a swizzled texture. - * Taken from the Tegra X1 Technical Reference Manual. pages 1187-1188 - */ -constexpr SwizzleTable MakeSwizzleTableConst() { - SwizzleTable table{}; - for (u32 y = 0; y < table.size(); ++y) { - for (u32 x = 0; x < table[0].size(); ++x) { - table[y][x] = ((x % 64) / 32) * 256 + ((y % 8) / 2) * 64 + ((x % 32) / 16) * 32 + - (y % 2) * 16 + (x % 16); - } - } - return table; -} - -constexpr SwizzleTable SWIZZLE_TABLE = MakeSwizzleTableConst(); - template <bool TO_LINEAR> void Swizzle(std::span<u8> output, std::span<const u8> input, u32 bytes_per_pixel, u32 width, u32 height, u32 depth, u32 block_height, u32 block_depth, u32 stride_alignment) { @@ -91,10 +72,6 @@ void Swizzle(std::span<u8> output, std::span<const u8> input, u32 bytes_per_pixe } } // Anonymous namespace -SwizzleTable MakeSwizzleTable() { - return SWIZZLE_TABLE; -} - void UnswizzleTexture(std::span<u8> output, std::span<const u8> input, u32 bytes_per_pixel, u32 width, u32 height, u32 depth, u32 block_height, u32 block_depth, u32 stride_alignment) { |
