Previously we were expecting cb0 to be user_buffer. (We did in some
cases upload it to a gpu buffer, but this was an internally allocated
buffer and not something subject to rebind.) But with TC it becomes
a gpu buffer.
(Technically, with pctx->const_uploader, we shouldn't hit the rebind
path for cb0, but better to not try to be overly clever.. sooner or
later that would bite us.)
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9323>
!(ctx->dirty_shader[stage] & FD_DIRTY_CONST)) {
struct fd_constbuf_stateobj *cb = &ctx->constbuf[stage];
const unsigned num_ubos = util_last_bit(cb->enabled_mask);
- for (unsigned i = 1; i < num_ubos; i++) {
+ for (unsigned i = 0; i < num_ubos; i++) {
if (cb->cb[i].buffer == prsc) {
ctx->dirty_shader[stage] |= FD_DIRTY_SHADER_CONST;
ctx->dirty |= FD_DIRTY_CONST;