File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33
44#include <stddef.h>
55
6- static const size_t binning_shader_size = 27847 ;
6+ static const size_t binning_shader_size = 27856 ;
77static const char binning_shader [] =
88 "// ---------------------------------------------------------------------------------------------------------------------------\n"
99 "// Structures\n"
@@ -841,13 +841,10 @@ static const char binning_shader[] =
841841 " if (to_be_added)\n"
842842 " {\n"
843843 " let node_idx = atomicAdd(&g_counters.num_nodes, 1u);\n"
844- "\n"
845844 " if (node_idx < g_draw_args.max_nodes)\n"
846845 " {\n"
847846 " let packed_info = (cmd_type << 16u) | (cmd_idx & 0xFFFFu);\n"
848- "\n"
849847 " g_tile_nodes[node_idx] = tile_node(current_head, packed_info);\n"
850- "\n"
851848 " current_head = node_idx;\n"
852849 " }\n"
853850 " }\n"
@@ -860,7 +857,7 @@ static const char binning_shader[] =
860857 " clean_list(tile_index);\n"
861858 "\n"
862859 " // if the tile is not empty, register it for processing\n"
863- " if (current_head != INVALID_INDEX)\n"
860+ " if (g_tile_heads[tile_index] != INVALID_INDEX)\n"
864861 " {\n"
865862 " let pos = atomicAdd(&g_counters.num_tiles, 1u);\n"
866863 " g_tile_indices[pos] = tile_index;\n"
Original file line number Diff line number Diff line change @@ -637,13 +637,10 @@ fn tile_bin(@builtin(global_invocation_id) global_id: vec3<u32>)
637637 if (to_be_added )
638638 {
639639 let node_idx = atomicAdd (& g_counters . num_nodes , 1u );
640-
641640 if (node_idx < g_draw_args . max_nodes )
642641 {
643642 let packed_info = (cmd_type << 16u ) | (cmd_idx & 0xFFFFu );
644-
645643 g_tile_nodes [node_idx ] = tile_node (current_head , packed_info );
646-
647644 current_head = node_idx ;
648645 }
649646 }
@@ -656,7 +653,7 @@ fn tile_bin(@builtin(global_invocation_id) global_id: vec3<u32>)
656653 clean_list (tile_index );
657654
658655 // if the tile is not empty, register it for processing
659- if (current_head != INVALID_INDEX )
656+ if (g_tile_heads [ tile_index ] != INVALID_INDEX )
660657 {
661658 let pos = atomicAdd (& g_counters . num_tiles , 1u );
662659 g_tile_indices [pos ] = tile_index ;
You can’t perform that action at this time.
0 commit comments