summaryrefslogtreecommitdiffstats
path: root/src/glsl/link_varyings.cpp
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2015-10-12 14:15:19 +1000
committerDave Airlie <[email protected]>2015-12-19 11:42:26 +1000
commitb476c587e3c8ffd61e833c3252d69c5edd16c0f6 (patch)
tree73a9091c09ad83e476ef56a7d0e5c54b850c32ea /src/glsl/link_varyings.cpp
parent64cfacf3197170b238d68b0e4a2d556bddd1b7d7 (diff)
glsl: fix transform feedback for 64-bit outupts.
This fixes the calculations for transform feedback for doubles. Reviewed-by: Timothy Arceri <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/glsl/link_varyings.cpp')
-rw-r--r--src/glsl/link_varyings.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/glsl/link_varyings.cpp b/src/glsl/link_varyings.cpp
index 9f6467bd29b..9cc77feb78a 100644
--- a/src/glsl/link_varyings.cpp
+++ b/src/glsl/link_varyings.cpp
@@ -432,6 +432,8 @@ tfeedback_decl::assign_location(struct gl_context *ctx,
this->matched_candidate->type->fields.array->matrix_columns;
const unsigned vector_elements =
this->matched_candidate->type->fields.array->vector_elements;
+ const unsigned dmul =
+ this->matched_candidate->type->fields.array->is_double() ? 2 : 1;
unsigned actual_array_size;
switch (this->lowered_builtin_array_variable) {
case clip_distance:
@@ -459,7 +461,7 @@ tfeedback_decl::assign_location(struct gl_context *ctx,
return false;
}
unsigned array_elem_size = this->lowered_builtin_array_variable ?
- 1 : vector_elements * matrix_cols;
+ 1 : vector_elements * matrix_cols * dmul;
fine_location += array_elem_size * this->array_subscript;
this->size = 1;
} else {
@@ -519,7 +521,6 @@ tfeedback_decl::get_num_outputs() const
if (!this->is_varying()) {
return 0;
}
-
return (this->num_components() + this->location_frac + 3)/4;
}
@@ -968,6 +969,8 @@ varying_matches::record(ir_variable *producer_var, ir_variable *consumer_var)
} else {
slots = type->matrix_columns;
}
+ if (type->without_array()->is_dual_slot_double())
+ slots *= 2;
this->matches[this->num_matches].num_components = 4 * slots;
} else {
this->matches[this->num_matches].num_components