Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Debugging Core Image Kernel



I am working on a Core Image Kernel patch, and need to print out some values so I can track down why my math is not correct. Is there a way to do this?

You can do any kind of printf() from an image kernel as it runs on the GPU - the only thing you can output are pixels. I guess the best way to debug is to print pixels of different color depending on the result e.g. you can do things like:


float temp = ...
return (temp > 0.0 ? vec4(1,0,0,1) : vec4(0,1,0,1));

________________________________________________________
Pierre-Olivier Latour                            email@hidden
Quartz Composer Architect                Graphics & Imaging Team

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/email@hidden

This email sent to email@hidden
References: 
 >When should a CIImage be considered infinite? (From: Gabriele de Simone <email@hidden>)
 >Debugging Core Image Kernel (From: Paul Ossenbruggen <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.