bgfxCross-platform, graphics API agnostic rendering library
1.128.8786.481graphicsΣ=0 1.128.8786.481Version of this port present on the latest quarterly branch.upstream: v1.172.9657-622A newer version was found upstream by portscout, first on 2026-11-27.
graphics/bgfx: correction for fix build on i386 with CPUTYPE=nehalem and newer
Previous patch truncating the value to 32-bits before taking the popcount.
Upstream made correct patch:
https://github.com/ARM-software/astc-encoder/issues/468#issuecomment-2119169136
This patch will be included in next release of the astc-encoder 4.9.
Also we can apply this patch to misc/astc-encoder (4.7 in ports).
PR: 278722
Fixes: 656401a (fix build on i386 with CPUTYPE=nehalem and newer)
graphics/bgfx: fix build on i386 with CPUTYPE=nehalem and newer
Build error:
/wrkdirs/usr/ports/graphics/bgfx/work/bgfx.cmake-1.127.8725-465/bimg/3rdparty/astc-encoder/source/astcenc_vecmathlib_sse_4.h:1313:26:
error: use of undeclared identifier '_mm_popcnt_u64'; did you mean
'_mm_popcnt_u32'?
return static_cast<int>(_mm_popcnt_u64(v));
^~~~~~~~~~~~~~
_mm_popcnt_u32
/usr/lib/clang/14.0.5/include/popcntintrin.h:33:1: note: '_mm_popcnt_u32'
declared here
_mm_popcnt_u32(unsigned int __A)
^
1 error generated.
Upstream issues:
https://github.com/ARM-software/astc-encoder/issues/468https://github.com/bkaradzic/bgfx/pull/2929#issuecomment-2093377116
PR: 278722
Approved by: yuri (maintainer timeout, 15 days)
graphics/bgfx: fix build on powerpc64* and probably riscv64
/wrkdirs/usr/ports/graphics/bgfx/work/bgfx.cmake-1.118.8398-370/bimg/3rdparty/nvtt/nvcore/debug.h:173:10:
error: cast from pointer to smaller type 'uint32' (aka 'unsigned int') loses
information
if (reinterpret_cast<uint32>(ptr) == 0xcccccccc) return false;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/wrkdirs/usr/ports/graphics/bgfx/work/bgfx.cmake-1.118.8398-370/bimg/3rdparty/nvtt/nvcore/debug.h:174:10:
error: cast from pointer to smaller type 'uint32' (aka 'unsigned int') loses
information
if (reinterpret_cast<uint32>(ptr) == 0xcdcdcdcd) return false;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/wrkdirs/usr/ports/graphics/bgfx/work/bgfx.cmake-1.118.8398-370/bimg/3rdparty/nvtt/nvcore/debug.h:175:10:
error: cast from pointer to smaller type 'uint32' (aka 'unsigned int') loses
information
if (reinterpret_cast<uint32>(ptr) == 0xdddddddd) return false;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/wrkdirs/usr/ports/graphics/bgfx/work/bgfx.cmake-1.118.8398-370/bimg/3rdparty/nvtt/nvcore/debug.h:176:10:
error: cast from pointer to smaller type 'uint32' (aka 'unsigned int') loses
information
if (reinterpret_cast<uint32>(ptr) == 0xffffffff) return false;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~