On 03/02/2016 01:51 AM, Brian Paul wrote:
On 03/01/2016 05:30 PM, Dave Airlie wrote:
On 4 February 2016 at 01:44, Eduardo Lima Mitev <[email protected]> wrote:
Use QueryInternalFormat instead of QuerySamplesForFormat to obtain the
highest supported sample. QuerySamplesForFormat is to be removed.
---
  src/mesa/main/multisample.c | 10 ++++++----
  1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/mesa/main/multisample.c b/src/mesa/main/multisample.c
index e7783ea..56aa5c3 100644
--- a/src/mesa/main/multisample.c
+++ b/src/mesa/main/multisample.c
@@ -174,10 +174,12 @@ _mesa_check_sample_count(struct gl_context
*ctx, GLenum target,
      * for <internalformat> then the error INVALID_OPERATION is
generated."
      */
     if (ctx->Extensions.ARB_internalformat_query) {
-      GLint buffer[16];
-      int count = ctx->Driver.QuerySamplesForFormat(ctx, target,
-                                                    internalFormat,
buffer);
-      int limit = count ? buffer[0] : -1;
+      GLint buffer[16] = {-1};
+      ctx->Driver.QueryInternalFormat(ctx, target, internalFormat,
+                                      GL_SAMPLES, buffer);
+      /* since the query returns samples sorted in descending order,
+       * the first element is the greatest supported sample value */
+      int limit = buffer[0];


Do we allow declarations after code in base mesa code now?

Nah, I missed that.


At least one person on mesa-users is reporting a problem with that.  I'm
diagnosing it with him (which MSVC version, etc).

But don't let that hold you up, Eduardo.


Fixed locally.

https://github.com/Igalia/mesa/commit/badefc66391139fb1f9484b787e4b41620c208fa

Thanks Dave and Brian.

Eduardo
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to