From 1942490bae01d44a08f263ea2dc747d11c82acfe Mon Sep 17 00:00:00 2001 From: Francisco Jerez Date: Tue, 17 May 2016 16:03:13 +0200 Subject: clover: Unify program::build_* into a single method returning a struct. This gets rid of the program::build_* query methods and replaces them with the program::build() method that returns a single data structure containing all parameters for the last build done on the given target device (including build logs, options and the binary itself). [ Serge Martin: Fix inverted opts and log build ctor args ] Reviewed-by: Serge Martin Tested-by: Jan Vesely --- src/gallium/state_trackers/clover/api/program.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/gallium/state_trackers/clover/api') diff --git a/src/gallium/state_trackers/clover/api/program.cpp b/src/gallium/state_trackers/clover/api/program.cpp index 848d2d0329c..91a81dfcc85 100644 --- a/src/gallium/state_trackers/clover/api/program.cpp +++ b/src/gallium/state_trackers/clover/api/program.cpp @@ -287,7 +287,7 @@ clGetProgramInfo(cl_program d_prog, cl_program_info param, case CL_PROGRAM_BINARY_SIZES: buf.as_vector() = map([&](const device &dev) { - return prog.binary(dev).size(); + return prog.build(dev).binary.size(); }, prog.devices()); break; @@ -296,7 +296,7 @@ clGetProgramInfo(cl_program d_prog, cl_program_info param, buf.as_matrix() = map([&](const device &dev) { std::stringbuf bin; std::ostream s(&bin); - prog.binary(dev).serialize(s); + prog.build(dev).binary.serialize(s); return bin.str(); }, prog.devices()); @@ -335,15 +335,15 @@ clGetProgramBuildInfo(cl_program d_prog, cl_device_id d_dev, switch (param) { case CL_PROGRAM_BUILD_STATUS: - buf.as_scalar() = prog.build_status(dev); + buf.as_scalar() = prog.build(dev).status(); break; case CL_PROGRAM_BUILD_OPTIONS: - buf.as_string() = prog.build_opts(dev); + buf.as_string() = prog.build(dev).opts; break; case CL_PROGRAM_BUILD_LOG: - buf.as_string() = prog.build_log(dev); + buf.as_string() = prog.build(dev).log; break; default: -- cgit v1.2.3