mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 13:20:14 +01:00
svga: Ignore redefine_user_buffer calls
We currently always treat contents of user-buffers as volatile so we don't need to take any particular action when the state tracker announces that the contents has changed. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
This commit is contained in:
parent
762518d26a
commit
a8cf4b6acf
1 changed files with 2 additions and 15 deletions
|
|
@ -651,8 +651,6 @@ svga_redefine_user_buffer(struct pipe_context *pipe,
|
||||||
unsigned offset,
|
unsigned offset,
|
||||||
unsigned size)
|
unsigned size)
|
||||||
{
|
{
|
||||||
struct svga_screen *ss = svga_screen(pipe->screen);
|
|
||||||
struct svga_context *svga = svga_context(pipe);
|
|
||||||
struct svga_buffer *sbuf = svga_buffer(resource);
|
struct svga_buffer *sbuf = svga_buffer(resource);
|
||||||
|
|
||||||
assert(sbuf->user);
|
assert(sbuf->user);
|
||||||
|
|
@ -661,19 +659,8 @@ svga_redefine_user_buffer(struct pipe_context *pipe,
|
||||||
assert(!sbuf->hwbuf);
|
assert(!sbuf->hwbuf);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Release any uploaded user buffer.
|
* We always treat the contents of user-buffers as volatile,
|
||||||
*
|
* so no particular action needed here.
|
||||||
* TODO: As an optimization, we could try to update the uploaded buffer
|
|
||||||
* instead.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pipe_resource_reference(&sbuf->uploaded.buffer, NULL);
|
|
||||||
|
|
||||||
pipe_mutex_lock(ss->swc_mutex);
|
|
||||||
|
|
||||||
sbuf->key.size.width = sbuf->b.b.width0 = offset + size;
|
|
||||||
|
|
||||||
pipe_mutex_unlock(ss->swc_mutex);
|
|
||||||
|
|
||||||
svga->dirty |= SVGA_NEW_VBUFFER | SVGA_NEW_VELEMENT;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue