MCPcopy Create free account
hub / github.com/ValveSoftware/Proton / copy_texture_map_data

Function copy_texture_map_data

vrclient_x64/unixlib.cpp:448–466  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

446}
447
448static uint8_t *copy_texture_map_data( const uint8_t *src, unsigned int width, unsigned int height, unsigned int mips,
449 int format )
450{
451 unsigned int size = 0, i;
452 uint8_t *ret;
453
454 if (format) FIXME( "Unhandled format %d.\n", format );
455
456 for (i = 0; i < mips; ++i)
457 {
458 size += width * height;
459 if (width > 1) width >>= 1;
460 if (height > 1) height >>= 1;
461 }
462 size *= 4;
463 ret = (uint8_t *)alloc_low_mem( size );
464 memcpy( ret, src, size );
465 return ret;
466}
467
468w32_RenderModel_TextureMap_t_1237::operator u64_RenderModel_TextureMap_t_1237() const
469{

Callers 1

unixlib.cppFile · 0.85

Calls 1

alloc_low_memFunction · 0.85

Tested by

no test coverage detected