mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-07 08:40:11 +01:00
r300g: Clear up a bit of the buffer reference stuff.
Still need to actually get reference info from winsys somehow. Doing added buffers is easy, but knowing whether a flush has happened is a bit tricky.
This commit is contained in:
parent
81c51bb67f
commit
6007e2e008
1 changed files with 11 additions and 14 deletions
|
|
@ -76,26 +76,23 @@ static void r300_destroy_context(struct pipe_context* context)
|
|||
}
|
||||
|
||||
static unsigned int
|
||||
r300_is_texture_referenced( struct pipe_context *pipe,
|
||||
struct pipe_texture *texture,
|
||||
unsigned face, unsigned level)
|
||||
r300_is_texture_referenced(struct pipe_context *pipe,
|
||||
struct pipe_texture *texture,
|
||||
unsigned face, unsigned level)
|
||||
{
|
||||
/**
|
||||
* FIXME: Optimize.
|
||||
*/
|
||||
struct pipe_buffer* buf;
|
||||
|
||||
return PIPE_REFERENCED_FOR_READ | PIPE_REFERENCED_FOR_WRITE;
|
||||
r300_get_texture_buffer(texture, &buf, NULL);
|
||||
|
||||
return pipe->is_buffer_referenced(pipe, buf);
|
||||
}
|
||||
|
||||
static unsigned int
|
||||
r300_is_buffer_referenced( struct pipe_context *pipe,
|
||||
struct pipe_buffer *buf)
|
||||
r300_is_buffer_referenced(struct pipe_context *pipe,
|
||||
struct pipe_buffer *buf)
|
||||
{
|
||||
/**
|
||||
* FIXME: Optimize.
|
||||
*/
|
||||
|
||||
return PIPE_REFERENCED_FOR_READ | PIPE_REFERENCED_FOR_WRITE;
|
||||
/* XXX */
|
||||
return PIPE_REFERENCED_FOR_READ | PIPE_REFERENCED_FOR_WRITE;
|
||||
}
|
||||
|
||||
static void r300_flush_cb(void *data)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue