MCPcopy Create free account
hub / github.com/baldurk/renderdoc / CalcNumMips

Function CalcNumMips

renderdoc/common/common.cpp:181–194  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

179}
180
181uint32_t CalcNumMips(int w, int h, int d)
182{
183 int mipLevels = 1;
184
185 while(w > 1 || h > 1 || d > 1)
186 {
187 w = RDCMAX(1, w >> 1);
188 h = RDCMAX(1, h >> 1);
189 d = RDCMAX(1, d >> 1);
190 mipLevels++;
191 }
192
193 return mipLevels;
194}
195
196byte *AllocAlignedBuffer(uint64_t size, uint64_t alignment)
197{

Callers 15

GetNumMipsFunction · 0.85
GetTextureCompleteStatusFunction · 0.85
CreateCustomShaderTexMethod · 0.85
CreateCustomShaderTexMethod · 0.85
GetSubresourceCountFunction · 0.85
GetMipForSubresourceFunction · 0.85
GetSliceForSubresourceFunction · 0.85
GetDXTexturePropertiesFunction · 0.85

Calls 1

RDCMAXFunction · 0.85

Tested by

no test coverage detected