summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorChristian König <[email protected]>2010-11-24 20:00:52 +0100
committerChristian König <[email protected]>2010-11-24 20:00:52 +0100
commit2c9db2484b7c1cec7a3a629f70a5aa840e16268e (patch)
treea0a0a99049991c631937c814eb6b6a9655f25c05 /src/gallium
parent5391ef86063d382ab011e887bdd0350f394f2352 (diff)
[g3dvl] no need for all samplers at all stages
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/vl/vl_idct.c18
-rw-r--r--src/gallium/auxiliary/vl/vl_idct.h15
2 files changed, 16 insertions, 17 deletions
diff --git a/src/gallium/auxiliary/vl/vl_idct.c b/src/gallium/auxiliary/vl/vl_idct.c
index a9bee3bfac0..6e49600a286 100644
--- a/src/gallium/auxiliary/vl/vl_idct.c
+++ b/src/gallium/auxiliary/vl/vl_idct.c
@@ -219,7 +219,7 @@ create_transpose_frag_shader(struct vl_idct *idct)
step[1] = ureg_DECL_fs_input(shader, TGSI_SEMANTIC_GENERIC, VS_O_STEP, TGSI_INTERPOLATE_CONSTANT);
sampler[0] = ureg_DECL_sampler(shader, 0);
- sampler[1] = ureg_DECL_sampler(shader, 2);
+ sampler[1] = ureg_DECL_sampler(shader, 1);
fragment = ureg_DECL_output(shader, TGSI_SEMANTIC_COLOR, 0);
@@ -251,8 +251,8 @@ create_matrix_frag_shader(struct vl_idct *idct)
step[0] = ureg_DECL_fs_input(shader, TGSI_SEMANTIC_GENERIC, VS_O_STEP, TGSI_INTERPOLATE_CONSTANT);
step[1] = ureg_imm1f(shader, 1.0f / BLOCK_WIDTH);
- sampler[0] = ureg_DECL_sampler(shader, 3);
- sampler[1] = ureg_DECL_sampler(shader, 1);
+ sampler[0] = ureg_DECL_sampler(shader, 1);
+ sampler[1] = ureg_DECL_sampler(shader, 0);
fragment = ureg_DECL_output(shader, TGSI_SEMANTIC_COLOR, 0);
@@ -295,11 +295,7 @@ xfer_buffers_map(struct vl_idct *idct)
idct->tex_transfer = idct->pipe->get_transfer
(
-#if 1
idct->pipe, idct->textures.individual.source,
-#else
- idct->pipe, idct->destination,
-#endif
u_subresource(0, 0),
PIPE_TRANSFER_WRITE | PIPE_TRANSFER_DISCARD,
&rect
@@ -701,8 +697,8 @@ vl_idct_flush(struct vl_idct *idct)
idct->pipe->set_vertex_buffers(idct->pipe, 2, idct->vertex_bufs.all);
idct->pipe->bind_vertex_elements_state(idct->pipe, idct->vertex_elems_state);
- idct->pipe->set_fragment_sampler_views(idct->pipe, 4, idct->sampler_views.all);
- idct->pipe->bind_fragment_sampler_states(idct->pipe, 4, idct->samplers.all);
+ idct->pipe->set_fragment_sampler_views(idct->pipe, 2, idct->sampler_views.stage[0]);
+ idct->pipe->bind_fragment_sampler_states(idct->pipe, 2, idct->samplers.stage[0]);
idct->pipe->bind_vs_state(idct->pipe, idct->vs);
idct->pipe->bind_fs_state(idct->pipe, idct->transpose_fs);
@@ -715,8 +711,8 @@ vl_idct_flush(struct vl_idct *idct)
idct->pipe->set_vertex_buffers(idct->pipe, 2, idct->vertex_bufs.all);
idct->pipe->bind_vertex_elements_state(idct->pipe, idct->vertex_elems_state);
- idct->pipe->set_fragment_sampler_views(idct->pipe, 4, idct->sampler_views.all);
- idct->pipe->bind_fragment_sampler_states(idct->pipe, 4, idct->samplers.all);
+ idct->pipe->set_fragment_sampler_views(idct->pipe, 2, idct->sampler_views.stage[1]);
+ idct->pipe->bind_fragment_sampler_states(idct->pipe, 2, idct->samplers.stage[1]);
idct->pipe->bind_vs_state(idct->pipe, idct->vs);
idct->pipe->bind_fs_state(idct->pipe, idct->matrix_fs);
diff --git a/src/gallium/auxiliary/vl/vl_idct.h b/src/gallium/auxiliary/vl/vl_idct.h
index 84ba5288aff..01df3f9103f 100644
--- a/src/gallium/auxiliary/vl/vl_idct.h
+++ b/src/gallium/auxiliary/vl/vl_idct.h
@@ -47,18 +47,20 @@ struct vl_idct
union
{
void *all[4];
+ void *stage[2][2];
struct {
- void *transpose, *matrix;
- void *source, *intermediate;
+ void *transpose, *source;
+ void *matrix, *intermediate;
} individual;
} samplers;
union
{
struct pipe_sampler_view *all[4];
+ struct pipe_sampler_view *stage[2][2];
struct {
- struct pipe_sampler_view *transpose, *matrix;
- struct pipe_sampler_view *source, *intermediate;
+ struct pipe_sampler_view *transpose, *source;
+ struct pipe_sampler_view *matrix, *intermediate;
} individual;
} sampler_views;
@@ -68,9 +70,10 @@ struct vl_idct
union
{
struct pipe_resource *all[4];
+ struct pipe_resource *stage[2][2];
struct {
- struct pipe_resource *transpose, *matrix;
- struct pipe_resource *source, *intermediate;
+ struct pipe_resource *transpose, *source;
+ struct pipe_resource *matrix, *intermediate;
} individual;
} textures;