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),
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)
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 +
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);