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/sis | |
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/sis')
-rw-r--r-- | src/mesa/drivers/dri/sis/sis_span.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/mesa/drivers/dri/sis/sis_span.c b/src/mesa/drivers/dri/sis/sis_span.c index 9e9a509755d..cfbb51007d1 100644 --- a/src/mesa/drivers/dri/sis/sis_span.c +++ b/src/mesa/drivers/dri/sis/sis_span.c @@ -176,24 +176,22 @@ sisDDInitSpanFuncs( GLcontext *ctx ) void sisSetSpanFunctions(struct sis_renderbuffer *srb, const GLvisual *vis) { - if (srb->Base.InternalFormat == GL_RGBA) { - if (vis->redBits == 5 && vis->greenBits == 6 && vis->blueBits == 5) { - sisInitPointers_RGB565( &srb->Base ); - } - else { - sisInitPointers_ARGB8888( &srb->Base ); - } + if (srb->Base.Format == MESA_FORMAT_RGB565) { + sisInitPointers_RGB565( &srb->Base ); } - else if (srb->Base.InternalFormat == GL_DEPTH_COMPONENT16) { + else if (srb->Base.Format == MESA_FORMAT_ARGB8888) { + sisInitPointers_ARGB8888( &srb->Base ); + } + else if (srb->Base.Format == MESA_FORMAT_Z16) { sisInitDepthPointers_z16(&srb->Base); } - else if (srb->Base.InternalFormat == GL_DEPTH_COMPONENT24) { + else if (srb->Base.Format == MESA_FORMAT_S8_Z24) { sisInitDepthPointers_z24_s8(&srb->Base); } - else if (srb->Base.InternalFormat == GL_DEPTH_COMPONENT32) { + else if (srb->Base.Format == MESA_FORMAT_Z32) { sisInitDepthPointers_z32(&srb->Base); } - else if (srb->Base.InternalFormat == GL_STENCIL_INDEX8_EXT) { + else if (srb->Base.Format == MESA_FORMAT_S8) { sisInitStencilPointers_z24_s8(&srb->Base); } } |