diff options
author | Eric Anholt <[email protected]> | 2008-02-15 13:48:11 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2008-02-15 13:48:11 -0800 |
commit | c741d287ecce1bd95d4e024d60e274abfcfbe22f (patch) | |
tree | 05d265aa3494b4a85ee2ef712d7278654c107832 /src/mesa/drivers | |
parent | eed5e6f40f1728ae5ae346d44ce45ba767bbf24c (diff) |
[intel] Allow attIndex to be negative to avoid defeating the >= 0 check.
Otherwise, we would go wildly out of bounds if passed -1 (no renderbuffer), such
as while doing LOCK_HARDWARE with glDrawBuffer(GL_NONE).
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_fbo.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_fbo.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c index c430e90382f..94d499f001c 100644 --- a/src/mesa/drivers/dri/intel/intel_fbo.c +++ b/src/mesa/drivers/dri/intel/intel_fbo.c @@ -69,7 +69,7 @@ intel_renderbuffer(struct gl_renderbuffer *rb) struct intel_renderbuffer * -intel_get_renderbuffer(struct gl_framebuffer *fb, GLuint attIndex) +intel_get_renderbuffer(struct gl_framebuffer *fb, int attIndex) { if (attIndex >= 0) return intel_renderbuffer(fb->Attachment[attIndex].Renderbuffer); diff --git a/src/mesa/drivers/dri/intel/intel_fbo.h b/src/mesa/drivers/dri/intel/intel_fbo.h index 2fda7dca005..c90c84b48c2 100644 --- a/src/mesa/drivers/dri/intel/intel_fbo.h +++ b/src/mesa/drivers/dri/intel/intel_fbo.h @@ -98,7 +98,7 @@ extern void intel_fbo_init(struct intel_context *intel); /* XXX make inline or macro */ extern struct intel_renderbuffer *intel_get_renderbuffer(struct gl_framebuffer *fb, - GLuint attIndex); + int attIndex); extern void intel_flip_renderbuffers(struct intel_framebuffer *intel_fb); |