Titan card and write_imagef in OpenCL not working

Titan card not working the same as older GT 430 card. I’m using a combination of cloo and openTk to do OpenCL/OpenGL processing. In openGL I’m using a 2D texture and in OpenCL I’m doing a simple write_imagef. With my old card the colors I write in openCL work correctly. With the Titan any place I write comes out white. If I try to write_image(image, (int2) (x, y), color4(0.0f, 0.0f, 0.0f, 1.0f); instead of writing black to those locations it writes white. In the code below it should draw a green grid but it comes out white. If using my old card or using a CPU platform device it draws green as it should.

<b>Kernel code (in file grid.cl)</b>
__kernel void grid(__write_only image2d_t image, int imageWidth, int imageHeight)
{
int l0  = get_local_id( 0 );
int g0  = get_group_id( 0 );
int ls0 = get_local_size( 0 );
int gs0 = get_global_size( 0 );
int l1  = get_local_id( 1 );
int g1  = get_group_id( 1 );
int ls1 = get_local_size( 1 );
int gs1 = get_global_size( 1 );

	barrier(CLK_LOCAL_MEM_FENCE);
	int x = g0 * ls0 + l0;
	int y = g1 * ls1 + l1;

	int dimx_100  = (int)((((float) imageWidth) / 100) + 0.5f);
	int dimy_100  = (int)((((float) imageHeight) / 100) + 0.5f);

	if(((x % (dimx_100 * 10)) == 0) ||
	   ((y % (dimy_100 * 10)) == 0) ||
	   (((x % dimx_100) == 0) && (y > imageHeight - 10)) ||
	   (((y % dimy_100) == 0) && (x < 10)) ||
	   (y == 0) || (x == 0) || (y == imageHeight - 1) || ( x == imageWidth - 1))
	{
		write_imagef(image, (int2)(x, y), (float4)(0.0f, 1.0f, 0.0f, 1.0f)); 
	}
}




<b>Most of the Windows C# code (minus solution, designer, etc.)</b>
#region Using
using System;
using System.Drawing.Imaging;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Threading;
using System.Net.Sockets;
using System.IO.MemoryMappedFiles;
using Microsoft.Win32;
using OpenTK;
using OpenTK.Graphics;
using OpenTK.Graphics.OpenGL;
using Cloo;
using System.Runtime.InteropServices;
using MouseEventArgs = System.Windows.Forms.MouseEventArgs;
using PixelFormat = OpenTK.Graphics.OpenGL.PixelFormat;
#endregion

namespace CLGLInterop
{

    public partial class Form1 : Form
    {
        [DllImport("opengl32.dll")]
        extern static IntPtr wglGetCurrentDC();

        #region privates
        private bool disposed = false;
        private int gridLayerObject;

        private int globalWidth = 0;
        private int globalHeight = 0;

        private ComputeImage2D gridImage = null;

        private ComputeProgram program = null;
        private ComputeKernel GridKernel = null;
        
        private ComputeCommandQueue CQ;
        private ComputeContext Ctx;
        #endregion

        #region Construtor/Dispose
        public Form1()
        {
            InitializeComponent();
        }

        private void DisposeGLCLObjects()
        {
            if (GridKernel != null)
                GridKernel.Dispose();
            if (gridImage != null)
                gridImage.Dispose();
            if (Ctx != null)
                Ctx.Dispose();
            if (CQ != null)
                CQ.Dispose();

            GridKernel = null;
            gridImage = null;
            Ctx = null;
            CQ = null;
        }
        #endregion

        #region GLControl Load
        private void glControl1_Load(object sender, EventArgs e)
        {
            GL.ClearColor(Color.Black);
            GL.Enable(EnableCap.DepthTest);
            GL.DepthFunc(DepthFunction.Lequal);
            GL.ColorMaterial(MaterialFace.FrontAndBack, ColorMaterialParameter.AmbientAndDiffuse);
            GL.Enable(EnableCap.ColorMaterial);
            GL.Enable(EnableCap.Blend);
            GL.BlendFunc(BlendingFactorSrc.SrcAlpha, BlendingFactorDest.OneMinusSrcAlpha);
            GL.PointSize(1f);
            GL.Enable(EnableCap.PointSmooth);
            GL.Hint(HintTarget.PointSmoothHint, HintMode.Nicest);

            LoadPlatformAndData();

            CreateKernels();
            SetupViewport(true);
        }
        #endregion

        #region Load Platform
        private void LoadPlatformAndData()
        {

            IntPtr curDC = wglGetCurrentDC();
            
            IGraphicsContextInternal ctx = (IGraphicsContextInternal)GraphicsContext.CurrentContext;
            IntPtr raw_context_handle = ctx.Context.Handle;
            ComputeContextProperty p1 = new ComputeContextProperty(ComputeContextPropertyName.CL_GL_CONTEXT_KHR,
                                                                   raw_context_handle);
            ComputeContextProperty p2 = new ComputeContextProperty(ComputeContextPropertyName.CL_WGL_HDC_KHR, curDC);
            ComputeContextProperty p3 = new ComputeContextProperty(ComputeContextPropertyName.Platform,
                                                                   ComputePlatform.Platforms[2].Handle.Value);
            List<ComputeContextProperty> props = new List<ComputeContextProperty> { p1, p2, p3 };
            ComputeContextPropertyList Properties = new ComputeContextPropertyList(props);
            Ctx = new ComputeContext(ComputeDeviceTypes.All, Properties, null, IntPtr.Zero);

            CQ = new ComputeCommandQueue(Ctx, Ctx.Devices[0], ComputeCommandQueueFlags.None);
        }
        #endregion

        #region Create Kernels
        private void CreateKernels()
        {
            // build grid, power and dpx kernels
            TextReader genericReader;
            string text;
            genericReader = new StreamReader("grid.cl");
            text = genericReader.ReadToEnd();
            genericReader.Close();
            program = new ComputeProgram(Ctx, text);
            program.Build(Ctx.Devices, "", null, IntPtr.Zero);
            GridKernel = program.CreateKernel("grid");
            program.Dispose();
        }
        #endregion

        #region Create Textures
        private void makeImageTransparent(Bitmap bmp)
        {
            for (int x = 0; x < bmp.Width; x++)
                for (int y = 0; y < bmp.Height; y++)
                    bmp.SetPixel(x, y, Color.Transparent);
        }

        private int CreateTexture(int width, int height)
        {
            TextureTarget Target = TextureTarget.Texture2D;

            int texture;
            GL.GenTextures(1, out texture);
            GL.BindTexture(Target, texture);

            float version = Single.Parse(GL.GetString(StringName.Version).Substring(0, 3), System.Globalization.CultureInfo.InvariantCulture);
            if (version >= 1.4)
            {
                GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.GenerateMipmap, (int)All.True);
                GL.TexParameter(Target, TextureParameterName.TextureMinFilter, (int)TextureMinFilter.LinearMipmapLinear);
            }
            else
            {
                GL.TexParameter(Target, TextureParameterName.TextureMinFilter, (int)TextureMinFilter.Linear);
            }
            GL.TexParameter(Target, TextureParameterName.TextureMagFilter, (int)TextureMagFilter.Linear);

            GL.TexParameter(Target, TextureParameterName.TextureWrapS, (int)TextureWrapMode.Repeat);
            GL.TexParameter(Target, TextureParameterName.TextureWrapT, (int)TextureWrapMode.Repeat);

            Bitmap bitmap = new Bitmap(globalWidth, globalHeight,
                    System.Drawing.Imaging.PixelFormat.Format32bppArgb);
            bitmap.MakeTransparent();
            makeImageTransparent(bitmap);
            BitmapData data = bitmap.LockBits(new Rectangle(new Point(), bitmap.Size),
                    ImageLockMode.ReadOnly, bitmap.PixelFormat);
            GL.TexImage2D(Target, 0, PixelInternalFormat.Rgba, data.Width, data.Height, 0, 
                    PixelFormat.Bgra, PixelType.UnsignedByte, data.Scan0);
            GL.Finish();
            bitmap.UnlockBits(data);

            return texture;
        }

        private void CreateTextures()
        {

            GL.Enable(EnableCap.Texture2D);

            gridLayerObject = CreateTexture(globalWidth, globalHeight);
            gridImage = ComputeImage2D.CreateFromGLTexture2D(Ctx, ComputeMemoryFlags.ReadWrite,
                            (int)TextureTarget.Texture2D, 0, gridLayerObject);
            GL.Disable(EnableCap.Texture2D);
        }
        #endregion

        #region Set Viewport
        private void SetupViewport(bool recreate)
        {
            if ((glControl1.Width <= 0) || (glControl1.Height <= 0))
                return;

            globalWidth = (glControl1.Width <= 0) ? 1 : glControl1.Width;
            globalHeight = (glControl1.Height <= 0) ? 1 : glControl1.Height;

            GL.MatrixMode(MatrixMode.Projection);
            GL.LoadIdentity();
            GL.Ortho(0, globalWidth, 0, globalHeight, 1, -1);
            GL.MatrixMode(MatrixMode.Modelview);
            GL.Viewport(0, 0, globalWidth, globalHeight);
            if (recreate)
            {
                CreateTextures();
                UpdateGrid();
            }
            glControl1.Invalidate();
        }
        #endregion

        #region Update Grid
        private void UpdateGrid()
        {
            if (gridImage == null)
                return;

            List<ComputeMemory> c = new List<ComputeMemory>() { gridImage };
            CQ.AcquireGLObjects(c, null);
            GridKernel.SetMemoryArgument(0, gridImage);
            GridKernel.SetValueArgument(1, globalWidth);
            GridKernel.SetValueArgument(2, globalHeight);
            CQ.Execute(GridKernel, null, new long[] { globalWidth, globalHeight }, null, null);
            CQ.ReleaseGLObjects(c, null);
            CQ.Finish();
        }
        #endregion

        #region Paint
        private void glControl1_Paint(object sender, PaintEventArgs e)
        {
            glControl1.MakeCurrent();

            GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
            GL.Enable(EnableCap.Texture2D);

            GL.Hint(HintTarget.PerspectiveCorrectionHint, HintMode.Nicest);
            GL.BindTexture(TextureTarget.Texture2D, gridLayerObject);
            GL.Begin(BeginMode.Quads);
            GL.TexCoord2(0.0f, 1.0f);
            GL.Vertex2(0.0f, 0.0f);
            GL.TexCoord2(1.0f, 1.0f);
            GL.Vertex2(globalWidth, 0.0f);
            GL.TexCoord2(1.0f, 0.0f);
            GL.Vertex2(globalWidth, globalHeight);
            GL.TexCoord2(0.0f, 0.0f);
            GL.Vertex2(0.0f, globalHeight);
            GL.End();

            glControl1.SwapBuffers();
        }
        #endregion

        #region Button Events
        private void Form1_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (!disposed)
            {
                disposed = true;
                DisposeGLCLObjects();
                Close();
            }
        }

        private void btnClose_Click(object sender, EventArgs e)
        {
            if (!disposed)
            {
                disposed = true;
                DisposeGLCLObjects();
                Close();
            }
        }

        private void Form1_Resize(object sender, EventArgs e)
        {
            SetupViewport(true);
        }
        #endregion
    }
}

As per customer service I installed the latest driver version 331.58 and this problem has been corrected.