Skip to content
Snippets Groups Projects
Commit e80a0a7d authored by Ilia Mirkin's avatar Ilia Mirkin
Browse files

nv50,nvc0: actually check constbufs for invalidation


The number of vertex buffers has nothing to do with the number of bound
constbufs.

Signed-off-by: default avatarIlia Mirkin <imirkin@alum.mit.edu>
Cc: "10.4 10.3" <mesa-stable@lists.freedesktop.org>
parent 7d07083c
No related branches found
Tags gst-editing-services-1.7.2
No related merge requests found
......@@ -214,8 +214,9 @@ nv50_invalidate_resource_storage(struct nouveau_context *ctx,
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) {
for (i = 0; i < NV50_MAX_PIPE_CONSTBUFS; ++i) {
if (!(nv50->constbuf_valid[s] & (1 << i)))
continue;
if (!nv50->constbuf[s][i].user &&
nv50->constbuf[s][i].u.buf == res) {
nv50->dirty |= NV50_NEW_CONSTBUF;
......
......@@ -232,7 +232,9 @@ nvc0_invalidate_resource_storage(struct nouveau_context *ctx,
if (res->bind & PIPE_BIND_CONSTANT_BUFFER) {
for (s = 0; s < 5; ++s) {
for (i = 0; i < nvc0->num_vtxbufs; ++i) {
for (i = 0; i < NVC0_MAX_PIPE_CONSTBUFS; ++i) {
if (!(nvc0->constbuf_valid[s] & (1 << i)))
continue;
if (!nvc0->constbuf[s][i].user &&
nvc0->constbuf[s][i].u.buf == res) {
nvc0->dirty |= NVC0_NEW_CONSTBUF;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment