diff options
author | Brian <[email protected]> | 2008-02-20 13:24:52 -0700 |
---|---|---|
committer | Brian <[email protected]> | 2008-02-20 13:24:52 -0700 |
commit | d5640a2dbdc4454d0405f2cd5b18fc49b1ca7694 (patch) | |
tree | 5e0ed97d89f54d9f40c1911f926ead5a65c7e37d /src/gallium/drivers/softpipe/sp_texture.c | |
parent | 1d45787d4a70c55e7fa899d13b9139430e2fa3e2 (diff) |
gallium: new pipe->texture_update() function
Called whenever texture data is changed (glTexImage, glTexSubImage,
glCopyTexSubImage, etc).
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_texture.c')
-rw-r--r-- | src/gallium/drivers/softpipe/sp_texture.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gallium/drivers/softpipe/sp_texture.c b/src/gallium/drivers/softpipe/sp_texture.c index 6de7a9b543b..8f31f05e478 100644 --- a/src/gallium/drivers/softpipe/sp_texture.c +++ b/src/gallium/drivers/softpipe/sp_texture.c @@ -39,6 +39,7 @@ #include "sp_context.h" #include "sp_state.h" #include "sp_texture.h" +#include "sp_tile_cache.h" /* Simple, maximally packed layout. @@ -128,6 +129,20 @@ softpipe_texture_release(struct pipe_context *pipe, struct pipe_texture **pt) } +void +softpipe_texture_update(struct pipe_context *pipe, + struct pipe_texture *texture) +{ + struct softpipe_context *softpipe = softpipe_context(pipe); + uint unit; + for (unit = 0; unit < PIPE_MAX_SAMPLERS; unit++) { + if (softpipe->texture[unit] == texture) { + sp_flush_tile_cache(softpipe, softpipe->tex_cache[unit]); + } + } +} + + /** * Called via pipe->get_tex_surface() */ |