mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 13:48:06 +02:00
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 <James.Zhu@amd.com> Tested-by: Bruno Milreu <bmilreu@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
32b861d46d
commit
4bbc9c493f
1 changed files with 1 additions and 6 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue