mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-21 12:10:30 +01:00
llvmpipe: Use comments and more code from softpipe's is_texture_referenced implementation.
This commit is contained in:
parent
7a15642f41
commit
d01c7bef29
1 changed files with 8 additions and 0 deletions
|
|
@ -140,6 +140,7 @@ llvmpipe_is_texture_referenced( struct pipe_context *pipe,
|
|||
struct llvmpipe_context *llvmpipe = llvmpipe_context( pipe );
|
||||
unsigned i;
|
||||
|
||||
/* check if any of the bound drawing surfaces are this texture */
|
||||
if(llvmpipe->dirty_render_cache) {
|
||||
for (i = 0; i < llvmpipe->framebuffer.nr_cbufs; i++) {
|
||||
if(llvmpipe->framebuffer.cbufs[i] &&
|
||||
|
|
@ -150,6 +151,13 @@ llvmpipe_is_texture_referenced( struct pipe_context *pipe,
|
|||
llvmpipe->framebuffer.zsbuf->texture == texture)
|
||||
return PIPE_REFERENCED_FOR_WRITE;
|
||||
}
|
||||
|
||||
/* check if any of the tex_cache textures are this texture */
|
||||
for (i = 0; i < PIPE_MAX_SAMPLERS; i++) {
|
||||
if (llvmpipe->tex_cache[i] &&
|
||||
llvmpipe->tex_cache[i]->texture == texture)
|
||||
return PIPE_REFERENCED_FOR_READ;
|
||||
}
|
||||
for (i = 0; i < PIPE_MAX_VERTEX_SAMPLERS; i++) {
|
||||
if (llvmpipe->vertex_tex_cache[i] &&
|
||||
llvmpipe->vertex_tex_cache[i]->texture == texture)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue