diff options
author | Brian Paul <[email protected]> | 2009-10-22 19:49:21 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-10-22 19:57:32 -0600 |
commit | 1160acbfea986a821761d18f5f14d5d2cb0dea8c (patch) | |
tree | 81e14117fc5b73e2f53b2cc6deb35e416036f3bb /src/mesa/drivers/dri/savage/savagespan.c | |
parent | cf0e25d4c89b62f37ff8d1f11c50efcab6557c7f (diff) |
dri/drivers: update driNewRenderbuffer() to take a gl_format
Now pass a specific MESA_FORMAT_x token to indicate the renderbuffer's
format. This is better than passing a GLenum and having to guess the
specific format.
I'm unable to test all the drivers, but any issues should be easy to fix.
Diffstat (limited to 'src/mesa/drivers/dri/savage/savagespan.c')
-rw-r--r-- | src/mesa/drivers/dri/savage/savagespan.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/mesa/drivers/dri/savage/savagespan.c b/src/mesa/drivers/dri/savage/savagespan.c index 9615e34013c..3bb6fbcc63c 100644 --- a/src/mesa/drivers/dri/savage/savagespan.c +++ b/src/mesa/drivers/dri/savage/savagespan.c @@ -255,15 +255,13 @@ void savageSetSpanFunctions(driRenderbuffer *drb, const GLvisual *vis, GLboolean float_depth) { - if (drb->Base.InternalFormat == GL_RGBA) { - if (vis->redBits == 5 && vis->greenBits == 6 && vis->blueBits == 5) { - savageInitPointers_565(&drb->Base); - } - else { - savageInitPointers_8888(&drb->Base); - } + if (drb->Base.Format == MESA_FORMAT_RGB565) { + savageInitPointers_565(&drb->Base); + } + else if (drb->Base.Format == MESA_FORMAT_ARGB8888) { + savageInitPointers_8888(&drb->Base); } - else if (drb->Base.InternalFormat == GL_DEPTH_COMPONENT16) { + else if (drb->Base.Format == MESA_FORMAT_Z16) { if (float_depth) { savageInitDepthPointers_z16f(&drb->Base); } @@ -271,7 +269,7 @@ savageSetSpanFunctions(driRenderbuffer *drb, const GLvisual *vis, savageInitDepthPointers_z16(&drb->Base); } } - else if (drb->Base.InternalFormat == GL_DEPTH_COMPONENT24) { + else if (drb->Base.Format == MESA_FORMAT_S8_Z24) { if (float_depth) { savageInitDepthPointers_s8_z24f(&drb->Base); } @@ -279,7 +277,7 @@ savageSetSpanFunctions(driRenderbuffer *drb, const GLvisual *vis, savageInitDepthPointers_s8_z24(&drb->Base); } } - else if (drb->Base.InternalFormat == GL_STENCIL_INDEX8_EXT) { + else if (drb->Base.Format == MESA_FORMAT_S8) { savageInitStencilPointers_s8_z24(&drb->Base); } } |