GAM_DEPTH_MASK_ID
switch (val & GAM_DEPTH_MASK_ID) {
mask = GAM_DEPTH_MASK_ID << (3 * i);
mask |= GAM_DEPTH_MASK_ID << (3 * depth);