[Mesa-dev] [PATCH 09/18] i965/cs: Emit gen code for CS_OPCODE_CS_TERMINATE

Jordan Justen jordan.l.justen at intel.com
Sat Mar 14 21:54:19 PDT 2015


Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
---
 src/mesa/drivers/dri/i965/brw_fs.h             |  1 +
 src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 11 +++++++++++
 2 files changed, 12 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h
index faf7893..b8b26a4 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.h
+++ b/src/mesa/drivers/dri/i965/brw_fs.h
@@ -543,6 +543,7 @@ private:
                       GLuint nr);
    void generate_fb_write(fs_inst *inst, struct brw_reg payload);
    void generate_urb_write(fs_inst *inst, struct brw_reg payload);
+   void generate_cs_terminate(fs_inst *inst);
    void generate_blorp_fb_write(fs_inst *inst);
    void generate_pixel_xy(struct brw_reg dst, bool is_x);
    void generate_linterp(fs_inst *inst, struct brw_reg dst,
diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
index e086266..f25c5b9 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
@@ -367,6 +367,13 @@ fs_generator::generate_urb_write(fs_inst *inst, struct brw_reg payload)
 }
 
 void
+fs_generator::generate_cs_terminate(fs_inst *inst)
+{
+   struct brw_reg R0 = retype(brw_vec8_grf(0, 0), BRW_REGISTER_TYPE_UD);
+   brw_cs_terminate(p, inst->base_mrf, R0);
+}
+
+void
 fs_generator::generate_blorp_fb_write(fs_inst *inst)
 {
    brw_fb_WRITE(p,
@@ -2070,6 +2077,10 @@ fs_generator::generate_code(const cfg_t *cfg, int dispatch_width)
                                            GEN7_PIXEL_INTERPOLATOR_LOC_PER_SLOT_OFFSET);
          break;
 
+      case CS_OPCODE_CS_TERMINATE:
+	 generate_cs_terminate(inst);
+	 break;
+
       default:
 	 if (inst->opcode < (int) ARRAY_SIZE(opcode_descs)) {
 	    _mesa_problem(ctx, "Unsupported opcode `%s' in %s",
-- 
2.1.4



More information about the mesa-dev mailing list