EEVEE: Fix Lights On High-res Monitors #117164
|
@ -354,17 +354,18 @@ void LightModule::end_sync()
|
|||
/* Default to 32 as this is likely to be the maximum
|
||||
* tile size used by hardware or compute shading. */
|
||||
uint tile_size = 16;
|
||||
bool tile_size_valid = false;
|
||||
do {
|
||||
tile_size *= 2;
|
||||
tiles_extent = math::divide_ceil(render_extent, int2(tile_size));
|
||||
uint tile_count = tiles_extent.x * tiles_extent.y;
|
||||
printf("%s(tile_size=%d,tile_count=%d)\n", __func__, tile_size, tile_count);
|
||||
if (tile_count > max_tile_count_threshold) {
|
||||
continue;
|
||||
}
|
||||
total_word_count_ = tile_count * word_per_tile;
|
||||
tile_size_valid = true;
|
||||
|
||||
} while (total_word_count_ > max_word_count_threshold);
|
||||
} while (total_word_count_ > max_word_count_threshold || !tile_size_valid);
|
||||
/* Keep aligned with storage buffer requirements. */
|
||||
total_word_count_ = ceil_to_multiple_u(total_word_count_, 32);
|
||||
|
||||
|
@ -376,7 +377,6 @@ void LightModule::end_sync()
|
|||
culling_data_buf_.local_lights_len = local_lights_len_;
|
||||
culling_data_buf_.sun_lights_len = sun_lights_len_;
|
||||
}
|
||||
printf("%s(%d)\n", __func__, total_word_count_);
|
||||
culling_tile_buf_.resize(total_word_count_);
|
||||
|
||||
culling_pass_sync();
|
||||
|
|
Loading…
Reference in New Issue