summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2019-05-21 14:26:13 -0400
committerMarek Olšák <[email protected]>2019-05-21 18:58:03 -0400
commitd6053bf2a170a0fec6d232fda097d2f35f0e9eae (patch)
tree7770e5a19312f5cf5fc88b75f3d8fbbadfc5b655 /src/gallium/drivers/radeonsi
parentfb1d08dcfd53cad8d933592c4515a9dc123376e3 (diff)
radeonsi: fix a regression in si_rebind_buffer
Don't update non-buffer images. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110701 Fixes: 78e35df52aa2f7d770f929a0866a0faa89c261a9 "radeonsi: update buffer descriptors in all contexts after buffer invalidation" Cc: 19.1 <[email protected]> Tested-By: Gert Wollny <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r--src/gallium/drivers/radeonsi/si_descriptors.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c
index 501f4c1405a..4cb6a1abb9a 100644
--- a/src/gallium/drivers/radeonsi/si_descriptors.c
+++ b/src/gallium/drivers/radeonsi/si_descriptors.c
@@ -1705,7 +1705,8 @@ void si_rebind_buffer(struct si_context *sctx, struct pipe_resource *buf)
unsigned i = u_bit_scan(&mask);
struct pipe_resource *buffer = samplers->views[i]->texture;
- if (buffer && (!buf || buffer == buf)) {
+ if (buffer && buffer->target == PIPE_BUFFER &&
+ (!buf || buffer == buf)) {
unsigned desc_slot = si_get_sampler_slot(i);
si_set_buf_desc_address(si_resource(buffer),
@@ -1735,7 +1736,8 @@ void si_rebind_buffer(struct si_context *sctx, struct pipe_resource *buf)
unsigned i = u_bit_scan(&mask);
struct pipe_resource *buffer = images->views[i].resource;
- if (buffer && (!buf || buffer == buf)) {
+ if (buffer && buffer->target == PIPE_BUFFER &&
+ (!buf || buffer == buf)) {
unsigned desc_slot = si_get_image_slot(i);
if (images->views[i].access & PIPE_IMAGE_ACCESS_WRITE)
@@ -1766,7 +1768,8 @@ void si_rebind_buffer(struct si_context *sctx, struct pipe_resource *buf)
unsigned desc_slot = (*tex_handle)->desc_slot;
struct pipe_resource *buffer = view->texture;
- if (buffer && (!buf || buffer == buf)) {
+ if (buffer && buffer->target == PIPE_BUFFER &&
+ (!buf || buffer == buf)) {
si_set_buf_desc_address(si_resource(buffer),
view->u.buf.offset,
descs->list +
@@ -1793,7 +1796,8 @@ void si_rebind_buffer(struct si_context *sctx, struct pipe_resource *buf)
unsigned desc_slot = (*img_handle)->desc_slot;
struct pipe_resource *buffer = view->resource;
- if (buffer && (!buf || buffer == buf)) {
+ if (buffer && buffer->target == PIPE_BUFFER &&
+ (!buf || buffer == buf)) {
if (view->access & PIPE_IMAGE_ACCESS_WRITE)
si_mark_image_range_valid(view);