On Tue, Oct 9, 2012 at 2:33 AM, Chris Forbes <chr...@ijw.co.nz> wrote: > --- > src/mesa/drivers/dri/i965/brw_draw_upload.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c > b/src/mesa/drivers/dri/i965/brw_draw_upload.c > index aba1559..6b073ad 100644 > --- a/src/mesa/drivers/dri/i965/brw_draw_upload.c > +++ b/src/mesa/drivers/dri/i965/brw_draw_upload.c > @@ -291,6 +291,10 @@ static GLuint get_size( GLenum type ) > case GL_UNSIGNED_SHORT: return sizeof(GLushort); > case GL_UNSIGNED_BYTE: return sizeof(GLubyte); > case GL_FIXED: return sizeof(GLuint); > + /* packed formats: always have 4 components, and element size is > + * 4 bytes, so pretend each component is 1 byte. */ > + case GL_INT_2_10_10_10_REV: return sizeof(GLbyte); > + case GL_UNSIGNED_INT_2_10_10_10_REV: return sizeof(GLubyte); > default: assert(0); return 0; > } > } > -- > 1.7.12.2
This doesn't look right. It looks like get_size() should return the size of the element, not the size of the components. _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev