llvmpipe: No need to flush the caches for buffers.
This commit is contained in:
parent
53e94bd4ad
commit
2cd128ab44
|
@ -103,7 +103,7 @@ llvmpipe_flush( struct pipe_context *pipe,
|
||||||
*/
|
*/
|
||||||
boolean
|
boolean
|
||||||
llvmpipe_flush_resource(struct pipe_context *pipe,
|
llvmpipe_flush_resource(struct pipe_context *pipe,
|
||||||
struct pipe_resource *texture,
|
struct pipe_resource *resource,
|
||||||
unsigned face,
|
unsigned face,
|
||||||
unsigned level,
|
unsigned level,
|
||||||
unsigned flush_flags,
|
unsigned flush_flags,
|
||||||
|
@ -113,11 +113,12 @@ llvmpipe_flush_resource(struct pipe_context *pipe,
|
||||||
{
|
{
|
||||||
unsigned referenced;
|
unsigned referenced;
|
||||||
|
|
||||||
referenced = pipe->is_resource_referenced(pipe, texture, face, level);
|
referenced = pipe->is_resource_referenced(pipe, resource, face, level);
|
||||||
|
|
||||||
if ((referenced & PIPE_REFERENCED_FOR_WRITE) ||
|
if ((referenced & PIPE_REFERENCED_FOR_WRITE) ||
|
||||||
((referenced & PIPE_REFERENCED_FOR_READ) && !read_only)) {
|
((referenced & PIPE_REFERENCED_FOR_READ) && !read_only)) {
|
||||||
|
|
||||||
|
if (resource->target != PIPE_BUFFER) {
|
||||||
/*
|
/*
|
||||||
* TODO: The semantics of these flush flags are too obtuse. They should
|
* TODO: The semantics of these flush flags are too obtuse. They should
|
||||||
* disappear and the pipe driver should just ensure that all visible
|
* disappear and the pipe driver should just ensure that all visible
|
||||||
|
@ -128,6 +129,7 @@ llvmpipe_flush_resource(struct pipe_context *pipe,
|
||||||
|
|
||||||
if (referenced & PIPE_REFERENCED_FOR_READ)
|
if (referenced & PIPE_REFERENCED_FOR_READ)
|
||||||
flush_flags |= PIPE_FLUSH_TEXTURE_CACHE;
|
flush_flags |= PIPE_FLUSH_TEXTURE_CACHE;
|
||||||
|
}
|
||||||
|
|
||||||
if (cpu_access) {
|
if (cpu_access) {
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -39,7 +39,7 @@ llvmpipe_flush(struct pipe_context *pipe, unsigned flags,
|
||||||
|
|
||||||
boolean
|
boolean
|
||||||
llvmpipe_flush_resource(struct pipe_context *pipe,
|
llvmpipe_flush_resource(struct pipe_context *pipe,
|
||||||
struct pipe_resource *texture,
|
struct pipe_resource *resource,
|
||||||
unsigned face,
|
unsigned face,
|
||||||
unsigned level,
|
unsigned level,
|
||||||
unsigned flush_flags,
|
unsigned flush_flags,
|
||||||
|
|
Loading…
Reference in New Issue