mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-10-10 06:11:36 +00:00
Move CalcNumMips to common header so GL code can access it
This commit is contained in:
1 parent
c1c6d635d9
commit
4a79ac8039
4 files changed
+17
-17
No files matched your search
@@ -223,6 +223,21 @@ bool FindDiffRange(void *a, void *b, size_t bufSize, size_t &diffStart, size_t &
|
||||
return diffStart < bufSize;
|
||||
}
|
||||
|
||||
uint32_t CalcNumMips(int w, int h, int d)
|
||||
{
|
||||
int mipLevels = 1;
|
||||
|
||||
while(w > 1 || h > 1 || d > 1)
|
||||
{
|
||||
w = RDCMAX(1, w>>1);
|
||||
h = RDCMAX(1, h>>1);
|
||||
d = RDCMAX(1, d>>1);
|
||||
mipLevels++;
|
||||
}
|
||||
|
||||
return mipLevels;
|
||||
}
|
||||
|
||||
static string &logfile()
|
||||
{
|
||||
static string fn;
|
||||
|
||||
Reference in new issue
Block a user