Commit 83352d08 authored by Katarzyna Dec's avatar Katarzyna Dec Committed by Rodrigo Vivi

lib/gpgpu_fill: Implement gpgpu_fillfunc for Gen11

Added gen11_gpgpu_fillfunc to have gpgpu_fill passing on Gen11.

Gpgpu shader was generated using IGA (Intel Graphics Assembler)
based on binary found in lib/gpgpu_fill.c to match the
changes in Gen11 HW:
Changed 'mul' instruction to 'shl' (since Gen11 'mul' does
not support integer values for both src and dest).
Changed SEND message descriptor (it should have length 2 not 3).

Cc: Lukasz Kalamarz <lukasz.kalamarz@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Tested-by: José Roberto de Souza's avatarJosé Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Katarzyna Dec's avatarKatarzyna Dec <katarzyna.dec@intel.com>
Signed-off-by: Lukasz Kalamarz's avatarLukasz Kalamarz <lukasz.kalamarz@intel.com>
Acked-by: Katarzyna Dec's avatarKatarzyna Dec <katarzyna.dec@intel.com>
Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
parent 892699ff
......@@ -74,6 +74,19 @@ static const uint32_t gen9_gpgpu_kernel[][4] = {
{ 0x07800031, 0x20000a40, 0x06000e00, 0x82000010 },
};
static const uint32_t gen11_gpgpu_kernel[][4] = {
{ 0x00400001, 0x20202288, 0x00000020, 0x00000000 },
{ 0x00000009, 0x20400208, 0x06000004, 0x00000004 },
{ 0x00000001, 0x20440208, 0x00000018, 0x00000000 },
{ 0x00600001, 0x20800208, 0x008d0000, 0x00000000 },
{ 0x00200001, 0x20800208, 0x00450040, 0x00000000 },
{ 0x00000001, 0x20880608, 0x00000000, 0x0000000f },
{ 0x00800001, 0x20a00208, 0x00000020, 0x00000000 },
{ 0x0c800031, 0x24000a40, 0x06000080, 0x040a8000 },
{ 0x00600001, 0x2e000208, 0x008d0000, 0x00000000 },
{ 0x07800031, 0x20000a40, 0x06000e00, 0x82000010 },
};
/*
* This sets up the gpgpu pipeline,
*
......@@ -259,3 +272,13 @@ void gen9_gpgpu_fillfunc(struct intel_batchbuffer *batch,
__gen9_gpgpu_fillfunc(batch, dst, x, y, width, height, color,
gen9_gpgpu_kernel, sizeof(gen9_gpgpu_kernel));
}
void gen11_gpgpu_fillfunc(struct intel_batchbuffer *batch,
const struct igt_buf *dst,
unsigned int x, unsigned int y,
unsigned int width, unsigned int height,
uint8_t color)
{
__gen9_gpgpu_fillfunc(batch, dst, x, y, width, height, color,
gen11_gpgpu_kernel, sizeof(gen11_gpgpu_kernel));
}
......@@ -50,4 +50,11 @@ gen9_gpgpu_fillfunc(struct intel_batchbuffer *batch,
unsigned int width, unsigned int height,
uint8_t color);
void
gen11_gpgpu_fillfunc(struct intel_batchbuffer *batch,
const struct igt_buf *dst,
unsigned int x, unsigned int y,
unsigned int width, unsigned int height,
uint8_t color);
#endif /* GPGPU_FILL_H */
......@@ -889,6 +889,8 @@ igt_fillfunc_t igt_get_gpgpu_fillfunc(int devid)
fill = gen8_gpgpu_fillfunc;
else if (IS_GEN9(devid) || IS_GEN10(devid))
fill = gen9_gpgpu_fillfunc;
else if (IS_GEN11(devid))
fill = gen11_gpgpu_fillfunc;
return fill;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment