[Piglit] instanced_arrays refuses to run without GL_ARB_draw_instanced, even if GL_ARB_instanced_arrays is available

Jose Fonseca jfonseca at vmware.com
Thu Oct 11 08:35:06 PDT 2012


I'm trying to run instanced_arrays on a system with GL_ARB_instanced_arrays, but no GL_ARB_draw_instanced, which should work AFAICT.

$ ./bin/instanced_arrays 
Function "DrawArraysInstanced" not supported on this implementation
PIGLIT: {'result': 'skip' }


The problem is the generated code:

5082	/* glDrawArraysInstanced (GL 3.1) */
5083	/* glDrawArraysInstancedARB (GL_ARB_draw_instanced) */
5084	/* glDrawArraysInstancedEXT (GL_EXT_draw_instanced) */
5085	static piglit_dispatch_function_ptr resolve_glDrawArraysInstanced()
5086	{
5087		if (check_version(31))
5088			piglit_dispatch_glDrawArraysInstanced = (PFNGLDRAWARRAYSINSTANCEDPROC) get_core_proc("glDrawArraysInstanced", 31);
5089		else if (check_extension("GL_ARB_draw_instanced"))
5090			piglit_dispatch_glDrawArraysInstanced = (PFNGLDRAWARRAYSINSTANCEDARBPROC) get_ext_proc("glDrawArraysInstancedARB");
5091		else if (check_extension("GL_EXT_draw_instanced"))
5092			piglit_dispatch_glDrawArraysInstanced = (PFNGLDRAWARRAYSINSTANCEDEXTPROC) get_ext_proc("glDrawArraysInstancedEXT");
5093		else
5094			unsupported("DrawArraysInstanced");
5095		return (piglit_dispatch_function_ptr) piglit_dispatch_glDrawArraysInstanced;
5096	}

Derived from specs/gl.spec, which puts glDrawArraysInstancedARB as belonging to GL_ARB_draw_instanced, ignoring that it is also part of GL_ARB_instanced_arrays.


How can I fix this? Are these draconian checks really necessary, when the test already has

  piglit_require_extension("GL_ARB_instanced_arrays");

?


Jose


More information about the Piglit mailing list