[Impeller] Some fixes to shader pipeline validation (flutter/engine#40925)

[Impeller] Some fixes to shader pipeline validation
This commit is contained in:
Jason Simmons
2023-04-10 13:50:17 -07:00
committed by GitHub
parent 727da6c7bc
commit 1458a66d66
2 changed files with 7 additions and 2 deletions

View File

@@ -774,7 +774,12 @@ class ContentContext {
// The prototype must always be initialized in the constructor.
FML_CHECK(prototype != container.end());
auto variant_future = prototype->second->WaitAndGet()->CreateVariant(
auto pipeline = prototype->second->WaitAndGet();
if (!pipeline) {
return nullptr;
}
auto variant_future = pipeline->CreateVariant(
[&opts, variants_count = container.size()](PipelineDescriptor& desc) {
opts.ApplyToPipelineDescriptor(desc);
desc.SetLabel(

View File

@@ -114,7 +114,7 @@ static bool LinkProgram(
GLint frag_status = GL_FALSE;
gl.GetShaderiv(vert_shader, GL_COMPILE_STATUS, &vert_status);
gl.GetShaderiv(vert_shader, GL_COMPILE_STATUS, &frag_status);
gl.GetShaderiv(frag_shader, GL_COMPILE_STATUS, &frag_status);
if (vert_status != GL_TRUE) {
LogShaderCompilationFailure(gl, vert_shader, descriptor.GetLabel(),