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

Kristian Høgsberg krh at bitplanet.net
Mon Apr 13 17:41:11 PDT 2015


On Sat, Mar 14, 2015 at 9:54 PM, Jordan Justen
<jordan.l.justen at intel.com> wrote:
> Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>

Reviewed-by: Kristian Høgsberg <krh at bitplanet.net>

> ---
>  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
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list