[Mesa-dev] [PATCH] clover: support CL_PROGRAM_BINARY_TYPE query

EdB edb+mesa at sigluy.net
Sat Aug 9 04:55:25 PDT 2014


On Saturday, August 09, 2014 01:18:57 AM Ilia Mirkin wrote:
> On Fri, Aug 8, 2014 at 10:10 PM, EdB <edb+mesa at sigluy.net> wrote:
> > ---
> > 
> >  src/gallium/state_trackers/clover/api/program.cpp  | 3 +++
> >  src/gallium/state_trackers/clover/core/program.cpp | 8 ++++++++
> >  src/gallium/state_trackers/clover/core/program.hpp | 1 +
> >  3 files changed, 12 insertions(+)
> > 
> > diff --git a/src/gallium/state_trackers/clover/api/program.cpp
> > b/src/gallium/state_trackers/clover/api/program.cpp index
> > b81ce69..0e9e3c9 100644
> > --- a/src/gallium/state_trackers/clover/api/program.cpp
> > +++ b/src/gallium/state_trackers/clover/api/program.cpp
> > @@ -266,6 +266,9 @@ clGetProgramBuildInfo(cl_program d_prog, cl_device_id
> > d_dev,> 
> >        buf.as_string() = prog.build_log(dev);
> >        break;
> > 
> > +   case CL_PROGRAM_BINARY_TYPE:
> > +      buf.as_scalar<cl_program_binary_type>() = prog.binary_type(dev);
> 
> break?

Thanks
> 
> > +
> > 
> >     default:
> >        throw error(CL_INVALID_VALUE);
> >     
> >     }
> > 
> > diff --git a/src/gallium/state_trackers/clover/core/program.cpp
> > b/src/gallium/state_trackers/clover/core/program.cpp index
> > e09c3aa..482df7e 100644
> > --- a/src/gallium/state_trackers/clover/core/program.cpp
> > +++ b/src/gallium/state_trackers/clover/core/program.cpp
> > @@ -103,6 +103,14 @@ program::build_log(const device &dev) const {
> > 
> >     return _logs.count(&dev) ? _logs.find(&dev)->second : "";
> >  
> >  }
> > 
> > +cl_program_binary_type
> > +program::binary_type(const device &dev) const {
> > +   if (!_binaries.count(&dev))
> > +      return CL_PROGRAM_BINARY_TYPE_NONE;
> > +   else
> > +      return CL_PROGRAM_BINARY_TYPE_EXECUTABLE;
> > +}
> > +
> > 
> >  const compat::vector<module::symbol> &
> >  program::symbols() const {
> >  
> >     if (_binaries.empty())
> > 
> > diff --git a/src/gallium/state_trackers/clover/core/program.hpp
> > b/src/gallium/state_trackers/clover/core/program.hpp index
> > 1081454..b932b95 100644
> > --- a/src/gallium/state_trackers/clover/core/program.hpp
> > +++ b/src/gallium/state_trackers/clover/core/program.hpp
> > @@ -57,6 +57,7 @@ namespace clover {
> > 
> >        cl_build_status build_status(const device &dev) const;
> >        std::string build_opts(const device &dev) const;
> >        std::string build_log(const device &dev) const;
> > 
> > +      cl_program_binary_type binary_type(const device &dev) const;
> > 
> >        const compat::vector<module::symbol> &symbols() const;
> > 
> > --
> > 2.0.4
> > 
> > _______________________________________________
> > mesa-dev mailing list
> > mesa-dev at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/mesa-dev



More information about the mesa-dev mailing list