#include "embedded_files.h"
#include "gpu_timers.h"
-#include "util.h"
#include "shared/read_file.h"
+#include "util.h"
#include <algorithm>
#include <assert.h>
int find_num_levels(int width, int height)
{
int levels = 1;
- for (int w = width, h = height; w > 1 || h > 1; ) {
+ for (int w = width, h = height; w > 1 || h > 1;) {
w >>= 1;
h >>= 1;
++levels;
}
fprintf(stderr, "Failed to compile shader:\n%s\n", src_with_lines.c_str());
- exit(1);
+ abort();
}
return obj;
GLint success;
glGetProgramiv(program, GL_LINK_STATUS, &success);
if (success == GL_FALSE) {
- GLchar error_log[1024] = {0};
+ GLchar error_log[1024] = { 0 };
glGetProgramInfoLog(program, 1024, nullptr, error_log);
fprintf(stderr, "Error linking program: %s\n", error_log);
- exit(1);
+ abort();
}
return program;
}
bind_sampler(densify_program, uniform_flow_tex, 1, flow_tex, nearest_sampler);
glProgramUniform2f(densify_program, uniform_patch_size,
- float(op.patch_size_pixels) / level_width,
- float(op.patch_size_pixels) / level_height);
+ float(op.patch_size_pixels) / level_width,
+ float(op.patch_size_pixels) / level_height);
glViewport(0, 0, level_width, level_height);
glEnable(GL_BLEND);
: flow_level(op.finest_level),
split_ycbcr_output(split_ycbcr_output),
splat(op),
- blend(split_ycbcr_output) {
+ blend(split_ycbcr_output)
+{
// Set up the vertex data that will be shared between all passes.
float vertices[] = {
0.0f, 1.0f,