In the future int64 support will have the same requirements.
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/* double inputs read is only for vertex inputs */
if (stage == MESA_SHADER_VERTEX &&
/* double inputs read is only for vertex inputs */
if (stage == MESA_SHADER_VERTEX &&
- var->type->without_array()->is_dual_slot_double())
+ var->type->without_array()->is_dual_slot())
prog->DoubleInputsRead |= bitfield;
if (stage == MESA_SHADER_FRAGMENT) {
prog->DoubleInputsRead |= bitfield;
if (stage == MESA_SHADER_FRAGMENT) {
/* double element width for double types that takes two slots */
if (this->shader_stage != MESA_SHADER_VERTEX ||
var->data.mode != ir_var_shader_in) {
/* double element width for double types that takes two slots */
if (this->shader_stage != MESA_SHADER_VERTEX ||
var->data.mode != ir_var_shader_in) {
- if (type->without_array()->is_dual_slot_double())
+ if (type->without_array()->is_dual_slot())
* issue (3) of the GL_ARB_vertex_attrib_64bit behavior, this
* is optional behavior, but it seems preferable.
*/
* issue (3) of the GL_ARB_vertex_attrib_64bit behavior, this
* is optional behavior, but it seems preferable.
*/
- if (var->type->without_array()->is_dual_slot_double())
+ if (var->type->without_array()->is_dual_slot())
double_storage_locations |= (use_mask << attr);
}
double_storage_locations |= (use_mask << attr);
}
to_assign[i].var->data.is_unmatched_generic_inout = 0;
used_locations |= (use_mask << location);
to_assign[i].var->data.is_unmatched_generic_inout = 0;
used_locations |= (use_mask << location);
- if (to_assign[i].var->type->without_array()->is_dual_slot_double())
+ if (to_assign[i].var->type->without_array()->is_dual_slot())
double_storage_locations |= (use_mask << location);
}
double_storage_locations |= (use_mask << location);
}
- * Query whether a double takes two slots.
+ * Query whether a 64-bit type takes two slots.
- bool is_dual_slot_double() const
+ bool is_dual_slot() const
- return base_type == GLSL_TYPE_DOUBLE && vector_elements > 2;
+ return is_64bit() && vector_elements > 2;
if (type->is_matrix()) {
const glsl_type *col_type = type->column_type();
unsigned col_slots =
if (type->is_matrix()) {
const glsl_type *col_type = type->column_type();
unsigned col_slots =
- (as_vec4 && col_type->is_dual_slot_double()) ? 2 : 1;
+ (as_vec4 && col_type->is_dual_slot()) ? 2 : 1;
return type->matrix_columns * col_slots;
} else {
/* Regardless of size of vector, it gets a vec4. This is bad
return type->matrix_columns * col_slots;
} else {
/* Regardless of size of vector, it gets a vec4. This is bad
* mess. Hopefully a later pass over the code can pack scalars
* down if appropriate.
*/
* mess. Hopefully a later pass over the code can pack scalars
* down if appropriate.
*/
- return (as_vec4 && type->is_dual_slot_double()) ? 2 : 1;
+ return (as_vec4 && type->is_dual_slot()) ? 2 : 1;
}
case GLSL_TYPE_ARRAY:
assert(type->length > 0);
}
case GLSL_TYPE_ARRAY:
assert(type->length > 0);
}
l->index++;
r->index++;
}
l->index++;
r->index++;
- if (type->is_dual_slot_double()) {
+ if (type->is_dual_slot()) {
l->index++;
if (r->is_double_vertex_input == false)
r->index++;
l->index++;
if (r->is_double_vertex_input == false)
r->index++;