summaryrefslogtreecommitdiff
path: root/indra/llrender/llimagegl.h
diff options
context:
space:
mode:
authorRye Mutt <rye@alchemyviewer.org>2023-09-28 16:05:37 -0400
committerGitHub <noreply@github.com>2023-09-28 15:05:37 -0500
commita4c2eab969b1971389408de5a3927f87d74a6d6d (patch)
tree0336e86ccab4476ae1e9f0851752ce4e516be6b0 /indra/llrender/llimagegl.h
parentb49632f4278078b0d10129a8c6742e145946cfff (diff)
Fix integer overflow when framebuffers are extremely high resolution resulting in INT_MAX texture bias (#393)
Diffstat (limited to 'indra/llrender/llimagegl.h')
-rw-r--r--indra/llrender/llimagegl.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/indra/llrender/llimagegl.h b/indra/llrender/llimagegl.h
index 243aeaea25..a9a6b93cb3 100644
--- a/indra/llrender/llimagegl.h
+++ b/indra/llrender/llimagegl.h
@@ -65,7 +65,7 @@ public:
// Size calculation
static S32 dataFormatBits(S32 dataformat);
- static S32 dataFormatBytes(S32 dataformat, S32 width, S32 height);
+ static S64 dataFormatBytes(S32 dataformat, S32 width, S32 height);
static S32 dataFormatComponents(S32 dataformat);
BOOL updateBindStats() const ;
@@ -145,8 +145,8 @@ public:
S32 getWidth(S32 discard_level = -1) const;
S32 getHeight(S32 discard_level = -1) const;
U8 getComponents() const { return mComponents; }
- S32 getBytes(S32 discard_level = -1) const;
- S32 getMipBytes(S32 discard_level = -1) const;
+ S64 getBytes(S32 discard_level = -1) const;
+ S64 getMipBytes(S32 discard_level = -1) const;
BOOL getBoundRecently() const;
BOOL isJustBound() const;
BOOL getHasExplicitFormat() const { return mHasExplicitFormat; }
@@ -208,7 +208,7 @@ public:
public:
// Various GL/Rendering options
- S32Bytes mTextureMemory;
+ S64Bytes mTextureMemory;
mutable F32 mLastBindTime; // last time this was bound, by discard level
private: