aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/vl/vl_idct.c
diff options
context:
space:
mode:
authorChristian König <[email protected]>2010-12-07 21:23:14 +0100
committerChristian König <[email protected]>2010-12-07 21:23:14 +0100
commit22b4acb2069a368e986805d3b43395172ebf9146 (patch)
tree088bd9948520b040c6febd6794b8d9727cb79b93 /src/gallium/auxiliary/vl/vl_idct.c
parentbfb4fb057d92869f98dc627d53d3e1b7d031d93f (diff)
[g3dvl] use buffer width instead of texture size or vs constants
Diffstat (limited to 'src/gallium/auxiliary/vl/vl_idct.c')
-rw-r--r--src/gallium/auxiliary/vl/vl_idct.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/vl/vl_idct.c b/src/gallium/auxiliary/vl/vl_idct.c
index 7de778e1036..f19cfc38d7b 100644
--- a/src/gallium/auxiliary/vl/vl_idct.c
+++ b/src/gallium/auxiliary/vl/vl_idct.c
@@ -110,8 +110,8 @@ create_vert_shader(struct vl_idct *idct)
*
*/
scale = ureg_imm2f(shader,
- (float)BLOCK_WIDTH / idct->destination->width0,
- (float)BLOCK_HEIGHT / idct->destination->height0);
+ (float)BLOCK_WIDTH / idct->buffer_width,
+ (float)BLOCK_HEIGHT / idct->buffer_height);
ureg_ADD(shader, ureg_writemask(t_vpos, TGSI_WRITEMASK_XY), vpos, vrect);
ureg_MUL(shader, ureg_writemask(t_vpos, TGSI_WRITEMASK_XY), ureg_src(t_vpos), scale);
@@ -555,6 +555,9 @@ vl_idct_init(struct vl_idct *idct, struct pipe_context *pipe, struct pipe_resour
assert(idct && pipe && dst);
idct->pipe = pipe;
+ idct->buffer_width = dst->width0;
+ idct->buffer_height = dst->height0;
+
pipe_resource_reference(&idct->textures.individual.matrix, matrix);
pipe_resource_reference(&idct->textures.individual.transpose, matrix);
pipe_resource_reference(&idct->destination, dst);