[Nouveau] [patch] [renouveau] 1/1 fix detection of GL_ARB_draw_buffers in test_framebuffer_object
mark.carey at gmail.com
Thu Oct 25 02:35:57 PDT 2007
Further to comments in
between 11:30 and 13:51, chowmeined confirmation in
10:16 of the same behaviour on a second 0322.
It appears that 10de0322 supports GL_EXT_framebuffer_object but does
not support ARB_draw_buffers, accordingly the current fragment program
in renouveau test.c::test_ext_framebuffer_object() causes OpenGL error
1282, 502, INVALID_OPERATION at call to ProgramStringARB on line 4595,
section 3.11.1 suggests this is due to the illegal token in the
fragment program (fp).
The example code in
between lines 417 and 429 suggest a method for determining which
character in the fragment program caused the error;
Error appears to be firstly `OPTION ARB_draw_buffers;` and secondly
the use of `MOV result.color[%d], fragment.color;` when without
GL_ARB_draw_buffers a syntactically correct line woudl read `MOV
Furthermore due to incorrect detection of nr_bufs line 4614 or 4615
causes a similar error when the draw buffers test attempts to use a
draw buffer which does not exist on the hardware.
when querying the number of supported draw buffers one should call
GetIntegerv specifying MAX_DRAW_BUFFERS_ARB (0x8824) not
GL_MAX_COLOR_ATTACHMENTS_EXT as currently performed on line 4566.
1. Defines the constant MAX_DRAW_BUFFERS_ARB (in test.c, which header
should this go into? does it really matter for renouveau?)
2. Correctly uses MAX_DRAW_BUFFERS_ARB to determine the number of draw
suggests that OpenGL 1.5 MAX_DRAW_BUFFERS_ARB will always return a
minimum value of 1, will renouveau ever be run on OpenGL<1.5?)
3. Adds a line to `card_10de-xxxx_test_ext_framebuffer_object.txt`
when GL_ARB_draw_buffers is not supported
4. Modifies the fp in the case when MAX_DRAW_BUFFERS_ARB == 1 and
GL_ARB_draw_buffers is not supported
5. Draw buffer test now runs without error (due to 2)
Patch applied to a fresh checkout of renouveau on both 0322
(GL_EXT_framebuffer_object) and 0393 (GL_EXT_framebuffer_object +
GL_ARB_draw_buffers) compiled and tested without error.
Please review and consider applying the attached patch.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2152 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/nouveau/attachments/20071025/08652e44/attachment.patch
More information about the Nouveau