memcpy(&dst[didx].u, &tmp, sizeof(tmp));
break;
}
+ case GLSL_TYPE_DOUBLE: {
+ double d;
+ memcpy(&d, &src[sidx].f, sizeof(d));
+ int64_t tmp = (int64_t) round(d);
+ memcpy(&dst[didx].u, &tmp, sizeof(tmp));
+ break;
+ }
default:
assert(!"Should not get here.");
break;
memcpy(&dst[didx].u, &tmp, sizeof(tmp));
break;
}
+ case GLSL_TYPE_DOUBLE: {
+ double d;
+ memcpy(&d, &src[sidx].f, sizeof(d));
+ uint64_t tmp = (d < 0.0) ? 0ull : (uint64_t) round(d);
+ memcpy(&dst[didx].u, &tmp, sizeof(tmp));
+ break;
+ }
default:
assert(!"Should not get here.");
break;