diff options
author | Tom Stellard <[email protected]> | 2014-07-23 20:37:08 -0400 |
---|---|---|
committer | Tom Stellard <[email protected]> | 2014-07-25 12:49:45 -0400 |
commit | 0ec858764204bf502535b799210db674de7c9e8a (patch) | |
tree | 827999fd84f1da1ac6321857251efd31d1d9e52b /src/gallium/state_trackers | |
parent | 1607a8efc13aace755fe46eba8eb755cd93ea4e4 (diff) |
clover: Query the device to see if images are supported
Reviewed-by: Francisco Jerez <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r-- | src/gallium/state_trackers/clover/api/device.cpp | 2 | ||||
-rw-r--r-- | src/gallium/state_trackers/clover/core/device.cpp | 6 | ||||
-rw-r--r-- | src/gallium/state_trackers/clover/core/device.hpp | 1 |
3 files changed, 8 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/clover/api/device.cpp b/src/gallium/state_trackers/clover/api/device.cpp index 97b2cf9c996..e8254684258 100644 --- a/src/gallium/state_trackers/clover/api/device.cpp +++ b/src/gallium/state_trackers/clover/api/device.cpp @@ -184,7 +184,7 @@ clGetDeviceInfo(cl_device_id d_dev, cl_device_info param, break; case CL_DEVICE_IMAGE_SUPPORT: - buf.as_scalar<cl_bool>() = CL_TRUE; + buf.as_scalar<cl_bool>() = dev.image_support(); break; case CL_DEVICE_MAX_PARAMETER_SIZE: diff --git a/src/gallium/state_trackers/clover/core/device.cpp b/src/gallium/state_trackers/clover/core/device.cpp index b6078db18a4..63aa1935c7f 100644 --- a/src/gallium/state_trackers/clover/core/device.cpp +++ b/src/gallium/state_trackers/clover/core/device.cpp @@ -169,6 +169,12 @@ device::max_compute_units() const { PIPE_COMPUTE_CAP_MAX_COMPUTE_UNITS)[0]; } +bool +device::image_support() const { + return get_compute_param<uint32_t>(pipe, + PIPE_COMPUTE_CAP_IMAGES_SUPPORTED)[0]; +} + std::vector<size_t> device::max_block_size() const { auto v = get_compute_param<uint64_t>(pipe, PIPE_COMPUTE_CAP_MAX_BLOCK_SIZE); diff --git a/src/gallium/state_trackers/clover/core/device.hpp b/src/gallium/state_trackers/clover/core/device.hpp index 731c31e5a2f..22017005a00 100644 --- a/src/gallium/state_trackers/clover/core/device.hpp +++ b/src/gallium/state_trackers/clover/core/device.hpp @@ -63,6 +63,7 @@ namespace clover { cl_ulong max_mem_alloc_size() const; cl_uint max_clock_frequency() const; cl_uint max_compute_units() const; + bool image_support() const; std::vector<size_t> max_block_size() const; std::string device_name() const; |