summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965/brw_blorp_blit_eu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_blorp_blit_eu.cpp')
-rw-r--r--src/mesa/drivers/dri/i965/brw_blorp_blit_eu.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit_eu.cpp b/src/mesa/drivers/dri/i965/brw_blorp_blit_eu.cpp
index 3a5297c187e..7ec0b2a2f53 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp_blit_eu.cpp
+++ b/src/mesa/drivers/dri/i965/brw_blorp_blit_eu.cpp
@@ -26,16 +26,9 @@
#include "brw_blorp.h"
#include "brw_cfg.h"
-brw_blorp_eu_emitter::brw_blorp_eu_emitter(struct brw_context *brw,
- bool debug_flag)
- : mem_ctx(ralloc_context(NULL)),
- generator(brw->intelScreen->compiler, brw,
- mem_ctx, (void *) rzalloc(mem_ctx, struct brw_wm_prog_key),
- (struct brw_stage_prog_data *) rzalloc(mem_ctx, struct brw_wm_prog_data),
- 0, false, MESA_SHADER_FRAGMENT)
+brw_blorp_eu_emitter::brw_blorp_eu_emitter()
+ : mem_ctx(ralloc_context(NULL))
{
- if (debug_flag)
- generator.enable_debug("blorp");
}
brw_blorp_eu_emitter::~brw_blorp_eu_emitter()
@@ -44,9 +37,18 @@ brw_blorp_eu_emitter::~brw_blorp_eu_emitter()
}
const unsigned *
-brw_blorp_eu_emitter::get_program(unsigned *program_size)
+brw_blorp_eu_emitter::get_program(struct brw_context *brw, bool debug_flag,
+ unsigned *program_size)
{
cfg_t cfg(&insts);
+ brw_stage_prog_data prog_data = { 0 };
+ brw_wm_prog_key prog_key = { 0 };
+ fs_generator generator(brw->intelScreen->compiler, brw, mem_ctx, &prog_key,
+ &prog_data, 0, false, MESA_SHADER_FRAGMENT);
+
+ if (debug_flag)
+ generator.enable_debug("blorp");
+
generator.generate_code(&cfg, 16);
return generator.get_assembly(program_size);