EEVEE-Next: World: Fix missing SSBO bind

This commit is contained in:
Clément Foucault
2023-05-04 18:46:54 +02:00
parent 95fa4d73d6
commit 2f1bf2ff1e
2 changed files with 5 additions and 1 deletions

View File

@@ -26,7 +26,8 @@ void Cryptomatte::begin_sync()
session_.reset(BKE_cryptomatte_init_from_view_layer(inst_.view_layer));
for (const std::string &layer_name :
bke::cryptomatte::BKE_cryptomatte_layer_names_get(*session_)) {
bke::cryptomatte::BKE_cryptomatte_layer_names_get(*session_))
{
StringRef layer_name_ref = layer_name;
bke::cryptomatte::CryptomatteLayer *layer = bke::cryptomatte::BKE_cryptomatte_layer_get(
*session_, layer_name);
@@ -45,6 +46,7 @@ void Cryptomatte::begin_sync()
if (!(enabled_passes &
(EEVEE_RENDER_PASS_CRYPTOMATTE_OBJECT | EEVEE_RENDER_PASS_CRYPTOMATTE_ASSET)))
{
/* Ensure dummy buffer for API validation. */
cryptomatte_object_buf.resize(16);
}
}

View File

@@ -45,6 +45,8 @@ void WorldPipeline::sync(GPUMaterial *gpumat)
world_ps_.bind_image("rp_specular_color_img", &rbufs.specular_color_tx);
world_ps_.bind_image("rp_emission_img", &rbufs.emission_tx);
world_ps_.bind_image("rp_cryptomatte_img", &rbufs.cryptomatte_tx);
/* Required by validation layers. */
inst_.cryptomatte.bind_resources(&world_ps_);
world_ps_.bind_ubo(CAMERA_BUF_SLOT, inst_.camera.ubo_get());