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)
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));
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;