Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
if (res->bind & PIPE_BIND_CONSTANT_BUFFER) {
for (s = 0; s < 3; ++s) {
+ assert(nv50->num_vtxbufs <= NV50_MAX_PIPE_CONSTBUFS);
for (i = 0; i < nv50->num_vtxbufs; ++i) {
if (!nv50->constbuf[s][i].user &&
nv50->constbuf[s][i].u.buf == res) {
while (nv50->constbuf_dirty[s]) {
const int i = ffs(nv50->constbuf_dirty[s]) - 1;
+
+ assert(i < NV50_MAX_PIPE_CONSTBUFS);
nv50->constbuf_dirty[s] &= ~(1 << i);
if (nv50->constbuf[s][i].user) {
if (shader == PIPE_SHADER_COMPUTE)
return;
+ assert(i < NV50_MAX_PIPE_CONSTBUFS);
if (nv50->constbuf[s][i].user)
nv50->constbuf[s][i].u.buf = NULL;
else