mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-03 13:00:37 +01:00
llvmpipe: Texture cache is read-only. No need to flush.
This commit is contained in:
parent
3d30524393
commit
ffe1b7bad8
3 changed files with 0 additions and 48 deletions
|
|
@ -51,12 +51,6 @@ llvmpipe_flush( struct pipe_context *pipe,
|
|||
|
||||
draw_flush(llvmpipe->draw);
|
||||
|
||||
if (flags & PIPE_FLUSH_TEXTURE_CACHE) {
|
||||
for (i = 0; i < llvmpipe->num_textures; i++) {
|
||||
lp_flush_tex_tile_cache(llvmpipe->tex_cache[i]);
|
||||
}
|
||||
}
|
||||
|
||||
if (flags & PIPE_FLUSH_SWAPBUFFERS) {
|
||||
/* If this is a swapbuffers, just flush color buffers.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -200,45 +200,6 @@ lp_tex_tile_cache_set_texture(struct llvmpipe_tex_tile_cache *tc,
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Flush the tile cache: write all dirty tiles back to the transfer.
|
||||
* any tiles "flagged" as cleared will be "really" cleared.
|
||||
*/
|
||||
void
|
||||
lp_flush_tex_tile_cache(struct llvmpipe_tex_tile_cache *tc)
|
||||
{
|
||||
struct pipe_transfer *pt = tc->transfer;
|
||||
int inuse = 0, pos;
|
||||
|
||||
if (pt) {
|
||||
/* caching a drawing transfer */
|
||||
for (pos = 0; pos < NUM_ENTRIES; pos++) {
|
||||
struct llvmpipe_cached_tex_tile *tile = tc->entries + pos;
|
||||
if (!tile->addr.bits.invalid) {
|
||||
pipe_put_tile_rgba(pt,
|
||||
tile->addr.bits.x * TEX_TILE_SIZE,
|
||||
tile->addr.bits.y * TEX_TILE_SIZE,
|
||||
TEX_TILE_SIZE, TEX_TILE_SIZE,
|
||||
(float *) tile->color);
|
||||
tile->addr.bits.invalid = 1; /* mark as empty */
|
||||
inuse++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (tc->texture) {
|
||||
/* caching a texture, mark all entries as empty */
|
||||
for (pos = 0; pos < NUM_ENTRIES; pos++) {
|
||||
tc->entries[pos].addr.bits.invalid = 1;
|
||||
}
|
||||
tc->tex_face = -1;
|
||||
}
|
||||
|
||||
#if 0
|
||||
debug_printf("flushed tiles in use: %d\n", inuse);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Given the texture face, level, zslice, x and y values, compute
|
||||
* the cache entry position/index where we'd hope to find the
|
||||
|
|
|
|||
|
|
@ -111,9 +111,6 @@ lp_tex_tile_cache_set_texture(struct llvmpipe_tex_tile_cache *tc,
|
|||
void
|
||||
lp_tex_tile_cache_validate_texture(struct llvmpipe_tex_tile_cache *tc);
|
||||
|
||||
extern void
|
||||
lp_flush_tex_tile_cache(struct llvmpipe_tex_tile_cache *tc);
|
||||
|
||||
extern const struct llvmpipe_cached_tex_tile *
|
||||
lp_find_cached_tex_tile(struct llvmpipe_tex_tile_cache *tc,
|
||||
union tex_tile_address addr );
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue