forked from suyu/suyu
astc: Initialize vector size directly in Decompress
There's no need to perform a separate resize.
This commit is contained in:
parent
0f148548f3
commit
6a03badcbc
1 changed files with 1 additions and 2 deletions
|
@ -1600,8 +1600,7 @@ namespace Tegra::Texture::ASTC {
|
||||||
std::vector<uint8_t> Decompress(std::vector<uint8_t>& data, uint32_t width, uint32_t height,
|
std::vector<uint8_t> Decompress(std::vector<uint8_t>& data, uint32_t width, uint32_t height,
|
||||||
uint32_t block_width, uint32_t block_height) {
|
uint32_t block_width, uint32_t block_height) {
|
||||||
uint32_t blockIdx = 0;
|
uint32_t blockIdx = 0;
|
||||||
std::vector<uint8_t> outData;
|
std::vector<uint8_t> outData(height * width * 4);
|
||||||
outData.resize(height * width * 4);
|
|
||||||
for (uint32_t j = 0; j < height; j += block_height) {
|
for (uint32_t j = 0; j < height; j += block_height) {
|
||||||
for (uint32_t i = 0; i < width; i += block_width) {
|
for (uint32_t i = 0; i < width; i += block_width) {
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue