mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-19 19:18:15 -05:00
citra_qt: Add enhanced texture debugging widgets.
Double-clicking a texture parameter command in the pica command lists will spawn these as a new tab in the pica command list dock area.
This commit is contained in:
@ -382,6 +382,18 @@ const Math::Vec4<u8> LookupTexture(const u8* source, int x, int y, const Texture
|
||||
return { source_ptr[2], source_ptr[1], source_ptr[0], 255 };
|
||||
}
|
||||
|
||||
TextureInfo TextureInfo::FromPicaRegister(const Regs::TextureConfig& config,
|
||||
const Regs::TextureFormat& format)
|
||||
{
|
||||
TextureInfo info;
|
||||
info.address = config.GetPhysicalAddress();
|
||||
info.width = config.width;
|
||||
info.height = config.height;
|
||||
info.format = format;
|
||||
info.stride = Pica::Regs::BytesPerPixel(info.format) * info.width;
|
||||
return info;
|
||||
}
|
||||
|
||||
void DumpTexture(const Pica::Regs::TextureConfig& texture_config, u8* data) {
|
||||
// NOTE: Permanently enabling this just trashes hard disks for no reason.
|
||||
// Hence, this is currently disabled.
|
||||
|
@ -192,10 +192,14 @@ void OnPicaRegWrite(u32 id, u32 value);
|
||||
std::unique_ptr<PicaTrace> FinishPicaTracing();
|
||||
|
||||
struct TextureInfo {
|
||||
unsigned int address;
|
||||
int width;
|
||||
int height;
|
||||
int stride;
|
||||
Pica::Regs::TextureFormat format;
|
||||
|
||||
static TextureInfo FromPicaRegister(const Pica::Regs::TextureConfig& config,
|
||||
const Pica::Regs::TextureFormat& format);
|
||||
};
|
||||
|
||||
const Math::Vec4<u8> LookupTexture(const u8* source, int x, int y, const TextureInfo& info);
|
||||
|
Reference in New Issue
Block a user