mirror of
				https://git.suyu.dev/suyu/suyu
				synced 2025-11-04 00:49:02 -06:00 
			
		
		
		
	GPU: Make the Textures::CopySwizzledData function accessible from the outside of the file.
This commit is contained in:
		@@ -27,9 +27,8 @@ static u32 GetSwizzleOffset(u32 x, u32 y, u32 image_width, u32 bytes_per_pixel,
 | 
			
		||||
    return address;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void CopySwizzledData(u32 width, u32 height, u32 bytes_per_pixel, u32 out_bytes_per_pixel,
 | 
			
		||||
                             u8* swizzled_data, u8* unswizzled_data, bool unswizzle,
 | 
			
		||||
                             u32 block_height) {
 | 
			
		||||
void CopySwizzledData(u32 width, u32 height, u32 bytes_per_pixel, u32 out_bytes_per_pixel,
 | 
			
		||||
                      u8* swizzled_data, u8* unswizzled_data, bool unswizzle, u32 block_height) {
 | 
			
		||||
    u8* data_ptrs[2];
 | 
			
		||||
    for (unsigned y = 0; y < height; ++y) {
 | 
			
		||||
        for (unsigned x = 0; x < width; ++x) {
 | 
			
		||||
 
 | 
			
		||||
@@ -17,6 +17,10 @@ namespace Texture {
 | 
			
		||||
std::vector<u8> UnswizzleTexture(VAddr address, TextureFormat format, u32 width, u32 height,
 | 
			
		||||
                                 u32 block_height = TICEntry::DefaultBlockHeight);
 | 
			
		||||
 | 
			
		||||
/// Copies texture data from a buffer and performs swizzling/unswizzling as necessary.
 | 
			
		||||
void CopySwizzledData(u32 width, u32 height, u32 bytes_per_pixel, u32 out_bytes_per_pixel,
 | 
			
		||||
                      u8* swizzled_data, u8* unswizzled_data, bool unswizzle, u32 block_height);
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Decodes an unswizzled texture into a A8R8G8B8 texture.
 | 
			
		||||
 */
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user