mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-09 08:20:12 +01:00
radv: Rename node_internal to node_box32
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19017>
This commit is contained in:
parent
da856af2c9
commit
5f859f805b
4 changed files with 10 additions and 11 deletions
|
|
@ -293,7 +293,7 @@ ir_type_to_bvh_type(uint32_t type)
|
|||
case radv_ir_node_triangle:
|
||||
return radv_bvh_node_triangle;
|
||||
case radv_ir_node_internal:
|
||||
return radv_bvh_node_internal;
|
||||
return radv_bvh_node_box32;
|
||||
case radv_ir_node_instance:
|
||||
return radv_bvh_node_instance;
|
||||
case radv_ir_node_aabb:
|
||||
|
|
@ -340,7 +340,7 @@ calculate_node_bounds(VOID_REF bvh, uint32_t id)
|
|||
aabb.max = max(max(v0, v1), v2);
|
||||
break;
|
||||
}
|
||||
case radv_bvh_node_internal: {
|
||||
case radv_bvh_node_box32: {
|
||||
radv_bvh_box32_node internal = DEREF(REF(radv_bvh_box32_node)(node));
|
||||
aabb.min = vec3(INFINITY);
|
||||
aabb.max = vec3(-INFINITY);
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
#define BVH_BVH_H
|
||||
|
||||
#define radv_bvh_node_triangle 0
|
||||
#define radv_bvh_node_internal 5
|
||||
#define radv_bvh_node_box32 5
|
||||
#define radv_bvh_node_instance 6
|
||||
#define radv_bvh_node_aabb 7
|
||||
|
||||
|
|
@ -163,8 +163,7 @@ struct radv_bvh_box32_node {
|
|||
uint32_t reserved[4];
|
||||
};
|
||||
|
||||
/* a box32 node */
|
||||
#define RADV_BVH_ROOT_NODE radv_bvh_node_internal
|
||||
#define RADV_BVH_ROOT_NODE radv_bvh_node_box32
|
||||
#define RADV_BVH_INVALID_NODE 0xffffffffu
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ main()
|
|||
dst_node_offset = id_to_offset(RADV_BVH_ROOT_NODE);
|
||||
|
||||
REF(radv_bvh_box32_node) dst_node = REF(radv_bvh_box32_node)(OFFSET(args.output_bvh, dst_node_offset));
|
||||
uint32_t node_id = pack_node_id(dst_node_offset, radv_bvh_node_internal);
|
||||
uint32_t node_id = pack_node_id(dst_node_offset, radv_bvh_node_box32);
|
||||
|
||||
for (;;) {
|
||||
controlBarrier(gl_ScopeWorkgroup, gl_ScopeDevice, gl_StorageSemanticsBuffer,
|
||||
|
|
|
|||
|
|
@ -427,7 +427,7 @@ rra_validate_node(struct hash_table_u64 *accel_struct_vas, uint8_t *data,
|
|||
bool node_type_matches_as_type = true;
|
||||
|
||||
switch (type) {
|
||||
case radv_bvh_node_internal:
|
||||
case radv_bvh_node_box32:
|
||||
break;
|
||||
case radv_bvh_node_instance:
|
||||
node_type_matches_as_type = !is_bottom_level;
|
||||
|
|
@ -459,7 +459,7 @@ rra_validate_node(struct hash_table_u64 *accel_struct_vas, uint8_t *data,
|
|||
continue;
|
||||
}
|
||||
|
||||
if (type == radv_bvh_node_internal) {
|
||||
if (type == radv_bvh_node_box32) {
|
||||
result &= rra_validate_node(
|
||||
accel_struct_vas, data, (struct radv_bvh_box32_node *)(data + offset), root_node_offset,
|
||||
leaf_nodes_size, internal_nodes_size, parent_table_size, is_bottom_level);
|
||||
|
|
@ -562,7 +562,7 @@ rra_transcode_internal_node(struct rra_transcoding_context *ctx,
|
|||
uint32_t dst_child_offset;
|
||||
|
||||
const void *src_child_node = ctx->src + src_child_offset;
|
||||
if (child_type == radv_bvh_node_internal) {
|
||||
if (child_type == radv_bvh_node_box32) {
|
||||
dst_child_offset = ctx->dst_internal_offset;
|
||||
rra_transcode_internal_node(ctx, src_child_node);
|
||||
} else {
|
||||
|
|
@ -578,12 +578,12 @@ rra_transcode_internal_node(struct rra_transcoding_context *ctx,
|
|||
|
||||
uint32_t parent_id_index =
|
||||
rra_parent_table_index_from_offset(dst_child_offset, ctx->parent_id_table_size);
|
||||
ctx->parent_id_table[parent_id_index] = radv_bvh_node_internal | (dst_offset >> 3);
|
||||
ctx->parent_id_table[parent_id_index] = radv_bvh_node_box32 | (dst_offset >> 3);
|
||||
|
||||
uint32_t child_id = child_type | (dst_child_offset >> 3);
|
||||
dst->children[i] = child_id;
|
||||
|
||||
if (child_type != radv_bvh_node_internal)
|
||||
if (child_type != radv_bvh_node_box32)
|
||||
ctx->leaf_node_ids[ctx->leaf_index++] = child_id;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue