EEVEE Next: Disable TILE_COPY shadow update method

Disabling tile_copy method for shadow update for
stability in scenes with large geometry counts
which may exceed parameter buffer size.

This pass can be re-used in future if the workload
distribution for shadow updates is changed to
better suit this method.

Authored by Apple: Michael Parkin-White

Pull Request: https://projects.blender.org/blender/blender/pulls/121623
This commit is contained in:
Jason Fielder
2024-05-09 15:50:53 +02:00
committed by Clément Foucault
parent e6ccff1044
commit 996014e537
2 changed files with 10 additions and 1 deletions

View File

@@ -660,10 +660,15 @@ void ShadowModule::init()
* NOTE(Metal): Metal utilizes a tile-optimized approach for Apple Silicon's architecture. */
const bool is_metal_backend = (GPU_backend_get_type() == GPU_BACKEND_METAL);
const bool is_tile_based_arch = (GPU_platform_architecture() == GPU_ARCHITECTURE_TBDR);
/* Temp: Disable TILE_COPY path while efficient solution for parameter buffer overflow is
* identified. This path can be re-enabled in future. */
#if 0
if (is_metal_backend && is_tile_based_arch) {
ShadowModule::shadow_technique = ShadowTechnique::TILE_COPY;
}
else {
else
#endif
{
ShadowModule::shadow_technique = ShadowTechnique::ATOMIC_RASTER;
}

View File

@@ -545,10 +545,14 @@ void gpu_shader_create_info_init()
/* NOTE: As atomic data types can alter shader gen if native atomics are unsupported, we need
* to use differing create info's to handle the tile optimized check. This does prevent
* the shadow techniques from being dynamically switchable. */
# if 0
/* Temp: Disable TILE_COPY path while efficient solution for parameter buffer overflow is
* identified. This path can be re-enabled in future. */
const bool is_tile_based_arch = (GPU_platform_architecture() == GPU_ARCHITECTURE_TBDR);
if (is_tile_based_arch) {
eevee_shadow_data = eevee_shadow_data_non_atomic;
}
# endif
}
#endif