summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChad Versace <[email protected]>2017-05-26 17:28:21 -0700
committerEmil Velikov <[email protected]>2017-06-14 10:39:50 +0100
commit15b5e5996ad1eaa88f9e684aeb7425235b7615fb (patch)
treef1534c2f239ad3b73e08e5ad4eec02efeaf94c44
parent8cfaa8ad66fc5ea10da42bc22094ac4d09c05d50 (diff)
i965/dri: Fix bad GL error in intel_create_winsys_renderbuffer()
This function never occurs in the callchain of a GL function. It occurs only in the callchain of eglCreate*Surface and the analogous paths for GLX. Therefore, even if a thread does have a bound GL context, emitting a GL error here is wrong. A misplaced GL error, when no GL call is made, can confuse clients. Cc: [email protected] Reviewed-by: Ian Romanick <[email protected]> (cherry picked from commit 9d996e94fbbfdb3692061009f5441cf61bba36ae) [Emil Velikov: resolve trivial conflicts] Signed-off-by: Emil Velikov <[email protected]> Conflicts: src/mesa/drivers/dri/i965/intel_fbo.c
-rw-r--r--src/mesa/drivers/dri/i965/intel_fbo.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_fbo.c b/src/mesa/drivers/dri/i965/intel_fbo.c
index 21e8e86d2c1..8accbe91c31 100644
--- a/src/mesa/drivers/dri/i965/intel_fbo.c
+++ b/src/mesa/drivers/dri/i965/intel_fbo.c
@@ -442,13 +442,9 @@ intel_create_renderbuffer(mesa_format format, unsigned num_samples)
struct intel_renderbuffer *irb;
struct gl_renderbuffer *rb;
- GET_CURRENT_CONTEXT(ctx);
-
irb = CALLOC_STRUCT(intel_renderbuffer);
- if (!irb) {
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "creating renderbuffer");
+ if (!irb)
return NULL;
- }
rb = &irb->Base.Base;
irb->layer_count = 1;