| Summary: | glMultiDrawElements() not implemented | ||
|---|---|---|---|
| Product: | Mesa | Reporter: | Pierre Beyssac <mesa-bugzilla> |
| Component: | Mesa core | Assignee: | mesa-dev |
| Status: | RESOLVED INVALID | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | medium | ||
| Version: | unspecified | ||
| Hardware: | x86 (IA32) | ||
| OS: | FreeBSD | ||
| Whiteboard: | |||
| i915 platform: | i915 features: | ||
| Attachments: |
Output of glxinfo
Test case source code Test case console output New test case Add GL_EXT_multi_draw_arrays to the Radeon R300 driver. Add GL_EXT_multi_draw_arrays to the Radeon R200 driver |
||
|
Description
Pierre Beyssac
2008-04-23 02:15:34 UTC
I modified a test program to use glMultiDrawElements() and it worked as expected with 7.0.3. What driver are you using? Could you try with 7.0.3 and/or provide a small test case? Created attachment 16134 [details]
Output of glxinfo
Created attachment 16135 [details]
Test case source code
Created attachment 16136 [details]
Test case console output
I've made a quick & dirty update to Mesa 7.0.3, and I still get the same message. I'm running Xorg 7.3.1, xorg-server-1.4_8 with dri, on FreeBSD 8, with a Radeon card (9200 series, r300-based). See attached test case source code, its output, and the output of glxinfo. Your parameters to glMultiDrawElements() are incorrect. If you replace: glMultiDrawElements(GL_TRIANGLE_STRIP, tsci, tsfi, tsin); with: glMultiDrawElements(GL_TRIANGLE_STRIP, tsci, GL_UNSIGNED_SHORT, tsfi, tsin); You should get closer to success. Also, the type of tsci should be GLsizei. If you add #define GL_GLEXT_PROTOTYPES at the top of your code and compile with warning flags such as -pedantic -ansi -Wall you'll be more likely to find problems like this. Wow. Thanks Brian for the good advice, I'll need to go hide under a stone for some time :). However, the missing GL_UNSIGNED_SHORT was in the original code, I made a cut-and-paste error when writing the test case. After fixing the code as you suggest, I still get the same "Mesa 7.0.3 implementation error" message. New updated code is attached. Maybe I'm still doing something stupid, but I can't figure out what it is. Created attachment 16141 [details]
New test case
Updated test case, compiles without warning using "cc -pedantic -ansi -Wall -I/usr/local/include -L/usr/local/lib -lGL -lglut multi.c".
I don't have an R200 to test with but I think the problem is the GL_EXT_multi_draw_arrays feature is not supported by the driver.
It's not listed in glxinfo and it's not supported in GL 1.3 (which is what you have).
It should be easy to enable this extension in the driver though. Basically duplicate the code seen in another driver, like i965:
i965/intel_context.c:#define need_GL_EXT_multi_draw_arrays
i965/intel_context.c: { "GL_EXT_multi_draw_arrays", GL_EXT_multi_draw_arrays_functions },
If you do this, please attach the patch.
Created attachment 16154 [details] [review] Add GL_EXT_multi_draw_arrays to the Radeon R300 driver. Here's a tested patch for the R300 driver. Oddly enough, it doesn't seem to work within display lists, but I'll have to investigate whether this is another pilot error on my part. Radeon patch will follow once I get the time to test it on my R200 card. Created attachment 16166 [details] [review] Add GL_EXT_multi_draw_arrays to the Radeon R200 driver Here's the same patch as before, for the R200 driver. It's been tested. I'll issue a separate bug report for the display list weirdness. I've committed the r200/r300 patches to git. |
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.