summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/nouveau
diff options
context:
space:
mode:
authorCourtney Goeltzenleuchter <[email protected]>2013-11-13 16:24:56 -0700
committerIan Romanick <[email protected]>2014-01-20 11:31:56 -0800
commitcbb271a48845c2d236f31327df316d42888a1907 (patch)
treea860c48f113d8171d31d77bacf1c341627e4c099 /src/mesa/drivers/dri/nouveau
parent5b84226c31e941219422f6d60c31524081b7a188 (diff)
mesa: Convert gl_context::Viewport to gl_context::ViewportArray
Only element 0 of the array is used anywhere at this time, so there should be no changes. v4: Split out from a single megapatch. Suggested by Ken. Signed-off-by: Courtney Goeltzenleuchter <[email protected]> Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/nouveau')
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_util.h4
-rw-r--r--src/mesa/drivers/dri/nouveau/nv10_state_fb.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_util.h b/src/mesa/drivers/dri/nouveau/nouveau_util.h
index 17d6965ee2c..e44e8efba29 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_util.h
+++ b/src/mesa/drivers/dri/nouveau/nouveau_util.h
@@ -140,7 +140,7 @@ get_scissors(struct gl_framebuffer *fb, int *x, int *y, int *w, int *h)
static inline void
get_viewport_scale(struct gl_context *ctx, float a[16])
{
- struct gl_viewport_attrib *vp = &ctx->Viewport;
+ struct gl_viewport_attrib *vp = &ctx->ViewportArray[0];
struct gl_framebuffer *fb = ctx->DrawBuffer;
a[MAT_SX] = (float)vp->Width / 2;
@@ -157,7 +157,7 @@ get_viewport_scale(struct gl_context *ctx, float a[16])
static inline void
get_viewport_translate(struct gl_context *ctx, float a[4])
{
- struct gl_viewport_attrib *vp = &ctx->Viewport;
+ struct gl_viewport_attrib *vp = &ctx->ViewportArray[0];
struct gl_framebuffer *fb = ctx->DrawBuffer;
a[0] = (float)vp->Width / 2 + vp->X;
diff --git a/src/mesa/drivers/dri/nouveau/nv10_state_fb.c b/src/mesa/drivers/dri/nouveau/nv10_state_fb.c
index 87ae1d6e006..6f554618814 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_state_fb.c
+++ b/src/mesa/drivers/dri/nouveau/nv10_state_fb.c
@@ -176,7 +176,7 @@ void
nv10_emit_viewport(struct gl_context *ctx, int emit)
{
struct nouveau_pushbuf *push = context_push(ctx);
- struct gl_viewport_attrib *vp = &ctx->Viewport;
+ struct gl_viewport_attrib *vp = &ctx->ViewportArray[0];
struct gl_framebuffer *fb = ctx->DrawBuffer;
float a[4] = {};