mesa: add support for unsigned 64-bit vertex attributes
This adds support in the VBO and array code to handle unsigned 64-bit vertex attributes as specified by ARB_bindless_texture. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
@@ -176,11 +176,16 @@ vbo_exec_copy_to_current(struct vbo_exec_context *exec)
|
||||
*/
|
||||
GLfloat *current = (GLfloat *)vbo->currval[i].Ptr;
|
||||
fi_type tmp[8]; /* space for doubles */
|
||||
int dmul = exec->vtx.attrtype[i] == GL_DOUBLE ? 2 : 1;
|
||||
int dmul = 1;
|
||||
|
||||
if (exec->vtx.attrtype[i] == GL_DOUBLE ||
|
||||
exec->vtx.attrtype[i] == GL_UNSIGNED_INT64_ARB)
|
||||
dmul = 2;
|
||||
|
||||
assert(exec->vtx.attrsz[i]);
|
||||
|
||||
if (exec->vtx.attrtype[i] == GL_DOUBLE) {
|
||||
if (exec->vtx.attrtype[i] == GL_DOUBLE ||
|
||||
exec->vtx.attrtype[i] == GL_UNSIGNED_INT64_ARB) {
|
||||
memset(tmp, 0, sizeof(tmp));
|
||||
memcpy(tmp, exec->vtx.attrptr[i], exec->vtx.attrsz[i] * sizeof(GLfloat));
|
||||
} else {
|
||||
@@ -241,7 +246,8 @@ vbo_exec_copy_from_current(struct vbo_exec_context *exec)
|
||||
GLint i;
|
||||
|
||||
for (i = VBO_ATTRIB_POS + 1; i < VBO_ATTRIB_MAX; i++) {
|
||||
if (exec->vtx.attrtype[i] == GL_DOUBLE) {
|
||||
if (exec->vtx.attrtype[i] == GL_DOUBLE ||
|
||||
exec->vtx.attrtype[i] == GL_UNSIGNED_INT64_ARB) {
|
||||
memcpy(exec->vtx.attrptr[i], vbo->currval[i].Ptr,
|
||||
exec->vtx.attrsz[i] * sizeof(GLfloat));
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user