#include "via_context.h"
#include "via_tris.h"
#include "via_ioctl.h"
-#include "via_state.h"
#include "via_fb.h"
#include "via_3d_reg.h"
-static void viaClear(GLcontext *ctx, GLbitfield mask)
+static void viaClear(struct gl_context *ctx, GLbitfield mask)
{
struct via_context *vmesa = VIA_CONTEXT(ctx);
- __DRIdrawablePrivate *dPriv = vmesa->driDrawable;
+ __DRIdrawable *dPriv = vmesa->driDrawable;
struct via_renderbuffer *const vrb =
(struct via_renderbuffer *) dPriv->driverPrivate;
int flag = 0;
* except that WAIT_IDLE() will spin the CPU polling, while this is
* IRQ driven.
*/
-static void viaWaitIdleVBlank( __DRIdrawablePrivate *dPriv,
+static void viaWaitIdleVBlank( __DRIdrawable *dPriv,
struct via_context *vmesa,
GLuint value )
{
GLboolean missed_target;
- __DRIscreenPrivate *psp = dPriv->driScreenPriv;
+ __DRIscreen *psp = dPriv->driScreenPriv;
VIA_FLUSH_DMA(vmesa);
/*
* Copy the back buffer to the front buffer.
*/
-void viaCopyBuffer(__DRIdrawablePrivate *dPriv)
+void viaCopyBuffer(__DRIdrawable *dPriv)
{
struct via_context *vmesa =
(struct via_context *)dPriv->driContextPriv->driverPrivate;
- __DRIscreenPrivate *psp = dPriv->driScreenPriv;
+ __DRIscreen *psp = dPriv->driScreenPriv;
if (VIA_DEBUG & DEBUG_IOCTL)
fprintf(stderr,
}
-void viaPageFlip(__DRIdrawablePrivate *dPriv)
+void viaPageFlip(__DRIdrawable *dPriv)
{
struct via_context *vmesa =
(struct via_context *)dPriv->driContextPriv->driverPrivate;
struct via_renderbuffer buffer_tmp;
- __DRIscreenPrivate *psp = dPriv->driScreenPriv;
+ __DRIscreen *psp = dPriv->driScreenPriv;
VIA_FLUSH_DMA(vmesa);
if (dPriv->vblFlags == VBLANK_FLAG_SYNC &&
vb[0] = HC_HEADER2;
vb[1] = (HC_ParaType_NotTex << 16);
+ assert(vmesa->driDrawable);
+
if (vmesa->driDrawable->w == 0 || vmesa->driDrawable->h == 0) {
vb[2] = (HC_SubA_HClipTB << 24) | 0x0;
vb[3] = (HC_SubA_HClipLR << 24) | 0x0;
}
}
-static void viaFlush(GLcontext *ctx)
+static void viaFlush(struct gl_context *ctx)
{
struct via_context *vmesa = VIA_CONTEXT(ctx);
VIA_FLUSH_DMA(vmesa);
}
-static void viaFinish(GLcontext *ctx)
+static void viaFinish(struct gl_context *ctx)
{
struct via_context *vmesa = VIA_CONTEXT(ctx);
VIA_FLUSH_DMA(vmesa);
viaWaitIdle(vmesa, GL_FALSE);
}
-static void viaClearStencil(GLcontext *ctx, int s)
+static void viaClearStencil(struct gl_context *ctx, int s)
{
return;
}
-void viaInitIoctlFuncs(GLcontext *ctx)
+void viaInitIoctlFuncs(struct gl_context *ctx)
{
ctx->Driver.Flush = viaFlush;
ctx->Driver.Clear = viaClear;