glsl/link_varyings: switch to 64bit check instead of double.
authorDave Airlie <airlied@redhat.com>
Wed, 8 Jun 2016 21:02:36 +0000 (07:02 +1000)
committerDave Airlie <airlied@redhat.com>
Wed, 8 Jun 2016 21:37:43 +0000 (07:37 +1000)
This is prep work for int64 support.

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/compiler/glsl/link_varyings.cpp
src/compiler/glsl/link_varyings.h

index 99fb3fcdc004f1f04e0ac4e256db9f7681fea878..67534a6ca82f1e24a12a9a45d6f72ebc79259b76 100644 (file)
@@ -886,7 +886,7 @@ tfeedback_decl::store(struct gl_context *ctx, struct gl_shader_program *prog,
    }
 
    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 "
                       "multiple of 8 as its applied to a type that is or "
                       "contains a double.",
index 0ad4f74050296e9cccd1345bd2f37a22f97c07f1..2126a5c6d98962f4d5c054ec19cc3c4299d0ba11 100644 (file)
@@ -151,7 +151,7 @@ public:
          return this->size;
       else
          return this->vector_elements * this->matrix_columns * this->size *
-            (this->is_double() ? 2 : 1);
+            (this->is_64bit() ? 2 : 1);
    }
 
    unsigned get_location() const {
@@ -160,7 +160,7 @@ public:
 
 private:
 
-   bool is_double() const
+   bool is_64bit() const
    {
       switch (this->type) {
       case GL_DOUBLE: