diff options
author | Christian König <[email protected]> | 2011-06-04 23:54:46 +0200 |
---|---|---|
committer | Christian König <[email protected]> | 2011-06-04 23:54:46 +0200 |
commit | a6c76c8a90dc8995feed3c61b02dbd8408149036 (patch) | |
tree | c06a8c623635fc987c95d1bb445e4152ee1f4804 /src/gallium/auxiliary/vl/vl_zscan.c | |
parent | f82cfe1eb40b1de9f6d4cbdce2c509e3e429c1d4 (diff) |
[g3dvl] use a vertex element instead of the instance id
Diffstat (limited to 'src/gallium/auxiliary/vl/vl_zscan.c')
-rw-r--r-- | src/gallium/auxiliary/vl/vl_zscan.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gallium/auxiliary/vl/vl_zscan.c b/src/gallium/auxiliary/vl/vl_zscan.c index 4af3962209f..2b52d610f8f 100644 --- a/src/gallium/auxiliary/vl/vl_zscan.c +++ b/src/gallium/auxiliary/vl/vl_zscan.c @@ -92,8 +92,8 @@ create_vert_shader(struct vl_zscan *zscan) { struct ureg_program *shader; - struct ureg_src scale, instance; - struct ureg_src vrect, vpos; + struct ureg_src scale; + struct ureg_src vrect, vpos, block_num; struct ureg_dst tmp; struct ureg_dst o_vpos, o_vtex[zscan->num_channels]; @@ -108,11 +108,11 @@ create_vert_shader(struct vl_zscan *zscan) (float)BLOCK_WIDTH / zscan->buffer_width, (float)BLOCK_HEIGHT / zscan->buffer_height); - instance = ureg_DECL_system_value(shader, 0, TGSI_SEMANTIC_INSTANCEID, 0); - vrect = ureg_DECL_vs_input(shader, VS_I_RECT); vpos = ureg_DECL_vs_input(shader, VS_I_VPOS); + block_num = ureg_DECL_system_value(shader, 0, TGSI_SEMANTIC_INSTANCEID, 0); + tmp = ureg_DECL_temporary(shader); o_vpos = ureg_DECL_output(shader, TGSI_SEMANTIC_POSITION, VS_O_VPOS); @@ -136,7 +136,7 @@ create_vert_shader(struct vl_zscan *zscan) ureg_MUL(shader, ureg_writemask(o_vpos, TGSI_WRITEMASK_XY), ureg_src(tmp), scale); ureg_MOV(shader, ureg_writemask(o_vpos, TGSI_WRITEMASK_ZW), ureg_imm1f(shader, 1.0f)); - ureg_MUL(shader, ureg_writemask(tmp, TGSI_WRITEMASK_XW), ureg_scalar(instance, TGSI_SWIZZLE_X), + ureg_MUL(shader, ureg_writemask(tmp, TGSI_WRITEMASK_XW), ureg_scalar(block_num, TGSI_SWIZZLE_X), ureg_imm1f(shader, 1.0f / zscan->blocks_per_line)); ureg_FRC(shader, ureg_writemask(tmp, TGSI_WRITEMASK_Y), ureg_scalar(ureg_src(tmp), TGSI_SWIZZLE_X)); |