Don't truncate view id for uniform cache. (#3505)

This commit is contained in:
Branimir Karadžić
2025-11-23 16:42:06 -08:00
committed by GitHub
parent d396404fd3
commit 09ad5b2340

View File

@@ -2178,8 +2178,8 @@ namespace bgfx
{ {
using KeyT = uint64_t; using KeyT = uint64_t;
static constexpr uint8_t kViewShift = sizeof(KeyT)*8-kSortKeyViewNumBits; static constexpr uint8_t kViewShift = sizeof(KeyT)*8-16;
static constexpr KeyT kViewMask = KeyT(BGFX_CONFIG_MAX_VIEWS-1)<<kViewShift; static constexpr KeyT kViewMask = KeyT(UINT16_MAX)<<kViewShift;
static constexpr uint8_t kHandleShift = kViewShift - 16; static constexpr uint8_t kHandleShift = kViewShift - 16;
static constexpr KeyT kHandleMask = KeyT(UINT16_MAX)<<kHandleShift; static constexpr KeyT kHandleMask = KeyT(UINT16_MAX)<<kHandleShift;
static constexpr uint8_t kOffsetShift = kHandleShift-20; static constexpr uint8_t kOffsetShift = kHandleShift-20;