summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/vl/vl_idct.c
diff options
context:
space:
mode:
authorChristian König <[email protected]>2011-05-15 19:21:21 +0200
committerChristian König <[email protected]>2011-05-15 19:21:21 +0200
commit3db6514357a7c634045ae7bc7bba7d7dbf9d58c5 (patch)
treea61e056590c36d35fab8d59b35ccac044b98559e /src/gallium/auxiliary/vl/vl_idct.c
parent20aabb9c2eff63fd97571b9f3db453fe3accc10a (diff)
[g3dvl] enable gl_rasterization_rules for idct
Diffstat (limited to 'src/gallium/auxiliary/vl/vl_idct.c')
-rw-r--r--src/gallium/auxiliary/vl/vl_idct.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/gallium/auxiliary/vl/vl_idct.c b/src/gallium/auxiliary/vl/vl_idct.c
index ebb4ad4fe0c..751aacac84d 100644
--- a/src/gallium/auxiliary/vl/vl_idct.c
+++ b/src/gallium/auxiliary/vl/vl_idct.c
@@ -207,7 +207,7 @@ create_stage1_frag_shader(struct vl_idct *idct)
struct ureg_dst l[4][2], r[2];
struct ureg_dst fragment[idct->nr_of_render_targets];
- unsigned i, j;
+ int i, j;
shader = ureg_create(TGSI_PROCESSOR_FRAGMENT);
if (!shader)
@@ -230,24 +230,19 @@ create_stage1_frag_shader(struct vl_idct *idct)
r[0] = ureg_DECL_temporary(shader);
r[1] = ureg_DECL_temporary(shader);
- for (i = 1; i < 4; ++i) {
- increment_addr(shader, l[i], l_addr, false, false, i, idct->buffer_height);
+ for (i = 0; i < 4; ++i) {
+ increment_addr(shader, l[i], l_addr, false, false, i - 2, idct->buffer_height);
}
for (i = 0; i < 4; ++i) {
- struct ureg_src s_addr[2];
- s_addr[0] = i == 0 ? l_addr[0] : ureg_src(l[i][0]);
- s_addr[1] = i == 0 ? l_addr[1] : ureg_src(l[i][1]);
+ struct ureg_src s_addr[2] = { ureg_src(l[i][0]), ureg_src(l[i][1]) };
fetch_four(shader, l[i], s_addr, ureg_DECL_sampler(shader, 1));
}
for (i = 0; i < idct->nr_of_render_targets; ++i) {
- if(i > 0)
- increment_addr(shader, r, r_addr, true, true, i, BLOCK_HEIGHT);
+ increment_addr(shader, r, r_addr, true, true, i - (signed)idct->nr_of_render_targets / 2, BLOCK_HEIGHT);
struct ureg_src s_addr[2] = { ureg_src(r[0]), ureg_src(r[1]) };
- s_addr[0] = i == 0 ? r_addr[0] : ureg_src(r[0]);
- s_addr[1] = i == 0 ? r_addr[1] : ureg_src(r[1]);
fetch_four(shader, r, s_addr, ureg_DECL_sampler(shader, 0));
for (j = 0; j < 4; ++j) {
@@ -372,7 +367,7 @@ init_state(struct vl_idct *idct)
assert(idct);
memset(&rs_state, 0, sizeof(rs_state));
- rs_state.gl_rasterization_rules = false;
+ rs_state.gl_rasterization_rules = true;
idct->rs_state = idct->pipe->create_rasterizer_state(idct->pipe, &rs_state);
if (!idct->rs_state)
goto error_rs_state;