diff options
Diffstat (limited to 'mesalib/src/mesa/drivers/dri/swrast')
-rwxr-xr-x | mesalib/src/mesa/drivers/dri/swrast/swrast.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/mesalib/src/mesa/drivers/dri/swrast/swrast.c b/mesalib/src/mesa/drivers/dri/swrast/swrast.c index fa7d695ab..6e76b1493 100755 --- a/mesalib/src/mesa/drivers/dri/swrast/swrast.c +++ b/mesalib/src/mesa/drivers/dri/swrast/swrast.c @@ -64,7 +64,7 @@ #include "swrast_priv.h" #include "swrast/s_context.h" -const __DRIextension **__driDriverGetExtensions_swrast(void); +PUBLIC const __DRIextension **__driDriverGetExtensions_swrast(void); /** * Screen and config-related functions @@ -83,7 +83,7 @@ static void swrastSetTexBuffer2(__DRIcontext *pDRICtx, GLint target, uint32_t internalFormat; gl_format texFormat; - dri_ctx = pDRICtx->driverPrivate; + dri_ctx = (struct dri_context *)pDRICtx->driverPrivate; internalFormat = (texture_format == __DRI_TEXTURE_FORMAT_RGB ? 3 : 4); @@ -315,7 +315,7 @@ swrast_alloc_back_storage(struct gl_context *ctx, struct gl_renderbuffer *rb, swrast_alloc_front_storage(ctx, rb, internalFormat, width, height); - xrb->Base.Buffer = malloc(height * xrb->pitch); + xrb->Base.Buffer = (GLubyte*)malloc(height * xrb->pitch); return GL_TRUE; } @@ -324,7 +324,7 @@ static struct dri_swrast_renderbuffer * swrast_new_renderbuffer(const struct gl_config *visual, __DRIdrawable *dPriv, GLboolean front) { - struct dri_swrast_renderbuffer *xrb = calloc(1, sizeof *xrb); + struct dri_swrast_renderbuffer *xrb = (struct dri_swrast_renderbuffer *)calloc(1, sizeof *xrb); struct gl_renderbuffer *rb; GLuint pixel_format; @@ -405,7 +405,7 @@ swrast_map_renderbuffer(struct gl_context *ctx, xrb->map_h = h; stride = w * cpp; - xrb->Base.Buffer = malloc(h * stride); + xrb->Base.Buffer = (GLubyte*)malloc(h * stride); sPriv->swrast_loader->getImage(dPriv, x, y, w, h, (char *) xrb->Base.Buffer, @@ -474,7 +474,7 @@ dri_create_buffer(__DRIscreen * sPriv, dPriv->driverPrivate = drawable; drawable->dPriv = dPriv; - drawable->row = malloc(SWRAST_MAX_WIDTH * 4); + drawable->row = (char*)malloc(SWRAST_MAX_WIDTH * 4); if (drawable->row == NULL) goto drawable_fail; @@ -838,8 +838,8 @@ static const struct __DriverAPIRec swrast_driver_api = { }; static const struct __DRIDriverVtableExtensionRec swrast_vtable = { - .base = { __DRI_DRIVER_VTABLE, 1 }, - .vtable = &swrast_driver_api, + /*.base = */{ __DRI_DRIVER_VTABLE, 1 }, + /*.vtable = */&swrast_driver_api, }; static const __DRIextension *swrast_driver_extensions[] = { |