summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/unichrome/via_state.c
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2007-01-16 11:22:57 +0000
committerKeith Whitwell <[email protected]>2007-01-16 11:22:57 +0000
commit6a3fdc3a1ea6c306d9543791bf172dd1052d7382 (patch)
treec372c6daff13e435e79914c2e40dfe9d370c337b /src/mesa/drivers/dri/unichrome/via_state.c
parent0b412f8f156b46b0e7220a2b61e0f41781769f66 (diff)
parenta03fc8277180e2171519165a724849e2254ef0b7 (diff)
Merge branch 'master' of git+ssh://[email protected]/git/mesa/mesa into vbo-0.2
Conflicts: src/mesa/array_cache/sources src/mesa/drivers/dri/i965/brw_context.c src/mesa/drivers/dri/i965/brw_draw.c src/mesa/drivers/dri/i965/brw_fallback.c src/mesa/drivers/dri/i965/brw_vs_emit.c src/mesa/drivers/dri/i965/brw_vs_tnl.c src/mesa/drivers/dri/mach64/mach64_context.c src/mesa/main/extensions.c src/mesa/main/getstring.c src/mesa/tnl/sources src/mesa/tnl/t_save_api.c src/mesa/tnl/t_save_playback.c src/mesa/tnl/t_vtx_api.c src/mesa/tnl/t_vtx_exec.c src/mesa/vbo/vbo_attrib.h src/mesa/vbo/vbo_exec_api.c src/mesa/vbo/vbo_save_api.c src/mesa/vbo/vbo_save_draw.c
Diffstat (limited to 'src/mesa/drivers/dri/unichrome/via_state.c')
-rw-r--r--src/mesa/drivers/dri/unichrome/via_state.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/unichrome/via_state.c b/src/mesa/drivers/dri/unichrome/via_state.c
index 102a333068f..30b9dc289a7 100644
--- a/src/mesa/drivers/dri/unichrome/via_state.c
+++ b/src/mesa/drivers/dri/unichrome/via_state.c
@@ -476,6 +476,9 @@ void viaEmitState(struct via_context *vmesa)
*/
if (ctx->Polygon.StippleFlag) {
GLuint *stipple = &ctx->PolygonStipple[0];
+ __DRIdrawablePrivate *dPriv = vmesa->driDrawable;
+ struct via_renderbuffer *const vrb =
+ (struct via_renderbuffer *) dPriv->driverPrivate;
GLint i;
BEGIN_RING(38);
@@ -498,9 +501,9 @@ void viaEmitState(struct via_context *vmesa)
OUT_RING( HC_HEADER2 );
OUT_RING( (HC_ParaType_NotTex << 16) );
OUT_RING( (HC_SubA_HSPXYOS << 24) |
- (((32- vmesa->drawXoff) & 0x1f) << HC_HSPXOS_SHIFT));
+ (((32- vrb->drawXoff) & 0x1f) << HC_HSPXOS_SHIFT));
OUT_RING( (HC_SubA_HSPXYOS << 24) |
- (((32 - vmesa->drawXoff) & 0x1f) << HC_HSPXOS_SHIFT));
+ (((32 - vrb->drawXoff) & 0x1f) << HC_HSPXOS_SHIFT));
ADVANCE_RING();
}
@@ -720,15 +723,18 @@ static void viaColorMask(GLcontext *ctx,
void viaCalcViewport(GLcontext *ctx)
{
struct via_context *vmesa = VIA_CONTEXT(ctx);
+ __DRIdrawablePrivate *dPriv = vmesa->driDrawable;
+ struct via_renderbuffer *const vrb =
+ (struct via_renderbuffer *) dPriv->driverPrivate;
const GLfloat *v = ctx->Viewport._WindowMap.m;
GLfloat *m = vmesa->ViewportMatrix.m;
/* See also via_translate_vertex.
*/
m[MAT_SX] = v[MAT_SX];
- m[MAT_TX] = v[MAT_TX] + SUBPIXEL_X + vmesa->drawXoff;
+ m[MAT_TX] = v[MAT_TX] + SUBPIXEL_X + vrb->drawXoff;
m[MAT_SY] = - v[MAT_SY];
- m[MAT_TY] = - v[MAT_TY] + vmesa->driDrawable->h + SUBPIXEL_Y;
+ m[MAT_TY] = - v[MAT_TY] + dPriv->h + SUBPIXEL_Y;
m[MAT_SZ] = v[MAT_SZ] * (1.0 / vmesa->depth_max);
m[MAT_TZ] = v[MAT_TZ] * (1.0 / vmesa->depth_max);
}