summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_emit.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2010-05-28 01:39:27 +0200
committerMarek Olšák <[email protected]>2010-05-28 03:30:11 +0200
commit3262554bb375230a39e155ad712740bdcd657d4c (patch)
tree8bff03732c3f1baec13e663399c168d1d2e32277 /src/gallium/drivers/r300/r300_emit.c
parent49244df5a87f0e6fbf49c8bba6bd42e2852fe957 (diff)
r300g/swtcl: fix WPOS
There you are! r300->viewport_state is undefined when using SW TCL. Piglit score (r300g.tests): HW TCL: 231/275 SW TCL: 233/275
Diffstat (limited to 'src/gallium/drivers/r300/r300_emit.c')
-rw-r--r--src/gallium/drivers/r300/r300_emit.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/gallium/drivers/r300/r300_emit.c b/src/gallium/drivers/r300/r300_emit.c
index 123b084b2b4..a55a545e1c9 100644
--- a/src/gallium/drivers/r300/r300_emit.c
+++ b/src/gallium/drivers/r300/r300_emit.c
@@ -134,7 +134,6 @@ static const float * get_rc_constant_state(
struct r300_context * r300,
struct rc_constant * constant)
{
- struct r300_viewport_state* viewport = r300->viewport_state.state;
struct r300_textures_state* texstate = r300->textures_state.state;
static float vec[4] = { 0.0, 0.0, 0.0, 1.0 };
struct pipe_resource *tex;
@@ -151,15 +150,15 @@ static const float * get_rc_constant_state(
break;
case RC_STATE_R300_VIEWPORT_SCALE:
- vec[0] = viewport->xscale;
- vec[1] = viewport->yscale;
- vec[2] = viewport->zscale;
+ vec[0] = r300->viewport.scale[0];
+ vec[1] = r300->viewport.scale[1];
+ vec[2] = r300->viewport.scale[2];
break;
case RC_STATE_R300_VIEWPORT_OFFSET:
- vec[0] = viewport->xoffset;
- vec[1] = viewport->yoffset;
- vec[2] = viewport->zoffset;
+ vec[0] = r300->viewport.translate[0];
+ vec[1] = r300->viewport.translate[1];
+ vec[2] = r300->viewport.translate[2];
break;
default: