unsigned program_size;
+ unsigned const_data_size;
+ unsigned const_data_offset;
+
/** Does this program pull from any UBO or other constant buffers? */
bool has_ubo_pull;
stats = stats ? stats + 1 : NULL;
}
+ g.add_const_data(shader->constant_data, shader->constant_data_size);
+
delete v8;
delete v16;
delete v32;
v->performance_analysis.require(), stats);
}
+ g.add_const_data(src_shader->constant_data, src_shader->constant_data_size);
+
ret = g.get_assembly();
delete v8;
struct shader_stats shader_stats,
const brw::performance &perf,
struct brw_compile_stats *stats);
+ void add_const_data(void *data, unsigned size);
const unsigned *get_assembly();
private:
return start_offset;
}
+void
+fs_generator::add_const_data(void *data, unsigned size)
+{
+ assert(prog_data->const_data_size == 0);
+ if (size > 0) {
+ prog_data->const_data_size = size;
+ prog_data->const_data_offset = brw_append_data(p, data, size, 32);
+ }
+}
+
const unsigned *
fs_generator::get_assembly()
{
g.generate_code(v.cfg, 8, v.shader_stats,
v.performance_analysis.require(), stats);
+ g.add_const_data(nir->constant_data, nir->constant_data_size);
+
assembly = g.get_assembly();
} else {
brw::vec4_tes_visitor v(compiler, log_data, key, prog_data,
}
g.generate_code(v.cfg, 8, v.shader_stats,
v.performance_analysis.require(), stats);
+ g.add_const_data(shader->constant_data, shader->constant_data_size);
assembly = g.get_assembly();
}
generate_code(p, compiler, log_data, nir, prog_data, cfg, perf, stats);
+ assert(prog_data->base.const_data_size == 0);
+ if (nir->constant_data_size > 0) {
+ prog_data->base.const_data_size = nir->constant_data_size;
+ prog_data->base.const_data_offset =
+ brw_append_data(p, nir->constant_data, nir->constant_data_size, 32);
+ }
+
return brw_get_program(p, &prog_data->base.program_size);
}
}
g.generate_code(v.cfg, 8, v.shader_stats,
v.performance_analysis.require(), stats);
+ g.add_const_data(shader->constant_data, shader->constant_data_size);
return g.get_assembly();
}
}
g.generate_code(v.cfg, 8, v.shader_stats,
v.performance_analysis.require(), stats);
+ g.add_const_data(nir->constant_data, nir->constant_data_size);
+
assembly = g.get_assembly();
} else {
vec4_tcs_visitor v(compiler, log_data, key, prog_data,