diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c index ef3e07e..8a7db1a 100644 --- a/src/gallium/drivers/svga/svga_screen.c +++ b/src/gallium/drivers/svga/svga_screen.c @@ -733,7 +733,7 @@ svga_is_format_supported( struct pipe_screen *screen, assert(bindings); - if (sample_count > 1) { + if (sample_count > 0) { /* In ms_samples, if bit N is set it means that we support * multisample with N+1 samples per pixel. */ diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c index afc7700..0fa24e8 100644 --- a/src/mesa/state_tracker/st_cb_fbo.c +++ b/src/mesa/state_tracker/st_cb_fbo.c @@ -155,12 +155,12 @@ st_renderbuffer_alloc_storage(struct gl_context * ctx, * to and no more than the next larger sample count supported * by the implementation. * - * So let's find the supported number of samples closest to NumSamples. + * Find the supported number of samples >= rb->NumSamples */ if (rb->NumSamples > 0) { unsigned i; - for (i = MAX2(2, rb->NumSamples); i <= ctx->Const.MaxSamples; i++) { + for (i = rb->NumSamples; i <= ctx->Const.MaxSamples; i++) { format = st_choose_renderbuffer_format(st, internalFormat, i); if (format != PIPE_FORMAT_NONE) { diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index af2052d..8d6d053 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -2744,9 +2744,6 @@ st_texture_storage(struct gl_context *ctx, enum pipe_texture_target ptarget = gl_target_to_pipe(texObj->Target); boolean found = FALSE; - /* start the query with at least two samples */ - num_samples = MAX2(num_samples, 2); - for (; num_samples <= ctx->Const.MaxSamples; num_samples++) { if (screen->is_format_supported(screen, fmt, ptarget, num_samples,