Cleanup of texture swizzle and BGRA format handling.
Wrapped validation code for debug build only.