Replaces instances of valloc() with vramalloc()

This commit is contained in:
Ian 2023-03-27 13:07:48 -04:00 committed by GitHub
parent 5a16a272c5
commit 0215e51529
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2610,7 +2610,7 @@ int GL_LoadTexture (const char *identifier, int width, int height, const byte *d
} }
// Allocate the VRAM. // Allocate the VRAM.
texture.vram = static_cast<texel*>(valloc(buffer_size)); texture.vram = static_cast<texel*>(vramalloc(buffer_size));
// Upload the texture. // Upload the texture.
GL_Upload8(texture_index, data, width, height); GL_Upload8(texture_index, data, width, height);
@ -2793,7 +2793,7 @@ int GL_LoadPalTex (const char *identifier, int width, int height, const byte *da
} }
// Allocate the VRAM. // Allocate the VRAM.
texture.vram = static_cast<texel*>(valloc(buffer_size)); texture.vram = static_cast<texel*>(vramalloc(buffer_size));
// Upload the texture. // Upload the texture.
GL_Upload8(texture_index, data, width, height); GL_Upload8(texture_index, data, width, height);
@ -2927,7 +2927,7 @@ int GL_LoadTextureLM (const char *identifier, int width, int height, const byte
} }
// Allocate the VRAM. // Allocate the VRAM.
texture.vram = static_cast<texel*>(valloc(buffer_size)); texture.vram = static_cast<texel*>(vramalloc(buffer_size));
// Upload the texture. // Upload the texture.
if(!texture.swizzle) if(!texture.swizzle)
@ -3201,7 +3201,7 @@ int GL_LoadImages (const char *identifier, int width, int height, const byte *da
} }
// Allocate the VRAM. // Allocate the VRAM.
texture.vram = static_cast<texel*>(valloc(buffer_size)); texture.vram = static_cast<texel*>(vramalloc(buffer_size));
// Upload the texture. // Upload the texture.
switch(texture.format) switch(texture.format)