diff options
author | Christian König <[email protected]> | 2011-05-15 19:05:30 +0200 |
---|---|---|
committer | Christian König <[email protected]> | 2011-05-15 19:05:30 +0200 |
commit | 20aabb9c2eff63fd97571b9f3db453fe3accc10a (patch) | |
tree | e8cdd5b5c8843f605c08e8f7fc2c01031f4e63ad | |
parent | 235de23e57bd6dac6a2fcdd0807838eef72f6173 (diff) |
[g3dvl] enable gl_rasterization_rules for zscan
-rw-r--r-- | src/gallium/auxiliary/vl/vl_zscan.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/gallium/auxiliary/vl/vl_zscan.c b/src/gallium/auxiliary/vl/vl_zscan.c index d06c567bfb4..ec806982226 100644 --- a/src/gallium/auxiliary/vl/vl_zscan.c +++ b/src/gallium/auxiliary/vl/vl_zscan.c @@ -98,7 +98,7 @@ create_vert_shader(struct vl_zscan *zscan) struct ureg_dst tmp; struct ureg_dst o_vpos, o_vtex[zscan->num_channels]; - unsigned i; + signed i; shader = ureg_create(TGSI_PROCESSOR_VERTEX); if (!shader) @@ -139,13 +139,12 @@ create_vert_shader(struct vl_zscan *zscan) ureg_MUL(shader, ureg_writemask(tmp, TGSI_WRITEMASK_XZ), instance, ureg_imm1f(shader, 1.0f / zscan->blocks_per_line)); - ureg_FRC(shader, ureg_writemask(tmp, TGSI_WRITEMASK_X), ureg_src(tmp)); + ureg_FRC(shader, ureg_writemask(tmp, TGSI_WRITEMASK_Y), ureg_scalar(ureg_src(tmp), TGSI_SWIZZLE_X)); ureg_FLR(shader, ureg_writemask(tmp, TGSI_WRITEMASK_Z), ureg_src(tmp)); for (i = 0; i < zscan->num_channels; ++i) { - if (i > 0) - ureg_ADD(shader, ureg_writemask(tmp, TGSI_WRITEMASK_X), ureg_src(tmp), - ureg_imm1f(shader, 1.0f / (zscan->blocks_per_line * BLOCK_WIDTH))); + ureg_ADD(shader, ureg_writemask(tmp, TGSI_WRITEMASK_X), ureg_scalar(ureg_src(tmp), TGSI_SWIZZLE_Y), + ureg_imm1f(shader, 1.0f / (zscan->blocks_per_line * BLOCK_WIDTH) * (i - (signed)zscan->num_channels / 2))); ureg_MAD(shader, ureg_writemask(o_vtex[i], TGSI_WRITEMASK_X), vrect, ureg_imm1f(shader, 1.0f / zscan->blocks_per_line), ureg_src(tmp)); @@ -256,7 +255,7 @@ init_state(struct vl_zscan *zscan) assert(zscan); memset(&rs_state, 0, sizeof(rs_state)); - rs_state.gl_rasterization_rules = false; + rs_state.gl_rasterization_rules = true; zscan->rs_state = zscan->pipe->create_rasterizer_state(zscan->pipe, &rs_state); if (!zscan->rs_state) goto error_rs_state; |