[PATCH i-g-t 1/2] lib/gpgpu_shader: Add x_offset parameter for gpgpu_shader__write_on_exception

Zbigniew Kempczyński zbigniew.kempczynski at intel.com
Wed Oct 16 05:09:43 UTC 2024


On Mon, Oct 14, 2024 at 03:49:27PM +0200, Hajda, Andrzej wrote:
> Somehow I missed this.
> 

<cut>

> > >   	// Check if masked exception is equal to provided value and write conditionally \n\
> > > -(W)      and (1|M0)              r3.0<1>:ud     cr0.1<0;1,0>:ud ARG(4):ud		\n\
> > > +(W)      and (1|M0)              r3.0<1>:ud     cr0.1<0;1,0>:ud ARG(5):ud		\n\
> > >   (W)      mov (1|M0)              f0.0<1>:ud     0x0:ud					\n\
> > > -(W)      cmp (1|M0)     (eq)f0.0 null:ud        r3.0<0;1,0>:ud  ARG(5):ud		\n\
> > > +(W)      cmp (1|M0)     (eq)f0.0 null:ud        r3.0<0;1,0>:ud  ARG(6):ud		\n\
> > Adding argument in the middle of the list makes a lot of noise in ARG(x)
> > changing. What a pity we don't have possibility of making definitions
> > like:
> > 
> > #define x_offset ARG(1)
> > #define y_offset ARG(2)
> > 
> > in the code. Changing definitions would keep code clear.
> 
> Why not:
> 
>        emit_iga64_code(shdr, end_system_routine_step_if_eq, "   \n\
> 
> #define x_offset ARG(1)						\n\
> #define y_offset ARG(2)						\n\
> ...
> 	mov (1|M0)               r30.6<1>:ud    y_offset:ud     \n\
> ...
> 

Great, I forgot this is preprocessed first. So we need to refactor
this, it will be likely quick and easy.

--
Zbigniew

> Regards
> Andrzej
> 


More information about the igt-dev mailing list