mesa: fix off by one in MSRTT handling

The actual number of samples chosen is allowed to equal the number
requested, but currently we just check for sample counts greater
than the request.

Fixes: 894b37e060 ("mesa: fix sample count handling for MSRTT")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36878>
This commit is contained in:
Eric R. Smith
2025-08-20 09:41:46 -03:00
committed by Marge Bot
parent 3362b8dcb5
commit 095d1b6bcc
+1 -1
View File
@@ -627,7 +627,7 @@ _mesa_update_renderbuffer_surface(struct gl_context *ctx,
than or equal to samples and no more than the next larger sample count
supported by the implementation.
*/
for (unsigned i = rb->rtt_nr_samples + 1; i <= ctx->Const.MaxFramebufferSamples; i++) {
for (unsigned i = rb->rtt_nr_samples; i <= ctx->Const.MaxFramebufferSamples; i++) {
if (!ctx->st->screen->is_format_supported(ctx->st->screen, format, resource->target, i, i, resource->bind))
continue;
nr_samples = i;