From da4baefdf0e66437cb763155741f0144704fbd66 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Thu, 4 Apr 2019 13:15:59 +0200 Subject: [PATCH] [spirv] Fix initial allocation size for compressed buffer The old initial size was still for uint8. --- src/spirv/spirv_compression.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/spirv/spirv_compression.cpp b/src/spirv/spirv_compression.cpp index c3f8e90ae..6c3f68753 100644 --- a/src/spirv/spirv_compression.cpp +++ b/src/spirv/spirv_compression.cpp @@ -20,7 +20,7 @@ namespace dxvk { // the number of bytes it takes in the compressed buffer. // This way, it can achieve a compression ratio of ~50%. m_mask.reserve((m_size + NumMaskWords - 1) / NumMaskWords); - m_code.reserve(m_size * 4); + m_code.reserve((m_size + 1) / 2); uint64_t dstWord = 0; uint32_t dstShift = 0;