[PATCH i-g-t v4 08/17] lib/gpgpu_shader: Allow enabling illegal opcode exceptions in shader
Zbigniew Kempczyński
zbigniew.kempczynski at intel.com
Mon Aug 26 11:13:39 UTC 2024
On Fri, Aug 23, 2024 at 08:22:13PM +0200, Christoph Manszewski wrote:
> From: Andrzej Hajda <andrzej.hajda at intel.com>
>
> Illegal opcode exceptions can be enabled in interface descriptor data
> passed to COMPUTE_WALKER instruction.
>
> Signed-off-by: Andrzej Hajda <andrzej.hajda at intel.com>
> Cc: Mika Kuoppala <mika.kuoppala at intel.com>
> Cc: Dominik Grzegorzek <dominik.grzegorzek at intel.com>
> Acked-by: Dominik Grzegorzek <dominik.grzegorzek at intel.com>
> ---
> lib/gpgpu_shader.c | 4 ++++
> lib/gpgpu_shader.h | 1 +
> 2 files changed, 5 insertions(+)
>
> diff --git a/lib/gpgpu_shader.c b/lib/gpgpu_shader.c
> index 1616c1942..4e61a548f 100644
> --- a/lib/gpgpu_shader.c
> +++ b/lib/gpgpu_shader.c
> @@ -103,6 +103,7 @@ __xelp_gpgpu_execfunc(struct intel_bb *ibb,
> struct gpgpu_shader *sip,
> uint64_t ring, bool explicit_engine)
> {
> + struct gen8_interface_descriptor_data *idd;
> uint32_t interface_descriptor, sip_offset;
> uint64_t engine;
>
> @@ -113,6 +114,8 @@ __xelp_gpgpu_execfunc(struct intel_bb *ibb,
> interface_descriptor = gen8_fill_interface_descriptor(ibb, target,
> shdr->instr,
> 4 * shdr->size);
> + idd = intel_bb_ptr_get(ibb, interface_descriptor);
> + idd->desc2.illegal_opcode_exception_enable = shdr->illegal_opcode_exception_enable;
>
> if (sip && sip->size)
> sip_offset = fill_sip(ibb, sip->instr, 4 * sip->size);
> @@ -163,6 +166,7 @@ __xehp_gpgpu_execfunc(struct intel_bb *ibb,
>
> xehp_fill_interface_descriptor(ibb, target, shdr->instr,
> 4 * shdr->size, &idd);
> + idd.desc2.illegal_opcode_exception_enable = shdr->illegal_opcode_exception_enable;
>
> if (sip && sip->size)
> sip_offset = fill_sip(ibb, sip->instr, 4 * sip->size);
> diff --git a/lib/gpgpu_shader.h b/lib/gpgpu_shader.h
> index 0bbeae66f..26a117a0b 100644
> --- a/lib/gpgpu_shader.h
> +++ b/lib/gpgpu_shader.h
> @@ -22,6 +22,7 @@ struct gpgpu_shader {
> uint32_t (*instr)[4];
> };
> struct igt_map *labels;
> + bool illegal_opcode_exception_enable;
> };
>
> struct iga64_template {
> --
> 2.34.1
>
Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
--
Zbigniew
More information about the igt-dev
mailing list