From e3ef115804b46e8bfc594987b04b1059aed5e002 Mon Sep 17 00:00:00 2001 From: skal Date: Sun, 1 Feb 2026 18:56:47 +0100 Subject: feat(gpu/assets): Fix tests, integrate bumpy 3D renderer and procedural assets - Fixed test_sequence by restoring MainSequence::init_test for mocking. - Corrected CMakeLists.txt dependencies and source groupings to prevent duplicate symbols. - standardizing Effect constructor signature for seq_compiler compatibility. - Implemented Hybrid3DEffect using bumpy Renderer3D and procedural NOISE_TEX. - Updated MainSequence to support depth buffer for 3D elements. - Formatted all source files with clang-format. --- src/tests/test_assets.cc | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/tests/test_assets.cc') diff --git a/src/tests/test_assets.cc b/src/tests/test_assets.cc index dd77b73..c7d41e5 100644 --- a/src/tests/test_assets.cc +++ b/src/tests/test_assets.cc @@ -51,11 +51,13 @@ int main() { // Test procedural asset printf("\nRunning Procedural Asset test...\n"); size_t proc_size = 0; - const uint8_t* proc_data_1 = GetAsset(AssetId::ASSET_PROC_NOISE_256, &proc_size); + const uint8_t* proc_data_1 = + GetAsset(AssetId::ASSET_PROC_NOISE_256, &proc_size); assert(proc_data_1 != nullptr); assert(proc_size == 256 * 256 * 4); // 256x256 RGBA8 - - // Verify first few bytes are not all zero (noise should produce non-zero data) + + // Verify first few bytes are not all zero (noise should produce non-zero + // data) bool non_zero_data = false; for (size_t i = 0; i < 16; ++i) { // Check first 16 bytes if (proc_data_1[i] != 0) { @@ -69,10 +71,12 @@ int main() { // Test DropAsset for procedural asset and re-generation DropAsset(AssetId::ASSET_PROC_NOISE_256, proc_data_1); // After dropping, GetAsset should generate new data - const uint8_t* proc_data_2 = GetAsset(AssetId::ASSET_PROC_NOISE_256, &proc_size); + const uint8_t* proc_data_2 = + GetAsset(AssetId::ASSET_PROC_NOISE_256, &proc_size); assert(proc_data_2 != nullptr); - // assert(proc_data_1 != proc_data_2); // Removed: Allocator might reuse the same address - + // assert(proc_data_1 != proc_data_2); // Removed: Allocator might reuse the + // same address + // Verify content again to ensure it was re-generated correctly non_zero_data = false; for (size_t i = 0; i < 16; ++i) { -- cgit v1.2.3