mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 11:20:20 +01:00
virgl: also mark sampler views as dirty
When texture buffers are used as images in compute shaders, the guest never sees the modified data since the TBO is always marked as clean. Fixes most dEQP-GLES31.functional.image_load_store.buffer.* tests. Example test cases: dEQP-GLES31.functional.image_load_store.buffer.load_store.r32ui dEQP-GLES31.functional.image_load_store.buffer.qualifiers.coherent_r32f dEQP-GLES31.functional.image_load_store.buffer.format_reinterpret.rgba8_rgba8ui Note: virglrenderer side patch also needed to bind TBOs correctly Reviewed-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
a090df0d5d
commit
9c136e8a07
1 changed files with 2 additions and 1 deletions
|
|
@ -164,7 +164,8 @@ struct pipe_resource *virgl_buffer_create(struct virgl_screen *vs,
|
|||
vbind = pipe_to_virgl_bind(template->bind);
|
||||
size = template->width0;
|
||||
|
||||
if (vbind == VIRGL_BIND_SHADER_BUFFER)
|
||||
/* SSBOs and texture buffers can written to by host compute shaders. */
|
||||
if (vbind == VIRGL_BIND_SHADER_BUFFER || vbind == VIRGL_BIND_SAMPLER_VIEW)
|
||||
buf->base.clean = FALSE;
|
||||
buf->base.hw_res = vs->vws->resource_create(vs->vws, template->target, template->format, vbind, template->width0, 1, 1, 1, 0, 0, size);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue