clover: Define platform class and merge with device_registry.
authorFrancisco Jerez <currojerez@riseup.net>
Sat, 6 Apr 2013 12:35:00 +0000 (14:35 +0200)
committerFrancisco Jerez <currojerez@riseup.net>
Sat, 13 Apr 2013 12:20:16 +0000 (14:20 +0200)
commit1a8ad6c2e3beb00d07ef109b984658e08c5729da
tree9daa3310cadfd311ebb92109c131f920419293a8
parent6ace4520559094b755ff1eb038ac68f38faa83c6
clover: Define platform class and merge with device_registry.

Null platform IDs are OK according to the spec, but some applications have
been reported to get paranoid and assume that our NULL platform is unusable.

As it doesn't hurt to have device enumeration separate from the rest of the
device code (quite the opposite, it makes the code cleaner), make the API use
an actual platform object that keeps track of the available devices instead of
the former NULL pointer.

Reported-and-reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
src/gallium/state_trackers/clover/Makefile.am
src/gallium/state_trackers/clover/api/context.cpp
src/gallium/state_trackers/clover/api/device.cpp
src/gallium/state_trackers/clover/api/platform.cpp
src/gallium/state_trackers/clover/core/device.cpp
src/gallium/state_trackers/clover/core/device.hpp
src/gallium/state_trackers/clover/core/platform.cpp [new file with mode: 0644]
src/gallium/state_trackers/clover/core/platform.hpp [new file with mode: 0644]