struct tc_shader_buffers {
ubyte shader, start, count;
+ bool unbind;
struct pipe_shader_buffer slot[0]; /* more will be allocated if needed */
};
struct tc_shader_buffers *p = (struct tc_shader_buffers *)payload;
unsigned count = p->count;
+ if (p->unbind) {
+ pipe->set_shader_buffers(pipe, p->shader, p->start, p->count, NULL);
+ return;
+ }
+
pipe->set_shader_buffers(pipe, p->shader, p->start, p->count, p->slot);
for (unsigned i = 0; i < count; i++)
struct threaded_context *tc = threaded_context(_pipe);
struct tc_shader_buffers *p =
- tc_add_slot_based_call(tc, TC_CALL_set_shader_buffers, tc_shader_buffers, count);
+ tc_add_slot_based_call(tc, TC_CALL_set_shader_buffers, tc_shader_buffers,
+ buffers ? count : 0);
p->shader = shader;
p->start = start;
p->count = count;
+ p->unbind = buffers == NULL;
if (buffers) {
for (unsigned i = 0; i < count; i++) {
src->buffer_offset + src->buffer_size);
}
}
- } else {
- memset(p->slot, 0, count * sizeof(buffers[0]));
}
}