diff options
author | Zhenyu Wang <zhenyuw@linux.intel.com> | 2014-12-03 19:05:09 +0800 |
---|---|---|
committer | Zhenyu Wang <zhenyuw@linux.intel.com> | 2014-12-04 10:17:16 +0800 |
commit | 10c6ad3805489819047ee24379bb1e7ab08ead1d (patch) | |
tree | 8d2249f68e6749b46dd104ad9fc8217edb1dd490 /lib/intel_batchbuffer.c | |
parent | 106f0bf965ac5ba8e5553e3e1b39396750bedc74 (diff) |
lib: Add GPGPU fill
This is to add fill operation using GPGPU pipeline which is similar to
current media fill. This can be used to simply verify GPGPU pipeline
and help to enable it on newer HW, currently it works on Gen7 only and
will add support on later platform.
Now this sets very simply thread group dispatch for one thread per
thread group on SIMD16 dispatch. So the fill shader just uses thread
group ID for buffer offset.
v2: No new fill func typedef but adapt to igt_fillfunc_t.
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Diffstat (limited to 'lib/intel_batchbuffer.c')
-rw-r--r-- | lib/intel_batchbuffer.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/intel_batchbuffer.c b/lib/intel_batchbuffer.c index 4b3a5b87..c70f6d8b 100644 --- a/lib/intel_batchbuffer.c +++ b/lib/intel_batchbuffer.c @@ -511,3 +511,22 @@ igt_fillfunc_t igt_get_media_fillfunc(int devid) return fill; } + +/** + * igt_get_gpgpu_fillfunc: + * @devid: pci device id + * + * Returns: + * + * The platform-specific gpgpu fill function pointer for the device specified + * with @devid. Will return NULL when no gpgpu fill function is implemented. + */ +igt_fillfunc_t igt_get_gpgpu_fillfunc(int devid) +{ + igt_fillfunc_t fill = NULL; + + if (IS_GEN7(devid)) + fill = gen7_gpgpu_fillfunc; + + return fill; +} |