Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
XDG Integration
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
JennaHuntsman
XDG Integration
Commits
4e42170a
Commit
4e42170a
authored
1 year ago
by
Rye Mutt
Browse files
Options
Downloads
Patches
Plain Diff
Add cubemap array textures to video memory tracking
parent
0f7b8c04
No related branches found
Branches containing commit
No related tags found
2 merge requests
!3
Update to main branch
,
!2
Rebase onto current main branch
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
indra/llrender/llcubemaparray.cpp
+5
-0
5 additions, 0 deletions
indra/llrender/llcubemaparray.cpp
indra/llrender/llimagegl.cpp
+6
-2
6 additions, 2 deletions
indra/llrender/llimagegl.cpp
with
11 additions
and
2 deletions
indra/llrender/llcubemaparray.cpp
+
5
−
0
View file @
4e42170a
...
...
@@ -42,6 +42,9 @@
//#pragma optimize("", off)
// tex mem tracking
extern
void
alloc_tex_image
(
U32
width
,
U32
height
,
U32
pixformat
,
U32
count
);
// MUST match order of OpenGL face-layers
GLenum
LLCubeMapArray
::
sTargets
[
6
]
=
{
...
...
@@ -139,6 +142,8 @@ void LLCubeMapArray::allocate(U32 resolution, U32 components, U32 count, BOOL us
++
mip
;
}
alloc_tex_image
(
resolution
,
resolution
,
format
,
count
*
6
);
mImage
->
setAddressMode
(
LLTexUnit
::
TAM_CLAMP
);
if
(
use_mips
)
...
...
This diff is collapsed.
Click to expand it.
indra/llrender/llimagegl.cpp
+
6
−
2
View file @
4e42170a
...
...
@@ -63,11 +63,12 @@ static U64 sTextureBytes = 0;
// track a texture alloc on the currently bound texture.
// asserts that no currently tracked alloc exists
static
void
alloc_tex_image
(
U32
width
,
U32
height
,
U32
pixformat
)
void
alloc_tex_image
(
U32
width
,
U32
height
,
U32
pixformat
,
U32
count
)
{
U32
texUnit
=
gGL
.
getCurrentTexUnitIndex
();
U32
texName
=
gGL
.
getTexUnit
(
texUnit
)
->
getCurrTexture
();
U64
size
=
LLImageGL
::
dataFormatBytes
(
pixformat
,
width
,
height
);
size
*=
count
;
llassert
(
size
>=
0
);
...
...
@@ -285,7 +286,10 @@ S32 LLImageGL::dataFormatBits(S32 dataformat)
case
GL_RGB
:
return
24
;
case
GL_SRGB
:
return
24
;
case
GL_RGB8
:
return
24
;
case
GL_RGB16F
:
return
48
;
case
GL_RGBA
:
return
32
;
case
GL_RGBA8
:
return
32
;
case
GL_RGBA16F
:
return
64
;
case
GL_SRGB_ALPHA
:
return
32
;
case
GL_BGRA
:
return
32
;
// Used for QuickTime media textures on the Mac
case
GL_DEPTH_COMPONENT
:
return
24
;
...
...
@@ -1532,7 +1536,7 @@ void LLImageGL::setManualImage(U32 target, S32 miplevel, S32 intformat, S32 widt
sub_image_lines
(
target
,
miplevel
,
0
,
0
,
width
,
height
,
pixformat
,
pixtype
,
src
,
width
);
}
}
alloc_tex_image
(
width
,
height
,
pixformat
);
alloc_tex_image
(
width
,
height
,
pixformat
,
1
);
}
stop_glerror
();
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment