enum PACKED gl_uniform_driver_format {
uniform_native = 0, /**< Store data in the native format. */
uniform_int_float, /**< Store integer data as floats. */
- uniform_bool_float, /**< Store boolean data as floats. */
-
- /**
- * Store boolean data as integer using 1 for \c true.
- */
- uniform_bool_int_0_1,
-
- /**
- * Store boolean data as integer using ~0 for \c true.
- */
- uniform_bool_int_0_not0
};
struct gl_uniform_driver_storage {
dst += array_index * store->element_stride;
switch (store->format) {
- case uniform_native:
- case uniform_bool_int_0_1: {
+ case uniform_native: {
unsigned j;
unsigned v;
break;
}
- case uniform_int_float:
- case uniform_bool_float: {
+ case uniform_int_float: {
const int *isrc = (const int *) src;
unsigned j;
unsigned v;
break;
}
- case uniform_bool_int_0_not0: {
- const int *isrc = (const int *) src;
- unsigned j;
- unsigned v;
- unsigned c;
-
- for (j = 0; j < count; j++) {
- for (v = 0; v < vectors; v++) {
- for (c = 0; c < components; c++) {
- ((int *) dst)[c] = *isrc == 0 ? 0 : ~0;
- isrc++;
- }
-
- dst += store->vector_stride;
- }
-
- dst += extra_stride;
- }
- break;
- }
-
default:
assert(!"Should not get here.");
break;