mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
glsl: Uniform linking support for doubles
Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
This commit is contained in:
parent
3af8db94cd
commit
fe23bb85ba
1 changed files with 6 additions and 1 deletions
|
|
@ -608,7 +608,12 @@ private:
|
|||
}
|
||||
|
||||
if (type->without_array()->is_matrix()) {
|
||||
this->uniforms[id].matrix_stride = 16;
|
||||
const glsl_type *matrix = type->without_array();
|
||||
const unsigned N = matrix->base_type == GLSL_TYPE_DOUBLE ? 8 : 4;
|
||||
const unsigned items = row_major ? matrix->matrix_columns : matrix->vector_elements;
|
||||
|
||||
assert(items <= 4);
|
||||
this->uniforms[id].matrix_stride = glsl_align(items * N, 16);
|
||||
this->uniforms[id].row_major = row_major;
|
||||
} else {
|
||||
this->uniforms[id].matrix_stride = 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue