LunarG / gfxreconstruct

Graphics API Capture and Replay Tools for Reconstructing Graphics Application Behavior
https://vulkan.lunarg.com/doc/sdk/latest/linux/capture_tools.html
MIT License
379 stars 105 forks source link

Fix handle research in code generation #1539

Open marius-pelegrin-arm opened 3 weeks ago

marius-pelegrin-arm commented 3 weeks ago

The method BaseGenerator.check_struct_pnext_handles in base_generator.py should return True if the specified struct contains handles, handle pointers, or if a struct that contains handle or handle pointers can be referenced through it (either by the pNext chain or with a member that would be a struct or struct pointer).

Until now, to determine if a struct can reference such another struct, the method was retrieving valid_extension_structs which query structs that contains a field structextends with the checked struct. The issue is that if struct A and struct B both extend struct C, then struct A can be in the pNext chain of struct B (and otherwise) which was not detected.

This commit proposes to solve this issue by including in the valid_extensions_structs all the structs extending the parent struct of the checked struct.

ci-tester-lunarg commented 3 weeks ago

CI gfxreconstruct build queued with queue ID 181480.

ci-tester-lunarg commented 3 weeks ago

CI gfxreconstruct build # 4124 running.

ci-tester-lunarg commented 3 weeks ago

CI gfxreconstruct build # 4124 failed.

ci-tester-lunarg commented 3 days ago

CI gfxreconstruct build queued with queue ID 192841.

ci-tester-lunarg commented 3 days ago

CI gfxreconstruct build # 4243 running.

ci-tester-lunarg commented 3 days ago

CI gfxreconstruct build # 4243 passed.