From 416113fdcb0b2441aadeb5d98a810415a18cb89f Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Thu, 15 Aug 2019 16:29:50 +0200 Subject: [PATCH] Drop support for ETC1 frame images. --- server/TracyTexture.cpp | 4 ++-- server/TracyTexture.hpp | 2 +- server/TracyView.cpp | 6 +++--- server/TracyWorker.cpp | 5 ----- server/TracyWorker.hpp | 1 - 5 files changed, 6 insertions(+), 12 deletions(-) diff --git a/server/TracyTexture.cpp b/server/TracyTexture.cpp index 1083fd81..99ea2164 100644 --- a/server/TracyTexture.cpp +++ b/server/TracyTexture.cpp @@ -25,11 +25,11 @@ void FreeTexture( void* _tex ) glDeleteTextures( 1, &tex ); } -void UpdateTexture( void* _tex, const char* data, int w, int h, bool etc ) +void UpdateTexture( void* _tex, const char* data, int w, int h ) { auto tex = (GLuint)(intptr_t)_tex; glBindTexture( GL_TEXTURE_2D, tex ); - glCompressedTexImage2D( GL_TEXTURE_2D, 0, etc ? GL_COMPRESSED_RGB8_ETC2 : COMPRESSED_RGB_S3TC_DXT1_EXT, w, h, 0, w * h / 2, data ); + glCompressedTexImage2D( GL_TEXTURE_2D, 0, COMPRESSED_RGB_S3TC_DXT1_EXT, w, h, 0, w * h / 2, data ); } } diff --git a/server/TracyTexture.hpp b/server/TracyTexture.hpp index 6f2f5e1d..87e03f04 100644 --- a/server/TracyTexture.hpp +++ b/server/TracyTexture.hpp @@ -6,7 +6,7 @@ namespace tracy void* MakeTexture(); void FreeTexture( void* tex ); -void UpdateTexture( void* tex, const char* data, int w, int h, bool etc ); +void UpdateTexture( void* tex, const char* data, int w, int h ); } diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 31bad99b..c5bf3873 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -1053,7 +1053,7 @@ void View::DrawFrames() if( fi != m_frameTexturePtr ) { if( !m_frameTexture ) m_frameTexture = MakeTexture(); - UpdateTexture( m_frameTexture, m_worker.UnpackFrameImage( *fi ), fi->w, fi->h, m_worker.HasEtc1FrameImages() ); + UpdateTexture( m_frameTexture, m_worker.UnpackFrameImage( *fi ), fi->w, fi->h ); m_frameTexturePtr = fi; } ImGui::Separator(); @@ -1467,7 +1467,7 @@ bool View::DrawZoneFrames( const FrameData& frames ) if( fi != m_frameTexturePtr ) { if( !m_frameTexture ) m_frameTexture = MakeTexture(); - UpdateTexture( m_frameTexture, m_worker.UnpackFrameImage( *fi ), fi->w, fi->h, m_worker.HasEtc1FrameImages() ); + UpdateTexture( m_frameTexture, m_worker.UnpackFrameImage( *fi ), fi->w, fi->h ); m_frameTexturePtr = fi; } ImGui::Separator(); @@ -9944,7 +9944,7 @@ void View::DrawPlayback() if( m_playback.currFrame != m_playback.frame ) { m_playback.currFrame = m_playback.frame; - UpdateTexture( m_playback.texture, m_worker.UnpackFrameImage( *fi ), fi->w, fi->h, m_worker.HasEtc1FrameImages() ); + UpdateTexture( m_playback.texture, m_worker.UnpackFrameImage( *fi ), fi->w, fi->h ); if( m_playback.sync ) { diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index 6f2a329e..027d4e0b 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -4615,9 +4615,4 @@ const char* Worker::UnpackFrameImage( const FrameImage& image ) return m_frameImageBuffer; } -bool Worker::HasEtc1FrameImages() const -{ - return m_traceVersion <= FileVersion( 0, 4, 9 ); -} - } diff --git a/server/TracyWorker.hpp b/server/TracyWorker.hpp index 74fa9e64..d59d36ae 100644 --- a/server/TracyWorker.hpp +++ b/server/TracyWorker.hpp @@ -378,7 +378,6 @@ public: const char* PackFrameImage( const char* image, uint16_t w, uint16_t h, uint32_t& csz ); const char* UnpackFrameImage( const FrameImage& image ); - bool HasEtc1FrameImages() const; private: void Exec();