Commit 8c9d3c62 authored by Tom Stellard's avatar Tom Stellard Committed by Francisco Jerez
Browse files

clover: Return correct value for CL_DEVICE_ENDIAN_LITTLE



Query the driver using PIPE_CAP_ENDIANNESS rather than always returning
true.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: default avatarFrancisco Jerez <currojerez@riseup.net>
parent 4e90bc9a
......@@ -192,7 +192,8 @@ clGetDeviceInfo(cl_device_id dev, cl_device_info param,
return scalar_property<size_t>(buf, size, size_ret, 0);
case CL_DEVICE_ENDIAN_LITTLE:
return scalar_property<cl_bool>(buf, size, size_ret, CL_TRUE);
return scalar_property<cl_bool>(buf, size, size_ret,
dev->endianness() == PIPE_ENDIAN_LITTLE);
case CL_DEVICE_AVAILABLE:
case CL_DEVICE_COMPILER_AVAILABLE:
......
......@@ -192,3 +192,8 @@ _cl_device_id::ir_target() const {
PIPE_COMPUTE_CAP_IR_TARGET);
return { target.data() };
}
enum pipe_endian
_cl_device_id::endianness() const {
return (enum pipe_endian)pipe->get_param(pipe, PIPE_CAP_ENDIANNESS);
}
......@@ -66,6 +66,7 @@ public:
std::string vendor_name() const;
enum pipe_shader_ir ir_format() const;
std::string ir_target() const;
enum pipe_endian endianness() const;
friend struct _cl_command_queue;
friend class clover::root_resource;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment