anv: Add INTEL_DEBUG for bvh dump and visualization tools
This commit allows you to dump different regions of memory related to bvh building. An additional script to decode the memory dump is also added, and you're able to view the built bvh in 3D view in html. See the included README.md for usage. Rework: - you can now view the actual child_coord in internalNode in html - change exponent to be int8_t in the interpreter - fix the actual coordinates using an updated formula - now you can have 3D view of the bvh - blockIncr could be 2 and vk_aabb should be first - Now, if any bvh dump is enabled, we will zero out tlas, to prevent gpu hang caused by incorrect tlas traversal - rootNodeOffset is back to the beginning - Add INTEL_DEBUG=bvh_no_build. - Fix type of dump_size - add assertion for a 4B alignment - when clearing out bvh, only clear out everything after (header+bvh_offset) - TODO: instead of dumping on destory, track in the command buffer Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31588>
This commit is contained in:
@@ -94,6 +94,13 @@ static const struct debug_control debug_control[] = {
|
||||
DEBUG_TES | DEBUG_GS | DEBUG_CS |
|
||||
DEBUG_RT | DEBUG_TASK | DEBUG_MESH },
|
||||
{ "rt", DEBUG_RT },
|
||||
{ "bvh_blas", DEBUG_BVH_BLAS},
|
||||
{ "bvh_tlas", DEBUG_BVH_TLAS},
|
||||
{ "bvh_blas_ir_hdr", DEBUG_BVH_BLAS_IR_HDR},
|
||||
{ "bvh_tlas_ir_hdr", DEBUG_BVH_TLAS_IR_HDR},
|
||||
{ "bvh_blas_ir_as", DEBUG_BVH_BLAS_IR_AS},
|
||||
{ "bvh_tlas_ir_as", DEBUG_BVH_TLAS_IR_AS},
|
||||
{ "bvh_no_build", DEBUG_BVH_NO_BUILD},
|
||||
{ "task", DEBUG_TASK },
|
||||
{ "mesh", DEBUG_MESH },
|
||||
{ "stall", DEBUG_STALL },
|
||||
|
||||
@@ -99,6 +99,13 @@ extern uint64_t intel_debug;
|
||||
#define DEBUG_REG_PRESSURE (1ull << 51)
|
||||
#define DEBUG_SHADER_PRINT (1ull << 52)
|
||||
#define DEBUG_CL_QUIET (1ull << 53)
|
||||
#define DEBUG_BVH_BLAS (1ull << 54)
|
||||
#define DEBUG_BVH_TLAS (1ull << 55)
|
||||
#define DEBUG_BVH_BLAS_IR_HDR (1ull << 56)
|
||||
#define DEBUG_BVH_TLAS_IR_HDR (1ull << 57)
|
||||
#define DEBUG_BVH_BLAS_IR_AS (1ull << 58)
|
||||
#define DEBUG_BVH_TLAS_IR_AS (1ull << 59)
|
||||
#define DEBUG_BVH_NO_BUILD (1ull << 60)
|
||||
|
||||
#define DEBUG_ANY (~0ull)
|
||||
|
||||
@@ -110,6 +117,12 @@ extern uint64_t intel_debug;
|
||||
(DEBUG_NO_DUAL_OBJECT_GS | DEBUG_SPILL_FS | \
|
||||
DEBUG_SPILL_VEC4 | DEBUG_NO_COMPACTION | DEBUG_DO32 | DEBUG_SOFT64)
|
||||
|
||||
/* Flags to determine what bvh to dump out */
|
||||
#define DEBUG_BVH_ANV (DEBUG_BVH_BLAS | DEBUG_BVH_TLAS)
|
||||
#define DEBUG_BVH_IR_HDR (DEBUG_BVH_BLAS_IR_HDR | DEBUG_BVH_TLAS_IR_HDR)
|
||||
#define DEBUG_BVH_IR_AS (DEBUG_BVH_BLAS_IR_AS | DEBUG_BVH_TLAS_IR_AS)
|
||||
#define DEBUG_BVH_ANY (DEBUG_BVH_ANV | DEBUG_BVH_IR_HDR | DEBUG_BVH_IR_AS)
|
||||
|
||||
extern uint64_t intel_simd;
|
||||
extern uint32_t intel_debug_bkp_before_draw_count;
|
||||
extern uint32_t intel_debug_bkp_after_draw_count;
|
||||
|
||||
Reference in New Issue
Block a user