}
const unsigned *
-brw_blorp_compile_nir_shader(struct brw_context *brw, struct nir_shader *nir,
+brw_blorp_compile_nir_shader(struct blorp_context *blorp, struct nir_shader *nir,
const struct brw_wm_prog_key *wm_key,
bool use_repclear,
struct brw_blorp_prog_data *prog_data,
unsigned *program_size)
{
- const struct brw_compiler *compiler = brw->intelScreen->compiler;
+ const struct brw_compiler *compiler = blorp->compiler;
void *mem_ctx = ralloc_context(NULL);
nir_lower_io(nir, nir_var_uniform, nir_uniform_type_size);
const unsigned *program =
- brw_compile_fs(compiler, brw, mem_ctx, wm_key, &wm_prog_data, nir,
+ brw_compile_fs(compiler, blorp->driver_ctx, mem_ctx,
+ wm_key, &wm_prog_data, nir,
NULL, -1, -1, false, use_repclear, program_size, NULL);
/* Copy the relavent bits of wm_prog_data over into the blorp prog data */
const struct isl_device *isl_dev;
+ const struct brw_compiler *compiler;
+
struct {
uint32_t tex;
uint32_t rb;
wm_key.tex.msaa_16 = prog_key->tex_samples == 16;
wm_key.multisample_fbo = prog_key->rt_samples > 1;
- program = brw_blorp_compile_nir_shader(brw, nir, &wm_key, false,
+ program = brw_blorp_compile_nir_shader(&brw->blorp, nir, &wm_key, false,
&prog_data, &program_size);
brw->blorp.upload_shader(&brw->blorp, prog_key, sizeof(*prog_key),
struct brw_blorp_prog_data prog_data;
unsigned program_size;
const unsigned *program =
- brw_blorp_compile_nir_shader(brw, b.shader, &wm_key, use_replicated_data,
+ brw_blorp_compile_nir_shader(&brw->blorp, b.shader, &wm_key, use_replicated_data,
&prog_data, &program_size);
brw->blorp.upload_shader(&brw->blorp, &blorp_key, sizeof(blorp_key),
void brw_blorp_init_wm_prog_key(struct brw_wm_prog_key *wm_key);
const unsigned *
-brw_blorp_compile_nir_shader(struct brw_context *brw, struct nir_shader *nir,
+brw_blorp_compile_nir_shader(struct blorp_context *blorp, struct nir_shader *nir,
const struct brw_wm_prog_key *wm_key,
bool use_repclear,
struct brw_blorp_prog_data *prog_data,
{
blorp_init(&brw->blorp, brw, &brw->isl_dev);
+ brw->blorp.compiler = brw->intelScreen->compiler;
+
switch (brw->gen) {
case 6:
brw->blorp.mocs.tex = 0;