On 21/07/17 22:42, Samuel Pitoiset wrote:
To return GL_OUT_OF_MEMORY if NewSamplerObject fails.

Signed-off-by: Samuel Pitoiset <samuel.pitoi...@gmail.com>
---
  src/mesa/main/samplerobj.c | 10 +++++-----
  1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/mesa/main/samplerobj.c b/src/mesa/main/samplerobj.c
index 26e7725249..a9c004fe71 100644
--- a/src/mesa/main/samplerobj.c
+++ b/src/mesa/main/samplerobj.c
@@ -154,7 +154,8 @@ _mesa_new_sampler_object(struct gl_context *ctx, GLuint 
name)
  }
static void
-create_samplers(struct gl_context *ctx, GLsizei count, GLuint *samplers)
+create_samplers(struct gl_context *ctx, GLsizei count, GLuint *samplers,
+                const char *caller)
  {
     GLuint first;
     GLint i;
@@ -181,7 +182,6 @@ static void
  create_samplers_err(struct gl_context *ctx, GLsizei count, GLuint *samplers,
                      const char *caller)
  {
-

I've been letting some of these go but white space fixes should be going into separate patches. Please try to do this in future.

     if (MESA_VERBOSE & VERBOSE_API)
        _mesa_debug(ctx, "%s(%d)\n", caller, count);
@@ -190,14 +190,14 @@ create_samplers_err(struct gl_context *ctx, GLsizei count, GLuint *samplers,
        return;
     }
- create_samplers(ctx, count, samplers);
+   create_samplers(ctx, count, samplers, caller);
  }
void GLAPIENTRY
  _mesa_GenSamplers_no_error(GLsizei count, GLuint *samplers)
  {
     GET_CURRENT_CONTEXT(ctx);
-   create_samplers(ctx, count, samplers);
+   create_samplers(ctx, count, samplers, "glGenSamplers");
  }
void GLAPIENTRY
@@ -211,7 +211,7 @@ void GLAPIENTRY
  _mesa_CreateSamplers_no_error(GLsizei count, GLuint *samplers)
  {
     GET_CURRENT_CONTEXT(ctx);
-   create_samplers(ctx, count, samplers);
+   create_samplers(ctx, count, samplers, "glCreateSamplers");
  }
void GLAPIENTRY

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to