[Mesa-dev] [PATCH 1/2] mesa: handle GL_UNSIGNED_INT64_ARB properly (v2)
Marek Olšák
maraeo at gmail.com
Tue May 29 01:10:41 UTC 2018
From: Marek Olšák <marek.olsak at amd.com>
Bindless texture handles can be passed via vertex attribs using this type.
This fixes a bunch of bindless piglit tests on radeonsi.
Cc: 18.0 18.1 <mesa-stable at lists.freedesktop.org>
---
src/mesa/main/glformats.c | 2 ++
src/mesa/vbo/vbo_private.h | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c
index cba5e670db0..667020c193c 100644
--- a/src/mesa/main/glformats.c
+++ b/src/mesa/main/glformats.c
@@ -556,20 +556,22 @@ _mesa_bytes_per_vertex_attrib(GLint comps, GLenum type)
case GL_UNSIGNED_INT_2_10_10_10_REV:
if (comps == 4)
return sizeof(GLuint);
else
return -1;
case GL_UNSIGNED_INT_10F_11F_11F_REV:
if (comps == 3)
return sizeof(GLuint);
else
return -1;
+ case GL_UNSIGNED_INT64_ARB:
+ return comps * 8;
default:
return -1;
}
}
/**
* Test if the given format is unsized.
*/
GLboolean
_mesa_is_enum_format_unsized(GLenum format)
diff --git a/src/mesa/vbo/vbo_private.h b/src/mesa/vbo/vbo_private.h
index b69f836aa0b..3f7d0dc6082 100644
--- a/src/mesa/vbo/vbo_private.h
+++ b/src/mesa/vbo/vbo_private.h
@@ -97,22 +97,22 @@ vbo_attrtype_to_integer_flag(GLenum format)
}
}
static inline GLboolean
vbo_attrtype_to_double_flag(GLenum format)
{
switch (format) {
case GL_FLOAT:
case GL_INT:
case GL_UNSIGNED_INT:
- case GL_UNSIGNED_INT64_ARB:
return GL_FALSE;
+ case GL_UNSIGNED_INT64_ARB:
case GL_DOUBLE:
return GL_TRUE;
default:
unreachable("Bad vertex attribute type");
return GL_FALSE;
}
}
/**
--
2.17.0
More information about the mesa-dev
mailing list