mirror of
https://git.citron-emu.org/citron/emulator
synced 2026-01-08 18:57:56 +00:00
This commit properly implements the ISBERD (Internal Stage Buffer Entry Read) instruction that was previously stubbed. The implementation supports all modes and shift types: - Patch mode: Reads tessellation patch attributes using ir.GetPatch() - Prim mode: Reads primitive attributes for geometry shaders - Attr mode: Reads generic vertex attributes - Default mode: Maintains backward compatibility The implementation also supports: - U16 and B32 shift modes for different data formats - SKEW and O flags for advanced buffer addressing - Proper data type conversions and bit casting This fixes rendering issues in UE4 titles that rely on internal stage buffer operations in tessellation and geometry shaders. The previous stubbed implementation caused compatibility problems with modern rendering pipelines. Credit: Hayate Yoshida (吉田 疾風) <hayate@citron-emu.org> for discovering the root cause and providing insight on the proper implementation approach. Fixes: Internal stage buffer read operations in tessellation shaders Resolves: UE4 title rendering issues related to ISBERD instruction Signed-off-by: Zephyron <zephyron@citron-emu.org>