[Mesa-dev] [PATCH 4/7] glsl/link_varyings: switch to 64bit check instead of double.

Dave Airlie airlied at gmail.com
Wed Jun 8 21:15:35 UTC 2016


From: Dave Airlie <airlied at redhat.com>

This is prep work for int64 support.

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 src/compiler/glsl/link_varyings.cpp | 2 +-
 src/compiler/glsl/link_varyings.h   | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/compiler/glsl/link_varyings.cpp b/src/compiler/glsl/link_varyings.cpp
index 99fb3fc..67534a6 100644
--- a/src/compiler/glsl/link_varyings.cpp
+++ b/src/compiler/glsl/link_varyings.cpp
@@ -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.",
diff --git a/src/compiler/glsl/link_varyings.h b/src/compiler/glsl/link_varyings.h
index 0ad4f74..2126a5c 100644
--- a/src/compiler/glsl/link_varyings.h
+++ b/src/compiler/glsl/link_varyings.h
@@ -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:
-- 
2.5.5



More information about the mesa-dev mailing list