The brw_compile structure contains the brw_instruction store and the
brw_eu_emit.c state tracking fields. These are only useful for the
final assembly generation pass; the earlier compilation stages doesn't
need them.
This also means that the code generator for future hardware won't have
access to the brw_compile structure, which is extremely desirable
because it prevents accidental generation of Gen4-7 code.
v2: rzalloc p, as suggested by Eric.
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
bool start_busy = false;
float start_time = 0;
- brw_init_compile(brw, &c->func, c);
-
if (unlikely(INTEL_DEBUG & DEBUG_PERF)) {
start_busy = (intel->batch.last_bo &&
drm_intel_bo_busy(intel->batch.last_bo));
: brw(brw), c(c), prog(prog), fp(fp), dual_source_output(dual_source_output)
{
- p = &c->func;
intel = &brw->intel;
ctx = &intel->ctx;
shader = prog ? prog->_LinkedShaders[MESA_SHADER_FRAGMENT] : NULL;
mem_ctx = c;
+
+ p = rzalloc(mem_ctx, struct brw_compile);
+ brw_init_compile(brw, p, mem_ctx);
}
fs_generator::~fs_generator()
: dispatch_width(dispatch_width)
{
this->c = c;
- this->p = &c->func;
this->brw = brw;
this->fp = fp;
this->prog = prog;
struct brw_context *brw;
struct intel_context *intel;
struct gl_context *ctx;
- struct brw_compile *p;
struct brw_shader *shader;
struct gl_shader_program *prog;
const struct gl_vertex_program *vp;
struct brw_vs_compile *c;
struct brw_vs_prog_data *prog_data;
+ struct brw_compile *p;
char *fail_msg;
bool failed;
};
struct brw_wm_compile {
- struct brw_compile func;
struct brw_wm_prog_key key;
struct brw_wm_prog_data prog_data;