glsl/link_varyings: switch to 64bit check instead of double.

This is prep work for int64 support.

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Dave Airlie
2016-06-09 07:02:36 +10:00
parent 35616a9e0e
commit 2df46519e4
2 changed files with 3 additions and 3 deletions

View File

@@ -886,7 +886,7 @@ tfeedback_decl::store(struct gl_context *ctx, struct gl_shader_program *prog,
} }
if (explicit_stride && explicit_stride[buffer]) { if (explicit_stride && explicit_stride[buffer]) {
if (this->is_double() && info->Buffers[buffer].Stride % 2) { if (this->is_64bit() && info->Buffers[buffer].Stride % 2) {
linker_error(prog, "invalid qualifier xfb_stride=%d must be a " linker_error(prog, "invalid qualifier xfb_stride=%d must be a "
"multiple of 8 as its applied to a type that is or " "multiple of 8 as its applied to a type that is or "
"contains a double.", "contains a double.",

View File

@@ -151,7 +151,7 @@ public:
return this->size; return this->size;
else else
return this->vector_elements * this->matrix_columns * this->size * return this->vector_elements * this->matrix_columns * this->size *
(this->is_double() ? 2 : 1); (this->is_64bit() ? 2 : 1);
} }
unsigned get_location() const { unsigned get_location() const {
@@ -160,7 +160,7 @@ public:
private: private:
bool is_double() const bool is_64bit() const
{ {
switch (this->type) { switch (this->type) {
case GL_DOUBLE: case GL_DOUBLE: