summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r600/r700_state.c
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2009-07-21 13:19:46 -0400
committerAlex Deucher <alexdeucher@gmail.com>2009-07-21 17:10:53 -0400
commit60787df1e549436557393bbeae5951d8f27c1976 (patch)
tree847ae713619c96a57362ff8d249b718ee7b9a7c4 /src/mesa/drivers/dri/r600/r700_state.c
parent549b8e6f1a372b6cce4a9013854b3c97ba95af2b (diff)
r600: fill in r700UpdateViewportOffset
Diffstat (limited to 'src/mesa/drivers/dri/r600/r700_state.c')
-rw-r--r--src/mesa/drivers/dri/r600/r700_state.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/r600/r700_state.c b/src/mesa/drivers/dri/r600/r700_state.c
index eee14b076c..d54c6e5c14 100644
--- a/src/mesa/drivers/dri/r600/r700_state.c
+++ b/src/mesa/drivers/dri/r600/r700_state.c
@@ -118,10 +118,21 @@ void r700UpdateShaders (GLcontext * ctx) //----------------------------------
*/
void r700UpdateViewportOffset(GLcontext * ctx) //------------------
{
+ context_t *context = R700_CONTEXT(ctx);
+ R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
+ __DRIdrawablePrivate *dPriv = radeon_get_drawable(&context->radeon);
+ GLfloat xoffset = (GLfloat) dPriv->x;
+ GLfloat yoffset = (GLfloat) dPriv->y + dPriv->h;
+ const GLfloat *v = ctx->Viewport._WindowMap.m;
+ int id = 0;
- //radeonUpdateScissor(ctx);
+ GLfloat tx = v[MAT_TX] + xoffset;
+ GLfloat ty = (-v[MAT_TY]) + yoffset;
+
+ r700->viewport[id].PA_CL_VPORT_XOFFSET.f32All = tx;
+ r700->viewport[id].PA_CL_VPORT_YOFFSET.f32All = ty;
- return;
+ radeonUpdateScissor(ctx);
}
/**
@@ -311,7 +322,7 @@ static void r700SetAlphaState(GLcontext * ctx)
{
context_t *context = R700_CONTEXT(ctx);
R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw);
- uint32_t alpha_func;
+ uint32_t alpha_func = REF_ALWAYS;
GLboolean really_enabled = ctx->Color.AlphaEnabled;
switch (ctx->Color.AlphaFunc) {