Thursday 2 June 2011

Using the GNU diff tool to make patch files from exported repository directories

I had a working copy from a repository I didn't want to directly modify (as I don't want to waste bandwidth checking out a new copy over and over or deal with reverting *I have my reasons*) so I exported a copy and modified that. After modifying it I wanted to make a patch file of the changes. Since I exported it however there was no connection to the repo, or specifically the repo client I was using, so the client's diff/patch tools were useless. However, that is good, I would rather do it this way anyway. :)

Using the diff tool (utility, whatever) I got exactly what I wanted: a unified diff file of all the files in a directory (recursively) including newly added files, but not removed files and some other pesky files.

Here is the command I used:

diff -u -r -x '*.meta' --unidirectional-new-file ./repo_dir/ ./exported_dir/

Parameter Description
-u Unified diff
-r Recursively traverse the directory
-x '*.meta' Ignore all files ending in .meta (For Unity3D's "repo friendly-ness")
--unidirectional-new-file Include new files in the diff, but not removed ones (for that use -N)
./repo_dir/ Unmodified
./exported_dir/ Contains modified files


Diff's help and man pages are pretty sparse, the online manual is much better: http://www.gnu.org/software/diffutils/manual/

Wednesday 1 June 2011

OpenCL on ATI Mobility Radeon

In my recent adventure of getting OpenCL working on my laptop (see: Catalyst Install Manager not installing device drivers) I was having a hard time figuring out why even though I had the latest drivers for my card (an ATI Mobility Radeon HD 5870) and even the AMD Accelerated Parallel Processing (APP) SDK (formerly ATI Stream), OpenCL was not working. My GPU was not showing up as an OpenGL device using GPU Caps Viewer, and the examples from the AMD APP SDK were clearly stating:"GPU not found. Falling back to CPU device."

After a bit of trouble and frustration I found a post by animal007uk in the thread http://www.techpowerup.com/forums/showthread.php?t=140419 (go straight to their post here)

For the Mobility Radeon card you need the specific Mobility drivers which are available (Win7 64-bit) at http://support.amd.com/us/gpudownload/windows/Pages/radeonmob_win7-64.aspx as mentioned in animal007uk's post.

Now OpenCL is working perfectly! Yay!

Catalyst Install Manager not installing Display Drivers



Today while I was trying to get OpenCL (Wikipedia Link) working on my Asus G73Jh Laptop (Link 2) with an ATI Mobility Radeon HD 5870 Graphics Card I decided to try completely uninstalling and reinstalling all AMD/ATI drivers and software. I used the ATI Catalyst Install Manager's "Express Uninstall ALL ATI Software" option. However after restarting I tried to install the most current Catalyst Software Suite to find that while choosing a "Custom" setup that a number of the options were not showing up, most worrying the "Display Drivers" were not being installed. Attempting to upgrade the graphics card's drivers via Windows (Device Manager) didn't help, nor did attempting to install the drivers (in the Catalyst Software Suite's Packages\Drivers\Display\W76A_INF directory) manually.

I thought I was really stuck when I decided to download the drivers from the COMPUTER'S manufacture's website (Asus) verses the GRAPHICS CARD'S manufacture's (AMD/ATI) website.

This allowed me to get an initial install of the graphics card's driver from which I could then install the latest drivers from the card's manufactures website. :)