Merge pull request #82445 from RandomShaper/fix_fsr2_little_thing

Avoid trying to free null RIDs in FSR2 teardown
This commit is contained in:
Yuri Sizov 2023-09-27 19:08:08 +02:00
commit 3c8465c240

View file

@ -804,7 +804,9 @@ FSR2Effect::~FSR2Effect() {
RD::get_singleton()->free(device.linear_clamp_sampler);
for (uint32_t i = 0; i < FFX_FSR2_PASS_COUNT; i++) {
RD::get_singleton()->free(device.passes[i].pipeline.pipeline_rid);
if (device.passes[i].pipeline.pipeline_rid.is_valid()) {
RD::get_singleton()->free(device.passes[i].pipeline.pipeline_rid);
}
device.passes[i].shader->version_free(device.passes[i].shader_version);
}
}