From 6745f125b516ffca30dc2e7fbc5d396f82149f53 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Tue, 23 Oct 2018 22:44:58 +0200 Subject: [PATCH] Fix a crash in the sample driver. --- flow_main.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/flow_main.cpp b/flow_main.cpp index 1ef44ac..dc82d22 100644 --- a/flow_main.cpp +++ b/flow_main.cpp @@ -261,15 +261,15 @@ void compute_flow_only(int argc, char **argv, int optind) glCreateTextures(GL_TEXTURE_2D_ARRAY, 1, &tex_gray); glTextureStorage3D(tex_gray, levels, GL_R8, width1, height1, 2); - GrayscaleConversion gray; - gray.exec(image_tex, tex_gray, width1, height1, /*num_layers=*/2); - glGenerateTextureMipmap(tex_gray); - OperatingPoint op = operating_point3; if (!enable_variational_refinement) { op.variational_refinement = false; } - DISComputeFlow compute_flow(width1, height1, op); + + DISComputeFlow compute_flow(width1, height1, op); // Must be initialized before gray. + GrayscaleConversion gray; + gray.exec(image_tex, tex_gray, width1, height1, /*num_layers=*/2); + glGenerateTextureMipmap(tex_gray); if (enable_warmup) { in_warmup = true; -- 2.39.2