Просмотр исходного кода

svga: Remove stale references to delete shader results.

To ensure that a new result that happens to have the same address
of the old one will be detected as a change.
tags/mesa-7.7-1
José Fonseca 16 лет назад
Родитель
Сommit
38d8b18003
2 измененных файлов: 14 добавлений и 0 удалений
  1. 7
    0
      src/gallium/drivers/svga/svga_pipe_fs.c
  2. 7
    0
      src/gallium/drivers/svga/svga_pipe_vs.c

+ 7
- 0
src/gallium/drivers/svga/svga_pipe_fs.c Просмотреть файл

@@ -111,6 +111,13 @@ void svga_delete_fs_state(struct pipe_context *pipe, void *shader)
util_bitmask_clear( svga->fs_bm, result->id );

svga_destroy_shader_result( result );

/*
* Remove stale references to this result to ensure a new result on the
* same address will be detected as a change.
*/
if(result == svga->state.hw_draw.fs)
svga->state.hw_draw.fs = NULL;
}

FREE((void *)fs->base.tokens);

+ 7
- 0
src/gallium/drivers/svga/svga_pipe_vs.c Просмотреть файл

@@ -176,6 +176,13 @@ static void svga_delete_vs_state(struct pipe_context *pipe, void *shader)
util_bitmask_clear( svga->vs_bm, result->id );

svga_destroy_shader_result( result );

/*
* Remove stale references to this result to ensure a new result on the
* same address will be detected as a change.
*/
if(result == svga->state.hw_draw.vs)
svga->state.hw_draw.vs = NULL;
}

FREE((void *)vs->base.tokens);

Загрузка…
Отмена
Сохранить