Module: Mesa Branch: master Commit: 1a12d682a6e5af0b7c7f7548740722171e07a674 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1a12d682a6e5af0b7c7f7548740722171e07a674
Author: Rob Clark <[email protected]> Date: Wed Mar 10 08:44:55 2021 -0800 freedreno: Check cb0 in rebind_resource() 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 <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9323> --- src/gallium/drivers/freedreno/freedreno_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/freedreno/freedreno_resource.c b/src/gallium/drivers/freedreno/freedreno_resource.c index ef6297dc83e..2c0a7c089eb 100644 --- a/src/gallium/drivers/freedreno/freedreno_resource.c +++ b/src/gallium/drivers/freedreno/freedreno_resource.c @@ -99,7 +99,7 @@ rebind_resource_in_ctx(struct fd_context *ctx, struct fd_resource *rsc) !(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; _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
