[Mesa-dev] [PATCH 1/2] clover: Don't erase build info of devices not being built

Francisco Jerez currojerez at riseup.net
Tue Dec 11 10:03:35 PST 2012


Tom Stellard <tom at stellard.net> writes:

> From: Tom Stellard <thomas.stellard at amd.com>
>
> Every call to _cl_program::build() was erasing the binaries and logs for
> every device associated with the program.  This is incorrect because
> it is possible to build a program for only a subset of devices and so
> any device not being build should not have this information erased.
> ---
>  src/gallium/state_trackers/clover/core/program.cpp | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>

Thanks.  For both patches:

Reviewed-by: Francisco Jerez <currojerez at riseup.net>

> diff --git a/src/gallium/state_trackers/clover/core/program.cpp b/src/gallium/state_trackers/clover/core/program.cpp
> index 6ca8080..5fcda23 100644
> --- a/src/gallium/state_trackers/clover/core/program.cpp
> +++ b/src/gallium/state_trackers/clover/core/program.cpp
> @@ -42,10 +42,10 @@ _cl_program::_cl_program(clover::context &ctx,
>  
>  void
>  _cl_program::build(const std::vector<clover::device *> &devs) {
> -   __binaries.clear();
> -   __logs.clear();
>  
>     for (auto dev : devs) {
> +      __binaries.erase(dev);
> +      __logs.erase(dev);
>        try {
>           auto module = (dev->ir_format() == PIPE_SHADER_IR_TGSI ?
>                          compile_program_tgsi(__source) :
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 229 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20121211/15ca1501/attachment.pgp>


More information about the mesa-dev mailing list