diff options
author | Chris Forbes <[email protected]> | 2012-11-22 16:23:19 +1300 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2012-11-26 16:34:20 -0800 |
commit | f9a08f7f0f9f65546db4c7388e445fa39f0842c6 (patch) | |
tree | 4ce93b556b39540c851b6c4df01a7b61d38c82ec /src/mesa | |
parent | 894fe54ec9b859b9fa47cc153fdc3c23cb98455e (diff) |
i965: implement get_size for 2_10_10_10 formats
Signed-off-by: Chris Forbes <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_draw_upload.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c index 51531ce90e4..d68aa8c97cf 100644 --- a/src/mesa/drivers/dri/i965/brw_draw_upload.c +++ b/src/mesa/drivers/dri/i965/brw_draw_upload.c @@ -290,6 +290,11 @@ 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; } } |