i965/blorp: move emission of rt-write into eu-emitter
authorTopi Pohjolainen <topi.pohjolainen@intel.com>
Mon, 2 Dec 2013 12:12:39 +0000 (14:12 +0200)
committerTopi Pohjolainen <topi.pohjolainen@intel.com>
Thu, 23 Jan 2014 06:45:13 +0000 (08:45 +0200)
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
src/mesa/drivers/dri/i965/brw_blorp_blit_eu.cpp
src/mesa/drivers/dri/i965/brw_blorp_blit_eu.h

index 034a82bc1b8217d4652fc8e18b3312c9c1a80e56..4bbdf3da6e1b5ae742ad75986cf2d8a1fe58a82e 100644 (file)
@@ -1954,16 +1954,11 @@ brw_blorp_blit_program::render_target_write()
    }
 
    /* Now write to the render target and terminate the thread */
-   brw_fb_WRITE(&func,
-                16 /* dispatch_width */,
-                base_mrf /* msg_reg_nr */,
-                mrf_rt_write /* src0 */,
-                BRW_DATAPORT_RENDER_TARGET_WRITE_SIMD16_SINGLE_SOURCE,
-                BRW_BLORP_RENDERBUFFER_BINDING_TABLE_INDEX,
-                mrf_offset /* msg_length.  TODO: Should be smaller for non-RGBA formats. */,
-                0 /* response_length */,
-                true /* eot */,
-                use_header);
+   emit_render_target_write(
+      mrf_rt_write,
+      base_mrf, 
+      mrf_offset /* msg_length.  TODO: Should be smaller for non-RGBA formats. */,
+      use_header);
 }
 
 
index ff45b6af23a01ba30a2c34c63dea6c99ab523148..df8d63d94c405ab81d59435351c7c9e3db8f77f0 100644 (file)
@@ -134,3 +134,21 @@ brw_blorp_eu_emitter::emit_texture_lookup(const struct brw_reg &dst,
               BRW_SAMPLER_SIMD_MODE_SIMD16,
               BRW_SAMPLER_RETURN_FORMAT_FLOAT32);
 }
+
+void
+brw_blorp_eu_emitter::emit_render_target_write(const struct brw_reg &src0,
+                                               unsigned msg_reg_nr,
+                                               unsigned msg_length,
+                                               bool use_header)
+{
+   brw_fb_WRITE(&func,
+                16 /* dispatch_width */,
+                msg_reg_nr,
+                src0,
+                BRW_DATAPORT_RENDER_TARGET_WRITE_SIMD16_SINGLE_SOURCE,
+                BRW_BLORP_RENDERBUFFER_BINDING_TABLE_INDEX,
+                msg_length,
+                0 /* response_length */,
+                true /* eot */,
+                use_header);
+}
index 9e7c43f88f8abab84d71b4c8de9d8cbbfc00c82e..5f0c8cf7f8d59f9244cac87ed173ce3458607923 100644 (file)
@@ -47,6 +47,11 @@ protected:
                             unsigned base_mrf,
                             unsigned msg_length);
 
+   void emit_render_target_write(const struct brw_reg &src0,
+                                 unsigned msg_reg_nr,
+                                 unsigned msg_length,
+                                 bool use_header);
+
    void *mem_ctx;
    struct brw_compile func;
 };