[Mesa-dev] [PATCHv5 0/4] Separate device from driver vendor

Giuseppe Bilotta giuseppe.bilotta at gmail.com
Sat Mar 21 23:20:58 PDT 2015


OpenCL (as opposed to OpenGL) has separate vendor strings for the
implementation/driver/platform and the device. CL_PLATFORM_VENDOR
is akin to the GL_VENDOR string, while CL_DEVICE_VENDOR is supposed to
return the actual device vendor.

(For example, the AMD OpenCL platform returns GenuineIntel as
CL_DEVICE_VENDOR for an Intel CPU.)

This patchset separates (where possible/necessary) the device vendor
from the driver vendor in existing gallium drivers, and makes clover use
the newly introduced device vendor for CL_DEVICE_VENDOR queries.

For some drivers, get_device_vendor is mapped to get_vendor: this
is usually done because get_vendor already returns an appropriate string,
except in the case of softpipe and llvmpipe, where the returned vendor
should be the CPU vendor (and I don't know enough about the structure
of these drivers to extract the information 8-P)

Changes since v4:

* rebased on latest master, removed galahad part from the third patch
  (since the driver isn't in master anymore);

Changes since v3:

* fixed the prefix for the shortlogs
* minor docs tuning

Changes since v2:

* freedreno defined its device vendor function, but didn't actually use it
* the get_device_vendor entrypoint has been moved right after get_vendor,
  and RST documentation has been added


Changes since v1:

* vc4's get_device_vendor maps to vc4_screen_get_vendor() instead of the
  non-existing vc4_screen_get_device_vendor();
* freedreno should report Qualcomm, as device vendor, so it needs
  an actual implementation of get_device_vendor distinct from that of
  get_vendor.

Giuseppe Bilotta (4):
  gallium: remove trailing whitespace in p_screen.h
  gallium: introduce get_device_vendor() entrypoint for pipes
  gallium: implement get_device_vendor() for existing drivers
  clover: use get_device_vendor instead of get_vendor

 src/gallium/docs/source/screen.rst                |  6 ++++++
 src/gallium/drivers/freedreno/freedreno_screen.c  |  8 ++++++++
 src/gallium/drivers/i915/i915_screen.c            |  7 +++++++
 src/gallium/drivers/ilo/ilo_screen.c              |  7 +++++++
 src/gallium/drivers/llvmpipe/lp_screen.c          |  1 +
 src/gallium/drivers/noop/noop_pipe.c              |  6 ++++++
 src/gallium/drivers/nouveau/nouveau_screen.c      |  7 +++++++
 src/gallium/drivers/r300/r300_screen.c            |  6 ++++++
 src/gallium/drivers/radeon/r600_pipe_common.c     |  6 ++++++
 src/gallium/drivers/rbug/rbug_screen.c            | 10 ++++++++++
 src/gallium/drivers/softpipe/sp_screen.c          |  1 +
 src/gallium/drivers/svga/svga_screen.c            |  1 +
 src/gallium/drivers/trace/tr_screen.c             | 22 ++++++++++++++++++++++
 src/gallium/drivers/vc4/vc4_screen.c              |  1 +
 src/gallium/include/pipe/p_screen.h               | 10 +++++++++-
 src/gallium/state_trackers/clover/core/device.cpp |  2 +-
 16 files changed, 99 insertions(+), 2 deletions(-)

-- 
2.1.2.766.gaa23a90



More information about the mesa-dev mailing list