diff options
author | Brian Paul <[email protected]> | 2011-12-05 20:40:48 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2011-12-08 08:56:30 -0700 |
commit | d0dc75c000d5af92648c7de901756400672b8447 (patch) | |
tree | b24277323119309015a3d8a2e3aea266d09b4299 /src/mesa/drivers/dri | |
parent | b85284f45e8b05ba9a0dac8dd95a9c078e4a635e (diff) |
mesa/drivers: use new swrast renderbuffer functions
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_pixel.c | 1 | ||||
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_screen.c | 15 | ||||
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_span.c | 27 | ||||
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nouveau_screen.c | 7 | ||||
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_screen.c | 3 | ||||
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_span.c | 9 | ||||
-rw-r--r-- | src/mesa/drivers/dri/swrast/swrast.c | 15 |
7 files changed, 42 insertions, 35 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_pixel.c b/src/mesa/drivers/dri/intel/intel_pixel.c index 4f665a746e7..eeafe223443 100644 --- a/src/mesa/drivers/dri/intel/intel_pixel.c +++ b/src/mesa/drivers/dri/intel/intel_pixel.c @@ -25,6 +25,7 @@ * **************************************************************************/ +#include "main/accum.h" #include "main/enums.h" #include "main/state.h" #include "main/bufferobj.h" diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c index f67bef95566..e4cc5b0864e 100644 --- a/src/mesa/drivers/dri/intel/intel_screen.c +++ b/src/mesa/drivers/dri/intel/intel_screen.c @@ -33,6 +33,7 @@ #include "main/hash.h" #include "main/fbobject.h" #include "main/mfeatures.h" +#include "swrast/s_renderbuffer.h" #include "utils.h" #include "xmlpool.h" @@ -470,13 +471,13 @@ intelCreateBuffer(__DRIscreen * driScrnPriv, } /* now add any/all software-based renderbuffers we may need */ - _mesa_add_soft_renderbuffers(fb, - false, /* never sw color */ - false, /* never sw depth */ - false, /* never sw stencil */ - mesaVis->accumRedBits > 0, - false, /* never sw alpha */ - false /* never sw aux */ ); + _swrast_add_soft_renderbuffers(fb, + false, /* never sw color */ + false, /* never sw depth */ + false, /* never sw stencil */ + mesaVis->accumRedBits > 0, + false, /* never sw alpha */ + false /* never sw aux */ ); driDrawPriv->driverPrivate = fb; return true; diff --git a/src/mesa/drivers/dri/intel/intel_span.c b/src/mesa/drivers/dri/intel/intel_span.c index d203617488c..43b815114ad 100644 --- a/src/mesa/drivers/dri/intel/intel_span.c +++ b/src/mesa/drivers/dri/intel/intel_span.c @@ -46,6 +46,7 @@ #include "intel_tex.h" #include "swrast/swrast.h" +#include "swrast/s_renderbuffer.h" static void intel_set_span_functions(struct intel_context *intel, @@ -415,19 +416,19 @@ static span_init_func intel_span_init_funcs[MESA_FORMAT_COUNT] = [MESA_FORMAT_XRGB8888] = intel_InitPointers_xRGB8888, [MESA_FORMAT_ARGB8888] = intel_InitPointers_ARGB8888, [MESA_FORMAT_SARGB8] = intel_InitPointers_ARGB8888, - [MESA_FORMAT_Z16] = _mesa_set_renderbuffer_accessors, - [MESA_FORMAT_X8_Z24] = _mesa_set_renderbuffer_accessors, - [MESA_FORMAT_S8_Z24] = _mesa_set_renderbuffer_accessors, - [MESA_FORMAT_S8] = _mesa_set_renderbuffer_accessors, - [MESA_FORMAT_R8] = _mesa_set_renderbuffer_accessors, - [MESA_FORMAT_GR88] = _mesa_set_renderbuffer_accessors, - [MESA_FORMAT_R16] = _mesa_set_renderbuffer_accessors, - [MESA_FORMAT_RG1616] = _mesa_set_renderbuffer_accessors, - [MESA_FORMAT_RGBA_FLOAT32] = _mesa_set_renderbuffer_accessors, - [MESA_FORMAT_RG_FLOAT32] = _mesa_set_renderbuffer_accessors, - [MESA_FORMAT_R_FLOAT32] = _mesa_set_renderbuffer_accessors, - [MESA_FORMAT_INTENSITY_FLOAT32] = _mesa_set_renderbuffer_accessors, - [MESA_FORMAT_LUMINANCE_FLOAT32] = _mesa_set_renderbuffer_accessors, + [MESA_FORMAT_Z16] = _swrast_set_renderbuffer_accessors, + [MESA_FORMAT_X8_Z24] = _swrast_set_renderbuffer_accessors, + [MESA_FORMAT_S8_Z24] = _swrast_set_renderbuffer_accessors, + [MESA_FORMAT_S8] = _swrast_set_renderbuffer_accessors, + [MESA_FORMAT_R8] = _swrast_set_renderbuffer_accessors, + [MESA_FORMAT_GR88] = _swrast_set_renderbuffer_accessors, + [MESA_FORMAT_R16] = _swrast_set_renderbuffer_accessors, + [MESA_FORMAT_RG1616] = _swrast_set_renderbuffer_accessors, + [MESA_FORMAT_RGBA_FLOAT32] = _swrast_set_renderbuffer_accessors, + [MESA_FORMAT_RG_FLOAT32] = _swrast_set_renderbuffer_accessors, + [MESA_FORMAT_R_FLOAT32] = _swrast_set_renderbuffer_accessors, + [MESA_FORMAT_INTENSITY_FLOAT32] = _swrast_set_renderbuffer_accessors, + [MESA_FORMAT_LUMINANCE_FLOAT32] = _swrast_set_renderbuffer_accessors, }; bool diff --git a/src/mesa/drivers/dri/nouveau/nouveau_screen.c b/src/mesa/drivers/dri/nouveau/nouveau_screen.c index c845280f360..424dfdc1993 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_screen.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_screen.c @@ -35,6 +35,7 @@ #include "main/framebuffer.h" #include "main/renderbuffer.h" +#include "swrast/s_renderbuffer.h" static const __DRIextension *nouveau_screen_extensions[]; @@ -200,9 +201,9 @@ nouveau_create_buffer(__DRIscreen *dri_screen, } /* Software renderbuffers. */ - _mesa_add_soft_renderbuffers(fb, GL_FALSE, GL_FALSE, GL_FALSE, - visual->accumRedBits > 0, - GL_FALSE, GL_FALSE); + _swrast_add_soft_renderbuffers(fb, GL_FALSE, GL_FALSE, GL_FALSE, + visual->accumRedBits > 0, + GL_FALSE, GL_FALSE); drawable->driverPrivate = fb; diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c index 391b9f8c7bf..2e364d02807 100644 --- a/src/mesa/drivers/dri/radeon/radeon_screen.c +++ b/src/mesa/drivers/dri/radeon/radeon_screen.c @@ -42,6 +42,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "main/framebuffer.h" #include "main/renderbuffer.h" #include "main/fbobject.h" +#include "swrast/s_renderbuffer.h" #define STANDALONE_MMIO #include "radeon_chipset.h" @@ -651,7 +652,7 @@ radeonCreateBuffer( __DRIscreen *driScrnPriv, depth->has_surface = screen->depthHasSurface; } - _mesa_add_soft_renderbuffers(&rfb->base, + _swrast_add_soft_renderbuffers(&rfb->base, GL_FALSE, /* color */ swDepth, swStencil, diff --git a/src/mesa/drivers/dri/radeon/radeon_span.c b/src/mesa/drivers/dri/radeon/radeon_span.c index ebacf8ec20f..e3bdc36f954 100644 --- a/src/mesa/drivers/dri/radeon/radeon_span.c +++ b/src/mesa/drivers/dri/radeon/radeon_span.c @@ -44,6 +44,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "main/texformat.h" #include "main/renderbuffer.h" #include "swrast/swrast.h" +#include "swrast/s_renderbuffer.h" #include "radeon_common.h" #include "radeon_span.h" @@ -298,13 +299,13 @@ static void radeonSetSpanFunctions(struct radeon_renderbuffer *rrb) } else if (rrb->base.Format == MESA_FORMAT_ARGB1555_REV) { radeonInitPointers_ARGB1555_REV(&rrb->base); } else if (rrb->base.Format == MESA_FORMAT_Z16) { - _mesa_set_renderbuffer_accessors(&rrb->base); + _swrast_set_renderbuffer_accessors(&rrb->base); } else if (rrb->base.Format == MESA_FORMAT_X8_Z24) { - _mesa_set_renderbuffer_accessors(&rrb->base); + _swrast_set_renderbuffer_accessors(&rrb->base); } else if (rrb->base.Format == MESA_FORMAT_S8_Z24) { - _mesa_set_renderbuffer_accessors(&rrb->base); + _swrast_set_renderbuffer_accessors(&rrb->base); } else if (rrb->base.Format == MESA_FORMAT_S8) { - _mesa_set_renderbuffer_accessors(&rrb->base); + _swrast_set_renderbuffer_accessors(&rrb->base); } else { fprintf(stderr, "radeonSetSpanFunctions: bad format: 0x%04X\n", rrb->base.Format); } diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c index 629760441ad..ac82dc7d568 100644 --- a/src/mesa/drivers/dri/swrast/swrast.c +++ b/src/mesa/drivers/dri/swrast/swrast.c @@ -38,6 +38,7 @@ #include "main/imports.h" #include "main/renderbuffer.h" #include "swrast/swrast.h" +#include "swrast/s_renderbuffer.h" #include "swrast_setup/swrast_setup.h" #include "tnl/tnl.h" #include "tnl/t_context.h" @@ -490,13 +491,13 @@ dri_create_buffer(__DRIscreen * sPriv, } /* add software renderbuffers */ - _mesa_add_soft_renderbuffers(fb, - GL_FALSE, /* color */ - visual->haveDepthBuffer, - visual->haveStencilBuffer, - visual->haveAccumBuffer, - GL_FALSE, /* alpha */ - GL_FALSE /* aux bufs */); + _swrast_add_soft_renderbuffers(fb, + GL_FALSE, /* color */ + visual->haveDepthBuffer, + visual->haveStencilBuffer, + visual->haveAccumBuffer, + GL_FALSE, /* alpha */ + GL_FALSE /* aux bufs */); return GL_TRUE; |