diff options
Diffstat (limited to 'src/gallium/state_trackers/clover')
-rw-r--r-- | src/gallium/state_trackers/clover/api/device.cpp | 3 | ||||
-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, 9 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/clover/api/device.cpp b/src/gallium/state_trackers/clover/api/device.cpp index 03767519aaf..1a9127bb3d5 100644 --- a/src/gallium/state_trackers/clover/api/device.cpp +++ b/src/gallium/state_trackers/clover/api/device.cpp @@ -87,7 +87,8 @@ clGetDeviceInfo(cl_device_id dev, cl_device_info param, dev->max_block_size()); case CL_DEVICE_MAX_WORK_GROUP_SIZE: - return scalar_property<size_t>(buf, size, size_ret, SIZE_MAX); + return scalar_property<size_t>(buf, size, size_ret, + dev->max_threads_per_block()); case CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR: return scalar_property<cl_uint>(buf, size, size_ret, 16); diff --git a/src/gallium/state_trackers/clover/core/device.cpp b/src/gallium/state_trackers/clover/core/device.cpp index 8390f3f4abb..59e43af075d 100644 --- a/src/gallium/state_trackers/clover/core/device.cpp +++ b/src/gallium/state_trackers/clover/core/device.cpp @@ -138,6 +138,12 @@ _cl_device_id::max_const_buffers() const { PIPE_SHADER_CAP_MAX_CONST_BUFFERS); } +size_t +_cl_device_id::max_threads_per_block() const { + return get_compute_param<uint64_t>( + pipe, PIPE_COMPUTE_CAP_MAX_THREADS_PER_BLOCK)[0]; +} + std::vector<size_t> _cl_device_id::max_block_size() const { return 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 8f284ba5e42..d10635275b1 100644 --- a/src/gallium/state_trackers/clover/core/device.hpp +++ b/src/gallium/state_trackers/clover/core/device.hpp @@ -55,6 +55,7 @@ public: cl_ulong max_mem_input() const; cl_ulong max_const_buffer_size() const; cl_uint max_const_buffers() const; + size_t max_threads_per_block() const; std::vector<size_t> max_block_size() const; std::string device_name() const; |