Fix EEVEE-Next: Forward Pipeline: Missing resource binds

This commit is contained in:
Clément Foucault 2023-10-12 12:15:15 +02:00
parent e592763940
commit 1b4b6bc2f4
4 changed files with 9 additions and 6 deletions

View File

@ -281,6 +281,7 @@ void ForwardPipeline::sync()
inst_.bind_uniform_data(&opaque_ps_);
inst_.lights.bind_resources(&opaque_ps_);
inst_.shadows.bind_resources(&opaque_ps_);
inst_.volume.bind_resources(&opaque_ps_);
inst_.sampling.bind_resources(&opaque_ps_);
inst_.hiz_buffer.bind_resources(&opaque_ps_);
inst_.irradiance_cache.bind_resources(&opaque_ps_);
@ -308,9 +309,11 @@ void ForwardPipeline::sync()
inst_.bind_uniform_data(&sub);
inst_.lights.bind_resources(&sub);
inst_.shadows.bind_resources(&sub);
inst_.volume.bind_resources(sub);
inst_.volume.bind_resources(&sub);
inst_.sampling.bind_resources(&sub);
inst_.hiz_buffer.bind_resources(&sub);
inst_.irradiance_cache.bind_resources(&sub);
inst_.reflection_probes.bind_resources(&sub);
}
}

View File

@ -1089,7 +1089,7 @@ void ShadowModule::end_sync()
inst_.hiz_buffer.bind_resources(&sub);
inst_.sampling.bind_resources(&sub);
inst_.lights.bind_resources(&sub);
inst_.volume.bind_resources(sub);
inst_.volume.bind_resources(&sub);
inst_.volume.bind_properties_buffers(sub);
sub.barrier(GPU_BARRIER_SHADER_IMAGE_ACCESS);
sub.dispatch(math::divide_ceil(inst_.volume.grid_size(), int3(VOLUME_GROUP_SIZE)));

View File

@ -292,7 +292,7 @@ void VolumeModule::end_sync()
resolve_ps_.state_set(DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND_CUSTOM);
resolve_ps_.shader_set(inst_.shaders.static_shader_get(VOLUME_RESOLVE));
inst_.bind_uniform_data(&resolve_ps_);
bind_resources(resolve_ps_);
bind_resources(&resolve_ps_);
resolve_ps_.bind_texture("depth_tx", &inst_.render_buffers.depth_tx);
resolve_ps_.bind_image(RBUFS_COLOR_SLOT, &inst_.render_buffers.rp_color_tx);
/* Sync with the integration pass. */

View File

@ -101,10 +101,10 @@ class VolumeModule {
~VolumeModule(){};
/* Bind resources needed by external passes to perform their own resolve. */
template<typename PassType> void bind_resources(PassType &ps)
template<typename PassType> void bind_resources(PassType *ps)
{
ps.bind_texture(VOLUME_SCATTERING_TEX_SLOT, &transparent_pass_scatter_tx_);
ps.bind_texture(VOLUME_TRANSMITTANCE_TEX_SLOT, &transparent_pass_transmit_tx_);
ps->bind_texture(VOLUME_SCATTERING_TEX_SLOT, &transparent_pass_scatter_tx_);
ps->bind_texture(VOLUME_TRANSMITTANCE_TEX_SLOT, &transparent_pass_transmit_tx_);
}
/* Bind the common resources needed by all volumetric passes. */