Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - log pipeline cache errors earlier #6115

Closed
wants to merge 3 commits into from
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
47 changes: 23 additions & 24 deletions crates/bevy_render/src/render_resource/pipeline_cache.rs
Expand Up @@ -609,28 +609,8 @@ impl PipelineCache {

for id in waiting_pipelines {
let pipeline = &mut pipelines[id];
match &pipeline.state {
CachedPipelineState::Ok(_) => continue,
CachedPipelineState::Queued => {}
CachedPipelineState::Err(err) => {
match err {
PipelineCacheError::ShaderNotLoaded(_)
| PipelineCacheError::ShaderImportNotYetAvailable => { /* retry */ }
// shader could not be processed ... retrying won't help
PipelineCacheError::ProcessShaderError(err) => {
error!("failed to process shader: {}", err);
continue;
}
PipelineCacheError::AsModuleDescriptorError(err, source) => {
log_shader_error(source, err);
continue;
}
PipelineCacheError::CreateShaderModule(description) => {
error!("failed to create shader module: {}", description);
continue;
}
}
}
if let CachedPipelineState::Ok(_) = pipeline.state {
IceSentry marked this conversation as resolved.
Show resolved Hide resolved
continue;
}

pipeline.state = match &pipeline.descriptor {
Expand All @@ -642,8 +622,27 @@ impl PipelineCache {
}
};

if let CachedPipelineState::Err(_) = pipeline.state {
self.waiting_pipelines.insert(id);
if let CachedPipelineState::Err(err) = &pipeline.state {
match err {
PipelineCacheError::ShaderNotLoaded(_)
| PipelineCacheError::ShaderImportNotYetAvailable => {
// retry
self.waiting_pipelines.insert(id);
}
// shader could not be processed ... retrying won't help
PipelineCacheError::ProcessShaderError(err) => {
error!("failed to process shader: {}", err);
continue;
}
PipelineCacheError::AsModuleDescriptorError(err, source) => {
log_shader_error(source, err);
continue;
}
PipelineCacheError::CreateShaderModule(description) => {
error!("failed to create shader module: {}", description);
continue;
}
}
}
}

Expand Down