aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJames Zhu <[email protected]>2019-03-29 15:57:51 -0400
committerLeo Liu <[email protected]>2019-04-05 09:50:52 -0400
commit4bbc9c493f4b923516d9ef40b41a0dd7648fdb1e (patch)
tree8f4ee8c630e8c4433d3116a8f2068951077ce16e /src
parent32b861d46d36178f43fd6ba3659fe5382471458b (diff)
gallium/auxiliary/vl: Fixed blank issue with compute shader
Multiple init buffer within one open instance will cause blank issue. Updating viewport per frame will fix this issue. Signed-off-by: James Zhu <[email protected]> Tested-by: Bruno Milreu <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/vl/vl_compositor_cs.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/gallium/auxiliary/vl/vl_compositor_cs.c b/src/gallium/auxiliary/vl/vl_compositor_cs.c
index 6336b235458..c3afe618117 100644
--- a/src/gallium/auxiliary/vl/vl_compositor_cs.c
+++ b/src/gallium/auxiliary/vl/vl_compositor_cs.c
@@ -362,7 +362,6 @@ draw_layers(struct vl_compositor *c,
struct u_rect *dirty)
{
unsigned i;
- static struct cs_viewport old_drawn;
assert(c);
@@ -381,11 +380,7 @@ draw_layers(struct vl_compositor *c,
drawn.translate_y = (int)layer->viewport.translate[1];
drawn.sampler0_w = (float)layer->sampler_views[0]->texture->width0;
drawn.sampler0_h = (float)layer->sampler_views[0]->texture->height0;
-
- if (memcmp(&drawn, &old_drawn, sizeof(struct cs_viewport))) {
- set_viewport(s, &drawn);
- old_drawn = drawn;
- }
+ set_viewport(s, &drawn);
c->pipe->bind_sampler_states(c->pipe, PIPE_SHADER_COMPUTE, 0,
num_sampler_views, layer->samplers);