| Summary: | [i965 FBO] glDrawBuffer and glReadBuffer doesn't work with max supported color attachments | ||
|---|---|---|---|
| Product: | Mesa | Reporter: | Shuang He <shuang.he> |
| Component: | Drivers/DRI/i965 | Assignee: | Eric Anholt <eric> |
| Status: | VERIFIED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | medium | CC: | dri-devel |
| Version: | unspecified | ||
| Hardware: | Other | ||
| OS: | Linux (All) | ||
| Whiteboard: | |||
| i915 platform: | i915 features: | ||
| Attachments: | test case | ||
|
Description
Shuang He
2007-12-21 00:46:38 UTC
Created attachment 13277 [details]
test case
seems following patch can fix this:
--- a/src/mesa/main/buffers.c 2007-12-21 10:59:20.000000000 +0800
+++ b/src/mesa/main/buffers.c 2007-12-21 16:55:55.000000000 +0800
@@ -320,6 +320,14 @@
return BUFFER_COLOR2;
case GL_COLOR_ATTACHMENT3_EXT:
return BUFFER_COLOR3;
+ case GL_COLOR_ATTACHMENT4_EXT:
+ return BUFFER_COLOR4;
+ case GL_COLOR_ATTACHMENT5_EXT:
+ return BUFFER_COLOR5;
+ case GL_COLOR_ATTACHMENT6_EXT:
+ return BUFFER_COLOR6;
+ case GL_COLOR_ATTACHMENT7_EXT:
+ return BUFFER_COLOR7;
default:
/* error */
return -1;
committed to git. verified. thanks sorry, I forgot this part. the previous one is just making glFramebufferEXT work with max supported color attachment. following is needed to make this work with glDrawBuffer and glReadBuffer
--- a/src/mesa/main/buffers.c 2008-01-02 13:25:29.000000000 +0800
+++ b/src/mesa/main/buffers.c 2008-01-02 13:25:01.000000000 +0800
@@ -275,6 +275,14 @@
return BUFFER_BIT_COLOR2;
case GL_COLOR_ATTACHMENT3_EXT:
return BUFFER_BIT_COLOR3;
+ case GL_COLOR_ATTACHMENT4_EXT:
+ return BUFFER_BIT_COLOR4;
+ case GL_COLOR_ATTACHMENT5_EXT:
+ return BUFFER_BIT_COLOR5;
+ case GL_COLOR_ATTACHMENT6_EXT:
+ return BUFFER_BIT_COLOR6;
+ case GL_COLOR_ATTACHMENT7_EXT:
+ return BUFFER_BIT_COLOR7;
default:
/* error */
return BAD_MASK;
OK, additional cases commited. thanks |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.