summaryrefslogtreecommitdiff
path: root/lib/gpgpu_fill.c
diff options
context:
space:
mode:
authorKatarzyna Dec <katarzyna.dec@intel.com>2019-07-15 14:51:32 -0700
committerKatarzyna Dec <katarzyna.dec@intel.com>2019-09-18 18:45:07 +0200
commit51b0f1ed696d5611a2bff149e3701c4deb1b5416 (patch)
treea612a53bd9f311dcc7ba4f2930cc6663a9a286e0 /lib/gpgpu_fill.c
parent0e9510b83502af3e230870df2d66d4f68918d3a4 (diff)
lib/gpgpu_fill/tgl: Implement gpgpu_fillfunc for TGL
Adding gen12_gpgpu_fillfunc to have gpgpu_fill running on TGL. Gpgpu shader was generated using IGA (Intel Graphics Assembler) based on Gen11 binary adding necessary SWSB dependencies and changes in SEND instruction. Shader source code and array containing its assembled version have same names now to avoid ambiguity. v2: Switched to using IS_GEN12 v3: Minor checkpatch change Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Antonio Argenziano <antonio.argenziano@intel.com> Signed-off-by: Katarzyna Dec <katarzyna.dec@intel.com> Signed-off-by: Lukasz Kalamarz <lukasz.kalamarz@intel.com> Signed-off-by: Zbigniew KempczyƄski <zbigniew.kempczynski@intel.com> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Diffstat (limited to 'lib/gpgpu_fill.c')
-rw-r--r--lib/gpgpu_fill.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/gpgpu_fill.c b/lib/gpgpu_fill.c
index 003f4616..5660d4c0 100644
--- a/lib/gpgpu_fill.c
+++ b/lib/gpgpu_fill.c
@@ -87,6 +87,19 @@ static const uint32_t gen11_gpgpu_kernel[][4] = {
{ 0x07800031, 0x20000a40, 0x06000e00, 0x82000010 },
};
+static const uint32_t gen12_gpgpu_kernel[][4] = {
+ { 0x00020061, 0x01050000, 0x00000104, 0x00000000 },
+ { 0x00000069, 0x02058220, 0x02000024, 0x00000004 },
+ { 0x00000061, 0x02250220, 0x000000c4, 0x00000000 },
+ { 0x00030061, 0x04050220, 0x00460005, 0x00000000 },
+ { 0x00010261, 0x04050220, 0x00220205, 0x00000000 },
+ { 0x00000061, 0x04454220, 0x00000000, 0x0000000f },
+ { 0x00040661, 0x05050220, 0x00000104, 0x00000000 },
+ { 0x00049031, 0x00000000, 0xc0000414, 0x02a00000 },
+ { 0x00030061, 0x70050220, 0x00460005, 0x00000000 },
+ { 0x00040131, 0x00000004, 0x7020700c, 0x10000000 },
+};
+
/*
* This sets up the gpgpu pipeline,
*
@@ -282,3 +295,13 @@ void gen11_gpgpu_fillfunc(struct intel_batchbuffer *batch,
__gen9_gpgpu_fillfunc(batch, dst, x, y, width, height, color,
gen11_gpgpu_kernel, sizeof(gen11_gpgpu_kernel));
}
+
+void gen12_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,
+ gen12_gpgpu_kernel, sizeof(gen12_gpgpu_kernel));
+}