halide/Halide — pull request #229 by jrprice (2014-02-12 00:39:16+00:00)
Title: Fix for embedded constant images for GPU targets

There are two fixes for embedded constant images in this pull request.

1. The 'host_dirty' flag has been initialized to 'true', since the constant data used to initialize the image always starts on the host (at present). Without this, the constant image data was never being uploaded to the device.

2. The .buffer GlobalVariables representing these embedded images are no longer marked as constant (for GPU targets only). This is because the '.dev' buffer value needs to be initialized at runtime (i.e. by 'halide_dev_malloc'). When these were marked as constant, compilers were optimizing out any references to the '.dev' value since they assumed (understandably) that they would always be 0.