diff options
Diffstat (limited to 'src')
355 files changed, 59188 insertions, 3808 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index 583421ac8a0..69f3c28c9e4 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -710,7 +710,8 @@ dri2_initialize(_EGLDriver *drv, _EGLDisplay *disp, dri2_dpy->fd = open(dri2_dpy->device_name, O_RDWR); if (dri2_dpy->fd == -1) { _eglLog(_EGL_FATAL, - "DRI2: could not open %s (%s)", path, strerror(errno)); + "DRI2: could not open %s (%s)", dri2_dpy->device_name, + strerror(errno)); goto cleanup_driver; } diff --git a/src/gallium/Makefile.template b/src/gallium/Makefile.template index b5a9938c740..1ba0724949a 100644 --- a/src/gallium/Makefile.template +++ b/src/gallium/Makefile.template @@ -37,7 +37,7 @@ depend: $(C_SOURCES) $(CPP_SOURCES) $(ASM_SOURCES) $(SYMLINKS) $(GENERATED_SOURC $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(C_SOURCES) $(CPP_SOURCES) $(ASM_SOURCES) $(GENERATED_SOURCES) 2> /dev/null $(PROGS): % : %.o - $(LD) $(filter %.o,$^) -o $@ -Wl,--start-group $(LIBS) -Wl,--end-group + $(LD) $(LDFLAGS) $(filter %.o,$^) -o $@ -Wl,--start-group $(LIBS) -Wl,--end-group # Emacs tags tags: diff --git a/src/gallium/auxiliary/Makefile b/src/gallium/auxiliary/Makefile index f8e65cf6c61..2daed382cf3 100644 --- a/src/gallium/auxiliary/Makefile +++ b/src/gallium/auxiliary/Makefile @@ -101,6 +101,7 @@ C_SOURCES = \ util/u_blit.c \ util/u_blitter.c \ util/u_cache.c \ + util/u_caps.c \ util/u_cpu_detect.c \ util/u_dl.c \ util/u_draw_quad.c \ diff --git a/src/gallium/auxiliary/SConscript b/src/gallium/auxiliary/SConscript index db3a1e73114..a0673df8a8e 100644 --- a/src/gallium/auxiliary/SConscript +++ b/src/gallium/auxiliary/SConscript @@ -144,6 +144,7 @@ source = [ 'util/u_blit.c', 'util/u_blitter.c', 'util/u_cache.c', + 'util/u_caps.c', 'util/u_cpu_detect.c', 'util/u_debug.c', 'util/u_debug_memory.c', diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c b/src/gallium/auxiliary/cso_cache/cso_context.c index 6fd4bd36428..c5fe7efa028 100644 --- a/src/gallium/auxiliary/cso_cache/cso_context.c +++ b/src/gallium/auxiliary/cso_cache/cso_context.c @@ -313,10 +313,13 @@ void cso_release_all( struct cso_context *ctx ) } +/** + * Free the CSO context. NOTE: the state tracker should have previously called + * cso_release_all(). + */ void cso_destroy_context( struct cso_context *ctx ) { if (ctx) { - /*cso_release_all( ctx );*/ FREE( ctx ); } } @@ -349,6 +352,7 @@ enum pipe_error cso_set_blend(struct cso_context *ctx, if (!cso) return PIPE_ERROR_OUT_OF_MEMORY; + memset(&cso->state, 0, sizeof cso->state); memcpy(&cso->state, templ, key_size); cso->data = ctx->pipe->create_blend_state(ctx->pipe, &cso->state); cso->delete_state = (cso_state_callback)ctx->pipe->delete_blend_state; diff --git a/src/gallium/auxiliary/draw/draw_llvm.c b/src/gallium/auxiliary/draw/draw_llvm.c index 9d110317698..2c234285b5e 100644 --- a/src/gallium/auxiliary/draw/draw_llvm.c +++ b/src/gallium/auxiliary/draw/draw_llvm.c @@ -24,6 +24,8 @@ /* generates the draw jit function */ static void draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *var); +static void +draw_llvm_generate_elts(struct draw_llvm *llvm, struct draw_llvm_variant *var); static void init_globals(struct draw_llvm *llvm) @@ -205,7 +207,9 @@ draw_llvm_create(struct draw_context *draw) void draw_llvm_destroy(struct draw_llvm *llvm) { - free(llvm); + LLVMDisposePassManager(llvm->pass); + + FREE(llvm); } struct draw_llvm_variant * @@ -218,6 +222,7 @@ draw_llvm_prepare(struct draw_llvm *llvm, int num_inputs) llvm->vertex_header_ptr_type = create_vertex_header(llvm, num_inputs); draw_llvm_generate(llvm, variant); + draw_llvm_generate_elts(llvm, variant); return variant; } @@ -252,7 +257,8 @@ generate_vs(struct draw_llvm *llvm, NULL /*pos*/, inputs, outputs, - NULL/*sampler*/); + NULL/*sampler*/, + &llvm->draw->vs.vertex_shader->info); } #if DEBUG_STORE @@ -285,10 +291,16 @@ generate_fetch(LLVMBuilderRef builder, LLVMValueRef vbuffer_ptr = LLVMBuildGEP(builder, vbuffers_ptr, &indices, 1, ""); LLVMValueRef vb_stride = draw_jit_vbuffer_stride(builder, vbuf); + LLVMValueRef vb_max_index = draw_jit_vbuffer_max_index(builder, vbuf); LLVMValueRef vb_buffer_offset = draw_jit_vbuffer_offset(builder, vbuf); - LLVMValueRef stride = LLVMBuildMul(builder, - vb_stride, - index, ""); + LLVMValueRef cond; + LLVMValueRef stride; + + cond = LLVMBuildICmp(builder, LLVMIntULE, index, vb_max_index, ""); + + index = LLVMBuildSelect(builder, cond, index, vb_max_index, ""); + + stride = LLVMBuildMul(builder, vb_stride, index, ""); vbuffer_ptr = LLVMBuildLoad(builder, vbuffer_ptr, "vbuffer"); @@ -689,6 +701,158 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant) lp_disassemble(variant->jit_func); } + +static void +draw_llvm_generate_elts(struct draw_llvm *llvm, struct draw_llvm_variant *variant) +{ + LLVMTypeRef arg_types[7]; + LLVMTypeRef func_type; + LLVMValueRef context_ptr; + LLVMBasicBlockRef block; + LLVMBuilderRef builder; + LLVMValueRef fetch_elts, fetch_count, stride, step, io_itr; + LLVMValueRef io_ptr, vbuffers_ptr, vb_ptr; + struct draw_context *draw = llvm->draw; + unsigned i, j; + struct lp_build_context bld; + struct lp_build_context bld_int; + struct lp_build_loop_state lp_loop; + struct lp_type vs_type = lp_type_float_vec(32); + const int max_vertices = 4; + LLVMValueRef outputs[PIPE_MAX_SHADER_OUTPUTS][NUM_CHANNELS]; + LLVMValueRef fetch_max; + + arg_types[0] = llvm->context_ptr_type; /* context */ + arg_types[1] = llvm->vertex_header_ptr_type; /* vertex_header */ + arg_types[2] = llvm->buffer_ptr_type; /* vbuffers */ + arg_types[3] = LLVMPointerType(LLVMInt32Type(), 0); /* fetch_elts * */ + arg_types[4] = LLVMInt32Type(); /* fetch_count */ + arg_types[5] = LLVMInt32Type(); /* stride */ + arg_types[6] = llvm->vb_ptr_type; /* pipe_vertex_buffer's */ + + func_type = LLVMFunctionType(LLVMVoidType(), arg_types, Elements(arg_types), 0); + + variant->function_elts = LLVMAddFunction(llvm->module, "draw_llvm_shader_elts", func_type); + LLVMSetFunctionCallConv(variant->function_elts, LLVMCCallConv); + for(i = 0; i < Elements(arg_types); ++i) + if(LLVMGetTypeKind(arg_types[i]) == LLVMPointerTypeKind) + LLVMAddAttribute(LLVMGetParam(variant->function_elts, i), LLVMNoAliasAttribute); + + context_ptr = LLVMGetParam(variant->function_elts, 0); + io_ptr = LLVMGetParam(variant->function_elts, 1); + vbuffers_ptr = LLVMGetParam(variant->function_elts, 2); + fetch_elts = LLVMGetParam(variant->function_elts, 3); + fetch_count = LLVMGetParam(variant->function_elts, 4); + stride = LLVMGetParam(variant->function_elts, 5); + vb_ptr = LLVMGetParam(variant->function_elts, 6); + + lp_build_name(context_ptr, "context"); + lp_build_name(io_ptr, "io"); + lp_build_name(vbuffers_ptr, "vbuffers"); + lp_build_name(fetch_elts, "fetch_elts"); + lp_build_name(fetch_count, "fetch_count"); + lp_build_name(stride, "stride"); + lp_build_name(vb_ptr, "vb"); + + /* + * Function body + */ + + block = LLVMAppendBasicBlock(variant->function_elts, "entry"); + builder = LLVMCreateBuilder(); + LLVMPositionBuilderAtEnd(builder, block); + + lp_build_context_init(&bld, builder, vs_type); + lp_build_context_init(&bld_int, builder, lp_type_int(32)); + + step = LLVMConstInt(LLVMInt32Type(), max_vertices, 0); + + fetch_max = LLVMBuildSub(builder, fetch_count, + LLVMConstInt(LLVMInt32Type(), 1, 0), + "fetch_max"); + + lp_build_loop_begin(builder, LLVMConstInt(LLVMInt32Type(), 0, 0), &lp_loop); + { + LLVMValueRef inputs[PIPE_MAX_SHADER_INPUTS][NUM_CHANNELS]; + LLVMValueRef aos_attribs[PIPE_MAX_SHADER_INPUTS][NUM_CHANNELS] = { { 0 } }; + LLVMValueRef io; + const LLVMValueRef (*ptr_aos)[NUM_CHANNELS]; + + io_itr = lp_loop.counter; + io = LLVMBuildGEP(builder, io_ptr, &io_itr, 1, ""); +#if DEBUG_STORE + lp_build_printf(builder, " --- io %d = %p, loop counter %d\n", + io_itr, io, lp_loop.counter); +#endif + for (i = 0; i < NUM_CHANNELS; ++i) { + LLVMValueRef true_index = LLVMBuildAdd( + builder, + lp_loop.counter, + LLVMConstInt(LLVMInt32Type(), i, 0), ""); + LLVMValueRef fetch_ptr; + + /* make sure we're not out of bounds which can happen + * if fetch_count % 4 != 0, because on the last iteration + * a few of the 4 vertex fetches will be out of bounds */ + true_index = lp_build_min(&bld_int, true_index, fetch_max); + + fetch_ptr = LLVMBuildGEP(builder, fetch_elts, + &true_index, 1, ""); + true_index = LLVMBuildLoad(builder, fetch_ptr, "fetch_elt"); + for (j = 0; j < draw->pt.nr_vertex_elements; ++j) { + struct pipe_vertex_element *velem = &draw->pt.vertex_element[j]; + LLVMValueRef vb_index = LLVMConstInt(LLVMInt32Type(), + velem->vertex_buffer_index, + 0); + LLVMValueRef vb = LLVMBuildGEP(builder, vb_ptr, + &vb_index, 1, ""); + generate_fetch(builder, vbuffers_ptr, + &aos_attribs[j][i], velem, vb, true_index); + } + } + convert_to_soa(builder, aos_attribs, inputs, + draw->pt.nr_vertex_elements); + + ptr_aos = (const LLVMValueRef (*)[NUM_CHANNELS]) inputs; + generate_vs(llvm, + builder, + outputs, + ptr_aos, + context_ptr); + + convert_to_aos(builder, io, outputs, + draw->vs.vertex_shader->info.num_outputs, + max_vertices); + } + lp_build_loop_end_cond(builder, fetch_count, step, LLVMIntUGE, &lp_loop); + + LLVMBuildRetVoid(builder); + + LLVMDisposeBuilder(builder); + + /* + * Translate the LLVM IR into machine code. + */ +#ifdef DEBUG + if(LLVMVerifyFunction(variant->function_elts, LLVMPrintMessageAction)) { + LLVMDumpValue(variant->function_elts); + assert(0); + } +#endif + + LLVMRunFunctionPassManager(llvm->pass, variant->function_elts); + + if (0) { + LLVMDumpValue(variant->function_elts); + debug_printf("\n"); + } + variant->jit_func_elts = (draw_jit_vert_func_elts)LLVMGetPointerToGlobal( + llvm->draw->engine, variant->function_elts); + + if (0) + lp_disassemble(variant->jit_func_elts); +} + void draw_llvm_make_variant_key(struct draw_llvm *llvm, struct draw_llvm_variant_key *key) diff --git a/src/gallium/auxiliary/draw/draw_llvm.h b/src/gallium/auxiliary/draw/draw_llvm.h index 28b9044a81e..58fee7f9d60 100644 --- a/src/gallium/auxiliary/draw/draw_llvm.h +++ b/src/gallium/auxiliary/draw/draw_llvm.h @@ -78,7 +78,10 @@ struct draw_jit_context #define draw_jit_vbuffer_stride(_builder, _ptr) \ lp_build_struct_get(_builder, _ptr, 0, "stride") -#define draw_jit_vbuffer_offset(_builder, _ptr) \ +#define draw_jit_vbuffer_max_index(_builder, _ptr) \ + lp_build_struct_get(_builder, _ptr, 1, "max_index") + +#define draw_jit_vbuffer_offset(_builder, _ptr) \ lp_build_struct_get(_builder, _ptr, 2, "buffer_offset") @@ -91,6 +94,16 @@ typedef void unsigned stride, struct pipe_vertex_buffer *vertex_buffers); + +typedef void +(*draw_jit_vert_func_elts)(struct draw_jit_context *context, + struct vertex_header *io, + const char *vbuffers[PIPE_MAX_ATTRIBS], + const unsigned *fetch_elts, + unsigned fetch_count, + unsigned stride, + struct pipe_vertex_buffer *vertex_buffers); + struct draw_llvm { struct draw_context *draw; @@ -119,7 +132,9 @@ struct draw_llvm_variant { struct draw_llvm_variant_key key; LLVMValueRef function; + LLVMValueRef function_elts; draw_jit_vert_func jit_func; + draw_jit_vert_func_elts jit_func_elts; struct draw_llvm_variant *next; }; diff --git a/src/gallium/auxiliary/draw/draw_pipe_vbuf.c b/src/gallium/auxiliary/draw/draw_pipe_vbuf.c index ee2b8116032..abbf6247ab8 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_vbuf.c +++ b/src/gallium/auxiliary/draw/draw_pipe_vbuf.c @@ -137,7 +137,7 @@ emit_vertex( struct vbuf_stage *vbuf, */ /* Note: we really do want data[0] here, not data[pos]: */ - vbuf->translate->set_buffer(vbuf->translate, 0, vertex->data[0], 0); + vbuf->translate->set_buffer(vbuf->translate, 0, vertex->data[0], 0, ~0); vbuf->translate->run(vbuf->translate, 0, 1, 0, vbuf->vertex_ptr); if (0) draw_dump_emitted_vertex(vbuf->vinfo, (uint8_t *)vbuf->vertex_ptr); @@ -271,7 +271,7 @@ vbuf_start_prim( struct vbuf_stage *vbuf, uint prim ) translate_key_sanitize(&hw_key); vbuf->translate = translate_cache_find(vbuf->cache, &hw_key); - vbuf->translate->set_buffer(vbuf->translate, 1, &vbuf->point_size, 0); + vbuf->translate->set_buffer(vbuf->translate, 1, &vbuf->point_size, 0, ~0); } vbuf->point_size = vbuf->stage.draw->rasterizer->point_size; diff --git a/src/gallium/auxiliary/draw/draw_pipe_wide_line.c b/src/gallium/auxiliary/draw/draw_pipe_wide_line.c index 265a420d01e..ab167065815 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_wide_line.c +++ b/src/gallium/auxiliary/draw/draw_pipe_wide_line.c @@ -54,7 +54,6 @@ static INLINE struct wideline_stage *wideline_stage( struct draw_stage *stage ) /** * Draw a wide line by drawing a quad (two triangles). - * XXX need to disable polygon stipple. */ static void wideline_line( struct draw_stage *stage, struct prim_header *header ) diff --git a/src/gallium/auxiliary/draw/draw_private.h b/src/gallium/auxiliary/draw/draw_private.h index 4bb3282f62c..a2bfb693c09 100644 --- a/src/gallium/auxiliary/draw/draw_private.h +++ b/src/gallium/auxiliary/draw/draw_private.h @@ -132,6 +132,7 @@ struct draw_context struct draw_pt_middle_end *fetch_emit; struct draw_pt_middle_end *fetch_shade_emit; struct draw_pt_middle_end *general; + struct draw_pt_middle_end *llvm; } middle; struct { @@ -253,8 +254,8 @@ struct draw_context #ifdef HAVE_LLVM LLVMExecutionEngineRef engine; - boolean use_llvm; #endif + void *driver_private; }; diff --git a/src/gallium/auxiliary/draw/draw_pt.c b/src/gallium/auxiliary/draw/draw_pt.c index b5876bb1bdb..b853f3a89f8 100644 --- a/src/gallium/auxiliary/draw/draw_pt.c +++ b/src/gallium/auxiliary/draw/draw_pt.c @@ -37,6 +37,13 @@ #include "util/u_math.h" #include "util/u_prim.h" + +DEBUG_GET_ONCE_BOOL_OPTION(draw_fse, "DRAW_FSE", FALSE) +DEBUG_GET_ONCE_BOOL_OPTION(draw_no_fse, "DRAW_NO_FSE", FALSE) +#ifdef HAVE_LLVM +DEBUG_GET_ONCE_BOOL_OPTION(draw_use_llvm, "DRAW_USE_LLVM", TRUE) +#endif + static unsigned trim( unsigned count, unsigned first, unsigned incr ) { if (count < first) @@ -90,12 +97,16 @@ draw_pt_arrays(struct draw_context *draw, opt |= PT_SHADE; } - if (opt == 0) - middle = draw->pt.middle.fetch_emit; - else if (opt == PT_SHADE && !draw->pt.no_fse) - middle = draw->pt.middle.fetch_shade_emit; - else - middle = draw->pt.middle.general; + if (draw->pt.middle.llvm) { + middle = draw->pt.middle.llvm; + } else { + if (opt == 0) + middle = draw->pt.middle.fetch_emit; + else if (opt == PT_SHADE && !draw->pt.no_fse) + middle = draw->pt.middle.fetch_shade_emit; + else + middle = draw->pt.middle.general; + } /* Pick the right frontend @@ -122,8 +133,8 @@ draw_pt_arrays(struct draw_context *draw, boolean draw_pt_init( struct draw_context *draw ) { - draw->pt.test_fse = debug_get_bool_option("DRAW_FSE", FALSE); - draw->pt.no_fse = debug_get_bool_option("DRAW_NO_FSE", FALSE); + draw->pt.test_fse = debug_get_option_draw_fse(); + draw->pt.no_fse = debug_get_option_draw_no_fse(); draw->pt.front.vcache = draw_pt_vcache( draw ); if (!draw->pt.front.vcache) @@ -141,25 +152,26 @@ boolean draw_pt_init( struct draw_context *draw ) if (!draw->pt.middle.fetch_shade_emit) return FALSE; -#if HAVE_LLVM - draw->use_llvm = debug_get_bool_option("DRAW_USE_LLVM", TRUE); - if (draw->use_llvm) - draw->pt.middle.general = draw_pt_fetch_pipeline_or_emit_llvm( draw ); -#else - draw->pt.middle.general = NULL; -#endif - - if (!draw->pt.middle.general) - draw->pt.middle.general = draw_pt_fetch_pipeline_or_emit( draw ); + draw->pt.middle.general = draw_pt_fetch_pipeline_or_emit( draw ); if (!draw->pt.middle.general) return FALSE; +#if HAVE_LLVM + if (debug_get_option_draw_use_llvm()) + draw->pt.middle.llvm = draw_pt_fetch_pipeline_or_emit_llvm( draw ); +#endif + return TRUE; } void draw_pt_destroy( struct draw_context *draw ) { + if (draw->pt.middle.llvm) { + draw->pt.middle.llvm->destroy( draw->pt.middle.llvm ); + draw->pt.middle.llvm = NULL; + } + if (draw->pt.middle.general) { draw->pt.middle.general->destroy( draw->pt.middle.general ); draw->pt.middle.general = NULL; diff --git a/src/gallium/auxiliary/draw/draw_pt_emit.c b/src/gallium/auxiliary/draw/draw_pt_emit.c index a7917f54b04..ad48fa39a4f 100644 --- a/src/gallium/auxiliary/draw/draw_pt_emit.c +++ b/src/gallium/auxiliary/draw/draw_pt_emit.c @@ -171,12 +171,14 @@ void draw_pt_emit( struct pt_emit *emit, translate->set_buffer(translate, 0, vertex_data, - stride ); + stride, + ~0); translate->set_buffer(translate, 1, &draw->rasterizer->point_size, - 0); + 0, + ~0); translate->run( translate, 0, @@ -232,11 +234,11 @@ void draw_pt_emit_linear(struct pt_emit *emit, goto fail; translate->set_buffer(translate, 0, - vertex_data, stride); + vertex_data, stride, count - 1); translate->set_buffer(translate, 1, &draw->rasterizer->point_size, - 0); + 0, ~0); translate->run(translate, 0, diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch.c b/src/gallium/auxiliary/draw/draw_pt_fetch.c index 252be5053e4..a1347221b5d 100644 --- a/src/gallium/auxiliary/draw/draw_pt_fetch.c +++ b/src/gallium/auxiliary/draw/draw_pt_fetch.c @@ -149,7 +149,8 @@ void draw_pt_fetch_prepare( struct pt_fetch *fetch, fetch->translate->set_buffer(fetch->translate, draw->pt.nr_vertex_buffers, &vh, - 0); + 0, + ~0); } } @@ -172,7 +173,8 @@ void draw_pt_fetch_run( struct pt_fetch *fetch, i, ((char *)draw->pt.user.vbuffer[i] + draw->pt.vertex_buffer[i].buffer_offset), - draw->pt.vertex_buffer[i].stride ); + draw->pt.vertex_buffer[i].stride, + draw->pt.vertex_buffer[i].max_index); } translate->run_elts( translate, @@ -198,7 +200,8 @@ void draw_pt_fetch_run_linear( struct pt_fetch *fetch, i, ((char *)draw->pt.user.vbuffer[i] + draw->pt.vertex_buffer[i].buffer_offset), - draw->pt.vertex_buffer[i].stride ); + draw->pt.vertex_buffer[i].stride, + draw->pt.vertex_buffer[i].max_index); } translate->run( translate, diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch_emit.c b/src/gallium/auxiliary/draw/draw_pt_fetch_emit.c index 1994ddf2bcc..d7735bf1ac9 100644 --- a/src/gallium/auxiliary/draw/draw_pt_fetch_emit.c +++ b/src/gallium/auxiliary/draw/draw_pt_fetch_emit.c @@ -168,7 +168,8 @@ static void fetch_emit_prepare( struct draw_pt_middle_end *middle, feme->translate->set_buffer(feme->translate, draw->pt.nr_vertex_buffers, &feme->point_size, - 0); + 0, + ~0); } feme->point_size = draw->rasterizer->point_size; @@ -178,7 +179,8 @@ static void fetch_emit_prepare( struct draw_pt_middle_end *middle, i, ((char *)draw->pt.user.vbuffer[i] + draw->pt.vertex_buffer[i].buffer_offset), - draw->pt.vertex_buffer[i].stride ); + draw->pt.vertex_buffer[i].stride, + draw->pt.vertex_buffer[i].max_index); } *max_vertices = (draw->render->max_vertex_buffer_bytes / diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c index 389e2b105e5..cbb5b6c9605 100644 --- a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c +++ b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c @@ -167,7 +167,8 @@ static void fse_prepare( struct draw_pt_middle_end *middle, i, ((const ubyte *) draw->pt.user.vbuffer[i] + draw->pt.vertex_buffer[i].buffer_offset), - draw->pt.vertex_buffer[i].stride ); + draw->pt.vertex_buffer[i].stride, + draw->pt.vertex_buffer[i].max_index ); } *max_vertices = (draw->render->max_vertex_buffer_bytes / diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c index f71271bd915..35913a59951 100644 --- a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c +++ b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c @@ -167,8 +167,6 @@ static void llvm_middle_end_run( struct draw_pt_middle_end *middle, { struct llvm_middle_end *fpme = (struct llvm_middle_end *)middle; struct draw_context *draw = fpme->draw; - struct draw_vertex_shader *vshader = draw->vs.vertex_shader; - struct draw_geometry_shader *gshader = draw->gs.geometry_shader; unsigned opt = fpme->opt; unsigned alloc_count = align( fetch_count, 4 ); @@ -182,35 +180,13 @@ static void llvm_middle_end_run( struct draw_pt_middle_end *middle, return; } - /* Fetch into our vertex buffer - */ - draw_pt_fetch_run( fpme->fetch, - fetch_elts, - fetch_count, - (char *)pipeline_verts ); - - /* Run the shader, note that this overwrites the data[] parts of - * the pipeline verts. If there is no shader, eg if - * bypass_vs_clip_and_viewport, then the inputs == outputs, and are - * already in the correct place.*/ - if (opt & PT_SHADE) - { - vshader->run_linear(vshader, - (const float (*)[4])pipeline_verts->data, - ( float (*)[4])pipeline_verts->data, - draw->pt.user.vs_constants, - fetch_count, - fpme->vertex_size, - fpme->vertex_size); - if (gshader) - draw_geometry_shader_run(gshader, - (const float (*)[4])pipeline_verts->data, - ( float (*)[4])pipeline_verts->data, - draw->pt.user.gs_constants, - fetch_count, - fpme->vertex_size, - fpme->vertex_size); - } + fpme->current_variant->jit_func_elts( &fpme->llvm->jit_context, + pipeline_verts, + (const char **)draw->pt.user.vbuffer, + fetch_elts, + fetch_count, + fpme->vertex_size, + draw->pt.vertex_buffer ); if (draw_pt_post_vs_run( fpme->post_vs, pipeline_verts, @@ -373,7 +349,31 @@ static void llvm_middle_end_finish( struct draw_pt_middle_end *middle ) static void llvm_middle_end_destroy( struct draw_pt_middle_end *middle ) { struct llvm_middle_end *fpme = (struct llvm_middle_end *)middle; + struct draw_context *draw = fpme->draw; + struct draw_llvm_variant *variant = NULL; + variant = fpme->variants; + while(variant) { + struct draw_llvm_variant *next = variant->next; + + if (variant->function_elts) { + if (variant->function_elts) + LLVMFreeMachineCodeForFunction(draw->engine, + variant->function_elts); + LLVMDeleteFunction(variant->function_elts); + } + + if (variant->function) { + if (variant->function) + LLVMFreeMachineCodeForFunction(draw->engine, + variant->function); + LLVMDeleteFunction(variant->function); + } + + FREE(variant); + + variant = next; + } if (fpme->fetch) draw_pt_fetch_destroy( fpme->fetch ); diff --git a/src/gallium/auxiliary/draw/draw_vs.c b/src/gallium/auxiliary/draw/draw_vs.c index cfd51540241..c2832eefa2a 100644 --- a/src/gallium/auxiliary/draw/draw_vs.c +++ b/src/gallium/auxiliary/draw/draw_vs.c @@ -46,7 +46,7 @@ #include "tgsi/tgsi_dump.h" #include "tgsi/tgsi_exec.h" - +DEBUG_GET_ONCE_BOOL_OPTION(gallium_dump_vs, "GALLIUM_DUMP_VS", FALSE) void draw_vs_set_constants(struct draw_context *draw, @@ -157,7 +157,7 @@ draw_delete_vertex_shader(struct draw_context *draw, boolean draw_vs_init( struct draw_context *draw ) { - draw->dump_vs = debug_get_bool_option("GALLIUM_DUMP_VS", FALSE); + draw->dump_vs = debug_get_option_gallium_dump_vs(); draw->vs.machine = tgsi_exec_machine_create(); if (!draw->vs.machine) diff --git a/src/gallium/auxiliary/draw/draw_vs.h b/src/gallium/auxiliary/draw/draw_vs.h index f49332352b0..6c7e94db433 100644 --- a/src/gallium/auxiliary/draw/draw_vs.h +++ b/src/gallium/auxiliary/draw/draw_vs.h @@ -80,7 +80,8 @@ struct draw_vs_varient { void (*set_buffer)( struct draw_vs_varient *, unsigned i, const void *ptr, - unsigned stride ); + unsigned stride, + unsigned max_stride ); void (PIPE_CDECL *run_linear)( struct draw_vs_varient *shader, unsigned start, @@ -168,8 +169,9 @@ draw_create_vs_ppc(struct draw_context *draw, struct draw_vs_varient_key; struct draw_vertex_shader; -struct draw_vs_varient *draw_vs_varient_aos_sse( struct draw_vertex_shader *vs, - const struct draw_vs_varient_key *key ); +struct draw_vs_varient * +draw_vs_create_varient_aos_sse( struct draw_vertex_shader *vs, + const struct draw_vs_varient_key *key ); @@ -187,8 +189,9 @@ struct translate *draw_vs_get_fetch( struct draw_context *draw, struct translate *draw_vs_get_emit( struct draw_context *draw, struct translate_key *key ); -struct draw_vs_varient *draw_vs_varient_generic( struct draw_vertex_shader *vs, - const struct draw_vs_varient_key *key ); +struct draw_vs_varient * +draw_vs_create_varient_generic( struct draw_vertex_shader *vs, + const struct draw_vs_varient_key *key ); diff --git a/src/gallium/auxiliary/draw/draw_vs_aos.c b/src/gallium/auxiliary/draw/draw_vs_aos.c index e7121f36541..19f49e34c8b 100644 --- a/src/gallium/auxiliary/draw/draw_vs_aos.c +++ b/src/gallium/auxiliary/draw/draw_vs_aos.c @@ -2089,13 +2089,21 @@ static boolean build_vertex_program( struct draw_vs_varient_aos_sse *varient, } +/** cast wrapper */ +static INLINE struct draw_vs_varient_aos_sse * +draw_vs_varient_aos_sse(struct draw_vs_varient *varient) +{ + return (struct draw_vs_varient_aos_sse *) varient; +} + static void vaos_set_buffer( struct draw_vs_varient *varient, unsigned buf, const void *ptr, - unsigned stride ) + unsigned stride, + unsigned max_stride) { - struct draw_vs_varient_aos_sse *vaos = (struct draw_vs_varient_aos_sse *)varient; + struct draw_vs_varient_aos_sse *vaos = draw_vs_varient_aos_sse(varient); if (buf < vaos->nr_vb) { vaos->buffer[buf].base_ptr = (char *)ptr; @@ -2112,7 +2120,7 @@ static void PIPE_CDECL vaos_run_elts( struct draw_vs_varient *varient, unsigned count, void *output_buffer ) { - struct draw_vs_varient_aos_sse *vaos = (struct draw_vs_varient_aos_sse *)varient; + struct draw_vs_varient_aos_sse *vaos = draw_vs_varient_aos_sse(varient); struct aos_machine *machine = vaos->draw->vs.aos_machine; unsigned i; @@ -2136,7 +2144,7 @@ static void PIPE_CDECL vaos_run_linear( struct draw_vs_varient *varient, unsigned count, void *output_buffer ) { - struct draw_vs_varient_aos_sse *vaos = (struct draw_vs_varient_aos_sse *)varient; + struct draw_vs_varient_aos_sse *vaos = draw_vs_varient_aos_sse(varient); struct aos_machine *machine = vaos->draw->vs.aos_machine; unsigned i; @@ -2165,7 +2173,7 @@ static void PIPE_CDECL vaos_run_linear( struct draw_vs_varient *varient, static void vaos_destroy( struct draw_vs_varient *varient ) { - struct draw_vs_varient_aos_sse *vaos = (struct draw_vs_varient_aos_sse *)varient; + struct draw_vs_varient_aos_sse *vaos = draw_vs_varient_aos_sse(varient); FREE( vaos->buffer ); @@ -2241,13 +2249,14 @@ static struct draw_vs_varient *varient_aos_sse( struct draw_vertex_shader *vs, } -struct draw_vs_varient *draw_vs_varient_aos_sse( struct draw_vertex_shader *vs, - const struct draw_vs_varient_key *key ) +struct draw_vs_varient * +draw_vs_create_varient_aos_sse( struct draw_vertex_shader *vs, + const struct draw_vs_varient_key *key ) { struct draw_vs_varient *varient = varient_aos_sse( vs, key ); if (varient == NULL) { - varient = draw_vs_varient_generic( vs, key ); + varient = draw_vs_create_varient_generic( vs, key ); } return varient; diff --git a/src/gallium/auxiliary/draw/draw_vs_exec.c b/src/gallium/auxiliary/draw/draw_vs_exec.c index 7deca2b69d9..bc34d390dae 100644 --- a/src/gallium/auxiliary/draw/draw_vs_exec.c +++ b/src/gallium/auxiliary/draw/draw_vs_exec.c @@ -203,7 +203,7 @@ draw_create_vs_exec(struct draw_context *draw, vs->base.prepare = vs_exec_prepare; vs->base.run_linear = vs_exec_run_linear; vs->base.delete = vs_exec_delete; - vs->base.create_varient = draw_vs_varient_generic; + vs->base.create_varient = draw_vs_create_varient_generic; vs->machine = draw->vs.machine; return &vs->base; diff --git a/src/gallium/auxiliary/draw/draw_vs_ppc.c b/src/gallium/auxiliary/draw/draw_vs_ppc.c index d869eecec5e..5df84916c51 100644 --- a/src/gallium/auxiliary/draw/draw_vs_ppc.c +++ b/src/gallium/auxiliary/draw/draw_vs_ppc.c @@ -125,7 +125,7 @@ vs_ppc_run_linear( struct draw_vertex_shader *base, */ shader->func(inputs_soa, outputs_soa, temps_soa, (float (*)[4]) shader->base.immediates, - (const float (*)[4])constants[0], + (float (*)[4])constants[0], ppc_builtin_constants); /* convert (up to) four output verts from SoA back to AoS format */ @@ -190,7 +190,7 @@ draw_create_vs_ppc(struct draw_context *draw, vs->base.create_varient = draw_vs_varient_aos_ppc; else #endif - vs->base.create_varient = draw_vs_varient_generic; + vs->base.create_varient = draw_vs_create_varient_generic; vs->base.prepare = vs_ppc_prepare; vs->base.run_linear = vs_ppc_run_linear; vs->base.delete = vs_ppc_delete; diff --git a/src/gallium/auxiliary/draw/draw_vs_sse.c b/src/gallium/auxiliary/draw/draw_vs_sse.c index 54e6423388f..14c95082a9d 100644 --- a/src/gallium/auxiliary/draw/draw_vs_sse.c +++ b/src/gallium/auxiliary/draw/draw_vs_sse.c @@ -165,9 +165,9 @@ draw_create_vs_sse(struct draw_context *draw, vs->base.draw = draw; if (1) - vs->base.create_varient = draw_vs_varient_aos_sse; + vs->base.create_varient = draw_vs_create_varient_aos_sse; else - vs->base.create_varient = draw_vs_varient_generic; + vs->base.create_varient = draw_vs_create_varient_generic; vs->base.prepare = vs_sse_prepare; vs->base.run_linear = vs_sse_run_linear; vs->base.delete = vs_sse_delete; diff --git a/src/gallium/auxiliary/draw/draw_vs_varient.c b/src/gallium/auxiliary/draw/draw_vs_varient.c index 5ed706cb4ff..6eb26927f27 100644 --- a/src/gallium/auxiliary/draw/draw_vs_varient.c +++ b/src/gallium/auxiliary/draw/draw_vs_varient.c @@ -66,14 +66,16 @@ struct draw_vs_varient_generic { static void vsvg_set_buffer( struct draw_vs_varient *varient, unsigned buffer, const void *ptr, - unsigned stride ) + unsigned stride, + unsigned max_index ) { struct draw_vs_varient_generic *vsvg = (struct draw_vs_varient_generic *)varient; vsvg->fetch->set_buffer(vsvg->fetch, buffer, ptr, - stride); + stride, + max_index ); } @@ -172,12 +174,14 @@ static void PIPE_CDECL vsvg_run_elts( struct draw_vs_varient *varient, vsvg->emit->set_buffer( vsvg->emit, 0, temp_buffer, - temp_vertex_stride ); + temp_vertex_stride, + ~0 ); vsvg->emit->set_buffer( vsvg->emit, 1, &vsvg->draw->rasterizer->point_size, - 0); + 0, + ~0 ); vsvg->emit->run( vsvg->emit, 0, count, @@ -232,12 +236,14 @@ static void PIPE_CDECL vsvg_run_linear( struct draw_vs_varient *varient, vsvg->emit->set_buffer( vsvg->emit, 0, temp_buffer, - temp_vertex_stride ); + temp_vertex_stride, + ~0 ); vsvg->emit->set_buffer( vsvg->emit, 1, &vsvg->draw->rasterizer->point_size, - 0); + 0, + ~0 ); vsvg->emit->run( vsvg->emit, 0, count, @@ -257,8 +263,9 @@ static void vsvg_destroy( struct draw_vs_varient *varient ) } -struct draw_vs_varient *draw_vs_varient_generic( struct draw_vertex_shader *vs, - const struct draw_vs_varient_key *key ) +struct draw_vs_varient * +draw_vs_create_varient_generic( struct draw_vertex_shader *vs, + const struct draw_vs_varient_key *key ) { unsigned i; struct translate_key fetch, emit; diff --git a/src/gallium/auxiliary/gallivm/lp_bld_arit.c b/src/gallium/auxiliary/gallivm/lp_bld_arit.c index 8e8fcccf564..20ae958714b 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_arit.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_arit.c @@ -1210,6 +1210,14 @@ LLVMValueRef lp_build_cos(struct lp_build_context *bld, LLVMValueRef a) { +#ifdef PIPE_OS_WINDOWS + /* + * FIXME: X86 backend translates llvm.cos.v4f32 to 4 calls to CRT's cosf() + * which is neither efficient nor does the CRT linkage work on Windows + * causing segmentation fault. So simply disable the code for now. + */ + return bld->one; +#else const struct lp_type type = bld->type; LLVMTypeRef vec_type = lp_build_vec_type(type); char intrinsic[32]; @@ -1220,6 +1228,7 @@ lp_build_cos(struct lp_build_context *bld, util_snprintf(intrinsic, sizeof intrinsic, "llvm.cos.v%uf%u", type.length, type.width); return lp_build_intrinsic_unary(bld->builder, intrinsic, vec_type, a); +#endif } @@ -1230,6 +1239,14 @@ LLVMValueRef lp_build_sin(struct lp_build_context *bld, LLVMValueRef a) { +#ifdef PIPE_OS_WINDOWS + /* + * FIXME: X86 backend translates llvm.sin.v4f32 to 4 calls to CRT's sinf() + * which is neither efficient nor does the CRT linkage work on Windows + * causing segmentation fault. So simply disable the code for now. + */ + return bld->zero; +#else const struct lp_type type = bld->type; LLVMTypeRef vec_type = lp_build_vec_type(type); char intrinsic[32]; @@ -1240,6 +1257,7 @@ lp_build_sin(struct lp_build_context *bld, util_snprintf(intrinsic, sizeof intrinsic, "llvm.sin.v%uf%u", type.length, type.width); return lp_build_intrinsic_unary(bld->builder, intrinsic, vec_type, a); +#endif } @@ -1502,8 +1520,10 @@ lp_build_log2_approx(struct lp_build_context *bld, res = LLVMBuildAdd(bld->builder, logmant, logexp, ""); } - if(p_exp) + if(p_exp) { + exp = LLVMBuildBitCast(bld->builder, exp, vec_type, ""); *p_exp = exp; + } if(p_floor_log2) *p_floor_log2 = logexp; @@ -1573,8 +1593,10 @@ lp_build_float_log2_approx(struct lp_build_context *bld, res = LLVMBuildAdd(bld->builder, logmant, logexp, ""); } - if(p_exp) + if(p_exp) { + exp = LLVMBuildBitCast(bld->builder, exp, float_type, ""); *p_exp = exp; + } if(p_floor_log2) *p_floor_log2 = logexp; diff --git a/src/gallium/auxiliary/gallivm/lp_bld_flow.c b/src/gallium/auxiliary/gallivm/lp_bld_flow.c index e60ab4f6ba1..8f15b1d287d 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_flow.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_flow.c @@ -792,3 +792,78 @@ lp_build_endif(struct lp_build_if_state *ctx) /* Resume building code at end of the ifthen->merge_block */ LLVMPositionBuilderAtEnd(ctx->builder, ifthen->merge_block); } + + +/** + * Allocate a scalar (or vector) variable. + * + * Although not strictly part of control flow, control flow has deep impact in + * how variables should be allocated. + * + * The mem2reg optimization pass is the recommended way to dealing with mutable + * variables, and SSA. It looks for allocas and if it can handle them, it + * promotes them, but only looks for alloca instructions in the entry block of + * the function. Being in the entry block guarantees that the alloca is only + * executed once, which makes analysis simpler. + * + * See also: + * - http://www.llvm.org/docs/tutorial/OCamlLangImpl7.html#memory + */ +LLVMValueRef +lp_build_alloca(LLVMBuilderRef builder, + LLVMTypeRef type, + const char *name) +{ + LLVMBasicBlockRef current_block = LLVMGetInsertBlock(builder); + LLVMValueRef function = LLVMGetBasicBlockParent(current_block); + LLVMBasicBlockRef first_block = LLVMGetEntryBasicBlock(function); + LLVMValueRef first_instr = LLVMGetFirstInstruction(first_block); + LLVMBuilderRef first_builder = LLVMCreateBuilder(); + LLVMValueRef res; + + LLVMPositionBuilderAtEnd(first_builder, first_block); + LLVMPositionBuilderBefore(first_builder, first_instr); + + res = LLVMBuildAlloca(first_builder, type, name); + + LLVMDisposeBuilder(first_builder); + + return res; +} + + +/** + * Allocate an array of scalars/vectors. + * + * mem2reg pass is not capable of promoting structs or arrays to registers, but + * we still put it in the first block anyway as failure to put allocas in the + * first block may prevent the X86 backend from successfully align the stack as + * required. + * + * Also the scalarrepl pass is supossedly more powerful and can promote + * arrays in many cases. + * + * See also: + * - http://www.llvm.org/docs/tutorial/OCamlLangImpl7.html#memory + */ +LLVMValueRef +lp_build_array_alloca(LLVMBuilderRef builder, + LLVMTypeRef type, + LLVMValueRef count, + const char *name) +{ + LLVMBasicBlockRef current_block = LLVMGetInsertBlock(builder); + LLVMValueRef function = LLVMGetBasicBlockParent(current_block); + LLVMBasicBlockRef first_block = LLVMGetEntryBasicBlock(function); + LLVMValueRef first_instr = LLVMGetFirstInstruction(first_block); + LLVMBuilderRef first_builder = LLVMCreateBuilder(); + LLVMValueRef res; + + LLVMPositionBuilderBefore(first_builder, first_instr); + + res = LLVMBuildArrayAlloca(first_builder, type, count, name); + + LLVMDisposeBuilder(first_builder); + + return res; +} diff --git a/src/gallium/auxiliary/gallivm/lp_bld_flow.h b/src/gallium/auxiliary/gallivm/lp_bld_flow.h index 745838570c8..fffb493a93b 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_flow.h +++ b/src/gallium/auxiliary/gallivm/lp_bld_flow.h @@ -156,5 +156,15 @@ lp_build_endif(struct lp_build_if_state *ctx); LLVMBasicBlockRef lp_build_insert_new_block(LLVMBuilderRef builder, const char *name); +LLVMValueRef +lp_build_alloca(LLVMBuilderRef builder, + LLVMTypeRef type, + const char *name); + +LLVMValueRef +lp_build_array_alloca(LLVMBuilderRef builder, + LLVMTypeRef type, + LLVMValueRef count, + const char *name); #endif /* !LP_BLD_FLOW_H */ diff --git a/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c b/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c index a5a019fa92a..6257e9a4047 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c @@ -40,6 +40,7 @@ #include "lp_bld_init.h" #include "lp_bld_type.h" +#include "lp_bld_flow.h" #include "lp_bld_format.h" @@ -370,11 +371,7 @@ lp_build_fetch_rgba_aos(LLVMBuilderRef builder, LLVMAddGlobalMapping(lp_build_engine, function, format_desc->fetch_rgba_float); } - /* - * XXX: this should better go to the first block in the function - */ - - tmp = LLVMBuildAlloca(builder, LLVMVectorType(LLVMFloatType(), 4), ""); + tmp = lp_build_alloca(builder, LLVMVectorType(LLVMFloatType(), 4), ""); /* * Invoke format_desc->fetch_rgba_float() for each pixel and insert the result diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c index de07c222a39..5067d0a164f 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_init.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c @@ -27,6 +27,7 @@ #include "pipe/p_compiler.h" +#include "util/u_cpu_detect.h" #include "util/u_debug.h" #include "lp_bld_init.h" @@ -62,6 +63,15 @@ lp_build_init(void) if (!lp_build_target) lp_build_target = LLVMGetExecutionEngineTargetData(lp_build_engine); + + util_cpu_detect(); + +#if 0 + /* For simulating less capable machines */ + util_cpu_caps.has_sse3 = 0; + util_cpu_caps.has_ssse3 = 0; + util_cpu_caps.has_sse4_1 = 0; +#endif } diff --git a/src/gallium/auxiliary/gallivm/lp_bld_logic.c b/src/gallium/auxiliary/gallivm/lp_bld_logic.c index a3b69701162..d13fa1a5d04 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_logic.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_logic.c @@ -472,18 +472,6 @@ lp_build_select_aos(struct lp_build_context *bld, } } -LLVMValueRef -lp_build_alloca(struct lp_build_context *bld) -{ - const struct lp_type type = bld->type; - - if (type.length > 1) { /*vector*/ - return LLVMBuildAlloca(bld->builder, lp_build_vec_type(type), ""); - } else { /*scalar*/ - return LLVMBuildAlloca(bld->builder, lp_build_elem_type(type), ""); - } -} - /** Return (a & ~b) */ LLVMValueRef diff --git a/src/gallium/auxiliary/gallivm/lp_bld_logic.h b/src/gallium/auxiliary/gallivm/lp_bld_logic.h index 00a8c750196..29f9fc3b205 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_logic.h +++ b/src/gallium/auxiliary/gallivm/lp_bld_logic.h @@ -76,9 +76,6 @@ lp_build_select_aos(struct lp_build_context *bld, LLVMValueRef b, const boolean cond[4]); -LLVMValueRef -lp_build_alloca(struct lp_build_context *bld); - LLVMValueRef lp_build_andc(struct lp_build_context *bld, LLVMValueRef a, LLVMValueRef b); diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample.c b/src/gallium/auxiliary/gallivm/lp_bld_sample.c index eb75b9b393d..195a4953ab1 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_sample.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_sample.c @@ -77,6 +77,11 @@ lp_sampler_static_state(struct lp_sampler_static_state *state, */ state->format = view->format; + state->swizzle_r = view->swizzle_r; + state->swizzle_g = view->swizzle_g; + state->swizzle_b = view->swizzle_b; + state->swizzle_a = view->swizzle_a; + state->target = texture->target; state->pot_width = util_is_pot(texture->width0); state->pot_height = util_is_pot(texture->height0); @@ -181,54 +186,16 @@ lp_build_sample_offset(struct lp_build_context *bld, LLVMValueRef offset; x_stride = lp_build_const_vec(bld->type, format_desc->block.bits/8); + offset = lp_build_mul(bld, x, x_stride); - if(format_desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS) { - LLVMValueRef x_lo, x_hi; - LLVMValueRef y_lo, y_hi; - LLVMValueRef x_stride_lo, x_stride_hi; - LLVMValueRef y_stride_lo, y_stride_hi; - LLVMValueRef x_offset_lo, x_offset_hi; - LLVMValueRef y_offset_lo, y_offset_hi; - LLVMValueRef offset_lo, offset_hi; - - /* XXX 1D & 3D addressing not done yet */ - assert(!z); - assert(!z_stride); - - x_lo = LLVMBuildAnd(bld->builder, x, bld->one, ""); - y_lo = LLVMBuildAnd(bld->builder, y, bld->one, ""); - - x_hi = LLVMBuildLShr(bld->builder, x, bld->one, ""); - y_hi = LLVMBuildLShr(bld->builder, y, bld->one, ""); - - x_stride_lo = x_stride; - y_stride_lo = lp_build_const_vec(bld->type, 2*format_desc->block.bits/8); - - x_stride_hi = lp_build_const_vec(bld->type, 4*format_desc->block.bits/8); - y_stride_hi = LLVMBuildShl(bld->builder, y_stride, bld->one, ""); - - x_offset_lo = lp_build_mul(bld, x_lo, x_stride_lo); - y_offset_lo = lp_build_mul(bld, y_lo, y_stride_lo); - offset_lo = lp_build_add(bld, x_offset_lo, y_offset_lo); - - x_offset_hi = lp_build_mul(bld, x_hi, x_stride_hi); - y_offset_hi = lp_build_mul(bld, y_hi, y_stride_hi); - offset_hi = lp_build_add(bld, x_offset_hi, y_offset_hi); - - offset = lp_build_add(bld, offset_hi, offset_lo); + if (y && y_stride) { + LLVMValueRef y_offset = lp_build_mul(bld, y, y_stride); + offset = lp_build_add(bld, offset, y_offset); } - else { - offset = lp_build_mul(bld, x, x_stride); - - if (y && y_stride) { - LLVMValueRef y_offset = lp_build_mul(bld, y, y_stride); - offset = lp_build_add(bld, offset, y_offset); - } - - if (z && z_stride) { - LLVMValueRef z_offset = lp_build_mul(bld, z, z_stride); - offset = lp_build_add(bld, offset, z_offset); - } + + if (z && z_stride) { + LLVMValueRef z_offset = lp_build_mul(bld, z, z_stride); + offset = lp_build_add(bld, offset, z_offset); } return offset; diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample.h b/src/gallium/auxiliary/gallivm/lp_bld_sample.h index e2873763857..8ceb20473d5 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_sample.h +++ b/src/gallium/auxiliary/gallivm/lp_bld_sample.h @@ -54,8 +54,14 @@ struct lp_build_context; */ struct lp_sampler_static_state { - /* pipe_texture's state */ + /* pipe_sampler_view's state */ enum pipe_format format; + unsigned swizzle_r:3; + unsigned swizzle_g:3; + unsigned swizzle_b:3; + unsigned swizzle_a:3; + + /* pipe_texture's state */ unsigned target:3; unsigned pot_width:1; unsigned pot_height:1; diff --git a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c index c9b613e21c8..54c0ad7ce43 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c @@ -185,6 +185,53 @@ texture_dims(enum pipe_texture_target tex) } +static LLVMValueRef +lp_build_swizzle_chan_soa(struct lp_type type, + const LLVMValueRef *unswizzled, + enum util_format_swizzle swizzle) +{ + switch (swizzle) { + case PIPE_SWIZZLE_RED: + case PIPE_SWIZZLE_GREEN: + case PIPE_SWIZZLE_BLUE: + case PIPE_SWIZZLE_ALPHA: + return unswizzled[swizzle]; + case PIPE_SWIZZLE_ZERO: + return lp_build_zero(type); + case PIPE_SWIZZLE_ONE: + return lp_build_one(type); + default: + assert(0); + return lp_build_undef(type); + } +} + + +static void +lp_build_swizzle_soa(struct lp_build_sample_context *bld, + LLVMValueRef *texel) +{ + LLVMValueRef unswizzled[4]; + unsigned char swizzles[4]; + unsigned chan; + + for (chan = 0; chan < 4; ++chan) { + unswizzled[chan] = texel[chan]; + } + + swizzles[0] = bld->static_state->swizzle_r; + swizzles[1] = bld->static_state->swizzle_g; + swizzles[2] = bld->static_state->swizzle_b; + swizzles[3] = bld->static_state->swizzle_a; + + for (chan = 0; chan < 4; ++chan) { + unsigned swizzle = swizzles[chan]; + texel[chan] = lp_build_swizzle_chan_soa(bld->texel_type, + unswizzled, swizzle); + } +} + + /** * Generate code to fetch a texel from a texture at int coords (x, y, z). @@ -278,6 +325,18 @@ lp_build_sample_texel_soa(struct lp_build_sample_context *bld, bld->format_desc, x, y, z, y_stride, z_stride); + if (use_border) { + /* If we can sample the border color, it means that texcoords may + * lie outside the bounds of the texture image. We need to do + * something to prevent reading out of bounds and causing a segfault. + * + * Simply AND the texture coords with !use_border. This will cause + * coords which are out of bounds to become zero. Zero's guaranteed + * to be inside the texture image. + */ + offset = lp_build_andc(&bld->uint_coord_bld, offset, use_border); + } + lp_build_fetch_rgba_soa(bld->builder, bld->format_desc, bld->texel_type, @@ -285,6 +344,8 @@ lp_build_sample_texel_soa(struct lp_build_sample_context *bld, i, j, texel); + lp_build_swizzle_soa(bld, texel); + /* * Note: if we find an app which frequently samples the texture border * we might want to implement a true conditional here to avoid sampling @@ -842,6 +903,7 @@ lp_build_minify(struct lp_build_sample_context *bld, * \param s vector of texcoord s values * \param t vector of texcoord t values * \param r vector of texcoord r values + * \param shader_lod_bias vector float with the shader lod bias, * \param width scalar int texture width * \param height scalar int texture height * \param depth scalar int texture depth @@ -851,6 +913,7 @@ lp_build_lod_selector(struct lp_build_sample_context *bld, LLVMValueRef s, LLVMValueRef t, LLVMValueRef r, + LLVMValueRef shader_lod_bias, LLVMValueRef width, LLVMValueRef height, LLVMValueRef depth) @@ -865,8 +928,8 @@ lp_build_lod_selector(struct lp_build_sample_context *bld, else { const int dims = texture_dims(bld->static_state->target); struct lp_build_context *float_bld = &bld->float_bld; - LLVMValueRef lod_bias = LLVMConstReal(LLVMFloatType(), - bld->static_state->lod_bias); + LLVMValueRef sampler_lod_bias = LLVMConstReal(LLVMFloatType(), + bld->static_state->lod_bias); LLVMValueRef min_lod = LLVMConstReal(LLVMFloatType(), bld->static_state->min_lod); LLVMValueRef max_lod = LLVMConstReal(LLVMFloatType(), @@ -940,8 +1003,14 @@ lp_build_lod_selector(struct lp_build_sample_context *bld, /* compute lod = log2(rho) */ lod = lp_build_log2(float_bld, rho); - /* add lod bias */ - lod = LLVMBuildAdd(bld->builder, lod, lod_bias, "LOD bias"); + /* add sampler lod bias */ + lod = LLVMBuildAdd(bld->builder, lod, sampler_lod_bias, "sampler LOD bias"); + + /* add shader lod bias */ + /* XXX for now we take only the first element since our lod is scalar */ + shader_lod_bias = LLVMBuildExtractElement(bld->builder, shader_lod_bias, + LLVMConstInt(LLVMInt32Type(), 0, 0), ""); + lod = LLVMBuildAdd(bld->builder, lod, shader_lod_bias, "shader LOD bias"); /* clamp lod */ lod = lp_build_clamp(float_bld, lod, min_lod, max_lod); @@ -1527,6 +1596,7 @@ lp_build_sample_general(struct lp_build_sample_context *bld, LLVMValueRef s, LLVMValueRef t, LLVMValueRef r, + LLVMValueRef lodbias, LLVMValueRef width, LLVMValueRef height, LLVMValueRef depth, @@ -1564,7 +1634,7 @@ lp_build_sample_general(struct lp_build_sample_context *bld, /* Need to compute lod either to choose mipmap levels or to * distinguish between minification/magnification with one mipmap level. */ - lod = lp_build_lod_selector(bld, s, t, r, width, height, depth); + lod = lp_build_lod_selector(bld, s, t, r, lodbias, width, height, depth); } /* @@ -1772,6 +1842,11 @@ lp_build_sample_2d_linear_aos(struct lp_build_sample_context *bld, LLVMValueRef unswizzled[4]; LLVMValueRef stride; + assert(bld->static_state->target == PIPE_TEXTURE_2D); + assert(bld->static_state->min_img_filter == PIPE_TEX_FILTER_LINEAR); + assert(bld->static_state->mag_img_filter == PIPE_TEX_FILTER_LINEAR); + assert(bld->static_state->min_mip_filter == PIPE_TEX_MIPFILTER_NONE); + lp_build_context_init(&i32, builder, lp_type_int_vec(32)); lp_build_context_init(&h16, builder, lp_type_ufixed(16)); lp_build_context_init(&u8n, builder, lp_type_unorm(8)); @@ -1945,6 +2020,8 @@ lp_build_sample_2d_linear_aos(struct lp_build_sample_context *bld, lp_build_format_swizzle_soa(bld->format_desc, bld->texel_type, unswizzled, texel); + + lp_build_swizzle_soa(bld, texel); } @@ -1984,6 +2061,24 @@ lp_build_sample_compare(struct lp_build_sample_context *bld, /** + * Just set texels to white instead of actually sampling the texture. + * For debugging. + */ +static void +lp_build_sample_nop(struct lp_build_sample_context *bld, + LLVMValueRef *texel) +{ + struct lp_build_context *texel_bld = &bld->texel_bld; + unsigned chan; + + for (chan = 0; chan < 4; chan++) { + /*lp_bld_mov(texel_bld, texel, texel_bld->one);*/ + texel[chan] = texel_bld->one; + } +} + + +/** * Build texture sampling code. * 'texel' will return a vector of four LLVMValueRefs corresponding to * R, G, B, A. @@ -2048,19 +2143,23 @@ lp_build_sample_soa(LLVMBuilderRef builder, height_vec = lp_build_broadcast_scalar(&bld.uint_coord_bld, height); depth_vec = lp_build_broadcast_scalar(&bld.uint_coord_bld, depth); - if (util_format_is_rgba8_variant(bld.format_desc) && - static_state->target == PIPE_TEXTURE_2D && - static_state->min_img_filter == PIPE_TEX_FILTER_LINEAR && - static_state->mag_img_filter == PIPE_TEX_FILTER_LINEAR && - static_state->min_mip_filter == PIPE_TEX_MIPFILTER_NONE && - is_simple_wrap_mode(static_state->wrap_s) && - is_simple_wrap_mode(static_state->wrap_t)) { + if (0) { + /* For debug: no-op texture sampling */ + lp_build_sample_nop(&bld, texel); + } + else if (util_format_is_rgba8_variant(bld.format_desc) && + static_state->target == PIPE_TEXTURE_2D && + static_state->min_img_filter == PIPE_TEX_FILTER_LINEAR && + static_state->mag_img_filter == PIPE_TEX_FILTER_LINEAR && + static_state->min_mip_filter == PIPE_TEX_MIPFILTER_NONE && + is_simple_wrap_mode(static_state->wrap_s) && + is_simple_wrap_mode(static_state->wrap_t)) { /* special case */ lp_build_sample_2d_linear_aos(&bld, s, t, width_vec, height_vec, row_stride_array, data_array, texel); } else { - lp_build_sample_general(&bld, unit, s, t, r, + lp_build_sample_general(&bld, unit, s, t, r, lodbias, width, height, depth, width_vec, height_vec, depth_vec, row_stride_array, img_stride_array, diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h b/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h index 63b938bfa98..2eac5da6c69 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h +++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h @@ -39,6 +39,7 @@ struct tgsi_token; +struct tgsi_shader_info; struct lp_type; struct lp_build_context; struct lp_build_mask_context; @@ -78,7 +79,8 @@ lp_build_tgsi_soa(LLVMBuilderRef builder, const LLVMValueRef *pos, const LLVMValueRef (*inputs)[4], LLVMValueRef (*outputs)[4], - struct lp_build_sampler_soa *sampler); + struct lp_build_sampler_soa *sampler, + struct tgsi_shader_info *info); #endif /* LP_BLD_TGSI_H */ diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c index 44f8aec1bf0..d3c769e28b8 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c @@ -46,6 +46,7 @@ #include "tgsi/tgsi_parse.h" #include "tgsi/tgsi_util.h" #include "tgsi/tgsi_exec.h" +#include "tgsi/tgsi_scan.h" #include "lp_bld_type.h" #include "lp_bld_const.h" #include "lp_bld_arit.h" @@ -125,6 +126,12 @@ struct lp_build_tgsi_soa_context LLVMValueRef immediates[LP_MAX_IMMEDIATES][NUM_CHANNELS]; LLVMValueRef temps[LP_MAX_TEMPS][NUM_CHANNELS]; + LLVMValueRef addr[LP_MAX_TEMPS][NUM_CHANNELS]; + + /* we allocate an array of temps if we have indirect + * addressing and then the temps above is unused */ + LLVMValueRef temps_array; + boolean has_indirect_addressing; struct lp_build_mask_context *mask; struct lp_exec_mask exec_mask; @@ -169,8 +176,7 @@ static void lp_exec_mask_init(struct lp_exec_mask *mask, struct lp_build_context static void lp_exec_mask_update(struct lp_exec_mask *mask) { if (mask->loop_stack_size) { - /*for loops we need to update the entire mask at - * runtime */ + /*for loops we need to update the entire mask at runtime */ LLVMValueRef tmp; assert(mask->break_mask); tmp = LLVMBuildAnd(mask->bld->builder, @@ -232,6 +238,9 @@ static void lp_exec_bgnloop(struct lp_exec_mask *mask) mask->break_mask = LLVMConstAllOnes(mask->int_vec_type); if (mask->cond_stack_size == 0) mask->cond_mask = LLVMConstAllOnes(mask->int_vec_type); + + mask->break_stack[mask->break_stack_size++] = mask->break_mask; + mask->cont_stack[mask->cont_stack_size++] = mask->cont_mask; mask->loop_stack[mask->loop_stack_size++] = mask->loop_block; mask->loop_block = lp_build_insert_new_block(mask->bld->builder, "bgnloop"); LLVMBuildBr(mask->bld->builder, mask->loop_block); @@ -246,7 +255,10 @@ static void lp_exec_break(struct lp_exec_mask *mask) mask->exec_mask, "break"); - mask->break_stack[mask->break_stack_size++] = mask->break_mask; + /* mask->break_stack_size > 1 implies that we encountered a break + * statemant already and if that's the case we want to make sure + * our mask is a combination of the previous break and the current + * execution mask */ if (mask->break_stack_size > 1) { mask->break_mask = LLVMBuildAnd(mask->bld->builder, mask->break_mask, @@ -263,7 +275,6 @@ static void lp_exec_continue(struct lp_exec_mask *mask) mask->exec_mask, ""); - mask->cont_stack[mask->cont_stack_size++] = mask->cont_mask; if (mask->cont_stack_size > 1) { mask->cont_mask = LLVMBuildAnd(mask->bld->builder, mask->cont_mask, @@ -299,17 +310,23 @@ static void lp_exec_endloop(struct lp_exec_mask *mask) LLVMPositionBuilderAtEnd(mask->bld->builder, endloop); mask->loop_block = mask->loop_stack[--mask->loop_stack_size]; - /* pop the break mask */ + /* pop the cont mask */ if (mask->cont_stack_size) { mask->cont_mask = mask->cont_stack[--mask->cont_stack_size]; } + /* pop the break mask */ if (mask->break_stack_size) { - mask->break_mask = mask->cont_stack[--mask->break_stack_size]; + mask->break_mask = mask->break_stack[--mask->break_stack_size]; } lp_exec_mask_update(mask); } +/* stores val into an address pointed to by dst. + * mask->exec_mask is used to figure out which bits of val + * should be stored into the address + * (0 means don't store this bit, 1 means do store). + */ static void lp_exec_mask_store(struct lp_exec_mask *mask, LLVMValueRef val, LLVMValueRef dst) @@ -347,6 +364,23 @@ emit_ddy(struct lp_build_tgsi_soa_context *bld, return lp_build_sub(&bld->base, src_top, src_bottom); } +static LLVMValueRef +get_temp_ptr(struct lp_build_tgsi_soa_context *bld, + unsigned index, + unsigned swizzle, + boolean is_indirect, + LLVMValueRef addr) +{ + if (!bld->has_indirect_addressing) { + return bld->temps[index][swizzle]; + } else { + LLVMValueRef lindex = + LLVMConstInt(LLVMInt32Type(), index*4 + swizzle, 0); + if (is_indirect) + lindex = lp_build_add(&bld->base, lindex, addr); + return LLVMBuildGEP(bld->base.builder, bld->temps_array, &lindex, 1, ""); + } +} /** * Register fetch. @@ -361,6 +395,7 @@ emit_fetch( const struct tgsi_full_src_register *reg = &inst->Src[index]; unsigned swizzle = tgsi_util_get_full_src_register_swizzle( reg, chan_index ); LLVMValueRef res; + LLVMValueRef addr; switch (swizzle) { case TGSI_SWIZZLE_X: @@ -368,11 +403,34 @@ emit_fetch( case TGSI_SWIZZLE_Z: case TGSI_SWIZZLE_W: + if (reg->Register.Indirect) { + LLVMTypeRef int_vec_type = lp_build_int_vec_type(bld->base.type); + unsigned swizzle = tgsi_util_get_src_register_swizzle( ®->Indirect, chan_index ); + addr = LLVMBuildLoad(bld->base.builder, + bld->addr[reg->Indirect.Index][swizzle], + ""); + /* for indexing we want integers */ + addr = LLVMBuildFPToSI(bld->base.builder, addr, + int_vec_type, ""); + addr = LLVMBuildExtractElement(bld->base.builder, + addr, LLVMConstInt(LLVMInt32Type(), 0, 0), + ""); + addr = lp_build_mul(&bld->base, addr, LLVMConstInt(LLVMInt32Type(), 4, 0)); + } + switch (reg->Register.File) { case TGSI_FILE_CONSTANT: { LLVMValueRef index = LLVMConstInt(LLVMInt32Type(), reg->Register.Index*4 + swizzle, 0); - LLVMValueRef scalar_ptr = LLVMBuildGEP(bld->base.builder, bld->consts_ptr, &index, 1, ""); - LLVMValueRef scalar = LLVMBuildLoad(bld->base.builder, scalar_ptr, ""); + LLVMValueRef scalar, scalar_ptr; + + if (reg->Register.Indirect) { + /*lp_build_printf(bld->base.builder, + "\taddr = %d\n", addr);*/ + index = lp_build_add(&bld->base, index, addr); + } + scalar_ptr = LLVMBuildGEP(bld->base.builder, bld->consts_ptr, &index, 1, ""); + scalar = LLVMBuildLoad(bld->base.builder, scalar_ptr, ""); + res = lp_build_broadcast_scalar(&bld->base, scalar); break; } @@ -387,11 +445,16 @@ emit_fetch( assert(res); break; - case TGSI_FILE_TEMPORARY: - res = LLVMBuildLoad(bld->base.builder, bld->temps[reg->Register.Index][swizzle], ""); + case TGSI_FILE_TEMPORARY: { + LLVMValueRef temp_ptr = get_temp_ptr(bld, reg->Register.Index, + swizzle, + reg->Register.Indirect, + addr); + res = LLVMBuildLoad(bld->base.builder, temp_ptr, ""); if(!res) return bld->base.undef; break; + } default: assert( 0 ); @@ -469,6 +532,7 @@ emit_store( LLVMValueRef value) { const struct tgsi_full_dst_register *reg = &inst->Dst[index]; + LLVMValueRef addr; switch( inst->Instruction.Saturate ) { case TGSI_SAT_NONE: @@ -488,20 +552,39 @@ emit_store( assert(0); } + if (reg->Register.Indirect) { + LLVMTypeRef int_vec_type = lp_build_int_vec_type(bld->base.type); + unsigned swizzle = tgsi_util_get_src_register_swizzle( ®->Indirect, chan_index ); + addr = LLVMBuildLoad(bld->base.builder, + bld->addr[reg->Indirect.Index][swizzle], + ""); + /* for indexing we want integers */ + addr = LLVMBuildFPToSI(bld->base.builder, addr, + int_vec_type, ""); + addr = LLVMBuildExtractElement(bld->base.builder, + addr, LLVMConstInt(LLVMInt32Type(), 0, 0), + ""); + addr = lp_build_mul(&bld->base, addr, LLVMConstInt(LLVMInt32Type(), 4, 0)); + } + switch( reg->Register.File ) { case TGSI_FILE_OUTPUT: lp_exec_mask_store(&bld->exec_mask, value, bld->outputs[reg->Register.Index][chan_index]); break; - case TGSI_FILE_TEMPORARY: - lp_exec_mask_store(&bld->exec_mask, value, - bld->temps[reg->Register.Index][chan_index]); + case TGSI_FILE_TEMPORARY: { + LLVMValueRef temp_ptr = get_temp_ptr(bld, reg->Register.Index, + chan_index, + reg->Register.Indirect, + addr); + lp_exec_mask_store(&bld->exec_mask, value, temp_ptr); break; + } case TGSI_FILE_ADDRESS: - /* FIXME */ - assert(0); + lp_exec_mask_store(&bld->exec_mask, value, + bld->addr[reg->Indirect.Index][chan_index]); break; case TGSI_FILE_PREDICATE: @@ -656,62 +739,42 @@ emit_kilp(struct lp_build_tgsi_soa_context *bld, lp_build_mask_update(bld->mask, mask); } - -/** - * Check if inst src/dest regs use indirect addressing into temporary - * register file. - */ -static boolean -indirect_temp_reference(const struct tgsi_full_instruction *inst) -{ - uint i; - for (i = 0; i < inst->Instruction.NumSrcRegs; i++) { - const struct tgsi_full_src_register *reg = &inst->Src[i]; - if (reg->Register.File == TGSI_FILE_TEMPORARY && - reg->Register.Indirect) - return TRUE; - } - for (i = 0; i < inst->Instruction.NumDstRegs; i++) { - const struct tgsi_full_dst_register *reg = &inst->Dst[i]; - if (reg->Register.File == TGSI_FILE_TEMPORARY && - reg->Register.Indirect) - return TRUE; - } - return FALSE; -} - static int emit_declaration( struct lp_build_tgsi_soa_context *bld, const struct tgsi_full_declaration *decl) { + LLVMTypeRef vec_type = lp_build_vec_type(bld->base.type); + unsigned first = decl->Range.First; unsigned last = decl->Range.Last; unsigned idx, i; - LLVMBasicBlockRef current_block = - LLVMGetInsertBlock(bld->base.builder); - LLVMBasicBlockRef first_block = - LLVMGetEntryBasicBlock( - LLVMGetBasicBlockParent(current_block)); - LLVMValueRef first_inst = - LLVMGetFirstInstruction(first_block); - - /* we want alloca's to be the first instruction - * in the function so we need to rewind the builder - * to the very beginning */ - LLVMPositionBuilderBefore(bld->base.builder, - first_inst); for (idx = first; idx <= last; ++idx) { switch (decl->Declaration.File) { case TGSI_FILE_TEMPORARY: - for (i = 0; i < NUM_CHANNELS; i++) - bld->temps[idx][i] = lp_build_alloca(&bld->base); + if (bld->has_indirect_addressing) { + LLVMValueRef val = LLVMConstInt(LLVMInt32Type(), + last*4 + 4, 0); + bld->temps_array = lp_build_array_alloca(bld->base.builder, + vec_type, val, ""); + } else { + for (i = 0; i < NUM_CHANNELS; i++) + bld->temps[idx][i] = lp_build_alloca(bld->base.builder, + vec_type, ""); + } break; case TGSI_FILE_OUTPUT: for (i = 0; i < NUM_CHANNELS; i++) - bld->outputs[idx][i] = lp_build_alloca(&bld->base); + bld->outputs[idx][i] = lp_build_alloca(bld->base.builder, + vec_type, ""); + break; + + case TGSI_FILE_ADDRESS: + for (i = 0; i < NUM_CHANNELS; i++) + bld->addr[idx][i] = lp_build_alloca(bld->base.builder, + vec_type, ""); break; default: @@ -720,8 +783,6 @@ emit_declaration( } } - LLVMPositionBuilderAtEnd(bld->base.builder, - current_block); return TRUE; } @@ -747,10 +808,6 @@ emit_instruction( LLVMValueRef res; LLVMValueRef dst0[NUM_CHANNELS]; - /* we can't handle indirect addressing into temp register file yet */ - if (indirect_temp_reference(inst)) - return FALSE; - /* * Stores and write masks are handled in a general fashion after the long * instruction opcode switch statement. @@ -770,17 +827,13 @@ emit_instruction( } switch (inst->Instruction.Opcode) { -#if 0 case TGSI_OPCODE_ARL: - /* FIXME */ FOR_EACH_DST0_ENABLED_CHANNEL( inst, chan_index ) { tmp0 = emit_fetch( bld, inst, 0, chan_index ); - emit_flr(bld, 0, 0); - emit_f2it( bld, 0 ); + tmp0 = lp_build_floor(&bld->base, tmp0); dst0[chan_index] = tmp0; } break; -#endif case TGSI_OPCODE_MOV: FOR_EACH_DST0_ENABLED_CHANNEL( inst, chan_index ) { @@ -1350,17 +1403,13 @@ emit_instruction( return FALSE; break; -#if 0 case TGSI_OPCODE_ARR: - /* FIXME */ FOR_EACH_DST0_ENABLED_CHANNEL( inst, chan_index ) { tmp0 = emit_fetch( bld, inst, 0, chan_index ); - emit_rnd( bld, 0, 0 ); - emit_f2it( bld, 0 ); + tmp0 = lp_build_round(&bld->base, tmp0); dst0[chan_index] = tmp0; } break; -#endif case TGSI_OPCODE_BRA: /* deprecated */ @@ -1540,22 +1589,10 @@ emit_instruction( lp_exec_mask_cond_push(&bld->exec_mask, tmp0); break; - case TGSI_OPCODE_BGNFOR: - /* deprecated */ - assert(0); - return FALSE; - break; - case TGSI_OPCODE_BGNLOOP: lp_exec_bgnloop(&bld->exec_mask); break; - case TGSI_OPCODE_REP: - /* deprecated */ - assert(0); - return FALSE; - break; - case TGSI_OPCODE_ELSE: lp_exec_mask_cond_invert(&bld->exec_mask); break; @@ -1564,22 +1601,10 @@ emit_instruction( lp_exec_mask_cond_pop(&bld->exec_mask); break; - case TGSI_OPCODE_ENDFOR: - /* deprecated */ - assert(0); - return FALSE; - break; - case TGSI_OPCODE_ENDLOOP: lp_exec_endloop(&bld->exec_mask); break; - case TGSI_OPCODE_ENDREP: - /* deprecated */ - assert(0); - return FALSE; - break; - case TGSI_OPCODE_PUSHA: /* deprecated? */ assert(0); @@ -1710,7 +1735,8 @@ lp_build_tgsi_soa(LLVMBuilderRef builder, const LLVMValueRef *pos, const LLVMValueRef (*inputs)[NUM_CHANNELS], LLVMValueRef (*outputs)[NUM_CHANNELS], - struct lp_build_sampler_soa *sampler) + struct lp_build_sampler_soa *sampler, + struct tgsi_shader_info *info) { struct lp_build_tgsi_soa_context bld; struct tgsi_parse_context parse; @@ -1726,6 +1752,8 @@ lp_build_tgsi_soa(LLVMBuilderRef builder, bld.outputs = outputs; bld.consts_ptr = consts_ptr; bld.sampler = sampler; + bld.has_indirect_addressing = info->opcode_count[TGSI_OPCODE_ARR] > 0 || + info->opcode_count[TGSI_OPCODE_ARL] > 0; lp_exec_mask_init(&bld.exec_mask, &bld.base); @@ -1746,10 +1774,10 @@ lp_build_tgsi_soa(LLVMBuilderRef builder, case TGSI_TOKEN_TYPE_INSTRUCTION: { unsigned opcode = parse.FullToken.FullInstruction.Instruction.Opcode; - const struct tgsi_opcode_info *info = tgsi_get_opcode_info(opcode); - if (!emit_instruction( &bld, &parse.FullToken.FullInstruction, info )) + const struct tgsi_opcode_info *opcode_info = tgsi_get_opcode_info(opcode); + if (!emit_instruction( &bld, &parse.FullToken.FullInstruction, opcode_info )) _debug_printf("warning: failed to translate tgsi opcode %s to LLVM\n", - info ? info->mnemonic : "<invalid>"); + opcode_info->mnemonic); } break; diff --git a/src/gallium/auxiliary/os/os_thread.h b/src/gallium/auxiliary/os/os_thread.h index 07a4268fc0a..c09e8a7a76f 100644 --- a/src/gallium/auxiliary/os/os_thread.h +++ b/src/gallium/auxiliary/os/os_thread.h @@ -302,6 +302,7 @@ static INLINE void pipe_barrier_wait(pipe_barrier *barrier) typedef struct { unsigned count; unsigned waiters; + uint64_t sequence; pipe_mutex mutex; pipe_condvar condvar; } pipe_barrier; @@ -310,6 +311,7 @@ static INLINE void pipe_barrier_init(pipe_barrier *barrier, unsigned count) { barrier->count = count; barrier->waiters = 0; + barrier->sequence = 0; pipe_mutex_init(barrier->mutex); pipe_condvar_init(barrier->condvar); } @@ -329,9 +331,14 @@ static INLINE void pipe_barrier_wait(pipe_barrier *barrier) barrier->waiters++; if (barrier->waiters < barrier->count) { - pipe_condvar_wait(barrier->condvar, barrier->mutex); + uint64_t sequence = barrier->sequence; + + do { + pipe_condvar_wait(barrier->condvar, barrier->mutex); + } while (sequence == barrier->sequence); } else { barrier->waiters = 0; + barrier->sequence++; pipe_condvar_broadcast(barrier->condvar); } diff --git a/src/gallium/auxiliary/tgsi/tgsi-instruction-set.txt b/src/gallium/auxiliary/tgsi/tgsi-instruction-set.txt index 080fd4c7310..5d9eed92580 100644 --- a/src/gallium/auxiliary/tgsi/tgsi-instruction-set.txt +++ b/src/gallium/auxiliary/tgsi/tgsi-instruction-set.txt @@ -661,25 +661,6 @@ TGSI Instruction Specification TBD -1.9.8 BGNFOR - Begin a For-Loop - - dst.x = floor(src.x) - dst.y = floor(src.y) - dst.z = floor(src.z) - - if (dst.y <= 0) - pc = [matching ENDFOR] + 1 - endif - - Note: The destination must be a loop register. - The source must be a constant register. - - -1.9.9 REP - Repeat - - TBD - - 1.9.10 ELSE - Else TBD @@ -690,23 +671,6 @@ TGSI Instruction Specification TBD -1.9.12 ENDFOR - End a For-Loop - - dst.x = dst.x + dst.z - dst.y = dst.y - 1.0 - - if (dst.y > 0) - pc = [matching BGNFOR instruction] + 1 - endif - - Note: The destination must be a loop register. - - -1.9.13 ENDREP - End Repeat - - TBD - - 1.10 GL_NV_vertex_program3 --------------------------- diff --git a/src/gallium/auxiliary/tgsi/tgsi_dump.c b/src/gallium/auxiliary/tgsi/tgsi_dump.c index 57031419f8e..83000200189 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_dump.c +++ b/src/gallium/auxiliary/tgsi/tgsi_dump.c @@ -586,7 +586,6 @@ iter_instruction( /* update indentation */ if (inst->Instruction.Opcode == TGSI_OPCODE_IF || inst->Instruction.Opcode == TGSI_OPCODE_ELSE || - inst->Instruction.Opcode == TGSI_OPCODE_BGNFOR || inst->Instruction.Opcode == TGSI_OPCODE_BGNLOOP) { ctx->indentation += indent_spaces; } diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c index 11045e4ba2f..82eac05dc4d 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_exec.c +++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c @@ -3186,14 +3186,6 @@ exec_instruction( *pc = -1; break; - case TGSI_OPCODE_REP: - assert (0); - break; - - case TGSI_OPCODE_ENDREP: - assert (0); - break; - case TGSI_OPCODE_PUSHA: assert (0); break; @@ -3258,29 +3250,6 @@ exec_instruction( emit_primitive(mach); break; - case TGSI_OPCODE_BGNFOR: - assert(mach->LoopCounterStackTop < TGSI_EXEC_MAX_LOOP_NESTING); - for (chan_index = 0; chan_index < 3; chan_index++) { - FETCH( &mach->LoopCounterStack[mach->LoopCounterStackTop].xyzw[chan_index], 0, chan_index ); - } - ++mach->LoopCounterStackTop; - STORE(&mach->LoopCounterStack[mach->LoopCounterStackTop - 1].xyzw[CHAN_X], 0, CHAN_X); - /* update LoopMask */ - if (mach->LoopCounterStack[mach->LoopCounterStackTop - 1].xyzw[CHAN_Y].f[0] <= 0.0f) { - mach->LoopMask &= ~0x1; - } - if (mach->LoopCounterStack[mach->LoopCounterStackTop - 1].xyzw[CHAN_Y].f[1] <= 0.0f) { - mach->LoopMask &= ~0x2; - } - if (mach->LoopCounterStack[mach->LoopCounterStackTop - 1].xyzw[CHAN_Y].f[2] <= 0.0f) { - mach->LoopMask &= ~0x4; - } - if (mach->LoopCounterStack[mach->LoopCounterStackTop - 1].xyzw[CHAN_Y].f[3] <= 0.0f) { - mach->LoopMask &= ~0x8; - } - /* TODO: if mach->LoopMask == 0, jump to end of loop */ - UPDATE_EXEC_MASK(mach); - /* fall-through (for now) */ case TGSI_OPCODE_BGNLOOP: /* push LoopMask and ContMasks */ assert(mach->LoopStackTop < TGSI_EXEC_MAX_LOOP_NESTING); @@ -3295,56 +3264,6 @@ exec_instruction( mach->BreakType = TGSI_EXEC_BREAK_INSIDE_LOOP; break; - case TGSI_OPCODE_ENDFOR: - assert(mach->LoopCounterStackTop > 0); - micro_sub(&mach->LoopCounterStack[mach->LoopCounterStackTop - 1].xyzw[CHAN_Y], - &mach->LoopCounterStack[mach->LoopCounterStackTop - 1].xyzw[CHAN_Y], - &mach->Temps[TEMP_1_I].xyzw[TEMP_1_C]); - /* update LoopMask */ - if (mach->LoopCounterStack[mach->LoopCounterStackTop - 1].xyzw[CHAN_Y].f[0] <= 0.0f) { - mach->LoopMask &= ~0x1; - } - if (mach->LoopCounterStack[mach->LoopCounterStackTop - 1].xyzw[CHAN_Y].f[1] <= 0.0f) { - mach->LoopMask &= ~0x2; - } - if (mach->LoopCounterStack[mach->LoopCounterStackTop - 1].xyzw[CHAN_Y].f[2] <= 0.0f) { - mach->LoopMask &= ~0x4; - } - if (mach->LoopCounterStack[mach->LoopCounterStackTop - 1].xyzw[CHAN_Y].f[3] <= 0.0f) { - mach->LoopMask &= ~0x8; - } - micro_add(&mach->LoopCounterStack[mach->LoopCounterStackTop - 1].xyzw[CHAN_X], - &mach->LoopCounterStack[mach->LoopCounterStackTop - 1].xyzw[CHAN_X], - &mach->LoopCounterStack[mach->LoopCounterStackTop - 1].xyzw[CHAN_Z]); - assert(mach->LoopLabelStackTop > 0); - inst = mach->Instructions + mach->LoopLabelStack[mach->LoopLabelStackTop - 1]; - STORE(&mach->LoopCounterStack[mach->LoopCounterStackTop].xyzw[CHAN_X], 0, CHAN_X); - /* Restore ContMask, but don't pop */ - assert(mach->ContStackTop > 0); - mach->ContMask = mach->ContStack[mach->ContStackTop - 1]; - UPDATE_EXEC_MASK(mach); - if (mach->ExecMask) { - /* repeat loop: jump to instruction just past BGNLOOP */ - assert(mach->LoopLabelStackTop > 0); - *pc = mach->LoopLabelStack[mach->LoopLabelStackTop - 1] + 1; - } - else { - /* exit loop: pop LoopMask */ - assert(mach->LoopStackTop > 0); - mach->LoopMask = mach->LoopStack[--mach->LoopStackTop]; - /* pop ContMask */ - assert(mach->ContStackTop > 0); - mach->ContMask = mach->ContStack[--mach->ContStackTop]; - assert(mach->LoopLabelStackTop > 0); - --mach->LoopLabelStackTop; - assert(mach->LoopCounterStackTop > 0); - --mach->LoopCounterStackTop; - - mach->BreakType = mach->BreakStack[--mach->BreakStackTop]; - } - UPDATE_EXEC_MASK(mach); - break; - case TGSI_OPCODE_ENDLOOP: /* Restore ContMask, but don't pop */ assert(mach->ContStackTop > 0); diff --git a/src/gallium/auxiliary/tgsi/tgsi_info.c b/src/gallium/auxiliary/tgsi/tgsi_info.c index de0e09cdbae..cfa2f631bd8 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_info.c +++ b/src/gallium/auxiliary/tgsi/tgsi_info.c @@ -106,12 +106,12 @@ static const struct tgsi_opcode_info opcode_info[TGSI_OPCODE_LAST] = { 1, 2, 1, 0, 0, 0, "TXL", TGSI_OPCODE_TXL }, { 0, 0, 0, 0, 0, 0, "BRK", TGSI_OPCODE_BRK }, { 0, 1, 0, 1, 0, 1, "IF", TGSI_OPCODE_IF }, - { 1, 1, 0, 0, 0, 1, "BGNFOR", TGSI_OPCODE_BGNFOR }, - { 0, 1, 0, 0, 0, 1, "REP", TGSI_OPCODE_REP }, + { 1, 1, 0, 0, 0, 1, "", 75 }, /* removed */ + { 0, 1, 0, 0, 0, 1, "", 76 }, /* removed */ { 0, 0, 0, 1, 1, 1, "ELSE", TGSI_OPCODE_ELSE }, { 0, 0, 0, 0, 1, 0, "ENDIF", TGSI_OPCODE_ENDIF }, - { 1, 0, 0, 0, 1, 0, "ENDFOR", TGSI_OPCODE_ENDFOR }, - { 0, 0, 0, 0, 1, 0, "ENDREP", TGSI_OPCODE_ENDREP }, + { 1, 0, 0, 0, 1, 0, "", 79 }, /* removed */ + { 0, 0, 0, 0, 1, 0, "", 80 }, /* removed */ { 0, 1, 0, 0, 0, 0, "PUSHA", TGSI_OPCODE_PUSHA }, { 1, 0, 0, 0, 0, 0, "POPA", TGSI_OPCODE_POPA }, { 1, 1, 0, 0, 0, 0, "CEIL", TGSI_OPCODE_CEIL }, diff --git a/src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h b/src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h index e4af15c156f..e472947507d 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h +++ b/src/gallium/auxiliary/tgsi/tgsi_opcode_tmp.h @@ -111,12 +111,8 @@ OP12(DP2) OP12_TEX(TXL) OP00(BRK) OP01_LBL(IF) -OP11(BGNFOR) -OP01(REP) OP00_LBL(ELSE) OP00(ENDIF) -OP10(ENDFOR) -OP00(ENDREP) OP01(PUSHA) OP10(POPA) OP11(CEIL) diff --git a/src/gallium/auxiliary/tgsi/tgsi_sanity.c b/src/gallium/auxiliary/tgsi/tgsi_sanity.c index 371f690b295..76b7564cc36 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_sanity.c +++ b/src/gallium/auxiliary/tgsi/tgsi_sanity.c @@ -346,25 +346,6 @@ iter_instruction( } } - switch (inst->Instruction.Opcode) { - case TGSI_OPCODE_BGNFOR: - case TGSI_OPCODE_ENDFOR: - if (inst->Dst[0].Register.File != TGSI_FILE_LOOP || - inst->Dst[0].Register.Index != 0) { - report_error(ctx, "Destination register must be LOOP[0]"); - } - break; - } - - switch (inst->Instruction.Opcode) { - case TGSI_OPCODE_BGNFOR: - if (inst->Src[0].Register.File != TGSI_FILE_CONSTANT && - inst->Src[0].Register.File != TGSI_FILE_IMMEDIATE) { - report_error(ctx, "Source register file must be either CONST or IMM"); - } - break; - } - ctx->num_instructions++; return TRUE; diff --git a/src/gallium/auxiliary/tgsi/tgsi_sse2.c b/src/gallium/auxiliary/tgsi/tgsi_sse2.c index a85cc4659e0..1071298b497 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_sse2.c +++ b/src/gallium/auxiliary/tgsi/tgsi_sse2.c @@ -2533,14 +2533,6 @@ emit_instruction( return 0; break; - case TGSI_OPCODE_BGNFOR: - return 0; - break; - - case TGSI_OPCODE_REP: - return 0; - break; - case TGSI_OPCODE_ELSE: return 0; break; @@ -2549,14 +2541,6 @@ emit_instruction( return 0; break; - case TGSI_OPCODE_ENDFOR: - return 0; - break; - - case TGSI_OPCODE_ENDREP: - return 0; - break; - case TGSI_OPCODE_PUSHA: return 0; break; diff --git a/src/gallium/auxiliary/translate/translate.h b/src/gallium/auxiliary/translate/translate.h index 54ed2c1a4be..edd95e07882 100644 --- a/src/gallium/auxiliary/translate/translate.h +++ b/src/gallium/auxiliary/translate/translate.h @@ -76,7 +76,8 @@ struct translate { void (*set_buffer)( struct translate *, unsigned i, const void *ptr, - unsigned stride ); + unsigned stride, + unsigned max_index ); void (PIPE_CDECL *run_elts)( struct translate *, const unsigned *elts, diff --git a/src/gallium/auxiliary/translate/translate_generic.c b/src/gallium/auxiliary/translate/translate_generic.c index c3ec9ae3f4b..a9272fbb491 100644 --- a/src/gallium/auxiliary/translate/translate_generic.c +++ b/src/gallium/auxiliary/translate/translate_generic.c @@ -31,6 +31,7 @@ */ #include "util/u_memory.h" +#include "util/u_math.h" #include "pipe/p_state.h" #include "translate.h" @@ -58,6 +59,7 @@ struct translate_generic { char *input_ptr; unsigned input_stride; + unsigned max_index; } attrib[PIPE_MAX_ATTRIBS]; @@ -588,19 +590,22 @@ static void PIPE_CDECL generic_run_elts( struct translate *translate, for (attr = 0; attr < nr_attrs; attr++) { float data[4]; const char *src; + unsigned index; char *dst = (vert + tg->attrib[attr].output_offset); if (tg->attrib[attr].instance_divisor) { - src = tg->attrib[attr].input_ptr + - tg->attrib[attr].input_stride * - (instance_id / tg->attrib[attr].instance_divisor); + index = instance_id / tg->attrib[attr].instance_divisor; } else { - src = tg->attrib[attr].input_ptr + - tg->attrib[attr].input_stride * elt; + index = elt; } + index = MIN2(index, tg->attrib[attr].max_index); + + src = tg->attrib[attr].input_ptr + + tg->attrib[attr].input_stride * index; + tg->attrib[attr].fetch( src, data ); if (0) debug_printf("vert %d/%d attr %d: %f %f %f %f\n", @@ -670,7 +675,8 @@ static void PIPE_CDECL generic_run( struct translate *translate, static void generic_set_buffer( struct translate *translate, unsigned buf, const void *ptr, - unsigned stride ) + unsigned stride, + unsigned max_index ) { struct translate_generic *tg = translate_generic(translate); unsigned i; @@ -680,6 +686,7 @@ static void generic_set_buffer( struct translate *translate, tg->attrib[i].input_ptr = ((char *)ptr + tg->attrib[i].input_offset); tg->attrib[i].input_stride = stride; + tg->attrib[i].max_index = max_index; } } } diff --git a/src/gallium/auxiliary/translate/translate_sse.c b/src/gallium/auxiliary/translate/translate_sse.c index c13e7427387..ef3aa674a34 100644 --- a/src/gallium/auxiliary/translate/translate_sse.c +++ b/src/gallium/auxiliary/translate/translate_sse.c @@ -61,6 +61,7 @@ typedef void (PIPE_CDECL *run_elts_func)( struct translate *translate, struct translate_buffer { const void *base_ptr; unsigned stride; + unsigned max_index; }; struct translate_buffer_varient { @@ -423,6 +424,11 @@ static boolean init_inputs( struct translate_sse *p, } else { x86_mov(p->func, tmp_EAX, elt); } + + /* + * TODO: Respect translate_buffer::max_index. + */ + x86_imul(p->func, tmp_EAX, buf_stride); x86_add(p->func, tmp_EAX, buf_base_ptr); @@ -666,13 +672,15 @@ static boolean build_vertex_emit( struct translate_sse *p, static void translate_sse_set_buffer( struct translate *translate, unsigned buf, const void *ptr, - unsigned stride ) + unsigned stride, + unsigned max_index ) { struct translate_sse *p = (struct translate_sse *)translate; if (buf < p->nr_buffers) { p->buffer[buf].base_ptr = (char *)ptr; p->buffer[buf].stride = stride; + p->buffer[buf].max_index = max_index; } if (0) debug_printf("%s %d/%d: %p %d\n", diff --git a/src/gallium/auxiliary/util/u_caps.c b/src/gallium/auxiliary/util/u_caps.c new file mode 100644 index 00000000000..c7c1e830e01 --- /dev/null +++ b/src/gallium/auxiliary/util/u_caps.c @@ -0,0 +1,245 @@ +/************************************************************************** + * + * Copyright 2010 Vmware, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + **************************************************************************/ + +#include "pipe/p_screen.h" +#include "util/u_format.h" +#include "util/u_debug.h" +#include "u_caps.h" + +/** + * Iterates over a list of caps checks as defined in u_caps.h. Should + * all checks pass returns TRUE and out is set to the last element of + * the list (TERMINATE). Should any check fail returns FALSE and set + * out to the index of the start of the first failing check. + */ +boolean +util_check_caps_out(struct pipe_screen *screen, const unsigned *list, int *out) +{ + int i, tmpi; + float tmpf; + + for (i = 0; list[i];) { + switch(list[i++]) { + case UTIL_CAPS_CHECK_CAP: + if (!screen->get_param(screen, list[i++])) { + *out = i - 2; + return FALSE; + } + break; + case UTIL_CAPS_CHECK_INT: + tmpi = screen->get_param(screen, list[i++]); + if (tmpi < (int)list[i++]) { + *out = i - 3; + return FALSE; + } + break; + case UTIL_CAPS_CHECK_FLOAT: + tmpf = screen->get_paramf(screen, list[i++]); + if (tmpf < (float)list[i++]) { + *out = i - 3; + return FALSE; + } + break; + case UTIL_CAPS_CHECK_FORMAT: + if (!screen->is_format_supported(screen, + list[i++], + PIPE_TEXTURE_2D, + PIPE_BIND_SAMPLER_VIEW, + 0)) { + *out = i - 2; + return FALSE; + } + break; + case UTIL_CAPS_CHECK_UNIMPLEMENTED: + *out = i - 1; + return FALSE; + default: + assert(!"Unsupported check"); + return FALSE; + } + } + + *out = i; + return TRUE; +} + +/** + * Iterates over a list of caps checks as defined in u_caps.h. + * Returns TRUE if all caps checks pass returns FALSE otherwise. + */ +boolean +util_check_caps(struct pipe_screen *screen, const unsigned *list) +{ + int out; + return util_check_caps_out(screen, list, &out); +} + + +/* + * Below follows some demo lists. + * + * None of these lists are exhausting lists of what is + * actually needed to support said API and more here for + * as example on how to uses the above functions. Especially + * for DX10 and DX11 where Gallium is missing features. + */ + +/* DX 9_1 */ +static unsigned caps_dx_9_1[] = { + UTIL_CHECK_INT(MAX_RENDER_TARGETS, 1), + UTIL_CHECK_INT(MAX_TEXTURE_2D_LEVELS, 12), /* 2048 */ + UTIL_CHECK_INT(MAX_TEXTURE_3D_LEVELS, 9), /* 256 */ + UTIL_CHECK_INT(MAX_TEXTURE_CUBE_LEVELS, 10), /* 512 */ + UTIL_CHECK_FLOAT(MAX_TEXTURE_ANISOTROPY, 2), + UTIL_CHECK_TERMINATE +}; + +/* DX 9_2 */ +static unsigned caps_dx_9_2[] = { + UTIL_CHECK_CAP(OCCLUSION_QUERY), + UTIL_CHECK_CAP(BLEND_EQUATION_SEPARATE), + UTIL_CHECK_INT(MAX_RENDER_TARGETS, 1), + UTIL_CHECK_INT(MAX_TEXTURE_2D_LEVELS, 12), /* 2048 */ + UTIL_CHECK_INT(MAX_TEXTURE_3D_LEVELS, 9), /* 256 */ + UTIL_CHECK_INT(MAX_TEXTURE_CUBE_LEVELS, 10), /* 512 */ + UTIL_CHECK_FLOAT(MAX_TEXTURE_ANISOTROPY, 16), + UTIL_CHECK_TERMINATE +}; + +/* DX 9_3 */ +static unsigned caps_dx_9_3[] = { + UTIL_CHECK_CAP(SM3), + //UTIL_CHECK_CAP(INSTANCING), + UTIL_CHECK_CAP(OCCLUSION_QUERY), + UTIL_CHECK_INT(MAX_RENDER_TARGETS, 4), + UTIL_CHECK_INT(MAX_TEXTURE_2D_LEVELS, 13), /* 4096 */ + UTIL_CHECK_INT(MAX_TEXTURE_3D_LEVELS, 9), /* 256 */ + UTIL_CHECK_INT(MAX_TEXTURE_CUBE_LEVELS, 10), /* 512 */ + UTIL_CHECK_FLOAT(MAX_TEXTURE_ANISOTROPY, 16), + UTIL_CHECK_TERMINATE +}; + +/* DX 10 */ +static unsigned caps_dx_10[] = { + UTIL_CHECK_CAP(SM3), + //UTIL_CHECK_CAP(INSTANCING), + UTIL_CHECK_CAP(OCCLUSION_QUERY), + UTIL_CHECK_INT(MAX_RENDER_TARGETS, 8), + UTIL_CHECK_INT(MAX_TEXTURE_2D_LEVELS, 14), /* 8192 */ + UTIL_CHECK_INT(MAX_TEXTURE_3D_LEVELS, 12), /* 2048 */ + UTIL_CHECK_INT(MAX_TEXTURE_CUBE_LEVELS, 14), /* 8192 */ + UTIL_CHECK_FLOAT(MAX_TEXTURE_ANISOTROPY, 16), + UTIL_CHECK_UNIMPLEMENTED, /* XXX Unimplemented features in Gallium */ + UTIL_CHECK_TERMINATE +}; + +/* DX11 */ +static unsigned caps_dx_11[] = { + UTIL_CHECK_CAP(SM3), + //UTIL_CHECK_CAP(INSTANCING), + UTIL_CHECK_CAP(OCCLUSION_QUERY), + UTIL_CHECK_INT(MAX_RENDER_TARGETS, 8), + UTIL_CHECK_INT(MAX_TEXTURE_2D_LEVELS, 14), /* 16384 */ + UTIL_CHECK_INT(MAX_TEXTURE_3D_LEVELS, 12), /* 2048 */ + UTIL_CHECK_INT(MAX_TEXTURE_CUBE_LEVELS, 14), /* 16384 */ + UTIL_CHECK_FLOAT(MAX_TEXTURE_ANISOTROPY, 16), + UTIL_CHECK_FORMAT(B8G8R8A8_UNORM), + UTIL_CHECK_UNIMPLEMENTED, /* XXX Unimplemented features in Gallium */ + UTIL_CHECK_TERMINATE +}; + +/* OpenGL 2.1 */ +static unsigned caps_opengl_2_1[] = { + UTIL_CHECK_CAP(GLSL), + UTIL_CHECK_CAP(OCCLUSION_QUERY), + UTIL_CHECK_CAP(TWO_SIDED_STENCIL), + UTIL_CHECK_CAP(BLEND_EQUATION_SEPARATE), + UTIL_CHECK_INT(MAX_RENDER_TARGETS, 2), + UTIL_CHECK_TERMINATE +}; + +/* OpenGL 3.0 */ +/* UTIL_CHECK_INT(MAX_RENDER_TARGETS, 8), */ + + +/** + * Demo function which checks against theoretical caps needed for different APIs. + */ +void util_caps_demo_print(struct pipe_screen *screen) +{ + struct { + char* name; + unsigned *list; + } list[] = { + {"DX 9.1", caps_dx_9_1}, + {"DX 9.2", caps_dx_9_2}, + {"DX 9.3", caps_dx_9_3}, + {"DX 10", caps_dx_10}, + {"DX 11", caps_dx_11}, + {"OpenGL 2.1", caps_opengl_2_1}, +/* {"OpenGL 3.0", caps_opengl_3_0},*/ + {NULL, NULL} + }; + int i, out = 0; + + for (i = 0; list[i].name; i++) { + if (util_check_caps_out(screen, list[i].list, &out)) { + debug_printf("%s: %s yes\n", __FUNCTION__, list[i].name); + continue; + } + switch (list[i].list[out]) { + case UTIL_CAPS_CHECK_CAP: + debug_printf("%s: %s no (cap %u not supported)\n", __FUNCTION__, + list[i].name, + list[i].list[out + 1]); + break; + case UTIL_CAPS_CHECK_INT: + debug_printf("%s: %s no (cap %u less then %u)\n", __FUNCTION__, + list[i].name, + list[i].list[out + 1], + list[i].list[out + 2]); + break; + case UTIL_CAPS_CHECK_FLOAT: + debug_printf("%s: %s no (cap %u less then %f)\n", __FUNCTION__, + list[i].name, + list[i].list[out + 1], + (double)(int)list[i].list[out + 2]); + break; + case UTIL_CAPS_CHECK_FORMAT: + debug_printf("%s: %s no (format %s not supported)\n", __FUNCTION__, + list[i].name, + util_format_name(list[i].list[out + 1]) + 12); + break; + case UTIL_CAPS_CHECK_UNIMPLEMENTED: + debug_printf("%s: %s no (not implemented in gallium or state tracker)\n", + __FUNCTION__, list[i].name); + break; + default: + assert(!"Unsupported check"); + } + } +} diff --git a/src/gallium/auxiliary/util/u_caps.h b/src/gallium/auxiliary/util/u_caps.h new file mode 100644 index 00000000000..b1074f9eb21 --- /dev/null +++ b/src/gallium/auxiliary/util/u_caps.h @@ -0,0 +1,67 @@ +/************************************************************************** + * + * Copyright 2010 Vmware, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + **************************************************************************/ + +#ifndef U_CAPS_H +#define U_CAPS_H + +#include "pipe/p_compiler.h" + +struct pipe_screen; + +enum u_caps_check_enum { + UTIL_CAPS_CHECK_TERMINATE = 0, + UTIL_CAPS_CHECK_CAP, + UTIL_CAPS_CHECK_INT, + UTIL_CAPS_CHECK_FLOAT, + UTIL_CAPS_CHECK_FORMAT, + UTIL_CAPS_CHECK_UNIMPLEMENTED, +}; + +#define UTIL_CHECK_CAP(cap) \ + UTIL_CAPS_CHECK_CAP, PIPE_CAP_##cap + +#define UTIL_CHECK_INT(cap, higher) \ + UTIL_CAPS_CHECK_INT, PIPE_CAP_##cap, (unsigned)(higher) + +/* Floats currently lose precision */ +#define UTIL_CHECK_FLOAT(cap, higher) \ + UTIL_CAPS_CHECK_FLOAT, PIPE_CAP_##cap, (unsigned)(int)(higher) + +#define UTIL_CHECK_FORMAT(format) \ + UTIL_CAPS_CHECK_FORMAT, PIPE_FORMAT_##format + +#define UTIL_CHECK_UNIMPLEMENTED \ + UTIL_CAPS_CHECK_UNIMPLEMENTED + +#define UTIL_CHECK_TERMINATE \ + UTIL_CAPS_CHECK_TERMINATE + +boolean util_check_caps(struct pipe_screen *screen, const unsigned *list); +boolean util_check_caps_out(struct pipe_screen *screen, const unsigned *list, int *out); +void util_caps_demo_print(struct pipe_screen *screen); + +#endif diff --git a/src/gallium/auxiliary/util/u_debug.c b/src/gallium/auxiliary/util/u_debug.c index dd044973f96..0de38e791d6 100644 --- a/src/gallium/auxiliary/util/u_debug.c +++ b/src/gallium/auxiliary/util/u_debug.c @@ -74,6 +74,24 @@ void debug_print_blob( const char *name, #endif +static boolean +debug_get_option_should_print(void) +{ + static boolean first = TRUE; + static boolean value = FALSE; + + if (!first) + return value; + + /* Oh hey this will call into this function, + * but its cool since we set first to false + */ + first = FALSE; + value = debug_get_bool_option("GALLIUM_PRINT_OPTIONS", TRUE); + /* XXX should we print this option? Currently it wont */ + return value; +} + const char * debug_get_option(const char *name, const char *dfault) { @@ -82,8 +100,9 @@ debug_get_option(const char *name, const char *dfault) result = os_get_option(name); if(!result) result = dfault; - - debug_printf("%s: %s = %s\n", __FUNCTION__, name, result ? result : "(null)"); + + if (debug_get_option_should_print()) + debug_printf("%s: %s = %s\n", __FUNCTION__, name, result ? result : "(null)"); return result; } @@ -109,7 +128,8 @@ debug_get_bool_option(const char *name, boolean dfault) else result = TRUE; - debug_printf("%s: %s = %s\n", __FUNCTION__, name, result ? "TRUE" : "FALSE"); + if (debug_get_option_should_print()) + debug_printf("%s: %s = %s\n", __FUNCTION__, name, result ? "TRUE" : "FALSE"); return result; } @@ -142,8 +162,9 @@ debug_get_num_option(const char *name, long dfault) } result *= sign; } - - debug_printf("%s: %s = %li\n", __FUNCTION__, name, result); + + if (debug_get_option_should_print()) + debug_printf("%s: %s = %li\n", __FUNCTION__, name, result); return result; } @@ -176,11 +197,12 @@ debug_get_flags_option(const char *name, } } - if (str) { - debug_printf("%s: %s = 0x%lx (%s)\n", __FUNCTION__, name, result, str); - } - else { - debug_printf("%s: %s = 0x%lx\n", __FUNCTION__, name, result); + if (debug_get_option_should_print()) { + if (str) { + debug_printf("%s: %s = 0x%lx (%s)\n", __FUNCTION__, name, result, str); + } else { + debug_printf("%s: %s = 0x%lx\n", __FUNCTION__, name, result); + } } return result; diff --git a/src/gallium/auxiliary/util/u_debug.h b/src/gallium/auxiliary/util/u_debug.h index b6d0b508e30..e8ff2773e69 100644 --- a/src/gallium/auxiliary/util/u_debug.h +++ b/src/gallium/auxiliary/util/u_debug.h @@ -303,6 +303,45 @@ debug_get_flags_option(const char *name, const struct debug_named_value *flags, unsigned long dfault); +#define DEBUG_GET_ONCE_BOOL_OPTION(sufix, name, dfault) \ +static boolean \ +debug_get_option_ ## sufix (void) \ +{ \ + static boolean first = TRUE; \ + static boolean value; \ + if (first) { \ + first = FALSE; \ + value = debug_get_bool_option(name, dfault); \ + } \ + return value; \ +} + +#define DEBUG_GET_ONCE_NUM_OPTION(sufix, name, dfault) \ +static long \ +debug_get_option_ ## sufix (void) \ +{ \ + static boolean first = TRUE; \ + static long value; \ + if (first) { \ + first = FALSE; \ + value = debug_get_num_option(name, dfault); \ + } \ + return value; \ +} + +#define DEBUG_GET_ONCE_FLAGS_OPTION(sufix, name, flags, dfault) \ +static unsigned long \ +debug_get_option_ ## sufix (void) \ +{ \ + static boolean first = TRUE; \ + static unsigned long value; \ + if (first) { \ + first = FALSE; \ + value = debug_get_flags_option(name, flags, dfault); \ + } \ + return value; \ +} + unsigned long debug_memory_begin(void); diff --git a/src/gallium/auxiliary/util/u_dump_state.c b/src/gallium/auxiliary/util/u_dump_state.c index c134f13e908..2ce643e90cd 100644 --- a/src/gallium/auxiliary/util/u_dump_state.c +++ b/src/gallium/auxiliary/util/u_dump_state.c @@ -656,12 +656,12 @@ util_dump_transfer(struct os_stream *stream, const struct pipe_transfer *state) util_dump_struct_begin(stream, "pipe_transfer"); util_dump_member(stream, ptr, state, resource); -// util_dump_member(stream, uint, state, box); + /*util_dump_member(stream, uint, state, box);*/ util_dump_member(stream, uint, state, stride); util_dump_member(stream, uint, state, slice_stride); -// util_dump_member(stream, ptr, state, data); + /*util_dump_member(stream, ptr, state, data);*/ util_dump_struct_end(stream); } diff --git a/src/gallium/auxiliary/util/u_format.h b/src/gallium/auxiliary/util/u_format.h index 5e3dc694be6..fb6ade5c06b 100644 --- a/src/gallium/auxiliary/util/u_format.h +++ b/src/gallium/auxiliary/util/u_format.h @@ -192,6 +192,7 @@ struct util_format_description /** * Unpack pixel blocks to R8G8B8A8_UNORM. + * Note: strides are in bytes. * * Only defined for non-depth-stencil formats. */ @@ -202,6 +203,7 @@ struct util_format_description /** * Pack pixel blocks from R8G8B8A8_UNORM. + * Note: strides are in bytes. * * Only defined for non-depth-stencil formats. */ @@ -212,6 +214,7 @@ struct util_format_description /** * Unpack pixel blocks to R32G32B32A32_FLOAT. + * Note: strides are in bytes. * * Only defined for non-depth-stencil formats. */ @@ -222,6 +225,7 @@ struct util_format_description /** * Pack pixel blocks from R32G32B32A32_FLOAT. + * Note: strides are in bytes. * * Only defined for non-depth-stencil formats. */ @@ -242,6 +246,7 @@ struct util_format_description /** * Unpack pixels to Z32_UNORM. + * Note: strides are in bytes. * * Only defined for depth formats. */ @@ -252,6 +257,7 @@ struct util_format_description /** * Pack pixels from Z32_FLOAT. + * Note: strides are in bytes. * * Only defined for depth formats. */ @@ -262,6 +268,7 @@ struct util_format_description /** * Unpack pixels to Z32_FLOAT. + * Note: strides are in bytes. * * Only defined for depth formats. */ @@ -272,6 +279,7 @@ struct util_format_description /** * Pack pixels from Z32_FLOAT. + * Note: strides are in bytes. * * Only defined for depth formats. */ @@ -282,6 +290,7 @@ struct util_format_description /** * Unpack pixels to S8_USCALED. + * Note: strides are in bytes. * * Only defined for stencil formats. */ @@ -292,6 +301,7 @@ struct util_format_description /** * Pack pixels from S8_USCALED. + * Note: strides are in bytes. * * Only defined for stencil formats. */ @@ -322,7 +332,7 @@ util_format_name(enum pipe_format format) assert(desc); if (!desc) { - return "???"; + return "PIPE_FORMAT_???"; } return desc->name; diff --git a/src/gallium/auxiliary/util/u_format_s3tc.c b/src/gallium/auxiliary/util/u_format_s3tc.c index 79dee2b4238..5b279b8fe26 100644 --- a/src/gallium/auxiliary/util/u_format_s3tc.c +++ b/src/gallium/auxiliary/util/u_format_s3tc.c @@ -233,108 +233,80 @@ util_format_dxt5_rgba_fetch_rgba_float(float *dst, const uint8_t *src, unsigned * Block decompression. */ -void -util_format_dxt1_rgb_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) -{ +static INLINE void +util_format_dxtn_rgb_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, + const uint8_t *src_row, unsigned src_stride, + unsigned width, unsigned height, + util_format_dxtn_fetch_t fetch, + unsigned block_size) +{ + const unsigned bw = 4, bh = 4, comps = 4; unsigned x, y, i, j; - for(y = 0; y < height; y += 4) { + for(y = 0; y < height; y += bh) { const uint8_t *src = src_row; - for(x = 0; x < width; x += 4) { - for(j = 0; j < 4; ++j) { - for(i = 0; i < 4; ++i) { - uint8_t *dst = dst_row + (y + j)*dst_stride/sizeof(*dst_row) + (x + i)*4; - util_format_dxt1_rgb_fetch(0, src, i, j, dst); + for(x = 0; x < width; x += bw) { + for(j = 0; j < bh; ++j) { + for(i = 0; i < bw; ++i) { + uint8_t *dst = dst_row + (y + j)*dst_stride/sizeof(*dst_row) + (x + i)*comps; + fetch(0, src, i, j, dst); } } - src += 8; + src += block_size; } src_row += src_stride; } } void -util_format_dxt1_rgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_dxt1_rgb_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, + const uint8_t *src_row, unsigned src_stride, + unsigned width, unsigned height) { - unsigned x, y, i, j; - for(y = 0; y < height; y += 4) { - const uint8_t *src = src_row; - for(x = 0; x < width; x += 4) { - for(j = 0; j < 4; ++j) { - for(i = 0; i < 4; ++i) { - uint8_t *dst = dst_row + (y + j)*dst_stride/sizeof(*dst_row) + (x + i)*4; - util_format_dxt1_rgba_fetch(0, src, i, j, dst); - } - } - src += 8; - } - src_row += src_stride; - } + util_format_dxtn_rgb_unpack_rgba_8unorm(dst_row, dst_stride, + src_row, src_stride, + width, height, + util_format_dxt1_rgb_fetch, 8); } void -util_format_dxt3_rgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_dxt1_rgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, + const uint8_t *src_row, unsigned src_stride, + unsigned width, unsigned height) { - unsigned x, y, i, j; - for(y = 0; y < height; y += 4) { - const uint8_t *src = src_row; - for(x = 0; x < width; x += 4) { - for(j = 0; j < 4; ++j) { - for(i = 0; i < 4; ++i) { - uint8_t *dst = dst_row + (y + j)*dst_stride/sizeof(*dst_row) + (x + i)*4; - util_format_dxt3_rgba_fetch(0, src, i, j, dst); - } - } - src += 16; - } - src_row += src_stride; - } + util_format_dxtn_rgb_unpack_rgba_8unorm(dst_row, dst_stride, + src_row, src_stride, + width, height, + util_format_dxt1_rgba_fetch, 8); } void -util_format_dxt5_rgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_dxt3_rgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, + const uint8_t *src_row, unsigned src_stride, + unsigned width, unsigned height) { - unsigned x, y, i, j; - for(y = 0; y < height; y += 4) { - const uint8_t *src = src_row; - for(x = 0; x < width; x += 4) { - for(j = 0; j < 4; ++j) { - for(i = 0; i < 4; ++i) { - uint8_t *dst = dst_row + (y + j)*dst_stride/sizeof(*dst_row) + (x + i)*4; - util_format_dxt5_rgba_fetch(0, src, i, j, dst); - } - } - src += 16; - } - src_row += src_stride; - } + util_format_dxtn_rgb_unpack_rgba_8unorm(dst_row, dst_stride, + src_row, src_stride, + width, height, + util_format_dxt3_rgba_fetch, 16); } void -util_format_dxt1_rgb_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_dxt5_rgba_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, + const uint8_t *src_row, unsigned src_stride, + unsigned width, unsigned height) { - unsigned x, y, i, j; - for(y = 0; y < height; y += 4) { - const uint8_t *src = src_row; - for(x = 0; x < width; x += 4) { - for(j = 0; j < 4; ++j) { - for(i = 0; i < 4; ++i) { - float *dst = dst_row + (y + j)*dst_stride/sizeof(*dst_row) + (x + i)*4; - uint8_t tmp[4]; - util_format_dxt1_rgb_fetch(0, src, i, j, tmp); - dst[0] = ubyte_to_float(tmp[0]); - dst[1] = ubyte_to_float(tmp[1]); - dst[2] = ubyte_to_float(tmp[2]); - dst[3] = 1.0; - } - } - src += 8; - } - src_row += src_stride; - } + util_format_dxtn_rgb_unpack_rgba_8unorm(dst_row, dst_stride, + src_row, src_stride, + width, height, + util_format_dxt5_rgba_fetch, 16); } -void -util_format_dxt1_rgba_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) +static INLINE void +util_format_dxtn_rgb_unpack_rgba_float(float *dst_row, unsigned dst_stride, + const uint8_t *src_row, unsigned src_stride, + unsigned width, unsigned height, + util_format_dxtn_fetch_t fetch, + unsigned block_size) { unsigned x, y, i, j; for(y = 0; y < height; y += 4) { @@ -344,65 +316,61 @@ util_format_dxt1_rgba_unpack_rgba_float(float *dst_row, unsigned dst_stride, con for(i = 0; i < 4; ++i) { float *dst = dst_row + (y + j)*dst_stride/sizeof(*dst_row) + (x + i)*4; uint8_t tmp[4]; - util_format_dxt1_rgba_fetch(0, src, i, j, tmp); + fetch(0, src, i, j, tmp); dst[0] = ubyte_to_float(tmp[0]); dst[1] = ubyte_to_float(tmp[1]); dst[2] = ubyte_to_float(tmp[2]); dst[3] = ubyte_to_float(tmp[3]); } } - src += 8; + src += block_size; } src_row += src_stride; } } void -util_format_dxt3_rgba_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_dxt1_rgb_unpack_rgba_float(float *dst_row, unsigned dst_stride, + const uint8_t *src_row, unsigned src_stride, + unsigned width, unsigned height) { - unsigned x, y, i, j; - for(y = 0; y < height; y += 4) { - const uint8_t *src = src_row; - for(x = 0; x < width; x += 4) { - for(j = 0; j < 4; ++j) { - for(i = 0; i < 4; ++i) { - float *dst = dst_row + (y + j)*dst_stride/sizeof(*dst_row) + (x + i)*4; - uint8_t tmp[4]; - util_format_dxt3_rgba_fetch(0, src, i, j, tmp); - dst[0] = ubyte_to_float(tmp[0]); - dst[1] = ubyte_to_float(tmp[1]); - dst[2] = ubyte_to_float(tmp[2]); - dst[3] = ubyte_to_float(tmp[3]); - } - } - src += 16; - } - src_row += src_stride; - } + util_format_dxtn_rgb_unpack_rgba_float(dst_row, dst_stride, + src_row, src_stride, + width, height, + util_format_dxt1_rgb_fetch, 8); } void -util_format_dxt5_rgba_unpack_rgba_float(float *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_dxt1_rgba_unpack_rgba_float(float *dst_row, unsigned dst_stride, + const uint8_t *src_row, unsigned src_stride, + unsigned width, unsigned height) { - unsigned x, y, i, j; - for(y = 0; y < height; y += 4) { - const uint8_t *src = src_row; - for(x = 0; x < width; x += 4) { - for(j = 0; j < 4; ++j) { - for(i = 0; i < 4; ++i) { - float *dst = dst_row + (y + j)*dst_stride/sizeof(*dst_row) + (x + i)*4; - uint8_t tmp[4]; - util_format_dxt5_rgba_fetch(0, src, i, j, tmp); - dst[0] = ubyte_to_float(tmp[0]); - dst[1] = ubyte_to_float(tmp[1]); - dst[2] = ubyte_to_float(tmp[2]); - dst[3] = ubyte_to_float(tmp[3]); - } - } - src += 16; - } - src_row += src_stride; - } + util_format_dxtn_rgb_unpack_rgba_float(dst_row, dst_stride, + src_row, src_stride, + width, height, + util_format_dxt1_rgba_fetch, 8); +} + +void +util_format_dxt3_rgba_unpack_rgba_float(float *dst_row, unsigned dst_stride, + const uint8_t *src_row, unsigned src_stride, + unsigned width, unsigned height) +{ + util_format_dxtn_rgb_unpack_rgba_float(dst_row, dst_stride, + src_row, src_stride, + width, height, + util_format_dxt3_rgba_fetch, 16); +} + +void +util_format_dxt5_rgba_unpack_rgba_float(float *dst_row, unsigned dst_stride, + const uint8_t *src_row, unsigned src_stride, + unsigned width, unsigned height) +{ + util_format_dxtn_rgb_unpack_rgba_float(dst_row, dst_stride, + src_row, src_stride, + width, height, + util_format_dxt5_rgba_fetch, 16); } @@ -411,201 +379,198 @@ util_format_dxt5_rgba_unpack_rgba_float(float *dst_row, unsigned dst_stride, con */ void -util_format_dxt1_rgb_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_dxt1_rgb_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, + const uint8_t *src, unsigned src_stride, + unsigned width, unsigned height) { + const unsigned bw = 4, bh = 4, bytes_per_block = 8; unsigned x, y, i, j, k; - for(y = 0; y < height; y += 4) { - const uint8_t *src = src_row; + for(y = 0; y < height; y += bh) { uint8_t *dst = dst_row; - for(x = 0; x < width; x += 4) { - uint8_t tmp[4][4][3]; - for(j = 0; j < 4; ++j) { - for(i = 0; i < 4; ++i) { + for(x = 0; x < width; x += bw) { + uint8_t tmp[4][4][3]; /* [bh][bw][comps] */ + for(j = 0; j < bh; ++j) { + for(i = 0; i < bw; ++i) { for(k = 0; k < 3; ++k) { - tmp[j][i][k] = src[(y + j)*src_stride/sizeof(*src) + i*4 + k]; + tmp[j][i][k] = src[(y + j)*src_stride/sizeof(*src) + (x + i)*4 + k]; } } } - util_format_dxtn_pack(3, 4, 4, &tmp[0][0][0], UTIL_FORMAT_DXT1_RGB, dst, dst_stride); - src += 4*4; - dst += 8; + util_format_dxtn_pack(3, 4, 4, &tmp[0][0][0], UTIL_FORMAT_DXT1_RGB, dst, 0); + dst += bytes_per_block; } - src_row += src_stride; - dst_row += 4*dst_stride/sizeof(*dst_row); + dst_row += dst_stride / sizeof(*dst_row); } } void -util_format_dxt1_rgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_dxt1_rgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, + const uint8_t *src, unsigned src_stride, + unsigned width, unsigned height) { + const unsigned bw = 4, bh = 4, comps = 4, bytes_per_block = 8; unsigned x, y, i, j, k; - for(y = 0; y < height; y += 4) { - const uint8_t *src = src_row; + for(y = 0; y < height; y += bh) { uint8_t *dst = dst_row; - for(x = 0; x < width; x += 4) { - uint8_t tmp[4][4][4]; - for(j = 0; j < 4; ++j) { - for(i = 0; i < 4; ++i) { - for(k = 0; k < 4; ++k) { - tmp[j][i][k] = src[(y + j)*src_stride/sizeof(*src) + i*4 + k]; + for(x = 0; x < width; x += bw) { + uint8_t tmp[4][4][4]; /* [bh][bw][comps] */ + for(j = 0; j < bh; ++j) { + for(i = 0; i < bw; ++i) { + for(k = 0; k < comps; ++k) { + tmp[j][i][k] = src[(y + j)*src_stride/sizeof(*src) + (x + i)*comps + k]; } } } - util_format_dxtn_pack(4, 4, 4, &tmp[0][0][0], UTIL_FORMAT_DXT1_RGBA, dst, dst_stride); - src += 4*4; - dst += 8; + util_format_dxtn_pack(4, 4, 4, &tmp[0][0][0], UTIL_FORMAT_DXT1_RGBA, dst, 0); + dst += bytes_per_block; } - src_row += src_stride; - dst_row += 4*dst_stride/sizeof(*dst_row); + dst_row += dst_stride / sizeof(*dst_row); } } void -util_format_dxt3_rgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_dxt3_rgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, + const uint8_t *src, unsigned src_stride, + unsigned width, unsigned height) { + const unsigned bw = 4, bh = 4, comps = 4, bytes_per_block = 16; unsigned x, y, i, j, k; - for(y = 0; y < height; y += 4) { - const uint8_t *src = src_row; + for(y = 0; y < height; y += bh) { uint8_t *dst = dst_row; - for(x = 0; x < width; x += 4) { - uint8_t tmp[4][4][4]; - for(j = 0; j < 4; ++j) { - for(i = 0; i < 4; ++i) { - for(k = 0; k < 4; ++k) { - tmp[j][i][k] = src[(y + j)*src_stride/sizeof(*src) + i*4 + k]; + for(x = 0; x < width; x += bw) { + uint8_t tmp[4][4][4]; /* [bh][bw][comps] */ + for(j = 0; j < bh; ++j) { + for(i = 0; i < bw; ++i) { + for(k = 0; k < comps; ++k) { + tmp[j][i][k] = src[(y + j)*src_stride/sizeof(*src) + (x + i)*comps + k]; } } } - util_format_dxtn_pack(4, 4, 4, &tmp[0][0][0], UTIL_FORMAT_DXT3_RGBA, dst, dst_stride); - src += 4*4; - dst += 16; + util_format_dxtn_pack(4, 4, 4, &tmp[0][0][0], UTIL_FORMAT_DXT3_RGBA, dst, 0); + dst += bytes_per_block; } - src_row += src_stride; - dst_row += 4*dst_stride/sizeof(*dst_row); + dst_row += dst_stride / sizeof(*dst_row); } } void -util_format_dxt5_rgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_dxt5_rgba_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, + const uint8_t *src, unsigned src_stride, + unsigned width, unsigned height) { + const unsigned bw = 4, bh = 4, comps = 4, bytes_per_block = 16; unsigned x, y, i, j, k; - for(y = 0; y < height; y += 4) { - const uint8_t *src = src_row; + + for(y = 0; y < height; y += bh) { uint8_t *dst = dst_row; - for(x = 0; x < width; x += 4) { - uint8_t tmp[4][4][4]; - for(j = 0; j < 4; ++j) { - for(i = 0; i < 4; ++i) { - for(k = 0; k < 4; ++k) { - tmp[j][i][k] = src[(y + j)*src_stride/sizeof(*src) + i*4 + k]; + for(x = 0; x < width; x += bw) { + uint8_t tmp[4][4][4]; /* [bh][bw][comps] */ + for(j = 0; j < bh; ++j) { + for(i = 0; i < bw; ++i) { + for(k = 0; k < comps; ++k) { + tmp[j][i][k] = src[(y + j)*src_stride/sizeof(*src) + (x + i)*comps + k]; } } } - util_format_dxtn_pack(4, 4, 4, &tmp[0][0][0], UTIL_FORMAT_DXT5_RGBA, dst, dst_stride); - src += 4*4; - dst += 16; + util_format_dxtn_pack(4, 4, 4, &tmp[0][0][0], UTIL_FORMAT_DXT5_RGBA, dst, 0); + dst += bytes_per_block; } - src_row += src_stride; - dst_row += 4*dst_stride/sizeof(*dst_row); + dst_row += dst_stride / sizeof(*dst_row); } } void -util_format_dxt1_rgb_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_dxt1_rgb_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, + const float *src, unsigned src_stride, + unsigned width, unsigned height) { unsigned x, y, i, j, k; for(y = 0; y < height; y += 4) { - const float *src = src_row; uint8_t *dst = dst_row; for(x = 0; x < width; x += 4) { uint8_t tmp[4][4][3]; for(j = 0; j < 4; ++j) { for(i = 0; i < 4; ++i) { for(k = 0; k < 3; ++k) { - tmp[j][i][k] = float_to_ubyte(src[(y + j)*src_stride/sizeof(*src) + i*4 + k]); + tmp[j][i][k] = float_to_ubyte(src[(y + j)*src_stride/sizeof(*src) + (x+i)*4 + k]); } } } - util_format_dxtn_pack(3, 4, 4, &tmp[0][0][0], UTIL_FORMAT_DXT1_RGB, dst, dst_stride); - src += 4*4; + util_format_dxtn_pack(3, 4, 4, &tmp[0][0][0], UTIL_FORMAT_DXT1_RGB, dst, 0); dst += 8; } - src_row += src_stride; dst_row += 4*dst_stride/sizeof(*dst_row); } } void -util_format_dxt1_rgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_dxt1_rgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, + const float *src, unsigned src_stride, + unsigned width, unsigned height) { unsigned x, y, i, j, k; for(y = 0; y < height; y += 4) { - const float *src = src_row; uint8_t *dst = dst_row; for(x = 0; x < width; x += 4) { uint8_t tmp[4][4][4]; for(j = 0; j < 4; ++j) { for(i = 0; i < 4; ++i) { for(k = 0; k < 4; ++k) { - tmp[j][i][k] = float_to_ubyte(src[(y + j)*src_stride/sizeof(*src) + i*4 + k]); + tmp[j][i][k] = float_to_ubyte(src[(y + j)*src_stride/sizeof(*src) + (x+i)*4 + k]); } } } - util_format_dxtn_pack(4, 4, 4, &tmp[0][0][0], UTIL_FORMAT_DXT1_RGBA, dst, dst_stride); - src += 4*4; + util_format_dxtn_pack(4, 4, 4, &tmp[0][0][0], UTIL_FORMAT_DXT1_RGBA, dst, 0); dst += 8; } - src_row += src_stride; dst_row += 4*dst_stride/sizeof(*dst_row); } } void -util_format_dxt3_rgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_dxt3_rgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, + const float *src, unsigned src_stride, + unsigned width, unsigned height) { unsigned x, y, i, j, k; for(y = 0; y < height; y += 4) { - const float *src = src_row; uint8_t *dst = dst_row; for(x = 0; x < width; x += 4) { uint8_t tmp[4][4][4]; for(j = 0; j < 4; ++j) { for(i = 0; i < 4; ++i) { for(k = 0; k < 4; ++k) { - tmp[j][i][k] = float_to_ubyte(src[(y + j)*src_stride/sizeof(*src) + i*4 + k]); + tmp[j][i][k] = float_to_ubyte(src[(y + j)*src_stride/sizeof(*src) + (x+i)*4 + k]); } } } - util_format_dxtn_pack(4, 4, 4, &tmp[0][0][0], UTIL_FORMAT_DXT3_RGBA, dst, dst_stride); - src += 4*4; + util_format_dxtn_pack(4, 4, 4, &tmp[0][0][0], UTIL_FORMAT_DXT3_RGBA, dst, 0); dst += 16; } - src_row += src_stride; dst_row += 4*dst_stride/sizeof(*dst_row); } } void -util_format_dxt5_rgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, const float *src_row, unsigned src_stride, unsigned width, unsigned height) +util_format_dxt5_rgba_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride, + const float *src, unsigned src_stride, + unsigned width, unsigned height) { unsigned x, y, i, j, k; for(y = 0; y < height; y += 4) { - const float *src = src_row; uint8_t *dst = dst_row; for(x = 0; x < width; x += 4) { uint8_t tmp[4][4][4]; for(j = 0; j < 4; ++j) { for(i = 0; i < 4; ++i) { for(k = 0; k < 4; ++k) { - tmp[j][i][k] = float_to_ubyte(src[(y + j)*src_stride/sizeof(*src) + i*4 + k]); + tmp[j][i][k] = float_to_ubyte(src[(y + j)*src_stride/sizeof(*src) + (x+i)*4 + k]); } } } - util_format_dxtn_pack(4, 4, 4, &tmp[0][0][0], UTIL_FORMAT_DXT5_RGBA, dst, dst_stride); - src += 4*4; + util_format_dxtn_pack(4, 4, 4, &tmp[0][0][0], UTIL_FORMAT_DXT5_RGBA, dst, 0); dst += 16; } - src_row += src_stride; dst_row += 4*dst_stride/sizeof(*dst_row); } } diff --git a/src/gallium/auxiliary/util/u_surfaces.c b/src/gallium/auxiliary/util/u_surfaces.c index 0be4609a207..668da8c5c27 100644 --- a/src/gallium/auxiliary/util/u_surfaces.c +++ b/src/gallium/auxiliary/util/u_surfaces.c @@ -9,13 +9,13 @@ static unsigned hash(void *key) { - return (unsigned)key; + return (unsigned)(uintptr_t)key; } static int compare(void *key1, void *key2) { - return (unsigned)key1 - (unsigned)key2; + return (unsigned)(uintptr_t)key1 - (unsigned)(uintptr_t)key2; } struct pipe_surface * @@ -67,7 +67,7 @@ util_surfaces_do_detach(struct util_surfaces *us, struct pipe_surface *ps) struct pipe_resource *pt = ps->texture; if(pt->target == PIPE_TEXTURE_3D || pt->target == PIPE_TEXTURE_CUBE) { /* or 2D array */ - void* key = (void*)(((ps->zslice + ps->face) << 8) | ps->level); + void* key = (void*)(uintptr_t)(((ps->zslice + ps->face) << 8) | ps->level); util_hash_table_remove(us->u.table, key); } else @@ -105,7 +105,7 @@ util_surfaces_destroy(struct util_surfaces *us, struct pipe_resource *pt, void ( if(ps) destroy_surface(ps); } - free(us->u.array); + FREE(us->u.array); us->u.array = NULL; } } diff --git a/src/gallium/auxiliary/util/u_tile.c b/src/gallium/auxiliary/util/u_tile.c index fe327c302b7..f7aa1403d08 100644 --- a/src/gallium/auxiliary/util/u_tile.c +++ b/src/gallium/auxiliary/util/u_tile.c @@ -544,7 +544,7 @@ pipe_put_tile_z(struct pipe_context *pipe, case PIPE_FORMAT_Z24_UNORM_S8_USCALED: { uint *pDest = (uint *) (map + y * pt->stride + x*4); - //assert((pt->usage & PIPE_TRANSFER_READ_WRITE) == PIPE_TRANSFER_READ_WRITE); + /*assert((pt->usage & PIPE_TRANSFER_READ_WRITE) == PIPE_TRANSFER_READ_WRITE);*/ for (i = 0; i < h; i++) { for (j = 0; j < w; j++) { /* convert 32-bit Z to 24-bit Z, preserve stencil */ @@ -571,7 +571,7 @@ pipe_put_tile_z(struct pipe_context *pipe, case PIPE_FORMAT_S8_USCALED_Z24_UNORM: { uint *pDest = (uint *) (map + y * pt->stride + x*4); - //assert((pt->usage & PIPE_TRANSFER_READ_WRITE) == PIPE_TRANSFER_READ_WRITE); + /*assert((pt->usage & PIPE_TRANSFER_READ_WRITE) == PIPE_TRANSFER_READ_WRITE);*/ for (i = 0; i < h; i++) { for (j = 0; j < w; j++) { /* convert 32-bit Z to 24-bit Z, preserve stencil */ diff --git a/src/gallium/docs/source/conf.py b/src/gallium/docs/source/conf.py index 59c19ed98dd..ccc84405c41 100644 --- a/src/gallium/docs/source/conf.py +++ b/src/gallium/docs/source/conf.py @@ -45,9 +45,9 @@ copyright = u'2009, VMWare, X.org, Nouveau' # built documents. # # The short X.Y version. -version = '0.3' +version = '0.4' # The full version, including alpha/beta/rc tags. -release = '0.3' +release = '0.4' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/src/gallium/docs/source/screen.rst b/src/gallium/docs/source/screen.rst index b6efd1d40cf..c5815f8939c 100644 --- a/src/gallium/docs/source/screen.rst +++ b/src/gallium/docs/source/screen.rst @@ -3,16 +3,19 @@ Screen A screen is an object representing the context-independent part of a device. -Useful Flags ------------- +Flags and enumerations +---------------------- + +XXX some of these don't belong in this section. + .. _pipe_cap: -PIPE_CAP -^^^^^^^^ +PIPE_CAP_* +^^^^^^^^^^ -Pipe capabilities help expose hardware functionality not explicitly required -by Gallium. For floating-point values, use :ref:`get_paramf`, and for boolean +Capability queries return information about the features and limits of the +driver/GPU. For floating-point values, use :ref:`get_paramf`, and for boolean or integer values, use :ref:`get_param`. The integer capabilities: @@ -56,6 +59,19 @@ The integer capabilities: to any shader stage using ``set_constant_buffer``. If 0 or 1, the pipe will only permit binding one constant buffer per shader, and the shaders will not permit two-dimensional access to constants. + +If a value greater than 0 is returned, the driver can have multiple +constant buffers bound to shader stages. The CONST register file can +be accessed with two-dimensional indices, like in the example below. + +DCL CONST[0][0..7] # declare first 8 vectors of constbuf 0 +DCL CONST[3][0] # declare first vector of constbuf 3 +MOV OUT[0], CONST[0][3] # copy vector 3 of constbuf 0 + +For backwards compatibility, one-dimensional access to CONST register +file is still supported. In that case, the constbuf index is assumed +to be 0. + * ``MAX_CONST_BUFFER_SIZE``: Maximum byte size of a single constant buffer. * ``INDEP_BLEND_ENABLE``: Whether per-rendertarget blend enabling and channel masks are supported. If 0, then the first rendertarget's blend mask is @@ -85,64 +101,55 @@ The floating-point capabilities: * ``GUARD_BAND_LEFT``, ``GUARD_BAND_TOP``, ``GUARD_BAND_RIGHT``, ``GUARD_BAND_BOTTOM``: XXX -XXX Is there a better home for this? vvv - -If 0 is returned, the driver is not aware of multiple constant buffers, -supports binding of only one constant buffer, and does not support -two-dimensional CONST register file access in TGSI shaders. - -If a value greater than 0 is returned, the driver can have multiple -constant buffers bound to shader stages. The CONST register file can -be accessed with two-dimensional indices, like in the example below. - -DCL CONST[0][0..7] # declare first 8 vectors of constbuf 0 -DCL CONST[3][0] # declare first vector of constbuf 3 -MOV OUT[0], CONST[0][3] # copy vector 3 of constbuf 0 -For backwards compatibility, one-dimensional access to CONST register -file is still supported. In that case, the constbuf index is assumed -to be 0. .. _pipe_bind: -PIPE_BIND -^^^^^^^^^ +PIPE_BIND_* +^^^^^^^^^^^ -These flags control resource creation. Resources may be used in different roles +These flags indicate how a resource will be used and are specified at resource +creation time. Resources may be used in different roles during their lifecycle. Bind flags are cumulative and may be combined to create -a resource which can be used as multiple things. -Depending on the pipe driver's memory management, depending on these bind flags +a resource which can be used for multiple things. +Depending on the pipe driver's memory management and these bind flags, resources might be created and handled quite differently. -* ``RENDER_TARGET``: A color buffer or pixel buffer which will be rendered to. -* ``DISPLAY_TARGET``: A sharable buffer that can be given to another process. -* ``DEPTH_STENCIL``: A depth (Z) buffer or stencil buffer. Gallium does - not explicitly provide for stencil-only buffers, so any stencil buffer - validated here is implicitly also a depth buffer. -* ``SAMPLER_VIEW``: A texture that may be sampled from in a fragment or vertex - shader. -* ``VERTEX_BUFFER``: A vertex buffer. -* ``INDEX_BUFFER``: An element buffer. -* ``CONSTANT_BUFFER``: A buffer of shader constants. -* ``BLIT_SOURCE``: A blit source, as given to surface_copy. -* ``BLIT_DESTINATION``: A blit destination, as given to surface_copy and surface_fill. -* ``TRANSFER_WRITE``: A transfer object which will be written to. -* ``TRANSFER_READ``: A transfer object which will be read from. -* ``CUSTOM``: -* ``SCANOUT``: A front color buffer or scanout buffer. -* ``SHARED``: +* ``PIPE_BIND_RENDER_TARGET``: A color buffer or pixel buffer which will be + rendered to. Any surface/resource attached to pipe_framebuffer_state::cbufs + must have this flag set. +* ``PIPE_BIND_DEPTH_STENCIL``: A depth (Z) buffer and/or stencil buffer. Any + depth/stencil surface/resource attached to pipe_framebuffer_state::zsbuf must + have this flag set. +* ``PIPE_BIND_DISPLAY_TARGET``: A surface that can be presented to screen. Arguments to + pipe_screen::flush_front_buffer must have this flag set. +* ``PIPE_BIND_SAMPLER_VIEW``: A texture that may be sampled from in a fragment + or vertex shader. +* ``PIPE_BIND_VERTEX_BUFFER``: A vertex buffer. +* ``PIPE_BIND_INDEX_BUFFER``: An vertex index/element buffer. +* ``PIPE_BIND_CONSTANT_BUFFER``: A buffer of shader constants. +* ``PIPE_BIND_BLIT_SOURCE``: A blit source, as given to surface_copy. +* ``PIPE_BIND_BLIT_DESTINATION``: A blit destination, as given to surface_copy + and surface_fill. +* ``PIPE_BIND_TRANSFER_WRITE``: A transfer object which will be written to. +* ``PIPE_BIND_TRANSFER_READ``: A transfer object which will be read from. +* ``PIPE_BIND_CUSTOM``: +* ``PIPE_BIND_SCANOUT``: A front color buffer or scanout buffer. +* ``PIPE_BIND_SHARED``: A sharable buffer that can be given to another + process. .. _pipe_usage: -PIPE_USAGE -^^^^^^^^^^ +PIPE_USAGE_* +^^^^^^^^^^^^ + +The PIPE_USAGE enums are hints about the expected usage pattern of a resource. -The PIPE_USAGE enums are hints about the expected lifecycle of a resource. -* ``DEFAULT``: Expect many uploads to the resource, intermixed with draws. -* ``DYNAMIC``: Expect many uploads to the resource, intermixed with draws. -* ``STATIC``: Same as immutable (?) -* ``IMMUTABLE``: Resource will not be changed after first upload. -* ``STREAM``: Upload will be followed by draw, followed by upload, ... +* ``PIPE_USAGE_DEFAULT``: Expect many uploads to the resource, intermixed with draws. +* ``PIPE_USAGE_DYNAMIC``: Expect many uploads to the resource, intermixed with draws. +* ``PIPE_USAGE_STATIC``: Same as immutable (?) +* ``PIPE_USAGE_IMMUTABLE``: Resource will not be changed after first upload. +* ``PIPE_USAGE_STREAM``: Upload will be followed by draw, followed by upload, ... @@ -162,7 +169,7 @@ For example, a compressed format might only be used for POT textures. Methods ------- -XXX moar; got bored +XXX to-do get_name ^^^^^^^^ @@ -204,9 +211,15 @@ and/or front-buffer rendering. is_format_supported ^^^^^^^^^^^^^^^^^^^ -See if a format can be used in a specific manner. +Determine if a resource in the given format can be used in a specific manner. -**tex_usage** is a bitmask of :ref:`PIPE_BIND` flags. +**format** the resource format + +**target** one of the PIPE_TEXTURE_x flags + +**bindings** is a bitmask of :ref:`PIPE_BIND` flags. + +**geom_flags** is a bitmask of PIPE_TEXTURE_GEOM_x flags. Returns TRUE if all usages can be satisfied. @@ -214,15 +227,35 @@ Returns TRUE if all usages can be satisfied. .. _resource_create: resource_create -^^^^^^^^^^^^^^ +^^^^^^^^^^^^^^^ + +Create a new resource from a template. +The following fields of the pipe_resource must be specified in the template: + +target + +format + +width0 + +height0 + +depth0 + +last_level + +nr_samples + +usage + +bind + +flags + -Given a template of texture setup, create a resource. -The way a resource may be used is specifed by bind flags, :ref:`pipe_bind`. -and hints are used to indicate to the driver what access pattern might be -likely, :ref:`pipe_usage`. resource_destroy -^^^^^^^^^^^^^^^ +^^^^^^^^^^^^^^^^ Destroy a resource. A resource is destroyed if it has no more references. diff --git a/src/gallium/docs/source/tgsi.rst b/src/gallium/docs/source/tgsi.rst index c292cd37d5c..e2c8602da02 100644 --- a/src/gallium/docs/source/tgsi.rst +++ b/src/gallium/docs/source/tgsi.rst @@ -786,33 +786,6 @@ This instruction replicates its result. TBD -.. opcode:: BGNFOR - Begin a For-Loop - - dst.x = floor(src.x) - dst.y = floor(src.y) - dst.z = floor(src.z) - - if (dst.y <= 0) - pc = [matching ENDFOR] + 1 - endif - - Note: The destination must be a loop register. - The source must be a constant register. - -.. note:: - - Considered for cleanup. - -.. note:: - - Considered for removal. - - -.. opcode:: REP - Repeat - - TBD - - .. opcode:: ELSE - Else TBD @@ -823,30 +796,6 @@ This instruction replicates its result. TBD -.. opcode:: ENDFOR - End a For-Loop - - dst.x = dst.x + dst.z - dst.y = dst.y - 1.0 - - if (dst.y > 0) - pc = [matching BGNFOR instruction] + 1 - endif - - Note: The destination must be a loop register. - -.. note:: - - Considered for cleanup. - -.. note:: - - Considered for removal. - -.. opcode:: ENDREP - End Repeat - - TBD - - .. opcode:: PUSHA - Push Address Register On Stack push(src.x) diff --git a/src/gallium/drivers/cell/spu/spu_exec.c b/src/gallium/drivers/cell/spu/spu_exec.c index d2166a49016..d7788bd9bbb 100644 --- a/src/gallium/drivers/cell/spu/spu_exec.c +++ b/src/gallium/drivers/cell/spu/spu_exec.c @@ -1622,14 +1622,6 @@ exec_instruction( *pc = -1; break; - case TGSI_OPCODE_REP: - ASSERT (0); - break; - - case TGSI_OPCODE_ENDREP: - ASSERT (0); - break; - case TGSI_OPCODE_PUSHA: ASSERT (0); break; @@ -1743,8 +1735,6 @@ exec_instruction( mach->Primitives[mach->Temps[TEMP_PRIMITIVE_I].xyzw[TEMP_PRIMITIVE_C].u[0]] = 0; break; - case TGSI_OPCODE_BGNFOR: - /* fall-through (for now) */ case TGSI_OPCODE_BGNLOOP: /* push LoopMask and ContMasks */ ASSERT(mach->LoopStackTop < TGSI_EXEC_MAX_LOOP_NESTING); @@ -1753,8 +1743,6 @@ exec_instruction( mach->ContStack[mach->ContStackTop++] = mach->ContMask; break; - case TGSI_OPCODE_ENDFOR: - /* fall-through (for now at least) */ case TGSI_OPCODE_ENDLOOP: /* Restore ContMask, but don't pop */ ASSERT(mach->ContStackTop > 0); diff --git a/src/gallium/drivers/failover/fo_context.c b/src/gallium/drivers/failover/fo_context.c index 236c50f4d98..9515cd8938c 100644 --- a/src/gallium/drivers/failover/fo_context.c +++ b/src/gallium/drivers/failover/fo_context.c @@ -39,7 +39,7 @@ static void failover_destroy( struct pipe_context *pipe ) { struct failover_context *failover = failover_context( pipe ); - free( failover ); + FREE( failover ); } diff --git a/src/gallium/drivers/failover/fo_state.c b/src/gallium/drivers/failover/fo_state.c index b682ce6750e..272e683067e 100644 --- a/src/gallium/drivers/failover/fo_state.c +++ b/src/gallium/drivers/failover/fo_state.c @@ -29,6 +29,7 @@ */ #include "util/u_inlines.h" +#include "util/u_memory.h" #include "fo_context.h" @@ -53,7 +54,7 @@ static void * failover_create_blend_state( struct pipe_context *pipe, const struct pipe_blend_state *blend ) { - struct fo_state *state = malloc(sizeof(struct fo_state)); + struct fo_state *state = MALLOC(sizeof(struct fo_state)); struct failover_context *failover = failover_context(pipe); state->sw_state = failover->sw->create_blend_state(failover->sw, blend); @@ -85,7 +86,7 @@ failover_delete_blend_state( struct pipe_context *pipe, failover->hw->delete_blend_state(failover->hw, state->hw_state); state->sw_state = 0; state->hw_state = 0; - free(state); + FREE(state); } static void @@ -129,7 +130,7 @@ static void * failover_create_depth_stencil_state(struct pipe_context *pipe, const struct pipe_depth_stencil_alpha_state *templ) { - struct fo_state *state = malloc(sizeof(struct fo_state)); + struct fo_state *state = MALLOC(sizeof(struct fo_state)); struct failover_context *failover = failover_context(pipe); state->sw_state = failover->sw->create_depth_stencil_alpha_state(failover->sw, templ); @@ -161,7 +162,7 @@ failover_delete_depth_stencil_state(struct pipe_context *pipe, failover->hw->delete_depth_stencil_alpha_state(failover->hw, state->hw_state); state->sw_state = 0; state->hw_state = 0; - free(state); + FREE(state); } static void @@ -181,7 +182,7 @@ static void * failover_create_fs_state(struct pipe_context *pipe, const struct pipe_shader_state *templ) { - struct fo_state *state = malloc(sizeof(struct fo_state)); + struct fo_state *state = MALLOC(sizeof(struct fo_state)); struct failover_context *failover = failover_context(pipe); state->sw_state = failover->sw->create_fs_state(failover->sw, templ); @@ -212,14 +213,14 @@ failover_delete_fs_state(struct pipe_context *pipe, failover->hw->delete_fs_state(failover->hw, state->hw_state); state->sw_state = 0; state->hw_state = 0; - free(state); + FREE(state); } static void * failover_create_vs_state(struct pipe_context *pipe, const struct pipe_shader_state *templ) { - struct fo_state *state = malloc(sizeof(struct fo_state)); + struct fo_state *state = MALLOC(sizeof(struct fo_state)); struct failover_context *failover = failover_context(pipe); state->sw_state = failover->sw->create_vs_state(failover->sw, templ); @@ -252,7 +253,7 @@ failover_delete_vs_state(struct pipe_context *pipe, failover->hw->delete_vs_state(failover->hw, state->hw_state); state->sw_state = 0; state->hw_state = 0; - free(state); + FREE(state); } @@ -262,7 +263,7 @@ failover_create_vertex_elements_state( struct pipe_context *pipe, unsigned count, const struct pipe_vertex_element *velems ) { - struct fo_state *state = malloc(sizeof(struct fo_state)); + struct fo_state *state = MALLOC(sizeof(struct fo_state)); struct failover_context *failover = failover_context(pipe); state->sw_state = failover->sw->create_vertex_elements_state(failover->sw, count, velems); @@ -295,7 +296,7 @@ failover_delete_vertex_elements_state( struct pipe_context *pipe, failover->hw->delete_vertex_elements_state(failover->hw, state->hw_state); state->sw_state = 0; state->hw_state = 0; - free(state); + FREE(state); } static void @@ -315,7 +316,7 @@ static void * failover_create_rasterizer_state(struct pipe_context *pipe, const struct pipe_rasterizer_state *templ) { - struct fo_state *state = malloc(sizeof(struct fo_state)); + struct fo_state *state = MALLOC(sizeof(struct fo_state)); struct failover_context *failover = failover_context(pipe); state->sw_state = failover->sw->create_rasterizer_state(failover->sw, templ); @@ -348,7 +349,7 @@ failover_delete_rasterizer_state(struct pipe_context *pipe, failover->hw->delete_rasterizer_state(failover->hw, state->hw_state); state->sw_state = 0; state->hw_state = 0; - free(state); + FREE(state); } @@ -369,7 +370,7 @@ static void * failover_create_sampler_state(struct pipe_context *pipe, const struct pipe_sampler_state *templ) { - struct fo_state *state = malloc(sizeof(struct fo_state)); + struct fo_state *state = MALLOC(sizeof(struct fo_state)); struct failover_context *failover = failover_context(pipe); state->sw_state = failover->sw->create_sampler_state(failover->sw, templ); @@ -443,7 +444,7 @@ failover_delete_sampler_state(struct pipe_context *pipe, void *sampler) failover->hw->delete_sampler_state(failover->hw, state->hw_state); state->sw_state = 0; state->hw_state = 0; - free(state); + FREE(state); } @@ -452,7 +453,7 @@ failover_create_sampler_view(struct pipe_context *pipe, struct pipe_resource *texture, const struct pipe_sampler_view *templ) { - struct fo_sampler_view *view = malloc(sizeof(struct fo_sampler_view)); + struct fo_sampler_view *view = MALLOC(sizeof(struct fo_sampler_view)); struct failover_context *failover = failover_context(pipe); view->sw = failover->sw->create_sampler_view(failover->sw, texture, templ); @@ -478,7 +479,7 @@ failover_sampler_view_destroy(struct pipe_context *pipe, failover->hw->sampler_view_destroy(failover->hw, fo_view->hw); pipe_resource_reference(&fo_view->base.texture, NULL); - free(fo_view); + FREE(fo_view); } static void diff --git a/src/gallium/drivers/i965/brw_curbe.c b/src/gallium/drivers/i965/brw_curbe.c index 323af16b145..a701de33f5d 100644 --- a/src/gallium/drivers/i965/brw_curbe.c +++ b/src/gallium/drivers/i965/brw_curbe.c @@ -168,7 +168,7 @@ static enum pipe_error prepare_curbe_buffer(struct brw_context *brw) if (sz == 0) { if (brw->curbe.last_buf) { - free(brw->curbe.last_buf); + FREE(brw->curbe.last_buf); brw->curbe.last_buf = NULL; brw->curbe.last_bufsz = 0; } diff --git a/src/gallium/drivers/i965/brw_state_batch.c b/src/gallium/drivers/i965/brw_state_batch.c index 7d212e5c247..ce5ed0a9ed2 100644 --- a/src/gallium/drivers/i965/brw_state_batch.c +++ b/src/gallium/drivers/i965/brw_state_batch.c @@ -84,8 +84,8 @@ void brw_clear_batch_cache( struct brw_context *brw ) while (item) { struct brw_cached_batch_item *next = item->next; - free((void *)item->header); - free(item); + FREE((void *)item->header); + FREE(item); item = next; } diff --git a/src/gallium/drivers/i965/intel_decode.c b/src/gallium/drivers/i965/intel_decode.c index 6c47415cac5..bd8b9174a89 100644 --- a/src/gallium/drivers/i965/intel_decode.c +++ b/src/gallium/drivers/i965/intel_decode.c @@ -40,6 +40,7 @@ #include <stdint.h> #include <string.h> +#include "util/u_string.h" #include "intel_decode.h" /*#include "intel_chipset.h"*/ @@ -478,7 +479,7 @@ i915_get_instruction_src0(const uint32_t *data, int i, char *srcname) char swizzle[100]; i915_get_instruction_src_name((a0 >> 7) & 0x7, src_nr, srcname); - sprintf(swizzle, ".%s%s%s%s", swizzle_x, swizzle_y, swizzle_z, swizzle_w); + util_snprintf(swizzle, sizeof(swizzle), ".%s%s%s%s", swizzle_x, swizzle_y, swizzle_z, swizzle_w); if (strcmp(swizzle, ".xyzw") != 0) strcat(srcname, swizzle); } @@ -496,7 +497,7 @@ i915_get_instruction_src1(const uint32_t *data, int i, char *srcname) char swizzle[100]; i915_get_instruction_src_name((a1 >> 13) & 0x7, src_nr, srcname); - sprintf(swizzle, ".%s%s%s%s", swizzle_x, swizzle_y, swizzle_z, swizzle_w); + util_snprintf(swizzle, sizeof(swizzle), ".%s%s%s%s", swizzle_x, swizzle_y, swizzle_z, swizzle_w); if (strcmp(swizzle, ".xyzw") != 0) strcat(srcname, swizzle); } @@ -513,7 +514,7 @@ i915_get_instruction_src2(const uint32_t *data, int i, char *srcname) char swizzle[100]; i915_get_instruction_src_name((a2 >> 21) & 0x7, src_nr, srcname); - sprintf(swizzle, ".%s%s%s%s", swizzle_x, swizzle_y, swizzle_z, swizzle_w); + util_snprintf(swizzle, sizeof(swizzle), ".%s%s%s%s", swizzle_x, swizzle_y, swizzle_z, swizzle_w); if (strcmp(swizzle, ".xyzw") != 0) strcat(srcname, swizzle); } @@ -642,7 +643,7 @@ i915_decode_dcl(const uint32_t *data, uint32_t hw_offset, int i, char *instr_pre switch ((d0 >> 19) & 0x3) { case 1: - sprintf(dcl_mask, ".%s%s%s%s", dcl_x, dcl_y, dcl_z, dcl_w); + util_snprintf(dcl_mask, sizeof(dcl_mask), ".%s%s%s%s", dcl_x, dcl_y, dcl_z, dcl_w); if (strcmp(dcl_mask, ".") == 0) fprintf(out, "bad (empty) dcl mask\n"); @@ -976,7 +977,7 @@ decode_3d_1d(const uint32_t *data, int count, uint32_t hw_offset, int *failures, if (i + 3 >= count) BUFFER_FAIL(count, len, "3DSTATE_PIXEL_SHADER_PROGRAM"); - sprintf(instr_prefix, "PS%03d", instr); + util_snprintf(instr_prefix, sizeof(instr_prefix), "PS%03d", instr); i915_decode_instruction(data, hw_offset, i, instr_prefix); i += 3; } diff --git a/src/gallium/drivers/identity/id_context.c b/src/gallium/drivers/identity/id_context.c index 630cdb5e491..0bc8bf21966 100644 --- a/src/gallium/drivers/identity/id_context.c +++ b/src/gallium/drivers/identity/id_context.c @@ -42,7 +42,7 @@ identity_destroy(struct pipe_context *_pipe) pipe->destroy(pipe); - free(id_pipe); + FREE(id_pipe); } static void @@ -708,7 +708,7 @@ identity_create_sampler_view(struct pipe_context *pipe, struct identity_resource *id_resource = identity_resource(texture); struct pipe_context *pipe_unwrapped = id_pipe->pipe; struct pipe_resource *texture_unwrapped = id_resource->resource; - struct identity_sampler_view *view = malloc(sizeof(struct identity_sampler_view)); + struct identity_sampler_view *view = MALLOC(sizeof(struct identity_sampler_view)); view->sampler_view = pipe_unwrapped->create_sampler_view(pipe_unwrapped, texture_unwrapped, @@ -736,7 +736,7 @@ identity_sampler_view_destroy(struct pipe_context *pipe, view_unwrapped); pipe_resource_reference(&view->texture, NULL); - free(view); + FREE(view); } static struct pipe_transfer * diff --git a/src/gallium/drivers/identity/id_drm.c b/src/gallium/drivers/identity/id_drm.c index d332c36af26..a9d41af18c7 100644 --- a/src/gallium/drivers/identity/id_drm.c +++ b/src/gallium/drivers/identity/id_drm.c @@ -68,7 +68,7 @@ identity_drm_destroy(struct drm_api *_api) struct drm_api *api = id_api->api; api->destroy(api); - free(id_api); + FREE(id_api); } struct drm_api * diff --git a/src/gallium/drivers/llvmpipe/Makefile b/src/gallium/drivers/llvmpipe/Makefile index 4a3fc036c49..4ea367597e1 100644 --- a/src/gallium/drivers/llvmpipe/Makefile +++ b/src/gallium/drivers/llvmpipe/Makefile @@ -40,7 +40,7 @@ C_SOURCES = \ lp_state_vertex.c \ lp_state_vs.c \ lp_surface.c \ - lp_tex_sample_llvm.c \ + lp_tex_sample.c \ lp_texture.c \ lp_tile_image.c \ lp_tile_soa.c @@ -58,8 +58,9 @@ include ../../Makefile.template lp_tile_soa.c: lp_tile_soa.py ../../auxiliary/util/u_format_parse.py ../../auxiliary/util/u_format_pack.py ../../auxiliary/util/u_format.csv python lp_tile_soa.py ../../auxiliary/util/u_format.csv > $@ - -LIBS += $(GL_LIB_DEPS) -L../../auxiliary/ -lgallium libllvmpipe.a +LDFLAGS += $(LLVM_LDFLAGS) +LIBS += $(GL_LIB_DEPS) -L../../auxiliary/ -lgallium libllvmpipe.a $(LLVM_LIBS) +LD=g++ $(PROGS): lp_test_main.o libllvmpipe.a diff --git a/src/gallium/drivers/llvmpipe/SConscript b/src/gallium/drivers/llvmpipe/SConscript index b9e9826e2a3..2911cf2179a 100644 --- a/src/gallium/drivers/llvmpipe/SConscript +++ b/src/gallium/drivers/llvmpipe/SConscript @@ -60,7 +60,7 @@ llvmpipe = env.ConvenienceLibrary( 'lp_state_vertex.c', 'lp_state_vs.c', 'lp_surface.c', - 'lp_tex_sample_llvm.c', + 'lp_tex_sample.c', 'lp_texture.c', 'lp_tile_image.c', 'lp_tile_soa.c', diff --git a/src/gallium/drivers/llvmpipe/lp_context.c b/src/gallium/drivers/llvmpipe/lp_context.c index f7cf06d8d46..32b80d3a9f6 100644 --- a/src/gallium/drivers/llvmpipe/lp_context.c +++ b/src/gallium/drivers/llvmpipe/lp_context.c @@ -97,63 +97,24 @@ llvmpipe_create_context( struct pipe_screen *screen, void *priv ) llvmpipe->pipe.winsys = screen->winsys; llvmpipe->pipe.screen = screen; llvmpipe->pipe.priv = priv; - llvmpipe->pipe.destroy = llvmpipe_destroy; - - /* state setters */ - llvmpipe->pipe.create_blend_state = llvmpipe_create_blend_state; - llvmpipe->pipe.bind_blend_state = llvmpipe_bind_blend_state; - llvmpipe->pipe.delete_blend_state = llvmpipe_delete_blend_state; - - llvmpipe->pipe.create_sampler_state = llvmpipe_create_sampler_state; - llvmpipe->pipe.bind_fragment_sampler_states = llvmpipe_bind_sampler_states; - llvmpipe->pipe.bind_vertex_sampler_states = llvmpipe_bind_vertex_sampler_states; - llvmpipe->pipe.delete_sampler_state = llvmpipe_delete_sampler_state; - - llvmpipe->pipe.create_depth_stencil_alpha_state = llvmpipe_create_depth_stencil_state; - llvmpipe->pipe.bind_depth_stencil_alpha_state = llvmpipe_bind_depth_stencil_state; - llvmpipe->pipe.delete_depth_stencil_alpha_state = llvmpipe_delete_depth_stencil_state; - - llvmpipe->pipe.create_rasterizer_state = llvmpipe_create_rasterizer_state; - llvmpipe->pipe.bind_rasterizer_state = llvmpipe_bind_rasterizer_state; - llvmpipe->pipe.delete_rasterizer_state = llvmpipe_delete_rasterizer_state; - - llvmpipe->pipe.create_fs_state = llvmpipe_create_fs_state; - llvmpipe->pipe.bind_fs_state = llvmpipe_bind_fs_state; - llvmpipe->pipe.delete_fs_state = llvmpipe_delete_fs_state; - - llvmpipe->pipe.create_vs_state = llvmpipe_create_vs_state; - llvmpipe->pipe.bind_vs_state = llvmpipe_bind_vs_state; - llvmpipe->pipe.delete_vs_state = llvmpipe_delete_vs_state; - llvmpipe->pipe.create_vertex_elements_state = llvmpipe_create_vertex_elements_state; - llvmpipe->pipe.bind_vertex_elements_state = llvmpipe_bind_vertex_elements_state; - llvmpipe->pipe.delete_vertex_elements_state = llvmpipe_delete_vertex_elements_state; - - llvmpipe->pipe.set_blend_color = llvmpipe_set_blend_color; - llvmpipe->pipe.set_stencil_ref = llvmpipe_set_stencil_ref; - llvmpipe->pipe.set_clip_state = llvmpipe_set_clip_state; - llvmpipe->pipe.set_constant_buffer = llvmpipe_set_constant_buffer; + /* Init the pipe context methods */ + llvmpipe->pipe.destroy = llvmpipe_destroy; llvmpipe->pipe.set_framebuffer_state = llvmpipe_set_framebuffer_state; - llvmpipe->pipe.set_polygon_stipple = llvmpipe_set_polygon_stipple; - llvmpipe->pipe.set_scissor_state = llvmpipe_set_scissor_state; - llvmpipe->pipe.set_fragment_sampler_views = llvmpipe_set_fragment_sampler_views; - llvmpipe->pipe.set_vertex_sampler_views = llvmpipe_set_vertex_sampler_views; - llvmpipe->pipe.create_sampler_view = llvmpipe_create_sampler_view; - llvmpipe->pipe.sampler_view_destroy = llvmpipe_sampler_view_destroy; - llvmpipe->pipe.set_viewport_state = llvmpipe_set_viewport_state; - - llvmpipe->pipe.set_vertex_buffers = llvmpipe_set_vertex_buffers; - - llvmpipe->pipe.draw_arrays = llvmpipe_draw_arrays; - llvmpipe->pipe.draw_elements = llvmpipe_draw_elements; - llvmpipe->pipe.draw_range_elements = llvmpipe_draw_range_elements; - llvmpipe->pipe.clear = llvmpipe_clear; llvmpipe->pipe.flush = llvmpipe_flush; - + llvmpipe_init_blend_funcs(llvmpipe); + llvmpipe_init_clip_funcs(llvmpipe); + llvmpipe_init_draw_funcs(llvmpipe); + llvmpipe_init_sampler_funcs(llvmpipe); llvmpipe_init_query_funcs( llvmpipe ); + llvmpipe_init_vertex_funcs(llvmpipe); + llvmpipe_init_fs_funcs(llvmpipe); + llvmpipe_init_vs_funcs(llvmpipe); + llvmpipe_init_rasterizer_funcs(llvmpipe); llvmpipe_init_context_resource_funcs( &llvmpipe->pipe ); + llvmpipe_init_surface_functions(llvmpipe); /* * Create drawing context and plug our rendering stage into it. @@ -186,8 +147,6 @@ llvmpipe_create_context( struct pipe_screen *screen, void *priv ) draw_install_pstipple_stage(llvmpipe->draw, &llvmpipe->pipe); #endif - lp_init_surface_functions(llvmpipe); - lp_reset_counters(); return &llvmpipe->pipe; diff --git a/src/gallium/drivers/llvmpipe/lp_context.h b/src/gallium/drivers/llvmpipe/lp_context.h index 4848101ffb8..4e597b24796 100644 --- a/src/gallium/drivers/llvmpipe/lp_context.h +++ b/src/gallium/drivers/llvmpipe/lp_context.h @@ -94,9 +94,6 @@ struct llvmpipe_context { /** Vertex format */ struct vertex_info vertex_info; - /** Which vertex shader output slot contains point size */ - int psize_slot; - /** The tiling engine */ struct lp_setup_context *setup; diff --git a/src/gallium/drivers/llvmpipe/lp_draw_arrays.c b/src/gallium/drivers/llvmpipe/lp_draw_arrays.c index 0b63e1c889e..98780d7631b 100644 --- a/src/gallium/drivers/llvmpipe/lp_draw_arrays.c +++ b/src/gallium/drivers/llvmpipe/lp_draw_arrays.c @@ -42,20 +42,12 @@ -void -llvmpipe_draw_arrays(struct pipe_context *pipe, unsigned mode, - unsigned start, unsigned count) -{ - llvmpipe_draw_elements(pipe, NULL, 0, 0, mode, start, count); -} - - /** * Draw vertex arrays, with optional indexing. * Basically, map the vertex buffers (and drawing surfaces), then hand off * the drawing to the 'draw' module. */ -void +static void llvmpipe_draw_range_elements(struct pipe_context *pipe, struct pipe_resource *indexBuffer, unsigned indexSize, @@ -115,7 +107,7 @@ llvmpipe_draw_range_elements(struct pipe_context *pipe, } -void +static void llvmpipe_draw_elements(struct pipe_context *pipe, struct pipe_resource *indexBuffer, unsigned indexSize, @@ -128,3 +120,19 @@ llvmpipe_draw_elements(struct pipe_context *pipe, mode, start, count ); } + +static void +llvmpipe_draw_arrays(struct pipe_context *pipe, unsigned mode, + unsigned start, unsigned count) +{ + llvmpipe_draw_elements(pipe, NULL, 0, 0, mode, start, count); +} + + +void +llvmpipe_init_draw_funcs(struct llvmpipe_context *llvmpipe) +{ + llvmpipe->pipe.draw_arrays = llvmpipe_draw_arrays; + llvmpipe->pipe.draw_elements = llvmpipe_draw_elements; + llvmpipe->pipe.draw_range_elements = llvmpipe_draw_range_elements; +} diff --git a/src/gallium/drivers/llvmpipe/lp_flush.c b/src/gallium/drivers/llvmpipe/lp_flush.c index 3627dbd759c..644b821957a 100644 --- a/src/gallium/drivers/llvmpipe/lp_flush.c +++ b/src/gallium/drivers/llvmpipe/lp_flush.c @@ -96,41 +96,40 @@ llvmpipe_flush( struct pipe_context *pipe, /** * Flush context if necessary. * - * TODO: move this logic to an auxiliary library? + * Returns FALSE if it would have block, but do_not_block was set, TRUE + * otherwise. * - * FIXME: We must implement DISCARD/DONTBLOCK/UNSYNCHRONIZED/etc for - * textures to avoid blocking. + * TODO: move this logic to an auxiliary library? */ boolean -llvmpipe_flush_texture(struct pipe_context *pipe, - struct pipe_resource *texture, - unsigned face, - unsigned level, - unsigned flush_flags, - boolean read_only, - boolean cpu_access, - boolean do_not_flush) +llvmpipe_flush_resource(struct pipe_context *pipe, + struct pipe_resource *resource, + unsigned face, + unsigned level, + unsigned flush_flags, + boolean read_only, + boolean cpu_access, + boolean do_not_block) { unsigned referenced; - referenced = pipe->is_resource_referenced(pipe, texture, face, level); + referenced = pipe->is_resource_referenced(pipe, resource, face, level); if ((referenced & PIPE_REFERENCED_FOR_WRITE) || ((referenced & PIPE_REFERENCED_FOR_READ) && !read_only)) { - if (do_not_flush) - return FALSE; - - /* - * TODO: The semantics of these flush flags are too obtuse. They should - * disappear and the pipe driver should just ensure that all visible - * side-effects happen when they need to happen. - */ - if (referenced & PIPE_REFERENCED_FOR_WRITE) - flush_flags |= PIPE_FLUSH_RENDER_CACHE; + if (resource->target != PIPE_BUFFER) { + /* + * TODO: The semantics of these flush flags are too obtuse. They should + * disappear and the pipe driver should just ensure that all visible + * side-effects happen when they need to happen. + */ + if (referenced & PIPE_REFERENCED_FOR_WRITE) + flush_flags |= PIPE_FLUSH_RENDER_CACHE; - if (referenced & PIPE_REFERENCED_FOR_READ) - flush_flags |= PIPE_FLUSH_TEXTURE_CACHE; + if (referenced & PIPE_REFERENCED_FOR_READ) + flush_flags |= PIPE_FLUSH_TEXTURE_CACHE; + } if (cpu_access) { /* @@ -139,6 +138,9 @@ llvmpipe_flush_texture(struct pipe_context *pipe, struct pipe_fence_handle *fence = NULL; + if (do_not_block) + return FALSE; + pipe->flush(pipe, flush_flags, &fence); if (fence) { diff --git a/src/gallium/drivers/llvmpipe/lp_flush.h b/src/gallium/drivers/llvmpipe/lp_flush.h index 2375d22b854..7b605681a93 100644 --- a/src/gallium/drivers/llvmpipe/lp_flush.h +++ b/src/gallium/drivers/llvmpipe/lp_flush.h @@ -33,17 +33,18 @@ struct pipe_context; struct pipe_fence_handle; -void llvmpipe_flush(struct pipe_context *pipe, unsigned flags, - struct pipe_fence_handle **fence); +void +llvmpipe_flush(struct pipe_context *pipe, unsigned flags, + struct pipe_fence_handle **fence); boolean -llvmpipe_flush_texture(struct pipe_context *pipe, - struct pipe_resource *texture, - unsigned face, - unsigned level, - unsigned flush_flags, - boolean read_only, - boolean cpu_access, - boolean do_not_flush); +llvmpipe_flush_resource(struct pipe_context *pipe, + struct pipe_resource *resource, + unsigned face, + unsigned level, + unsigned flush_flags, + boolean read_only, + boolean cpu_access, + boolean do_not_block); #endif diff --git a/src/gallium/drivers/llvmpipe/lp_jit.c b/src/gallium/drivers/llvmpipe/lp_jit.c index 8690941a507..466a2f54fbe 100644 --- a/src/gallium/drivers/llvmpipe/lp_jit.c +++ b/src/gallium/drivers/llvmpipe/lp_jit.c @@ -171,15 +171,6 @@ lp_jit_screen_cleanup(struct llvmpipe_screen *screen) void lp_jit_screen_init(struct llvmpipe_screen *screen) { - util_cpu_detect(); - -#if 0 - /* For simulating less capable machines */ - util_cpu_caps.has_sse3 = 0; - util_cpu_caps.has_ssse3 = 0; - util_cpu_caps.has_sse4_1 = 0; -#endif - lp_build_init(); screen->module = lp_build_module; diff --git a/src/gallium/drivers/llvmpipe/lp_tile_size.h b/src/gallium/drivers/llvmpipe/lp_limits.h index f0b983c0632..4102a9df67c 100644 --- a/src/gallium/drivers/llvmpipe/lp_tile_size.h +++ b/src/gallium/drivers/llvmpipe/lp_limits.h @@ -25,8 +25,12 @@ * **************************************************************************/ -#ifndef LP_TILE_SIZE_H -#define LP_TILE_SIZE_H +/** + * Implementation limits for LLVMpipe driver. + */ + +#ifndef LP_LIMITS_H +#define LP_LIMITS_H /** @@ -36,4 +40,31 @@ #define TILE_SIZE (1 << TILE_ORDER) -#endif +/** + * Max texture sizes + */ +#define LP_MAX_TEXTURE_2D_LEVELS 13 /* 4K x 4K for now */ +#define LP_MAX_TEXTURE_3D_LEVELS 10 /* 512 x 512 x 512 for now */ + + +/** This must be the larger of LP_MAX_TEXTURE_2D/3D_LEVELS */ +#define LP_MAX_TEXTURE_LEVELS LP_MAX_TEXTURE_2D_LEVELS + + +/** + * Max drawing surface size is the max texture size + */ +#define LP_MAX_HEIGHT (1 << (LP_MAX_TEXTURE_LEVELS - 1)) +#define LP_MAX_WIDTH (1 << (LP_MAX_TEXTURE_LEVELS - 1)) + + +#define LP_MAX_THREADS 8 + + +/** + * Max bytes per scene. This may be replaced by a runtime parameter. + */ +#define LP_MAX_SCENE_SIZE (512 * 1024 * 1024) + + +#endif /* LP_LIMITS_H */ diff --git a/src/gallium/drivers/llvmpipe/lp_rast.c b/src/gallium/drivers/llvmpipe/lp_rast.c index 4046701b85a..a00a592f2fe 100644 --- a/src/gallium/drivers/llvmpipe/lp_rast.c +++ b/src/gallium/drivers/llvmpipe/lp_rast.c @@ -28,7 +28,6 @@ #include <limits.h> #include "util/u_memory.h" #include "util/u_math.h" -#include "util/u_cpu_detect.h" #include "util/u_surface.h" #include "lp_scene_queue.h" @@ -122,9 +121,11 @@ lp_rast_end( struct lp_rasterizer *rast ) rast->curr_scene = NULL; +#ifdef DEBUG if (0) - printf("Post render scene: tile read: %d tile write: %d\n", - tile_read_count, tile_write_count); + debug_printf("Post render scene: tile unswizzle: %u tile swizzle: %u\n", + lp_tile_unswizzle_count, lp_tile_swizzle_count); +#endif } @@ -869,20 +870,6 @@ create_rast_threads(struct lp_rasterizer *rast) { unsigned i; -#ifdef PIPE_OS_WINDOWS - /* Multithreading not supported on windows until conditions and barriers are - * properly implemented. */ - rast->num_threads = 0; -#else -#ifdef PIPE_OS_EMBEDDED - rast->num_threads = 0; -#else - rast->num_threads = util_cpu_caps.nr_cpus; -#endif - rast->num_threads = debug_get_num_option("LP_NUM_THREADS", rast->num_threads); - rast->num_threads = MIN2(rast->num_threads, MAX_THREADS); -#endif - /* NOTE: if num_threads is zero, we won't use any threads */ for (i = 0; i < rast->num_threads; i++) { pipe_semaphore_init(&rast->tasks[i].work_ready, 0); @@ -895,12 +882,12 @@ create_rast_threads(struct lp_rasterizer *rast) /** - * Create new lp_rasterizer. - * \param empty the queue to put empty scenes on after we've finished - * processing them. + * Create new lp_rasterizer. If num_threads is zero, don't create any + * new threads, do rendering synchronously. + * \param num_threads number of rasterizer threads to create */ struct lp_rasterizer * -lp_rast_create( void ) +lp_rast_create( unsigned num_threads ) { struct lp_rasterizer *rast; unsigned i; @@ -917,6 +904,8 @@ lp_rast_create( void ) task->thread_index = i; } + rast->num_threads = num_threads; + create_rast_threads(rast); /* for synchronizing rasterization threads */ @@ -955,6 +944,8 @@ void lp_rast_destroy( struct lp_rasterizer *rast ) /* for synchronizing rasterization threads */ pipe_barrier_destroy( &rast->barrier ); + lp_scene_queue_destroy(rast->full_scenes); + FREE(rast); } diff --git a/src/gallium/drivers/llvmpipe/lp_rast.h b/src/gallium/drivers/llvmpipe/lp_rast.h index a0ecb2fc47f..e2f6f926779 100644 --- a/src/gallium/drivers/llvmpipe/lp_rast.h +++ b/src/gallium/drivers/llvmpipe/lp_rast.h @@ -134,7 +134,7 @@ struct lp_rast_triangle { struct lp_rasterizer * -lp_rast_create( void ); +lp_rast_create( unsigned num_threads ); void lp_rast_destroy( struct lp_rasterizer * ); diff --git a/src/gallium/drivers/llvmpipe/lp_rast_priv.h b/src/gallium/drivers/llvmpipe/lp_rast_priv.h index 8bf2b92a6ab..5884d12721e 100644 --- a/src/gallium/drivers/llvmpipe/lp_rast_priv.h +++ b/src/gallium/drivers/llvmpipe/lp_rast_priv.h @@ -35,9 +35,7 @@ #include "lp_scene.h" #include "lp_texture.h" #include "lp_tile_soa.h" - - -#define MAX_THREADS 8 /* XXX probably temporary here */ +#include "lp_limits.h" struct lp_rasterizer; @@ -107,16 +105,16 @@ struct lp_rasterizer * (potentially) shared, these empty scenes should be returned to * the context which created them rather than retained here. */ - struct lp_scene_queue *empty_scenes; + /* struct lp_scene_queue *empty_scenes; */ /** The scene currently being rasterized by the threads */ struct lp_scene *curr_scene; /** A task object for each rasterization thread */ - struct lp_rasterizer_task tasks[MAX_THREADS]; + struct lp_rasterizer_task tasks[LP_MAX_THREADS]; unsigned num_threads; - pipe_thread threads[MAX_THREADS]; + pipe_thread threads[LP_MAX_THREADS]; /** For synchronizing the rasterization threads */ pipe_barrier barrier; diff --git a/src/gallium/drivers/llvmpipe/lp_scene.c b/src/gallium/drivers/llvmpipe/lp_scene.c index 182e7cb2303..1482a777ff8 100644 --- a/src/gallium/drivers/llvmpipe/lp_scene.c +++ b/src/gallium/drivers/llvmpipe/lp_scene.c @@ -32,9 +32,20 @@ #include "util/u_surface.h" #include "lp_scene.h" #include "lp_scene_queue.h" -#include "lp_debug.h" +/** List of texture references */ +struct texture_ref { + struct pipe_resource *texture; + struct texture_ref *prev, *next; /**< linked list w/ u_simple_list.h */ +}; + + + +/** + * Create a new scene object. + * \param queue the queue to put newly rendered/emptied scenes into + */ struct lp_scene * lp_scene_create( struct pipe_context *pipe, struct lp_scene_queue *queue ) @@ -57,7 +68,7 @@ lp_scene_create( struct pipe_context *pipe, scene->data.head = scene->data.tail = CALLOC_STRUCT(data_block); - make_empty_list(&scene->textures); + make_empty_list(&scene->resources); pipe_mutex_init(scene->mutex); @@ -66,7 +77,7 @@ lp_scene_create( struct pipe_context *pipe, /** - * Free all data associated with the given scene, and free(scene). + * Free all data associated with the given scene, and the scene itself. */ void lp_scene_destroy(struct lp_scene *scene) @@ -178,15 +189,17 @@ lp_scene_reset(struct lp_scene *scene ) /* Release texture refs */ { - struct texture_ref *ref, *next, *ref_list = &scene->textures; + struct resource_ref *ref, *next, *ref_list = &scene->resources; for (ref = ref_list->next; ref != ref_list; ref = next) { next = next_elem(ref); - pipe_resource_reference(&ref->texture, NULL); + pipe_resource_reference(&ref->resource, NULL); FREE(ref); } make_empty_list(ref_list); } + scene->scene_size = 0; + scene->has_color_clear = FALSE; scene->has_depth_clear = FALSE; } @@ -218,7 +231,10 @@ lp_bin_new_data_block( struct data_block_list *list ) } -/** Return number of bytes used for all bin data within a scene */ +/** + * Return number of bytes used for all bin data within a scene. + * This does not include resources (textures) referenced by the scene. + */ unsigned lp_scene_data_size( const struct lp_scene *scene ) { @@ -247,32 +263,34 @@ lp_scene_bin_size( const struct lp_scene *scene, unsigned x, unsigned y ) /** - * Add a reference to a texture by the scene. + * Add a reference to a resource by the scene. */ void -lp_scene_texture_reference( struct lp_scene *scene, - struct pipe_resource *texture ) +lp_scene_add_resource_reference(struct lp_scene *scene, + struct pipe_resource *resource) { - struct texture_ref *ref = CALLOC_STRUCT(texture_ref); + struct resource_ref *ref = CALLOC_STRUCT(resource_ref); if (ref) { - struct texture_ref *ref_list = &scene->textures; - pipe_resource_reference(&ref->texture, texture); + struct resource_ref *ref_list = &scene->resources; + pipe_resource_reference(&ref->resource, resource); insert_at_tail(ref_list, ref); } + + scene->scene_size += llvmpipe_resource_size(resource); } /** - * Does this scene have a reference to the given texture? + * Does this scene have a reference to the given resource? */ boolean -lp_scene_is_resource_referenced( const struct lp_scene *scene, - const struct pipe_resource *texture ) +lp_scene_is_resource_referenced(const struct lp_scene *scene, + const struct pipe_resource *resource) { - const struct texture_ref *ref_list = &scene->textures; - const struct texture_ref *ref; + const struct resource_ref *ref_list = &scene->resources; + const struct resource_ref *ref; foreach (ref, ref_list) { - if (ref->texture == texture) + if (ref->resource == resource) return TRUE; } return FALSE; @@ -393,61 +411,6 @@ end: } - -/** - * Prepare this scene for the rasterizer. - * Map the framebuffer surfaces. Initialize the 'rast' state. - */ -static boolean -lp_scene_map_buffers( struct lp_scene *scene ) -{ - LP_DBG(DEBUG_RAST, "%s\n", __FUNCTION__); - - /* XXX framebuffer surfaces are no longer mapped here */ - /* XXX move all map/unmap stuff into rast module... */ - - return TRUE; -} - - - -/** - * Called after rasterizer as finished rasterizing a scene. - * - * We want to call this from the pipe_context's current thread to - * avoid having to have mutexes on the transfer functions. - */ -static void -lp_scene_unmap_buffers( struct lp_scene *scene ) -{ -#if 0 - unsigned i; - - for (i = 0; i < scene->fb.nr_cbufs; i++) { - if (scene->cbuf_map[i]) { - struct pipe_surface *cbuf = scene->fb.cbufs[i]; - llvmpipe_resource_unmap(cbuf->texture, - cbuf->face, - cbuf->level, - cbuf->zslice); - scene->cbuf_map[i] = NULL; - } - } - - if (scene->zsbuf_map) { - struct pipe_surface *zsbuf = scene->fb.zsbuf; - llvmpipe_resource_unmap(zsbuf->texture, - zsbuf->face, - zsbuf->level, - zsbuf->zslice); - scene->zsbuf_map = NULL; - } -#endif - - util_unreference_framebuffer_state( &scene->fb ); -} - - void lp_scene_begin_binning( struct lp_scene *scene, struct pipe_framebuffer_state *fb ) { @@ -464,8 +427,7 @@ void lp_scene_begin_binning( struct lp_scene *scene, void lp_scene_rasterize( struct lp_scene *scene, - struct lp_rasterizer *rast, - boolean write_depth ) + struct lp_rasterizer *rast ) { if (0) { unsigned x, y; @@ -479,11 +441,6 @@ void lp_scene_rasterize( struct lp_scene *scene, } } - scene->write_depth = (scene->fb.zsbuf != NULL && - write_depth); - - lp_scene_map_buffers( scene ); - /* Enqueue the scene for rasterization, then immediately wait for * it to finish. */ @@ -494,6 +451,9 @@ void lp_scene_rasterize( struct lp_scene *scene, * transfers become per-context: */ lp_rast_finish( rast ); - lp_scene_unmap_buffers( scene ); + + util_unreference_framebuffer_state( &scene->fb ); + + /* put scene into the empty list */ lp_scene_enqueue( scene->empty_queue, scene ); } diff --git a/src/gallium/drivers/llvmpipe/lp_scene.h b/src/gallium/drivers/llvmpipe/lp_scene.h index ac0717db6a1..9467cd6f16d 100644 --- a/src/gallium/drivers/llvmpipe/lp_scene.h +++ b/src/gallium/drivers/llvmpipe/lp_scene.h @@ -44,10 +44,8 @@ struct lp_scene_queue; /* We're limited to 2K by 2K for 32bit fixed point rasterization. * Will need a 64-bit version for larger framebuffers. */ -#define MAXHEIGHT 2048 -#define MAXWIDTH 2048 -#define TILES_X (MAXWIDTH / TILE_SIZE) -#define TILES_Y (MAXHEIGHT / TILE_SIZE) +#define TILES_X (LP_MAX_WIDTH / TILE_SIZE) +#define TILES_Y (LP_MAX_HEIGHT / TILE_SIZE) #define CMD_BLOCK_MAX 128 @@ -97,10 +95,10 @@ struct data_block_list { }; -/** List of texture references */ -struct texture_ref { - struct pipe_resource *texture; - struct texture_ref *prev, *next; /**< linked list w/ u_simple_list.h */ +/** List of resource references */ +struct resource_ref { + struct pipe_resource *resource; + struct resource_ref *prev, *next; /**< linked list w/ u_simple_list.h */ }; @@ -118,10 +116,14 @@ struct lp_scene { /** the framebuffer to render the scene into */ struct pipe_framebuffer_state fb; - /** list of textures referenced by the scene commands */ - struct texture_ref textures; + /** list of resources referenced by the scene commands */ + struct resource_ref resources; + + /** Approx memory used by the scene (in bytes). This includes the + * shared and per-tile bins plus any referenced resources/textures. + */ + unsigned scene_size; - boolean write_depth; boolean has_color_clear; boolean has_depth_clear; @@ -164,11 +166,11 @@ unsigned lp_scene_data_size( const struct lp_scene *scene ); unsigned lp_scene_bin_size( const struct lp_scene *scene, unsigned x, unsigned y ); -void lp_scene_texture_reference( struct lp_scene *scene, - struct pipe_resource *texture ); +void lp_scene_add_resource_reference(struct lp_scene *scene, + struct pipe_resource *resource); -boolean lp_scene_is_resource_referenced( const struct lp_scene *scene, - const struct pipe_resource *texture ); +boolean lp_scene_is_resource_referenced(const struct lp_scene *scene, + const struct pipe_resource *resource ); /** @@ -184,6 +186,8 @@ lp_scene_alloc( struct lp_scene *scene, unsigned size) lp_bin_new_data_block( list ); } + scene->scene_size += size; + { struct data_block *tail = list->tail; ubyte *data = tail->data + tail->used; @@ -206,6 +210,8 @@ lp_scene_alloc_aligned( struct lp_scene *scene, unsigned size, lp_bin_new_data_block( list ); } + scene->scene_size += size; + { struct data_block *tail = list->tail; ubyte *data = tail->data + tail->used; @@ -222,6 +228,7 @@ static INLINE void lp_scene_putback_data( struct lp_scene *scene, unsigned size) { struct data_block_list *list = &scene->data; + scene->scene_size -= size; assert(list->tail->used >= size); list->tail->used -= size; } @@ -304,11 +311,18 @@ lp_scene_bin_iter_next( struct lp_scene *scene, int *bin_x, int *bin_y ); void lp_scene_rasterize( struct lp_scene *scene, - struct lp_rasterizer *rast, - boolean write_depth ); + struct lp_rasterizer *rast ); void lp_scene_begin_binning( struct lp_scene *scene, struct pipe_framebuffer_state *fb ); + +static INLINE unsigned +lp_scene_get_size(const struct lp_scene *scene) +{ + return scene->scene_size; +} + + #endif /* LP_BIN_H */ diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c index 6d309c6b647..111eedc4f23 100644 --- a/src/gallium/drivers/llvmpipe/lp_screen.c +++ b/src/gallium/drivers/llvmpipe/lp_screen.c @@ -27,6 +27,8 @@ #include "util/u_memory.h" +#include "util/u_math.h" +#include "util/u_cpu_detect.h" #include "util/u_format.h" #include "util/u_format_s3tc.h" #include "pipe/p_defines.h" @@ -39,6 +41,7 @@ #include "lp_context.h" #include "lp_debug.h" #include "lp_public.h" +#include "lp_limits.h" #include "state_tracker/sw_winsys.h" @@ -94,6 +97,8 @@ llvmpipe_get_param(struct pipe_screen *screen, int param) return 1; case PIPE_CAP_GLSL: return 1; + case PIPE_CAP_SM3: + return 1; case PIPE_CAP_ANISOTROPIC_FILTER: return 0; case PIPE_CAP_POINT_SPRITE: @@ -165,7 +170,7 @@ static boolean llvmpipe_is_format_supported( struct pipe_screen *_screen, enum pipe_format format, enum pipe_texture_target target, - unsigned tex_usage, + unsigned bind, unsigned geom_flags ) { struct llvmpipe_screen *screen = llvmpipe_screen(_screen); @@ -173,7 +178,7 @@ llvmpipe_is_format_supported( struct pipe_screen *_screen, const struct util_format_description *format_desc; format_desc = util_format_description(format); - if(!format_desc) + if (!format_desc) return FALSE; assert(target == PIPE_TEXTURE_1D || @@ -181,45 +186,42 @@ llvmpipe_is_format_supported( struct pipe_screen *_screen, target == PIPE_TEXTURE_3D || target == PIPE_TEXTURE_CUBE); - switch(format) { - case PIPE_FORMAT_DXT1_RGB: - case PIPE_FORMAT_DXT1_RGBA: - case PIPE_FORMAT_DXT3_RGBA: - case PIPE_FORMAT_DXT5_RGBA: - return util_format_s3tc_enabled; - default: - break; - } - - if(tex_usage & PIPE_BIND_RENDER_TARGET) { - if(format_desc->layout != UTIL_FORMAT_LAYOUT_PLAIN) + if (bind & PIPE_BIND_RENDER_TARGET) { + if (format_desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS) return FALSE; - if(format_desc->block.width != 1 || - format_desc->block.height != 1) + if (format_desc->layout != UTIL_FORMAT_LAYOUT_PLAIN) return FALSE; - if(format_desc->colorspace != UTIL_FORMAT_COLORSPACE_RGB && - format_desc->colorspace != UTIL_FORMAT_COLORSPACE_SRGB) + if (format_desc->block.width != 1 || + format_desc->block.height != 1) return FALSE; } - if(tex_usage & (PIPE_BIND_DISPLAY_TARGET | - PIPE_BIND_SCANOUT | - PIPE_BIND_SHARED)) { - if(!winsys->is_displaytarget_format_supported(winsys, tex_usage, format)) + if (bind & PIPE_BIND_DISPLAY_TARGET) { + if(!winsys->is_displaytarget_format_supported(winsys, bind, format)) return FALSE; } - if(tex_usage & PIPE_BIND_DEPTH_STENCIL) { - if(format_desc->colorspace != UTIL_FORMAT_COLORSPACE_ZS) + if (bind & PIPE_BIND_DEPTH_STENCIL) { + if (format_desc->layout != UTIL_FORMAT_LAYOUT_PLAIN) + return FALSE; + + if (format_desc->colorspace != UTIL_FORMAT_COLORSPACE_ZS) return FALSE; /* FIXME: Temporary restriction. See lp_state_fs.c. */ - if(format_desc->block.bits != 32) + if (format_desc->block.bits != 32) return FALSE; } + if (format_desc->layout == UTIL_FORMAT_LAYOUT_S3TC) { + return util_format_s3tc_enabled; + } + + /* + * Everything else should be supported by u_format. + */ return TRUE; } @@ -286,12 +288,26 @@ llvmpipe_create_screen(struct sw_winsys *winsys) screen->base.context_create = llvmpipe_create_context; screen->base.flush_frontbuffer = llvmpipe_flush_frontbuffer; - util_format_s3tc_init(); - llvmpipe_init_screen_resource_funcs(&screen->base); llvmpipe_init_screen_fence_funcs(&screen->base); lp_jit_screen_init(screen); +#ifdef PIPE_OS_WINDOWS + /* Multithreading not supported on windows until conditions and barriers are + * properly implemented. */ + screen->num_threads = 0; +#else +#ifdef PIPE_OS_EMBEDDED + screen->num_threads = 0; +#else + screen->num_threads = util_cpu_caps.nr_cpus; +#endif + screen->num_threads = debug_get_num_option("LP_NUM_THREADS", screen->num_threads); + screen->num_threads = MIN2(screen->num_threads, LP_MAX_THREADS); +#endif + + util_format_s3tc_init(); + return &screen->base; } diff --git a/src/gallium/drivers/llvmpipe/lp_screen.h b/src/gallium/drivers/llvmpipe/lp_screen.h index af25e043cc9..4f394326103 100644 --- a/src/gallium/drivers/llvmpipe/lp_screen.h +++ b/src/gallium/drivers/llvmpipe/lp_screen.h @@ -58,6 +58,8 @@ struct llvmpipe_screen LLVMTypeRef context_ptr_type; + unsigned num_threads; + /* Increments whenever textures are modified. Contexts can track * this. */ diff --git a/src/gallium/drivers/llvmpipe/lp_setup.c b/src/gallium/drivers/llvmpipe/lp_setup.c index 6be13c60a57..21509560084 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup.c +++ b/src/gallium/drivers/llvmpipe/lp_setup.c @@ -74,6 +74,26 @@ lp_setup_get_current_scene(struct lp_setup_context *setup) } +/** + * Check if the size of the current scene has exceeded the limit. + * If so, flush/render it. + */ +static void +setup_check_scene_size_and_flush(struct lp_setup_context *setup) +{ + if (setup->scene) { + struct lp_scene *scene = lp_setup_get_current_scene(setup); + unsigned size = lp_scene_get_size(scene); + + if (size > LP_MAX_SCENE_SIZE) { + /*printf("LLVMPIPE: scene size = %u, flushing.\n", size);*/ + set_scene_state( setup, SETUP_FLUSHED ); + /*assert(lp_scene_get_size(scene) == 0);*/ + } + } +} + + static void first_triangle( struct lp_setup_context *setup, const float (*v0)[4], @@ -132,14 +152,11 @@ static void reset_context( struct lp_setup_context *setup ) /** Rasterize all scene's bins */ static void -lp_setup_rasterize_scene( struct lp_setup_context *setup, - boolean write_depth ) +lp_setup_rasterize_scene( struct lp_setup_context *setup ) { struct lp_scene *scene = lp_setup_get_current_scene(setup); - lp_scene_rasterize(scene, - setup->rast, - write_depth); + lp_scene_rasterize(scene, setup->rast); reset_context( setup ); @@ -190,7 +207,7 @@ execute_clears( struct lp_setup_context *setup ) LP_DBG(DEBUG_SETUP, "%s\n", __FUNCTION__); begin_binning( setup ); - lp_setup_rasterize_scene( setup, TRUE ); + lp_setup_rasterize_scene( setup ); } @@ -221,7 +238,7 @@ set_scene_state( struct lp_setup_context *setup, if (old_state == SETUP_CLEARED) execute_clears( setup ); else - lp_setup_rasterize_scene( setup, TRUE ); + lp_setup_rasterize_scene( setup ); break; default: @@ -243,7 +260,7 @@ lp_setup_flush( struct lp_setup_context *setup, if (setup->scene) { struct lp_scene *scene = lp_setup_get_current_scene(setup); - union lp_rast_cmd_arg dummy; + union lp_rast_cmd_arg dummy = {0}; if (flags & (PIPE_FLUSH_SWAPBUFFERS | PIPE_FLUSH_FRAME)) { @@ -343,20 +360,25 @@ lp_setup_clear( struct lp_setup_context *setup, struct pipe_fence_handle * lp_setup_fence( struct lp_setup_context *setup ) { - struct lp_scene *scene = lp_setup_get_current_scene(setup); - const unsigned rank = lp_scene_get_num_bins( scene ); /* xxx */ - struct lp_fence *fence = lp_fence_create(rank); + if (setup->num_threads == 0) { + return NULL; + } + else { + struct lp_scene *scene = lp_setup_get_current_scene(setup); + const unsigned rank = lp_scene_get_num_bins( scene ); /* xxx */ + struct lp_fence *fence = lp_fence_create(rank); - LP_DBG(DEBUG_SETUP, "%s rank %u\n", __FUNCTION__, rank); + LP_DBG(DEBUG_SETUP, "%s rank %u\n", __FUNCTION__, rank); - set_scene_state( setup, SETUP_ACTIVE ); + set_scene_state( setup, SETUP_ACTIVE ); - /* insert the fence into all command bins */ - lp_scene_bin_everywhere( scene, - lp_rast_fence, - lp_rast_arg_fence(fence) ); + /* insert the fence into all command bins */ + lp_scene_bin_everywhere( scene, + lp_rast_fence, + lp_rast_arg_fence(fence) ); - return (struct pipe_fence_handle *) fence; + return (struct pipe_fence_handle *) fence; + } } @@ -591,10 +613,14 @@ lp_setup_is_resource_referenced( const struct lp_setup_context *setup, void lp_setup_update_state( struct lp_setup_context *setup ) { - struct lp_scene *scene = lp_setup_get_current_scene(setup); + struct lp_scene *scene; LP_DBG(DEBUG_SETUP, "%s\n", __FUNCTION__); + setup_check_scene_size_and_flush(setup); + + scene = lp_setup_get_current_scene(setup); + assert(setup->fs.current.jit_function); /* Some of the 'draw' pipeline stages may have changed some driver state. @@ -715,7 +741,7 @@ lp_setup_update_state( struct lp_setup_context *setup ) */ for (i = 0; i < Elements(setup->fs.current_tex); i++) { if (setup->fs.current_tex[i]) - lp_scene_texture_reference(scene, setup->fs.current_tex[i]); + lp_scene_add_resource_reference(scene, setup->fs.current_tex[i]); } } } @@ -736,6 +762,8 @@ lp_setup_destroy( struct lp_setup_context *setup ) reset_context( setup ); + util_unreference_framebuffer_state(&setup->fb); + for (i = 0; i < Elements(setup->fs.current_tex); i++) { pipe_resource_reference(&setup->fs.current_tex[i], NULL); } @@ -750,6 +778,8 @@ lp_setup_destroy( struct lp_setup_context *setup ) lp_scene_destroy(scene); } + lp_scene_queue_destroy(setup->empty_scenes); + lp_rast_destroy( setup->rast ); FREE( setup ); @@ -765,8 +795,9 @@ struct lp_setup_context * lp_setup_create( struct pipe_context *pipe, struct draw_context *draw ) { - unsigned i; + struct llvmpipe_screen *screen = llvmpipe_screen(pipe->screen); struct lp_setup_context *setup = CALLOC_STRUCT(lp_setup_context); + unsigned i; if (!setup) return NULL; @@ -779,7 +810,8 @@ lp_setup_create( struct pipe_context *pipe, /* XXX: move this to the screen and share between contexts: */ - setup->rast = lp_rast_create(); + setup->num_threads = screen->num_threads; + setup->rast = lp_rast_create(screen->num_threads); if (!setup->rast) goto fail; diff --git a/src/gallium/drivers/llvmpipe/lp_setup_context.h b/src/gallium/drivers/llvmpipe/lp_setup_context.h index 4594f7597d5..584764ce8ac 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup_context.h +++ b/src/gallium/drivers/llvmpipe/lp_setup_context.h @@ -80,6 +80,7 @@ struct lp_setup_context * create/install this itself now. */ struct draw_stage *vbuf; + unsigned num_threads; struct lp_rasterizer *rast; struct lp_scene *scenes[MAX_SCENES]; /**< all the scenes */ struct lp_scene *scene; /**< current scene being built */ diff --git a/src/gallium/drivers/llvmpipe/lp_setup_vbuf.c b/src/gallium/drivers/llvmpipe/lp_setup_vbuf.c index a4012754784..5d3122e8ba2 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup_vbuf.c +++ b/src/gallium/drivers/llvmpipe/lp_setup_vbuf.c @@ -440,7 +440,12 @@ lp_setup_draw_arrays(struct vbuf_render *vbr, uint start, uint nr) static void lp_setup_vbuf_destroy(struct vbuf_render *vbr) { - lp_setup_destroy(lp_setup_context(vbr)); + struct lp_setup_context *setup = lp_setup_context(vbr); + if (setup->vertex_buffer) { + align_free(setup->vertex_buffer); + setup->vertex_buffer = NULL; + } + lp_setup_destroy(setup); } diff --git a/src/gallium/drivers/llvmpipe/lp_state.h b/src/gallium/drivers/llvmpipe/lp_state.h index dcbff190b62..18143807c91 100644 --- a/src/gallium/drivers/llvmpipe/lp_state.h +++ b/src/gallium/drivers/llvmpipe/lp_state.h @@ -31,11 +31,10 @@ #ifndef LP_STATE_H #define LP_STATE_H -#include "gallivm/lp_bld.h" - #include "pipe/p_state.h" #include "tgsi/tgsi_scan.h" #include "lp_jit.h" +#include "gallivm/lp_bld.h" #include "gallivm/lp_bld_sample.h" /* for struct lp_sampler_static_state */ @@ -85,8 +84,6 @@ struct lp_fragment_shader_variant_key struct lp_fragment_shader_variant { - struct lp_fragment_shader *shader; - struct lp_fragment_shader_variant_key key; LLVMValueRef function[2]; @@ -97,11 +94,7 @@ struct lp_fragment_shader_variant }; -/** - * Subclass of pipe_shader_state (though it doesn't really need to be). - * - * This is starting to look an awful lot like a quad pipeline stage... - */ +/** Subclass of pipe_shader_state */ struct lp_fragment_shader { struct pipe_shader_state base; @@ -109,140 +102,58 @@ struct lp_fragment_shader struct tgsi_shader_info info; struct lp_fragment_shader_variant *variants; - - struct lp_fragment_shader_variant *current; }; /** Subclass of pipe_shader_state */ -struct lp_vertex_shader { +struct lp_vertex_shader +{ struct pipe_shader_state shader; struct draw_vertex_shader *draw_data; }; -struct lp_velems_state { + +/** Vertex element state */ +struct lp_velems_state +{ unsigned count; struct pipe_vertex_element velem[PIPE_MAX_ATTRIBS]; }; -void * -llvmpipe_create_blend_state(struct pipe_context *, - const struct pipe_blend_state *); -void llvmpipe_bind_blend_state(struct pipe_context *, - void *); -void llvmpipe_delete_blend_state(struct pipe_context *, - void *); - -void * -llvmpipe_create_sampler_state(struct pipe_context *, - const struct pipe_sampler_state *); -void llvmpipe_bind_sampler_states(struct pipe_context *, unsigned, void **); void -llvmpipe_bind_vertex_sampler_states(struct pipe_context *, - unsigned num_samplers, - void **samplers); -void llvmpipe_delete_sampler_state(struct pipe_context *, void *); - -void * -llvmpipe_create_depth_stencil_state(struct pipe_context *, - const struct pipe_depth_stencil_alpha_state *); -void llvmpipe_bind_depth_stencil_state(struct pipe_context *, void *); -void llvmpipe_delete_depth_stencil_state(struct pipe_context *, void *); - -void * -llvmpipe_create_rasterizer_state(struct pipe_context *, - const struct pipe_rasterizer_state *); -void llvmpipe_bind_rasterizer_state(struct pipe_context *, void *); -void llvmpipe_delete_rasterizer_state(struct pipe_context *, void *); - -void llvmpipe_set_framebuffer_state( struct pipe_context *, - const struct pipe_framebuffer_state * ); - -void llvmpipe_set_blend_color( struct pipe_context *pipe, - const struct pipe_blend_color *blend_color ); - -void llvmpipe_set_stencil_ref( struct pipe_context *pipe, - const struct pipe_stencil_ref *stencil_ref ); - -void llvmpipe_set_clip_state( struct pipe_context *, - const struct pipe_clip_state * ); - -void llvmpipe_set_constant_buffer(struct pipe_context *, - uint shader, uint index, - struct pipe_resource *buf); - -void *llvmpipe_create_fs_state(struct pipe_context *, - const struct pipe_shader_state *); -void llvmpipe_bind_fs_state(struct pipe_context *, void *); -void llvmpipe_delete_fs_state(struct pipe_context *, void *); -void *llvmpipe_create_vs_state(struct pipe_context *, - const struct pipe_shader_state *); -void llvmpipe_bind_vs_state(struct pipe_context *, void *); -void llvmpipe_delete_vs_state(struct pipe_context *, void *); - -void *llvmpipe_create_vertex_elements_state(struct pipe_context *, - unsigned count, - const struct pipe_vertex_element *); -void llvmpipe_bind_vertex_elements_state(struct pipe_context *, void *); -void llvmpipe_delete_vertex_elements_state(struct pipe_context *, void *); - -void llvmpipe_set_polygon_stipple( struct pipe_context *, - const struct pipe_poly_stipple * ); - -void llvmpipe_set_scissor_state( struct pipe_context *, - const struct pipe_scissor_state * ); - -void llvmpipe_set_fragment_sampler_views(struct pipe_context *, - unsigned num, - struct pipe_sampler_view **); +llvmpipe_set_framebuffer_state(struct pipe_context *, + const struct pipe_framebuffer_state *); void -llvmpipe_set_vertex_sampler_views(struct pipe_context *, - unsigned num, - struct pipe_sampler_view **); - -struct pipe_sampler_view * -llvmpipe_create_sampler_view(struct pipe_context *pipe, - struct pipe_resource *texture, - const struct pipe_sampler_view *templ); +llvmpipe_update_fs(struct llvmpipe_context *lp); void -llvmpipe_sampler_view_destroy(struct pipe_context *pipe, - struct pipe_sampler_view *view); +llvmpipe_update_derived(struct llvmpipe_context *llvmpipe); -void llvmpipe_set_viewport_state( struct pipe_context *, - const struct pipe_viewport_state * ); - -void llvmpipe_set_vertex_buffers(struct pipe_context *, - unsigned count, - const struct pipe_vertex_buffer *); +void +llvmpipe_init_sampler_funcs(struct llvmpipe_context *llvmpipe); -void llvmpipe_update_fs(struct llvmpipe_context *lp); +void +llvmpipe_init_blend_funcs(struct llvmpipe_context *llvmpipe); -void llvmpipe_update_derived( struct llvmpipe_context *llvmpipe ); +void +llvmpipe_init_vertex_funcs(struct llvmpipe_context *llvmpipe); +void +llvmpipe_init_draw_funcs(struct llvmpipe_context *llvmpipe); -void llvmpipe_draw_arrays(struct pipe_context *pipe, unsigned mode, - unsigned start, unsigned count); +void +llvmpipe_init_clip_funcs(struct llvmpipe_context *llvmpipe); -void llvmpipe_draw_elements(struct pipe_context *pipe, - struct pipe_resource *indexBuffer, - unsigned indexSize, int indexBias, - unsigned mode, unsigned start, unsigned count); void -llvmpipe_draw_range_elements(struct pipe_context *pipe, - struct pipe_resource *indexBuffer, - unsigned indexSize, int indexBias, - unsigned min_index, - unsigned max_index, - unsigned mode, unsigned start, unsigned count); +llvmpipe_init_fs_funcs(struct llvmpipe_context *llvmpipe); void -llvmpipe_map_texture_surfaces(struct llvmpipe_context *lp); +llvmpipe_init_vs_funcs(struct llvmpipe_context *llvmpipe); void -llvmpipe_unmap_texture_surfaces(struct llvmpipe_context *lp); +llvmpipe_init_rasterizer_funcs(struct llvmpipe_context *llvmpipe); #endif diff --git a/src/gallium/drivers/llvmpipe/lp_state_blend.c b/src/gallium/drivers/llvmpipe/lp_state_blend.c index 4ee28473e80..8569507f4e5 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_blend.c +++ b/src/gallium/drivers/llvmpipe/lp_state_blend.c @@ -40,15 +40,16 @@ #include "lp_state.h" -void * +static void * llvmpipe_create_blend_state(struct pipe_context *pipe, const struct pipe_blend_state *blend) { return mem_dup(blend, sizeof(*blend)); } -void llvmpipe_bind_blend_state( struct pipe_context *pipe, - void *blend ) + +static void +llvmpipe_bind_blend_state(struct pipe_context *pipe, void *blend) { struct llvmpipe_context *llvmpipe = llvmpipe_context(pipe); @@ -62,15 +63,17 @@ void llvmpipe_bind_blend_state( struct pipe_context *pipe, llvmpipe->dirty |= LP_NEW_BLEND; } -void llvmpipe_delete_blend_state(struct pipe_context *pipe, - void *blend) + +static void +llvmpipe_delete_blend_state(struct pipe_context *pipe, void *blend) { FREE( blend ); } -void llvmpipe_set_blend_color( struct pipe_context *pipe, - const struct pipe_blend_color *blend_color ) +static void +llvmpipe_set_blend_color(struct pipe_context *pipe, + const struct pipe_blend_color *blend_color) { struct llvmpipe_context *llvmpipe = llvmpipe_context(pipe); @@ -93,14 +96,15 @@ void llvmpipe_set_blend_color( struct pipe_context *pipe, */ -void * +static void * llvmpipe_create_depth_stencil_state(struct pipe_context *pipe, const struct pipe_depth_stencil_alpha_state *depth_stencil) { return mem_dup(depth_stencil, sizeof(*depth_stencil)); } -void + +static void llvmpipe_bind_depth_stencil_state(struct pipe_context *pipe, void *depth_stencil) { @@ -116,14 +120,17 @@ llvmpipe_bind_depth_stencil_state(struct pipe_context *pipe, llvmpipe->dirty |= LP_NEW_DEPTH_STENCIL_ALPHA; } -void + +static void llvmpipe_delete_depth_stencil_state(struct pipe_context *pipe, void *depth) { FREE( depth ); } -void llvmpipe_set_stencil_ref( struct pipe_context *pipe, - const struct pipe_stencil_ref *stencil_ref ) + +static void +llvmpipe_set_stencil_ref(struct pipe_context *pipe, + const struct pipe_stencil_ref *stencil_ref) { struct llvmpipe_context *llvmpipe = llvmpipe_context(pipe); @@ -142,3 +149,18 @@ void llvmpipe_set_stencil_ref( struct pipe_context *pipe, } +void +llvmpipe_init_blend_funcs(struct llvmpipe_context *llvmpipe) +{ + llvmpipe->pipe.create_blend_state = llvmpipe_create_blend_state; + llvmpipe->pipe.bind_blend_state = llvmpipe_bind_blend_state; + llvmpipe->pipe.delete_blend_state = llvmpipe_delete_blend_state; + + llvmpipe->pipe.create_depth_stencil_alpha_state = llvmpipe_create_depth_stencil_state; + llvmpipe->pipe.bind_depth_stencil_alpha_state = llvmpipe_bind_depth_stencil_state; + llvmpipe->pipe.delete_depth_stencil_alpha_state = llvmpipe_delete_depth_stencil_state; + + llvmpipe->pipe.set_blend_color = llvmpipe_set_blend_color; + + llvmpipe->pipe.set_stencil_ref = llvmpipe_set_stencil_ref; +} diff --git a/src/gallium/drivers/llvmpipe/lp_state_clip.c b/src/gallium/drivers/llvmpipe/lp_state_clip.c index df68f27acc9..32ae079cc15 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_clip.c +++ b/src/gallium/drivers/llvmpipe/lp_state_clip.c @@ -32,8 +32,9 @@ #include "draw/draw_context.h" -void llvmpipe_set_clip_state( struct pipe_context *pipe, - const struct pipe_clip_state *clip ) +static void +llvmpipe_set_clip_state(struct pipe_context *pipe, + const struct pipe_clip_state *clip) { struct llvmpipe_context *llvmpipe = llvmpipe_context(pipe); @@ -42,8 +43,9 @@ void llvmpipe_set_clip_state( struct pipe_context *pipe, } -void llvmpipe_set_viewport_state( struct pipe_context *pipe, - const struct pipe_viewport_state *viewport ) +static void +llvmpipe_set_viewport_state(struct pipe_context *pipe, + const struct pipe_viewport_state *viewport) { struct llvmpipe_context *llvmpipe = llvmpipe_context(pipe); @@ -55,8 +57,9 @@ void llvmpipe_set_viewport_state( struct pipe_context *pipe, } -void llvmpipe_set_scissor_state( struct pipe_context *pipe, - const struct pipe_scissor_state *scissor ) +static void +llvmpipe_set_scissor_state(struct pipe_context *pipe, + const struct pipe_scissor_state *scissor) { struct llvmpipe_context *llvmpipe = llvmpipe_context(pipe); @@ -67,8 +70,9 @@ void llvmpipe_set_scissor_state( struct pipe_context *pipe, } -void llvmpipe_set_polygon_stipple( struct pipe_context *pipe, - const struct pipe_poly_stipple *stipple ) +static void +llvmpipe_set_polygon_stipple(struct pipe_context *pipe, + const struct pipe_poly_stipple *stipple) { struct llvmpipe_context *llvmpipe = llvmpipe_context(pipe); @@ -77,3 +81,14 @@ void llvmpipe_set_polygon_stipple( struct pipe_context *pipe, llvmpipe->poly_stipple = *stipple; /* struct copy */ llvmpipe->dirty |= LP_NEW_STIPPLE; } + + + +void +llvmpipe_init_clip_funcs(struct llvmpipe_context *llvmpipe) +{ + llvmpipe->pipe.set_clip_state = llvmpipe_set_clip_state; + llvmpipe->pipe.set_polygon_stipple = llvmpipe_set_polygon_stipple; + llvmpipe->pipe.set_scissor_state = llvmpipe_set_scissor_state; + llvmpipe->pipe.set_viewport_state = llvmpipe_set_viewport_state; +} diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c index 59d5a440c03..513e62e39e5 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_fs.c +++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c @@ -403,9 +403,7 @@ generate_fs(struct llvmpipe_context *lp, LLVMValueRef step2_ptr) { const struct tgsi_token *tokens = shader->base.tokens; - LLVMTypeRef elem_type; LLVMTypeRef vec_type; - LLVMTypeRef int_vec_type; LLVMValueRef consts_ptr; LLVMValueRef outputs[PIPE_MAX_SHADER_OUTPUTS][NUM_CHANNELS]; LLVMValueRef z = interp->pos[2]; @@ -422,9 +420,7 @@ generate_fs(struct llvmpipe_context *lp, stencil_refs[0] = lp_jit_context_stencil_ref_front_value(builder, context_ptr); stencil_refs[1] = lp_jit_context_stencil_ref_back_value(builder, context_ptr); - elem_type = lp_build_elem_type(type); vec_type = lp_build_vec_type(type); - int_vec_type = lp_build_int_vec_type(type); consts_ptr = lp_jit_context_constants(builder, context_ptr); @@ -474,7 +470,7 @@ generate_fs(struct llvmpipe_context *lp, lp_build_tgsi_soa(builder, tokens, type, &mask, consts_ptr, interp->pos, interp->inputs, - outputs, sampler); + outputs, sampler, &shader->info); for (attrib = 0; attrib < shader->info.num_outputs; ++attrib) { for(chan = 0; chan < NUM_CHANNELS; ++chan) { @@ -546,7 +542,6 @@ generate_blend(const struct pipe_blend_state *blend, struct lp_build_flow_context *flow; struct lp_build_mask_context mask_ctx; LLVMTypeRef vec_type; - LLVMTypeRef int_vec_type; LLVMValueRef const_ptr; LLVMValueRef con[4]; LLVMValueRef dst[4]; @@ -561,7 +556,6 @@ generate_blend(const struct pipe_blend_state *blend, lp_build_mask_begin(&mask_ctx, flow, type, mask); vec_type = lp_build_vec_type(type); - int_vec_type = lp_build_int_vec_type(type); const_ptr = lp_jit_context_blend_color(builder, context_ptr); const_ptr = LLVMBuildBitCast(builder, const_ptr, @@ -624,10 +618,8 @@ generate_fragment(struct llvmpipe_context *lp, struct lp_type fs_type; struct lp_type blend_type; LLVMTypeRef fs_elem_type; - LLVMTypeRef fs_vec_type; LLVMTypeRef fs_int_vec_type; LLVMTypeRef blend_vec_type; - LLVMTypeRef blend_int_vec_type; LLVMTypeRef arg_types[15]; LLVMTypeRef func_type; LLVMTypeRef int32_vec4_type = lp_build_int32_vec4_type(); @@ -682,11 +674,9 @@ generate_fragment(struct llvmpipe_context *lp, */ fs_elem_type = lp_build_elem_type(fs_type); - fs_vec_type = lp_build_vec_type(fs_type); fs_int_vec_type = lp_build_int_vec_type(fs_type); blend_vec_type = lp_build_vec_type(blend_type); - blend_int_vec_type = lp_build_int_vec_type(blend_type); arg_types[0] = screen->context_ptr_type; /* context */ arg_types[1] = LLVMInt32Type(); /* x */ @@ -945,7 +935,6 @@ generate_variant(struct llvmpipe_context *lp, if(!variant) return NULL; - variant->shader = shader; memcpy(&variant->key, key, sizeof *key); generate_fragment(lp, shader, variant, 0); @@ -959,7 +948,7 @@ generate_variant(struct llvmpipe_context *lp, } -void * +static void * llvmpipe_create_fs_state(struct pipe_context *pipe, const struct pipe_shader_state *templ) { @@ -975,11 +964,16 @@ llvmpipe_create_fs_state(struct pipe_context *pipe, /* we need to keep a local copy of the tokens */ shader->base.tokens = tgsi_dup_tokens(templ->tokens); + if (LP_DEBUG & DEBUG_TGSI) { + debug_printf("llvmpipe: Create fragment shader %p:\n", (void *) shader); + tgsi_dump(templ->tokens, 0); + } + return shader; } -void +static void llvmpipe_bind_fs_state(struct pipe_context *pipe, void *fs) { struct llvmpipe_context *llvmpipe = llvmpipe_context(pipe); @@ -995,7 +989,7 @@ llvmpipe_bind_fs_state(struct pipe_context *pipe, void *fs) } -void +static void llvmpipe_delete_fs_state(struct pipe_context *pipe, void *fs) { struct llvmpipe_context *llvmpipe = llvmpipe_context(pipe); @@ -1038,7 +1032,7 @@ llvmpipe_delete_fs_state(struct pipe_context *pipe, void *fs) -void +static void llvmpipe_set_constant_buffer(struct pipe_context *pipe, uint shader, uint index, struct pipe_resource *constants) @@ -1112,8 +1106,8 @@ make_variant_key(struct llvmpipe_context *lp, unsigned chan; format_desc = util_format_description(lp->framebuffer.cbufs[i]->format); - assert(format_desc->layout == UTIL_FORMAT_COLORSPACE_RGB || - format_desc->layout == UTIL_FORMAT_COLORSPACE_SRGB); + assert(format_desc->colorspace == UTIL_FORMAT_COLORSPACE_RGB || + format_desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB); key->blend.rt[i].colormask = lp->blend->rt[i].colormask; @@ -1169,8 +1163,6 @@ llvmpipe_update_fs(struct llvmpipe_context *lp) LP_COUNT_ADD(nr_llvm_compiles, 2); /* emit vs. omit in/out test */ } - shader->current = variant; - /* TODO: put this in the variant */ /* TODO: most of these can be relaxed, in particular the colormask */ opaque = !key.blend.logicop_enable && @@ -1184,7 +1176,19 @@ llvmpipe_update_fs(struct llvmpipe_context *lp) ? TRUE : FALSE; lp_setup_set_fs_functions(lp->setup, - shader->current->jit_function[RAST_WHOLE], - shader->current->jit_function[RAST_EDGE_TEST], + variant->jit_function[RAST_WHOLE], + variant->jit_function[RAST_EDGE_TEST], opaque); } + + + +void +llvmpipe_init_fs_funcs(struct llvmpipe_context *llvmpipe) +{ + llvmpipe->pipe.create_fs_state = llvmpipe_create_fs_state; + llvmpipe->pipe.bind_fs_state = llvmpipe_bind_fs_state; + llvmpipe->pipe.delete_fs_state = llvmpipe_delete_fs_state; + + llvmpipe->pipe.set_constant_buffer = llvmpipe_set_constant_buffer; +} diff --git a/src/gallium/drivers/llvmpipe/lp_state_rasterizer.c b/src/gallium/drivers/llvmpipe/lp_state_rasterizer.c index 47f65fe72d1..622eb47ff45 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_rasterizer.c +++ b/src/gallium/drivers/llvmpipe/lp_state_rasterizer.c @@ -34,7 +34,7 @@ -void * +static void * llvmpipe_create_rasterizer_state(struct pipe_context *pipe, const struct pipe_rasterizer_state *rast) { @@ -46,7 +46,7 @@ llvmpipe_create_rasterizer_state(struct pipe_context *pipe, -void +static void llvmpipe_bind_rasterizer_state(struct pipe_context *pipe, void *handle) { struct llvmpipe_context *llvmpipe = llvmpipe_context(pipe); @@ -71,16 +71,27 @@ llvmpipe_bind_rasterizer_state(struct pipe_context *pipe, void *handle) llvmpipe->rasterizer->front_winding == PIPE_WINDING_CCW, llvmpipe->rasterizer->scissor, llvmpipe->rasterizer->gl_rasterization_rules); + lp_setup_set_flatshade_first( llvmpipe->setup, + llvmpipe->rasterizer->flatshade_first); } llvmpipe->dirty |= LP_NEW_RASTERIZER; } -void llvmpipe_delete_rasterizer_state(struct pipe_context *pipe, - void *rasterizer) +static void +llvmpipe_delete_rasterizer_state(struct pipe_context *pipe, + void *rasterizer) { FREE( rasterizer ); } + +void +llvmpipe_init_rasterizer_funcs(struct llvmpipe_context *llvmpipe) +{ + llvmpipe->pipe.create_rasterizer_state = llvmpipe_create_rasterizer_state; + llvmpipe->pipe.bind_rasterizer_state = llvmpipe_bind_rasterizer_state; + llvmpipe->pipe.delete_rasterizer_state = llvmpipe_delete_rasterizer_state; +} diff --git a/src/gallium/drivers/llvmpipe/lp_state_sampler.c b/src/gallium/drivers/llvmpipe/lp_state_sampler.c index 3552ff50ce1..55d43368a3e 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_sampler.c +++ b/src/gallium/drivers/llvmpipe/lp_state_sampler.c @@ -41,7 +41,7 @@ -void * +static void * llvmpipe_create_sampler_state(struct pipe_context *pipe, const struct pipe_sampler_state *sampler) { @@ -49,7 +49,7 @@ llvmpipe_create_sampler_state(struct pipe_context *pipe, } -void +static void llvmpipe_bind_sampler_states(struct pipe_context *pipe, unsigned num, void **sampler) { @@ -76,7 +76,7 @@ llvmpipe_bind_sampler_states(struct pipe_context *pipe, } -void +static void llvmpipe_bind_vertex_sampler_states(struct pipe_context *pipe, unsigned num_samplers, void **samplers) @@ -104,7 +104,7 @@ llvmpipe_bind_vertex_sampler_states(struct pipe_context *pipe, } -void +static void llvmpipe_set_fragment_sampler_views(struct pipe_context *pipe, unsigned num, struct pipe_sampler_view **views) @@ -133,7 +133,7 @@ llvmpipe_set_fragment_sampler_views(struct pipe_context *pipe, } -void +static void llvmpipe_set_vertex_sampler_views(struct pipe_context *pipe, unsigned num, struct pipe_sampler_view **views) @@ -163,7 +163,7 @@ llvmpipe_set_vertex_sampler_views(struct pipe_context *pipe, } -struct pipe_sampler_view * +static struct pipe_sampler_view * llvmpipe_create_sampler_view(struct pipe_context *pipe, struct pipe_resource *texture, const struct pipe_sampler_view *templ) @@ -182,7 +182,7 @@ llvmpipe_create_sampler_view(struct pipe_context *pipe, } -void +static void llvmpipe_sampler_view_destroy(struct pipe_context *pipe, struct pipe_sampler_view *view) { @@ -191,7 +191,7 @@ llvmpipe_sampler_view_destroy(struct pipe_context *pipe, } -void +static void llvmpipe_delete_sampler_state(struct pipe_context *pipe, void *sampler) { @@ -199,4 +199,16 @@ llvmpipe_delete_sampler_state(struct pipe_context *pipe, } - +void +llvmpipe_init_sampler_funcs(struct llvmpipe_context *llvmpipe) +{ + llvmpipe->pipe.create_sampler_state = llvmpipe_create_sampler_state; + + llvmpipe->pipe.bind_fragment_sampler_states = llvmpipe_bind_sampler_states; + llvmpipe->pipe.bind_vertex_sampler_states = llvmpipe_bind_vertex_sampler_states; + llvmpipe->pipe.set_fragment_sampler_views = llvmpipe_set_fragment_sampler_views; + llvmpipe->pipe.set_vertex_sampler_views = llvmpipe_set_vertex_sampler_views; + llvmpipe->pipe.create_sampler_view = llvmpipe_create_sampler_view; + llvmpipe->pipe.sampler_view_destroy = llvmpipe_sampler_view_destroy; + llvmpipe->pipe.delete_sampler_state = llvmpipe_delete_sampler_state; +} diff --git a/src/gallium/drivers/llvmpipe/lp_state_surface.c b/src/gallium/drivers/llvmpipe/lp_state_surface.c index 7d86c5750c5..63b8f27b39c 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_surface.c +++ b/src/gallium/drivers/llvmpipe/lp_state_surface.c @@ -52,8 +52,8 @@ llvmpipe_set_framebuffer_state(struct pipe_context *pipe, boolean changed = !util_framebuffer_state_equal(&lp->framebuffer, fb); - assert(fb->width <= MAXWIDTH); - assert(fb->height <= MAXHEIGHT); + assert(fb->width <= LP_MAX_WIDTH); + assert(fb->height <= LP_MAX_HEIGHT); if (changed) { diff --git a/src/gallium/drivers/llvmpipe/lp_state_vertex.c b/src/gallium/drivers/llvmpipe/lp_state_vertex.c index f6427aa908e..113f13db018 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_vertex.c +++ b/src/gallium/drivers/llvmpipe/lp_state_vertex.c @@ -35,7 +35,7 @@ #include "draw/draw_context.h" -void * +static void * llvmpipe_create_vertex_elements_state(struct pipe_context *pipe, unsigned count, const struct pipe_vertex_element *attribs) @@ -50,7 +50,7 @@ llvmpipe_create_vertex_elements_state(struct pipe_context *pipe, return velems; } -void +static void llvmpipe_bind_vertex_elements_state(struct pipe_context *pipe, void *velems) { @@ -65,13 +65,13 @@ llvmpipe_bind_vertex_elements_state(struct pipe_context *pipe, draw_set_vertex_elements(llvmpipe->draw, lp_velems->count, lp_velems->velem); } -void +static void llvmpipe_delete_vertex_elements_state(struct pipe_context *pipe, void *velems) { FREE( velems ); } -void +static void llvmpipe_set_vertex_buffers(struct pipe_context *pipe, unsigned count, const struct pipe_vertex_buffer *buffers) @@ -87,3 +87,15 @@ llvmpipe_set_vertex_buffers(struct pipe_context *pipe, draw_set_vertex_buffers(llvmpipe->draw, count, buffers); } + + + +void +llvmpipe_init_vertex_funcs(struct llvmpipe_context *llvmpipe) +{ + llvmpipe->pipe.create_vertex_elements_state = llvmpipe_create_vertex_elements_state; + llvmpipe->pipe.bind_vertex_elements_state = llvmpipe_bind_vertex_elements_state; + llvmpipe->pipe.delete_vertex_elements_state = llvmpipe_delete_vertex_elements_state; + + llvmpipe->pipe.set_vertex_buffers = llvmpipe_set_vertex_buffers; +} diff --git a/src/gallium/drivers/llvmpipe/lp_state_vs.c b/src/gallium/drivers/llvmpipe/lp_state_vs.c index 884e3878e62..f2d88089906 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_vs.c +++ b/src/gallium/drivers/llvmpipe/lp_state_vs.c @@ -28,15 +28,17 @@ #include "pipe/p_defines.h" +#include "tgsi/tgsi_dump.h" #include "tgsi/tgsi_parse.h" #include "util/u_memory.h" #include "draw/draw_context.h" #include "lp_context.h" +#include "lp_debug.h" #include "lp_state.h" -void * +static void * llvmpipe_create_vs_state(struct pipe_context *pipe, const struct pipe_shader_state *templ) { @@ -57,6 +59,11 @@ llvmpipe_create_vs_state(struct pipe_context *pipe, if (state->draw_data == NULL) goto fail; + if (LP_DEBUG & DEBUG_TGSI) { + debug_printf("llvmpipe: Create vertex shader %p:\n", (void *) state); + tgsi_dump(templ->tokens, 0); + } + return state; fail: @@ -69,7 +76,7 @@ fail: } -void +static void llvmpipe_bind_vs_state(struct pipe_context *pipe, void *_vs) { struct llvmpipe_context *llvmpipe = llvmpipe_context(pipe); @@ -87,7 +94,7 @@ llvmpipe_bind_vs_state(struct pipe_context *pipe, void *_vs) } -void +static void llvmpipe_delete_vs_state(struct pipe_context *pipe, void *vs) { struct llvmpipe_context *llvmpipe = llvmpipe_context(pipe); @@ -99,3 +106,13 @@ llvmpipe_delete_vs_state(struct pipe_context *pipe, void *vs) FREE( (void *)state->shader.tokens ); FREE( state ); } + + + +void +llvmpipe_init_vs_funcs(struct llvmpipe_context *llvmpipe) +{ + llvmpipe->pipe.create_vs_state = llvmpipe_create_vs_state; + llvmpipe->pipe.bind_vs_state = llvmpipe_bind_vs_state; + llvmpipe->pipe.delete_vs_state = llvmpipe_delete_vs_state; +} diff --git a/src/gallium/drivers/llvmpipe/lp_surface.c b/src/gallium/drivers/llvmpipe/lp_surface.c index 1a116989d4c..8bd83f576f4 100644 --- a/src/gallium/drivers/llvmpipe/lp_surface.c +++ b/src/gallium/drivers/llvmpipe/lp_surface.c @@ -28,9 +28,9 @@ #include "util/u_rect.h" #include "lp_context.h" #include "lp_flush.h" +#include "lp_limits.h" #include "lp_surface.h" #include "lp_texture.h" -#include "lp_tile_size.h" /** @@ -59,19 +59,19 @@ lp_surface_copy(struct pipe_context *pipe, struct llvmpipe_resource *dst_tex = llvmpipe_resource(dst->texture); const enum pipe_format format = src_tex->base.format; - llvmpipe_flush_texture(pipe, - dst->texture, dst->face, dst->level, - 0, /* flush_flags */ - FALSE, /* read_only */ - FALSE, /* cpu_access */ - FALSE); /* do_not_flush */ + llvmpipe_flush_resource(pipe, + dst->texture, dst->face, dst->level, + 0, /* flush_flags */ + FALSE, /* read_only */ + FALSE, /* cpu_access */ + FALSE); /* do_not_block */ - llvmpipe_flush_texture(pipe, - src->texture, src->face, src->level, - 0, /* flush_flags */ - TRUE, /* read_only */ - FALSE, /* cpu_access */ - FALSE); /* do_not_flush */ + llvmpipe_flush_resource(pipe, + src->texture, src->face, src->level, + 0, /* flush_flags */ + TRUE, /* read_only */ + FALSE, /* cpu_access */ + FALSE); /* do_not_block */ /* printf("surface copy from %u to %u: %u,%u to %u,%u %u x %u\n", @@ -146,7 +146,7 @@ lp_surface_copy(struct pipe_context *pipe, void -lp_init_surface_functions(struct llvmpipe_context *lp) +llvmpipe_init_surface_functions(struct llvmpipe_context *lp) { lp->pipe.surface_copy = lp_surface_copy; lp->pipe.surface_fill = util_surface_fill; diff --git a/src/gallium/drivers/llvmpipe/lp_surface.h b/src/gallium/drivers/llvmpipe/lp_surface.h index 4d78a53c4f5..b1b896ebd90 100644 --- a/src/gallium/drivers/llvmpipe/lp_surface.h +++ b/src/gallium/drivers/llvmpipe/lp_surface.h @@ -36,7 +36,7 @@ struct llvmpipe_context; extern void -lp_init_surface_functions(struct llvmpipe_context *lp); +llvmpipe_init_surface_functions(struct llvmpipe_context *lp); #endif /* LP_SURFACE_H */ diff --git a/src/gallium/drivers/llvmpipe/lp_test_blend.c b/src/gallium/drivers/llvmpipe/lp_test_blend.c index 818f7a9a562..fae7bf3fcf2 100644 --- a/src/gallium/drivers/llvmpipe/lp_test_blend.c +++ b/src/gallium/drivers/llvmpipe/lp_test_blend.c @@ -154,7 +154,6 @@ add_blend_test(LLVMModuleRef module, enum vector_mode mode, struct lp_type type) { - LLVMTypeRef ret_type; LLVMTypeRef vec_type; LLVMTypeRef args[4]; LLVMValueRef func; @@ -165,7 +164,6 @@ add_blend_test(LLVMModuleRef module, LLVMBasicBlockRef block; LLVMBuilderRef builder; - ret_type = LLVMInt64Type(); vec_type = lp_build_vec_type(type); args[3] = args[2] = args[1] = args[0] = LLVMPointerType(vec_type, 0); diff --git a/src/gallium/drivers/llvmpipe/lp_tex_sample_llvm.c b/src/gallium/drivers/llvmpipe/lp_tex_sample.c index 74b7393e4ec..74b7393e4ec 100644 --- a/src/gallium/drivers/llvmpipe/lp_tex_sample_llvm.c +++ b/src/gallium/drivers/llvmpipe/lp_tex_sample.c diff --git a/src/gallium/drivers/llvmpipe/lp_texture.c b/src/gallium/drivers/llvmpipe/lp_texture.c index cee170ec834..2f41d620c8a 100644 --- a/src/gallium/drivers/llvmpipe/lp_texture.c +++ b/src/gallium/drivers/llvmpipe/lp_texture.c @@ -47,7 +47,6 @@ #include "lp_tile_image.h" #include "lp_texture.h" #include "lp_setup.h" -#include "lp_tile_size.h" #include "state_tracker/sw_winsys.h" @@ -55,14 +54,18 @@ static INLINE boolean resource_is_texture(const struct pipe_resource *resource) { - const unsigned tex_binds = (PIPE_BIND_DISPLAY_TARGET | - PIPE_BIND_SCANOUT | - PIPE_BIND_SHARED | - PIPE_BIND_DEPTH_STENCIL | - PIPE_BIND_SAMPLER_VIEW); - const struct llvmpipe_resource *lpr = llvmpipe_resource_const(resource); - - return (lpr->base.bind & tex_binds) ? TRUE : FALSE; + switch (resource->target) { + case PIPE_BUFFER: + return FALSE; + case PIPE_TEXTURE_1D: + case PIPE_TEXTURE_2D: + case PIPE_TEXTURE_3D: + case PIPE_TEXTURE_CUBE: + return TRUE; + default: + assert(0); + return FALSE; + } } @@ -81,7 +84,7 @@ alloc_layout_array(unsigned num_slices, unsigned width, unsigned height) assert(LP_TEX_LAYOUT_NONE == 0); /* calloc'ing LP_TEX_LAYOUT_NONE here */ return (enum lp_texture_layout *) - calloc(num_slices * tx * ty, sizeof(enum lp_texture_layout)); + CALLOC(num_slices * tx * ty, sizeof(enum lp_texture_layout)); } @@ -189,20 +192,20 @@ llvmpipe_resource_create(struct pipe_screen *_screen, assert(lpr->base.bind); - if (lpr->base.bind & (PIPE_BIND_DISPLAY_TARGET | - PIPE_BIND_SCANOUT | - PIPE_BIND_SHARED)) { - /* displayable surface */ - if (!llvmpipe_displaytarget_layout(screen, lpr)) - goto fail; - assert(lpr->layout[0][0] == LP_TEX_LAYOUT_NONE); - } - else if (lpr->base.bind & (PIPE_BIND_SAMPLER_VIEW | - PIPE_BIND_DEPTH_STENCIL)) { - /* texture map */ - if (!llvmpipe_texture_layout(screen, lpr)) - goto fail; - assert(lpr->layout[0][0] == LP_TEX_LAYOUT_NONE); + if (resource_is_texture(&lpr->base)) { + if (lpr->base.bind & PIPE_BIND_DISPLAY_TARGET) { + /* displayable surface */ + if (!llvmpipe_displaytarget_layout(screen, lpr)) + goto fail; + assert(lpr->layout[0][0] == LP_TEX_LAYOUT_NONE); + } + else { + /* texture map */ + if (!llvmpipe_texture_layout(screen, lpr)) + goto fail; + assert(lpr->layout[0][0] == LP_TEX_LAYOUT_NONE); + } + assert(lpr->layout[0]); } else { /* other data (vertex buffer, const buffer, etc) */ @@ -217,10 +220,6 @@ llvmpipe_resource_create(struct pipe_screen *_screen, goto fail; } - if (resource_is_texture(&lpr->base)) { - assert(lpr->layout[0]); - } - lpr->id = id_counter++; return &lpr->base; @@ -242,6 +241,13 @@ llvmpipe_resource_destroy(struct pipe_screen *pscreen, /* display target */ struct sw_winsys *winsys = screen->winsys; winsys->displaytarget_destroy(winsys, lpr->dt); + + if (lpr->tiled[0].data) { + align_free(lpr->tiled[0].data); + lpr->tiled[0].data = NULL; + } + + FREE(lpr->layout[0]); } else if (resource_is_texture(pt)) { /* regular texture */ @@ -265,7 +271,7 @@ llvmpipe_resource_destroy(struct pipe_screen *pscreen, /* free layout flag arrays */ for (level = 0; level < Elements(lpr->tiled); level++) { - free(lpr->layout[level]); + FREE(lpr->layout[level]); lpr->layout[level] = NULL; } } @@ -389,10 +395,7 @@ llvmpipe_resource_data(struct pipe_resource *resource) { struct llvmpipe_resource *lpr = llvmpipe_resource(resource); - assert((lpr->base.bind & (PIPE_BIND_DISPLAY_TARGET | - PIPE_BIND_SCANOUT | - PIPE_BIND_SHARED | - PIPE_BIND_SAMPLER_VIEW)) == 0); + assert(!resource_is_texture(resource)); return lpr->data; } @@ -496,6 +499,27 @@ llvmpipe_get_transfer(struct pipe_context *pipe, assert(resource); assert(sr.level <= resource->last_level); + /* + * Transfers, like other pipe operations, must happen in order, so flush the + * context if necessary. + */ + if (!(usage & PIPE_TRANSFER_UNSYNCHRONIZED)) { + boolean read_only = !(usage & PIPE_TRANSFER_WRITE); + boolean do_not_block = !!(usage & PIPE_TRANSFER_DONTBLOCK); + if (!llvmpipe_flush_resource(pipe, resource, + sr.face, sr.level, + 0, /* flush_flags */ + read_only, + TRUE, /* cpu_access */ + do_not_block)) { + /* + * It would have blocked, but state tracker requested no to. + */ + assert(do_not_block); + return NULL; + } + } + lpr = CALLOC_STRUCT(llvmpipe_transfer); if (lpr) { struct pipe_transfer *pt = &lpr->base; @@ -566,19 +590,6 @@ llvmpipe_transfer_map( struct pipe_context *pipe, lpr = llvmpipe_resource(transfer->resource); format = lpr->base.format; - /* - * Transfers, like other pipe operations, must happen in order, so flush the - * context if necessary. - */ - llvmpipe_flush_texture(pipe, - transfer->resource, - transfer->sr.face, - transfer->sr.level, - 0, /* flush_flags */ - !(transfer->usage & PIPE_TRANSFER_WRITE), /* read_only */ - TRUE, /* cpu_access */ - FALSE); /* do_not_flush */ - map = llvmpipe_resource_map(transfer->resource, transfer->sr.face, transfer->sr.level, @@ -994,14 +1005,16 @@ llvmpipe_get_texture_image(struct llvmpipe_resource *lpr, x * TILE_SIZE, y * TILE_SIZE, TILE_SIZE, TILE_SIZE, lpr->base.format, - lpr->row_stride[level]); + lpr->row_stride[level], + lpr->tiles_per_row[level]); } else { lp_tiled_to_linear(other_data, target_data, x * TILE_SIZE, y * TILE_SIZE, TILE_SIZE, TILE_SIZE, lpr->base.format, - lpr->row_stride[level]); + lpr->row_stride[level], + lpr->tiles_per_row[level]); } } @@ -1090,7 +1103,8 @@ llvmpipe_get_texture_tile_linear(struct llvmpipe_resource *lpr, if (convert) { lp_tiled_to_linear(tiled_image, linear_image, x, y, TILE_SIZE, TILE_SIZE, lpr->base.format, - lpr->row_stride[level]); + lpr->row_stride[level], + lpr->tiles_per_row[level]); } if (new_layout != cur_layout) @@ -1138,7 +1152,8 @@ llvmpipe_get_texture_tile(struct llvmpipe_resource *lpr, if (convert) { lp_linear_to_tiled(linear_image, tiled_image, x, y, TILE_SIZE, TILE_SIZE, lpr->base.format, - lpr->row_stride[level]); + lpr->row_stride[level], + lpr->tiles_per_row[level]); } if (new_layout != cur_layout) @@ -1152,6 +1167,27 @@ llvmpipe_get_texture_tile(struct llvmpipe_resource *lpr, } +/** + * Return size of resource in bytes + */ +unsigned +llvmpipe_resource_size(const struct pipe_resource *resource) +{ + const struct llvmpipe_resource *lpr = llvmpipe_resource_const(resource); + unsigned lvl, size = 0; + + for (lvl = 0; lvl <= lpr->base.last_level; lvl++) { + if (lpr->linear[lvl].data) + size += tex_image_size(lpr, lvl, LP_TEX_LAYOUT_LINEAR); + + if (lpr->tiled[lvl].data) + size += tex_image_size(lpr, lvl, LP_TEX_LAYOUT_TILED); + } + + return size; +} + + void llvmpipe_init_screen_resource_funcs(struct pipe_screen *screen) { diff --git a/src/gallium/drivers/llvmpipe/lp_texture.h b/src/gallium/drivers/llvmpipe/lp_texture.h index 858975bcee0..a8d08d6247f 100644 --- a/src/gallium/drivers/llvmpipe/lp_texture.h +++ b/src/gallium/drivers/llvmpipe/lp_texture.h @@ -31,12 +31,7 @@ #include "pipe/p_state.h" #include "util/u_debug.h" - - -#define LP_MAX_TEXTURE_2D_LEVELS 12 /* 2K x 2K for now */ -#define LP_MAX_TEXTURE_3D_LEVELS 10 /* 512 x 512 x 512 for now */ - -#define LP_MAX_TEXTURE_LEVELS LP_MAX_TEXTURE_2D_LEVELS +#include "lp_limits.h" enum lp_texture_usage @@ -189,6 +184,10 @@ void * llvmpipe_resource_data(struct pipe_resource *resource); +unsigned +llvmpipe_resource_size(const struct pipe_resource *resource); + + ubyte * llvmpipe_get_texture_image_address(struct llvmpipe_resource *lpr, unsigned face_slice, unsigned level, diff --git a/src/gallium/drivers/llvmpipe/lp_tile_image.c b/src/gallium/drivers/llvmpipe/lp_tile_image.c index 0852150ba72..2b63992dd70 100644 --- a/src/gallium/drivers/llvmpipe/lp_tile_image.c +++ b/src/gallium/drivers/llvmpipe/lp_tile_image.c @@ -122,14 +122,15 @@ tile_4_4_uint16(const uint16_t *src, uint16_t *dst, unsigned src_stride) /** * Convert a tiled image into a linear image. - * \param src_stride source row stride in bytes (bytes per row of tiles) * \param dst_stride dest row stride in bytes */ void lp_tiled_to_linear(const void *src, void *dst, unsigned x, unsigned y, unsigned width, unsigned height, - enum pipe_format format, unsigned dst_stride) + enum pipe_format format, + unsigned dst_stride, + unsigned tiles_per_row) { assert(x % TILE_SIZE == 0); assert(y % TILE_SIZE == 0); @@ -191,8 +192,6 @@ lp_tiled_to_linear(const void *src, void *dst, const uint bpp = 4; const uint tile_w = TILE_SIZE, tile_h = TILE_SIZE; const uint bytes_per_tile = tile_w * tile_h * bpp; - const uint src_stride = dst_stride * tile_w; - const uint tiles_per_row = src_stride / bytes_per_tile; uint i, j; for (j = 0; j < height; j += tile_h) { @@ -202,7 +201,7 @@ lp_tiled_to_linear(const void *src, void *dst, uint byte_offset = tile_offset * bytes_per_tile; const uint8_t *src_tile = (uint8_t *) src + byte_offset; - lp_tile_write_4ub(format, + lp_tile_unswizzle_4ub(format, src_tile, dst, dst_stride, ii, jj, tile_w, tile_h); @@ -215,13 +214,14 @@ lp_tiled_to_linear(const void *src, void *dst, /** * Convert a linear image into a tiled image. * \param src_stride source row stride in bytes - * \param dst_stride dest row stride in bytes (bytes per row of tiles) */ void lp_linear_to_tiled(const void *src, void *dst, unsigned x, unsigned y, unsigned width, unsigned height, - enum pipe_format format, unsigned src_stride) + enum pipe_format format, + unsigned src_stride, + unsigned tiles_per_row) { assert(x % TILE_SIZE == 0); assert(y % TILE_SIZE == 0); @@ -281,8 +281,6 @@ lp_linear_to_tiled(const void *src, void *dst, const uint bpp = 4; const uint tile_w = TILE_SIZE, tile_h = TILE_SIZE; const uint bytes_per_tile = tile_w * tile_h * bpp; - const uint dst_stride = src_stride * tile_w; - const uint tiles_per_row = dst_stride / bytes_per_tile; uint i, j; for (j = 0; j < height; j += TILE_SIZE) { @@ -292,7 +290,7 @@ lp_linear_to_tiled(const void *src, void *dst, uint byte_offset = tile_offset * bytes_per_tile; uint8_t *dst_tile = (uint8_t *) dst + byte_offset; - lp_tile_read_4ub(format, + lp_tile_swizzle_4ub(format, dst_tile, src, src_stride, ii, jj, tile_w, tile_h); @@ -320,10 +318,10 @@ test_tiled_linear_conversion(void *data, /*unsigned tiled_stride = wt * TILE_SIZE * TILE_SIZE * 4;*/ lp_linear_to_tiled(data, tiled, 0, 0, width, height, format, - stride); + stride, wt); lp_tiled_to_linear(tiled, data, 0, 0, width, height, format, - stride); + stride, wt); free(tiled); } diff --git a/src/gallium/drivers/llvmpipe/lp_tile_image.h b/src/gallium/drivers/llvmpipe/lp_tile_image.h index d74621925d5..8de8efc6c16 100644 --- a/src/gallium/drivers/llvmpipe/lp_tile_image.h +++ b/src/gallium/drivers/llvmpipe/lp_tile_image.h @@ -33,14 +33,18 @@ void lp_tiled_to_linear(const void *src, void *dst, unsigned x, unsigned y, unsigned width, unsigned height, - enum pipe_format format, unsigned dst_stride); + enum pipe_format format, + unsigned dst_stride, + unsigned tiles_per_row); void lp_linear_to_tiled(const void *src, void *dst, unsigned x, unsigned y, unsigned width, unsigned height, - enum pipe_format format, unsigned src_stride); + enum pipe_format format, + unsigned src_stride, + unsigned tiles_per_row); void diff --git a/src/gallium/drivers/llvmpipe/lp_tile_soa.h b/src/gallium/drivers/llvmpipe/lp_tile_soa.h index 9d6a88afec5..07f71b8411a 100644 --- a/src/gallium/drivers/llvmpipe/lp_tile_soa.h +++ b/src/gallium/drivers/llvmpipe/lp_tile_soa.h @@ -30,7 +30,7 @@ #include "pipe/p_compiler.h" #include "tgsi/tgsi_exec.h" /* for NUM_CHANNELS */ -#include "lp_tile_size.h" +#include "lp_limits.h" #ifdef __cplusplus extern "C" { @@ -51,7 +51,10 @@ tile_offset[TILE_VECTOR_HEIGHT][TILE_VECTOR_WIDTH]; #define TILE_Y_STRIDE (TILE_VECTOR_HEIGHT * TILE_SIZE * NUM_CHANNELS) //1024 -extern int tile_write_count, tile_read_count; +#ifdef DEBUG +extern unsigned lp_tile_unswizzle_count; +extern unsigned lp_tile_swizzle_count; +#endif /** @@ -73,14 +76,14 @@ tile_pixel_offset(unsigned x, unsigned y, unsigned c) void -lp_tile_read_4ub(enum pipe_format format, +lp_tile_swizzle_4ub(enum pipe_format format, uint8_t *dst, const void *src, unsigned src_stride, unsigned x, unsigned y, unsigned w, unsigned h); void -lp_tile_write_4ub(enum pipe_format format, +lp_tile_unswizzle_4ub(enum pipe_format format, const uint8_t *src, void *dst, unsigned dst_stride, unsigned x, unsigned y, unsigned w, unsigned h); diff --git a/src/gallium/drivers/llvmpipe/lp_tile_soa.py b/src/gallium/drivers/llvmpipe/lp_tile_soa.py index 65810b6f8ff..5ab63cbac67 100644 --- a/src/gallium/drivers/llvmpipe/lp_tile_soa.py +++ b/src/gallium/drivers/llvmpipe/lp_tile_soa.py @@ -58,7 +58,7 @@ def is_format_supported(format): channel = format.channels[i] if channel.type not in (VOID, UNSIGNED, SIGNED, FLOAT): return False - if channel.type == FLOAT and channel.size not in (32 ,64): + if channel.type == FLOAT and channel.size not in (16, 32 ,64): return False if format.colorspace not in ('rgb', 'srgb'): @@ -75,7 +75,7 @@ def generate_format_read(format, dst_channel, dst_native_type, dst_suffix): src_native_type = native_type(format) print 'static void' - print 'lp_tile_%s_read_%s(%s *dst, const uint8_t *src, unsigned src_stride, unsigned x0, unsigned y0, unsigned w, unsigned h)' % (name, dst_suffix, dst_native_type) + print 'lp_tile_%s_swizzle_%s(%s *dst, const uint8_t *src, unsigned src_stride, unsigned x0, unsigned y0, unsigned w, unsigned h)' % (name, dst_suffix, dst_native_type) print '{' print ' unsigned x, y;' print ' const uint8_t *src_row = src + y0*src_stride;' @@ -193,7 +193,7 @@ def pack_rgba(format, src_channel, r, g, b, a): return expr -def emit_unrolled_write_code(format, src_channel): +def emit_unrolled_unswizzle_code(format, src_channel): '''Emit code for writing a block based on unrolled loops. This is considerably faster than the TILE_PIXEL-based code below. ''' @@ -223,7 +223,7 @@ def emit_unrolled_write_code(format, src_channel): print ' }' -def emit_tile_pixel_write_code(format, src_channel): +def emit_tile_pixel_unswizzle_code(format, src_channel): '''Emit code for writing a block based on the TILE_PIXEL macro.''' dst_native_type = native_type(format) @@ -257,7 +257,7 @@ def emit_tile_pixel_write_code(format, src_channel): value = 'TILE_PIXEL(src, x, y, %u)' % inv_swizzle[i] value = conversion_expr(src_channel, dst_channel, dst_native_type, value, clamp=False) print ' *dst_pixel++ = %s;' % value - else: + elif dst_channel.size: print ' ++dst_pixel;' else: assert False @@ -273,7 +273,7 @@ def generate_format_write(format, src_channel, src_native_type, src_suffix): name = format.short_name() print 'static void' - print 'lp_tile_%s_write_%s(const %s *src, uint8_t *dst, unsigned dst_stride, unsigned x0, unsigned y0, unsigned w, unsigned h)' % (name, src_suffix, src_native_type) + print 'lp_tile_%s_unswizzle_%s(const %s *src, uint8_t *dst, unsigned dst_stride, unsigned x0, unsigned y0, unsigned w, unsigned h)' % (name, src_suffix, src_native_type) print '{' if format.layout == PLAIN \ and format.colorspace == 'rgb' \ @@ -282,14 +282,14 @@ def generate_format_write(format, src_channel, src_native_type, src_suffix): and not format.is_mixed() \ and (format.channels[0].type == UNSIGNED \ or format.channels[1].type == UNSIGNED): - emit_unrolled_write_code(format, src_channel) + emit_unrolled_unswizzle_code(format, src_channel) else: - emit_tile_pixel_write_code(format, src_channel) + emit_tile_pixel_unswizzle_code(format, src_channel) print '}' print -def generate_read(formats, dst_channel, dst_native_type, dst_suffix): +def generate_swizzle(formats, dst_channel, dst_native_type, dst_suffix): '''Generate the dispatch function to read pixels from any format''' for format in formats: @@ -297,15 +297,17 @@ def generate_read(formats, dst_channel, dst_native_type, dst_suffix): generate_format_read(format, dst_channel, dst_native_type, dst_suffix) print 'void' - print 'lp_tile_read_%s(enum pipe_format format, %s *dst, const void *src, unsigned src_stride, unsigned x, unsigned y, unsigned w, unsigned h)' % (dst_suffix, dst_native_type) + print 'lp_tile_swizzle_%s(enum pipe_format format, %s *dst, const void *src, unsigned src_stride, unsigned x, unsigned y, unsigned w, unsigned h)' % (dst_suffix, dst_native_type) print '{' print ' void (*func)(%s *dst, const uint8_t *src, unsigned src_stride, unsigned x0, unsigned y0, unsigned w, unsigned h);' % dst_native_type - print ' tile_read_count += 1;' + print '#ifdef DEBUG' + print ' lp_tile_swizzle_count += 1;' + print '#endif' print ' switch(format) {' for format in formats: if is_format_supported(format): print ' case %s:' % format.name - print ' func = &lp_tile_%s_read_%s;' % (format.short_name(), dst_suffix) + print ' func = &lp_tile_%s_swizzle_%s;' % (format.short_name(), dst_suffix) print ' break;' print ' default:' print ' debug_printf("%s: unsupported format %s\\n", __FUNCTION__, util_format_name(format));' @@ -316,7 +318,7 @@ def generate_read(formats, dst_channel, dst_native_type, dst_suffix): print -def generate_write(formats, src_channel, src_native_type, src_suffix): +def generate_unswizzle(formats, src_channel, src_native_type, src_suffix): '''Generate the dispatch function to write pixels to any format''' for format in formats: @@ -324,16 +326,18 @@ def generate_write(formats, src_channel, src_native_type, src_suffix): generate_format_write(format, src_channel, src_native_type, src_suffix) print 'void' - print 'lp_tile_write_%s(enum pipe_format format, const %s *src, void *dst, unsigned dst_stride, unsigned x, unsigned y, unsigned w, unsigned h)' % (src_suffix, src_native_type) + print 'lp_tile_unswizzle_%s(enum pipe_format format, const %s *src, void *dst, unsigned dst_stride, unsigned x, unsigned y, unsigned w, unsigned h)' % (src_suffix, src_native_type) print '{' print ' void (*func)(const %s *src, uint8_t *dst, unsigned dst_stride, unsigned x0, unsigned y0, unsigned w, unsigned h);' % src_native_type - print ' tile_write_count += 1;' + print '#ifdef DEBUG' + print ' lp_tile_unswizzle_count += 1;' + print '#endif' print ' switch(format) {' for format in formats: if is_format_supported(format): print ' case %s:' % format.name - print ' func = &lp_tile_%s_write_%s;' % (format.short_name(), src_suffix) + print ' func = &lp_tile_%s_unswizzle_%s;' % (format.short_name(), src_suffix) print ' break;' print ' default:' print ' debug_printf("%s: unsupported format %s\\n", __FUNCTION__, util_format_name(format));' @@ -360,7 +364,10 @@ def main(): print '#include "util/u_half.h"' print '#include "lp_tile_soa.h"' print - print 'int tile_write_count=0, tile_read_count=0;' + print '#ifdef DEBUG' + print 'unsigned lp_tile_unswizzle_count = 0;' + print 'unsigned lp_tile_swizzle_count = 0;' + print '#endif' print print 'const unsigned char' print 'tile_offset[TILE_VECTOR_HEIGHT][TILE_VECTOR_WIDTH] = {' @@ -388,8 +395,8 @@ def main(): native_type = 'uint8_t' suffix = '4ub' - generate_read(formats, channel, native_type, suffix) - generate_write(formats, channel, native_type, suffix) + generate_swizzle(formats, channel, native_type, suffix) + generate_unswizzle(formats, channel, native_type, suffix) if __name__ == '__main__': diff --git a/src/gallium/drivers/llvmpipe/sp2lp.sh b/src/gallium/drivers/llvmpipe/sp2lp.sh deleted file mode 100755 index c45a81ce3cf..00000000000 --- a/src/gallium/drivers/llvmpipe/sp2lp.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh -# -# Port changes from softpipe to llvmpipe. Invoke as -# -# sp2lp.sh <commit> -# -# Note that this will only affect llvmpipe -- you still need to actually -# cherry-pick/merge the softpipe changes themselves if they affect directories -# outside src/gallium/drivers/softpipe - -git format-patch \ - --keep-subject \ - --relative=src/gallium/drivers/softpipe \ - --src-prefix=a/src/gallium/drivers/llvmpipe/ \ - --dst-prefix=b/src/gallium/drivers/llvmpipe/ \ - --stdout "$1^1..$1" \ -| sed \ - -e 's/\<softpipe\>/llvmpipe/g' \ - -e 's/\<sp\>/lp/g' \ - -e 's/\<softpipe_/llvmpipe_/g' \ - -e 's/\<sp_/lp_/g' \ - -e 's/\<SP_/LP_/g' \ - -e 's/\<SOFTPIPE_/LLVMPIPE_/g' \ - -e 's/\<spt\>/lpt/g' \ - -e 's/\<sps\>/lps/g' \ - -e 's/\<spfs\>/lpfs/g' \ - -e 's/\<sptex\>/lptex/g' \ - -e 's/\<setup_\(point\|line\|tri\)\>/llvmpipe_\0/g' \ - -e 's/\<llvmpipe_cached_tile\>/llvmpipe_cached_tex_tile/g' \ - -e 's/_get_cached_tile_tex\>/_get_cached_tex_tile/g' \ - -e 's/\<TILE_SIZE\>/TEX_TILE_SIZE/g' \ - -e 's/\<tile_address\>/tex_tile_address/g' \ - -e 's/\<tile->data\.color\>/tile->color/g' \ -| patch -p1 diff --git a/src/gallium/drivers/nouveau/SConscript b/src/gallium/drivers/nouveau/SConscript new file mode 100644 index 00000000000..fe7af4d2ae8 --- /dev/null +++ b/src/gallium/drivers/nouveau/SConscript @@ -0,0 +1,11 @@ +Import('*') + +env = env.Clone() + +nouveau = env.ConvenienceLibrary( + target = 'nouveau', + source = [ + 'nouveau_screen.c', + ]) + +Export('nouveau') diff --git a/src/gallium/drivers/nv50/SConscript b/src/gallium/drivers/nv50/SConscript new file mode 100644 index 00000000000..8625f926221 --- /dev/null +++ b/src/gallium/drivers/nv50/SConscript @@ -0,0 +1,26 @@ +Import('*') + +env = env.Clone() + +nv50 = env.ConvenienceLibrary( + target = 'nv50', + source = [ + 'nv50_buffer.c', + 'nv50_clear.c', + 'nv50_context.c', + 'nv50_draw.c', + 'nv50_miptree.c', + 'nv50_query.c', + 'nv50_program.c', + 'nv50_resource.c', + 'nv50_screen.c', + 'nv50_state.c', + 'nv50_state_validate.c', + 'nv50_surface.c', + 'nv50_tex.c', + 'nv50_transfer.c', + 'nv50_vbo.c', + 'nv50_push.c', + ]) + +Export('nv50') diff --git a/src/gallium/drivers/nv50/nv50_program.c b/src/gallium/drivers/nv50/nv50_program.c index b8b6b12120b..0156ff95ff9 100644 --- a/src/gallium/drivers/nv50/nv50_program.c +++ b/src/gallium/drivers/nv50/nv50_program.c @@ -3169,15 +3169,16 @@ nv50_program_tx_insn(struct nv50_pc *pc, if (pc->p->type == PIPE_SHADER_FRAGMENT) nv50_fp_move_results(pc); - /* last insn must be long so it can have the exit bit set */ - if (!is_long(pc->p->exec_tail)) - convert_to_long(pc, pc->p->exec_tail); - else - if (is_immd(pc->p->exec_tail) || + if (!pc->p->exec_tail || + is_immd(pc->p->exec_tail) || is_join(pc->p->exec_tail) || is_control_flow(pc->p->exec_tail)) emit_nop(pc); + /* last insn must be long so it can have the exit bit set */ + if (!is_long(pc->p->exec_tail)) + convert_to_long(pc, pc->p->exec_tail); + pc->p->exec_tail->inst[1] |= 1; /* set exit bit */ terminate_mbb(pc); @@ -4162,7 +4163,7 @@ nv50_program_validate_data(struct nv50_context *nv50, struct nv50_program *p) struct pipe_transfer *transfer; if (!p->data[0] && p->immd_nr) { - struct nouveau_resource *heap = nv50->screen->immd_heap[0]; + struct nouveau_resource *heap = nv50->screen->immd_heap; if (nouveau_resource_alloc(heap, p->immd_nr, p, &p->data[0])) { while (heap->next && heap->size < p->immd_nr) { @@ -4180,7 +4181,7 @@ nv50_program_validate_data(struct nv50_context *nv50, struct nv50_program *p) p->immd_nr, NV50_CB_PMISC); } - assert(p->param_nr <= 512); + assert(p->param_nr <= 16384); if (p->param_nr) { unsigned cb; diff --git a/src/gallium/drivers/nv50/nv50_screen.c b/src/gallium/drivers/nv50/nv50_screen.c index ad17991be9a..2dd10424245 100644 --- a/src/gallium/drivers/nv50/nv50_screen.c +++ b/src/gallium/drivers/nv50/nv50_screen.c @@ -190,9 +190,7 @@ nv50_screen_destroy(struct pipe_screen *pscreen) nouveau_grobj_free(&screen->tesla); nouveau_grobj_free(&screen->eng2d); nouveau_grobj_free(&screen->m2mf); - nouveau_resource_destroy(&screen->immd_heap[0]); - nouveau_resource_destroy(&screen->parm_heap[0]); - nouveau_resource_destroy(&screen->parm_heap[1]); + nouveau_resource_destroy(&screen->immd_heap); nouveau_screen_fini(&screen->base); FREE(screen); } @@ -242,7 +240,7 @@ nv50_screen_relocs(struct nv50_screen *screen) OUT_RELOCh(chan, screen->constbuf_parm[i], 0, rl); OUT_RELOCl(chan, screen->constbuf_parm[i], 0, rl); OUT_RELOC (chan, screen->constbuf_parm[i], - ((NV50_CB_PVP + i) << 16) | 0x0800, rl, 0, 0); + ((NV50_CB_PVP + i) << 16) | 0x0000, rl, 0, 0); } } @@ -411,7 +409,7 @@ nv50_screen_create(struct pipe_winsys *ws, struct nouveau_device *dev) OUT_RING (chan, (NV50_CB_AUX << 16) | 0x0200); for (i = 0; i < 3; i++) { - ret = nouveau_bo_new(dev, NOUVEAU_BO_VRAM, 0, (256 * 4) * 4, + ret = nouveau_bo_new(dev, NOUVEAU_BO_VRAM, 0, (4096 * 4) * 4, &screen->constbuf_parm[i]); if (ret) { nv50_screen_destroy(pscreen); @@ -420,14 +418,12 @@ nv50_screen_create(struct pipe_winsys *ws, struct nouveau_device *dev) BEGIN_RING(chan, screen->tesla, NV50TCL_CB_DEF_ADDRESS_HIGH, 3); OUT_RELOCh(chan, screen->constbuf_parm[i], 0, rl); OUT_RELOCl(chan, screen->constbuf_parm[i], 0, rl); - OUT_RING (chan, ((NV50_CB_PVP + i) << 16) | 0x0800); + /* CB_DEF_SET_SIZE value of 0x0000 means 65536 */ + OUT_RING (chan, ((NV50_CB_PVP + i) << 16) | 0x0000); } - if (nouveau_resource_init(&screen->immd_heap[0], 0, 128) || - nouveau_resource_init(&screen->parm_heap[0], 0, 512) || - nouveau_resource_init(&screen->parm_heap[1], 0, 512)) - { - NOUVEAU_ERR("Error initialising constant buffers.\n"); + if (nouveau_resource_init(&screen->immd_heap, 0, 128)) { + NOUVEAU_ERR("Error initialising shader immediates heap.\n"); nv50_screen_destroy(pscreen); return NULL; } diff --git a/src/gallium/drivers/nv50/nv50_screen.h b/src/gallium/drivers/nv50/nv50_screen.h index 40ebbee72e2..fbf15a75967 100644 --- a/src/gallium/drivers/nv50/nv50_screen.h +++ b/src/gallium/drivers/nv50/nv50_screen.h @@ -20,8 +20,7 @@ struct nv50_screen { struct nouveau_bo *constbuf_misc[1]; struct nouveau_bo *constbuf_parm[PIPE_SHADER_TYPES]; - struct nouveau_resource *immd_heap[1]; - struct nouveau_resource *parm_heap[PIPE_SHADER_TYPES]; + struct nouveau_resource *immd_heap; struct pipe_resource *strm_vbuf[16]; diff --git a/src/gallium/drivers/nv50/nv50_surface.c b/src/gallium/drivers/nv50/nv50_surface.c index c2d9e835260..d905d95354f 100644 --- a/src/gallium/drivers/nv50/nv50_surface.c +++ b/src/gallium/drivers/nv50/nv50_surface.c @@ -31,6 +31,27 @@ #include "util/u_tile.h" #include "util/u_format.h" +/* return TRUE for formats that can be converted among each other by NV50_2D */ +static INLINE boolean +nv50_2d_format_faithful(enum pipe_format format) +{ + switch (format) { + case PIPE_FORMAT_B8G8R8A8_UNORM: + case PIPE_FORMAT_B8G8R8X8_UNORM: + case PIPE_FORMAT_B8G8R8A8_SRGB: + case PIPE_FORMAT_B8G8R8X8_SRGB: + case PIPE_FORMAT_B5G6R5_UNORM: + case PIPE_FORMAT_B5G5R5A1_UNORM: + case PIPE_FORMAT_B10G10R10A2_UNORM: + case PIPE_FORMAT_R8_UNORM: + case PIPE_FORMAT_R32G32B32A32_FLOAT: + case PIPE_FORMAT_R32G32B32_FLOAT: + return TRUE; + default: + return FALSE; + } +} + static INLINE int nv50_format(enum pipe_format format) { @@ -47,9 +68,12 @@ nv50_format(enum pipe_format format) return NV50_2D_DST_FORMAT_R5G6B5_UNORM; case PIPE_FORMAT_B5G5R5A1_UNORM: return NV50_2D_DST_FORMAT_A1R5G5B5_UNORM; + case PIPE_FORMAT_B10G10R10A2_UNORM: + return NV50_2D_DST_FORMAT_A2R10G10B10_UNORM; case PIPE_FORMAT_A8_UNORM: case PIPE_FORMAT_I8_UNORM: case PIPE_FORMAT_L8_UNORM: + case PIPE_FORMAT_R8_UNORM: return NV50_2D_DST_FORMAT_R8_UNORM; case PIPE_FORMAT_R32G32B32A32_FLOAT: return NV50_2D_DST_FORMAT_R32G32B32A32_FLOAT; @@ -178,7 +202,9 @@ nv50_surface_copy(struct pipe_context *pipe, struct nv50_context *nv50 = nv50_context(pipe); struct nv50_screen *screen = nv50->screen; - assert(src->format == dest->format); + assert((src->format == dest->format) || + (nv50_2d_format_faithful(src->format) && + nv50_2d_format_faithful(dest->format))); nv50_surface_do_copy(screen, dest, destx, desty, src, srcx, srcy, width, height); diff --git a/src/gallium/drivers/nvfx/SConscript b/src/gallium/drivers/nvfx/SConscript new file mode 100644 index 00000000000..02d931b10e8 --- /dev/null +++ b/src/gallium/drivers/nvfx/SConscript @@ -0,0 +1,40 @@ +Import('*') + +env = env.Clone() + +env.PrependUnique(delete_existing=1, CPPPATH = [ + '#/src/gallium/drivers', +]) + +nvfx = env.ConvenienceLibrary( + target = 'nvfx', + source = [ + 'nv04_surface_2d.c', + 'nvfx_buffer.c', + 'nvfx_context.c', + 'nvfx_clear.c', + 'nvfx_draw.c', + 'nvfx_fragprog.c', + 'nvfx_fragtex.c', + 'nv30_fragtex.c', + 'nv40_fragtex.c', + 'nvfx_miptree.c', + 'nvfx_query.c', + 'nvfx_resource.c', + 'nvfx_screen.c', + 'nvfx_state.c', + 'nvfx_state_blend.c', + 'nvfx_state_emit.c', + 'nvfx_state_fb.c', + 'nvfx_state_rasterizer.c', + 'nvfx_state_scissor.c', + 'nvfx_state_stipple.c', + 'nvfx_state_viewport.c', + 'nvfx_state_zsa.c', + 'nvfx_surface.c', + 'nvfx_transfer.c', + 'nvfx_vbo.c', + 'nvfx_vertprog.c', + ]) + +Export('nvfx') diff --git a/src/gallium/drivers/nvfx/nvfx_vbo.c b/src/gallium/drivers/nvfx/nvfx_vbo.c index 4d7b7f181d8..520bae5aed2 100644 --- a/src/gallium/drivers/nvfx/nvfx_vbo.c +++ b/src/gallium/drivers/nvfx/nvfx_vbo.c @@ -8,6 +8,7 @@ #include "nvfx_resource.h" #include "nouveau/nouveau_channel.h" +#include "nouveau/nouveau_class.h" #include "nouveau/nouveau_pushbuf.h" #include "nouveau/nouveau_util.h" diff --git a/src/gallium/drivers/r300/Makefile b/src/gallium/drivers/r300/Makefile index 5a8e00f15a2..d3cd6bef96e 100644 --- a/src/gallium/drivers/r300/Makefile +++ b/src/gallium/drivers/r300/Makefile @@ -11,6 +11,7 @@ C_SOURCES = \ r300_emit.c \ r300_flush.c \ r300_fs.c \ + r300_hyperz.c \ r300_query.c \ r300_render.c \ r300_resource.c \ diff --git a/src/gallium/drivers/r300/SConscript b/src/gallium/drivers/r300/SConscript index 08aec427a15..3921085d76a 100644 --- a/src/gallium/drivers/r300/SConscript +++ b/src/gallium/drivers/r300/SConscript @@ -21,6 +21,7 @@ r300 = env.ConvenienceLibrary( 'r300_emit.c', 'r300_flush.c', 'r300_fs.c', + 'r300_hyperz.c', 'r300_query.c', 'r300_render.c', 'r300_resource.c', diff --git a/src/gallium/drivers/r300/r300_context.c b/src/gallium/drivers/r300/r300_context.c index deaa03e1f61..e84bce0010f 100644 --- a/src/gallium/drivers/r300/r300_context.c +++ b/src/gallium/drivers/r300/r300_context.c @@ -37,14 +37,27 @@ #include "r300_state_invariant.h" #include "r300_winsys.h" +#include <inttypes.h> + static void r300_destroy_context(struct pipe_context* context) { struct r300_context* r300 = r300_context(context); struct r300_query* query, * temp; + struct r300_atom *atom; util_blitter_destroy(r300->blitter); draw_destroy(r300->draw); + /* Print stats, if enabled. */ + if (SCREEN_DBG_ON(r300->screen, DBG_STATS)) { + fprintf(stderr, "r300: Stats for context %p:\n", r300); + fprintf(stderr, " : Flushes: %" PRIu64 "\n", r300->flush_counter); + foreach(atom, &r300->atom_list) { + fprintf(stderr, " : %s: %" PRIu64 " emits\n", + atom->name, atom->counter); + } + } + /* Free the OQ BO. */ context->screen->resource_destroy(context->screen, r300->oqbo); @@ -63,7 +76,6 @@ static void r300_destroy_context(struct pipe_context* context) FREE(r300->rs_block_state.state); FREE(r300->scissor_state.state); FREE(r300->textures_state.state); - FREE(r300->vap_output_state.state); FREE(r300->viewport_state.state); FREE(r300->ztop_state.state); FREE(r300->fs_constants.state); @@ -112,7 +124,6 @@ static void r300_setup_atoms(struct r300_context* r300) R300_INIT_ATOM(viewport_state, 9); R300_INIT_ATOM(rs_block_state, 0); R300_INIT_ATOM(vertex_stream_state, 0); - R300_INIT_ATOM(vap_output_state, 6); R300_INIT_ATOM(pvs_flush, 2); R300_INIT_ATOM(vs_state, 0); R300_INIT_ATOM(vs_constants, 0); @@ -136,7 +147,6 @@ static void r300_setup_atoms(struct r300_context* r300) r300->rs_block_state.state = CALLOC_STRUCT(r300_rs_block); r300->scissor_state.state = CALLOC_STRUCT(pipe_scissor_state); r300->textures_state.state = CALLOC_STRUCT(r300_textures_state); - r300->vap_output_state.state = CALLOC_STRUCT(r300_vap_output_state); r300->viewport_state.state = CALLOC_STRUCT(r300_viewport_state); r300->ztop_state.state = CALLOC_STRUCT(r300_ztop_state); r300->fs_constants.state = CALLOC_STRUCT(r300_constant_buffer); diff --git a/src/gallium/drivers/r300/r300_context.h b/src/gallium/drivers/r300/r300_context.h index 1e4fd9e5edd..e9c8fcdc157 100644 --- a/src/gallium/drivers/r300/r300_context.h +++ b/src/gallium/drivers/r300/r300_context.h @@ -45,6 +45,8 @@ struct r300_atom { struct r300_atom *prev, *next; /* Name, for debugging. */ const char* name; + /* Stat counter. */ + uint64_t counter; /* Opaque state. */ void* state; /* Emit the state to the context. */ @@ -117,6 +119,10 @@ struct r300_rs_state { }; struct r300_rs_block { + uint32_t vap_vtx_state_cntl; /* R300_VAP_VTX_STATE_CNTL: 0x2180 */ + uint32_t vap_vsm_vtx_assm; /* R300_VAP_VSM_VTX_ASSM: 0x2184 */ + uint32_t vap_out_vtx_fmt[2]; /* R300_VAP_OUTPUT_VTX_FMT_[0-1]: 0x2090 */ + uint32_t ip[8]; /* R300_RS_IP_[0-7], R500_RS_IP_[0-7] */ uint32_t count; /* R300_RS_COUNT */ uint32_t inst_count; /* R300_RS_INST_COUNT */ @@ -188,12 +194,6 @@ struct r300_vertex_stream_state { unsigned count; }; -struct r300_vap_output_state { - uint32_t vap_vtx_state_cntl; /* R300_VAP_VTX_STATE_CNTL: 0x2180 */ - uint32_t vap_vsm_vtx_assm; /* R300_VAP_VSM_VTX_ASSM: 0x2184 */ - uint32_t vap_out_vtx_fmt[2]; /* R300_VAP_OUTPUT_VTX_FMT_[0-1]: 0x2090 */ -}; - struct r300_viewport_state { float xscale; /* R300_VAP_VPORT_XSCALE: 0x2098 */ float xoffset; /* R300_VAP_VPORT_XOFFSET: 0x209c */ @@ -255,6 +255,10 @@ struct r300_texture { /* A pitch for each mip-level */ unsigned pitch[R300_MAX_TEXTURE_LEVELS]; + /* A pitch multiplied by blockwidth as hardware wants + * the number of pixels instead of the number of blocks. */ + unsigned hwpitch[R300_MAX_TEXTURE_LEVELS]; + /* Size of one zslice or face based on the texture target */ unsigned layer_size[R300_MAX_TEXTURE_LEVELS]; @@ -375,7 +379,7 @@ struct r300_context { struct r300_atom query_start; /* Rasterizer state. */ struct r300_atom rs_state; - /* RS block state. */ + /* RS block state + VAP (vertex shader) output mapping state. */ struct r300_atom rs_block_state; /* Scissor state. */ struct r300_atom scissor_state; @@ -383,8 +387,6 @@ struct r300_context { struct r300_atom textures_state; /* Vertex stream formatting state. */ struct r300_atom vertex_stream_state; - /* VAP (vertex shader) output mapping state. */ - struct r300_atom vap_output_state; /* Vertex shader. */ struct r300_atom vs_state; /* Vertex shader constant buffer. */ @@ -418,6 +420,9 @@ struct r300_context { struct pipe_viewport_state viewport; + /* Stream locations for SWTCL. */ + int stream_loc_notcl[16]; + /* Flag indicating whether or not the HW is dirty. */ uint32_t dirty_hw; /* Whether polygon offset is enabled. */ @@ -435,6 +440,9 @@ struct r300_context { /* upload managers */ struct u_upload_mgr *upload_vb; struct u_upload_mgr *upload_ib; + + /* Stat counter. */ + uint64_t flush_counter; }; /* Convenience cast wrapper. */ diff --git a/src/gallium/drivers/r300/r300_cs.h b/src/gallium/drivers/r300/r300_cs.h index 456b2ec7b92..996a4f491e7 100644 --- a/src/gallium/drivers/r300/r300_cs.h +++ b/src/gallium/drivers/r300/r300_cs.h @@ -104,6 +104,13 @@ cs_count--; \ } while (0) +#define OUT_CS_TABLE(values, count) do { \ + if (VERY_VERBOSE_REGISTERS) \ + DBG(cs_context_copy, DBG_CS, "r300: writing table of %d dwords\n", count); \ + cs_winsys->write_cs_table(cs_winsys, values, count); \ + cs_count -= count; \ +} while (0) + #define OUT_CS_BUF_RELOC(bo, offset, rd, wd, flags) do { \ DBG(cs_context_copy, DBG_CS, "r300: writing relocation for buffer %p, offset %d, " \ "domains (%d, %d, %d)\n", \ @@ -150,6 +157,9 @@ DBG(cs_context_copy, DBG_CS, "r300: FLUSH_CS in %s (%s:%d)\n\n", __FUNCTION__, \ __FILE__, __LINE__); \ } \ + if (SCREEN_DBG_ON(r300->screen, DBG_STATS)) { \ + r300->flush_counter++; \ + } \ cs_winsys->flush_cs(cs_winsys); \ } while (0) diff --git a/src/gallium/drivers/r300/r300_debug.c b/src/gallium/drivers/r300/r300_debug.c index 6e84bf82469..4c2836f36a8 100644 --- a/src/gallium/drivers/r300/r300_debug.c +++ b/src/gallium/drivers/r300/r300_debug.c @@ -38,9 +38,11 @@ static struct debug_option debug_options[] = { { "draw", DBG_DRAW, "Draw and emit (for debugging)" }, { "tex", DBG_TEX, "Textures (for debugging)" }, { "fall", DBG_FALL, "Fallbacks (for debugging)" }, + { "rs", DBG_RS, "Rasterizer (for debugging)" }, { "anisohq", DBG_ANISOHQ, "High quality anisotropic filtering (for benchmarking)" }, { "notiling", DBG_NO_TILING, "Disable tiling (for benchmarking)" }, { "noimmd", DBG_NO_IMMD, "Disable immediate mode (for benchmarking)" }, + { "stats", DBG_STATS, "Gather statistics (for lulz)" }, { "all", ~0, "Convenience option that enables all debug flags" }, diff --git a/src/gallium/drivers/r300/r300_emit.c b/src/gallium/drivers/r300/r300_emit.c index 19acdaba621..23bbc6a99c8 100644 --- a/src/gallium/drivers/r300/r300_emit.c +++ b/src/gallium/drivers/r300/r300_emit.c @@ -83,7 +83,6 @@ void r300_emit_clip_state(struct r300_context* r300, unsigned size, void* state) { struct pipe_clip_state* clip = (struct pipe_clip_state*)state; - int i; CS_LOCALS(r300); if (r300->screen->caps.has_tcl) { @@ -92,12 +91,7 @@ void r300_emit_clip_state(struct r300_context* r300, (r300->screen->caps.is_r500 ? R500_PVS_UCP_START : R300_PVS_UCP_START)); OUT_CS_ONE_REG(R300_VAP_PVS_UPLOAD_DATA, 6 * 4); - for (i = 0; i < 6; i++) { - OUT_CS_32F(clip->ucp[i][0]); - OUT_CS_32F(clip->ucp[i][1]); - OUT_CS_32F(clip->ucp[i][2]); - OUT_CS_32F(clip->ucp[i][3]); - } + OUT_CS_TABLE(clip->ucp, 6 * 4); OUT_CS_REG(R300_VAP_CLIP_CNTL, ((1 << clip->nr) - 1) | R300_PS_UCP_MODE_CLIP_AS_TRIFAN); END_CS; @@ -106,7 +100,6 @@ void r300_emit_clip_state(struct r300_context* r300, OUT_CS_REG(R300_VAP_CLIP_CNTL, R300_CLIP_DISABLE); END_CS; } - } void r300_emit_dsa_state(struct r300_context* r300, unsigned size, void* state) @@ -244,8 +237,7 @@ void r300_emit_fs(struct r300_context* r300, unsigned size, void *state) OUT_CS_REG(R300_US_CODE_OFFSET, code->code_offset); OUT_CS_REG_SEQ(R300_US_CODE_ADDR_0, 4); - for(i = 0; i < 4; ++i) - OUT_CS(code->code_addr[i]); + OUT_CS_TABLE(code->code_addr, 4); OUT_CS_REG_SEQ(R300_US_ALU_RGB_INST_0, code->alu.length); for (i = 0; i < code->alu.length; i++) @@ -265,8 +257,7 @@ void r300_emit_fs(struct r300_context* r300, unsigned size, void *state) if (code->tex.length) { OUT_CS_REG_SEQ(R300_US_TEX_INST_0, code->tex.length); - for(i = 0; i < code->tex.length; ++i) - OUT_CS(code->tex.inst[i]); + OUT_CS_TABLE(code->tex.inst, code->tex.length); } /* Emit immediates. */ @@ -396,10 +387,7 @@ void r500_emit_fs(struct r300_context* r300, unsigned size, void *state) R500_GA_US_VECTOR_INDEX_TYPE_CONST | (i & R500_GA_US_VECTOR_INDEX_MASK)); OUT_CS_ONE_REG(R500_GA_US_VECTOR_DATA, 4); - OUT_CS_32F(data[0]); - OUT_CS_32F(data[1]); - OUT_CS_32F(data[2]); - OUT_CS_32F(data[3]); + OUT_CS_TABLE(data, 4); } } } @@ -424,15 +412,9 @@ void r500_emit_fs_constants(struct r300_context* r300, unsigned size, void *stat OUT_CS_REG(R500_GA_US_VECTOR_INDEX, R500_GA_US_VECTOR_INDEX_TYPE_CONST); OUT_CS_ONE_REG(R500_GA_US_VECTOR_DATA, count * 4); for(i = 0; i < count; ++i) { - const float *data; assert(constants->Constants[i].Type == RC_CONSTANT_EXTERNAL); - data = buf->constants[i]; - - OUT_CS_32F(data[0]); - OUT_CS_32F(data[1]); - OUT_CS_32F(data[2]); - OUT_CS_32F(data[3]); } + OUT_CS_TABLE(buf->constants, count * 4); END_CS; } @@ -459,10 +441,7 @@ void r500_emit_fs_rc_constant_state(struct r300_context* r300, unsigned size, vo R500_GA_US_VECTOR_INDEX_TYPE_CONST | (i & R500_GA_US_VECTOR_INDEX_MASK)); OUT_CS_ONE_REG(R500_GA_US_VECTOR_DATA, 4); - OUT_CS_32F(data[0]); - OUT_CS_32F(data[1]); - OUT_CS_32F(data[2]); - OUT_CS_32F(data[3]); + OUT_CS_TABLE(data, 4); } } END_CS; @@ -738,13 +717,20 @@ void r300_emit_rs_block_state(struct r300_context* r300, DBG(r300, DBG_DRAW, "r300: RS emit:\n"); BEGIN_CS(size); + OUT_CS_REG_SEQ(R300_VAP_VTX_STATE_CNTL, 2); + OUT_CS(rs->vap_vtx_state_cntl); + OUT_CS(rs->vap_vsm_vtx_assm); + OUT_CS_REG_SEQ(R300_VAP_OUTPUT_VTX_FMT_0, 2); + OUT_CS(rs->vap_out_vtx_fmt[0]); + OUT_CS(rs->vap_out_vtx_fmt[1]); + if (r300->screen->caps.is_r500) { OUT_CS_REG_SEQ(R500_RS_IP_0, count); } else { OUT_CS_REG_SEQ(R300_RS_IP_0, count); } + OUT_CS_TABLE(rs->ip, count); for (i = 0; i < count; i++) { - OUT_CS(rs->ip[i]); DBG(r300, DBG_DRAW, " : ip %d: 0x%08x\n", i, rs->ip[i]); } @@ -757,8 +743,8 @@ void r300_emit_rs_block_state(struct r300_context* r300, } else { OUT_CS_REG_SEQ(R300_RS_INST_0, count); } + OUT_CS_TABLE(rs->inst, count); for (i = 0; i < count; i++) { - OUT_CS(rs->inst[i]); DBG(r300, DBG_DRAW, " : inst %d: 0x%08x\n", i, rs->inst[i]); } @@ -823,7 +809,7 @@ void r300_emit_textures_state(struct r300_context *r300, END_CS; } -void r300_emit_aos(struct r300_context* r300, unsigned offset) +void r300_emit_aos(struct r300_context* r300, unsigned offset, boolean indexed) { struct pipe_vertex_buffer *vb1, *vb2, *vbuf = r300->vertex_buffer; struct pipe_vertex_element *velem = r300->velems->velem; @@ -832,9 +818,18 @@ void r300_emit_aos(struct r300_context* r300, unsigned offset) unsigned packet_size = (aos_count * 3 + 1) / 2; CS_LOCALS(r300); + for (i = 0; i < aos_count; i++) { + if ((vbuf[velem[i].vertex_buffer_index].buffer_offset + velem[i].src_offset) % 4 != 0) { + /* XXX We must align the buffer. */ + assert(0); + fprintf(stderr, "r300: Unaligned vertex buffer offsets aren't supported, aborting..\n"); + abort(); + } + } + BEGIN_CS(2 + packet_size + aos_count * 2); OUT_CS_PKT3(R300_PACKET3_3D_LOAD_VBPNTR, packet_size); - OUT_CS(aos_count); + OUT_CS(aos_count | (!indexed ? R300_VC_FORCE_PREFETCH : 0)); for (i = 0; i < aos_count - 1; i += 2) { vb1 = &vbuf[velem[i].vertex_buffer_index]; @@ -899,39 +894,20 @@ void r300_emit_vertex_stream_state(struct r300_context* r300, BEGIN_CS(size); OUT_CS_REG_SEQ(R300_VAP_PROG_STREAM_CNTL_0, streams->count); + OUT_CS_TABLE(streams->vap_prog_stream_cntl, streams->count); for (i = 0; i < streams->count; i++) { - OUT_CS(streams->vap_prog_stream_cntl[i]); DBG(r300, DBG_DRAW, " : prog_stream_cntl%d: 0x%08x\n", i, streams->vap_prog_stream_cntl[i]); } OUT_CS_REG_SEQ(R300_VAP_PROG_STREAM_CNTL_EXT_0, streams->count); + OUT_CS_TABLE(streams->vap_prog_stream_cntl_ext, streams->count); for (i = 0; i < streams->count; i++) { - OUT_CS(streams->vap_prog_stream_cntl_ext[i]); DBG(r300, DBG_DRAW, " : prog_stream_cntl_ext%d: 0x%08x\n", i, streams->vap_prog_stream_cntl_ext[i]); } END_CS; } -void r300_emit_vap_output_state(struct r300_context* r300, - unsigned size, void* state) -{ - struct r300_vap_output_state *vap_out_state = - (struct r300_vap_output_state*)state; - CS_LOCALS(r300); - - DBG(r300, DBG_DRAW, "r300: VAP emit:\n"); - - BEGIN_CS(size); - OUT_CS_REG_SEQ(R300_VAP_VTX_STATE_CNTL, 2); - OUT_CS(vap_out_state->vap_vtx_state_cntl); - OUT_CS(vap_out_state->vap_vsm_vtx_assm); - OUT_CS_REG_SEQ(R300_VAP_OUTPUT_VTX_FMT_0, 2); - OUT_CS(vap_out_state->vap_out_vtx_fmt[0]); - OUT_CS(vap_out_state->vap_out_vtx_fmt[1]); - END_CS; -} - void r300_emit_pvs_flush(struct r300_context* r300, unsigned size, void* state) { CS_LOCALS(r300); @@ -978,9 +954,7 @@ void r300_emit_vs_state(struct r300_context* r300, unsigned size, void* state) OUT_CS_REG(R300_VAP_PVS_VECTOR_INDX_REG, 0); OUT_CS_ONE_REG(R300_VAP_PVS_UPLOAD_DATA, code->length); - for (i = 0; i < code->length; i++) { - OUT_CS(code->body.d[i]); - } + OUT_CS_TABLE(code->body.d, code->length); OUT_CS_REG(R300_VAP_CNTL, R300_PVS_NUM_SLOTS(pvs_num_slots) | R300_PVS_NUM_CNTLRS(pvs_num_controllers) | @@ -997,10 +971,7 @@ void r300_emit_vs_state(struct r300_context* r300, unsigned size, void* state) OUT_CS_ONE_REG(R300_VAP_PVS_UPLOAD_DATA, imm_count * 4); for (i = imm_first; i < imm_end; i++) { const float *data = vs->code.constants.Constants[i].u.Immediate; - OUT_CS_32F(data[0]); - OUT_CS_32F(data[1]); - OUT_CS_32F(data[2]); - OUT_CS_32F(data[3]); + OUT_CS_TABLE(data, 4); } } END_CS; @@ -1009,7 +980,6 @@ void r300_emit_vs_state(struct r300_context* r300, unsigned size, void* state) void r300_emit_vs_constants(struct r300_context* r300, unsigned size, void *state) { - unsigned i; unsigned count = ((struct r300_vertex_shader*)r300->vs_state.state)->externals_count; struct r300_constant_buffer *buf = (struct r300_constant_buffer*)state; @@ -1023,13 +993,7 @@ void r300_emit_vs_constants(struct r300_context* r300, (r300->screen->caps.is_r500 ? R500_PVS_CONST_START : R300_PVS_CONST_START)); OUT_CS_ONE_REG(R300_VAP_PVS_UPLOAD_DATA, count * 4); - for (i = 0; i < count; i++) { - const float *data = buf->constants[i]; - OUT_CS_32F(data[0]); - OUT_CS_32F(data[1]); - OUT_CS_32F(data[2]); - OUT_CS_32F(data[3]); - } + OUT_CS_TABLE(buf->constants, count * 4); END_CS; } @@ -1188,6 +1152,11 @@ unsigned r300_get_num_dirty_dwords(struct r300_context *r300) } } + /* emit_query_end is not atomized. */ + dwords += 26; + /* let's reserve some more, just in case */ + dwords += 32; + return dwords; } @@ -1200,6 +1169,9 @@ void r300_emit_dirty_state(struct r300_context* r300) foreach(atom, &r300->atom_list) { if (atom->dirty) { atom->emit(r300, atom->size, atom->state); + if (SCREEN_DBG_ON(r300->screen, DBG_STATS)) { + atom->counter++; + } atom->dirty = FALSE; } } diff --git a/src/gallium/drivers/r300/r300_emit.h b/src/gallium/drivers/r300/r300_emit.h index 56f7318cdbe..3c0edf6fdca 100644 --- a/src/gallium/drivers/r300/r300_emit.h +++ b/src/gallium/drivers/r300/r300_emit.h @@ -29,7 +29,7 @@ struct rX00_fragment_program_code; struct r300_vertex_program_code; -void r300_emit_aos(struct r300_context* r300, unsigned offset); +void r300_emit_aos(struct r300_context* r300, unsigned offset, boolean indexed); void r300_emit_blend_state(struct r300_context* r300, unsigned size, void* state); @@ -81,9 +81,6 @@ void r300_emit_vertex_buffer(struct r300_context* r300); void r300_emit_vertex_stream_state(struct r300_context* r300, unsigned size, void* state); -void r300_emit_vap_output_state(struct r300_context* r300, - unsigned size, void* state); - void r300_emit_vs_constants(struct r300_context* r300, unsigned size, void *state); diff --git a/src/gallium/drivers/r300/r300_fs.c b/src/gallium/drivers/r300/r300_fs.c index 4d61f638530..88303f074cd 100644 --- a/src/gallium/drivers/r300/r300_fs.c +++ b/src/gallium/drivers/r300/r300_fs.c @@ -275,6 +275,14 @@ static void r300_translate_fragment_shader( /* Invoke the compiler */ r3xx_compile_fragment_program(&compiler); + /* Shaders with zero instructions are invalid, + * use the dummy shader instead. */ + if (shader->code.code.r500.inst_end == -1) { + rc_destroy(&compiler.Base); + r300_dummy_fragment_shader(r300, shader); + return; + } + if (compiler.Base.Error) { fprintf(stderr, "r300 FP: Compiler Error:\n%sUsing a dummy shader" " instead.\n", compiler.Base.ErrorMsg); diff --git a/src/gallium/drivers/r300/r300_hyperz.c b/src/gallium/drivers/r300/r300_hyperz.c new file mode 100644 index 00000000000..b41b6b1508d --- /dev/null +++ b/src/gallium/drivers/r300/r300_hyperz.c @@ -0,0 +1,108 @@ +/* + * Copyright 2008 Corbin Simpson <[email protected]> + * Copyright 2009 Marek Olšák <[email protected]> + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, and/or sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE + * USE OR OTHER DEALINGS IN THE SOFTWARE. */ + + +#include "r300_hyperz.h" +#include "r300_context.h" +#include "r300_reg.h" +#include "r300_fs.h" + +/*****************************************************************************/ +/* The ZTOP state */ +/*****************************************************************************/ + +static boolean r300_dsa_writes_depth_stencil(struct r300_dsa_state* dsa) +{ + /* We are interested only in the cases when a new depth or stencil value + * can be written and changed. */ + + /* We might optionally check for [Z func: never] and inspect the stencil + * state in a similar fashion, but it's not terribly important. */ + return (dsa->z_buffer_control & R300_Z_WRITE_ENABLE) || + (dsa->stencil_ref_mask & R300_STENCILWRITEMASK_MASK) || + ((dsa->z_buffer_control & R500_STENCIL_REFMASK_FRONT_BACK) && + (dsa->stencil_ref_bf & R300_STENCILWRITEMASK_MASK)); +} + +static boolean r300_dsa_alpha_test_enabled(struct r300_dsa_state* dsa) +{ + /* We are interested only in the cases when alpha testing can kill + * a fragment. */ + uint32_t af = dsa->alpha_function; + + return (af & R300_FG_ALPHA_FUNC_ENABLE) && + (af & R300_FG_ALPHA_FUNC_ALWAYS) != R300_FG_ALPHA_FUNC_ALWAYS; +} + +static void r300_update_ztop(struct r300_context* r300) +{ + struct r300_ztop_state* ztop_state = + (struct r300_ztop_state*)r300->ztop_state.state; + + /* This is important enough that I felt it warranted a comment. + * + * According to the docs, these are the conditions where ZTOP must be + * disabled: + * 1) Alpha testing enabled + * 2) Texture kill instructions in fragment shader + * 3) Chroma key culling enabled + * 4) W-buffering enabled + * + * The docs claim that for the first three cases, if no ZS writes happen, + * then ZTOP can be used. + * + * (3) will never apply since we do not support chroma-keyed operations. + * (4) will need to be re-examined (and this comment updated) if/when + * Hyper-Z becomes supported. + * + * Additionally, the following conditions require disabled ZTOP: + * 5) Depth writes in fragment shader + * 6) Outstanding occlusion queries + * + * This register causes stalls all the way from SC to CB when changed, + * but it is buffered on-chip so it does not hurt to write it if it has + * not changed. + * + * ~C. + */ + + /* ZS writes */ + if (r300_dsa_writes_depth_stencil(r300->dsa_state.state) && + (r300_dsa_alpha_test_enabled(r300->dsa_state.state) || /* (1) */ + r300_fs(r300)->shader->info.uses_kill)) { /* (2) */ + ztop_state->z_buffer_top = R300_ZTOP_DISABLE; + } else if (r300_fragment_shader_writes_depth(r300_fs(r300))) { /* (5) */ + ztop_state->z_buffer_top = R300_ZTOP_DISABLE; + } else if (r300->query_current) { /* (6) */ + ztop_state->z_buffer_top = R300_ZTOP_DISABLE; + } else { + ztop_state->z_buffer_top = R300_ZTOP_ENABLE; + } + + r300->ztop_state.dirty = TRUE; +} + +void r300_update_hyperz_state(struct r300_context* r300) +{ + r300_update_ztop(r300); +} diff --git a/src/gallium/drivers/r300/r300_hyperz.h b/src/gallium/drivers/r300/r300_hyperz.h new file mode 100644 index 00000000000..3df5053b896 --- /dev/null +++ b/src/gallium/drivers/r300/r300_hyperz.h @@ -0,0 +1,30 @@ +/* + * Copyright 2010 Marek Olšák <[email protected]> + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, and/or sell copies of the Software, and to permit persons to whom + * the Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE + * USE OR OTHER DEALINGS IN THE SOFTWARE. */ + +#ifndef R300_HYPERZ_H +#define R300_HYPERZ_H + +struct r300_context; + +void r300_update_hyperz_state(struct r300_context* r300); + +#endif diff --git a/src/gallium/drivers/r300/r300_reg.h b/src/gallium/drivers/r300/r300_reg.h index 239f91443f2..675a9317f9c 100644 --- a/src/gallium/drivers/r300/r300_reg.h +++ b/src/gallium/drivers/r300/r300_reg.h @@ -3377,7 +3377,7 @@ enum { * the last block is omitted. */ #define R300_PACKET3_3D_LOAD_VBPNTR 0x00002F00 - +# define R300_VC_FORCE_PREFETCH (1 << 5) # define R300_VBPNTR_SIZE0(x) ((x) >> 2) # define R300_VBPNTR_STRIDE0(x) (((x) >> 2) << 8) # define R300_VBPNTR_SIZE1(x) (((x) >> 2) << 16) diff --git a/src/gallium/drivers/r300/r300_render.c b/src/gallium/drivers/r300/r300_render.c index 23b61df89cc..7c3a7902a49 100644 --- a/src/gallium/drivers/r300/r300_render.c +++ b/src/gallium/drivers/r300/r300_render.c @@ -41,9 +41,6 @@ #include "r300_render.h" #include "r300_state_derived.h" -/* XXX The DRM rejects VAP_ALT_NUM_VERTICES.. */ -//#define ENABLE_ALT_NUM_VERTS - static uint32_t r300_translate_primitive(unsigned prim) { switch (prim) { @@ -169,6 +166,24 @@ static boolean immd_is_good_idea(struct r300_context *r300, * after resolving fallback issues (e.g. stencil ref two-sided). * ****************************************************************************/ +static boolean r500_emit_index_offset(struct r300_context *r300, int indexBias) +{ + CS_LOCALS(r300); + + if (r300->screen->caps.is_r500 && + r300->rws->get_value(r300->rws, R300_VID_DRM_2_3_0)) { + BEGIN_CS(2); + OUT_CS_REG(R500_VAP_INDEX_OFFSET, + (indexBias & 0xFFFFFF) | (indexBias < 0 ? 1<<24 : 0)); + END_CS; + } else { + if (indexBias) + return FALSE; /* Can't do anything :( */ + } + + return TRUE; +} + void r500_emit_draw_arrays_immediate(struct r300_context *r300, unsigned mode, unsigned start, @@ -220,10 +235,12 @@ void r500_emit_draw_arrays_immediate(struct r300_context *r300, dwords = 9 + count * vertex_size; - r300_reserve_cs_space(r300, r300_get_num_dirty_dwords(r300) + dwords); + r300_reserve_cs_space(r300, r300_get_num_dirty_dwords(r300) + 2 + dwords); r300_emit_buffer_validate(r300, FALSE, NULL); r300_emit_dirty_state(r300); + r500_emit_index_offset(r300, 0); + BEGIN_CS(dwords); OUT_CS_REG(R300_GA_COLOR_CONTROL, r300_provoking_vertex_fixes(r300, mode)); @@ -265,23 +282,20 @@ void r500_emit_draw_arrays(struct r300_context *r300, unsigned mode, unsigned count) { -#if defined(ENABLE_ALT_NUM_VERTS) boolean alt_num_verts = count > 65535; -#else - boolean alt_num_verts = FALSE; -#endif CS_LOCALS(r300); + if (count >= (1 << 24)) { + fprintf(stderr, "r300: Got a huge number of vertices: %i, " + "refusing to render.\n", count); + return; + } + + r500_emit_index_offset(r300, 0); + + BEGIN_CS(7 + (alt_num_verts ? 2 : 0)); if (alt_num_verts) { - if (count >= (1 << 24)) { - fprintf(stderr, "r300: Got a huge number of vertices: %i, " - "refusing to render.\n", count); - return; - } - BEGIN_CS(9); OUT_CS_REG(R500_VAP_ALT_NUM_VERTICES, count); - } else { - BEGIN_CS(7); } OUT_CS_REG(R300_GA_COLOR_CONTROL, r300_provoking_vertex_fixes(r300, mode)); @@ -307,11 +321,7 @@ void r500_emit_draw_elements(struct r300_context *r300, { uint32_t count_dwords; uint32_t offset_dwords = indexSize * start / sizeof(uint32_t); -#if defined(ENABLE_ALT_NUM_VERTS) boolean alt_num_verts = count > 65535; -#else - boolean alt_num_verts = FALSE; -#endif CS_LOCALS(r300); if (count >= (1 << 24)) { @@ -320,18 +330,20 @@ void r500_emit_draw_elements(struct r300_context *r300, return; } - assert(indexBias == 0); - maxIndex = MIN2(maxIndex, r300->vertex_buffer_max_index); DBG(r300, DBG_DRAW, "r300: Indexbuf of %u indices, min %u max %u\n", count, minIndex, maxIndex); + if (!r500_emit_index_offset(r300, indexBias)) { + fprintf(stderr, "r300: Got a non-zero index bias, " + "refusing to render.\n"); + return; + } + + BEGIN_CS(13 + (alt_num_verts ? 2 : 0)); if (alt_num_verts) { - BEGIN_CS(15); OUT_CS_REG(R500_VAP_ALT_NUM_VERTICES, count); - } else { - BEGIN_CS(13); } OUT_CS_REG(R300_GA_COLOR_CONTROL, r300_provoking_vertex_fixes(r300, mode)); @@ -541,12 +553,9 @@ void r300_draw_range_elements(struct pipe_context* pipe, { struct r300_context* r300 = r300_context(pipe); struct pipe_resource* orgIndexBuffer = indexBuffer; -#if defined(ENABLE_ALT_NUM_VERTS) boolean alt_num_verts = r300->screen->caps.is_r500 && - count > 65536; -#else - boolean alt_num_verts = FALSE; -#endif + count > 65536 && + r300->rws->get_value(r300->rws, R300_VID_DRM_2_3_0); unsigned short_count; if (r300->skip_rendering) { @@ -574,7 +583,7 @@ void r300_draw_range_elements(struct pipe_context* pipe, r300_reserve_cs_space(r300, r300_get_num_dirty_dwords(r300) + 128); r300_emit_buffer_validate(r300, TRUE, indexBuffer); r300_emit_dirty_state(r300); - r300_emit_aos(r300, 0); + r300_emit_aos(r300, 0, TRUE); u_upload_flush(r300->upload_vb); u_upload_flush(r300->upload_ib); @@ -591,11 +600,12 @@ void r300_draw_range_elements(struct pipe_context* pipe, start += short_count; count -= short_count; - /* 16 spare dwords are enough for emit_draw_elements. */ - if (count && r300_reserve_cs_space(r300, 16)) { + /* 16 spare dwords are enough for emit_draw_elements. + * Also reserve some space for emit_query_end. */ + if (count && r300_reserve_cs_space(r300, 74)) { r300_emit_buffer_validate(r300, TRUE, indexBuffer); r300_emit_dirty_state(r300); - r300_emit_aos(r300, 0); + r300_emit_aos(r300, 0, TRUE); } } while (count); } @@ -622,12 +632,9 @@ void r300_draw_arrays(struct pipe_context* pipe, unsigned mode, unsigned start, unsigned count) { struct r300_context* r300 = r300_context(pipe); -#if defined(ENABLE_ALT_NUM_VERTS) boolean alt_num_verts = r300->screen->caps.is_r500 && - count > 65536; -#else - boolean alt_num_verts = FALSE; -#endif + count > 65536 && + r300->rws->get_value(r300->rws, R300_VID_DRM_2_3_0); unsigned short_count; if (r300->skip_rendering) { @@ -650,20 +657,21 @@ void r300_draw_arrays(struct pipe_context* pipe, unsigned mode, r300_emit_dirty_state(r300); if (alt_num_verts || count <= 65535) { - r300_emit_aos(r300, start); + r300_emit_aos(r300, start, FALSE); r300->emit_draw_arrays(r300, mode, count); } else { do { short_count = MIN2(count, 65535); - r300_emit_aos(r300, start); + r300_emit_aos(r300, start, FALSE); r300->emit_draw_arrays(r300, mode, short_count); start += short_count; count -= short_count; /* Again, we emit both AOS and draw_arrays so there should be - * at least 128 spare dwords. */ - if (count && r300_reserve_cs_space(r300, 128)) { + * at least 128 spare dwords. + * Also reserve some space for emit_query_end. */ + if (count && r300_reserve_cs_space(r300, 186)) { r300_emit_buffer_validate(r300, TRUE, NULL); r300_emit_dirty_state(r300); } @@ -896,6 +904,8 @@ static void r500_render_draw_arrays(struct vbuf_render* render, DBG(r300, DBG_DRAW, "r300: Doing vbuf render, count %d\n", count); + r500_emit_index_offset(r300, 0); + BEGIN_CS(2); OUT_CS_PKT3(R300_PACKET3_3D_DRAW_VBUF_2, 0); OUT_CS(R300_VAP_VF_CNTL__PRIM_WALK_VERTEX_LIST | (count << 16) | @@ -918,6 +928,8 @@ static void r500_render_draw(struct vbuf_render* render, r300_emit_buffer_validate(r300, FALSE, NULL); r300_emit_dirty_state(r300); + r500_emit_index_offset(r300, 0); + BEGIN_CS(dwords); OUT_CS_PKT3(R300_PACKET3_3D_DRAW_INDX_2, (count+1)/2); OUT_CS(R300_VAP_VF_CNTL__PRIM_WALK_INDICES | (count << 16) | diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c index 8fc1d5aa00e..c0391267031 100644 --- a/src/gallium/drivers/r300/r300_screen.c +++ b/src/gallium/drivers/r300/r300_screen.c @@ -22,6 +22,7 @@ * USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include "util/u_format.h" +#include "util/u_format_s3tc.h" #include "util/u_memory.h" #include "r300_context.h" @@ -319,6 +320,8 @@ struct pipe_screen* r300_create_screen(struct r300_winsys_screen *rws) r300_init_screen_resource_functions(r300screen); + util_format_s3tc_init(); + return &r300screen->screen; } diff --git a/src/gallium/drivers/r300/r300_screen.h b/src/gallium/drivers/r300/r300_screen.h index 330bd9b36ba..735c233c9e2 100644 --- a/src/gallium/drivers/r300/r300_screen.h +++ b/src/gallium/drivers/r300/r300_screen.h @@ -71,6 +71,8 @@ static INLINE struct r300_screen* r300_screen(struct pipe_screen* screen) { #define DBG_ANISOHQ 0x0000080 #define DBG_NO_TILING 0x0000100 #define DBG_NO_IMMD 0x0000200 +#define DBG_STATS 0x0000400 +#define DBG_RS 0x0000800 /*@}*/ static INLINE boolean SCREEN_DBG_ON(struct r300_screen * screen, unsigned flags) diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c index 9eb8539a655..d31e7c53f71 100644 --- a/src/gallium/drivers/r300/r300_state.c +++ b/src/gallium/drivers/r300/r300_state.c @@ -538,46 +538,12 @@ static void r300_set_stencil_ref(struct pipe_context* pipe, } /* This switcheroo is needed just because of goddamned MACRO_SWITCH. */ -static void r300_fb_update_tiling_flags(struct r300_context *r300, +static void r300_fb_set_tiling_flags(struct r300_context *r300, const struct pipe_framebuffer_state *old_state, const struct pipe_framebuffer_state *new_state) { struct r300_texture *tex; - unsigned i, j, level; - - /* Reset tiling flags for old surfaces to default values. */ - for (i = 0; i < old_state->nr_cbufs; i++) { - for (j = 0; j < new_state->nr_cbufs; j++) { - if (old_state->cbufs[i]->texture == new_state->cbufs[j]->texture) { - break; - } - } - /* If not binding the surface again... */ - if (j != new_state->nr_cbufs) { - continue; - } - - tex = r300_texture(old_state->cbufs[i]->texture); - - if (tex) { - r300->rws->buffer_set_tiling(r300->rws, tex->buffer, - tex->pitch[0], - tex->microtile, - tex->macrotile); - } - } - if (old_state->zsbuf && - (!new_state->zsbuf || - old_state->zsbuf->texture != new_state->zsbuf->texture)) { - tex = r300_texture(old_state->zsbuf->texture); - - if (tex) { - r300->rws->buffer_set_tiling(r300->rws, tex->buffer, - tex->pitch[0], - tex->microtile, - tex->macrotile); - } - } + unsigned i, level; /* Set tiling flags for new surfaces. */ for (i = 0; i < new_state->nr_cbufs; i++) { @@ -585,7 +551,7 @@ static void r300_fb_update_tiling_flags(struct r300_context *r300, level = new_state->cbufs[i]->level; r300->rws->buffer_set_tiling(r300->rws, tex->buffer, - tex->pitch[level], + tex->pitch[0], tex->microtile, tex->mip_macrotile[level]); } @@ -594,7 +560,7 @@ static void r300_fb_update_tiling_flags(struct r300_context *r300, level = new_state->zsbuf->level; r300->rws->buffer_set_tiling(r300->rws, tex->buffer, - tex->pitch[level], + tex->pitch[0], tex->microtile, tex->mip_macrotile[level]); } @@ -644,7 +610,8 @@ static void r300->dsa_state.dirty = TRUE; } - r300_fb_update_tiling_flags(r300, r300->fb_state.state, state); + /* The tiling flags are dependent on the surface miplevel, unfortunately. */ + r300_fb_set_tiling_flags(r300, r300->fb_state.state, state); memcpy(r300->fb_state.state, state, sizeof(struct pipe_framebuffer_state)); @@ -719,10 +686,6 @@ static void r300_bind_fs_state(struct pipe_context* pipe, void* shader) r300_mark_fs_code_dirty(r300); r300->rs_block_state.dirty = TRUE; /* Will be updated before the emission. */ - - if (r300->vs_state.state && r300_vertex_shader_setup_wpos(r300)) { - r300->vap_output_state.dirty = TRUE; - } } /* Delete fragment shader state. */ @@ -1072,11 +1035,9 @@ r300_create_sampler_view(struct pipe_context *pipe, swizzle[2] = templ->swizzle_b; swizzle[3] = templ->swizzle_a; - /* XXX Enable swizzles when they become supported. Now we get RGBA - * everywhere. And do testing! */ view->format = tex->tx_format; view->format.format1 |= r300_translate_texformat(templ->format, - 0); /*swizzle);*/ + swizzle); if (r300_screen(pipe->screen)->caps.is_r500) { view->format.format2 |= r500_tx_format_msb_bit(templ->format); } @@ -1271,6 +1232,7 @@ static void* r300_create_vertex_elements_state(struct pipe_context* pipe, { struct r300_vertex_element_state *velems; unsigned i, size; + enum pipe_format *format; assert(count <= PIPE_MAX_ATTRIBS); velems = CALLOC_STRUCT(r300_vertex_element_state); @@ -1279,21 +1241,88 @@ static void* r300_create_vertex_elements_state(struct pipe_context* pipe, memcpy(velems->velem, attribs, sizeof(struct pipe_vertex_element) * count); if (r300_screen(pipe->screen)->caps.has_tcl) { - /* Check if the format is aligned to the size of DWORD. */ + r300_vertex_psc(velems); + + /* Check if the format is aligned to the size of DWORD. + * We only care about the blocksizes of the formats since + * swizzles are already set up. */ for (i = 0; i < count; i++) { - size = util_format_get_blocksize(attribs[i].src_format); + format = &velems->velem[i].src_format; + + /* Replace some formats with their aligned counterparts, + * this is OK because we check for aligned strides too. */ + switch (*format) { + /* Align to RGBA8. */ + case PIPE_FORMAT_R8_UNORM: + case PIPE_FORMAT_R8G8_UNORM: + case PIPE_FORMAT_R8G8B8_UNORM: + *format = PIPE_FORMAT_R8G8B8A8_UNORM; + continue; + case PIPE_FORMAT_R8_SNORM: + case PIPE_FORMAT_R8G8_SNORM: + case PIPE_FORMAT_R8G8B8_SNORM: + *format = PIPE_FORMAT_R8G8B8A8_SNORM; + continue; + case PIPE_FORMAT_R8_USCALED: + case PIPE_FORMAT_R8G8_USCALED: + case PIPE_FORMAT_R8G8B8_USCALED: + *format = PIPE_FORMAT_R8G8B8A8_USCALED; + continue; + case PIPE_FORMAT_R8_SSCALED: + case PIPE_FORMAT_R8G8_SSCALED: + case PIPE_FORMAT_R8G8B8_SSCALED: + *format = PIPE_FORMAT_R8G8B8A8_SSCALED; + continue; + + /* Align to RG16. */ + case PIPE_FORMAT_R16_UNORM: + *format = PIPE_FORMAT_R16G16_UNORM; + continue; + case PIPE_FORMAT_R16_SNORM: + *format = PIPE_FORMAT_R16G16_SNORM; + continue; + case PIPE_FORMAT_R16_USCALED: + *format = PIPE_FORMAT_R16G16_USCALED; + continue; + case PIPE_FORMAT_R16_SSCALED: + *format = PIPE_FORMAT_R16G16_SSCALED; + continue; + case PIPE_FORMAT_R16_FLOAT: + *format = PIPE_FORMAT_R16G16_FLOAT; + continue; + + /* Align to RGBA16. */ + case PIPE_FORMAT_R16G16B16_UNORM: + *format = PIPE_FORMAT_R16G16B16A16_UNORM; + continue; + case PIPE_FORMAT_R16G16B16_SNORM: + *format = PIPE_FORMAT_R16G16B16A16_SNORM; + continue; + case PIPE_FORMAT_R16G16B16_USCALED: + *format = PIPE_FORMAT_R16G16B16A16_USCALED; + continue; + case PIPE_FORMAT_R16G16B16_SSCALED: + *format = PIPE_FORMAT_R16G16B16A16_SSCALED; + continue; + case PIPE_FORMAT_R16G16B16_FLOAT: + *format = PIPE_FORMAT_R16G16B16A16_FLOAT; + continue; + + default:; + } + + size = util_format_get_blocksize(*format); if (size % 4 != 0) { /* XXX Shouldn't we align the format? */ fprintf(stderr, "r300_create_vertex_elements_state: " "Unaligned format %s:%i isn't supported\n", - util_format_name(attribs[i].src_format), size); + util_format_name(*format), size); assert(0); abort(); } } - r300_vertex_psc(velems); } } return velems; @@ -1359,14 +1388,6 @@ static void r300_bind_vs_state(struct pipe_context* pipe, void* shader) } r300->vs_state.state = vs; - // VS output mapping for HWTCL or stream mapping for SWTCL to the RS block - if (r300->fs.state) { - r300_vertex_shader_setup_wpos(r300); - } - memcpy(r300->vap_output_state.state, &vs->vap_out, - sizeof(struct r300_vap_output_state)); - r300->vap_output_state.dirty = TRUE; - /* The majority of the RS block bits is dependent on the vertex shader. */ r300->rs_block_state.dirty = TRUE; /* Will be updated before the emission. */ diff --git a/src/gallium/drivers/r300/r300_state_derived.c b/src/gallium/drivers/r300/r300_state_derived.c index 46c192eae14..e3adace0faa 100644 --- a/src/gallium/drivers/r300/r300_state_derived.c +++ b/src/gallium/drivers/r300/r300_state_derived.c @@ -28,6 +28,7 @@ #include "r300_context.h" #include "r300_fs.h" +#include "r300_hyperz.h" #include "r300_screen.h" #include "r300_shader_semantics.h" #include "r300_state.h" @@ -42,6 +43,7 @@ enum r300_rs_swizzle { SWIZ_XYZW = 0, SWIZ_X001, SWIZ_XY01, + SWIZ_0001, }; static void r300_draw_emit_attrib(struct r300_context* r300, @@ -113,12 +115,11 @@ static void r300_draw_emit_all_attribs(struct r300_context* r300) static void r300_swtcl_vertex_psc(struct r300_context *r300) { struct r300_vertex_stream_state *vstream = r300->vertex_stream_state.state; - struct r300_vertex_shader* vs = r300->vs_state.state; - struct vertex_info* vinfo = &r300->vertex_info; + struct vertex_info* vinfo = &r300->vertex_info; uint16_t type, swizzle; enum pipe_format format; unsigned i, attrib_count; - int* vs_output_tab = vs->stream_loc_notcl; + int* vs_output_tab = r300->stream_loc_notcl; /* XXX hax */ memset(vstream, 0, sizeof(struct r300_vertex_stream_state)); @@ -169,10 +170,10 @@ static void r300_swtcl_vertex_psc(struct r300_context *r300) } static void r300_rs_col(struct r300_rs_block* rs, int id, int ptr, - boolean swizzle_0001) + enum r300_rs_swizzle swiz) { rs->ip[id] |= R300_RS_COL_PTR(ptr); - if (swizzle_0001) { + if (swiz == SWIZ_0001) { rs->ip[id] |= R300_RS_COL_FMT(R300_RS_COL_FMT_0001); } else { rs->ip[id] |= R300_RS_COL_FMT(R300_RS_COL_FMT_RGBA); @@ -218,10 +219,10 @@ static void r300_rs_tex_write(struct r300_rs_block* rs, int id, int fp_offset) } static void r500_rs_col(struct r300_rs_block* rs, int id, int ptr, - boolean swizzle_0001) + enum r300_rs_swizzle swiz) { rs->ip[id] |= R500_RS_COL_PTR(ptr); - if (swizzle_0001) { + if (swiz == SWIZ_0001) { rs->ip[id] |= R500_RS_COL_FMT(R300_RS_COL_FMT_0001); } else { rs->ip[id] |= R500_RS_COL_FMT(R300_RS_COL_FMT_RGBA); @@ -267,21 +268,29 @@ static void r500_rs_tex_write(struct r300_rs_block* rs, int id, int fp_offset) /* Set up the RS block. * - * This is the part of the chipset that actually does the rasterization - * of vertices into fragments. This is also the part of the chipset that - * locks up if any part of it is even slightly wrong. */ -static void r300_update_rs_block(struct r300_context* r300, - struct r300_shader_semantics* vs_outputs, - struct r300_shader_semantics* fs_inputs) + * This is the part of the chipset that is responsible for linking vertex + * and fragment shaders and stuffed texture coordinates. + * + * The rasterizer reads data from VAP, which produces vertex shader outputs, + * and GA, which produces stuffed texture coordinates. VAP outputs have + * precedence over GA. All outputs must be rasterized otherwise it locks up. + * If there are more outputs rasterized than is set in VAP/GA, it locks up + * too. The funky part is that this info has been pretty much obtained by trial + * and error. */ +static void r300_update_rs_block(struct r300_context *r300) { - struct r300_rs_block rs = { { 0 } }; - int i, col_count = 0, tex_count = 0, fp_offset = 0, count; - void (*rX00_rs_col)(struct r300_rs_block*, int, int, boolean); + struct r300_vertex_shader *vs = r300->vs_state.state; + struct r300_shader_semantics *vs_outputs = &vs->outputs; + struct r300_shader_semantics *fs_inputs = &r300_fs(r300)->shader->inputs; + struct r300_rs_block rs = {0}; + int i, col_count = 0, tex_count = 0, fp_offset = 0, count, loc = 0; + void (*rX00_rs_col)(struct r300_rs_block*, int, int, enum r300_rs_swizzle); void (*rX00_rs_col_write)(struct r300_rs_block*, int, int); void (*rX00_rs_tex)(struct r300_rs_block*, int, int, enum r300_rs_swizzle); void (*rX00_rs_tex_write)(struct r300_rs_block*, int, int); boolean any_bcolor_used = vs_outputs->bcolor[0] != ATTR_UNUSED || vs_outputs->bcolor[1] != ATTR_UNUSED; + int *stream_loc_notcl = r300->stream_loc_notcl; if (r300->screen->caps.is_r500) { rX00_rs_col = r500_rs_col; @@ -295,18 +304,39 @@ static void r300_update_rs_block(struct r300_context* r300, rX00_rs_tex_write = r300_rs_tex_write; } - /* Rasterize colors. */ + /* The position is always present in VAP. */ + rs.vap_vsm_vtx_assm |= R300_INPUT_CNTL_POS; + rs.vap_out_vtx_fmt[0] |= R300_VAP_OUTPUT_VTX_FMT_0__POS_PRESENT; + stream_loc_notcl[loc++] = 0; + + /* Set up the point size in VAP. */ + if (vs_outputs->psize != ATTR_UNUSED) { + rs.vap_out_vtx_fmt[0] |= R300_VAP_OUTPUT_VTX_FMT_0__PT_SIZE_PRESENT; + stream_loc_notcl[loc++] = 1; + } + + /* Set up and rasterize colors. */ for (i = 0; i < ATTR_COLOR_COUNT; i++) { if (vs_outputs->color[i] != ATTR_UNUSED || any_bcolor_used || vs_outputs->color[1] != ATTR_UNUSED) { - /* Always rasterize if it's written by the VS, - * otherwise it locks up. */ - rX00_rs_col(&rs, col_count, i, FALSE); + /* Set up the color in VAP. */ + rs.vap_vsm_vtx_assm |= R300_INPUT_CNTL_COLOR; + rs.vap_out_vtx_fmt[0] |= + R300_VAP_OUTPUT_VTX_FMT_0__COLOR_0_PRESENT << i; + stream_loc_notcl[loc++] = 2 + i; + + /* Rasterize it. */ + rX00_rs_col(&rs, col_count, col_count, SWIZ_XYZW); - /* Write it to the FS input register if it's used by the FS. */ + /* Write it to the FS input register if it's needed by the FS. */ if (fs_inputs->color[i] != ATTR_UNUSED) { rX00_rs_col_write(&rs, col_count, fp_offset); fp_offset++; + + DBG(r300, DBG_RS, + "r300: Rasterized color %i written to FS.\n", i); + } else { + DBG(r300, DBG_RS, "r300: Rasterized color %i unused.\n", i); } col_count++; } else { @@ -314,26 +344,51 @@ static void r300_update_rs_block(struct r300_context* r300, /* If we try to set it to (0,0,0,1), it will lock up. */ if (fs_inputs->color[i] != ATTR_UNUSED) { fp_offset++; + + DBG(r300, DBG_RS, "r300: FS input color %i unassigned%s.\n", + i); } } } + /* Set up back-face colors. The rasterizer will do the color selection + * automatically. */ + if (any_bcolor_used) { + for (i = 0; i < ATTR_COLOR_COUNT; i++) { + rs.vap_vsm_vtx_assm |= R300_INPUT_CNTL_COLOR; + rs.vap_out_vtx_fmt[0] |= R300_VAP_OUTPUT_VTX_FMT_0__COLOR_0_PRESENT << (2+i); + stream_loc_notcl[loc++] = 4 + i; + } + } + /* Rasterize texture coordinates. */ - for (i = 0; i < ATTR_GENERIC_COUNT; i++) { + for (i = 0; i < ATTR_GENERIC_COUNT && tex_count < 8; i++) { bool sprite_coord = !!(r300->sprite_coord_enable & (1 << i)); if (vs_outputs->generic[i] != ATTR_UNUSED || sprite_coord) { - /* Always rasterize if it's written by the VS, - * otherwise it locks up. */ + if (!sprite_coord) { + /* Set up the texture coordinates in VAP. */ + rs.vap_vsm_vtx_assm |= (R300_INPUT_CNTL_TC0 << tex_count); + rs.vap_out_vtx_fmt[1] |= (4 << (3 * tex_count)); + stream_loc_notcl[loc++] = 6 + tex_count; + } + + /* Rasterize it. */ rX00_rs_tex(&rs, tex_count, tex_count, sprite_coord ? SWIZ_XY01 : SWIZ_XYZW); - /* Write it to the FS input register if it's used by the FS. */ + /* Write it to the FS input register if it's needed by the FS. */ if (fs_inputs->generic[i] != ATTR_UNUSED) { rX00_rs_tex_write(&rs, tex_count, fp_offset); - if (sprite_coord) - debug_printf("r300: SpriteCoord (generic index %i) is being written to reg %i\n", i, fp_offset); fp_offset++; + + DBG(r300, DBG_RS, + "r300: Rasterized generic %i written to FS%s.\n", + i, sprite_coord ? " (sprite coord)" : ""); + } else { + DBG(r300, DBG_RS, + "r300: Rasterized generic %i unused%s.\n", + i, sprite_coord ? " (sprite coord)" : ""); } tex_count++; } else { @@ -341,20 +396,31 @@ static void r300_update_rs_block(struct r300_context* r300, /* If we try to set it to (0,0,0,1), it will lock up. */ if (fs_inputs->generic[i] != ATTR_UNUSED) { fp_offset++; + + DBG(r300, DBG_RS, "r300: FS input generic %i unassigned%s.\n", + i, sprite_coord ? " (sprite coord)" : ""); } } } /* Rasterize fog coordinates. */ - if (vs_outputs->fog != ATTR_UNUSED) { - /* Always rasterize if it's written by the VS, - * otherwise it locks up. */ + if (vs_outputs->fog != ATTR_UNUSED && tex_count < 8) { + /* Set up the fog coordinates in VAP. */ + rs.vap_vsm_vtx_assm |= (R300_INPUT_CNTL_TC0 << tex_count); + rs.vap_out_vtx_fmt[1] |= (4 << (3 * tex_count)); + stream_loc_notcl[loc++] = 6 + tex_count; + + /* Rasterize it. */ rX00_rs_tex(&rs, tex_count, tex_count, SWIZ_X001); - /* Write it to the FS input register if it's used by the FS. */ + /* Write it to the FS input register if it's needed by the FS. */ if (fs_inputs->fog != ATTR_UNUSED) { rX00_rs_tex_write(&rs, tex_count, fp_offset); fp_offset++; + + DBG(r300, DBG_RS, "r300: Rasterized fog written to FS.\n"); + } else { + DBG(r300, DBG_RS, "r300: Rasterized fog unused.\n"); } tex_count++; } else { @@ -362,25 +428,47 @@ static void r300_update_rs_block(struct r300_context* r300, /* If we try to set it to (0,0,0,1), it will lock up. */ if (fs_inputs->fog != ATTR_UNUSED) { fp_offset++; + + DBG(r300, DBG_RS, "r300: FS input fog unassigned.\n"); } } /* Rasterize WPOS. */ - /* If the FS doesn't need it, it's not written by the VS. */ - if (vs_outputs->wpos != ATTR_UNUSED && fs_inputs->wpos != ATTR_UNUSED) { + /* Don't set it in VAP if the FS doesn't need it. */ + if (fs_inputs->wpos != ATTR_UNUSED && tex_count < 8) { + /* Set up the WPOS coordinates in VAP. */ + rs.vap_vsm_vtx_assm |= (R300_INPUT_CNTL_TC0 << tex_count); + rs.vap_out_vtx_fmt[1] |= (4 << (3 * tex_count)); + stream_loc_notcl[loc++] = 6 + tex_count; + + /* Rasterize it. */ rX00_rs_tex(&rs, tex_count, tex_count, SWIZ_XYZW); + + /* Write it to the FS input register. */ rX00_rs_tex_write(&rs, tex_count, fp_offset); + DBG(r300, DBG_RS, "r300: Rasterized WPOS written to FS.\n"); + fp_offset++; tex_count++; } + /* Invalidate the rest of the no-TCL (GA) stream locations. */ + for (; loc < 16;) { + stream_loc_notcl[loc++] = -1; + } + /* Rasterize at least one color, or bad things happen. */ if (col_count == 0 && tex_count == 0) { - rX00_rs_col(&rs, 0, 0, TRUE); + rX00_rs_col(&rs, 0, 0, SWIZ_0001); col_count++; + + DBG(r300, DBG_RS, "r300: Rasterized color 0 to prevent lockups.\n"); } + DBG(r300, DBG_RS, "r300: --- Rasterizer status ---: colors: %i, " + "generics: %i.\n", col_count, tex_count); + rs.count = (tex_count*4) | (col_count << R300_IC_COUNT_SHIFT) | R300_HIRES_EN; @@ -390,87 +478,8 @@ static void r300_update_rs_block(struct r300_context* r300, /* Now, after all that, see if we actually need to update the state. */ if (memcmp(r300->rs_block_state.state, &rs, sizeof(struct r300_rs_block))) { memcpy(r300->rs_block_state.state, &rs, sizeof(struct r300_rs_block)); - r300->rs_block_state.size = 5 + count*2; - } -} - -/* Update the shader-dependant states. */ -static void r300_update_derived_shader_state(struct r300_context* r300) -{ - struct r300_vertex_shader* vs = r300->vs_state.state; - - r300_update_rs_block(r300, &vs->outputs, &r300_fs(r300)->shader->inputs); -} - -static boolean r300_dsa_writes_depth_stencil(struct r300_dsa_state* dsa) -{ - /* We are interested only in the cases when a new depth or stencil value - * can be written and changed. */ - - /* We might optionally check for [Z func: never] and inspect the stencil - * state in a similar fashion, but it's not terribly important. */ - return (dsa->z_buffer_control & R300_Z_WRITE_ENABLE) || - (dsa->stencil_ref_mask & R300_STENCILWRITEMASK_MASK) || - ((dsa->z_buffer_control & R500_STENCIL_REFMASK_FRONT_BACK) && - (dsa->stencil_ref_bf & R300_STENCILWRITEMASK_MASK)); -} - -static boolean r300_dsa_alpha_test_enabled(struct r300_dsa_state* dsa) -{ - /* We are interested only in the cases when alpha testing can kill - * a fragment. */ - uint32_t af = dsa->alpha_function; - - return (af & R300_FG_ALPHA_FUNC_ENABLE) && - (af & R300_FG_ALPHA_FUNC_ALWAYS) != R300_FG_ALPHA_FUNC_ALWAYS; -} - -static void r300_update_ztop(struct r300_context* r300) -{ - struct r300_ztop_state* ztop_state = - (struct r300_ztop_state*)r300->ztop_state.state; - - /* This is important enough that I felt it warranted a comment. - * - * According to the docs, these are the conditions where ZTOP must be - * disabled: - * 1) Alpha testing enabled - * 2) Texture kill instructions in fragment shader - * 3) Chroma key culling enabled - * 4) W-buffering enabled - * - * The docs claim that for the first three cases, if no ZS writes happen, - * then ZTOP can be used. - * - * (3) will never apply since we do not support chroma-keyed operations. - * (4) will need to be re-examined (and this comment updated) if/when - * Hyper-Z becomes supported. - * - * Additionally, the following conditions require disabled ZTOP: - * 5) Depth writes in fragment shader - * 6) Outstanding occlusion queries - * - * This register causes stalls all the way from SC to CB when changed, - * but it is buffered on-chip so it does not hurt to write it if it has - * not changed. - * - * ~C. - */ - - /* ZS writes */ - if (r300_dsa_writes_depth_stencil(r300->dsa_state.state) && - (r300_dsa_alpha_test_enabled(r300->dsa_state.state) || /* (1) */ - r300_fs(r300)->shader->info.uses_kill)) { /* (2) */ - ztop_state->z_buffer_top = R300_ZTOP_DISABLE; - } else if (r300_fragment_shader_writes_depth(r300_fs(r300))) { /* (5) */ - ztop_state->z_buffer_top = R300_ZTOP_DISABLE; - } else if (r300->query_current) { /* (6) */ - ztop_state->z_buffer_top = R300_ZTOP_DISABLE; - } else { - ztop_state->z_buffer_top = R300_ZTOP_ENABLE; + r300->rs_block_state.size = 11 + count*2; } - - r300->ztop_state.dirty = TRUE; } static void r300_merge_textures_and_samplers(struct r300_context* r300) @@ -568,7 +577,7 @@ void r300_update_derived_state(struct r300_context* r300) } if (r300->rs_block_state.dirty) { - r300_update_derived_shader_state(r300); + r300_update_rs_block(r300); } if (r300->draw) { @@ -578,5 +587,5 @@ void r300_update_derived_state(struct r300_context* r300) r300_swtcl_vertex_psc(r300); } - r300_update_ztop(r300); + r300_update_hyperz_state(r300); } diff --git a/src/gallium/drivers/r300/r300_state_inlines.h b/src/gallium/drivers/r300/r300_state_inlines.h index 480d0f7c4ae..fcbdb91b67e 100644 --- a/src/gallium/drivers/r300/r300_state_inlines.h +++ b/src/gallium/drivers/r300/r300_state_inlines.h @@ -374,6 +374,7 @@ r300_translate_vertex_data_type(enum pipe_format format) { fprintf(stderr, "r300: Bad format %s in %s:%d\n", util_format_name(format), __FUNCTION__, __LINE__); assert(0); + abort(); } switch (desc->channel[0].type) { @@ -395,6 +396,7 @@ r300_translate_vertex_data_type(enum pipe_format format) { fprintf(stderr, "r300: Bad format %s in %s:%d\n", util_format_name(format), __FUNCTION__, __LINE__); assert(0); + abort(); } break; /* Unsigned ints */ @@ -418,12 +420,14 @@ r300_translate_vertex_data_type(enum pipe_format format) { fprintf(stderr, "r300: desc->channel[0].size == %d\n", desc->channel[0].size); assert(0); + abort(); } break; default: fprintf(stderr, "r300: Bad format %s in %s:%d\n", util_format_name(format), __FUNCTION__, __LINE__); assert(0); + abort(); } if (desc->channel[0].type == UTIL_FORMAT_TYPE_SIGNED) { @@ -439,6 +443,7 @@ r300_translate_vertex_data_type(enum pipe_format format) { static INLINE uint16_t r300_translate_vertex_data_swizzle(enum pipe_format format) { const struct util_format_description *desc = util_format_description(format); + unsigned i, swizzle = 0; assert(format); @@ -448,11 +453,19 @@ r300_translate_vertex_data_swizzle(enum pipe_format format) { return 0; } - return ((desc->swizzle[0] << R300_SWIZZLE_SELECT_X_SHIFT) | - (desc->swizzle[1] << R300_SWIZZLE_SELECT_Y_SHIFT) | - (desc->swizzle[2] << R300_SWIZZLE_SELECT_Z_SHIFT) | - (desc->swizzle[3] << R300_SWIZZLE_SELECT_W_SHIFT) | - (0xf << R300_WRITE_ENA_SHIFT)); + for (i = 0; i < desc->nr_channels; i++) { + swizzle |= + MIN2(desc->swizzle[i], R300_SWIZZLE_SELECT_FP_ONE) << (3*i); + } + /* Set (0,0,0,1) in unused components. */ + for (; i < 3; i++) { + swizzle |= R300_SWIZZLE_SELECT_FP_ZERO << (3*i); + } + for (; i < 4; i++) { + swizzle |= R300_SWIZZLE_SELECT_FP_ONE << (3*i); + } + + return swizzle | (0xf << R300_WRITE_ENA_SHIFT); } #endif /* R300_STATE_INLINES_H */ diff --git a/src/gallium/drivers/r300/r300_state_invariant.c b/src/gallium/drivers/r300/r300_state_invariant.c index 64d1d18b454..cd9443fa260 100644 --- a/src/gallium/drivers/r300/r300_state_invariant.c +++ b/src/gallium/drivers/r300/r300_state_invariant.c @@ -43,15 +43,17 @@ void r300_emit_invariant_state(struct r300_context* r300, { CS_LOCALS(r300); + if (r300->rws->get_value(r300->rws, R300_VID_DRM_2_3_0)) { + /* Subpixel multisampling for AA. */ + BEGIN_CS(4); + OUT_CS_REG(R300_GB_MSPOS0, 0x66666666); + OUT_CS_REG(R300_GB_MSPOS1, 0x6666666); + END_CS; + } + BEGIN_CS(12 + (r300->screen->caps.has_tcl ? 2 : 0)); /*** Graphics Backend (GB) ***/ - /* Subpixel multisampling for AA - * These are commented out because glisse's CS checker doesn't like them. - * I presume these will be re-enabled later. - * OUT_CS_REG(R300_GB_MSPOS0, 0x66666666); - * OUT_CS_REG(R300_GB_MSPOS1, 0x6666666); - */ /* Source of fog depth */ OUT_CS_REG(R300_GB_SELECT, R300_GB_FOG_SELECT_1_1_W); diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c index 8bebeacf860..69e6a124458 100644 --- a/src/gallium/drivers/r300/r300_texture.c +++ b/src/gallium/drivers/r300/r300_texture.c @@ -34,9 +34,6 @@ #include "r300_screen.h" #include "r300_winsys.h" -/* XXX Enable float textures here. */ -/*#define ENABLE_FLOAT_TEXTURES*/ - #define TILE_WIDTH 0 #define TILE_HEIGHT 1 @@ -74,7 +71,7 @@ static boolean r300_format_is_plain(enum pipe_format format) * The FORMAT specifies how the texture sampler will treat the texture, and * makes available X, Y, Z, W, ZERO, and ONE for swizzling. */ uint32_t r300_translate_texformat(enum pipe_format format, - const unsigned char *swizzle) + const unsigned char *swizzle_view) { uint32_t result = 0; const struct util_format_description *desc; @@ -98,6 +95,7 @@ uint32_t r300_translate_texformat(enum pipe_format format, R300_TX_FORMAT_SIGNED_Z, R300_TX_FORMAT_SIGNED_W, }; + unsigned char swizzle[4]; desc = util_format_description(format); @@ -144,25 +142,18 @@ uint32_t r300_translate_texformat(enum pipe_format format, } } - /* Add swizzle. */ - if (!swizzle) { - swizzle = desc->swizzle; - } /*else { - if (swizzle[0] != desc->swizzle[0] || - swizzle[1] != desc->swizzle[1] || - swizzle[2] != desc->swizzle[2] || - swizzle[3] != desc->swizzle[3]) - { - const char n[6] = "RGBA01"; - fprintf(stderr, "Got different swizzling! Format: %c%c%c%c, " - "View: %c%c%c%c\n", - n[desc->swizzle[0]], n[desc->swizzle[1]], - n[desc->swizzle[2]], n[desc->swizzle[3]], - n[swizzle[0]], n[swizzle[1]], n[swizzle[2]], - n[swizzle[3]]); + /* Get swizzle. */ + if (swizzle_view) { + /* Compose two sets of swizzles. */ + for (i = 0; i < 4; i++) { + swizzle[i] = swizzle_view[i] <= UTIL_FORMAT_SWIZZLE_W ? + desc->swizzle[swizzle_view[i]] : swizzle_view[i]; } - }*/ + } else { + memcpy(swizzle, desc->swizzle, sizeof(swizzle)); + } + /* Add swizzle. */ for (i = 0; i < 4; i++) { switch (swizzle[i]) { case UTIL_FORMAT_SWIZZLE_X: @@ -316,7 +307,6 @@ uint32_t r300_translate_texformat(enum pipe_format format, } return ~0; -#if defined(ENABLE_FLOAT_TEXTURES) case UTIL_FORMAT_TYPE_FLOAT: switch (desc->channel[0].size) { case 16: @@ -340,7 +330,6 @@ uint32_t r300_translate_texformat(enum pipe_format format, return R300_TX_FORMAT_32F_32F_32F_32F | result; } } -#endif } return ~0; /* Unsupported/unknown. */ @@ -405,16 +394,12 @@ static uint32_t r300_translate_colorformat(enum pipe_format format) /* 64-bit buffers. */ case PIPE_FORMAT_R16G16B16A16_UNORM: case PIPE_FORMAT_R16G16B16A16_SNORM: -#if defined(ENABLE_FLOAT_TEXTURES) case PIPE_FORMAT_R16G16B16A16_FLOAT: -#endif return R300_COLOR_FORMAT_ARGB16161616; /* 128-bit buffers. */ -#if defined(ENABLE_FLOAT_TEXTURES) case PIPE_FORMAT_R32G32B32A32_FLOAT: return R300_COLOR_FORMAT_ARGB32323232; -#endif /* YUV buffers. */ case PIPE_FORMAT_UYVY: @@ -532,7 +517,7 @@ static uint32_t r300_translate_out_fmt(enum pipe_format format) case PIPE_FORMAT_R10SG10SB10SA2U_NORM: case PIPE_FORMAT_R16G16B16A16_UNORM: case PIPE_FORMAT_R16G16B16A16_SNORM: - //case PIPE_FORMAT_R16G16B16A16_FLOAT: /* not in pipe_format */ + case PIPE_FORMAT_R16G16B16A16_FLOAT: case PIPE_FORMAT_R32G32B32A32_FLOAT: return modifier | R300_C0_SEL_R | R300_C1_SEL_G | @@ -573,7 +558,7 @@ static void r300_texture_setup_immutable_state(struct r300_screen* screen, if (tex->uses_pitch) { /* rectangles love this */ f->format0 |= R300_TX_PITCH_EN; - f->format2 = (tex->pitch[0] - 1) & 0x1fff; + f->format2 = (tex->hwpitch[0] - 1) & 0x1fff; } else { /* power of two textures (3D, mipmaps, and no pitch) */ f->format0 |= R300_TX_DEPTH(util_logbase2(pt->depth0) & 0xf); @@ -614,7 +599,7 @@ static void r300_texture_setup_fb_state(struct r300_screen* screen, if (util_format_is_depth_or_stencil(tex->b.b.format)) { for (i = 0; i <= tex->b.b.last_level; i++) { tex->fb_state.depthpitch[i] = - tex->pitch[i] | + tex->hwpitch[i] | R300_DEPTHMACROTILE(tex->mip_macrotile[i]) | R300_DEPTHMICROTILE(tex->microtile); } @@ -622,7 +607,7 @@ static void r300_texture_setup_fb_state(struct r300_screen* screen, } else { for (i = 0; i <= tex->b.b.last_level; i++) { tex->fb_state.colorpitch[i] = - tex->pitch[i] | + tex->hwpitch[i] | r300_translate_colorformat(tex->b.b.format) | R300_COLOR_TILE(tex->mip_macrotile[i]) | R300_COLOR_MICROTILE(tex->microtile); @@ -762,12 +747,12 @@ static unsigned r300_texture_get_nblocksy(struct r300_texture* tex, static void r300_texture_3d_fix_mipmapping(struct r300_screen *screen, struct r300_texture *tex) { - /* The kernels <= 2.6.34-rc3 compute the size of mipmapped 3D textures + /* The kernels <= 2.6.34-rc4 compute the size of mipmapped 3D textures * incorrectly. This is a workaround to prevent CS from being rejected. */ unsigned i, size; - if (screen->rws->get_value(screen->rws, R300_VID_TEX3D_MIP_BUG) && + if (!screen->rws->get_value(screen->rws, R300_VID_DRM_2_3_0) && tex->b.b.target == PIPE_TEXTURE_3D && tex->b.b.last_level > 0) { size = 0; @@ -813,6 +798,8 @@ static void r300_setup_miptree(struct r300_screen* screen, tex->size = tex->offset[i] + size; tex->layer_size[i] = layer_size; tex->pitch[i] = stride / util_format_get_blocksize(base->format); + tex->hwpitch[i] = + tex->pitch[i] * util_format_get_blockwidth(base->format); SCREEN_DBG(screen, DBG_TEX, "r300: Texture miptree: Level %d " "(%dx%dx%d px, pitch %d bytes) %d bytes total, macrotiled %s\n", diff --git a/src/gallium/drivers/r300/r300_texture.h b/src/gallium/drivers/r300/r300_texture.h index 453d42b188f..ba79ec068a1 100644 --- a/src/gallium/drivers/r300/r300_texture.h +++ b/src/gallium/drivers/r300/r300_texture.h @@ -28,7 +28,7 @@ struct r300_texture; uint32_t r300_translate_texformat(enum pipe_format format, - const unsigned char *swizzle); + const unsigned char *swizzle_view); uint32_t r500_tx_format_msb_bit(enum pipe_format format); diff --git a/src/gallium/drivers/r300/r300_tgsi_to_rc.c b/src/gallium/drivers/r300/r300_tgsi_to_rc.c index f6428ed760f..89f39af9761 100644 --- a/src/gallium/drivers/r300/r300_tgsi_to_rc.c +++ b/src/gallium/drivers/r300/r300_tgsi_to_rc.c @@ -108,11 +108,9 @@ static unsigned translate_opcode(unsigned opcode) /* case TGSI_OPCODE_BRK: return RC_OPCODE_BRK; */ case TGSI_OPCODE_IF: return RC_OPCODE_IF; /* case TGSI_OPCODE_LOOP: return RC_OPCODE_LOOP; */ - /* case TGSI_OPCODE_REP: return RC_OPCODE_REP; */ case TGSI_OPCODE_ELSE: return RC_OPCODE_ELSE; case TGSI_OPCODE_ENDIF: return RC_OPCODE_ENDIF; /* case TGSI_OPCODE_ENDLOOP: return RC_OPCODE_ENDLOOP; */ - /* case TGSI_OPCODE_ENDREP: return RC_OPCODE_ENDREP; */ /* case TGSI_OPCODE_PUSHA: return RC_OPCODE_PUSHA; */ /* case TGSI_OPCODE_POPA: return RC_OPCODE_POPA; */ case TGSI_OPCODE_CEIL: return RC_OPCODE_CEIL; diff --git a/src/gallium/drivers/r300/r300_vs.c b/src/gallium/drivers/r300/r300_vs.c index bfab9c3b014..b7609bad811 100644 --- a/src/gallium/drivers/r300/r300_vs.c +++ b/src/gallium/drivers/r300/r300_vs.c @@ -94,94 +94,6 @@ static void r300_shader_read_vs_outputs( vs_outputs->wpos = i; } -/* This function sets up: - * - VAP mapping, which maps VS registers to output semantics and - * at the same time it indicates which attributes are enabled and should - * be rasterized. - * - Stream mapping to VS outputs if TCL is not present. */ -static void r300_init_vs_output_mapping(struct r300_vertex_shader* vs) -{ - struct r300_shader_semantics* vs_outputs = &vs->outputs; - struct r300_vap_output_state *vap_out = &vs->vap_out; - int *stream_loc = vs->stream_loc_notcl; - int i, gen_count, tabi = 0; - boolean any_bcolor_used = vs_outputs->bcolor[0] != ATTR_UNUSED || - vs_outputs->bcolor[1] != ATTR_UNUSED; - - vap_out->vap_vtx_state_cntl = 0x5555; /* XXX this is classic Mesa bonghits */ - - /* Position. */ - if (vs_outputs->pos != ATTR_UNUSED) { - vap_out->vap_vsm_vtx_assm |= R300_INPUT_CNTL_POS; - vap_out->vap_out_vtx_fmt[0] |= R300_VAP_OUTPUT_VTX_FMT_0__POS_PRESENT; - - stream_loc[tabi++] = 0; - } else { - assert(0); - } - - /* Point size. */ - if (vs_outputs->psize != ATTR_UNUSED) { - vap_out->vap_out_vtx_fmt[0] |= R300_VAP_OUTPUT_VTX_FMT_0__PT_SIZE_PRESENT; - - stream_loc[tabi++] = 1; - } - - /* Colors. */ - for (i = 0; i < ATTR_COLOR_COUNT; i++) { - if (vs_outputs->color[i] != ATTR_UNUSED || any_bcolor_used || - vs_outputs->color[1] != ATTR_UNUSED) { - vap_out->vap_vsm_vtx_assm |= R300_INPUT_CNTL_COLOR; - vap_out->vap_out_vtx_fmt[0] |= R300_VAP_OUTPUT_VTX_FMT_0__COLOR_0_PRESENT << i; - - stream_loc[tabi++] = 2 + i; - } - } - - /* Back-face colors. */ - if (any_bcolor_used) { - for (i = 0; i < ATTR_COLOR_COUNT; i++) { - vap_out->vap_vsm_vtx_assm |= R300_INPUT_CNTL_COLOR; - vap_out->vap_out_vtx_fmt[0] |= R300_VAP_OUTPUT_VTX_FMT_0__COLOR_0_PRESENT << (2+i); - - stream_loc[tabi++] = 4 + i; - } - } - - /* Texture coordinates. */ - gen_count = 0; - for (i = 0; i < ATTR_GENERIC_COUNT && gen_count < 8; i++) { - if (vs_outputs->generic[i] != ATTR_UNUSED) { - vap_out->vap_vsm_vtx_assm |= (R300_INPUT_CNTL_TC0 << gen_count); - vap_out->vap_out_vtx_fmt[1] |= (4 << (3 * gen_count)); - - stream_loc[tabi++] = 6 + gen_count; - gen_count++; - } - } - - /* Fog coordinates. */ - if (gen_count < 8 && vs_outputs->fog != ATTR_UNUSED) { - vap_out->vap_vsm_vtx_assm |= (R300_INPUT_CNTL_TC0 << gen_count); - vap_out->vap_out_vtx_fmt[1] |= (4 << (3 * gen_count)); - - stream_loc[tabi++] = 6 + gen_count; - gen_count++; - } - - /* WPOS. */ - if (gen_count < 8) { - vs->wpos_tex_output = gen_count; - stream_loc[tabi++] = 6 + gen_count; - } else { - vs_outputs->wpos = ATTR_UNUSED; - } - - for (; tabi < 16;) { - stream_loc[tabi++] = -1; - } -} - static void set_vertex_inputs_outputs(struct r300_vertex_program_compiler * c) { struct r300_vertex_shader * vs = c->UserData; @@ -246,9 +158,7 @@ static void set_vertex_inputs_outputs(struct r300_vertex_program_compiler * c) } /* WPOS. */ - if (outputs->wpos != ATTR_UNUSED) { - c->code->outputs[outputs->wpos] = reg++; - } + c->code->outputs[outputs->wpos] = reg++; } static void r300_dummy_vertex_shader( @@ -286,7 +196,6 @@ void r300_translate_vertex_shader(struct r300_context* r300, tgsi_scan_shader(tokens, &vs->info); r300_shader_read_vs_outputs(&vs->info, &vs->outputs); - r300_init_vs_output_mapping(vs); /* Setup the compiler */ rc_init(&compiler.Base); @@ -307,16 +216,11 @@ void r300_translate_vertex_shader(struct r300_context* r300, r300_tgsi_to_rc(&ttr, tokens); - compiler.RequiredOutputs = - ~(~0 << (vs->info.num_outputs + - (vs->outputs.wpos != ATTR_UNUSED ? 1 : 0))); - + compiler.RequiredOutputs = ~(~0 << (vs->info.num_outputs + 1)); compiler.SetHwInputOutput = &set_vertex_inputs_outputs; /* Insert the WPOS output. */ - if (vs->outputs.wpos != ATTR_UNUSED) { - rc_copy_output(&compiler.Base, 0, vs->outputs.wpos); - } + rc_copy_output(&compiler.Base, 0, vs->outputs.wpos); /* Invoke the compiler */ r3xx_compile_vertex_program(&compiler); @@ -343,32 +247,3 @@ void r300_translate_vertex_shader(struct r300_context* r300, /* And, finally... */ rc_destroy(&compiler.Base); } - -boolean r300_vertex_shader_setup_wpos(struct r300_context* r300) -{ - struct r300_vertex_shader* vs = r300->vs_state.state; - struct r300_vap_output_state *vap_out = &vs->vap_out; - int tex_output = vs->wpos_tex_output; - uint32_t tex_fmt = R300_INPUT_CNTL_TC0 << tex_output; - - if (vs->outputs.wpos == ATTR_UNUSED) { - return FALSE; - } - - if (r300_fs(r300)->shader->inputs.wpos != ATTR_UNUSED) { - /* Enable WPOS in VAP. */ - if (!(vap_out->vap_vsm_vtx_assm & tex_fmt)) { - vap_out->vap_vsm_vtx_assm |= tex_fmt; - vap_out->vap_out_vtx_fmt[1] |= (4 << (3 * tex_output)); - return TRUE; - } - } else { - /* Disable WPOS in VAP. */ - if (vap_out->vap_vsm_vtx_assm & tex_fmt) { - vap_out->vap_vsm_vtx_assm &= ~tex_fmt; - vap_out->vap_out_vtx_fmt[1] &= ~(4 << (3 * tex_output)); - return TRUE; - } - } - return FALSE; -} diff --git a/src/gallium/drivers/r300/r300_vs.h b/src/gallium/drivers/r300/r300_vs.h index 56bcc3b70b8..57b3fbca0bb 100644 --- a/src/gallium/drivers/r300/r300_vs.h +++ b/src/gallium/drivers/r300/r300_vs.h @@ -39,7 +39,6 @@ struct r300_vertex_shader { struct tgsi_shader_info info; struct r300_shader_semantics outputs; - struct r300_vap_output_state vap_out; /* Whether the shader was replaced by a dummy one due to a shader * compilation failure. */ @@ -49,12 +48,6 @@ struct r300_vertex_shader { unsigned externals_count; unsigned immediates_count; - /* Stream locations for SWTCL or if TCL is bypassed. */ - int stream_loc_notcl[16]; - - /* Output stream location for WPOS. */ - int wpos_tex_output; - /* HWTCL-specific. */ /* Machine code (if translated) */ struct r300_vertex_program_code code; @@ -67,7 +60,4 @@ void r300_translate_vertex_shader(struct r300_context* r300, struct r300_vertex_shader* vs, const struct tgsi_token *tokens); -/* Return TRUE if VAP (hwfmt) needs to be re-emitted. */ -boolean r300_vertex_shader_setup_wpos(struct r300_context* r300); - #endif /* R300_VS_H */ diff --git a/src/gallium/drivers/r300/r300_winsys.h b/src/gallium/drivers/r300/r300_winsys.h index 2bd40176d10..1642981eaa8 100644 --- a/src/gallium/drivers/r300/r300_winsys.h +++ b/src/gallium/drivers/r300/r300_winsys.h @@ -39,7 +39,7 @@ enum r300_value_id { R300_VID_GB_PIPES, R300_VID_Z_PIPES, R300_VID_SQUARE_TILING_SUPPORT, - R300_VID_TEX3D_MIP_BUG, + R300_VID_DRM_2_3_0, }; enum r300_reference_domain { /* bitfield */ @@ -119,6 +119,10 @@ struct r300_winsys_screen { /* Write a dword to the command buffer. */ void (*write_cs_dword)(struct r300_winsys_screen* winsys, uint32_t dword); + /* Write a table of dwords to the command buffer. */ + void (*write_cs_table)(struct r300_winsys_screen* winsys, + const void *dwords, unsigned count); + /* Write a relocated dword to the command buffer. */ void (*write_cs_reloc)(struct r300_winsys_screen *winsys, struct r300_winsys_buffer *buf, diff --git a/src/gallium/drivers/softpipe/sp_clear.c b/src/gallium/drivers/softpipe/sp_clear.c index 5f130453c39..ae3f00f3387 100644 --- a/src/gallium/drivers/softpipe/sp_clear.c +++ b/src/gallium/drivers/softpipe/sp_clear.c @@ -69,11 +69,6 @@ softpipe_clear(struct pipe_context *pipe, unsigned buffers, const float *rgba, util_pack_color(rgba, ps->format, &uc); sp_tile_cache_clear(softpipe->cbuf_cache[i], rgba, uc.ui); - -#if !TILE_CLEAR_OPTIMIZATION - /* non-cached surface */ - pipe->surface_fill(pipe, ps, 0, 0, ps->width, ps->height, uc.ui); -#endif } } @@ -83,11 +78,6 @@ softpipe_clear(struct pipe_context *pipe, unsigned buffers, const float *rgba, cv = util_pack_z_stencil(ps->format, depth, stencil); sp_tile_cache_clear(softpipe->zsbuf_cache, zero, cv); - -#if !TILE_CLEAR_OPTIMIZATION - /* non-cached surface */ - pipe->surface_fill(pipe, ps, 0, 0, ps->width, ps->height, cv); -#endif } softpipe->dirty_render_cache = TRUE; diff --git a/src/gallium/drivers/softpipe/sp_flush.c b/src/gallium/drivers/softpipe/sp_flush.c index 508fe8f764d..5024fc8a819 100644 --- a/src/gallium/drivers/softpipe/sp_flush.c +++ b/src/gallium/drivers/softpipe/sp_flush.c @@ -104,3 +104,71 @@ softpipe_flush( struct pipe_context *pipe, *fence = NULL; } + +/** + * Flush context if necessary. + * + * Returns FALSE if it would have block, but do_not_block was set, TRUE + * otherwise. + * + * TODO: move this logic to an auxiliary library? + */ +boolean +softpipe_flush_resource(struct pipe_context *pipe, + struct pipe_resource *texture, + unsigned face, + unsigned level, + unsigned flush_flags, + boolean read_only, + boolean cpu_access, + boolean do_not_block) +{ + unsigned referenced; + + referenced = pipe->is_resource_referenced(pipe, texture, face, level); + + if ((referenced & PIPE_REFERENCED_FOR_WRITE) || + ((referenced & PIPE_REFERENCED_FOR_READ) && !read_only)) { + + /* + * TODO: The semantics of these flush flags are too obtuse. They should + * disappear and the pipe driver should just ensure that all visible + * side-effects happen when they need to happen. + */ + if (referenced & PIPE_REFERENCED_FOR_WRITE) + flush_flags |= PIPE_FLUSH_RENDER_CACHE; + + if (referenced & PIPE_REFERENCED_FOR_READ) + flush_flags |= PIPE_FLUSH_TEXTURE_CACHE; + + if (cpu_access) { + /* + * Flush and wait. + */ + + struct pipe_fence_handle *fence = NULL; + + if (do_not_block) + return FALSE; + + pipe->flush(pipe, flush_flags, &fence); + + if (fence) { + /* + * This is for illustrative purposes only, as softpipe does not + * have fences. + */ + pipe->screen->fence_finish(pipe->screen, fence, 0); + pipe->screen->fence_reference(pipe->screen, &fence, NULL); + } + } else { + /* + * Just flush. + */ + + pipe->flush(pipe, flush_flags, NULL); + } + } + + return TRUE; +} diff --git a/src/gallium/drivers/softpipe/sp_flush.h b/src/gallium/drivers/softpipe/sp_flush.h index 68d9b5fa835..cb97482a71b 100644 --- a/src/gallium/drivers/softpipe/sp_flush.h +++ b/src/gallium/drivers/softpipe/sp_flush.h @@ -28,10 +28,23 @@ #ifndef SP_FLUSH_H #define SP_FLUSH_H +#include "pipe/p_compiler.h" + struct pipe_context; struct pipe_fence_handle; -void softpipe_flush(struct pipe_context *pipe, unsigned flags, - struct pipe_fence_handle **fence); +void +softpipe_flush(struct pipe_context *pipe, unsigned flags, + struct pipe_fence_handle **fence); + +boolean +softpipe_flush_resource(struct pipe_context *pipe, + struct pipe_resource *texture, + unsigned face, + unsigned level, + unsigned flush_flags, + boolean read_only, + boolean cpu_access, + boolean do_not_block); #endif diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c index 7b1e058ac83..8bb0294238a 100644 --- a/src/gallium/drivers/softpipe/sp_screen.c +++ b/src/gallium/drivers/softpipe/sp_screen.c @@ -27,6 +27,7 @@ #include "util/u_memory.h" +#include "util/u_format.h" #include "util/u_format_s3tc.h" #include "pipe/p_defines.h" #include "pipe/p_screen.h" @@ -70,6 +71,8 @@ softpipe_get_param(struct pipe_screen *screen, int param) return 1; case PIPE_CAP_GLSL: return 1; + case PIPE_CAP_SM3: + return 1; case PIPE_CAP_ANISOTROPIC_FILTER: return 0; case PIPE_CAP_POINT_SPRITE: @@ -144,43 +147,77 @@ static boolean softpipe_is_format_supported( struct pipe_screen *screen, enum pipe_format format, enum pipe_texture_target target, - unsigned tex_usage, + unsigned bind, unsigned geom_flags ) { struct sw_winsys *winsys = softpipe_screen(screen)->winsys; + const struct util_format_description *format_desc; assert(target == PIPE_TEXTURE_1D || target == PIPE_TEXTURE_2D || target == PIPE_TEXTURE_3D || target == PIPE_TEXTURE_CUBE); - switch(format) { - case PIPE_FORMAT_YUYV: - case PIPE_FORMAT_UYVY: + format_desc = util_format_description(format); + if (!format_desc) return FALSE; - case PIPE_FORMAT_DXT1_RGB: - case PIPE_FORMAT_DXT1_RGBA: - case PIPE_FORMAT_DXT3_RGBA: - case PIPE_FORMAT_DXT5_RGBA: - return util_format_s3tc_enabled; + if (bind & (PIPE_BIND_DISPLAY_TARGET | + PIPE_BIND_SCANOUT | + PIPE_BIND_SHARED)) { + if(!winsys->is_displaytarget_format_supported(winsys, bind, format)) + return FALSE; + } - case PIPE_FORMAT_Z32_FLOAT: - case PIPE_FORMAT_NONE: - return FALSE; + if (bind & PIPE_BIND_RENDER_TARGET) { + if (format_desc->colorspace == UTIL_FORMAT_COLORSPACE_ZS) + return FALSE; - default: - break; + /* + * Although possible, it is unnatural to render into compressed or YUV + * surfaces. So disable these here to avoid going into weird paths + * inside the state trackers. + */ + if (format_desc->block.width != 1 || + format_desc->block.height != 1) + return FALSE; + + /* + * TODO: Unfortunately we cannot render into anything more than 32 bits + * because we encode color clear values into a 32bit word. + */ + if (format_desc->block.bits > 32) + return FALSE; } - if(tex_usage & (PIPE_BIND_DISPLAY_TARGET | - PIPE_BIND_SCANOUT | - PIPE_BIND_SHARED)) { - if(!winsys->is_displaytarget_format_supported(winsys, tex_usage, format)) + if (bind & PIPE_BIND_DEPTH_STENCIL) { + if (format_desc->colorspace != UTIL_FORMAT_COLORSPACE_ZS) return FALSE; + + /* + * TODO: Unfortunately we cannot render into anything more than 32 bits + * because we encode depth and stencil clear values into a 32bit word. + */ + if (format_desc->block.bits > 32) + return FALSE; + + /* + * TODO: eliminate this restriction + */ + if (format == PIPE_FORMAT_Z32_FLOAT) + return FALSE; + } + + /* + * All other operations (sampling, transfer, etc). + */ + + if (format_desc->layout == UTIL_FORMAT_LAYOUT_S3TC) { + return util_format_s3tc_enabled; } - /* XXX: this is often a lie. Pull in logic from llvmpipe to fix. + /* + * Everything else should be supported by u_format. */ return TRUE; } diff --git a/src/gallium/drivers/softpipe/sp_tex_tile_cache.c b/src/gallium/drivers/softpipe/sp_tex_tile_cache.c index c79f5fb05a1..fbce9e042ba 100644 --- a/src/gallium/drivers/softpipe/sp_tex_tile_cache.c +++ b/src/gallium/drivers/softpipe/sp_tex_tile_cache.c @@ -248,7 +248,8 @@ sp_find_cached_tile_tex(struct softpipe_tex_tile_cache *tc, addr.bits.face, addr.bits.level, addr.bits.z, - PIPE_TRANSFER_READ, 0, 0, + PIPE_TRANSFER_READ | PIPE_TRANSFER_UNSYNCHRONIZED, + 0, 0, u_minify(tc->texture->width0, addr.bits.level), u_minify(tc->texture->height0, addr.bits.level)); diff --git a/src/gallium/drivers/softpipe/sp_texture.c b/src/gallium/drivers/softpipe/sp_texture.c index 167b6b11617..7aa85559b23 100644 --- a/src/gallium/drivers/softpipe/sp_texture.c +++ b/src/gallium/drivers/softpipe/sp_texture.c @@ -39,6 +39,7 @@ #include "util/u_transfer.h" #include "sp_context.h" +#include "sp_flush.h" #include "sp_texture.h" #include "sp_screen.h" @@ -214,6 +215,35 @@ softpipe_resource_get_handle(struct pipe_screen *screen, /** + * Helper function to compute offset (in bytes) for a particular + * texture level/face/slice from the start of the buffer. + */ +static unsigned +sp_get_tex_image_offset(const struct softpipe_resource *spr, + unsigned level, unsigned face, unsigned zslice) +{ + const unsigned hgt = u_minify(spr->base.height0, level); + const unsigned nblocksy = util_format_get_nblocksy(spr->base.format, hgt); + unsigned offset = spr->level_offset[level]; + + if (spr->base.target == PIPE_TEXTURE_CUBE) { + assert(zslice == 0); + offset += face * nblocksy * spr->stride[level]; + } + else if (spr->base.target == PIPE_TEXTURE_3D) { + assert(face == 0); + offset += zslice * nblocksy * spr->stride[level]; + } + else { + assert(face == 0); + assert(zslice == 0); + } + + return offset; +} + + +/** * Get a pipe_surface "view" into a texture resource. */ static struct pipe_surface * @@ -234,25 +264,12 @@ softpipe_get_tex_surface(struct pipe_screen *screen, ps->format = pt->format; ps->width = u_minify(pt->width0, level); ps->height = u_minify(pt->height0, level); - ps->offset = spr->level_offset[level]; + ps->offset = sp_get_tex_image_offset(spr, level, face, zslice); ps->usage = usage; ps->face = face; ps->level = level; ps->zslice = zslice; - - if (pt->target == PIPE_TEXTURE_CUBE) { - ps->offset += face * util_format_get_nblocksy(pt->format, u_minify(pt->height0, level)) * - spr->stride[level]; - } - else if (pt->target == PIPE_TEXTURE_3D) { - ps->offset += zslice * util_format_get_nblocksy(pt->format, u_minify(pt->height0, level)) * - spr->stride[level]; - } - else { - assert(face == 0); - assert(zslice == 0); - } } return ps; } @@ -290,8 +307,8 @@ softpipe_get_transfer(struct pipe_context *pipe, unsigned usage, const struct pipe_box *box) { - struct softpipe_resource *sprex = softpipe_resource(resource); - struct softpipe_transfer *spr; + struct softpipe_resource *spr = softpipe_resource(resource); + struct softpipe_transfer *spt; assert(resource); assert(sr.level <= resource->last_level); @@ -301,33 +318,41 @@ softpipe_get_transfer(struct pipe_context *pipe, assert(box->y + box->height <= u_minify(resource->height0, sr.level)); assert(box->z + box->depth <= u_minify(resource->depth0, sr.level)); - spr = CALLOC_STRUCT(softpipe_transfer); - if (spr) { - struct pipe_transfer *pt = &spr->base; + /* + * Transfers, like other pipe operations, must happen in order, so flush the + * context if necessary. + */ + if (!(usage & PIPE_TRANSFER_UNSYNCHRONIZED)) { + boolean read_only = !(usage & PIPE_TRANSFER_WRITE); + boolean do_not_block = !!(usage & PIPE_TRANSFER_DONTBLOCK); + if (!softpipe_flush_resource(pipe, resource, + sr.face, sr.level, + 0, /* flush_flags */ + read_only, + TRUE, /* cpu_access */ + do_not_block)) { + /* + * It would have blocked, but state tracker requested no to. + */ + assert(do_not_block); + return NULL; + } + } + + spt = CALLOC_STRUCT(softpipe_transfer); + if (spt) { + struct pipe_transfer *pt = &spt->base; enum pipe_format format = resource->format; - int nblocksy = util_format_get_nblocksy(resource->format, - u_minify(resource->height0, sr.level)); pipe_resource_reference(&pt->resource, resource); pt->sr = sr; pt->usage = usage; pt->box = *box; - pt->stride = sprex->stride[sr.level]; + pt->stride = spr->stride[sr.level]; - spr->offset = sprex->level_offset[sr.level]; - - if (resource->target == PIPE_TEXTURE_CUBE) { - spr->offset += sr.face * nblocksy * pt->stride; - } - else if (resource->target == PIPE_TEXTURE_3D) { - spr->offset += box->z * nblocksy * pt->stride; - } - else { - assert(sr.face == 0); - assert(box->z == 0); - } - - spr->offset += - box->y / util_format_get_blockheight(format) * spr->base.stride + + spt->offset = sp_get_tex_image_offset(spr, sr.level, sr.face, box->z); + + spt->offset += + box->y / util_format_get_blockheight(format) * spt->base.stride + box->x / util_format_get_blockwidth(format) * util_format_get_blocksize(format); return pt; @@ -356,26 +381,24 @@ static void * softpipe_transfer_map(struct pipe_context *pipe, struct pipe_transfer *transfer) { - struct softpipe_transfer *sp_transfer = softpipe_transfer(transfer); - struct softpipe_resource *sp_resource = softpipe_resource(transfer->resource); + struct softpipe_transfer *spt = softpipe_transfer(transfer); + struct softpipe_resource *spr = softpipe_resource(transfer->resource); struct sw_winsys *winsys = softpipe_screen(pipe->screen)->winsys; uint8_t *map; /* resources backed by display target treated specially: */ - if (sp_resource->dt) { - map = winsys->displaytarget_map(winsys, - sp_resource->dt, - transfer->usage); + if (spr->dt) { + map = winsys->displaytarget_map(winsys, spr->dt, transfer->usage); } else { - map = sp_resource->data; + map = spr->data; } if (map == NULL) return NULL; else - return map + sp_transfer->offset; + return map + spt->offset; } @@ -412,26 +435,25 @@ softpipe_user_buffer_create(struct pipe_screen *screen, unsigned bytes, unsigned bind_flags) { - struct softpipe_resource *buffer; + struct softpipe_resource *spr; - buffer = CALLOC_STRUCT(softpipe_resource); - if(!buffer) + spr = CALLOC_STRUCT(softpipe_resource); + if (!spr) return NULL; - - pipe_reference_init(&buffer->base.reference, 1); - buffer->base.screen = screen; - buffer->base.format = PIPE_FORMAT_R8_UNORM; /* ?? */ - buffer->base.bind = bind_flags; - buffer->base.usage = PIPE_USAGE_IMMUTABLE; - buffer->base.flags = 0; - buffer->base.width0 = bytes; - buffer->base.height0 = 1; - buffer->base.depth0 = 1; - buffer->userBuffer = TRUE; - buffer->data = ptr; - - return &buffer->base; + pipe_reference_init(&spr->base.reference, 1); + spr->base.screen = screen; + spr->base.format = PIPE_FORMAT_R8_UNORM; /* ?? */ + spr->base.bind = bind_flags; + spr->base.usage = PIPE_USAGE_IMMUTABLE; + spr->base.flags = 0; + spr->base.width0 = bytes; + spr->base.height0 = 1; + spr->base.depth0 = 1; + spr->userBuffer = TRUE; + spr->data = ptr; + + return &spr->base; } diff --git a/src/gallium/drivers/softpipe/sp_tile_cache.c b/src/gallium/drivers/softpipe/sp_tile_cache.c index d996c2a3427..f4db6f6ef00 100644 --- a/src/gallium/drivers/softpipe/sp_tile_cache.c +++ b/src/gallium/drivers/softpipe/sp_tile_cache.c @@ -103,7 +103,7 @@ sp_create_tile_cache( struct pipe_context *pipe ) * However, it breaks clearing in other situations (such as in * progs/tests/drawbuffers, see bug 24402). */ -#if 0 && TILE_CLEAR_OPTIMIZATION +#if 0 /* set flags to indicate all the tiles are cleared */ memset(tc->clear_flags, 255, sizeof(tc->clear_flags)); #endif @@ -155,7 +155,8 @@ sp_tile_cache_set_surface(struct softpipe_tile_cache *tc, if (ps) { tc->transfer = pipe_get_transfer(pipe, ps->texture, ps->face, ps->level, ps->zslice, - PIPE_TRANSFER_READ_WRITE, + PIPE_TRANSFER_READ_WRITE | + PIPE_TRANSFER_UNSYNCHRONIZED, 0, 0, ps->width, ps->height); tc->depth_stencil = (ps->format == PIPE_FORMAT_Z24_UNORM_S8_USCALED || @@ -344,9 +345,7 @@ sp_flush_tile_cache(struct softpipe_tile_cache *tc) } } -#if TILE_CLEAR_OPTIMIZATION sp_tile_cache_flush_clear(tc); -#endif } #if 0 @@ -448,13 +447,8 @@ sp_tile_cache_clear(struct softpipe_tile_cache *tc, const float *rgba, tc->clear_val = clearValue; -#if TILE_CLEAR_OPTIMIZATION /* set flags to indicate all the tiles are cleared */ memset(tc->clear_flags, 255, sizeof(tc->clear_flags)); -#else - /* disable the optimization */ - memset(tc->clear_flags, 0, sizeof(tc->clear_flags)); -#endif for (pos = 0; pos < NUM_ENTRIES; pos++) { struct softpipe_cached_tile *tile = tc->entries + pos; diff --git a/src/gallium/drivers/softpipe/sp_tile_cache.h b/src/gallium/drivers/softpipe/sp_tile_cache.h index 753d8c0daac..e03d53eb24e 100644 --- a/src/gallium/drivers/softpipe/sp_tile_cache.h +++ b/src/gallium/drivers/softpipe/sp_tile_cache.h @@ -28,8 +28,6 @@ #ifndef SP_TILE_CACHE_H #define SP_TILE_CACHE_H -#define TILE_CLEAR_OPTIMIZATION 1 - #include "pipe/p_compiler.h" diff --git a/src/gallium/drivers/svga/svga_draw_arrays.c b/src/gallium/drivers/svga/svga_draw_arrays.c index 005996d05d3..da33fae62f1 100644 --- a/src/gallium/drivers/svga/svga_draw_arrays.c +++ b/src/gallium/drivers/svga/svga_draw_arrays.c @@ -277,12 +277,13 @@ svga_hwtnl_draw_arrays( struct svga_hwtnl *hwtnl, ret = svga_hwtnl_simple_draw_range_elements( hwtnl, gen_buf, gen_size, + start, 0, count - 1, gen_prim, 0, - gen_nr, - start ); + gen_nr ); + if (ret) goto done; diff --git a/src/gallium/drivers/svga/svga_resource.c b/src/gallium/drivers/svga/svga_resource.c index 15258c1966b..ba630582e59 100644 --- a/src/gallium/drivers/svga/svga_resource.c +++ b/src/gallium/drivers/svga/svga_resource.c @@ -14,7 +14,7 @@ svga_resource_create(struct pipe_screen *screen, if (template->target == PIPE_BUFFER) return svga_buffer_create(screen, template); else - return svga_resource_create(screen, template); + return svga_texture_create(screen, template); } @@ -26,7 +26,7 @@ svga_resource_from_handle(struct pipe_screen * screen, if (template->target == PIPE_BUFFER) return NULL; else - return svga_resource_from_handle(screen, template, whandle); + return svga_texture_from_handle(screen, template, whandle); } diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c index aeda3dcad51..9fc613da749 100644 --- a/src/gallium/drivers/svga/svga_screen.c +++ b/src/gallium/drivers/svga/svga_screen.c @@ -397,6 +397,7 @@ svga_screen_create(struct svga_winsys_screen *sws) screen->fence_finish = svga_fence_finish; svgascreen->sws = sws; + svga_screen_init_surface_functions(svgascreen); svga_init_screen_resource_functions(svgascreen); svgascreen->use_ps30 = diff --git a/src/gallium/drivers/svga/svga_state_need_swtnl.c b/src/gallium/drivers/svga/svga_state_need_swtnl.c index dfaab53aef4..d34d68f5350 100644 --- a/src/gallium/drivers/svga/svga_state_need_swtnl.c +++ b/src/gallium/drivers/svga/svga_state_need_swtnl.c @@ -43,7 +43,7 @@ svga_translate_vertex_format(enum pipe_format format) case PIPE_FORMAT_R32G32_FLOAT: return SVGA3D_DECLTYPE_FLOAT2; case PIPE_FORMAT_R32G32B32_FLOAT: return SVGA3D_DECLTYPE_FLOAT3; case PIPE_FORMAT_R32G32B32A32_FLOAT: return SVGA3D_DECLTYPE_FLOAT4; - case PIPE_FORMAT_A8R8G8B8_UNORM: return SVGA3D_DECLTYPE_D3DCOLOR; + case PIPE_FORMAT_B8G8R8A8_UNORM: return SVGA3D_DECLTYPE_D3DCOLOR; case PIPE_FORMAT_R8G8B8A8_USCALED: return SVGA3D_DECLTYPE_UBYTE4; case PIPE_FORMAT_R16G16_SSCALED: return SVGA3D_DECLTYPE_SHORT2; case PIPE_FORMAT_R16G16B16A16_SSCALED: return SVGA3D_DECLTYPE_SHORT4; @@ -52,14 +52,10 @@ svga_translate_vertex_format(enum pipe_format format) case PIPE_FORMAT_R16G16B16A16_SNORM: return SVGA3D_DECLTYPE_SHORT4N; case PIPE_FORMAT_R16G16_UNORM: return SVGA3D_DECLTYPE_USHORT2N; case PIPE_FORMAT_R16G16B16A16_UNORM: return SVGA3D_DECLTYPE_USHORT4N; - - /* These formats don't exist yet: - * - case PIPE_FORMAT_R10G10B10_USCALED: return SVGA3D_DECLTYPE_UDEC3; - case PIPE_FORMAT_R10G10B10_SNORM: return SVGA3D_DECLTYPE_DEC3N; + case PIPE_FORMAT_R10G10B10X2_USCALED: return SVGA3D_DECLTYPE_UDEC3; + case PIPE_FORMAT_R10G10B10X2_SNORM: return SVGA3D_DECLTYPE_DEC3N; case PIPE_FORMAT_R16G16_FLOAT: return SVGA3D_DECLTYPE_FLOAT16_2; case PIPE_FORMAT_R16G16B16A16_FLOAT: return SVGA3D_DECLTYPE_FLOAT16_4; - */ default: /* There are many formats without hardware support. This case diff --git a/src/gallium/drivers/svga/svga_state_vs.c b/src/gallium/drivers/svga/svga_state_vs.c index a6215c68cbe..5133c70593c 100644 --- a/src/gallium/drivers/svga/svga_state_vs.c +++ b/src/gallium/drivers/svga/svga_state_vs.c @@ -229,7 +229,7 @@ static int update_zero_stride( struct svga_context *svga, translate->set_buffer(translate, vel->vertex_buffer_index, mapped_buffer, - vbuffer->stride); + vbuffer->stride, vbuffer->max_index); translate->run(translate, 0, 1, 0, svga->curr.zero_stride_constants); diff --git a/src/gallium/drivers/svga/svga_tgsi_insn.c b/src/gallium/drivers/svga/svga_tgsi_insn.c index 3d4f56a67bd..7d7024c4a7d 100644 --- a/src/gallium/drivers/svga/svga_tgsi_insn.c +++ b/src/gallium/drivers/svga/svga_tgsi_insn.c @@ -49,9 +49,7 @@ translate_opcode( case TGSI_OPCODE_DP2A: return SVGA3DOP_DP2ADD; case TGSI_OPCODE_DP3: return SVGA3DOP_DP3; case TGSI_OPCODE_DP4: return SVGA3DOP_DP4; - case TGSI_OPCODE_ENDFOR: return SVGA3DOP_ENDLOOP; case TGSI_OPCODE_FRC: return SVGA3DOP_FRC; - case TGSI_OPCODE_BGNFOR: return SVGA3DOP_LOOP; case TGSI_OPCODE_MAD: return SVGA3DOP_MAD; case TGSI_OPCODE_MAX: return SVGA3DOP_MAX; case TGSI_OPCODE_MIN: return SVGA3DOP_MIN; @@ -2686,7 +2684,6 @@ needs_to_create_zero( struct svga_shader_emitter *emit ) if (emit->info.opcode_count[TGSI_OPCODE_IF] >= 1 || emit->info.opcode_count[TGSI_OPCODE_BGNLOOP] >= 1 || - emit->info.opcode_count[TGSI_OPCODE_BGNFOR] >= 1 || emit->info.opcode_count[TGSI_OPCODE_DDX] >= 1 || emit->info.opcode_count[TGSI_OPCODE_DDY] >= 1 || emit->info.opcode_count[TGSI_OPCODE_SGE] >= 1 || diff --git a/src/gallium/drivers/trace/tr_context.c b/src/gallium/drivers/trace/tr_context.c index 8216c06260f..71ba1e909df 100644 --- a/src/gallium/drivers/trace/tr_context.c +++ b/src/gallium/drivers/trace/tr_context.c @@ -1142,12 +1142,12 @@ trace_context_set_vertex_buffers(struct pipe_context *_pipe, trace_dump_arg_end(); if (num_buffers) { - struct pipe_vertex_buffer *_buffers = malloc(num_buffers * sizeof(*_buffers)); + struct pipe_vertex_buffer *_buffers = MALLOC(num_buffers * sizeof(*_buffers)); memcpy(_buffers, buffers, num_buffers * sizeof(*_buffers)); for (i = 0; i < num_buffers; i++) _buffers[i].buffer = trace_resource_unwrap(tr_ctx, buffers[i].buffer); pipe->set_vertex_buffers(pipe, num_buffers, _buffers); - free(_buffers); + FREE(_buffers); } else { pipe->set_vertex_buffers(pipe, num_buffers, NULL); } diff --git a/src/gallium/drivers/trace/tr_drm.c b/src/gallium/drivers/trace/tr_drm.c index eaa47df4066..0dc8cca2648 100644 --- a/src/gallium/drivers/trace/tr_drm.c +++ b/src/gallium/drivers/trace/tr_drm.c @@ -73,7 +73,7 @@ trace_drm_destroy(struct drm_api *_api) if (api->destroy) api->destroy(api); - free(tr_api); + FREE(tr_api); } struct drm_api * diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h index 0a4bd584aec..1aa54f1423a 100644 --- a/src/gallium/include/pipe/p_defines.h +++ b/src/gallium/include/pipe/p_defines.h @@ -269,7 +269,7 @@ enum pipe_transfer_usage { * - pipe_context::transfer_flush_region * - OpenGL's ARB_map_buffer_range extension, MAP_FLUSH_EXPLICIT_BIT flag. */ - PIPE_TRANSFER_FLUSH_EXPLICIT = (1 << 11), + PIPE_TRANSFER_FLUSH_EXPLICIT = (1 << 11) }; @@ -291,10 +291,10 @@ enum pipe_transfer_usage { #define PIPE_BIND_TRANSFER_READ (1 << 10) /* get_transfer */ #define PIPE_BIND_CUSTOM (1 << 16) /* state-tracker/winsys usages */ -/* The first two flags were previously part of the amorphous +/* The first two flags above were previously part of the amorphous * TEXTURE_USAGE, most of which are now descriptions of the ways a - * particular texture can be bound to the gallium pipeline. These two - * do not fit within that and probably need to be migrated to some + * particular texture can be bound to the gallium pipeline. The two flags + * below do not fit within that and probably need to be migrated to some * other place. * * It seems like scanout is used by the Xorg state tracker to ask for @@ -304,7 +304,7 @@ enum pipe_transfer_usage { * * The shared flag is quite underspecified, but certainly isn't a * binding flag - it seems more like a message to the winsys to create - * a shareable allocation. Could it mean that this texture is a valid argument for + * a shareable allocation. */ #define PIPE_BIND_SCANOUT (1 << 14) /* */ #define PIPE_BIND_SHARED (1 << 15) /* get_texture_handle ??? */ diff --git a/src/gallium/include/pipe/p_screen.h b/src/gallium/include/pipe/p_screen.h index 06ab4a848a4..beff1ae8a92 100644 --- a/src/gallium/include/pipe/p_screen.h +++ b/src/gallium/include/pipe/p_screen.h @@ -93,13 +93,13 @@ struct pipe_screen { /** * Check if the given pipe_format is supported as a texture or * drawing surface. - * \param tex_usage bitmask of PIPE_BIND_* + * \param bindings bitmask of PIPE_BIND_* * \param geom_flags bitmask of PIPE_TEXTURE_GEOM_* */ boolean (*is_format_supported)( struct pipe_screen *, enum pipe_format format, enum pipe_texture_target target, - unsigned tex_usage, + unsigned bindings, unsigned geom_flags ); /** diff --git a/src/gallium/include/pipe/p_shader_tokens.h b/src/gallium/include/pipe/p_shader_tokens.h index c5c480f1f0e..e21aaacc18a 100644 --- a/src/gallium/include/pipe/p_shader_tokens.h +++ b/src/gallium/include/pipe/p_shader_tokens.h @@ -276,12 +276,10 @@ struct tgsi_property_data { #define TGSI_OPCODE_TXL 72 #define TGSI_OPCODE_BRK 73 #define TGSI_OPCODE_IF 74 -#define TGSI_OPCODE_BGNFOR 75 -#define TGSI_OPCODE_REP 76 + /* gap */ #define TGSI_OPCODE_ELSE 77 #define TGSI_OPCODE_ENDIF 78 -#define TGSI_OPCODE_ENDFOR 79 -#define TGSI_OPCODE_ENDREP 80 + /* gap */ #define TGSI_OPCODE_PUSHA 81 #define TGSI_OPCODE_POPA 82 #define TGSI_OPCODE_CEIL 83 diff --git a/src/gallium/include/state_tracker/st_api.h b/src/gallium/include/state_tracker/st_api.h index 8897ff7c259..002d1c6b840 100644 --- a/src/gallium/include/state_tracker/st_api.h +++ b/src/gallium/include/state_tracker/st_api.h @@ -43,14 +43,6 @@ */ /** - * The entry points of the state trackers. - */ -#define ST_MODULE_OPENGL_SYMBOL "st_module_OpenGL" -#define ST_MODULE_OPENGL_ES1_SYMBOL "st_module_OpenGL_ES1" -#define ST_MODULE_OPENGL_ES2_SYMBOL "st_module_OpenGL_ES2" -#define ST_MODULE_OPENVG_SYMBOL "st_module_OpenVG" - -/** * The supported rendering API of a state tracker. */ enum st_api_type { @@ -379,17 +371,6 @@ struct st_api }; /** - * Represent a state tracker. - * - * This is the entry point of a state tracker. - */ -struct st_module -{ - enum st_api_type api; - struct st_api *(*create_api)(void); -}; - -/** * Return true if the visual has the specified buffers. */ static INLINE boolean @@ -399,9 +380,17 @@ st_visual_have_buffers(const struct st_visual *visual, unsigned mask) } /* these symbols may need to be dynamically lookup up */ -extern PUBLIC const struct st_module st_module_OpenGL; -extern PUBLIC const struct st_module st_module_OpenGL_ES1; -extern PUBLIC const struct st_module st_module_OpenGL_ES2; -extern PUBLIC const struct st_module st_module_OpenVG; +extern PUBLIC struct st_api * st_api_create_OpenGL(void); +extern PUBLIC struct st_api * st_api_create_OpenGL_ES1(void); +extern PUBLIC struct st_api * st_api_create_OpenGL_ES2(void); +extern PUBLIC struct st_api * st_api_create_OpenVG(void); + +/** + * The entry points of the state trackers. + */ +#define ST_CREATE_OPENGL_SYMBOL "st_api_create_OpenGL" +#define ST_CREATE_OPENGL_ES1_SYMBOL "st_api_create_OpenGL_ES1" +#define ST_CREATE_OPENGL_ES2_SYMBOL "st_api_create_OpenGL_ES2" +#define ST_CREATE_OPENVG_SYMBOL "st_api_create_OpenVG" #endif /* _ST_API_H_ */ diff --git a/src/gallium/state_trackers/dri/common/dri1_helper.c b/src/gallium/state_trackers/dri/common/dri1_helper.c index b0dd974a964..f641b41ff8b 100644 --- a/src/gallium/state_trackers/dri/common/dri1_helper.c +++ b/src/gallium/state_trackers/dri/common/dri1_helper.c @@ -42,7 +42,7 @@ struct pipe_fence_handle * dri1_swap_fences_pop_front(struct dri_drawable *draw) { - struct pipe_screen *screen = dri_screen(draw->sPriv)->pipe_screen; + struct pipe_screen *screen = dri_screen(draw->sPriv)->base.screen; struct pipe_fence_handle *fence = NULL; if (draw->cur_fences >= draw->desired_fences) { @@ -58,7 +58,7 @@ void dri1_swap_fences_push_back(struct dri_drawable *draw, struct pipe_fence_handle *fence) { - struct pipe_screen *screen = dri_screen(draw->sPriv)->pipe_screen; + struct pipe_screen *screen = dri_screen(draw->sPriv)->base.screen; if (!fence) return; @@ -74,7 +74,7 @@ dri1_swap_fences_push_back(struct dri_drawable *draw, void dri1_swap_fences_clear(struct dri_drawable *drawable) { - struct pipe_screen *screen = dri_screen(drawable->sPriv)->pipe_screen; + struct pipe_screen *screen = dri_screen(drawable->sPriv)->base.screen; struct pipe_fence_handle *fence; while (drawable->cur_fences) { @@ -86,7 +86,7 @@ dri1_swap_fences_clear(struct dri_drawable *drawable) struct pipe_surface * dri1_get_pipe_surface(struct dri_drawable *drawable, struct pipe_resource *ptex) { - struct pipe_screen *pipe_screen = dri_screen(drawable->sPriv)->pipe_screen; + struct pipe_screen *pipe_screen = dri_screen(drawable->sPriv)->base.screen; struct pipe_surface *psurf = drawable->dri1_surface; if (!psurf || psurf->texture != ptex) { @@ -114,7 +114,7 @@ dri1_get_pipe_context(struct dri_screen *screen) if (!pipe) { screen->dri1_pipe = - screen->pipe_screen->context_create(screen->pipe_screen, NULL); + screen->base.screen->context_create(screen->base.screen, NULL); pipe = screen->dri1_pipe; } diff --git a/src/gallium/state_trackers/dri/common/dri_context.c b/src/gallium/state_trackers/dri/common/dri_context.c index f14f4130bf4..a808d2d9ddf 100644 --- a/src/gallium/state_trackers/dri/common/dri_context.c +++ b/src/gallium/state_trackers/dri/common/dri_context.c @@ -34,7 +34,6 @@ #include "dri_screen.h" #include "dri_drawable.h" #include "dri_context.h" -#include "dri_st_api.h" #include "pipe/p_context.h" #include "state_tracker/st_context.h" @@ -53,9 +52,9 @@ GLboolean dri_create_context(const __GLcontextModes * visual, __DRIcontext * cPriv, void *sharedContextPrivate) { - struct st_api *stapi = dri_get_st_api(); __DRIscreen *sPriv = cPriv->driScreenPriv; struct dri_screen *screen = dri_screen(sPriv); + struct st_api *stapi = screen->st_api; struct dri_context *ctx = NULL; struct st_context_iface *st_share = NULL; struct st_visual stvis; @@ -77,7 +76,7 @@ dri_create_context(const __GLcontextModes * visual, &screen->optionCache, sPriv->myNum, "dri"); dri_fill_st_visual(&stvis, screen, visual); - ctx->st = stapi->create_context(stapi, screen->smapi, &stvis, st_share); + ctx->st = stapi->create_context(stapi, &screen->base, &stvis, st_share); if (ctx->st == NULL) goto fail; ctx->st->st_manager_private = (void *) ctx; @@ -119,16 +118,15 @@ dri_destroy_context(__DRIcontext * cPriv) GLboolean dri_unbind_context(__DRIcontext * cPriv) { - struct st_api *stapi = dri_get_st_api(); - - if (cPriv) { - struct dri_context *ctx = dri_context(cPriv); + /* dri_util.c ensures cPriv is not null */ + struct dri_screen *screen = dri_screen(cPriv->driScreenPriv); + struct dri_context *ctx = dri_context(cPriv); + struct st_api *stapi = screen->st_api; - if (--ctx->bind_count == 0) { - if (ctx->st == stapi->get_current(stapi)) { - ctx->st->flush(ctx->st, PIPE_FLUSH_RENDER_CACHE, NULL); - stapi->make_current(stapi, NULL, NULL, NULL); - } + if (--ctx->bind_count == 0) { + if (ctx->st == stapi->get_current(stapi)) { + ctx->st->flush(ctx->st, PIPE_FLUSH_RENDER_CACHE, NULL); + stapi->make_current(stapi, NULL, NULL, NULL); } } @@ -140,42 +138,38 @@ dri_make_current(__DRIcontext * cPriv, __DRIdrawable * driDrawPriv, __DRIdrawable * driReadPriv) { - struct st_api *stapi = dri_get_st_api(); - - if (cPriv) { - struct dri_context *ctx = dri_context(cPriv); - struct dri_drawable *draw = dri_drawable(driDrawPriv); - struct dri_drawable *read = dri_drawable(driReadPriv); - struct st_context_iface *old_st; + /* dri_util.c ensures cPriv is not null */ + struct dri_screen *screen = dri_screen(cPriv->driScreenPriv); + struct dri_context *ctx = dri_context(cPriv); + struct st_api *stapi = screen->st_api; + struct dri_drawable *draw = dri_drawable(driDrawPriv); + struct dri_drawable *read = dri_drawable(driReadPriv); + struct st_context_iface *old_st = stapi->get_current(stapi); - old_st = stapi->get_current(stapi); - if (old_st && old_st != ctx->st) - ctx->st->flush(old_st, PIPE_FLUSH_RENDER_CACHE, NULL); + if (old_st && old_st != ctx->st) + old_st->flush(old_st, PIPE_FLUSH_RENDER_CACHE, NULL); - ++ctx->bind_count; + ++ctx->bind_count; - if (ctx->dPriv != driDrawPriv) { - ctx->dPriv = driDrawPriv; - draw->texture_stamp = driDrawPriv->lastStamp - 1; - } - if (ctx->rPriv != driReadPriv) { - ctx->rPriv = driReadPriv; - read->texture_stamp = driReadPriv->lastStamp - 1; - } - - stapi->make_current(stapi, ctx->st, draw->stfb, read->stfb); + if (ctx->dPriv != driDrawPriv) { + ctx->dPriv = driDrawPriv; + draw->texture_stamp = driDrawPriv->lastStamp - 1; } - else { - stapi->make_current(stapi, NULL, NULL, NULL); + if (ctx->rPriv != driReadPriv) { + ctx->rPriv = driReadPriv; + read->texture_stamp = driReadPriv->lastStamp - 1; } + stapi->make_current(stapi, ctx->st, &draw->base, &read->base); + return GL_TRUE; } struct dri_context * -dri_get_current(void) +dri_get_current(__DRIscreen *sPriv) { - struct st_api *stapi = dri_get_st_api(); + struct dri_screen *screen = dri_screen(sPriv); + struct st_api *stapi = screen->st_api; struct st_context_iface *st; st = stapi->get_current(stapi); diff --git a/src/gallium/state_trackers/dri/common/dri_context.h b/src/gallium/state_trackers/dri/common/dri_context.h index 594618874a4..9fe6b581016 100644 --- a/src/gallium/state_trackers/dri/common/dri_context.h +++ b/src/gallium/state_trackers/dri/common/dri_context.h @@ -80,7 +80,7 @@ dri_make_current(__DRIcontext * driContextPriv, __DRIdrawable * driReadPriv); struct dri_context * -dri_get_current(void); +dri_get_current(__DRIscreen * driScreenPriv); boolean dri_create_context(const __GLcontextModes * visual, diff --git a/src/gallium/state_trackers/dri/common/dri_drawable.c b/src/gallium/state_trackers/dri/common/dri_drawable.c index 88c17e81bfb..25892fc7a76 100644 --- a/src/gallium/state_trackers/dri/common/dri_drawable.c +++ b/src/gallium/state_trackers/dri/common/dri_drawable.c @@ -32,13 +32,82 @@ #include "dri_screen.h" #include "dri_context.h" #include "dri_drawable.h" -#include "dri_st_api.h" #include "dri1_helper.h" #include "pipe/p_screen.h" #include "util/u_format.h" #include "util/u_memory.h" +#include "util/u_inlines.h" + +static boolean +dri_st_framebuffer_validate(struct st_framebuffer_iface *stfbi, + const enum st_attachment_type *statts, + unsigned count, + struct pipe_resource **out) +{ + struct dri_drawable *drawable = + (struct dri_drawable *) stfbi->st_manager_private; + struct dri_screen *screen = dri_screen(drawable->sPriv); + unsigned statt_mask, new_mask; + boolean new_stamp; + int i; + + statt_mask = 0x0; + for (i = 0; i < count; i++) + statt_mask |= (1 << statts[i]); + + /* record newly allocated textures */ + new_mask = (statt_mask & ~drawable->texture_mask); + + /* + * dPriv->pStamp is the server stamp. It should be accessed with a lock, at + * least for DRI1. dPriv->lastStamp is the client stamp. It has the value + * of the server stamp when last checked. + */ + new_stamp = (drawable->texture_stamp != drawable->dPriv->lastStamp); + + if (new_stamp || new_mask) { + if (new_stamp && screen->update_drawable_info) + screen->update_drawable_info(drawable); + + screen->allocate_textures(drawable, statts, count); + + /* add existing textures */ + for (i = 0; i < ST_ATTACHMENT_COUNT; i++) { + if (drawable->textures[i]) + statt_mask |= (1 << i); + } + + drawable->texture_stamp = drawable->dPriv->lastStamp; + drawable->texture_mask = statt_mask; + } + + if (!out) + return TRUE; + + for (i = 0; i < count; i++) { + out[i] = NULL; + pipe_resource_reference(&out[i], drawable->textures[statts[i]]); + } + + return TRUE; +} + +static boolean +dri_st_framebuffer_flush_front(struct st_framebuffer_iface *stfbi, + enum st_attachment_type statt) +{ + struct dri_drawable *drawable = + (struct dri_drawable *) stfbi->st_manager_private; + struct dri_screen *screen = dri_screen(drawable->sPriv); + + /* XXX remove this and just set the correct one on the framebuffer */ + screen->flush_frontbuffer(drawable, statt); + + return TRUE; +} + /** * This is called when we need to set up GL rendering to a new X window. */ @@ -58,9 +127,12 @@ dri_create_buffer(__DRIscreen * sPriv, goto fail; dri_fill_st_visual(&drawable->stvis, screen, visual); - drawable->stfb = dri_create_st_framebuffer(drawable); - if (drawable->stfb == NULL) - goto fail; + + /* setup the st_framebuffer_iface */ + drawable->base.visual = &drawable->stvis; + drawable->base.flush_front = dri_st_framebuffer_flush_front; + drawable->base.validate = dri_st_framebuffer_validate; + drawable->base.st_manager_private = (void *) drawable; drawable->sPriv = sPriv; drawable->dPriv = dPriv; @@ -78,16 +150,75 @@ void dri_destroy_buffer(__DRIdrawable * dPriv) { struct dri_drawable *drawable = dri_drawable(dPriv); + int i; dri1_swap_fences_clear(drawable); dri1_destroy_pipe_surface(drawable); - dri_destroy_st_framebuffer(drawable->stfb); + for (i = 0; i < ST_ATTACHMENT_COUNT; i++) + pipe_resource_reference(&drawable->textures[i], NULL); drawable->desired_fences = 0; FREE(drawable); } +/** + * Validate the texture at an attachment. Allocate the texture if it does not + * exist. + */ +void +dri_drawable_validate_att(struct dri_drawable *drawable, + enum st_attachment_type statt) +{ + enum st_attachment_type statts[ST_ATTACHMENT_COUNT]; + unsigned i, count = 0; + + /* check if buffer already exists */ + if (drawable->texture_mask & (1 << statt)) + return; + + /* make sure DRI2 does not destroy existing buffers */ + for (i = 0; i < ST_ATTACHMENT_COUNT; i++) { + if (drawable->texture_mask & (1 << i)) { + statts[count++] = i; + } + } + statts[count++] = statt; + + drawable->texture_stamp = drawable->dPriv->lastStamp - 1; + + /* this calles into the manager */ + drawable->base.validate(&drawable->base, statts, count, NULL); +} + +/** + * Get the format and binding of an attachment. + */ +void +dri_drawable_get_format(struct dri_drawable *drawable, + enum st_attachment_type statt, + enum pipe_format *format, + unsigned *bind) +{ + switch (statt) { + case ST_ATTACHMENT_FRONT_LEFT: + case ST_ATTACHMENT_BACK_LEFT: + case ST_ATTACHMENT_FRONT_RIGHT: + case ST_ATTACHMENT_BACK_RIGHT: + *format = drawable->stvis.color_format; + *bind = PIPE_BIND_RENDER_TARGET | PIPE_BIND_SAMPLER_VIEW; + break; + case ST_ATTACHMENT_DEPTH_STENCIL: + *format = drawable->stvis.depth_stencil_format; + *bind = PIPE_BIND_DEPTH_STENCIL; /* XXX sampler? */ + break; + default: + *format = PIPE_FORMAT_NONE; + *bind = 0; + break; + } +} + /* vim: set sw=3 ts=8 sts=3 expandtab: */ diff --git a/src/gallium/state_trackers/dri/common/dri_drawable.h b/src/gallium/state_trackers/dri/common/dri_drawable.h index 315b7781654..5fd650ac88e 100644 --- a/src/gallium/state_trackers/dri/common/dri_drawable.h +++ b/src/gallium/state_trackers/dri/common/dri_drawable.h @@ -42,14 +42,13 @@ struct dri_context; struct dri_drawable { + struct st_framebuffer_iface base; + struct st_visual stvis; + /* dri */ __DRIdrawable *dPriv; __DRIscreen *sPriv; - /* gallium */ - struct st_framebuffer_iface *stfb; - struct st_visual stvis; - __DRIbuffer old[8]; unsigned old_num; unsigned old_w; @@ -84,6 +83,16 @@ dri_create_buffer(__DRIscreen * sPriv, void dri_destroy_buffer(__DRIdrawable * dPriv); +void +dri_drawable_get_format(struct dri_drawable *drawable, + enum st_attachment_type statt, + enum pipe_format *format, + unsigned *bind); + +void +dri_drawable_validate_att(struct dri_drawable *drawable, + enum st_attachment_type statt); + #endif /* vim: set sw=3 ts=8 sts=3 expandtab: */ diff --git a/src/gallium/state_trackers/dri/common/dri_screen.c b/src/gallium/state_trackers/dri/common/dri_screen.c index 4bfbc6e80b7..064c73f54c2 100644 --- a/src/gallium/state_trackers/dri/common/dri_screen.c +++ b/src/gallium/state_trackers/dri/common/dri_screen.c @@ -38,7 +38,6 @@ #include "dri_screen.h" #include "dri_context.h" #include "dri_drawable.h" -#include "dri_st_api.h" #include "dri1_helper.h" #ifndef __NOT_HAVE_DRM_H #include "dri1.h" @@ -50,6 +49,7 @@ #include "util/u_inlines.h" #include "pipe/p_screen.h" #include "pipe/p_format.h" +#include "state_tracker/st_gl_api.h" /* for st_gl_api_create */ #include "util/u_debug.h" @@ -79,7 +79,7 @@ dri_fill_in_modes(struct dri_screen *screen, unsigned depth_buffer_factor; unsigned back_buffer_factor; unsigned msaa_samples_factor; - struct pipe_screen *p_screen = screen->pipe_screen; + struct pipe_screen *p_screen = screen->base.screen; boolean pf_r5g6b5, pf_a8r8g8b8, pf_x8r8g8b8; boolean pf_z16, pf_x8z24, pf_z24x8, pf_s8z24, pf_z24s8, pf_z32; @@ -283,6 +283,31 @@ dri_get_swap_info(__DRIdrawable * dPriv, __DRIswapInfo * sInfo) #endif +static boolean +dri_get_egl_image(struct st_manager *smapi, + struct st_egl_image *stimg) +{ + struct dri_context *ctx = + (struct dri_context *)stimg->stctxi->st_manager_private; + struct dri_screen *screen = dri_screen(ctx->sPriv); + __DRIimage *img = NULL; + + if (screen->lookup_egl_image) { + img = screen->lookup_egl_image(ctx, stimg->egl_image); + } + + if (!img) + return FALSE; + + stimg->texture = NULL; + pipe_resource_reference(&stimg->texture, img->texture); + stimg->face = img->face; + stimg->level = img->level; + stimg->zslice = img->zslice; + + return TRUE; +} + static void dri_destroy_option_cache(struct dri_screen * screen) { @@ -304,11 +329,11 @@ dri_destroy_screen_helper(struct dri_screen * screen) { dri1_destroy_pipe_context(screen); - if (screen->smapi) - dri_destroy_st_manager(screen->smapi); + if (screen->st_api && screen->st_api->destroy) + screen->st_api->destroy(screen->st_api); - if (screen->pipe_screen) - screen->pipe_screen->destroy(screen->pipe_screen); + if (screen->base.screen) + screen->base.screen->destroy(screen->base.screen); dri_destroy_option_cache(screen); } @@ -330,14 +355,16 @@ dri_init_screen_helper(struct dri_screen *screen, struct pipe_screen *pscreen, unsigned pixel_bits) { - screen->pipe_screen = pscreen; - if (!screen->pipe_screen) { + screen->base.screen = pscreen; + if (!screen->base.screen) { debug_printf("%s: failed to create pipe_screen\n", __FUNCTION__); return NULL; } - screen->smapi = dri_create_st_manager(screen); - if (!screen->smapi) + screen->base.get_egl_image = dri_get_egl_image; + screen->st_api = st_gl_api_create(); + + if (!screen->st_api) return NULL; driParseOptionInfo(&screen->optionCache, diff --git a/src/gallium/state_trackers/dri/common/dri_screen.h b/src/gallium/state_trackers/dri/common/dri_screen.h index 8ab7d439191..1740fa8f426 100644 --- a/src/gallium/state_trackers/dri/common/dri_screen.h +++ b/src/gallium/state_trackers/dri/common/dri_screen.h @@ -41,8 +41,15 @@ #include "state_tracker/st_api.h" #include "state_tracker/drm_api.h" +struct dri_context; +struct dri_drawable; + struct dri_screen { + /* st_api */ + struct st_manager base; + struct st_api *st_api; + /* dri */ __DRIscreen *sPriv; @@ -55,16 +62,21 @@ struct dri_screen int fd; drmLock *drmLock; + /* hooks filled in by dri1, dri2 & drisw */ + __DRIimage * (*lookup_egl_image)(struct dri_context *ctx, void *handle); + void (*allocate_textures)(struct dri_drawable *drawable, + const enum st_attachment_type *statts, + unsigned count); + void (*update_drawable_info)(struct dri_drawable *drawable); + void (*flush_frontbuffer)(struct dri_drawable *drawable, + enum st_attachment_type statt); + /* gallium */ struct drm_api *api; - struct pipe_winsys *pipe_winsys; - struct pipe_screen *pipe_screen; boolean d_depth_bits_last; boolean sd_depth_bits_last; boolean auto_fake_front; - struct st_manager *smapi; - /* used only by DRI1 */ struct pipe_context *dri1_pipe; }; @@ -76,6 +88,15 @@ dri_screen(__DRIscreen * sPriv) return (struct dri_screen *)sPriv->private; } +struct __DRIimageRec { + struct pipe_resource *texture; + unsigned face; + unsigned level; + unsigned zslice; + + void *loader_private; +}; + #ifndef __NOT_HAVE_DRM_H static INLINE boolean diff --git a/src/gallium/state_trackers/dri/common/dri_st_api.c b/src/gallium/state_trackers/dri/common/dri_st_api.c deleted file mode 100644 index 261bae75a28..00000000000 --- a/src/gallium/state_trackers/dri/common/dri_st_api.c +++ /dev/null @@ -1,289 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 7.9 - * - * Copyright (C) 2010 LunarG Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Authors: - * Chia-I Wu <[email protected]> - */ - -#include "util/u_memory.h" -#include "util/u_inlines.h" -#include "util/u_format.h" -#include "util/u_debug.h" -#include "state_tracker/st_manager.h" /* for st_manager_create_api */ - -#include "dri_screen.h" -#include "dri_context.h" -#include "dri_drawable.h" -#include "dri_st_api.h" -#ifndef __NOT_HAVE_DRM_H -#include "dri1.h" -#include "dri2.h" -#else -#include "drisw.h" -#endif - -static boolean -dri_st_framebuffer_validate(struct st_framebuffer_iface *stfbi, - const enum st_attachment_type *statts, - unsigned count, - struct pipe_resource **out) -{ - struct dri_drawable *drawable = - (struct dri_drawable *) stfbi->st_manager_private; - unsigned statt_mask, new_mask; - boolean new_stamp; - int i; - - statt_mask = 0x0; - for (i = 0; i < count; i++) - statt_mask |= (1 << statts[i]); - - /* record newly allocated textures */ - new_mask = (statt_mask & ~drawable->texture_mask); - - /* - * dPriv->pStamp is the server stamp. It should be accessed with a lock, at - * least for DRI1. dPriv->lastStamp is the client stamp. It has the value - * of the server stamp when last checked. - */ - new_stamp = (drawable->texture_stamp != drawable->dPriv->lastStamp); - - if (new_stamp || new_mask) { - -#ifndef __NOT_HAVE_DRM_H - if (__dri1_api_hooks) { - dri1_allocate_textures(drawable, statt_mask); - } - else { - dri2_allocate_textures(drawable, statts, count); - } -#else - if (new_stamp) - drisw_update_drawable_info(drawable); - - drisw_allocate_textures(drawable, statt_mask); -#endif - - /* add existing textures */ - for (i = 0; i < ST_ATTACHMENT_COUNT; i++) { - if (drawable->textures[i]) - statt_mask |= (1 << i); - } - - drawable->texture_stamp = drawable->dPriv->lastStamp; - drawable->texture_mask = statt_mask; - } - - if (!out) - return TRUE; - - for (i = 0; i < count; i++) { - out[i] = NULL; - pipe_resource_reference(&out[i], drawable->textures[statts[i]]); - } - - return TRUE; -} - -static boolean -dri_st_framebuffer_flush_front(struct st_framebuffer_iface *stfbi, - enum st_attachment_type statt) -{ - struct dri_drawable *drawable = - (struct dri_drawable *) stfbi->st_manager_private; - -#ifndef __NOT_HAVE_DRM_H - if (__dri1_api_hooks) { - dri1_flush_frontbuffer(drawable, statt); - } - else { - dri2_flush_frontbuffer(drawable, statt); - } -#else - drisw_flush_frontbuffer(drawable, statt); -#endif - - return TRUE; -} - -/** - * Create a framebuffer from the given drawable. - */ -struct st_framebuffer_iface * -dri_create_st_framebuffer(struct dri_drawable *drawable) -{ - struct st_framebuffer_iface *stfbi; - - stfbi = CALLOC_STRUCT(st_framebuffer_iface); - if (stfbi) { - stfbi->visual = &drawable->stvis; - stfbi->flush_front = dri_st_framebuffer_flush_front; - stfbi->validate = dri_st_framebuffer_validate; - stfbi->st_manager_private = (void *) drawable; - } - - return stfbi; -} - -/** - * Destroy a framebuffer. - */ -void -dri_destroy_st_framebuffer(struct st_framebuffer_iface *stfbi) -{ - struct dri_drawable *drawable = - (struct dri_drawable *) stfbi->st_manager_private; - int i; - - for (i = 0; i < ST_ATTACHMENT_COUNT; i++) - pipe_resource_reference(&drawable->textures[i], NULL); - - FREE(stfbi); -} - -/** - * Validate the texture at an attachment. Allocate the texture if it does not - * exist. - */ -void -dri_st_framebuffer_validate_att(struct st_framebuffer_iface *stfbi, - enum st_attachment_type statt) -{ - struct dri_drawable *drawable = - (struct dri_drawable *) stfbi->st_manager_private; - enum st_attachment_type statts[ST_ATTACHMENT_COUNT]; - unsigned i, count = 0; - - /* check if buffer already exists */ - if (drawable->texture_mask & (1 << statt)) - return; - - /* make sure DRI2 does not destroy existing buffers */ - for (i = 0; i < ST_ATTACHMENT_COUNT; i++) { - if (drawable->texture_mask & (1 << i)) { - statts[count++] = i; - } - } - statts[count++] = statt; - - drawable->texture_stamp = drawable->dPriv->lastStamp - 1; - - stfbi->validate(stfbi, statts, count, NULL); -} - -/** - * Reference counted st_api. - */ -static struct { - int32_t refcnt; - struct st_api *stapi; -} dri_st_api; - -/** - * Add a reference to the st_api of the state tracker. - */ -static void -_dri_get_st_api(void) -{ - p_atomic_inc(&dri_st_api.refcnt); - if (p_atomic_read(&dri_st_api.refcnt) == 1) - dri_st_api.stapi = st_manager_create_api(); -} - -/** - * Remove a reference to the st_api of the state tracker. - */ -static void -_dri_put_st_api(void) -{ - struct st_api *stapi = dri_st_api.stapi; - - if (p_atomic_dec_zero(&dri_st_api.refcnt)) { - stapi->destroy(dri_st_api.stapi); - dri_st_api.stapi = NULL; - } -} - -static boolean -dri_st_manager_get_egl_image(struct st_manager *smapi, - struct st_egl_image *stimg) -{ - __DRIimage *img = NULL; - -#ifndef __NOT_HAVE_DRM_H - if (!__dri1_api_hooks) { - struct dri_context *ctx = (struct dri_context *) - stimg->stctxi->st_manager_private; - img = dri2_lookup_egl_image(ctx, stimg->egl_image); - } -#endif - if (!img) - return FALSE; - - stimg->texture = NULL; - pipe_resource_reference(&stimg->texture, img->texture); - stimg->face = img->face; - stimg->level = img->level; - stimg->zslice = img->zslice; - - return TRUE; -} - -/** - * Create a state tracker manager from the given screen. - */ -struct st_manager * -dri_create_st_manager(struct dri_screen *screen) -{ - struct st_manager *smapi; - - smapi = CALLOC_STRUCT(st_manager); - if (smapi) { - smapi->screen = screen->pipe_screen; - smapi->get_egl_image = dri_st_manager_get_egl_image; - _dri_get_st_api(); - } - - return smapi; -} - -/** - * Destroy a state tracker manager. - */ -void -dri_destroy_st_manager(struct st_manager *smapi) -{ - _dri_put_st_api(); - FREE(smapi); -} - -/** - * Return the st_api of OpenGL state tracker. - */ -struct st_api * -dri_get_st_api(void) -{ - assert(dri_st_api.stapi); - return dri_st_api.stapi; -} diff --git a/src/gallium/state_trackers/dri/common/dri_st_api.h b/src/gallium/state_trackers/dri/common/dri_st_api.h deleted file mode 100644 index 11d86cfbdf7..00000000000 --- a/src/gallium/state_trackers/dri/common/dri_st_api.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Mesa 3-D graphics library - * Version: 7.9 - * - * Copyright (C) 2010 LunarG Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * Authors: - * Chia-I Wu <[email protected]> - */ - -#ifndef _DRI_ST_API_H_ -#define _DRI_ST_API_H_ - -#include "state_tracker/st_api.h" - -struct dri_screen; -struct dri_drawable; - -struct __DRIimageRec { - struct pipe_resource *texture; - unsigned face; - unsigned level; - unsigned zslice; - - void *loader_private; -}; - -struct st_api * -dri_get_st_api(void); - -struct st_manager * -dri_create_st_manager(struct dri_screen *screen); - -void -dri_destroy_st_manager(struct st_manager *smapi); - -struct st_framebuffer_iface * -dri_create_st_framebuffer(struct dri_drawable *drawable); - -void -dri_destroy_st_framebuffer(struct st_framebuffer_iface *stfbi); - -void -dri_st_framebuffer_validate_att(struct st_framebuffer_iface *stfbi, - enum st_attachment_type statt); - -#endif /* _DRI_ST_API_H_ */ diff --git a/src/gallium/state_trackers/dri/drm/Makefile b/src/gallium/state_trackers/dri/drm/Makefile index 7a236da0c0f..d9a973e3c3e 100644 --- a/src/gallium/state_trackers/dri/drm/Makefile +++ b/src/gallium/state_trackers/dri/drm/Makefile @@ -16,7 +16,6 @@ C_SOURCES = \ dri_context.c \ dri_screen.c \ dri_drawable.c \ - dri_st_api.c \ dri1_helper.c \ dri1.c \ dri2.c diff --git a/src/gallium/state_trackers/dri/drm/SConscript b/src/gallium/state_trackers/dri/drm/SConscript index 1dfaa402f2d..8800b655343 100644 --- a/src/gallium/state_trackers/dri/drm/SConscript +++ b/src/gallium/state_trackers/dri/drm/SConscript @@ -20,7 +20,6 @@ if env['dri']: source = [ 'dri_context.c', 'dri_drawable.c', 'dri_screen.c', - 'dri_st_api.c', 'dri1_helper.c', 'dri1.c', 'dri2.c', diff --git a/src/gallium/state_trackers/dri/drm/dri1.c b/src/gallium/state_trackers/dri/drm/dri1.c index e216e46a87e..23c21ed8398 100644 --- a/src/gallium/state_trackers/dri/drm/dri1.c +++ b/src/gallium/state_trackers/dri/drm/dri1.c @@ -104,13 +104,13 @@ dri1_propagate_drawable_change(struct dri_context *ctx) if (dPriv && draw->texture_stamp != dPriv->lastStamp) { ctx->st->flush(ctx->st, PIPE_FLUSH_RENDER_CACHE, NULL); flushed = TRUE; - ctx->st->notify_invalid_framebuffer(ctx->st, draw->stfb); + ctx->st->notify_invalid_framebuffer(ctx->st, &draw->base); } if (rPriv && dPriv != rPriv && read->texture_stamp != rPriv->lastStamp) { if (!flushed) ctx->st->flush(ctx->st, PIPE_FLUSH_RENDER_CACHE, NULL); - ctx->st->notify_invalid_framebuffer(ctx->st, read->stfb); + ctx->st->notify_invalid_framebuffer(ctx->st, &read->base); } } @@ -253,13 +253,13 @@ dri1_copy_to_front(struct dri_context *ctx, * Backend functions for st_framebuffer interface and swap_buffers. */ -void +static void dri1_flush_frontbuffer(struct dri_drawable *draw, enum st_attachment_type statt) { - struct dri_context *ctx = dri_get_current(); + struct dri_context *ctx = dri_get_current(draw->sPriv); struct dri_screen *screen = dri_screen(draw->sPriv); - struct pipe_screen *pipe_screen = screen->pipe_screen; + struct pipe_screen *pipe_screen = screen->base.screen; struct pipe_fence_handle *dummy_fence; struct pipe_resource *ptex; @@ -280,10 +280,10 @@ dri1_flush_frontbuffer(struct dri_drawable *draw, void dri1_swap_buffers(__DRIdrawable * dPriv) { - struct dri_context *ctx = dri_get_current(); struct dri_drawable *draw = dri_drawable(dPriv); + struct dri_context *ctx = dri_get_current(draw->sPriv); struct dri_screen *screen = dri_screen(draw->sPriv); - struct pipe_screen *pipe_screen = screen->pipe_screen; + struct pipe_screen *pipe_screen = screen->base.screen; struct pipe_fence_handle *fence; struct pipe_resource *ptex; @@ -309,9 +309,9 @@ dri1_swap_buffers(__DRIdrawable * dPriv) void dri1_copy_sub_buffer(__DRIdrawable * dPriv, int x, int y, int w, int h) { - struct dri_context *ctx = dri_get_current(); + struct dri_context *ctx = dri_get_current(dPriv->driScreenPriv); struct dri_screen *screen = dri_screen(dPriv->driScreenPriv); - struct pipe_screen *pipe_screen = screen->pipe_screen; + struct pipe_screen *pipe_screen = screen->base.screen; struct drm_clip_rect sub_bbox; struct dri_drawable *draw = dri_drawable(dPriv); struct pipe_fence_handle *dummy_fence; @@ -342,9 +342,10 @@ dri1_copy_sub_buffer(__DRIdrawable * dPriv, int x, int y, int w, int h) * as they are requested. Unused attachments are not removed, not until the * framebuffer is resized or destroyed. */ -void +static void dri1_allocate_textures(struct dri_drawable *drawable, - unsigned mask) + const enum st_attachment_type *statts, + unsigned count) { struct dri_screen *screen = dri_screen(drawable->sPriv); struct pipe_resource templ; @@ -371,40 +372,24 @@ dri1_allocate_textures(struct dri_drawable *drawable, templ.depth0 = 1; templ.last_level = 0; - for (i = 0; i < ST_ATTACHMENT_COUNT; i++) { + for (i = 0; i < count; i++) { enum pipe_format format; - unsigned tex_usage; + unsigned bind; - /* the texture already exists or not requested */ - if (drawable->textures[i] || !(mask & (1 << i))) { + /* the texture already exists */ + if (drawable->textures[statts[i]]) continue; - } - switch (i) { - case ST_ATTACHMENT_FRONT_LEFT: - case ST_ATTACHMENT_BACK_LEFT: - case ST_ATTACHMENT_FRONT_RIGHT: - case ST_ATTACHMENT_BACK_RIGHT: - format = drawable->stvis.color_format; - tex_usage = PIPE_BIND_DISPLAY_TARGET | - PIPE_BIND_RENDER_TARGET; - break; - case ST_ATTACHMENT_DEPTH_STENCIL: - format = drawable->stvis.depth_stencil_format; - tex_usage = PIPE_BIND_DEPTH_STENCIL; - break; - default: - format = PIPE_FORMAT_NONE; - break; - } + dri_drawable_get_format(drawable, statts[i], &format, &bind); + + if (format == PIPE_FORMAT_NONE) + continue; - if (format != PIPE_FORMAT_NONE) { - templ.format = format; - templ.bind = tex_usage; + templ.format = format; + templ.bind = bind; - drawable->textures[i] = - screen->pipe_screen->resource_create(screen->pipe_screen, &templ); - } + drawable->textures[statts[i]] = + screen->base.screen->resource_create(screen->base.screen, &templ); } drawable->old_w = width; @@ -489,6 +474,8 @@ dri1_init_screen(__DRIscreen * sPriv) screen->sPriv = sPriv; screen->fd = sPriv->fd; screen->drmLock = (drmLock *) & sPriv->pSAREA->lock; + screen->allocate_textures = dri1_allocate_textures; + screen->flush_frontbuffer = dri1_flush_frontbuffer; sPriv->private = (void *)screen; sPriv->extensions = dri1_screen_extensions; diff --git a/src/gallium/state_trackers/dri/drm/dri1.h b/src/gallium/state_trackers/dri/drm/dri1.h index f7441f98abc..a50188b3682 100644 --- a/src/gallium/state_trackers/dri/drm/dri1.h +++ b/src/gallium/state_trackers/dri/drm/dri1.h @@ -43,14 +43,6 @@ extern struct dri1_api *__dri1_api_hooks; const __DRIconfig ** dri1_init_screen(__DRIscreen * sPriv); -void -dri1_flush_frontbuffer(struct dri_drawable *drawable, - enum st_attachment_type statt); - -void -dri1_allocate_textures(struct dri_drawable *drawable, - unsigned mask); - void dri1_swap_buffers(__DRIdrawable * dPriv); void diff --git a/src/gallium/state_trackers/dri/drm/dri2.c b/src/gallium/state_trackers/dri/drm/dri2.c index 0d15b5c9b85..e1216f14c0e 100644 --- a/src/gallium/state_trackers/dri/drm/dri2.c +++ b/src/gallium/state_trackers/dri/drm/dri2.c @@ -38,9 +38,10 @@ #include "dri_screen.h" #include "dri_context.h" #include "dri_drawable.h" -#include "dri_st_api.h" #include "dri2.h" +#include "GL/internal/dri_interface.h" + /** * DRI2 flush extension. */ @@ -59,7 +60,7 @@ dri2_invalidate_drawable(__DRIdrawable *dPriv) drawable->dPriv->lastStamp = *drawable->dPriv->pStamp; if (ctx) - ctx->st->notify_invalid_framebuffer(ctx->st, drawable->stfb); + ctx->st->notify_invalid_framebuffer(ctx->st, &drawable->base); } static const __DRI2flushExtension dri2FlushExtension = { @@ -79,7 +80,7 @@ dri2_set_tex_buffer2(__DRIcontext *pDRICtx, GLint target, struct dri_drawable *drawable = dri_drawable(dPriv); struct pipe_resource *pt; - dri_st_framebuffer_validate_att(drawable->stfb, ST_ATTACHMENT_FRONT_LEFT); + dri_drawable_validate_att(drawable, ST_ATTACHMENT_FRONT_LEFT); pt = drawable->textures[ST_ATTACHMENT_FRONT_LEFT]; @@ -120,30 +121,31 @@ static const __DRItexBufferExtension dri2TexBufferExtension = { }; /** - * Get the format of an attachment. + * Get the format and binding of an attachment. */ -static INLINE enum pipe_format +static INLINE void dri2_drawable_get_format(struct dri_drawable *drawable, - enum st_attachment_type statt) + enum st_attachment_type statt, + enum pipe_format *format, + unsigned *bind) { - enum pipe_format format; - switch (statt) { case ST_ATTACHMENT_FRONT_LEFT: case ST_ATTACHMENT_BACK_LEFT: case ST_ATTACHMENT_FRONT_RIGHT: case ST_ATTACHMENT_BACK_RIGHT: - format = drawable->stvis.color_format; + *format = drawable->stvis.color_format; + *bind = PIPE_BIND_RENDER_TARGET | PIPE_BIND_SAMPLER_VIEW; break; case ST_ATTACHMENT_DEPTH_STENCIL: - format = drawable->stvis.depth_stencil_format; + *format = drawable->stvis.depth_stencil_format; + *bind = PIPE_BIND_DEPTH_STENCIL; /* XXX sampler? */ break; default: - format = PIPE_FORMAT_NONE; + *format = PIPE_FORMAT_NONE; + *bind = 0; break; } - - return format; } @@ -174,9 +176,10 @@ dri2_drawable_get_buffers(struct dri_drawable *drawable, for (i = 0; i < *count; i++) { enum pipe_format format; + unsigned bind; int att, bpp; - format = dri2_drawable_get_format(drawable, statts[i]); + dri2_drawable_get_format(drawable, statts[i], &format, &bind); if (format == PIPE_FORMAT_NONE) continue; @@ -263,7 +266,7 @@ dri2_drawable_process_buffers(struct dri_drawable *drawable, struct pipe_resource templ; struct winsys_handle whandle; boolean have_depth = FALSE; - unsigned i; + unsigned i, bind; if (drawable->old_num == count && drawable->old_w == dri_drawable->w && @@ -275,7 +278,6 @@ dri2_drawable_process_buffers(struct dri_drawable *drawable, pipe_resource_reference(&drawable->textures[i], NULL); memset(&templ, 0, sizeof(templ)); - templ.bind = PIPE_BIND_RENDER_TARGET; templ.target = PIPE_TEXTURE_2D; templ.last_level = 0; templ.width0 = dri_drawable->w; @@ -319,16 +321,17 @@ dri2_drawable_process_buffers(struct dri_drawable *drawable, break; } - format = dri2_drawable_get_format(drawable, statt); + dri2_drawable_get_format(drawable, statt, &format, &bind); if (statt == ST_ATTACHMENT_INVALID || format == PIPE_FORMAT_NONE) continue; templ.format = format; + templ.bind = bind; whandle.handle = buf->name; whandle.stride = buf->pitch; drawable->textures[statt] = - screen->pipe_screen->resource_from_handle(screen->pipe_screen, + screen->base.screen->resource_from_handle(screen->base.screen, &templ, &whandle); } @@ -342,7 +345,7 @@ dri2_drawable_process_buffers(struct dri_drawable *drawable, * Backend functions for st_framebuffer interface. */ -void +static void dri2_allocate_textures(struct dri_drawable *drawable, const enum st_attachment_type *statts, unsigned count) @@ -354,7 +357,7 @@ dri2_allocate_textures(struct dri_drawable *drawable, dri2_drawable_process_buffers(drawable, buffers, num_buffers); } -void +static void dri2_flush_frontbuffer(struct dri_drawable *drawable, enum st_attachment_type statt) { @@ -369,7 +372,7 @@ dri2_flush_frontbuffer(struct dri_drawable *drawable, } } -__DRIimage * +static __DRIimage * dri2_lookup_egl_image(struct dri_context *ctx, void *handle) { __DRIimageLookupExtension *loader = ctx->sPriv->dri2.image; @@ -431,7 +434,7 @@ dri2_create_image_from_name(__DRIcontext *context, whandle.handle = name; whandle.stride = pitch * util_format_get_blocksize(pf); - img->texture = screen->pipe_screen->resource_from_handle(screen->pipe_screen, + img->texture = screen->base.screen->resource_from_handle(screen->base.screen, &templ, &whandle); if (!img->texture) { FREE(img); @@ -508,6 +511,9 @@ dri2_init_screen(__DRIscreen * sPriv) screen->api = drm_api_create(); screen->sPriv = sPriv; screen->fd = sPriv->fd; + screen->lookup_egl_image = dri2_lookup_egl_image; + screen->allocate_textures = dri2_allocate_textures; + screen->flush_frontbuffer = dri2_flush_frontbuffer; sPriv->private = (void *)screen; sPriv->extensions = dri_screen_extensions; diff --git a/src/gallium/state_trackers/dri/drm/dri2.h b/src/gallium/state_trackers/dri/drm/dri2.h index 5b28850000b..07adfe4f6c5 100644 --- a/src/gallium/state_trackers/dri/drm/dri2.h +++ b/src/gallium/state_trackers/dri/drm/dri2.h @@ -34,16 +34,4 @@ const __DRIconfig ** dri2_init_screen(__DRIscreen * sPriv); -void -dri2_flush_frontbuffer(struct dri_drawable *drawable, - enum st_attachment_type statt); - -void -dri2_allocate_textures(struct dri_drawable *drawable, - const enum st_attachment_type *statts, - unsigned count); - -__DRIimage * -dri2_lookup_egl_image(struct dri_context *ctx, void *handle); - #endif /* DRI2_H */ diff --git a/src/gallium/state_trackers/dri/drm/dri_st_api.c b/src/gallium/state_trackers/dri/drm/dri_st_api.c deleted file mode 120000 index a8f6bd06b09..00000000000 --- a/src/gallium/state_trackers/dri/drm/dri_st_api.c +++ /dev/null @@ -1 +0,0 @@ -../common/dri_st_api.c
\ No newline at end of file diff --git a/src/gallium/state_trackers/dri/sw/Makefile b/src/gallium/state_trackers/dri/sw/Makefile index 18d7aabd9f0..c0ae71451b2 100644 --- a/src/gallium/state_trackers/dri/sw/Makefile +++ b/src/gallium/state_trackers/dri/sw/Makefile @@ -19,7 +19,6 @@ C_SOURCES = \ dri_context.c \ dri_screen.c \ dri_drawable.c \ - dri_st_api.c \ dri1_helper.c \ drisw.c diff --git a/src/gallium/state_trackers/dri/sw/SConscript b/src/gallium/state_trackers/dri/sw/SConscript index c97124c8310..6bb282d1a4c 100644 --- a/src/gallium/state_trackers/dri/sw/SConscript +++ b/src/gallium/state_trackers/dri/sw/SConscript @@ -20,7 +20,6 @@ if env['dri']: source = [ 'dri_context.c', 'dri_drawable.c', 'dri_screen.c', - 'dri_st_api.c', 'dri1_helper.c', 'drisw.c', ] diff --git a/src/gallium/state_trackers/dri/sw/dri_st_api.c b/src/gallium/state_trackers/dri/sw/dri_st_api.c deleted file mode 120000 index a8f6bd06b09..00000000000 --- a/src/gallium/state_trackers/dri/sw/dri_st_api.c +++ /dev/null @@ -1 +0,0 @@ -../common/dri_st_api.c
\ No newline at end of file diff --git a/src/gallium/state_trackers/dri/sw/drisw.c b/src/gallium/state_trackers/dri/sw/drisw.c index 9edddf01b57..dcf645593fb 100644 --- a/src/gallium/state_trackers/dri/sw/drisw.c +++ b/src/gallium/state_trackers/dri/sw/drisw.c @@ -70,7 +70,7 @@ put_image(__DRIdrawable *dPriv, void *data, unsigned width, unsigned height) data, dPriv->loaderPrivate); } -void +static void drisw_update_drawable_info(struct dri_drawable *drawable) { __DRIdrawable *dPriv = drawable->dPriv; @@ -99,20 +99,20 @@ drisw_present_texture(__DRIdrawable *dPriv, if (!psurf) return; - screen->pipe_screen->flush_frontbuffer(screen->pipe_screen, psurf, drawable); + screen->base.screen->flush_frontbuffer(screen->base.screen, psurf, drawable); } static INLINE void drisw_invalidate_drawable(__DRIdrawable *dPriv) { - struct dri_context *ctx = dri_get_current(); + struct dri_context *ctx = dri_get_current(dPriv->driScreenPriv); struct dri_drawable *drawable = dri_drawable(dPriv); drawable->texture_stamp = dPriv->lastStamp - 1; /* check if swapping currently bound buffer */ if (ctx && ctx->dPriv == dPriv) - ctx->st->notify_invalid_framebuffer(ctx->st, drawable->stfb); + ctx->st->notify_invalid_framebuffer(ctx->st, &drawable->base); } static INLINE void @@ -131,7 +131,7 @@ drisw_copy_to_front(__DRIdrawable * dPriv, void drisw_swap_buffers(__DRIdrawable *dPriv) { - struct dri_context *ctx = dri_get_current(); + struct dri_context *ctx = dri_get_current(dPriv->driScreenPriv); struct dri_drawable *drawable = dri_drawable(dPriv); struct pipe_resource *ptex; @@ -147,11 +147,11 @@ drisw_swap_buffers(__DRIdrawable *dPriv) } } -void +static void drisw_flush_frontbuffer(struct dri_drawable *drawable, enum st_attachment_type statt) { - struct dri_context *ctx = dri_get_current(); + struct dri_context *ctx = dri_get_current(drawable->sPriv); struct pipe_resource *ptex; if (!ctx) @@ -175,9 +175,10 @@ drisw_flush_frontbuffer(struct dri_drawable *drawable, * seems a better seperation and safer for each DRI version to provide its own * function. */ -void +static void drisw_allocate_textures(struct dri_drawable *drawable, - unsigned mask) + const enum st_attachment_type *statts, + unsigned count) { struct dri_screen *screen = dri_screen(drawable->sPriv); struct pipe_resource templ; @@ -206,38 +207,25 @@ drisw_allocate_textures(struct dri_drawable *drawable, for (i = 0; i < ST_ATTACHMENT_COUNT; i++) { enum pipe_format format; - unsigned tex_usage; + unsigned bind; /* the texture already exists or not requested */ - if (drawable->textures[i] || !(mask & (1 << i))) { + if (drawable->textures[statts[i]]) continue; - } - - switch (i) { - case ST_ATTACHMENT_FRONT_LEFT: - case ST_ATTACHMENT_BACK_LEFT: - case ST_ATTACHMENT_FRONT_RIGHT: - case ST_ATTACHMENT_BACK_RIGHT: - format = drawable->stvis.color_format; - tex_usage = PIPE_BIND_DISPLAY_TARGET | - PIPE_BIND_RENDER_TARGET; - break; - case ST_ATTACHMENT_DEPTH_STENCIL: - format = drawable->stvis.depth_stencil_format; - tex_usage = PIPE_BIND_DEPTH_STENCIL; - break; - default: - format = PIPE_FORMAT_NONE; - break; - } - - if (format != PIPE_FORMAT_NONE) { - templ.format = format; - templ.bind = tex_usage; - - drawable->textures[i] = - screen->pipe_screen->resource_create(screen->pipe_screen, &templ); - } + + dri_drawable_get_format(drawable, statts[i], &format, &bind); + + if (statts[i] != ST_ATTACHMENT_DEPTH_STENCIL) + bind |= PIPE_BIND_DISPLAY_TARGET; + + if (format == PIPE_FORMAT_NONE) + continue; + + templ.format = format; + templ.bind = bind; + + drawable->textures[statts[i]] = + screen->base.screen->resource_create(screen->base.screen, &templ); } drawable->old_w = width; @@ -270,6 +258,9 @@ drisw_init_screen(__DRIscreen * sPriv) screen->api = NULL; /* not needed */ screen->sPriv = sPriv; screen->fd = -1; + screen->allocate_textures = drisw_allocate_textures; + screen->update_drawable_info = drisw_update_drawable_info; + screen->flush_frontbuffer = drisw_flush_frontbuffer; sPriv->private = (void *)screen; sPriv->extensions = drisw_screen_extensions; diff --git a/src/gallium/state_trackers/dri/sw/drisw.h b/src/gallium/state_trackers/dri/sw/drisw.h index c0c874f7326..6c6c891f356 100644 --- a/src/gallium/state_trackers/dri/sw/drisw.h +++ b/src/gallium/state_trackers/dri/sw/drisw.h @@ -38,17 +38,6 @@ const __DRIconfig ** drisw_init_screen(__DRIscreen * sPriv); -void -drisw_update_drawable_info(struct dri_drawable *drawable); - -void -drisw_flush_frontbuffer(struct dri_drawable *drawable, - enum st_attachment_type statt); - -void -drisw_allocate_textures(struct dri_drawable *drawable, - unsigned mask); - void drisw_swap_buffers(__DRIdrawable * dPriv); #endif /* DRISW_H */ diff --git a/src/gallium/state_trackers/egl/common/egl_g3d_st.c b/src/gallium/state_trackers/egl/common/egl_g3d_st.c index 57a479f6bca..97445478684 100644 --- a/src/gallium/state_trackers/egl/common/egl_g3d_st.c +++ b/src/gallium/state_trackers/egl/common/egl_g3d_st.c @@ -49,41 +49,39 @@ egl_g3d_st_manager(struct st_manager *smapi) struct st_api * egl_g3d_create_st_api(enum st_api_type api) { - const char *stmod_name; struct util_dl_library *lib; - const struct st_module *mod; + const char *proc_name; + struct st_api * (*proc)(void) = NULL; switch (api) { case ST_API_OPENGL: - stmod_name = ST_MODULE_OPENGL_SYMBOL; + proc_name = ST_CREATE_OPENGL_SYMBOL; break; case ST_API_OPENGL_ES1: - stmod_name = ST_MODULE_OPENGL_ES1_SYMBOL; + proc_name = ST_CREATE_OPENGL_ES1_SYMBOL; break; case ST_API_OPENGL_ES2: - stmod_name = ST_MODULE_OPENGL_ES2_SYMBOL; + proc_name = ST_CREATE_OPENGL_ES2_SYMBOL; break; case ST_API_OPENVG: - stmod_name = ST_MODULE_OPENVG_SYMBOL; + proc_name = ST_CREATE_OPENVG_SYMBOL; break; default: - stmod_name = NULL; - break; - } - if (!stmod_name) + assert(!"Unknown API Type\n"); return NULL; + } - mod = NULL; lib = util_dl_open(NULL); if (lib) { - mod = (const struct st_module *) - util_dl_get_proc_address(lib, stmod_name); + proc = util_dl_get_proc_address(lib, proc_name); + debug_printf("%s: %s %p\n", __func__, proc_name, proc); util_dl_close(lib); } - if (!mod || mod->api != api) + + if (!proc) return NULL; - return mod->create_api(); + return proc(); } static boolean diff --git a/src/gallium/state_trackers/es/st_es1.c b/src/gallium/state_trackers/es/st_es1.c index 4e89e06b34c..825fdac2150 100644 --- a/src/gallium/state_trackers/es/st_es1.c +++ b/src/gallium/state_trackers/es/st_es1.c @@ -1,8 +1,7 @@ -#include "state_tracker/st_manager.h" +#include "state_tracker/st_gl_api.h" -PUBLIC const int st_api_OpenGL_ES1 = 1; - -PUBLIC const struct st_module st_module_OpenGL_ES1 = { - .api = ST_API_OPENGL_ES1, - .create_api = st_manager_create_api -}; +PUBLIC struct st_api * +st_api_create_OpenGL_ES1() +{ + return st_gl_api_create(); +} diff --git a/src/gallium/state_trackers/es/st_es2.c b/src/gallium/state_trackers/es/st_es2.c index 82e88b176ac..5c773aaf93b 100644 --- a/src/gallium/state_trackers/es/st_es2.c +++ b/src/gallium/state_trackers/es/st_es2.c @@ -1,8 +1,8 @@ -#include "state_tracker/st_manager.h" +#include "state_tracker/st_gl_api.h" -PUBLIC const int st_api_OpenGL_ES2 = 1; - -PUBLIC const struct st_module st_module_OpenGL_ES2 = { - .api = ST_API_OPENGL_ES2, - .create_api = st_manager_create_api -}; +PUBLIC struct st_api * +st_api_create_OpenGL_ES2() +{ + /* linker magic creates different versions */ + return st_gl_api_create(); +} diff --git a/src/gallium/state_trackers/glx/xlib/xm_st.c b/src/gallium/state_trackers/glx/xlib/xm_st.c index 294b593bf77..1c678b4f760 100644 --- a/src/gallium/state_trackers/glx/xlib/xm_st.c +++ b/src/gallium/state_trackers/glx/xlib/xm_st.c @@ -125,7 +125,7 @@ xmesa_st_framebuffer_copy_textures(struct st_framebuffer_iface *stfbi, /** * Remove outdated textures and create the requested ones. */ -static void +static boolean xmesa_st_framebuffer_validate_textures(struct st_framebuffer_iface *stfbi, unsigned width, unsigned height, unsigned mask) @@ -183,12 +183,16 @@ xmesa_st_framebuffer_validate_textures(struct st_framebuffer_iface *stfbi, xstfb->textures[i] = xstfb->screen->resource_create(xstfb->screen, &templ); + if (!xstfb->textures[i]) + return FALSE; } } xstfb->texture_width = width; xstfb->texture_height = height; xstfb->texture_mask = mask; + + return TRUE; } static boolean @@ -200,6 +204,7 @@ xmesa_st_framebuffer_validate(struct st_framebuffer_iface *stfbi, struct xmesa_st_framebuffer *xstfb = xmesa_st_framebuffer(stfbi); unsigned statt_mask, new_mask, i; boolean resized; + boolean ret; statt_mask = 0x0; for (i = 0; i < count; i++) @@ -212,8 +217,10 @@ xmesa_st_framebuffer_validate(struct st_framebuffer_iface *stfbi, /* revalidate textures */ if (resized || new_mask) { - xmesa_st_framebuffer_validate_textures(stfbi, - xstfb->buffer->width, xstfb->buffer->height, statt_mask); + ret = xmesa_st_framebuffer_validate_textures(stfbi, + xstfb->buffer->width, xstfb->buffer->height, statt_mask); + if (!ret) + return ret; if (!resized) { enum st_attachment_type back, front; diff --git a/src/gallium/state_trackers/vega/vg_manager.c b/src/gallium/state_trackers/vega/vg_manager.c index e4226754d13..aecac28e7ee 100644 --- a/src/gallium/state_trackers/vega/vg_manager.c +++ b/src/gallium/state_trackers/vega/vg_manager.c @@ -546,26 +546,17 @@ vg_api_destroy(struct st_api *stapi) free(stapi); } -static struct st_api * -vg_module_create_api(void) -{ - struct st_api *stapi; - - stapi = CALLOC_STRUCT(st_api); - if (stapi) { - stapi->destroy = vg_api_destroy; - stapi->get_proc_address = vg_api_get_proc_address; - stapi->is_visual_supported = vg_api_is_visual_supported; - - stapi->create_context = vg_api_create_context; - stapi->make_current = vg_api_make_current; - stapi->get_current = vg_api_get_current; - } +struct st_api st_vg_api = { + vg_api_destroy, + vg_api_get_proc_address, + vg_api_is_visual_supported, + vg_api_create_context, + vg_api_make_current, + vg_api_get_current, +}; - return stapi; +struct st_api * +st_api_create_OpenVG(void) +{ + return &st_vg_api; } - -PUBLIC const struct st_module st_module_OpenVG = { - .api = ST_API_OPENVG, - .create_api = vg_module_create_api, -}; diff --git a/src/gallium/state_trackers/wgl/stw_st.c b/src/gallium/state_trackers/wgl/stw_st.c index f4ea61ed2c6..bcdd82e4f66 100644 --- a/src/gallium/state_trackers/wgl/stw_st.c +++ b/src/gallium/state_trackers/wgl/stw_st.c @@ -27,7 +27,7 @@ #include "util/u_memory.h" #include "util/u_inlines.h" -#include "state_tracker/st_manager.h" /* for st_manager_create_api */ +#include "state_tracker/st_gl_api.h" /* for st_gl_api_create */ #include "stw_st.h" #include "stw_device.h" @@ -308,5 +308,5 @@ stw_st_swap_framebuffer_locked(struct st_framebuffer_iface *stfb) struct st_api * stw_st_create_api(void) { - return st_manager_create_api(); + return st_gl_api_create(); } diff --git a/src/gallium/targets/Makefile.dri b/src/gallium/targets/Makefile.dri index 8efbf4e828c..3cbaf615e2f 100644 --- a/src/gallium/targets/Makefile.dri +++ b/src/gallium/targets/Makefile.dri @@ -1,5 +1,14 @@ # -*-makefile-*- +ifeq ($(MESA_LLVM),1) +DRIVER_DEFINES += -DGALLIUM_LLVMPIPE +PIPE_DRIVERS += $(TOP)/src/gallium/drivers/llvmpipe/libllvmpipe.a +LDFLAGS += $(LLVM_LDFLAGS) +LD = g++ +DRIVER_EXTRAS = $(LLVM_LIBS) +USE_CXX=1 +endif + MESA_MODULES = \ $(TOP)/src/mesa/libmesagallium.a \ $(GALLIUM_AUXILIARIES) @@ -69,7 +78,11 @@ $(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(PIPE_DRIVERS) Makefile \ $(OBJECTS) $(PIPE_DRIVERS) \ -Wl,--start-group $(MESA_MODULES) -Wl,--end-group \ $(DRI_LIB_DEPS) $(DRIVER_EXTRAS) - $(CC) $(CFLAGS) -o [email protected] $(TOP)/src/mesa/drivers/dri/common/dri_test.o [email protected] $(DRI_LIB_DEPS) + if [ "x${USE_CXX}" == "x" ]; then \ + $(CC) $(CFLAGS) -o [email protected] $(TOP)/src/mesa/drivers/dri/common/dri_test.o [email protected] $(DRI_LIB_DEPS); \ + else \ + $(CXX) $(CFLAGS) -o [email protected] $(TOP)/src/mesa/drivers/dri/common/dri_test.o [email protected] $(DRI_LIB_DEPS); \ + fi @rm -f [email protected] mv -f [email protected] $@ diff --git a/src/gallium/targets/dri-swrast/Makefile b/src/gallium/targets/dri-swrast/Makefile index fcfd690e438..3db9781c209 100644 --- a/src/gallium/targets/dri-swrast/Makefile +++ b/src/gallium/targets/dri-swrast/Makefile @@ -8,7 +8,8 @@ DRIVER_DEFINES = -D__NOT_HAVE_DRM_H -DGALLIUM_SOFTPIPE PIPE_DRIVERS = \ $(TOP)/src/gallium/state_trackers/dri/sw/libdrisw.a \ $(TOP)/src/gallium/winsys/sw/dri/libswdri.a \ - $(TOP)/src/gallium/drivers/softpipe/libsoftpipe.a + $(TOP)/src/gallium/drivers/softpipe/libsoftpipe.a \ + $(TOP)/src/gallium/drivers/trace/libtrace.a SWRAST_COMMON_GALLIUM_SOURCES = \ $(TOP)/src/mesa/drivers/dri/common/utils.c \ diff --git a/src/gallium/targets/dri-swrast/swrast_drm_api.c b/src/gallium/targets/dri-swrast/swrast_drm_api.c index e8d6d8069cc..84142be80c8 100644 --- a/src/gallium/targets/dri-swrast/swrast_drm_api.c +++ b/src/gallium/targets/dri-swrast/swrast_drm_api.c @@ -31,6 +31,7 @@ #include "state_tracker/drm_api.h" #include "state_tracker/sw_winsys.h" #include "dri_sw_winsys.h" +#include "trace/tr_public.h" /* Copied from targets/libgl-xlib */ @@ -80,7 +81,7 @@ swrast_create_screen(struct sw_winsys *winsys) screen = softpipe_create_screen( winsys ); #endif - return screen; + return trace_screen_create(screen);; } struct pipe_screen * diff --git a/src/gallium/targets/libgl-xlib/xlib.c b/src/gallium/targets/libgl-xlib/xlib.c index 48e5bdff429..69b4ddd33f7 100644 --- a/src/gallium/targets/libgl-xlib/xlib.c +++ b/src/gallium/targets/libgl-xlib/xlib.c @@ -36,15 +36,15 @@ #include "state_tracker/xlib_sw_winsys.h" #include "xm_public.h" -#include "state_tracker/st_manager.h" +#include "state_tracker/st_gl_api.h" -/* advertise OpenGL support */ -PUBLIC const int st_api_OpenGL = 1; +/* piggy back on this libGL for OpenGL support in EGL */ +struct st_api * +st_api_create_OpenGL() +{ + return st_gl_api_create(); +} -PUBLIC const struct st_module st_module_OpenGL = { - .api = ST_API_OPENGL, - .create_api = st_manager_create_api -}; /* Helper function to choose and instantiate one of the software rasterizers: * cell, llvmpipe, softpipe. @@ -151,7 +151,7 @@ fail: static struct xm_driver xlib_driver = { .create_pipe_screen = swrast_xlib_create_screen, - .create_st_api = st_manager_create_api, + .create_st_api = st_gl_api_create, }; diff --git a/src/gallium/winsys/i915/sw/i915_sw_buffer.c b/src/gallium/winsys/i915/sw/i915_sw_buffer.c index 9a27da5e1a2..df175688861 100644 --- a/src/gallium/winsys/i915/sw/i915_sw_buffer.c +++ b/src/gallium/winsys/i915/sw/i915_sw_buffer.c @@ -27,7 +27,7 @@ i915_sw_buffer_create(struct i915_winsys *iws, buf->magic = 0xDEAD1337; buf->name = name; buf->type = type; - buf->ptr = calloc(size, 1); + buf->ptr = CALLOC(size, 1); if (!buf->ptr) goto err; diff --git a/src/gallium/winsys/i965/drm/SConscript b/src/gallium/winsys/i965/drm/SConscript index 150ab19a33e..abf9aac5c01 100644 --- a/src/gallium/winsys/i965/drm/SConscript +++ b/src/gallium/winsys/i965/drm/SConscript @@ -2,6 +2,8 @@ Import('*') env = env.Clone() +env.ParseConfig('pkg-config --cflags libdrm') + i965drm_sources = [ 'i965_drm_api.c', 'i965_drm_buffer.c', diff --git a/src/gallium/winsys/radeon/drm/SConscript b/src/gallium/winsys/radeon/drm/SConscript index fab42929514..60e409fe10f 100644 --- a/src/gallium/winsys/radeon/drm/SConscript +++ b/src/gallium/winsys/radeon/drm/SConscript @@ -8,6 +8,7 @@ radeon_sources = [ 'radeon_r300.c', ] +env.ParseConfig('pkg-config --cflags libdrm_radeon') env.Append(CPPPATH = '#/src/gallium/drivers/r300') radeonwinsys = env.ConvenienceLibrary( diff --git a/src/gallium/winsys/radeon/drm/radeon_drm.c b/src/gallium/winsys/radeon/drm/radeon_drm.c index 8c22738004e..8d981b22e3d 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm.c @@ -100,8 +100,8 @@ static void do_ioctls(int fd, struct radeon_libdrm_winsys* winsys) version->version_minor >= 1; #endif - /* XXX */ - winsys->tex3d_mip_bug = TRUE; + winsys->drm_2_3_0 = version->version_major > 2 || + version->version_minor >= 3; info.request = RADEON_INFO_DEVICE_ID; retval = drmCommandWriteRead(fd, DRM_RADEON_INFO, &info, sizeof(info)); diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_buffer.c b/src/gallium/winsys/radeon/drm/radeon_drm_buffer.c index 9824ada5b33..b8366498922 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_buffer.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_buffer.c @@ -22,6 +22,8 @@ struct radeon_drm_buffer { boolean flinked; uint32_t flink; + uint32_t tileflags; + uint32_t pitch; struct radeon_drm_buffer *next, *prev; }; @@ -318,6 +320,9 @@ void radeon_drm_bufmgr_get_tiling(struct pb_buffer *_buf, radeon_bo_get_tiling(buf->bo, &flags, &pitch); + buf->tileflags = flags; + buf->pitch = pitch; + *microtiled = R300_BUFFER_LINEAR; *macrotiled = R300_BUFFER_LINEAR; if (flags & RADEON_BO_FLAGS_MICRO_TILE) @@ -333,7 +338,7 @@ void radeon_drm_bufmgr_set_tiling(struct pb_buffer *_buf, uint32_t pitch) { struct radeon_drm_buffer *buf = get_drm_buffer(_buf); - uint32_t flags = 0, old_flags, old_pitch; + uint32_t flags = 0; if (microtiled == R300_BUFFER_TILED) flags |= RADEON_BO_FLAGS_MICRO_TILE; /* XXX Remove this ifdef when libdrm version 2.4.19 becomes mandatory. */ @@ -344,17 +349,15 @@ void radeon_drm_bufmgr_set_tiling(struct pb_buffer *_buf, if (macrotiled == R300_BUFFER_TILED) flags |= RADEON_BO_FLAGS_MACRO_TILE; - radeon_bo_get_tiling(buf->bo, &old_flags, &old_pitch); - - if (flags != old_flags || pitch != old_pitch) { + if (flags != buf->tileflags || pitch != buf->pitch) { /* Tiling determines how DRM treats the buffer data. * We must flush CS when changing it if the buffer is referenced. */ if (radeon_bo_is_referenced_by_cs(buf->bo, buf->mgr->rws->cs)) { buf->mgr->rws->flush_cb(buf->mgr->rws->flush_data); } - } - radeon_bo_set_tiling(buf->bo, flags, pitch); + radeon_bo_set_tiling(buf->bo, flags, pitch); + } } boolean radeon_drm_bufmgr_add_buffer(struct pb_buffer *_buf, diff --git a/src/gallium/winsys/radeon/drm/radeon_r300.c b/src/gallium/winsys/radeon/drm/radeon_r300.c index 2fcf7cf9821..80923de9373 100644 --- a/src/gallium/winsys/radeon/drm/radeon_r300.c +++ b/src/gallium/winsys/radeon/drm/radeon_r300.c @@ -201,6 +201,13 @@ static void radeon_write_cs_dword(struct r300_winsys_screen *rws, radeon_cs_write_dword(ws->cs, dword); } +static void radeon_write_cs_table(struct r300_winsys_screen *rws, + const void *table, unsigned count) +{ + struct radeon_libdrm_winsys *ws = radeon_winsys_screen(rws); + radeon_cs_write_table(ws->cs, table, count); +} + static void radeon_write_cs_reloc(struct r300_winsys_screen *rws, struct r300_winsys_buffer *buf, uint32_t rd, @@ -265,8 +272,8 @@ static uint32_t radeon_get_value(struct r300_winsys_screen *rws, return ws->z_pipes; case R300_VID_SQUARE_TILING_SUPPORT: return ws->squaretiling; - case R300_VID_TEX3D_MIP_BUG: - return ws->tex3d_mip_bug; + case R300_VID_DRM_2_3_0: + return ws->drm_2_3_0; } return 0; } @@ -322,6 +329,7 @@ radeon_setup_winsys(int fd, struct radeon_libdrm_winsys* ws) ws->base.check_cs = radeon_check_cs; ws->base.begin_cs = radeon_begin_cs; ws->base.write_cs_dword = radeon_write_cs_dword; + ws->base.write_cs_table = radeon_write_cs_table; ws->base.write_cs_reloc = radeon_write_cs_reloc; ws->base.end_cs = radeon_end_cs; ws->base.flush_cs = radeon_flush_cs; diff --git a/src/gallium/winsys/radeon/drm/radeon_winsys.h b/src/gallium/winsys/radeon/drm/radeon_winsys.h index 396f258c312..ca789be8e93 100644 --- a/src/gallium/winsys/radeon/drm/radeon_winsys.h +++ b/src/gallium/winsys/radeon/drm/radeon_winsys.h @@ -60,8 +60,12 @@ struct radeon_libdrm_winsys { /* Square tiling support. */ boolean squaretiling; - /* Square tiling support. */ - boolean tex3d_mip_bug; + /* DRM 2.3.0 + * - R500 VAP regs + * - MSPOS regs + * - Fixed texture 3D size calculation + */ + boolean drm_2_3_0; /* DRM FD */ int fd; diff --git a/src/gallium/winsys/svga/drm/vmw_context.c b/src/gallium/winsys/svga/drm/vmw_context.c index 90ffc4868f7..104d03f2730 100644 --- a/src/gallium/winsys/svga/drm/vmw_context.c +++ b/src/gallium/winsys/svga/drm/vmw_context.c @@ -114,6 +114,19 @@ vmw_svga_winsys_context(struct svga_winsys_context *swc) } +static INLINE unsigned +vmw_translate_to_pb_flags(unsigned flags) +{ + unsigned f = 0; + if (flags & SVGA_RELOC_READ) + f |= PB_USAGE_GPU_READ; + + if (flags & SVGA_RELOC_WRITE) + f |= PB_USAGE_GPU_WRITE; + + return f; +} + static enum pipe_error vmw_swc_flush(struct svga_winsys_context *swc, struct pipe_fence_handle **pfence) @@ -264,6 +277,7 @@ vmw_swc_region_relocation(struct svga_winsys_context *swc, { struct vmw_svga_winsys_context *vswc = vmw_svga_winsys_context(swc); struct vmw_region_relocation *reloc; + unsigned translated_flags; enum pipe_error ret; assert(vswc->region.staged < vswc->region.reserved); @@ -275,7 +289,8 @@ vmw_swc_region_relocation(struct svga_winsys_context *swc, ++vswc->region.staged; - ret = pb_validate_add_buffer(vswc->validate, reloc->buffer, flags); + translated_flags = vmw_translate_to_pb_flags(flags); + ret = pb_validate_add_buffer(vswc->validate, reloc->buffer, translated_flags); /* TODO: Update pipebuffer to reserve buffers and not fail here */ assert(ret == PIPE_OK); diff --git a/src/gallium/winsys/sw/xlib/xlib_sw_winsys.c b/src/gallium/winsys/sw/xlib/xlib_sw_winsys.c index ec4f919d082..56d2df825df 100644 --- a/src/gallium/winsys/sw/xlib/xlib_sw_winsys.c +++ b/src/gallium/winsys/sw/xlib/xlib_sw_winsys.c @@ -48,6 +48,8 @@ #include <sys/shm.h> #include <X11/extensions/XShm.h> +DEBUG_GET_ONCE_BOOL_OPTION(xlib_no_shm, "XLIB_NO_SHM", FALSE) + /** * Display target for Xlib winsys. * Low-level OS/window system memory buffer @@ -122,6 +124,9 @@ static char *alloc_shm(struct xm_displaytarget *buf, unsigned size) { XShmSegmentInfo *const shminfo = & buf->shminfo; + shminfo->shmid = -1; + shminfo->shmaddr = (char *) -1; + shminfo->shmid = shmget(IPC_PRIVATE, size, IPC_CREAT|0777); if (shminfo->shmid < 0) { return NULL; @@ -383,15 +388,11 @@ xm_displaytarget_create(struct sw_winsys *winsys, xm_dt->stride = align(util_format_get_stride(format, width), alignment); size = xm_dt->stride * nblocksy; - if (!debug_get_bool_option("XLIB_NO_SHM", FALSE)) - { - xm_dt->shminfo.shmid = -1; - xm_dt->shminfo.shmaddr = (char *) -1; - xm_dt->shm = TRUE; - + if (!debug_get_option_xlib_no_shm()) { xm_dt->data = alloc_shm(xm_dt, size); - if(!xm_dt->data) - goto no_data; + if (xm_dt->data) { + xm_dt->shm = TRUE; + } } if(!xm_dt->data) { diff --git a/src/glx/Makefile b/src/glx/Makefile index 6711fdc61bb..c6ebc49828b 100644 --- a/src/glx/Makefile +++ b/src/glx/Makefile @@ -90,7 +90,7 @@ install: $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) # Remove .o and backup files clean: - -rm -f $(TOP)/$(LIB_DIR)/libGL.so* + -rm -f $(TOP)/$(LIB_DIR)/$(GL_LIB_GLOB) -rm -f *.o *~ -rm -f depend depend.bak diff --git a/src/glx/XF86dri.c b/src/glx/XF86dri.c index fdbdd43000e..d0e88805bcc 100644 --- a/src/glx/XF86dri.c +++ b/src/glx/XF86dri.c @@ -36,7 +36,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. /* THIS IS NOT AN X CONSORTIUM STANDARD */ -#ifdef GLX_DIRECT_RENDERING +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) #define NEED_REPLIES #include <X11/Xlibint.h> diff --git a/src/glx/apple/.gitignore b/src/glx/apple/.gitignore new file mode 100644 index 00000000000..3cc2d130138 --- /dev/null +++ b/src/glx/apple/.gitignore @@ -0,0 +1,4 @@ +apple_xgl_api.[hc] +exports.list +stage.[1234] + diff --git a/src/glx/apple/GL_aliases b/src/glx/apple/GL_aliases new file mode 100644 index 00000000000..8de22383a78 --- /dev/null +++ b/src/glx/apple/GL_aliases @@ -0,0 +1,10 @@ +#GL_EXT_texture_object +alias AreTexturesResidentEXT AreTexturesResident +alias BindTextureEXT BindTexture +alias DeleteTexturesEXT DeleteTextures +alias GenTexturesEXT GenTextures +alias IsTextureEXT IsTexture +alias PrioritizeTexturesEXT PrioritizeTextures + +# Due to type conflicts, we handle this differently +#alias TexImage3DEXT TexImage3D diff --git a/src/glx/apple/GL_extensions b/src/glx/apple/GL_extensions new file mode 100644 index 00000000000..073666c367b --- /dev/null +++ b/src/glx/apple/GL_extensions @@ -0,0 +1,106 @@ +extension ARB_transpose_matrix +extension ARB_vertex_program +extension ARB_vertex_blend +extension ARB_window_pos +extension ARB_shader_objects +extension ARB_vertex_shader +extension ARB_shading_language_100 +extension ARB_imaging +extension ARB_point_parameters +extension ARB_texture_env_crossbar +extension ARB_texture_border_clamp +extension ARB_multitexture +extension ARB_texture_env_add +extension ARB_texture_cube_map +extension ARB_texture_env_dot3 +extension ARB_multisample +extension ARB_texture_env_combine +extension ARB_texture_compression +extension ARB_texture_mirrored_repeat +extension ARB_shadow +extension ARB_depth_texture +extension ARB_shadow_ambient +extension ARB_fragment_program +extension ARB_fragment_program_shadow +extension ARB_fragment_shader +extension ARB_occlusion_query +extension ARB_point_sprite +extension ARB_texture_non_power_of_two +extension ARB_vertex_buffer_object +extension ARB_pixel_buffer_object +extension ARB_draw_buffers +extension ARB_shader_texture_lod +extension ARB_texture_rectangle +extension ARB_texture_float +extension ARB_half_float_pixel + +extension EXT_multi_draw_arrays +extension EXT_clip_volume_hint +extension EXT_rescale_normal +extension EXT_draw_range_elements +extension EXT_fog_coord +extension EXT_gpu_program_parameters +extension EXT_geometry_shader4 + +#The gl.spec has the wrong arguments for GetTransformFeedbackVaryingEXT +#extension EXT_transform_feedback +extension EXT_compiled_vertex_array +extension EXT_framebuffer_object +extension EXT_framebuffer_blit +extension EXT_framebuffer_multisample +extension EXT_texture_rectangle +extension EXT_texture_env_add +extension EXT_blend_color +extension EXT_blend_minmax +extension EXT_blend_subtract +extension EXT_texture_lod_bias +extension EXT_abgr +extension EXT_bgra +extension EXT_stencil_wrap +extension EXT_texture_filter_anisotropic +extension EXT_separate_specular_color +extension EXT_secondary_color +extension EXT_blend_func_separate +extension EXT_shadow_funcs +extension EXT_stencil_two_side +extension EXT_texture_compression_s3tc +extension EXT_texture_compression_dxt1 +extension EXT_texture_sRGB +extension EXT_blend_equation_separate +extension EXT_texture_mirror_clamp +extension EXT_packed_depth_stencil + +extension APPLE_client_storage +extension APPLE_specular_vector +extension APPLE_transform_hint +extension APPLE_packed_pixels +#The gl.spec has different argument types for this: +#extension APPLE_fence +extension APPLE_vertex_array_object +extension APPLE_vertex_program_evaluators +extension APPLE_element_array +extension APPLE_flush_render +extension APPLE_aux_depth_stencil +extension APPLE_flush_buffer_range +extension APPLE_ycbcr_422 +#The gl.spec has different argument types for this: +#extension APPLE_vertex_array_range +extension APPLE_texture_range +extension APPLE_float_pixels +extension APPLE_pixel_buffer +extension APPLE_object_purgeable + +#The OpenGL framework has moved this to the core OpenGL, and eliminated EXT_convolution listing. +#extension EXT_convolution + +#Leopard supports these according to nm. +#Applications should use the GL_EXTENSIONS list to determine capabilities. +extension EXT_paletted_texture +extension APPLE_fence +extension NV_vertex_program4 +extension EXT_draw_buffers2 +extension EXT_gpu_shader4 +extension ATI_pn_triangles +extension NV_register_combiners +extension EXT_depth_bounds_test + diff --git a/src/glx/apple/GL_noop b/src/glx/apple/GL_noop new file mode 100644 index 00000000000..2581be1a7d5 --- /dev/null +++ b/src/glx/apple/GL_noop @@ -0,0 +1,15 @@ +#These are for compatibility with the old libGL. +noop SGI_color_table +noop EXT_convolution +noop EXT_cull_vertex +noop NV_fence +noop SGIS_detail_texture +noop SGIX_fragment_lighting +noop SGIX_flush_raster +noop EXT_vertex_array +noop SGIX_instruments +noop EXT_histogram +noop NV_vertex_program +noop PGI_misc_hints +noop SGIS_multisample +noop EXT_multisample diff --git a/src/glx/apple/GL_promoted b/src/glx/apple/GL_promoted new file mode 100644 index 00000000000..a16dc6ae654 --- /dev/null +++ b/src/glx/apple/GL_promoted @@ -0,0 +1,4 @@ +promoted MESA_window_pos +promoted ARB_window_pos +promoted EXT_copy_texture +promoted ARB_vertex_program diff --git a/src/glx/apple/Makefile b/src/glx/apple/Makefile new file mode 100644 index 00000000000..279f7aded9d --- /dev/null +++ b/src/glx/apple/Makefile @@ -0,0 +1,129 @@ +TOP = ../../.. + +include $(TOP)/configs/current + +#CC=gcc +#GL_CFLAGS=-Wall -ggdb3 -Os -DPTHREADS -D_REENTRANT $(RC_CFLAGS) $(CFLAGS) +#GL_LDFLAGS=-L$(INSTALL_DIR)/lib -L$(X11_DIR)/lib $(LDFLAGS) -Wl,-single_module + +TCLSH=tclsh8.5 +MKDIR=mkdir +INSTALL=install +LN=ln +RM=rm + +#INCLUDE=-I. -Iinclude -I.. -DGLX_ALIAS_UNSUPPORTED -I$(INSTALL_DIR)/include -I$(X11_DIR)/include + +#COMPILE=$(CC) $(INCLUDE) $(GL_CFLAGS) -c + +#The directory with the final binaries. +BUILD_DIR=builds + +all: $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) + +SOURCES = \ + apple_cgl.c \ + apple_glx.c \ + apple_glx_context.c \ + apple_glx_drawable.c \ + apple_glx_pbuffer.c \ + apple_glx_pixmap.c \ + apple_glx_surface.c \ + apple_visual.c \ + apple_xgl_api.c \ + apple_xgl_api_additional.c \ + apple_xgl_api_read.c \ + apple_xgl_api_stereo.c \ + apple_xgl_api_viewport.c \ + appledri.c \ + ../clientattrib.c \ + ../compsize.c \ + ../glcontextmodes.c \ + glx_empty.c \ + glx_error.c \ + ../glx_pbuffer.c \ + ../glx_query.c \ + ../glxcmds.c \ + ../glxcurrent.c \ + ../glxext.c \ + ../glxextensions.c \ + glxreply.c \ + ../pixel.c \ + ../xfont.c + +include $(TOP)/src/mesa/sources.mak + +LDFLAGS += -lXplugin -framework ApplicationServices -framework CoreFoundation + +MESA_GLAPI_ASM_SOURCES = $(addprefix $(TOP)/src/mesa/, $(GLAPI_ASM_SOURCES)) +MESA_GLAPI_SOURCES = $(addprefix $(TOP)/src/mesa/, $(GLAPI_SOURCES)) +MESA_GLAPI_OBJECTS = $(addprefix $(TOP)/src/mesa/, $(GLAPI_OBJECTS)) + +OBJECTS = $(SOURCES:.c=.o) # $(MESA_GLAPI_OBJECTS) + +INCLUDES = -I. -Iinclude -I..\ + -I$(TOP)/include \ + -I$(TOP)/include/GL/internal \ + -I$(TOP)/src/mesa \ + -I$(TOP)/src/mesa/glapi \ + $(LIBDRM_CFLAGS) \ + $(DRI2PROTO_CFLAGS) \ + $(X11_INCLUDES) + +##### RULES ##### + +$(OBJECTS) : apple_xgl_api.h + +apple_xgl_api.c : apple_xgl_api.h + +apple_xgl_api.h : gen_api_header.tcl gen_api_library.tcl gen_code.tcl gen_defs.tcl gen_exports.tcl gen_funcs.tcl gen_types.tcl + $(TCLSH) gen_code.tcl + +.c.o: + $(CC) -c $(INCLUDES) $(CFLAGS) $(EXTRA_DEFINES) $< -o $@ + +.S.o: + $(CC) -c $(INCLUDES) $(CFLAGS) $(EXTRA_DEFINES) $< -o $@ + +##### TARGETS ##### + +default: depend $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) + +# Make libGL +$(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(OBJECTS) Makefile + $(MKLIB) -o $(GL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \ + -major 1 -minor 2 $(MKLIB_OPTIONS) \ + -install $(TOP)/$(LIB_DIR) -id $(INSTALL_LIB_DIR)/lib$(GL_LIB).1.dylib \ + $(GL_LIB_DEPS) $(OBJECTS) + +depend: $(SOURCES) $(MESA_GLAPI_SOURCES) $(MESA_GLAPI_ASM_SOURCES) Makefile + rm -f depend + touch depend + $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(SOURCES) \ + $(MESA_GLAPI_SOURCES) $(MESA_GLAPI_ASM_SOURCES) + +# Emacs tags +tags: + etags `find . -name \*.[ch]` `find $(TOP)/include` + +install_headers: include/GL/gl.h + $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/include/GL + $(INSTALL) -m 644 include/GL/gl.h $(DESTDIR)$(INSTALL_DIR)/include/GL + +install_libraries: $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) + $(MAKE) -C $(TOP)/src/mesa install-libgl + +install: install_libraries + +# Remove .o and backup files +clean: + -rm -f *.o *.a *~ + -rm -f *.c~ *.h~ + -rm -f apple_xgl_api.h apple_xgl_api.c + -rm -f *.dylib + -rm -f include/GL/gl.h + -rm -f $(TOP)/$(LIB_DIR)/$(GL_LIB_GLOB) + -rm -f *.o *~ + -rm -f depend depend.bak + +-include depend diff --git a/src/glx/apple/OVERALL_DESIGN b/src/glx/apple/OVERALL_DESIGN new file mode 100644 index 00000000000..c394b2115cb --- /dev/null +++ b/src/glx/apple/OVERALL_DESIGN @@ -0,0 +1,18 @@ +A lot of the code is automatically generated. + +The following are generated based on specs/gl.spec and specs/enum.spec (from OpenGL.org): + +apple_xgl_api.h +apple_xgl_api.c +exports.list +include/GL/gl.h +include/GL/glext.h (includes the OpenGL framework glext.h) + +The gen_code.tcl script is what executes the various gen_*.tcl scripts to produce those. + +You will need Tcl 8.5 for the gen_code.tcl script. + +The tests/ directory contains some tests that are built in testbuilds. + +The tests built in testbuilds don't require installation of the library. + diff --git a/src/glx/apple/README_UPDATING b/src/glx/apple/README_UPDATING new file mode 100644 index 00000000000..7b1bbe02c54 --- /dev/null +++ b/src/glx/apple/README_UPDATING @@ -0,0 +1,8 @@ +The design of most of this code is such that we extend the GLX structures +with a void * named apple. + +The GLX functions that need to do Apple-specific things are passed +&s->apple in order to initialize the private structures. + +Thus when updating, just run a diff against glxext.c or glxcmds.c, and +manually merge from there as needed. diff --git a/src/glx/apple/RELEASE_NOTES b/src/glx/apple/RELEASE_NOTES new file mode 100644 index 00000000000..c5c603e76d5 --- /dev/null +++ b/src/glx/apple/RELEASE_NOTES @@ -0,0 +1,71 @@ +AppleSGLX Release Notes + +o OpenGL Support + +AppleSGLX supports the same version of OpenGL as Leopard (OpenGL 2.1). +Many extensions from the OpenGL framework are now builtin. + +This adds support for GLSL, and a variety of other features. + +o Thread Support + +Thread support has been improved since the libGL in XQuartz 2.3.2.1. + +o GLX 1.4 Support + +The GLX 1.3 and 1.4 functions should all work with a few exceptions +as outlined in this document. + +o glXMakeContextCurrent (a GLX 1.3 feature) + +glXMakeContextCurrent should work with the readable drawable. The +OpenGL functions: glReadPixels, glCopyPixels, and glCopyColorTable, +should use the readable drawable if it's different than the rendering +drawable. + +o glXGetProcAddress (a GLX 1.4 feature and ARB extension) + +glXGetProcAddress should work and allow getting the address of any +extension functions you may need from the X11 libGL, or OpenGL framework +libGL. Previous versions of the X11 libGL didn't allow getting the newer +OpenGL framework addresses. + +o GLXPixmaps + +New support for GLXPixmaps works well with mixed X11 and OpenGL drawing +operations. You can create them using glXCreateGLXPixmap or +glXCreatePixmap. + +o GLXPbuffers + +Support for GLXPbuffers has been added. These are drawables that are +not possible to render to with X11, which is allowed by the spec. +A GLXPbuffer will never generate a clobber event, however +glXSelectEvent and glXGetSelectedEvent should operate normally. + +Clobber events are not generated due to low-level architectural +differences. The contents of your pbuffers will not be clobbered. + +o Shared Contexts + +Due to basic low-level architectural differences the usage of shared +contexts requires a similar visual or GLXFBConfig be used in the +creation of a shared context. It's best if you specify the same +visual. This is due to a CGL design difference, and not something +that is easily worked around. UPDATE: some changes made seem to +help resolve this issue in many cases, so you may be able to use a +shared context without this restriction. + + +o Indirect + +The X server supports indirect fairly well, so OpenGL applications +can be run remotely and displayed by XQuartz. This means you can run +applications from a remote host on an XQuartz X server. + +AppleSGLX does not support indirect rendering. Any indirect context +created will appear to glXIsDirect as an indirect context, but it +does not actually support indirect rendering to a remote X server. + +AppleSGLX supports GLXPixmaps and GLXPbuffers with direct and indirect +contexts, though they are all direct contexts by definition (see above). diff --git a/src/glx/apple/TODO b/src/glx/apple/TODO new file mode 100644 index 00000000000..4a063fe0edf --- /dev/null +++ b/src/glx/apple/TODO @@ -0,0 +1,26 @@ +Test shared contexts! + +Go over every glxcmd in glxcmds.c and make sure we have them working. +Verify the XError behavior of GLXPixmap support functions. + +Test GLXPixmap support with various pixmap depths. + +Test GLXPixmap support with invalid pixmaps (to stress the protocol code). + +-- Feb 10, 2009 + +Test glXCopyContext. + +-- Dec 12 2008 + +TEST glXCopyContext needs some work and additional code in apple_glx.c. + +---- + +Make sure we report the proper list of GLX extensions available. Apple direct may not support some +that Mesa does, and vice-versa. + +Modify create_destroy_context and create a new test called create_destroy_context_thread_race. +Where 2 threads are doing the same sort of path of create and destroy. The locking should protect +us there, but we need to verify nothing goes wrong. + diff --git a/src/glx/apple/apple_cgl.c b/src/glx/apple/apple_cgl.c new file mode 100644 index 00000000000..737d757ed52 --- /dev/null +++ b/src/glx/apple/apple_cgl.c @@ -0,0 +1,128 @@ +/* + Copyright (c) 2008 Apple Inc. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT + HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name(s) of the above + copyright holders shall not be used in advertising or otherwise to + promote the sale, use or other dealings in this Software without + prior written authorization. +*/ + +#include <stdbool.h> +#include <stdio.h> +#include <stdlib.h> +#include <dlfcn.h> + +#include "apple_cgl.h" +#include "apple_glx.h" + +#ifndef OPENGL_FRAMEWORK_PATH +#define OPENGL_FRAMEWORK_PATH "/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL" +#endif + +static void *dl_handle = NULL; + +struct apple_cgl_api apple_cgl; + +static bool initialized = false; + +static void * +sym(void *h, const char *name) +{ + void *s; + + s = dlsym(h, name); + + if (NULL == s) { + fprintf(stderr, "error: %s\n", dlerror()); + abort(); + } + + return s; +} + +void +apple_cgl_init(void) +{ + void *h; + GLint major = 0, minor = 0; + const char *opengl_framework_path; + + if (initialized) + return; + + opengl_framework_path = getenv("OPENGL_FRAMEWORK_PATH"); + if (!opengl_framework_path) { + opengl_framework_path = OPENGL_FRAMEWORK_PATH; + } + + (void) dlerror(); /*drain dlerror */ + h = dlopen(opengl_framework_path, RTLD_NOW); + + if (NULL == h) { + fprintf(stderr, "error: unable to dlopen %s : %s\n", + opengl_framework_path, dlerror()); + abort(); + } + + dl_handle = h; + + apple_cgl.get_version = sym(h, "CGLGetVersion"); + + apple_cgl.get_version(&major, &minor); + + apple_glx_diagnostic("CGL major %d minor %d\n", major, minor); + + if (1 != major) { + fprintf(stderr, "WARNING: the CGL major version has changed!\n" + "libGL may be incompatible!\n"); + } + + apple_cgl.choose_pixel_format = sym(h, "CGLChoosePixelFormat"); + apple_cgl.destroy_pixel_format = sym(h, "CGLDestroyPixelFormat"); + + apple_cgl.clear_drawable = sym(h, "CGLClearDrawable"); + apple_cgl.flush_drawable = sym(h, "CGLFlushDrawable"); + + apple_cgl.create_context = sym(h, "CGLCreateContext"); + apple_cgl.destroy_context = sym(h, "CGLDestroyContext"); + + apple_cgl.set_current_context = sym(h, "CGLSetCurrentContext"); + apple_cgl.get_current_context = sym(h, "CGLGetCurrentContext"); + apple_cgl.error_string = sym(h, "CGLErrorString"); + + apple_cgl.set_off_screen = sym(h, "CGLSetOffScreen"); + + apple_cgl.copy_context = sym(h, "CGLCopyContext"); + + apple_cgl.create_pbuffer = sym(h, "CGLCreatePBuffer"); + apple_cgl.destroy_pbuffer = sym(h, "CGLDestroyPBuffer"); + apple_cgl.set_pbuffer = sym(h, "CGLSetPBuffer"); + + initialized = true; +} + +void * +apple_cgl_get_dl_handle(void) +{ + return dl_handle; +} diff --git a/src/glx/apple/apple_cgl.h b/src/glx/apple/apple_cgl.h new file mode 100644 index 00000000000..5e98a00fe79 --- /dev/null +++ b/src/glx/apple/apple_cgl.h @@ -0,0 +1,86 @@ +/* + Copyright (c) 2008, 2009 Apple Inc. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT + HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name(s) of the above + copyright holders shall not be used in advertising or otherwise to + promote the sale, use or other dealings in this Software without + prior written authorization. +*/ + +#ifndef APPLE_CGL_H +#define APPLE_CGL_H + +#include <stdio.h> +#include <OpenGL/CGLCurrent.h> +#include <OpenGL/CGLTypes.h> +#include <OpenGL/OpenGL.h> + +/* For GLint and GLsizei on Tiger */ +#include <OpenGL/gl.h> + +struct apple_cgl_api +{ + void (*get_version) (GLint * majorvers, GLint * minorvers); + + CGLError(*choose_pixel_format) (const CGLPixelFormatAttribute * attribs, + CGLPixelFormatObj * pix, GLint * npix); + CGLError(*destroy_pixel_format) (CGLPixelFormatObj pix); + + CGLError(*clear_drawable) (CGLContextObj ctx); + CGLError(*flush_drawable) (CGLContextObj ctx); + + CGLError(*create_context) (CGLPixelFormatObj pix, CGLContextObj share, + CGLContextObj * ctx); + CGLError(*destroy_context) (CGLContextObj pix); + + CGLError(*set_current_context) (CGLContextObj ctx); + CGLContextObj(*get_current_context) (void); + const char *(*error_string) (CGLError error); + + CGLError(*set_off_screen) (CGLContextObj ctx, + GLsizei width, GLsizei height, GLint rowbytes, + void *baseaddr); + + CGLError(*copy_context) (CGLContextObj src, CGLContextObj dst, + GLbitfield mask); + + CGLError(*create_pbuffer) (GLsizei width, + GLsizei height, + GLenum target, + GLenum internalFormat, + GLint max_level, CGLPBufferObj * pbuffer); + + CGLError(*destroy_pbuffer) (CGLPBufferObj pbuffer); + + CGLError(*set_pbuffer) (CGLContextObj ctx, + CGLPBufferObj pbuffer, + GLenum face, GLint level, GLint screen); +}; + +extern struct apple_cgl_api apple_cgl; + +extern void apple_cgl_init(void); + +extern void *apple_cgl_get_dl_handle(void); + +#endif diff --git a/src/glx/apple/apple_exports.list b/src/glx/apple/apple_exports.list new file mode 100644 index 00000000000..f4790119a55 --- /dev/null +++ b/src/glx/apple/apple_exports.list @@ -0,0 +1,623 @@ +_glAccum +_glAlphaFunc +_glAreTexturesResident +_glArrayElement +_glBegin +_glBindTexture +_glBitmap +_glBlendColor +_glBlendEquation +_glBlendEquationSeparate +_glBlendFunc +_glCallList +_glCallLists +_glClear +_glClearAccum +_glClearColor +_glClearDepth +_glClearIndex +_glClearStencil +_glClipPlane +_glColor3b +_glColor3bv +_glColor3d +_glColor3dv +_glColor3f +_glColor3fv +_glColor3i +_glColor3iv +_glColor3s +_glColor3sv +_glColor3ub +_glColor3ubv +_glColor3ui +_glColor3uiv +_glColor3us +_glColor3usv +_glColor4b +_glColor4bv +_glColor4d +_glColor4dv +_glColor4f +_glColor4fv +_glColor4i +_glColor4iv +_glColor4s +_glColor4sv +_glColor4ub +_glColor4ubv +_glColor4ui +_glColor4uiv +_glColor4us +_glColor4usv +_glColorMask +_glColorMaterial +_glColorPointer +_glColorSubTable +_glColorTable +_glColorTableParameterfv +_glColorTableParameteriv +_glConvolutionFilter1D +_glConvolutionFilter2D +_glConvolutionParameterf +_glConvolutionParameterfv +_glConvolutionParameteri +_glConvolutionParameteriv +_glCopyColorSubTable +_glCopyColorTable +_glCopyConvolutionFilter1D +_glCopyConvolutionFilter2D +_glCopyPixels +_glCopyTexImage1D +_glCopyTexImage2D +_glCopyTexSubImage1D +_glCopyTexSubImage2D +_glCopyTexSubImage3D +_glCullFace +_glDeleteLists +_glDeleteTextures +_glDepthFunc +_glDepthMask +_glDepthRange +_glDisable +_glDisableClientState +_glDrawArrays +_glDrawBuffer +_glDrawElements +_glDrawPixels +_glDrawRangeElements +_glEdgeFlag +_glEdgeFlagPointer +_glEdgeFlagv +_glEnable +_glEnableClientState +_glEnd +_glEndList +_glEvalCoord1d +_glEvalCoord1dv +_glEvalCoord1f +_glEvalCoord1fv +_glEvalCoord2d +_glEvalCoord2dv +_glEvalCoord2f +_glEvalCoord2fv +_glEvalMesh1 +_glEvalMesh2 +_glEvalPoint1 +_glEvalPoint2 +_glFeedbackBuffer +_glFinish +_glFlush +_glFogf +_glFogfv +_glFogi +_glFogiv +_glFrontFace +_glFrustum +_glGenLists +_glGenTextures +_glGetBooleanv +_glGetClipPlane +_glGetColorTable +_glGetColorTableParameterfv +_glGetColorTableParameteriv +_glGetConvolutionFilter +_glGetConvolutionParameterfv +_glGetConvolutionParameteriv +_glGetDoublev +_glGetError +_glGetFloatv +_glGetHistogram +_glGetHistogramParameterfv +_glGetHistogramParameteriv +_glGetIntegerv +_glGetLightfv +_glGetLightiv +_glGetMapdv +_glGetMapfv +_glGetMapiv +_glGetMaterialfv +_glGetMaterialiv +_glGetMinmax +_glGetMinmaxParameterfv +_glGetMinmaxParameteriv +_glGetPixelMapfv +_glGetPixelMapuiv +_glGetPixelMapusv +_glGetPointerv +_glGetPolygonStipple +_glGetSeparableFilter +_glGetString +_glGetTexEnvfv +_glGetTexEnviv +_glGetTexGendv +_glGetTexGenfv +_glGetTexGeniv +_glGetTexImage +_glGetTexLevelParameterfv +_glGetTexLevelParameteriv +_glGetTexParameterfv +_glGetTexParameteriv +_glHint +_glHistogram +_glIndexMask +_glIndexPointer +_glIndexd +_glIndexdv +_glIndexf +_glIndexfv +_glIndexi +_glIndexiv +_glIndexs +_glIndexsv +_glIndexub +_glIndexubv +_glInitNames +_glInterleavedArrays +_glIsEnabled +_glIsList +_glIsTexture +_glLightModelf +_glLightModelfv +_glLightModeli +_glLightModeliv +_glLightf +_glLightfv +_glLighti +_glLightiv +_glLineStipple +_glLineWidth +_glListBase +_glLoadIdentity +_glLoadMatrixd +_glLoadMatrixf +_glLoadName +_glLogicOp +_glMap1d +_glMap1f +_glMap2d +_glMap2f +_glMapGrid1d +_glMapGrid1f +_glMapGrid2d +_glMapGrid2f +_glMaterialf +_glMaterialfv +_glMateriali +_glMaterialiv +_glMatrixMode +_glMinmax +_glMultMatrixd +_glMultMatrixf +_glNewList +_glNormal3b +_glNormal3bv +_glNormal3d +_glNormal3dv +_glNormal3f +_glNormal3fv +_glNormal3i +_glNormal3iv +_glNormal3s +_glNormal3sv +_glNormalPointer +_glOrtho +_glPassThrough +_glPixelMapfv +_glPixelMapuiv +_glPixelMapusv +_glPixelStoref +_glPixelStorei +_glPixelTransferf +_glPixelTransferi +_glPixelZoom +_glPointSize +_glPolygonMode +_glPolygonOffset +_glPolygonStipple +_glPopAttrib +_glPopClientAttrib +_glPopMatrix +_glPopName +_glPrioritizeTextures +_glPushAttrib +_glPushClientAttrib +_glPushMatrix +_glPushName +_glRasterPos2d +_glRasterPos2dv +_glRasterPos2f +_glRasterPos2fv +_glRasterPos2i +_glRasterPos2iv +_glRasterPos2s +_glRasterPos2sv +_glRasterPos3d +_glRasterPos3dv +_glRasterPos3f +_glRasterPos3fv +_glRasterPos3i +_glRasterPos3iv +_glRasterPos3s +_glRasterPos3sv +_glRasterPos4d +_glRasterPos4dv +_glRasterPos4f +_glRasterPos4fv +_glRasterPos4i +_glRasterPos4iv +_glRasterPos4s +_glRasterPos4sv +_glReadBuffer +_glReadPixels +_glRectd +_glRectdv +_glRectf +_glRectfv +_glRecti +_glRectiv +_glRects +_glRectsv +_glRenderMode +_glResetHistogram +_glResetMinmax +_glRotated +_glRotatef +_glScaled +_glScalef +_glScissor +_glSelectBuffer +_glSeparableFilter2D +_glShadeModel +_glStencilFunc +_glStencilMask +_glStencilOp +_glTexCoord1d +_glTexCoord1dv +_glTexCoord1f +_glTexCoord1fv +_glTexCoord1i +_glTexCoord1iv +_glTexCoord1s +_glTexCoord1sv +_glTexCoord2d +_glTexCoord2dv +_glTexCoord2f +_glTexCoord2fv +_glTexCoord2i +_glTexCoord2iv +_glTexCoord2s +_glTexCoord2sv +_glTexCoord3d +_glTexCoord3dv +_glTexCoord3f +_glTexCoord3fv +_glTexCoord3i +_glTexCoord3iv +_glTexCoord3s +_glTexCoord3sv +_glTexCoord4d +_glTexCoord4dv +_glTexCoord4f +_glTexCoord4fv +_glTexCoord4i +_glTexCoord4iv +_glTexCoord4s +_glTexCoord4sv +_glTexCoordPointer +_glTexEnvf +_glTexEnvfv +_glTexEnvi +_glTexEnviv +_glTexGend +_glTexGendv +_glTexGenf +_glTexGenfv +_glTexGeni +_glTexGeniv +_glTexImage1D +_glTexImage2D +_glTexImage3D +_glTexParameterf +_glTexParameterfv +_glTexParameteri +_glTexParameteriv +_glTexSubImage1D +_glTexSubImage2D +_glTexSubImage3D +_glTranslated +_glTranslatef +_glVertex2d +_glVertex2dv +_glVertex2f +_glVertex2fv +_glVertex2i +_glVertex2iv +_glVertex2s +_glVertex2sv +_glVertex3d +_glVertex3dv +_glVertex3f +_glVertex3fv +_glVertex3i +_glVertex3iv +_glVertex3s +_glVertex3sv +_glVertex4d +_glVertex4dv +_glVertex4f +_glVertex4fv +_glVertex4i +_glVertex4iv +_glVertex4s +_glVertex4sv +_glVertexPointer +_glViewport +_glSampleCoverage +_glSamplePass +_glLoadTransposeMatrixf +_glLoadTransposeMatrixd +_glMultTransposeMatrixf +_glMultTransposeMatrixd +_glCompressedTexImage3D +_glCompressedTexImage2D +_glCompressedTexImage1D +_glCompressedTexSubImage3D +_glCompressedTexSubImage2D +_glCompressedTexSubImage1D +_glGetCompressedTexImage +_glActiveTexture +_glClientActiveTexture +_glMultiTexCoord1d +_glMultiTexCoord1dv +_glMultiTexCoord1f +_glMultiTexCoord1fv +_glMultiTexCoord1i +_glMultiTexCoord1iv +_glMultiTexCoord1s +_glMultiTexCoord1sv +_glMultiTexCoord2d +_glMultiTexCoord2dv +_glMultiTexCoord2f +_glMultiTexCoord2fv +_glMultiTexCoord2i +_glMultiTexCoord2iv +_glMultiTexCoord2s +_glMultiTexCoord2sv +_glMultiTexCoord3d +_glMultiTexCoord3dv +_glMultiTexCoord3f +_glMultiTexCoord3fv +_glMultiTexCoord3i +_glMultiTexCoord3iv +_glMultiTexCoord3s +_glMultiTexCoord3sv +_glMultiTexCoord4d +_glMultiTexCoord4dv +_glMultiTexCoord4f +_glMultiTexCoord4fv +_glMultiTexCoord4i +_glMultiTexCoord4iv +_glMultiTexCoord4s +_glMultiTexCoord4sv +_glFogCoordf +_glFogCoordfv +_glFogCoordd +_glFogCoorddv +_glFogCoordPointer +_glSecondaryColor3b +_glSecondaryColor3bv +_glSecondaryColor3d +_glSecondaryColor3dv +_glSecondaryColor3f +_glSecondaryColor3fv +_glSecondaryColor3i +_glSecondaryColor3iv +_glSecondaryColor3s +_glSecondaryColor3sv +_glSecondaryColor3ub +_glSecondaryColor3ubv +_glSecondaryColor3ui +_glSecondaryColor3uiv +_glSecondaryColor3us +_glSecondaryColor3usv +_glSecondaryColorPointer +_glPointParameterf +_glPointParameterfv +_glPointParameteri +_glPointParameteriv +_glBlendFuncSeparate +_glMultiDrawArrays +_glMultiDrawElements +_glWindowPos2d +_glWindowPos2dv +_glWindowPos2f +_glWindowPos2fv +_glWindowPos2i +_glWindowPos2iv +_glWindowPos2s +_glWindowPos2sv +_glWindowPos3d +_glWindowPos3dv +_glWindowPos3f +_glWindowPos3fv +_glWindowPos3i +_glWindowPos3iv +_glWindowPos3s +_glWindowPos3sv +_glGenQueries +_glDeleteQueries +_glIsQuery +_glBeginQuery +_glEndQuery +_glGetQueryiv +_glGetQueryObjectiv +_glGetQueryObjectuiv +_glBindBuffer +_glDeleteBuffers +_glGenBuffers +_glIsBuffer +_glBufferData +_glBufferSubData +_glGetBufferSubData +_glMapBuffer +_glUnmapBuffer +_glGetBufferParameteriv +_glGetBufferPointerv +_glDrawBuffers +_glVertexAttrib1d +_glVertexAttrib1dv +_glVertexAttrib1f +_glVertexAttrib1fv +_glVertexAttrib1s +_glVertexAttrib1sv +_glVertexAttrib2d +_glVertexAttrib2dv +_glVertexAttrib2f +_glVertexAttrib2fv +_glVertexAttrib2s +_glVertexAttrib2sv +_glVertexAttrib3d +_glVertexAttrib3dv +_glVertexAttrib3f +_glVertexAttrib3fv +_glVertexAttrib3s +_glVertexAttrib3sv +_glVertexAttrib4Nbv +_glVertexAttrib4Niv +_glVertexAttrib4Nsv +_glVertexAttrib4Nub +_glVertexAttrib4Nubv +_glVertexAttrib4Nuiv +_glVertexAttrib4Nusv +_glVertexAttrib4bv +_glVertexAttrib4d +_glVertexAttrib4dv +_glVertexAttrib4f +_glVertexAttrib4fv +_glVertexAttrib4iv +_glVertexAttrib4s +_glVertexAttrib4sv +_glVertexAttrib4ubv +_glVertexAttrib4uiv +_glVertexAttrib4usv +_glVertexAttribPointer +_glEnableVertexAttribArray +_glDisableVertexAttribArray +_glGetVertexAttribdv +_glGetVertexAttribfv +_glGetVertexAttribiv +_glGetVertexAttribPointerv +_glDeleteShader +_glDetachShader +_glCreateShader +_glShaderSource +_glCompileShader +_glCreateProgram +_glAttachShader +_glLinkProgram +_glUseProgram +_glDeleteProgram +_glValidateProgram +_glUniform1f +_glUniform2f +_glUniform3f +_glUniform4f +_glUniform1i +_glUniform2i +_glUniform3i +_glUniform4i +_glUniform1fv +_glUniform2fv +_glUniform3fv +_glUniform4fv +_glUniform1iv +_glUniform2iv +_glUniform3iv +_glUniform4iv +_glUniformMatrix2fv +_glUniformMatrix3fv +_glUniformMatrix4fv +_glIsShader +_glIsProgram +_glGetShaderiv +_glGetProgramiv +_glGetAttachedShaders +_glGetShaderInfoLog +_glGetProgramInfoLog +_glGetUniformLocation +_glGetActiveUniform +_glGetUniformfv +_glGetUniformiv +_glGetShaderSource +_glBindAttribLocation +_glGetActiveAttrib +_glGetAttribLocation +_glStencilFuncSeparate +_glStencilOpSeparate +_glStencilMaskSeparate +_glUniformMatrix2x3fv +_glUniformMatrix3x2fv +_glUniformMatrix2x4fv +_glUniformMatrix4x2fv +_glUniformMatrix3x4fv +_glUniformMatrix4x3fv +_glXChooseVisual +_glXCreateContext +_glXDestroyContext +_glXMakeCurrent +_glXCopyContext +_glXSwapBuffers +_glXCreateGLXPixmap +_glXDestroyGLXPixmap +_glXQueryExtension +_glXQueryVersion +_glXIsDirect +_glXGetConfig +_glXGetCurrentContext +_glXGetCurrentDrawable +_glXWaitGL +_glXWaitX +_glXUseXFont +_glXQueryExtensionsString +_glXQueryServerString +_glXGetClientString +_glXGetCurrentDisplay +_glXChooseFBConfig +_glXGetFBConfigAttrib +_glXGetFBConfigs +_glXGetVisualFromFBConfig +_glXCreateWindow +_glXDestroyWindow +_glXCreatePixmap +_glXDestroyPixmap +_glXCreatePbuffer +_glXDestroyPbuffer +_glXQueryDrawable +_glXCreateNewContext +_glXMakeContextCurrent +_glXGetCurrentReadDrawable +_glXQueryContext +_glXSelectEvent +_glXGetSelectedEvent +_glXGetProcAddress diff --git a/src/glx/apple/apple_glx.c b/src/glx/apple/apple_glx.c new file mode 100644 index 00000000000..d9bc0917156 --- /dev/null +++ b/src/glx/apple/apple_glx.c @@ -0,0 +1,214 @@ +/* + Copyright (c) 2008, 2009 Apple Inc. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT + HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name(s) of the above + copyright holders shall not be used in advertising or otherwise to + promote the sale, use or other dealings in this Software without + prior written authorization. +*/ + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <assert.h> +#include <stdarg.h> +#include <dlfcn.h> +#include "appledri.h" +#include "apple_glx.h" +#include "apple_glx_context.h" +#include "apple_cgl.h" +#include "apple_xgl_api.h" + +static bool initialized = false; +static int dri_event_base = 0; + +const GLuint __glXDefaultPixelStore[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 1 }; + +#ifndef OPENGL_LIB_PATH +#define OPENGL_LIB_PATH "/System/Library/Frameworks/OpenGL.framework/Libraries/libGL.dylib" +#endif + +static void *libgl_handle = NULL; + +static bool diagnostic = false; + +void +apple_glx_diagnostic(const char *fmt, ...) +{ + va_list vl; + + if (diagnostic) { + fprintf(stderr, "DIAG: "); + + va_start(vl, fmt); + vfprintf(stderr, fmt, vl); + va_end(vl); + } +} + +int +apple_get_dri_event_base(void) +{ + if (!initialized) { + fprintf(stderr, + "error: dri_event_base called before apple_init_glx!\n"); + abort(); + } + return dri_event_base; +} + +static void +surface_notify_handler(Display * dpy, unsigned int uid, int kind) +{ + + switch (kind) { + case AppleDRISurfaceNotifyDestroyed: + apple_glx_diagnostic("%s: surface destroyed %u\n", __func__, uid); + apple_glx_surface_destroy(uid); + break; + + case AppleDRISurfaceNotifyChanged:{ + int updated; + + updated = apple_glx_context_surface_changed(uid, pthread_self()); + + apple_glx_diagnostic("surface notify updated %d\n", updated); + } + break; + + default: + fprintf(stderr, "unhandled kind of event: %d in %s\n", kind, __func__); + } +} + +xp_client_id +apple_glx_get_client_id(void) +{ + static xp_client_id id; + + if (0 == id) { + if ((XP_Success != xp_init(XP_IN_BACKGROUND)) || + (Success != xp_get_client_id(&id))) { + return 0; + } + } + + return id; +} + +/* Return true if an error occured. */ +bool +apple_init_glx(Display * dpy) +{ + int eventBase, errorBase; + int major, minor, patch; + + if (!XAppleDRIQueryExtension(dpy, &eventBase, &errorBase)) + return true; + + if (!XAppleDRIQueryVersion(dpy, &major, &minor, &patch)) + return true; + + if (initialized) + return false; + + if (getenv("LIBGL_DIAGNOSTIC")) { + printf("initializing libGL in %s\n", __func__); + diagnostic = true; + } + + apple_cgl_init(); + apple_xgl_init_direct(); + libgl_handle = dlopen(OPENGL_LIB_PATH, RTLD_LAZY); + (void) apple_glx_get_client_id(); + + XAppleDRISetSurfaceNotifyHandler(surface_notify_handler); + + /* This should really be per display. */ + dri_event_base = eventBase; + initialized = true; + + return false; +} + +void +apple_glx_swap_buffers(void *ptr) +{ + struct apple_glx_context *ac = ptr; + + /* This may not be needed with CGLFlushDrawable: */ + glFlush(); + apple_cgl.flush_drawable(ac->context_obj); +} + +void * +apple_glx_get_proc_address(const GLubyte * procname) +{ + size_t len; + void *h, *s; + char *pname = (char *) procname; + + assert(NULL != procname); + len = strlen(pname); + + if (len < 3) { + return NULL; + } + + if ((pname != strstr(pname, "glX")) && (pname != strstr(pname, "gl"))) { + fprintf(stderr, + "warning: get proc address request is not for a gl or glX function"); + return NULL; + } + + /* Search using the default symbols first. */ + (void) dlerror(); /*drain dlerror */ + h = dlopen(NULL, RTLD_NOW); + if (NULL == h) { + fprintf(stderr, "warning: get proc address: %s\n", dlerror()); + return NULL; + } + + s = dlsym(h, pname); + + if (NULL == s) { + /* Try the libGL.dylib from the OpenGL.framework. */ + s = dlsym(libgl_handle, pname); + } + + dlclose(h); + + return s; +} + +void +apple_glx_waitx(Display * dpy, void *ptr) +{ + struct apple_private_context *ac = ptr; + + (void) ac; + + glFlush(); + glFinish(); + XSync(dpy, False); +} diff --git a/src/glx/apple/apple_glx.h b/src/glx/apple/apple_glx.h new file mode 100644 index 00000000000..9b3643bf156 --- /dev/null +++ b/src/glx/apple/apple_glx.h @@ -0,0 +1,49 @@ +/* + Copyright (c) 2008 Apple Inc. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT + HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name(s) of the above + copyright holders shall not be used in advertising or otherwise to + promote the sale, use or other dealings in this Software without + prior written authorization. +*/ + +#ifndef APPLE_GLX_H +#define APPLE_GLX_H + +#include <stdbool.h> +#include <GL/gl.h> +#include <GL/glxint.h> +#include <X11/Xlib.h> + +#define XP_NO_X_HEADERS +#include <Xplugin.h> + +void apple_glx_diagnostic(const char *fmt, ...); +xp_client_id apple_glx_get_client_id(void); +bool apple_init_glx(Display * dpy); +void apple_glx_swap_buffers(void *ptr); +void *apple_glx_get_proc_address(const GLubyte * procname); +void apple_glx_waitx(Display * dpy, void *ptr); +int apple_get_dri_event_base(void); + +#endif diff --git a/src/glx/apple/apple_glx_context.c b/src/glx/apple/apple_glx_context.c new file mode 100644 index 00000000000..c58d05a59af --- /dev/null +++ b/src/glx/apple/apple_glx_context.c @@ -0,0 +1,616 @@ +/* + Copyright (c) 2008, 2009 Apple Inc. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT + HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name(s) of the above + copyright holders shall not be used in advertising or otherwise to + promote the sale, use or other dealings in this Software without + prior written authorization. +*/ + +#include <stdbool.h> +#include <stdio.h> +#include <stdlib.h> +#include <limits.h> +#include <assert.h> +#include <pthread.h> + +#include <fcntl.h> +#include <sys/mman.h> +#include <unistd.h> + +// Get the newer glext.h first +#include <GL/gl.h> +#include <GL/glext.h> + +#include <OpenGL/CGLTypes.h> +#include <OpenGL/CGLCurrent.h> +#include <OpenGL/OpenGL.h> + +#include "glxclient.h" + +#include "apple_glx.h" +#include "apple_glx_context.h" +#include "appledri.h" +#include "apple_visual.h" +#include "apple_cgl.h" +#include "apple_glx_drawable.h" + +static pthread_mutex_t context_lock = PTHREAD_MUTEX_INITIALIZER; + +/* + * This should be locked on creation and destruction of the + * apple_glx_contexts. + * + * It's also locked when the surface_notify_handler is searching + * for a uid associated with a surface. + */ +static struct apple_glx_context *context_list = NULL; + +/* This guards the context_list above. */ +static void +lock_context_list(void) +{ + int err; + + err = pthread_mutex_lock(&context_lock); + + if (err) { + fprintf(stderr, "pthread_mutex_lock failure in %s: %d\n", + __func__, err); + abort(); + } +} + +static void +unlock_context_list(void) +{ + int err; + + err = pthread_mutex_unlock(&context_lock); + + if (err) { + fprintf(stderr, "pthread_mutex_unlock failure in %s: %d\n", + __func__, err); + abort(); + } +} + +static bool +is_context_valid(struct apple_glx_context *ac) +{ + struct apple_glx_context *i; + + lock_context_list(); + + for (i = context_list; i; i = i->next) { + if (ac == i) { + unlock_context_list(); + return true; + } + } + + unlock_context_list(); + + return false; +} + +/* This creates an apple_private_context struct. + * + * It's typically called to save the struct in a GLXContext. + * + * This is also where the CGLContextObj is created, and the CGLPixelFormatObj. + */ +bool +apple_glx_create_context(void **ptr, Display * dpy, int screen, + const void *mode, void *sharedContext, + int *errorptr, bool * x11errorptr) +{ + struct apple_glx_context *ac; + struct apple_glx_context *sharedac = sharedContext; + CGLError error; + + *ptr = NULL; + + ac = malloc(sizeof *ac); + + if (NULL == ac) { + *errorptr = BadAlloc; + *x11errorptr = true; + return true; + } + + if (sharedac && !is_context_valid(sharedac)) { + *errorptr = GLXBadContext; + *x11errorptr = false; + return true; + } + + ac->context_obj = NULL; + ac->pixel_format_obj = NULL; + ac->drawable = NULL; + ac->thread_id = pthread_self(); + ac->screen = screen; + ac->double_buffered = false; + ac->uses_stereo = false; + ac->need_update = false; + ac->is_current = false; + ac->made_current = false; + ac->last_surface_window = None; + + apple_visual_create_pfobj(&ac->pixel_format_obj, mode, + &ac->double_buffered, &ac->uses_stereo, + /*offscreen */ false); + + error = apple_cgl.create_context(ac->pixel_format_obj, + sharedac ? sharedac->context_obj : NULL, + &ac->context_obj); + + + if (error) { + (void) apple_cgl.destroy_pixel_format(ac->pixel_format_obj); + + free(ac); + + if (kCGLBadMatch == error) { + *errorptr = BadMatch; + *x11errorptr = true; + } + else { + *errorptr = GLXBadContext; + *x11errorptr = false; + } + + if (getenv("LIBGL_DIAGNOSTIC")) + fprintf(stderr, "error: %s\n", apple_cgl.error_string(error)); + + return true; + } + + /* The context creation succeeded, so we can link in the new context. */ + lock_context_list(); + + if (context_list) + context_list->previous = ac; + + ac->previous = NULL; + ac->next = context_list; + context_list = ac; + + *ptr = ac; + + apple_glx_diagnostic("%s: ac %p ac->context_obj %p\n", + __func__, (void *) ac, (void *) ac->context_obj); + + unlock_context_list(); + + return false; +} + +void +apple_glx_destroy_context(void **ptr, Display * dpy) +{ + struct apple_glx_context *ac = *ptr; + + if (NULL == ac) + return; + + apple_glx_diagnostic("%s: ac %p ac->context_obj %p\n", + __func__, (void *) ac, (void *) ac->context_obj); + + if (apple_cgl.get_current_context() == ac->context_obj) { + apple_glx_diagnostic("%s: context ac->context_obj %p " + "is still current!\n", __func__, + (void *) ac->context_obj); + if (apple_cgl.set_current_context(NULL)) { + abort(); + } + } + + /* Remove ac from the context_list as soon as possible. */ + lock_context_list(); + + if (ac->previous) { + ac->previous->next = ac->next; + } + else { + context_list = ac->next; + } + + if (ac->next) { + ac->next->previous = ac->previous; + } + + unlock_context_list(); + + + if (apple_cgl.clear_drawable(ac->context_obj)) { + fprintf(stderr, "error: while clearing drawable!\n"); + abort(); + } + + /* + * This potentially causes surface_notify_handler to be called in + * apple_glx.c... + * We can NOT have a lock held at this point. It would result in + * an abort due to an attempted deadlock. This is why we earlier + * removed the ac pointer from the double-linked list. + */ + if (ac->drawable) { + ac->drawable->destroy(ac->drawable); + } + + if (apple_cgl.destroy_pixel_format(ac->pixel_format_obj)) { + fprintf(stderr, "error: destroying pixel format in %s\n", __func__); + abort(); + } + + if (apple_cgl.destroy_context(ac->context_obj)) { + fprintf(stderr, "error: destroying context_obj in %s\n", __func__); + abort(); + } + + free(ac); + + *ptr = NULL; + + apple_glx_garbage_collect_drawables(dpy); +} + + +/* Return true if an error occured. */ +bool +apple_glx_make_current_context(Display * dpy, void *oldptr, void *ptr, + GLXDrawable drawable) +{ + struct apple_glx_context *oldac = oldptr; + struct apple_glx_context *ac = ptr; + struct apple_glx_drawable *newagd = NULL; + CGLError cglerr; + bool same_drawable = false; + +#if 0 + apple_glx_diagnostic("%s: oldac %p ac %p drawable 0x%lx\n", + __func__, (void *) oldac, (void *) ac, drawable); + + apple_glx_diagnostic("%s: oldac->context_obj %p ac->context_obj %p\n", + __func__, + (void *) (oldac ? oldac->context_obj : NULL), + (void *) (ac ? ac->context_obj : NULL)); +#endif + + /* This a common path for GLUT and other apps, so special case it. */ + if (ac && ac->drawable && ac->drawable->drawable == drawable) { + same_drawable = true; + + if (ac->is_current) + return false; + } + + /* Reset the is_current state of the old context, if non-NULL. */ + if (oldac && (ac != oldac)) + oldac->is_current = false; + + if (NULL == ac) { + /*Clear the current context for this thread. */ + apple_cgl.set_current_context(NULL); + + if (oldac) { + oldac->is_current = false; + + if (oldac->drawable) { + oldac->drawable->destroy(oldac->drawable); + oldac->drawable = NULL; + } + + /* Invalidate this to prevent surface recreation. */ + oldac->last_surface_window = None; + } + + return false; + } + + if (None == drawable) { + bool error = false; + + /* Clear the current drawable for this context_obj. */ + + if (apple_cgl.set_current_context(ac->context_obj)) + error = true; + + if (apple_cgl.clear_drawable(ac->context_obj)) + error = true; + + if (ac->drawable) { + ac->drawable->destroy(ac->drawable); + ac->drawable = NULL; + } + + /* Invalidate this to prevent surface recreation. */ + ac->last_surface_window = None; + + apple_glx_diagnostic("%s: drawable is None, error is: %d\n", + __func__, error); + + return error; + } + + /* This is an optimisation to avoid searching for the current drawable. */ + if (ac->drawable && ac->drawable->drawable == drawable) { + newagd = ac->drawable; + } + else { + /* Find the drawable if possible, and retain a reference to it. */ + newagd = + apple_glx_drawable_find(drawable, APPLE_GLX_DRAWABLE_REFERENCE); + } + + /* + * Try to destroy the old drawable, so long as the new one + * isn't the old. + */ + if (ac->drawable && !same_drawable) { + ac->drawable->destroy(ac->drawable); + ac->drawable = NULL; + } + + if (NULL == newagd) { + if (apple_glx_surface_create(dpy, ac->screen, drawable, &newagd)) + return true; + + /* The drawable is referenced once by apple_glx_surface_create. */ + + /* + * FIXME: We actually need 2 references to prevent premature surface + * destruction. The problem is that the surface gets destroyed in + * the case of the context being reused for another window, and + * we then lose the surface contents. Wait for destruction of a + * window to destroy a surface. + * + * Note: this may leave around surfaces we don't want around, if + * say we are using X for raster drawing after OpenGL rendering, + * but it will be compatible with the old libGL's behavior. + * + * Someday the X11 and OpenGL rendering must be unified at some + * layer. I suspect we can do that via shared memory and + * multiple threads in the X server (1 for each context created + * by a client). This would also allow users to render from + * multiple clients to the same OpenGL surface. In fact it could + * all be OpenGL. + * + */ + newagd->reference(newagd); + + /* Save the new drawable with the context structure. */ + ac->drawable = newagd; + } + else { + /* We are reusing an existing drawable structure. */ + + if (same_drawable) { + assert(ac->drawable == newagd); + /* The drawable_find above retained a reference for us. */ + } + else { + ac->drawable = newagd; + } + } + + /* + * Avoid this costly path if this is the same drawable and the + * context is already current. + */ + + if (same_drawable && ac->is_current) { + apple_glx_diagnostic("%s: same_drawable and ac->is_current\n"); + return false; + } + + cglerr = apple_cgl.set_current_context(ac->context_obj); + + if (kCGLNoError != cglerr) { + fprintf(stderr, "set current error: %s\n", + apple_cgl.error_string(cglerr)); + return true; + } + + ac->is_current = true; + + assert(NULL != ac->context_obj); + assert(NULL != ac->drawable); + + ac->thread_id = pthread_self(); + + /* This will be set if the pending_destroy code indicates it should be: */ + ac->last_surface_window = None; + + switch (ac->drawable->type) { + case APPLE_GLX_DRAWABLE_PBUFFER: + case APPLE_GLX_DRAWABLE_SURFACE: + case APPLE_GLX_DRAWABLE_PIXMAP: + if (ac->drawable->callbacks.make_current) { + if (ac->drawable->callbacks.make_current(ac, ac->drawable)) + return true; + } + break; + + default: + fprintf(stderr, "internal error: invalid drawable type: %d\n", + ac->drawable->type); + abort(); + } + + return false; +} + +bool +apple_glx_is_current_drawable(Display * dpy, void *ptr, GLXDrawable drawable) +{ + struct apple_glx_context *ac = ptr; + + if (ac->drawable && ac->drawable->drawable == drawable) { + return true; + } + else if (NULL == ac->drawable && None != ac->last_surface_window) { + apple_glx_context_update(dpy, ac); + + return (ac->drawable && ac->drawable->drawable == drawable); + } + + return false; +} + +bool +apple_glx_copy_context(void *currentptr, void *srcptr, void *destptr, + unsigned long mask, int *errorptr, bool * x11errorptr) +{ + struct apple_glx_context *src, *dest; + CGLError err; + + src = srcptr; + dest = destptr; + + if (src->screen != dest->screen) { + *errorptr = BadMatch; + *x11errorptr = true; + return true; + } + + if (dest == currentptr || dest->is_current) { + *errorptr = BadAccess; + *x11errorptr = true; + return true; + } + + /* + * If srcptr is the current context then we should do an implicit glFlush. + */ + if (currentptr == srcptr) + glFlush(); + + err = apple_cgl.copy_context(src->context_obj, dest->context_obj, + (GLbitfield) mask); + + if (kCGLNoError != err) { + *errorptr = GLXBadContext; + *x11errorptr = false; + return true; + } + + return false; +} + +/* + * The value returned is the total number of contexts set to update. + * It's meant for debugging/introspection. + */ +int +apple_glx_context_surface_changed(unsigned int uid, pthread_t caller) +{ + struct apple_glx_context *ac; + int updated = 0; + + lock_context_list(); + + for (ac = context_list; ac; ac = ac->next) { + if (ac->drawable && APPLE_GLX_DRAWABLE_SURFACE == ac->drawable->type + && ac->drawable->types.surface.uid == uid) { + + if (caller == ac->thread_id) { + apple_glx_diagnostic("caller is the same thread for uid %u\n", + uid); + + xp_update_gl_context(ac->context_obj); + } + else { + ac->need_update = true; + ++updated; + } + } + } + + unlock_context_list(); + + return updated; +} + +void +apple_glx_context_update(Display * dpy, void *ptr) +{ + struct apple_glx_context *ac = ptr; + + if (NULL == ac->drawable && None != ac->last_surface_window) { + bool failed; + + /* Attempt to recreate the surface for a destroyed drawable. */ + failed = + apple_glx_make_current_context(dpy, ac, ac, ac->last_surface_window); + + apple_glx_diagnostic("%s: surface recreation failed? %s\n", __func__, + failed ? "YES" : "NO"); + } + + if (ac->need_update) { + xp_update_gl_context(ac->context_obj); + ac->need_update = false; + + apple_glx_diagnostic("%s: updating context %p\n", __func__, ptr); + } + + if (ac->drawable && APPLE_GLX_DRAWABLE_SURFACE == ac->drawable->type + && ac->drawable->types.surface.pending_destroy) { + apple_glx_diagnostic("%s: clearing drawable %p\n", __func__, ptr); + apple_cgl.clear_drawable(ac->context_obj); + + if (ac->drawable) { + struct apple_glx_drawable *d; + + apple_glx_diagnostic("%s: attempting to destroy drawable %p\n", + __func__, ptr); + apple_glx_diagnostic("%s: ac->drawable->drawable is 0x%lx\n", + __func__, ac->drawable->drawable); + + d = ac->drawable; + + ac->last_surface_window = d->drawable; + + ac->drawable = NULL; + + /* + * This will destroy the surface drawable if there are + * no references to it. + * It also subtracts 1 from the reference_count. + * If there are references to it, then it's probably made + * current in another context. + */ + d->destroy(d); + } + } +} + +bool +apple_glx_context_uses_stereo(void *ptr) +{ + struct apple_glx_context *ac = ptr; + + return ac->uses_stereo; +} diff --git a/src/glx/apple/apple_glx_context.h b/src/glx/apple/apple_glx_context.h new file mode 100644 index 00000000000..c2a3e3fcf6f --- /dev/null +++ b/src/glx/apple/apple_glx_context.h @@ -0,0 +1,93 @@ +/* + Copyright (c) 2008, 2009 Apple Inc. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT + HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name(s) of the above + copyright holders shall not be used in advertising or otherwise to + promote the sale, use or other dealings in this Software without + prior written authorization. +*/ +#ifndef APPLE_GLX_CONTEXT_H +#define APPLE_GLX_CONTEXT_H + +/* <rdar://problem/6953344> */ +#define glTexImage1D glTexImage1D_OSX +#define glTexImage2D glTexImage2D_OSX +#define glTexImage3D glTexImage3D_OSX +#include <OpenGL/CGLTypes.h> +#include <OpenGL/CGLContext.h> +#undef glTexImage1D +#undef glTexImage2D +#undef glTexImage3D + +#include <stdbool.h> +#include <X11/Xlib.h> +#include <GL/glx.h> +#define XP_NO_X_HEADERS +#include <Xplugin.h> +#undef XP_NO_X_HEADERS + +#include "apple_glx_drawable.h" + +struct apple_glx_context +{ + CGLContextObj context_obj; + CGLPixelFormatObj pixel_format_obj; + struct apple_glx_drawable *drawable; + pthread_t thread_id; + int screen; + bool double_buffered; + bool uses_stereo; + bool need_update; + bool is_current; /* True if the context is current in some thread. */ + bool made_current; /* True if the context has ever been made current. */ + + /* + * last_surface is set by the pending_destroy code handler for a drawable. + * Due to a CG difference, we have to recreate a surface if the window + * is unmapped and mapped again. + */ + Window last_surface_window; + struct apple_glx_context *previous, *next; +}; + +bool apple_glx_create_context(void **ptr, Display * dpy, int screen, + const void *mode, void *sharedContext, + int *errorptr, bool * x11errorptr); +void apple_glx_destroy_context(void **ptr, Display * dpy); + +bool apple_glx_make_current_context(Display * dpy, void *oldptr, void *ptr, + GLXDrawable drawable); +bool apple_glx_is_current_drawable(Display * dpy, void *ptr, + GLXDrawable drawable); + +bool apple_glx_copy_context(void *currentptr, void *srcptr, void *destptr, + unsigned long mask, int *errorptr, + bool * x11errorptr); + +int apple_glx_context_surface_changed(unsigned int uid, pthread_t caller); + +void apple_glx_context_update(Display * dpy, void *ptr); + +bool apple_glx_context_uses_stereo(void *ptr); + +#endif /*APPLE_GLX_CONTEXT_H */ diff --git a/src/glx/apple/apple_glx_drawable.c b/src/glx/apple/apple_glx_drawable.c new file mode 100644 index 00000000000..55302243358 --- /dev/null +++ b/src/glx/apple/apple_glx_drawable.c @@ -0,0 +1,542 @@ +/* + Copyright (c) 2008, 2009 Apple Inc. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT + HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name(s) of the above + copyright holders shall not be used in advertising or otherwise to + promote the sale, use or other dealings in this Software without + prior written authorization. +*/ + +#include <stdbool.h> +#include <stdio.h> +#include <stdlib.h> +#include <assert.h> +#include <pthread.h> +#include "apple_glx.h" +#include "apple_glx_context.h" +#include "apple_glx_drawable.h" +#include "appledri.h" + +static pthread_mutex_t drawables_lock = PTHREAD_MUTEX_INITIALIZER; +static struct apple_glx_drawable *drawables_list = NULL; + +static void +lock_drawables_list(void) +{ + int err; + + err = pthread_mutex_lock(&drawables_lock); + + if (err) { + fprintf(stderr, "pthread_mutex_lock failure in %s: %d\n", + __func__, err); + abort(); + } +} + +static void +unlock_drawables_list(void) +{ + int err; + + err = pthread_mutex_unlock(&drawables_lock); + + if (err) { + fprintf(stderr, "pthread_mutex_unlock failure in %s: %d\n", + __func__, err); + abort(); + } +} + +struct apple_glx_drawable * +apple_glx_find_drawable(Display * dpy, GLXDrawable drawable) +{ + struct apple_glx_drawable *i, *agd = NULL; + + lock_drawables_list(); + + for (i = drawables_list; i; i = i->next) { + if (i->drawable == drawable) { + agd = i; + break; + } + } + + unlock_drawables_list(); + + return agd; +} + +static void +drawable_lock(struct apple_glx_drawable *agd) +{ + int err; + + err = pthread_mutex_lock(&agd->mutex); + + if (err) { + fprintf(stderr, "pthread_mutex_lock error: %d\n", err); + abort(); + } +} + +static void +drawable_unlock(struct apple_glx_drawable *d) +{ + int err; + + err = pthread_mutex_unlock(&d->mutex); + + if (err) { + fprintf(stderr, "pthread_mutex_unlock error: %d\n", err); + abort(); + } +} + + +static void +reference_drawable(struct apple_glx_drawable *d) +{ + d->lock(d); + d->reference_count++; + d->unlock(d); +} + +static void +release_drawable(struct apple_glx_drawable *d) +{ + d->lock(d); + d->reference_count--; + d->unlock(d); +} + +/* The drawables list must be locked prior to calling this. */ +/* Return true if the drawable was destroyed. */ +static bool +destroy_drawable(struct apple_glx_drawable *d) +{ + + d->lock(d); + + if (d->reference_count > 0) { + d->unlock(d); + return false; + } + + d->unlock(d); + + if (d->previous) { + d->previous->next = d->next; + } + else { + /* + * The item must be at the head of the list, if it + * has no previous pointer. + */ + drawables_list = d->next; + } + + if (d->next) + d->next->previous = d->previous; + + unlock_drawables_list(); + + if (d->callbacks.destroy) { + /* + * Warning: this causes other routines to be called (potentially) + * from surface_notify_handler. It's probably best to not have + * any locks at this point locked. + */ + d->callbacks.destroy(d->display, d); + } + + apple_glx_diagnostic("%s: freeing %p\n", __func__, (void *) d); + + free(d); + + /* So that the locks are balanced and the caller correctly unlocks. */ + lock_drawables_list(); + + return true; +} + +/* + * This is typically called when a context is destroyed or the current + * drawable is made None. + */ +static bool +destroy_drawable_callback(struct apple_glx_drawable *d) +{ + bool result; + + d->lock(d); + + apple_glx_diagnostic("%s: %p ->reference_count before -- %d\n", __func__, + (void *) d, d->reference_count); + + d->reference_count--; + + if (d->reference_count > 0) { + d->unlock(d); + return false; + } + + d->unlock(d); + + lock_drawables_list(); + + result = destroy_drawable(d); + + unlock_drawables_list(); + + return result; +} + +static bool +is_pbuffer(struct apple_glx_drawable *d) +{ + return APPLE_GLX_DRAWABLE_PBUFFER == d->type; +} + +static bool +is_pixmap(struct apple_glx_drawable *d) +{ + return APPLE_GLX_DRAWABLE_PIXMAP == d->type; +} + +static void +common_init(Display * dpy, GLXDrawable drawable, struct apple_glx_drawable *d) +{ + int err; + pthread_mutexattr_t attr; + + d->display = dpy; + d->reference_count = 0; + d->drawable = drawable; + d->type = -1; + + err = pthread_mutexattr_init(&attr); + + if (err) { + fprintf(stderr, "pthread_mutexattr_init error: %d\n", err); + abort(); + } + + /* + * There are some patterns that require a recursive mutex, + * when working with locks that protect the apple_glx_drawable, + * and reference functions like ->reference, and ->release. + */ + err = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); + + if (err) { + fprintf(stderr, "error: setting pthread mutex type: %d\n", err); + abort(); + } + + err = pthread_mutex_init(&d->mutex, &attr); + + if (err) { + fprintf(stderr, "pthread_mutex_init error: %d\n", err); + abort(); + } + + (void) pthread_mutexattr_destroy(&attr); + + d->lock = drawable_lock; + d->unlock = drawable_unlock; + + d->reference = reference_drawable; + d->release = release_drawable; + + d->destroy = destroy_drawable_callback; + + d->is_pbuffer = is_pbuffer; + d->is_pixmap = is_pixmap; + + d->width = -1; + d->height = -1; + d->row_bytes = 0; + d->path[0] = '\0'; + d->fd = -1; + d->buffer = NULL; + d->buffer_length = 0; + + d->previous = NULL; + d->next = NULL; +} + +static void +link_tail(struct apple_glx_drawable *agd) +{ + lock_drawables_list(); + + /* Link the new drawable into the global list. */ + agd->next = drawables_list; + + if (drawables_list) + drawables_list->previous = agd; + + drawables_list = agd; + + unlock_drawables_list(); +} + +/*WARNING: this returns a locked and referenced object. */ +bool +apple_glx_drawable_create(Display * dpy, + int screen, + GLXDrawable drawable, + struct apple_glx_drawable **agdResult, + struct apple_glx_drawable_callbacks *callbacks) +{ + struct apple_glx_drawable *d; + + d = calloc(1, sizeof *d); + + if (NULL == d) { + perror("malloc"); + return true; + } + + common_init(dpy, drawable, d); + d->type = callbacks->type; + d->callbacks = *callbacks; + + d->reference(d); + d->lock(d); + + link_tail(d); + + apple_glx_diagnostic("%s: new drawable %p\n", __func__, (void *) d); + + *agdResult = d; + + return false; +} + +static int error_count = 0; + +static int +error_handler(Display * dpy, XErrorEvent * err) +{ + if (err->error_code == BadWindow) { + ++error_count; + } + + return 0; +} + +void +apple_glx_garbage_collect_drawables(Display * dpy) +{ + struct apple_glx_drawable *d, *dnext; + Window root; + int x, y; + unsigned int width, height, bd, depth; + int (*old_handler) (Display *, XErrorEvent *); + + + if (NULL == drawables_list) + return; + + old_handler = XSetErrorHandler(error_handler); + + XSync(dpy, False); + + lock_drawables_list(); + + for (d = drawables_list; d;) { + dnext = d->next; + + d->lock(d); + + if (d->reference_count > 0) { + /* + * Skip this, because some context still retains a reference + * to the drawable. + */ + d->unlock(d); + d = dnext; + continue; + } + + d->unlock(d); + + error_count = 0; + + /* + * Mesa uses XGetWindowAttributes, but some of these things are + * most definitely not Windows, and that's against the rules. + * XGetGeometry on the other hand is legal with a Pixmap and Window. + */ + XGetGeometry(dpy, d->drawable, &root, &x, &y, &width, &height, &bd, + &depth); + + if (error_count > 0) { + /* + * Note: this may not actually destroy the drawable. + * If another context retains a reference to the drawable + * after the reference count test above. + */ + (void) destroy_drawable(d); + error_count = 0; + } + + d = dnext; + } + + XSetErrorHandler(old_handler); + + unlock_drawables_list(); +} + +unsigned int +apple_glx_get_drawable_count(void) +{ + unsigned int result = 0; + struct apple_glx_drawable *d; + + lock_drawables_list(); + + for (d = drawables_list; d; d = d->next) + ++result; + + unlock_drawables_list(); + + return result; +} + +struct apple_glx_drawable * +apple_glx_drawable_find_by_type(GLXDrawable drawable, int type, int flags) +{ + struct apple_glx_drawable *d; + + lock_drawables_list(); + + for (d = drawables_list; d; d = d->next) { + if (d->type == type && d->drawable == drawable) { + if (flags & APPLE_GLX_DRAWABLE_REFERENCE) + d->reference(d); + + if (flags & APPLE_GLX_DRAWABLE_LOCK) + d->lock(d); + + unlock_drawables_list(); + + return d; + } + } + + unlock_drawables_list(); + + return NULL; +} + +struct apple_glx_drawable * +apple_glx_drawable_find(GLXDrawable drawable, int flags) +{ + struct apple_glx_drawable *d; + + lock_drawables_list(); + + for (d = drawables_list; d; d = d->next) { + if (d->drawable == drawable) { + if (flags & APPLE_GLX_DRAWABLE_REFERENCE) + d->reference(d); + + if (flags & APPLE_GLX_DRAWABLE_LOCK) + d->lock(d); + + unlock_drawables_list(); + + return d; + } + } + + unlock_drawables_list(); + + return NULL; +} + +/* Return true if the type is valid for the drawable. */ +bool +apple_glx_drawable_destroy_by_type(Display * dpy, + GLXDrawable drawable, int type) +{ + struct apple_glx_drawable *d; + + lock_drawables_list(); + + for (d = drawables_list; d; d = d->next) { + if (drawable == d->drawable && type == d->type) { + /* + * The user has requested that we destroy this resource. + * However, there may be references in the contexts to it, so + * release it, and call destroy_drawable which doesn't destroy + * if the reference_count is > 0. + */ + d->release(d); + + apple_glx_diagnostic("%s d->reference_count %d\n", + __func__, d->reference_count); + + destroy_drawable(d); + unlock_drawables_list(); + return true; + } + } + + unlock_drawables_list(); + + return false; +} + +struct apple_glx_drawable * +apple_glx_drawable_find_by_uid(unsigned int uid, int flags) +{ + struct apple_glx_drawable *d; + + lock_drawables_list(); + + for (d = drawables_list; d; d = d->next) { + /* Only surfaces have a uid. */ + if (APPLE_GLX_DRAWABLE_SURFACE == d->type) { + if (d->types.surface.uid == uid) { + if (flags & APPLE_GLX_DRAWABLE_REFERENCE) + d->reference(d); + + if (flags & APPLE_GLX_DRAWABLE_LOCK) + d->lock(d); + + unlock_drawables_list(); + + return d; + } + } + } + + unlock_drawables_list(); + + return NULL; +} diff --git a/src/glx/apple/apple_glx_drawable.h b/src/glx/apple/apple_glx_drawable.h new file mode 100644 index 00000000000..e49eae355e9 --- /dev/null +++ b/src/glx/apple/apple_glx_drawable.h @@ -0,0 +1,227 @@ +/* + Copyright (c) 2008, 2009 Apple Inc. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT + HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name(s) of the above + copyright holders shall not be used in advertising or otherwise to + promote the sale, use or other dealings in this Software without + prior written authorization. +*/ +#ifndef APPLE_GLX_DRAWABLE_H +#define APPLE_GLX_DRAWABLE_H + +/* Must be first for: + * <rdar://problem/6953344> + */ +#include "apple_glx_context.h" + +#include <pthread.h> +#include <stdbool.h> +#include <limits.h> +#include <GL/glx.h> +#define XP_NO_X_HEADERS +#include <Xplugin.h> +#undef XP_NO_X_HEADERS + +enum +{ + APPLE_GLX_DRAWABLE_SURFACE = 1, + APPLE_GLX_DRAWABLE_PBUFFER, + APPLE_GLX_DRAWABLE_PIXMAP +}; + +/* The flag for the find routine. */ +enum +{ + APPLE_GLX_DRAWABLE_LOCK = 2, + APPLE_GLX_DRAWABLE_REFERENCE = 4 +}; + +struct apple_glx_context; +struct apple_glx_drawable; + +struct apple_glx_surface +{ + xp_surface_id surface_id; + unsigned int uid; + bool pending_destroy; +}; + +struct apple_glx_pbuffer +{ + GLXPbuffer xid; /* our pixmap */ + int width, height; + GLint fbconfigID; + CGLPBufferObj buffer_obj; + unsigned long event_mask; +}; + +struct apple_glx_pixmap +{ + GLXPixmap xpixmap; + void *buffer; + int width, height, pitch, /*bytes per pixel */ bpp; + size_t size; + char path[PATH_MAX]; + int fd; + CGLPixelFormatObj pixel_format_obj; + CGLContextObj context_obj; + GLint fbconfigID; +}; + +struct apple_glx_drawable_callbacks +{ + int type; + bool(*make_current) (struct apple_glx_context * ac, + struct apple_glx_drawable * d); + void (*destroy) (Display * dpy, struct apple_glx_drawable * d); +}; + +struct apple_glx_drawable +{ + Display *display; + int reference_count; + GLXDrawable drawable; + int type; /* APPLE_GLX_DRAWABLE_* */ + + union + { + struct apple_glx_pixmap pixmap; + struct apple_glx_pbuffer pbuffer; + struct apple_glx_surface surface; + } types; + + struct apple_glx_drawable_callbacks callbacks; + + /* + * This mutex protects the reference count and any other drawable data. + * It's used to prevent an early release of a drawable. + */ + pthread_mutex_t mutex; + void (*lock) (struct apple_glx_drawable * agd); + void (*unlock) (struct apple_glx_drawable * agd); + + void (*reference) (struct apple_glx_drawable * agd); + void (*release) (struct apple_glx_drawable * agd); + + bool(*destroy) (struct apple_glx_drawable * agd); + + bool(*is_pbuffer) (struct apple_glx_drawable * agd); + + bool(*is_pixmap) (struct apple_glx_drawable * agd); + +/*BEGIN These are used for the mixed mode drawing... */ + int width, height; + int row_bytes; + char path[PATH_MAX]; + int fd; /* The file descriptor for this drawable's shared memory. */ + void *buffer; /* The memory for the drawable. Typically shared memory. */ + size_t buffer_length; + /*END*/ struct apple_glx_drawable *previous, *next; +}; + +struct apple_glx_context; + +/* May return NULL if not found */ +struct apple_glx_drawable *apple_glx_find_drawable(Display * dpy, + GLXDrawable drawable); + +/* Returns true on error and locks the agd result with a reference. */ +bool apple_glx_drawable_create(Display * dpy, + int screen, + GLXDrawable drawable, + struct apple_glx_drawable **agd, + struct apple_glx_drawable_callbacks + *callbacks); + +/* Returns true on error */ +bool apple_glx_create_drawable(Display * dpy, + struct apple_glx_context *ac, + GLXDrawable drawable, + struct apple_glx_drawable **agd); + +void apple_glx_garbage_collect_drawables(Display * dpy); + +/* + * This returns the total number of drawables. + * It's mostly intended for debugging and introspection. + */ +unsigned int apple_glx_get_drawable_count(void); + +struct apple_glx_drawable *apple_glx_drawable_find_by_type(GLXDrawable + drawable, int type, + int flags); + +struct apple_glx_drawable *apple_glx_drawable_find(GLXDrawable drawable, + int flags); + + +bool apple_glx_drawable_destroy_by_type(Display * dpy, GLXDrawable drawable, + int type); + +struct apple_glx_drawable *apple_glx_drawable_find_by_uid(unsigned int uid, + int flags); + +/* Surfaces */ + +bool apple_glx_surface_create(Display * dpy, int screen, GLXDrawable drawable, + struct apple_glx_drawable **resultptr); + +void apple_glx_surface_destroy(unsigned int uid); + +/* Pbuffers */ + +/* Returns true if an error occurred. */ +bool apple_glx_pbuffer_create(Display * dpy, GLXFBConfig config, + int width, int height, int *errorcode, + GLXPbuffer * pbuf); + +/* Returns true if the pbuffer was invalid. */ +bool apple_glx_pbuffer_destroy(Display * dpy, GLXPbuffer pbuf); + +/* Returns true if the pbuffer was valid and the attribute. */ +bool apple_glx_pbuffer_query(GLXDrawable d, int attribute, + unsigned int *value); + +/* Returns true if the GLXDrawable is a valid GLXPbuffer, and the mask is set. */ +bool apple_glx_pbuffer_set_event_mask(GLXDrawable d, unsigned long mask); + +/* Returns true if the GLXDrawable is a valid GLXPbuffer, and the *mask is set. */ +bool apple_glx_pbuffer_get_event_mask(GLXDrawable d, unsigned long *mask); + + +/* Pixmaps */ + +/* mode is a __GLcontextModes * */ +/* Returns true if an error occurred. */ +bool apple_glx_pixmap_create(Display * dpy, int screen, Pixmap pixmap, + const void *mode); + +/* Returns true if an error occurred. */ +bool apple_glx_pixmap_destroy(Display * dpy, Pixmap pixmap); + +bool apple_glx_pixmap_query(GLXPixmap pixmap, int attribute, + unsigned int *value); + + + +#endif diff --git a/src/glx/apple/apple_glx_pbuffer.c b/src/glx/apple/apple_glx_pbuffer.c new file mode 100644 index 00000000000..1466fea4874 --- /dev/null +++ b/src/glx/apple/apple_glx_pbuffer.c @@ -0,0 +1,348 @@ +/* + Copyright (c) 2009 Apple Inc. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT + HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name(s) of the above + copyright holders shall not be used in advertising or otherwise to + promote the sale, use or other dealings in this Software without + prior written authorization. +*/ + +/* Must be before OpenGL.framework is included. Remove once fixed: + * <rdar://problem/7872773> + */ +#include <GL/gl.h> +#include <GL/glext.h> +#define __gltypes_h_ 1 + +/* Must be first for: + * <rdar://problem/6953344> + */ +#include "apple_glx_context.h" +#include "apple_glx_drawable.h" + +#include <stdlib.h> +#include <pthread.h> +#include <assert.h> +#include "apple_glx.h" +#include "glcontextmodes.h" +#include "apple_cgl.h" + +/* mesa defines in glew.h, Apple in glext.h. + * Due to namespace nightmares, just do it here. + */ +#ifndef GL_TEXTURE_RECTANGLE_EXT +#define GL_TEXTURE_RECTANGLE_EXT 0x84F5 +#endif + +static bool pbuffer_make_current(struct apple_glx_context *ac, + struct apple_glx_drawable *d); + +static void pbuffer_destroy(Display * dpy, struct apple_glx_drawable *d); + +static struct apple_glx_drawable_callbacks callbacks = { + .type = APPLE_GLX_DRAWABLE_PBUFFER, + .make_current = pbuffer_make_current, + .destroy = pbuffer_destroy +}; + + +/* Return true if an error occurred. */ +bool +pbuffer_make_current(struct apple_glx_context *ac, + struct apple_glx_drawable *d) +{ + struct apple_glx_pbuffer *pbuf = &d->types.pbuffer; + CGLError cglerr; + + assert(APPLE_GLX_DRAWABLE_PBUFFER == d->type); + + cglerr = apple_cgl.set_pbuffer(ac->context_obj, pbuf->buffer_obj, 0, 0, 0); + + if (kCGLNoError != cglerr) { + fprintf(stderr, "set_pbuffer: %s\n", apple_cgl.error_string(cglerr)); + return true; + } + + if (!ac->made_current) { + glViewport(0, 0, pbuf->width, pbuf->height); + glScissor(0, 0, pbuf->width, pbuf->height); + ac->made_current = true; + } + + apple_glx_diagnostic("made pbuffer drawable 0x%lx current\n", d->drawable); + + return false; +} + +void +pbuffer_destroy(Display * dpy, struct apple_glx_drawable *d) +{ + struct apple_glx_pbuffer *pbuf = &d->types.pbuffer; + + assert(APPLE_GLX_DRAWABLE_PBUFFER == d->type); + + apple_glx_diagnostic("destroying pbuffer for drawable 0x%lx\n", + d->drawable); + + apple_cgl.destroy_pbuffer(pbuf->buffer_obj); + XFreePixmap(dpy, pbuf->xid); +} + +/* Return true if an error occurred. */ +bool +apple_glx_pbuffer_destroy(Display * dpy, GLXPbuffer pbuf) +{ + return !apple_glx_drawable_destroy_by_type(dpy, pbuf, + APPLE_GLX_DRAWABLE_PBUFFER); +} + +/* Return true if an error occurred. */ +bool +apple_glx_pbuffer_create(Display * dpy, GLXFBConfig config, + int width, int height, int *errorcode, + GLXPbuffer * result) +{ + struct apple_glx_drawable *d; + struct apple_glx_pbuffer *pbuf = NULL; + CGLError err; + Window root; + int screen; + Pixmap xid; + __GLcontextModes *modes = (__GLcontextModes *) config; + + root = DefaultRootWindow(dpy); + screen = DefaultScreen(dpy); + + /* + * This pixmap is only used for a persistent XID. + * The XC-MISC extension cleans up XIDs and reuses them transparently, + * so we need to retain a server-side reference. + */ + xid = XCreatePixmap(dpy, root, (unsigned int) 1, + (unsigned int) 1, DefaultDepth(dpy, screen)); + + if (None == xid) { + *errorcode = BadAlloc; + return true; + } + + if (apple_glx_drawable_create(dpy, screen, xid, &d, &callbacks)) { + *errorcode = BadAlloc; + return true; + } + + /* The lock is held in d from create onward. */ + pbuf = &d->types.pbuffer; + + pbuf->xid = xid; + pbuf->width = width; + pbuf->height = height; + + err = apple_cgl.create_pbuffer(width, height, GL_TEXTURE_RECTANGLE_EXT, + (modes->alphaBits > 0) ? GL_RGBA : GL_RGB, + 0, &pbuf->buffer_obj); + + if (kCGLNoError != err) { + d->unlock(d); + d->destroy(d); + *errorcode = BadMatch; + return true; + } + + pbuf->fbconfigID = modes->fbconfigID; + + pbuf->event_mask = 0; + + *result = pbuf->xid; + + d->unlock(d); + + return false; +} + + + +/* Return true if an error occurred. */ +static bool +get_max_size(int *widthresult, int *heightresult) +{ + CGLContextObj oldcontext; + GLint ar[2]; + + oldcontext = apple_cgl.get_current_context(); + + if (!oldcontext) { + /* + * There is no current context, so we need to make one in order + * to call glGetInteger. + */ + CGLPixelFormatObj pfobj; + CGLError err; + CGLPixelFormatAttribute attr[10]; + int c = 0; + GLint vsref = 0; + CGLContextObj newcontext; + + attr[c++] = kCGLPFAColorSize; + attr[c++] = 32; + attr[c++] = 0; + + err = apple_cgl.choose_pixel_format(attr, &pfobj, &vsref); + if (kCGLNoError != err) { + if (getenv("LIBGL_DIAGNOSTIC")) { + printf("choose_pixel_format error in %s: %s\n", __func__, + apple_cgl.error_string(err)); + } + + return true; + } + + + err = apple_cgl.create_context(pfobj, NULL, &newcontext); + + if (kCGLNoError != err) { + if (getenv("LIBGL_DIAGNOSTIC")) { + printf("create_context error in %s: %s\n", __func__, + apple_cgl.error_string(err)); + } + + apple_cgl.destroy_pixel_format(pfobj); + + return true; + } + + err = apple_cgl.set_current_context(newcontext); + + if (kCGLNoError != err) { + printf("set_current_context error in %s: %s\n", __func__, + apple_cgl.error_string(err)); + return true; + } + + + glGetIntegerv(GL_MAX_VIEWPORT_DIMS, ar); + + apple_cgl.set_current_context(oldcontext); + apple_cgl.destroy_context(newcontext); + apple_cgl.destroy_pixel_format(pfobj); + } + else { + /* We have a valid context. */ + + glGetIntegerv(GL_MAX_VIEWPORT_DIMS, ar); + } + + *widthresult = ar[0]; + *heightresult = ar[1]; + + return false; +} + +bool +apple_glx_pbuffer_query(GLXPbuffer p, int attr, unsigned int *value) +{ + bool result = false; + struct apple_glx_drawable *d; + struct apple_glx_pbuffer *pbuf; + + d = apple_glx_drawable_find_by_type(p, APPLE_GLX_DRAWABLE_PBUFFER, + APPLE_GLX_DRAWABLE_LOCK); + + if (d) { + pbuf = &d->types.pbuffer; + + switch (attr) { + case GLX_WIDTH: + *value = pbuf->width; + result = true; + break; + + case GLX_HEIGHT: + *value = pbuf->height; + result = true; + break; + + case GLX_PRESERVED_CONTENTS: + *value = true; + result = true; + break; + + case GLX_LARGEST_PBUFFER:{ + int width, height; + if (get_max_size(&width, &height)) { + fprintf(stderr, "internal error: " + "unable to find the largest pbuffer!\n"); + } + else { + *value = width; + result = true; + } + } + break; + + case GLX_FBCONFIG_ID: + *value = pbuf->fbconfigID; + result = true; + break; + } + + d->unlock(d); + } + + return result; +} + +bool +apple_glx_pbuffer_set_event_mask(GLXDrawable drawable, unsigned long mask) +{ + struct apple_glx_drawable *d; + bool result = false; + + d = apple_glx_drawable_find_by_type(drawable, APPLE_GLX_DRAWABLE_PBUFFER, + APPLE_GLX_DRAWABLE_LOCK); + + if (d) { + d->types.pbuffer.event_mask = mask; + result = true; + d->unlock(d); + } + + return result; +} + +bool +apple_glx_pbuffer_get_event_mask(GLXDrawable drawable, unsigned long *mask) +{ + struct apple_glx_drawable *d; + bool result = false; + + d = apple_glx_drawable_find_by_type(drawable, APPLE_GLX_DRAWABLE_PBUFFER, + APPLE_GLX_DRAWABLE_LOCK); + if (d) { + *mask = d->types.pbuffer.event_mask; + result = true; + d->unlock(d); + } + + return result; +} diff --git a/src/glx/apple/apple_glx_pixmap.c b/src/glx/apple/apple_glx_pixmap.c new file mode 100644 index 00000000000..af1791afb70 --- /dev/null +++ b/src/glx/apple/apple_glx_pixmap.c @@ -0,0 +1,230 @@ +/* + Copyright (c) 2009 Apple Inc. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT + HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name(s) of the above + copyright holders shall not be used in advertising or otherwise to + promote the sale, use or other dealings in this Software without + prior written authorization. +*/ + +#include <stdio.h> +#include <stdlib.h> +#include <pthread.h> +#include <fcntl.h> +#include <sys/types.h> +#include <sys/mman.h> +#include <unistd.h> +#include <assert.h> +#include "apple_glx.h" +#include "apple_cgl.h" +#include "apple_visual.h" +#include "apple_glx_drawable.h" +#include "appledri.h" +#include "glcontextmodes.h" + +static bool pixmap_make_current(struct apple_glx_context *ac, + struct apple_glx_drawable *d); + +static void pixmap_destroy(Display * dpy, struct apple_glx_drawable *d); + +static struct apple_glx_drawable_callbacks callbacks = { + .type = APPLE_GLX_DRAWABLE_PIXMAP, + .make_current = pixmap_make_current, + .destroy = pixmap_destroy +}; + +static bool +pixmap_make_current(struct apple_glx_context *ac, + struct apple_glx_drawable *d) +{ + CGLError cglerr; + struct apple_glx_pixmap *p = &d->types.pixmap; + + assert(APPLE_GLX_DRAWABLE_PIXMAP == d->type); + + cglerr = apple_cgl.set_current_context(p->context_obj); + + if (kCGLNoError != cglerr) { + fprintf(stderr, "set current context: %s\n", + apple_cgl.error_string(cglerr)); + return true; + } + + cglerr = apple_cgl.set_off_screen(p->context_obj, p->width, p->height, + p->pitch, p->buffer); + + if (kCGLNoError != cglerr) { + fprintf(stderr, "set off screen: %s\n", apple_cgl.error_string(cglerr)); + + return true; + } + + if (!ac->made_current) { + glViewport(0, 0, p->width, p->height); + glScissor(0, 0, p->width, p->height); + ac->made_current = true; + } + + return false; +} + +static void +pixmap_destroy(Display * dpy, struct apple_glx_drawable *d) +{ + struct apple_glx_pixmap *p = &d->types.pixmap; + + if (p->pixel_format_obj) + (void) apple_cgl.destroy_pixel_format(p->pixel_format_obj); + + if (p->context_obj) + (void) apple_cgl.destroy_context(p->context_obj); + + XAppleDRIDestroyPixmap(dpy, p->xpixmap); + + if (p->buffer) { + if (munmap(p->buffer, p->size)) + perror("munmap"); + + if (-1 == close(p->fd)) + perror("close"); + + if (shm_unlink(p->path)) + perror("shm_unlink"); + } + + apple_glx_diagnostic("destroyed pixmap buffer for: 0x%lx\n", d->drawable); +} + +/* Return true if an error occurred. */ +bool +apple_glx_pixmap_create(Display * dpy, int screen, Pixmap pixmap, + const void *mode) +{ + struct apple_glx_drawable *d; + struct apple_glx_pixmap *p; + bool double_buffered; + bool uses_stereo; + CGLError error; + const __GLcontextModes *cmodes = mode; + + if (apple_glx_drawable_create(dpy, screen, pixmap, &d, &callbacks)) + return true; + + /* d is locked and referenced at this point. */ + + p = &d->types.pixmap; + + p->xpixmap = pixmap; + p->buffer = NULL; + + if (!XAppleDRICreatePixmap(dpy, screen, pixmap, + &p->width, &p->height, &p->pitch, &p->bpp, + &p->size, p->path, PATH_MAX)) { + d->unlock(d); + d->destroy(d); + return true; + } + + p->fd = shm_open(p->path, O_RDWR, 0); + + if (p->fd < 0) { + perror("shm_open"); + d->unlock(d); + d->destroy(d); + return true; + } + + p->buffer = mmap(NULL, p->size, PROT_READ | PROT_WRITE, + MAP_FILE | MAP_SHARED, p->fd, 0); + + if (MAP_FAILED == p->buffer) { + perror("mmap"); + d->unlock(d); + d->destroy(d); + return true; + } + + apple_visual_create_pfobj(&p->pixel_format_obj, mode, &double_buffered, + &uses_stereo, /*offscreen */ true); + + error = apple_cgl.create_context(p->pixel_format_obj, NULL, + &p->context_obj); + + if (kCGLNoError != error) { + d->unlock(d); + d->destroy(d); + return true; + } + + p->fbconfigID = cmodes->fbconfigID; + + d->unlock(d); + + apple_glx_diagnostic("created: pixmap buffer for 0x%lx\n", d->drawable); + + return false; +} + +bool +apple_glx_pixmap_query(GLXPixmap pixmap, int attr, unsigned int *value) +{ + struct apple_glx_drawable *d; + struct apple_glx_pixmap *p; + bool result = false; + + d = apple_glx_drawable_find_by_type(pixmap, APPLE_GLX_DRAWABLE_PIXMAP, + APPLE_GLX_DRAWABLE_LOCK); + + if (d) { + p = &d->types.pixmap; + + switch (attr) { + case GLX_WIDTH: + *value = p->width; + result = true; + break; + + case GLX_HEIGHT: + *value = p->height; + result = true; + break; + + case GLX_FBCONFIG_ID: + *value = p->fbconfigID; + result = true; + break; + } + + d->unlock(d); + } + + return result; +} + +/* Return true if the type is valid for pixmap. */ +bool +apple_glx_pixmap_destroy(Display * dpy, GLXPixmap pixmap) +{ + return !apple_glx_drawable_destroy_by_type(dpy, pixmap, + APPLE_GLX_DRAWABLE_PIXMAP); +} diff --git a/src/glx/apple/apple_glx_surface.c b/src/glx/apple/apple_glx_surface.c new file mode 100644 index 00000000000..6db2910a464 --- /dev/null +++ b/src/glx/apple/apple_glx_surface.c @@ -0,0 +1,224 @@ +/* + Copyright (c) 2009 Apple Inc. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT + HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name(s) of the above + copyright holders shall not be used in advertising or otherwise to + promote the sale, use or other dealings in this Software without + prior written authorization. +*/ +#include <assert.h> +#include "glxclient.h" +#include "apple_glx.h" +#include "appledri.h" +#include "apple_glx_drawable.h" + +static bool surface_make_current(struct apple_glx_context *ac, + struct apple_glx_drawable *d); + +static void surface_destroy(Display * dpy, struct apple_glx_drawable *d); + + +static struct apple_glx_drawable_callbacks callbacks = { + .type = APPLE_GLX_DRAWABLE_SURFACE, + .make_current = surface_make_current, + .destroy = surface_destroy +}; + +static void +update_viewport_and_scissor(Display * dpy, GLXDrawable drawable) +{ + Window root; + int x, y; + unsigned int width = 0, height = 0, bd, depth; + + XGetGeometry(dpy, drawable, &root, &x, &y, &width, &height, &bd, &depth); + + glViewport(0, 0, width, height); + glScissor(0, 0, width, height); +} + +static bool +surface_make_current(struct apple_glx_context *ac, + struct apple_glx_drawable *d) +{ + struct apple_glx_surface *s = &d->types.surface; + xp_error error; + + assert(APPLE_GLX_DRAWABLE_SURFACE == d->type); + + apple_glx_diagnostic("%s: ac->context_obj %p s->surface_id %u\n", + __func__, (void *) ac->context_obj, s->surface_id); + + error = xp_attach_gl_context(ac->context_obj, s->surface_id); + + if (error) { + fprintf(stderr, "error: xp_attach_gl_context returned: %d\n", error); + return true; + } + + + if (!ac->made_current) { + /* + * The first time a new context is made current the glViewport + * and glScissor should be updated. + */ + update_viewport_and_scissor(ac->drawable->display, + ac->drawable->drawable); + ac->made_current = true; + } + + apple_glx_diagnostic("%s: drawable 0x%lx\n", __func__, d->drawable); + + return false; +} + +static void +surface_destroy(Display * dpy, struct apple_glx_drawable *d) +{ + struct apple_glx_surface *s = &d->types.surface; + + apple_glx_diagnostic("%s: s->surface_id %u\n", __func__, s->surface_id); + + xp_error error = xp_destroy_surface(s->surface_id); + + if (error) { + fprintf(stderr, "xp_destroy_surface error: %d\n", (int) error); + } + + /* + * Check if this surface destroy came from the surface being destroyed + * on the server. If s->pending_destroy is true, then it did, and + * we don't want to try to destroy the surface on the server. + */ + if (!s->pending_destroy) { + /* + * Warning: this causes other routines to be called (potentially) + * from surface_notify_handler. It's probably best to not have + * any locks at this point locked. + */ + XAppleDRIDestroySurface(d->display, DefaultScreen(d->display), + d->drawable); + + apple_glx_diagnostic + ("%s: destroyed a surface for drawable 0x%lx uid %u\n", __func__, + d->drawable, s->uid); + } +} + +/* Return true if an error occured. */ +static bool +create_surface(Display * dpy, int screen, struct apple_glx_drawable *d) +{ + struct apple_glx_surface *s = &d->types.surface; + unsigned int key[2]; + xp_client_id id; + + id = apple_glx_get_client_id(); + if (0 == id) + return true; + + assert(None != d->drawable); + + s->pending_destroy = false; + + if (XAppleDRICreateSurface(dpy, screen, d->drawable, id, key, &s->uid)) { + xp_error error; + + error = xp_import_surface(key, &s->surface_id); + + if (error) { + fprintf(stderr, "error: xp_import_surface returned: %d\n", error); + return true; + } + + apple_glx_diagnostic("%s: created a surface for drawable 0x%lx" + " with uid %u\n", __func__, d->drawable, s->uid); + return false; /*success */ + } + + return true; /* unable to create a surface. */ +} + +/* Return true if an error occured. */ +/* This returns a referenced object via resultptr. */ +bool +apple_glx_surface_create(Display * dpy, int screen, + GLXDrawable drawable, + struct apple_glx_drawable ** resultptr) +{ + struct apple_glx_drawable *d; + + if (apple_glx_drawable_create(dpy, screen, drawable, &d, &callbacks)) + return true; + + /* apple_glx_drawable_create creates a locked and referenced object. */ + + if (create_surface(dpy, screen, d)) { + d->unlock(d); + d->destroy(d); + return true; + } + + *resultptr = d; + + d->unlock(d); + + return false; +} + +/* + * All surfaces are reference counted, and surfaces are only created + * when the window is made current. When all contexts no longer reference + * a surface drawable the apple_glx_drawable gets destroyed, and thus + * its surface is destroyed. + * + * However we can make the destruction occur a bit sooner by setting + * pending_destroy, which is then checked for in glViewport by + * apple_glx_context_update. + */ +void +apple_glx_surface_destroy(unsigned int uid) +{ + struct apple_glx_drawable *d; + + d = apple_glx_drawable_find_by_uid(uid, APPLE_GLX_DRAWABLE_REFERENCE + | APPLE_GLX_DRAWABLE_LOCK); + + if (d) { + d->types.surface.pending_destroy = true; + d->release(d); + /* + * We release 2 references to the surface. One was acquired by + * the find, and the other was leftover from a context, or + * the surface being displayed, so the destroy() will decrease it + * once more. + * + * If the surface is in a context, it will take one d->destroy(d); + * to actually destroy it when the pending_destroy is processed + * by a glViewport callback (see apple_glx_context_update()). + */ + d->destroy(d); + + d->unlock(d); + } +} diff --git a/src/glx/apple/apple_visual.c b/src/glx/apple/apple_visual.c new file mode 100644 index 00000000000..da5aa05fd50 --- /dev/null +++ b/src/glx/apple/apple_visual.c @@ -0,0 +1,153 @@ +/* + Copyright (c) 2008, 2009 Apple Inc. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT + HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name(s) of the above + copyright holders shall not be used in advertising or otherwise to + promote the sale, use or other dealings in this Software without + prior written authorization. +*/ + +#include <stdbool.h> +#include <stdio.h> +#include <stdlib.h> +#include <assert.h> +#include <GL/gl.h> + +/* <rdar://problem/6953344> */ +#define glTexImage1D glTexImage1D_OSX +#define glTexImage2D glTexImage2D_OSX +#define glTexImage3D glTexImage3D_OSX +#include <OpenGL/OpenGL.h> +#include <OpenGL/CGLContext.h> +#include <OpenGL/CGLRenderers.h> +#undef glTexImage1D +#undef glTexImage2D +#undef glTexImage3D + +#include "apple_cgl.h" +#include "apple_visual.h" +#include "apple_glx.h" +#include "glcontextmodes.h" + +enum +{ + MAX_ATTR = 60 +}; + +/*mode is a __GlcontextModes*/ +void +apple_visual_create_pfobj(CGLPixelFormatObj * pfobj, const void *mode, + bool * double_buffered, bool * uses_stereo, + bool offscreen) +{ + CGLPixelFormatAttribute attr[MAX_ATTR]; + const __GLcontextModes *c = mode; + int numattr = 0; + GLint vsref = 0; + CGLError error = 0; + + if (offscreen) { + apple_glx_diagnostic + ("offscreen rendering enabled. Using kCGLPFAOffScreen\n"); + + attr[numattr++] = kCGLPFAOffScreen; + attr[numattr++] = kCGLPFAColorSize; + attr[numattr++] = 32; + } + else if (getenv("LIBGL_ALWAYS_SOFTWARE") != NULL) { + apple_glx_diagnostic + ("Software rendering requested. Using kCGLRendererGenericFloatID.\n"); + attr[numattr++] = kCGLPFARendererID; + attr[numattr++] = kCGLRendererGenericFloatID; + } + else if (getenv("LIBGL_ALLOW_SOFTWARE") != NULL) { + apple_glx_diagnostic + ("Software rendering is not being excluded. Not using kCGLPFAAccelerated.\n"); + } + else { + attr[numattr++] = kCGLPFAAccelerated; + } + + /* + * The program chose a config based on the fbconfigs or visuals. + * Those are based on the attributes from CGL, so we probably + * do want the closest match for the color, depth, and accum. + */ + attr[numattr++] = kCGLPFAClosestPolicy; + + if (c->stereoMode) { + attr[numattr++] = kCGLPFAStereo; + *uses_stereo = true; + } + else { + *uses_stereo = false; + } + + if (c->doubleBufferMode) { + attr[numattr++] = kCGLPFADoubleBuffer; + *double_buffered = true; + } + else { + *double_buffered = false; + } + + attr[numattr++] = kCGLPFAColorSize; + attr[numattr++] = c->redBits + c->greenBits + c->blueBits; + attr[numattr++] = kCGLPFAAlphaSize; + attr[numattr++] = c->alphaBits; + + if ((c->accumRedBits + c->accumGreenBits + c->accumBlueBits) > 0) { + attr[numattr++] = kCGLPFAAccumSize; + attr[numattr++] = c->accumRedBits + c->accumGreenBits + + c->accumBlueBits + c->accumAlphaBits; + } + + if (c->depthBits > 0) { + attr[numattr++] = kCGLPFADepthSize; + attr[numattr++] = c->depthBits; + } + + if (c->stencilBits > 0) { + attr[numattr++] = kCGLPFAStencilSize; + attr[numattr++] = c->stencilBits; + } + + if (c->sampleBuffers > 0) { + attr[numattr++] = kCGLPFAMultisample; + attr[numattr++] = kCGLPFASampleBuffers; + attr[numattr++] = c->sampleBuffers; + attr[numattr++] = kCGLPFASamples; + attr[numattr++] = c->samples; + } + + attr[numattr++] = 0; + + assert(numattr < MAX_ATTR); + + error = apple_cgl.choose_pixel_format(attr, pfobj, &vsref); + + if (error) { + fprintf(stderr, "error: %s\n", apple_cgl.error_string(error)); + abort(); + } +} diff --git a/src/glx/apple/apple_visual.h b/src/glx/apple/apple_visual.h new file mode 100644 index 00000000000..ebfafa340bf --- /dev/null +++ b/src/glx/apple/apple_visual.h @@ -0,0 +1,41 @@ +/* + Copyright (c) 2008 Apple Inc. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT + HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name(s) of the above + copyright holders shall not be used in advertising or otherwise to + promote the sale, use or other dealings in this Software without + prior written authorization. +*/ + +#ifndef APPLE_VISUAL_H +#define APPLE_VISUAL_H + +#include <stdbool.h> +#include <OpenGL/CGLTypes.h> + +/* mode is expected to be of type __GLcontextModes. */ +void apple_visual_create_pfobj(CGLPixelFormatObj * pfobj, const void *mode, + bool * double_buffered, bool * uses_stereo, + bool offscreen); + +#endif diff --git a/src/glx/apple/apple_xgl_api_additional.c b/src/glx/apple/apple_xgl_api_additional.c new file mode 100644 index 00000000000..7d40afe1d7f --- /dev/null +++ b/src/glx/apple/apple_xgl_api_additional.c @@ -0,0 +1,37 @@ +/* + Copyright (c) 2008, 2009 Apple Inc. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT + HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name(s) of the above + copyright holders shall not be used in advertising or otherwise to + promote the sale, use or other dealings in this Software without + prior written authorization. +*/ + +#define GL_GLEXT_PROTOTYPES +#include <GL/gl.h> + +GLAPI void APIENTRY glTexImage3DEXT(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei + depth, GLint border, GLenum format, GLenum type, const void * pixels) { + glTexImage3D(target, level, (GLint)internalformat, width, height, depth, border, format, type, pixels); +} + diff --git a/src/glx/apple/apple_xgl_api_read.c b/src/glx/apple/apple_xgl_api_read.c new file mode 100644 index 00000000000..0798f45bbfb --- /dev/null +++ b/src/glx/apple/apple_xgl_api_read.c @@ -0,0 +1,133 @@ +/* + Copyright (c) 2008, 2009 Apple Inc. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT + HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name(s) of the above + copyright holders shall not be used in advertising or otherwise to + promote the sale, use or other dealings in this Software without + prior written authorization. +*/ + +/* + * This file works with the glXMakeContextCurrent readable drawable. + * + * The way it works is by swapping the currentDrawable for the currentReadable + * drawable if they are different. + */ +#include <stdbool.h> +#include "glxclient.h" +#include "apple_glx_context.h" +#include "apple_xgl_api.h" + +extern struct apple_xgl_api __gl_api; + +struct apple_xgl_saved_state +{ + bool swapped; +}; + +static void +SetRead(struct apple_xgl_saved_state *saved) +{ + GLXContext gc = __glXGetCurrentContext(); + + /* + * By default indicate that the state was not swapped, so that UnsetRead + * functions correctly. + */ + saved->swapped = false; + + /* + * If the readable drawable isn't the same as the drawable then + * the user has requested a readable drawable with glXMakeContextCurrent(). + * We emulate this behavior by switching the current drawable. + */ + if (None != gc->currentReadable + && gc->currentReadable != gc->currentDrawable) { + Display *dpy = glXGetCurrentDisplay(); + + saved->swapped = true; + + if (apple_glx_make_current_context(dpy, gc->driContext, gc->driContext, + gc->currentReadable)) { + /* An error occurred, so try to restore the old context state. */ + (void) apple_glx_make_current_context(dpy, gc->driContext, gc->driContext, + gc->currentDrawable); + saved->swapped = false; + } + } +} + +static void +UnsetRead(struct apple_xgl_saved_state *saved) +{ + if (saved->swapped) { + GLXContext gc = __glXGetCurrentContext(); + Display *dpy = glXGetCurrentDisplay(); + + if (apple_glx_make_current_context(dpy, gc->driContext, gc->driContext, + gc->currentDrawable)) { + /* + * An error occurred restoring the drawable. + * It's unclear what to do about that. + */ + } + } +} + +void +glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, + GLenum format, GLenum type, void *pixels) +{ + struct apple_xgl_saved_state saved; + + SetRead(&saved); + + __gl_api.ReadPixels(x, y, width, height, format, type, pixels); + + UnsetRead(&saved); +} + +void +glCopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type) +{ + struct apple_xgl_saved_state saved; + + SetRead(&saved); + + __gl_api.CopyPixels(x, y, width, height, type); + + UnsetRead(&saved); +} + +void +glCopyColorTable(GLenum target, GLenum internalformat, GLint x, GLint y, + GLsizei width) +{ + struct apple_xgl_saved_state saved; + + SetRead(&saved); + + __gl_api.CopyColorTable(target, internalformat, x, y, width); + + UnsetRead(&saved); +} diff --git a/src/glx/apple/apple_xgl_api_stereo.c b/src/glx/apple/apple_xgl_api_stereo.c new file mode 100644 index 00000000000..64a15f74861 --- /dev/null +++ b/src/glx/apple/apple_xgl_api_stereo.c @@ -0,0 +1,128 @@ +/* + Copyright (c) 2009 Apple Inc. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT + HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name(s) of the above + copyright holders shall not be used in advertising or otherwise to + promote the sale, use or other dealings in this Software without + prior written authorization. +*/ + +/* This should be removed once stereo hardware bugs are fixed + * <rdar://problem/6729006> + */ + +#include <stdbool.h> + +#define GL_GLEXT_PROTOTYPES +#include <GL/gl.h> +#include <GL/glext.h> + +#include "glxclient.h" +#include "apple_glx_context.h" +#include "apple_xgl_api.h" + +extern struct apple_xgl_api __gl_api; +/* + * These are special functions for stereoscopic support + * differences in MacOS X. + */ +void +glDrawBuffer(GLenum mode) +{ + GLXContext gc = glXGetCurrentContext(); + + if (gc && apple_glx_context_uses_stereo(gc->driContext)) { + GLenum buf[2]; + GLsizei n = 0; + + switch (mode) { + case GL_BACK: + buf[0] = GL_BACK_LEFT; + buf[1] = GL_BACK_RIGHT; + n = 2; + break; + case GL_FRONT: + buf[0] = GL_FRONT_LEFT; + buf[1] = GL_FRONT_RIGHT; + n = 2; + break; + + default: + buf[0] = mode; + n = 1; + break; + } + + __gl_api.DrawBuffers(n, buf); + } + else { + __gl_api.DrawBuffer(mode); + } +} + + +void +glDrawBuffers(GLsizei n, const GLenum * bufs) +{ + GLXContext gc = glXGetCurrentContext(); + + if (gc && apple_glx_context_uses_stereo(gc->driContext)) { + GLenum newbuf[n + 2]; + GLsizei i, outi = 0; + bool have_back = false; + bool have_front = false; + + for (i = 0; i < n; ++i) { + if (GL_BACK == bufs[i]) { + have_back = true; + } + else if (GL_FRONT == bufs[i]) { + have_back = true; + } + else { + newbuf[outi++] = bufs[i]; + } + } + + if (have_back) { + newbuf[outi++] = GL_BACK_LEFT; + newbuf[outi++] = GL_BACK_RIGHT; + } + + if (have_front) { + newbuf[outi++] = GL_FRONT_LEFT; + newbuf[outi++] = GL_FRONT_RIGHT; + } + + __gl_api.DrawBuffers(outi, newbuf); + } + else { + __gl_api.DrawBuffers(n, bufs); + } +} + +void +glDrawBuffersARB(GLsizei n, const GLenum * bufs) +{ + glDrawBuffers(n, bufs); +} diff --git a/src/glx/apple/apple_xgl_api_viewport.c b/src/glx/apple/apple_xgl_api_viewport.c new file mode 100644 index 00000000000..e39ab152235 --- /dev/null +++ b/src/glx/apple/apple_xgl_api_viewport.c @@ -0,0 +1,46 @@ +/* + Copyright (c) 2009 Apple Inc. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT + HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name(s) of the above + copyright holders shall not be used in advertising or otherwise to + promote the sale, use or other dealings in this Software without + prior written authorization. +*/ + +#include "glxclient.h" +#include "apple_glx_context.h" +#include "apple_xgl_api.h" + +extern struct apple_xgl_api __gl_api; + +void +glViewport(GLint x, GLint y, GLsizei width, GLsizei height) +{ + GLXContext gc = __glXGetCurrentContext(); + Display *dpy = glXGetCurrentDisplay(); + + if (gc && gc->driContext) + apple_glx_context_update(dpy, gc->driContext); + + __gl_api.Viewport(x, y, width, height); +} diff --git a/src/glx/apple/appledri.c b/src/glx/apple/appledri.c new file mode 100644 index 00000000000..4f2e8f99149 --- /dev/null +++ b/src/glx/apple/appledri.c @@ -0,0 +1,452 @@ +/* $XFree86: xc/lib/GL/dri/XF86dri.c,v 1.12 2001/08/27 17:40:57 dawes Exp $ */ +/************************************************************************** + +Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. +Copyright 2000 VA Linux Systems, Inc. +Copyright (c) 2002, 2008 Apple Computer, Inc. +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sub license, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice (including the +next paragraph) shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. +IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* + * Authors: + * Kevin E. Martin <[email protected]> + * Jens Owen <[email protected]> + * Rickard E. (Rik) Faith <[email protected]> + * + */ + +/* THIS IS NOT AN X CONSORTIUM STANDARD */ + +#define NEED_EVENTS +#define NEED_REPLIES +#include <X11/Xlibint.h> +#include "appledristr.h" +#include <X11/extensions/Xext.h> +#include <X11/extensions/extutil.h> +#include <stdio.h> + +static XExtensionInfo _appledri_info_data; +static XExtensionInfo *appledri_info = &_appledri_info_data; +static char *appledri_extension_name = APPLEDRINAME; + +#define AppleDRICheckExtension(dpy,i,val) \ + XextCheckExtension (dpy, i, appledri_extension_name, val) + +/***************************************************************************** + * * + * private utility routines * + * * + *****************************************************************************/ + +static int close_display(Display * dpy, XExtCodes * extCodes); +static Bool wire_to_event(Display * dpy, XEvent * re, xEvent * event); + +static /* const */ XExtensionHooks appledri_extension_hooks = { + NULL, /* create_gc */ + NULL, /* copy_gc */ + NULL, /* flush_gc */ + NULL, /* free_gc */ + NULL, /* create_font */ + NULL, /* free_font */ + close_display, /* close_display */ + wire_to_event, /* wire_to_event */ + NULL, /* event_to_wire */ + NULL, /* error */ + NULL, /* error_string */ +}; + +static +XEXT_GENERATE_FIND_DISPLAY(find_display, appledri_info, + appledri_extension_name, + &appledri_extension_hooks, + AppleDRINumberEvents, NULL) + + static XEXT_GENERATE_CLOSE_DISPLAY(close_display, appledri_info) + + static void (*surface_notify_handler) (); + + void *XAppleDRISetSurfaceNotifyHandler(void (*fun) ()) +{ + void *old = surface_notify_handler; + surface_notify_handler = fun; + return old; +} + +static Bool +wire_to_event(Display *dpy, XEvent *re, xEvent *event) +{ + XExtDisplayInfo *info = find_display(dpy); + xAppleDRINotifyEvent *sevent; + + AppleDRICheckExtension(dpy, info, False); + + switch ((event->u.u.type & 0x7f) - info->codes->first_event) { + case AppleDRISurfaceNotify: + sevent = (xAppleDRINotifyEvent *) event; + if (surface_notify_handler != NULL) { + (*surface_notify_handler) (dpy, (unsigned int) sevent->arg, + (int) sevent->kind); + } + return False; + } + return False; +} + +/***************************************************************************** + * * + * public Apple-DRI Extension routines * + * * + *****************************************************************************/ + +#if 0 +#include <stdio.h> +#define TRACE(msg) fprintf(stderr, "AppleDRI%s\n", msg); +#else +#define TRACE(msg) +#endif + + +Bool +XAppleDRIQueryExtension(dpy, event_basep, error_basep) + Display *dpy; + int *event_basep, *error_basep; +{ + XExtDisplayInfo *info = find_display(dpy); + + TRACE("QueryExtension..."); + if (XextHasExtension(info)) { + *event_basep = info->codes->first_event; + *error_basep = info->codes->first_error; + TRACE("QueryExtension... return True"); + return True; + } + else { + TRACE("QueryExtension... return False"); + return False; + } +} + +Bool +XAppleDRIQueryVersion(dpy, majorVersion, minorVersion, patchVersion) + Display *dpy; + int *majorVersion; + int *minorVersion; + int *patchVersion; +{ + XExtDisplayInfo *info = find_display(dpy); + xAppleDRIQueryVersionReply rep; + xAppleDRIQueryVersionReq *req; + + TRACE("QueryVersion..."); + AppleDRICheckExtension(dpy, info, False); + + LockDisplay(dpy); + GetReq(AppleDRIQueryVersion, req); + req->reqType = info->codes->major_opcode; + req->driReqType = X_AppleDRIQueryVersion; + if (!_XReply(dpy, (xReply *) & rep, 0, xFalse)) { + UnlockDisplay(dpy); + SyncHandle(); + TRACE("QueryVersion... return False"); + return False; + } + *majorVersion = rep.majorVersion; + *minorVersion = rep.minorVersion; + *patchVersion = rep.patchVersion; + UnlockDisplay(dpy); + SyncHandle(); + TRACE("QueryVersion... return True"); + return True; +} + +Bool +XAppleDRIQueryDirectRenderingCapable(dpy, screen, isCapable) + Display *dpy; + int screen; + Bool *isCapable; +{ + XExtDisplayInfo *info = find_display(dpy); + xAppleDRIQueryDirectRenderingCapableReply rep; + xAppleDRIQueryDirectRenderingCapableReq *req; + + TRACE("QueryDirectRenderingCapable..."); + AppleDRICheckExtension(dpy, info, False); + + LockDisplay(dpy); + GetReq(AppleDRIQueryDirectRenderingCapable, req); + req->reqType = info->codes->major_opcode; + req->driReqType = X_AppleDRIQueryDirectRenderingCapable; + req->screen = screen; + if (!_XReply(dpy, (xReply *) & rep, 0, xFalse)) { + UnlockDisplay(dpy); + SyncHandle(); + TRACE("QueryDirectRenderingCapable... return False"); + return False; + } + *isCapable = rep.isCapable; + UnlockDisplay(dpy); + SyncHandle(); + TRACE("QueryDirectRenderingCapable... return True"); + return True; +} + +Bool +XAppleDRIAuthConnection(dpy, screen, magic) + Display *dpy; + int screen; + unsigned int magic; +{ + XExtDisplayInfo *info = find_display(dpy); + xAppleDRIAuthConnectionReq *req; + xAppleDRIAuthConnectionReply rep; + + TRACE("AuthConnection..."); + AppleDRICheckExtension(dpy, info, False); + + LockDisplay(dpy); + GetReq(AppleDRIAuthConnection, req); + req->reqType = info->codes->major_opcode; + req->driReqType = X_AppleDRIAuthConnection; + req->screen = screen; + req->magic = magic; + rep.authenticated = 0; + if (!_XReply(dpy, (xReply *) & rep, 0, xFalse) || !rep.authenticated) { + UnlockDisplay(dpy); + SyncHandle(); + TRACE("AuthConnection... return False"); + return False; + } + UnlockDisplay(dpy); + SyncHandle(); + TRACE("AuthConnection... return True"); + return True; +} + +Bool +XAppleDRICreateSurface(dpy, screen, drawable, client_id, key, uid) + Display *dpy; + int screen; + Drawable drawable; + unsigned int client_id; + unsigned int *key; + unsigned int *uid; +{ + XExtDisplayInfo *info = find_display(dpy); + xAppleDRICreateSurfaceReply rep; + xAppleDRICreateSurfaceReq *req; + + TRACE("CreateSurface..."); + AppleDRICheckExtension(dpy, info, False); + + LockDisplay(dpy); + GetReq(AppleDRICreateSurface, req); + req->reqType = info->codes->major_opcode; + req->driReqType = X_AppleDRICreateSurface; + req->screen = screen; + req->drawable = drawable; + req->client_id = client_id; + rep.key_0 = rep.key_1 = rep.uid = 0; + if (!_XReply(dpy, (xReply *) & rep, 0, xFalse) || !rep.key_0) { + UnlockDisplay(dpy); + SyncHandle(); + TRACE("CreateSurface... return False"); + return False; + } + key[0] = rep.key_0; + key[1] = rep.key_1; + *uid = rep.uid; + UnlockDisplay(dpy); + SyncHandle(); + TRACE("CreateSurface... return True"); + return True; +} + +Bool +XAppleDRIDestroySurface(dpy, screen, drawable) + Display *dpy; + int screen; + Drawable drawable; +{ + XExtDisplayInfo *info = find_display(dpy); + xAppleDRIDestroySurfaceReq *req; + + TRACE("DestroySurface..."); + AppleDRICheckExtension(dpy, info, False); + + LockDisplay(dpy); + GetReq(AppleDRIDestroySurface, req); + req->reqType = info->codes->major_opcode; + req->driReqType = X_AppleDRIDestroySurface; + req->screen = screen; + req->drawable = drawable; + UnlockDisplay(dpy); + SyncHandle(); + TRACE("DestroySurface... return True"); + return True; +} + +Bool +XAppleDRICreateSharedBuffer(Display * dpy, int screen, Drawable drawable, + Bool doubleSwap, char *path, size_t pathlen, + int *width, int *height) +{ + XExtDisplayInfo *info = find_display(dpy); + xAppleDRICreateSharedBufferReq *req; + xAppleDRICreateSharedBufferReply rep; + + AppleDRICheckExtension(dpy, info, False); + + LockDisplay(dpy); + GetReq(AppleDRICreateSharedBuffer, req); + req->reqType = info->codes->major_opcode; + req->driReqType = X_AppleDRICreateSharedBuffer; + req->screen = screen; + req->drawable = drawable; + req->doubleSwap = doubleSwap; + + + if (!_XReply(dpy, (xReply *) & rep, 0, xFalse)) { + puts("REPLY ERROR"); + + UnlockDisplay(dpy); + SyncHandle(); + return False; + } + + printf("rep.stringLength %d\n", (int) rep.stringLength); + + if (rep.stringLength > 0 && rep.stringLength <= pathlen) { + _XReadPad(dpy, path, rep.stringLength); + + printf("path: %s\n", path); + + *width = rep.width; + *height = rep.height; + + UnlockDisplay(dpy); + SyncHandle(); + return True; + } + + UnlockDisplay(dpy); + SyncHandle(); + + return False; +} + +Bool +XAppleDRISwapBuffers(Display * dpy, int screen, Drawable drawable) +{ + XExtDisplayInfo *info = find_display(dpy); + xAppleDRISwapBuffersReq *req; + + AppleDRICheckExtension(dpy, info, False); + + LockDisplay(dpy); + GetReq(AppleDRISwapBuffers, req); + req->reqType = info->codes->major_opcode; + req->driReqType = X_AppleDRISwapBuffers; + req->screen = screen; + req->drawable = drawable; + UnlockDisplay(dpy); + SyncHandle(); + + return True; +} + +Bool +XAppleDRICreatePixmap(Display * dpy, int screen, Drawable drawable, + int *width, int *height, int *pitch, int *bpp, + size_t * size, char *bufname, size_t bufnamesize) +{ + XExtDisplayInfo *info = find_display(dpy); + xAppleDRICreatePixmapReq *req; + xAppleDRICreatePixmapReply rep; + + AppleDRICheckExtension(dpy, info, False); + + LockDisplay(dpy); + GetReq(AppleDRICreatePixmap, req); + req->reqType = info->codes->major_opcode; + req->driReqType = X_AppleDRICreatePixmap; + req->screen = screen; + req->drawable = drawable; + + if (!_XReply(dpy, (xReply *) & rep, 0, xFalse)) { + UnlockDisplay(dpy); + SyncHandle(); + return False; + } + + /* + printf("rep.stringLength %d\n", (int) rep.stringLength); + */ + + if (rep.stringLength > 0 && rep.stringLength <= bufnamesize) { + _XReadPad(dpy, bufname, rep.stringLength); + + printf("path: %s\n", bufname); + + *width = rep.width; + *height = rep.height; + *pitch = rep.pitch; + *bpp = rep.bpp; + *size = rep.size; + + UnlockDisplay(dpy); + SyncHandle(); + return True; + } + else if (rep.stringLength > 0) { + _XEatData(dpy, rep.stringLength); + } + + UnlockDisplay(dpy); + SyncHandle(); + + return True; +} + +/* + * Call it a drawable, because we really don't know what it is + * until it reaches the server, and we should keep that in mind. + */ +Bool +XAppleDRIDestroyPixmap(Display * dpy, Pixmap drawable) +{ + XExtDisplayInfo *info = find_display(dpy); + xAppleDRIDestroyPixmapReq *req; + + AppleDRICheckExtension(dpy, info, False); + + LockDisplay(dpy); + GetReq(AppleDRIDestroyPixmap, req); + req->reqType = info->codes->major_opcode; + req->driReqType = X_AppleDRIDestroyPixmap; + req->drawable = drawable; + UnlockDisplay(dpy); + SyncHandle(); + + return True; +} diff --git a/src/glx/apple/appledri.h b/src/glx/apple/appledri.h new file mode 100644 index 00000000000..0108378ca39 --- /dev/null +++ b/src/glx/apple/appledri.h @@ -0,0 +1,124 @@ +/* $XFree86: xc/lib/GL/dri/xf86dri.h,v 1.7 2000/12/07 20:26:02 dawes Exp $ */ +/************************************************************************** + +Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. +Copyright 2000 VA Linux Systems, Inc. +Copyright (c) 2002, 2008, 2009 Apple Computer, Inc. +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sub license, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice (including the +next paragraph) shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. +IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* + * Authors: + * Kevin E. Martin <[email protected]> + * Jens Owen <[email protected]> + * Rickard E. (Rik) Faith <[email protected]> + * + */ + +#ifndef _APPLEDRI_H_ +#define _APPLEDRI_H_ + +#include <X11/Xlib.h> +#include <X11/Xfuncproto.h> + +#define X_AppleDRIQueryVersion 0 +#define X_AppleDRIQueryDirectRenderingCapable 1 +#define X_AppleDRICreateSurface 2 +#define X_AppleDRIDestroySurface 3 +#define X_AppleDRIAuthConnection 4 +#define X_AppleDRICreateSharedBuffer 5 +#define X_AppleDRISwapBuffers 6 +#define X_AppleDRICreatePixmap 7 +#define X_AppleDRIDestroyPixmap 8 + +/* Requests up to and including 18 were used in a previous version */ + +/* Events */ +#define AppleDRIObsoleteEvent1 0 +#define AppleDRIObsoleteEvent2 1 +#define AppleDRIObsoleteEvent3 2 +#define AppleDRISurfaceNotify 3 +#define AppleDRINumberEvents 4 + +/* Errors */ +#define AppleDRIClientNotLocal 0 +#define AppleDRIOperationNotSupported 1 +#define AppleDRINumberErrors (AppleDRIOperationNotSupported + 1) + +/* Kinds of SurfaceNotify events: */ +#define AppleDRISurfaceNotifyChanged 0 +#define AppleDRISurfaceNotifyDestroyed 1 + +#ifndef _APPLEDRI_SERVER_ + +typedef struct +{ + int type; /* of event */ + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came frome a SendEvent request */ + Display *display; /* Display the event was read from */ + Window window; /* window of event */ + Time time; /* server timestamp when event happened */ + int kind; /* subtype of event */ + int arg; +} XAppleDRINotifyEvent; + +_XFUNCPROTOBEGIN + Bool XAppleDRIQueryExtension(Display * dpy, int *event_base, + int *error_base); + +Bool XAppleDRIQueryVersion(Display * dpy, int *majorVersion, + int *minorVersion, int *patchVersion); + +Bool XAppleDRIQueryDirectRenderingCapable(Display * dpy, int screen, + Bool * isCapable); + +void *XAppleDRISetSurfaceNotifyHandler(void (*fun) (Display * dpy, + unsigned uid, int kind)); + +Bool XAppleDRIAuthConnection(Display * dpy, int screen, unsigned int magic); + +Bool XAppleDRICreateSurface(Display * dpy, int screen, Drawable drawable, + unsigned int client_id, unsigned int key[2], + unsigned int *uid); + +Bool XAppleDRIDestroySurface(Display * dpy, int screen, Drawable drawable); + +Bool XAppleDRISynchronizeSurfaces(Display * dpy); + +Bool XAppleDRICreateSharedBuffer(Display * dpy, int screen, Drawable drawable, + Bool doubleSwap, char *path, size_t pathlen, + int *width, int *height); + +Bool XAppleDRISwapBuffers(Display * dpy, int screen, Drawable drawable); + +Bool XAppleDRICreatePixmap(Display * dpy, int screen, Drawable drawable, + int *width, int *height, int *pitch, int *bpp, + size_t * size, char *bufname, size_t bufnamesize); + +Bool XAppleDRIDestroyPixmap(Display * dpy, Pixmap pixmap); + +_XFUNCPROTOEND +#endif /* _APPLEDRI_SERVER_ */ +#endif /* _APPLEDRI_H_ */ diff --git a/src/glx/apple/appledristr.h b/src/glx/apple/appledristr.h new file mode 100644 index 00000000000..b5ffe5b46a8 --- /dev/null +++ b/src/glx/apple/appledristr.h @@ -0,0 +1,266 @@ +/************************************************************************** + +Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. +Copyright 2000 VA Linux Systems, Inc. +Copyright (c) 2002, 2008, 2009 Apple Computer, Inc. +All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sub license, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice (including the +next paragraph) shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. +IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +/* + * Authors: + * Kevin E. Martin <[email protected]> + * Jens Owen <[email protected]> + * Rickard E. (Rik) Fiath <[email protected]> + * + */ + +#ifndef _APPLEDRISTR_H_ +#define _APPLEDRISTR_H_ + +#include "appledri.h" + +#define APPLEDRINAME "Apple-DRI" + +#define APPLE_DRI_MAJOR_VERSION 1 /* current version numbers */ +#define APPLE_DRI_MINOR_VERSION 0 +#define APPLE_DRI_PATCH_VERSION 0 + +typedef struct _AppleDRIQueryVersion +{ + CARD8 reqType; /* always DRIReqCode */ + CARD8 driReqType; /* always X_DRIQueryVersion */ + CARD16 length B16; +} xAppleDRIQueryVersionReq; +#define sz_xAppleDRIQueryVersionReq 4 + +typedef struct +{ + BYTE type; /* X_Reply */ + BOOL pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD16 majorVersion B16; /* major version of DRI protocol */ + CARD16 minorVersion B16; /* minor version of DRI protocol */ + CARD32 patchVersion B32; /* patch version of DRI protocol */ + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xAppleDRIQueryVersionReply; +#define sz_xAppleDRIQueryVersionReply 32 + +typedef struct _AppleDRIQueryDirectRenderingCapable +{ + CARD8 reqType; /* always DRIReqCode */ + CARD8 driReqType; /* X_DRIQueryDirectRenderingCapable */ + CARD16 length B16; + CARD32 screen B32; +} xAppleDRIQueryDirectRenderingCapableReq; +#define sz_xAppleDRIQueryDirectRenderingCapableReq 8 + +typedef struct +{ + BYTE type; /* X_Reply */ + BOOL pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + BOOL isCapable; + BOOL pad2; + BOOL pad3; + BOOL pad4; + CARD32 pad5 B32; + CARD32 pad6 B32; + CARD32 pad7 B32; + CARD32 pad8 B32; + CARD32 pad9 B32; +} xAppleDRIQueryDirectRenderingCapableReply; +#define sz_xAppleDRIQueryDirectRenderingCapableReply 32 + +typedef struct _AppleDRIAuthConnection +{ + CARD8 reqType; /* always DRIReqCode */ + CARD8 driReqType; /* always X_DRICloseConnection */ + CARD16 length B16; + CARD32 screen B32; + CARD32 magic B32; +} xAppleDRIAuthConnectionReq; +#define sz_xAppleDRIAuthConnectionReq 12 + +typedef struct +{ + BYTE type; + BOOL pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 authenticated B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xAppleDRIAuthConnectionReply; +#define zx_xAppleDRIAuthConnectionReply 32 + +typedef struct _AppleDRICreateSurface +{ + CARD8 reqType; /* always DRIReqCode */ + CARD8 driReqType; /* always X_DRICreateSurface */ + CARD16 length B16; + CARD32 screen B32; + CARD32 drawable B32; + CARD32 client_id B32; +} xAppleDRICreateSurfaceReq; +#define sz_xAppleDRICreateSurfaceReq 16 + +typedef struct +{ + BYTE type; /* X_Reply */ + BOOL pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 key_0 B32; + CARD32 key_1 B32; + CARD32 uid B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xAppleDRICreateSurfaceReply; +#define sz_xAppleDRICreateSurfaceReply 32 + +typedef struct _AppleDRIDestroySurface +{ + CARD8 reqType; /* always DRIReqCode */ + CARD8 driReqType; /* always X_DRIDestroySurface */ + CARD16 length B16; + CARD32 screen B32; + CARD32 drawable B32; +} xAppleDRIDestroySurfaceReq; +#define sz_xAppleDRIDestroySurfaceReq 12 + +typedef struct _AppleDRINotify +{ + BYTE type; /* always eventBase + event type */ + BYTE kind; + CARD16 sequenceNumber B16; + CARD32 time B32; /* time of change */ + CARD32 pad1 B32; + CARD32 arg B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xAppleDRINotifyEvent; +#define sz_xAppleDRINotifyEvent 32 + + +typedef struct +{ + CARD8 reqType; + CARD8 driReqType; + CARD16 length B16; + CARD32 screen B32; + CARD32 drawable B32; + BOOL doubleSwap; + CARD8 pad1, pad2, pad3; +} xAppleDRICreateSharedBufferReq; + +#define sz_xAppleDRICreateSharedBufferReq 16 + +typedef struct +{ + BYTE type; + BYTE data1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 stringLength B32; /* 0 on error */ + CARD32 width B32; + CARD32 height B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; +} xAppleDRICreateSharedBufferReply; + +#define sz_xAppleDRICreateSharedBufferReply 32 + +typedef struct +{ + CARD8 reqType; + CARD8 driReqType; + CARD16 length B16; + CARD32 screen B32; + CARD32 drawable B32; +} xAppleDRISwapBuffersReq; + +#define sz_xAppleDRISwapBuffersReq 12 + +typedef struct +{ + CARD8 reqType; /*1 */ + CARD8 driReqType; /*2 */ + CARD16 length B16; /*4 */ + CARD32 screen B32; /*8 */ + CARD32 drawable B32; /*12 */ +} xAppleDRICreatePixmapReq; + +#define sz_xAppleDRICreatePixmapReq 12 + +typedef struct +{ + BYTE type; /*1 */ + BOOL pad1; /*2 */ + CARD16 sequenceNumber B16; /*4 */ + CARD32 length B32; /*8 */ + CARD32 width B32; /*12 */ + CARD32 height B32; /*16 */ + CARD32 pitch B32; /*20 */ + CARD32 bpp B32; /*24 */ + CARD32 size B32; /*28 */ + CARD32 stringLength B32; /*32 */ +} xAppleDRICreatePixmapReply; + +#define sz_xAppleDRICreatePixmapReply 32 + +typedef struct +{ + CARD8 reqType; /*1 */ + CARD8 driReqType; /*2 */ + CARD16 length B16; /*4 */ + CARD32 drawable B32; /*8 */ +} xAppleDRIDestroyPixmapReq; + +#define sz_xAppleDRIDestroyPixmapReq 8 + +#ifdef _APPLEDRI_SERVER_ + +void AppleDRISendEvent( +#if NeedFunctionPrototypes + int /* type */ , + unsigned int /* mask */ , + int /* which */ , + int /* arg */ +#endif + ); + +#endif /* _APPLEDRI_SERVER_ */ +#endif /* _APPLEDRISTR_H_ */ diff --git a/src/glx/apple/gen_api_header.tcl b/src/glx/apple/gen_api_header.tcl new file mode 100644 index 00000000000..9e986de5042 --- /dev/null +++ b/src/glx/apple/gen_api_header.tcl @@ -0,0 +1,86 @@ + +package require Tcl 8.5 + +set license { +/* + Copyright (c) 2008, 2009 Apple Inc. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT + HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name(s) of the above + copyright holders shall not be used in advertising or otherwise to + promote the sale, use or other dealings in this Software without + prior written authorization. +*/ +} + +set this_script [info script] + +proc main {argc argv} { + if {2 != $argc} { + puts stderr "syntax is: [set ::this_script] serialized-array-file output.h" + return 1 + } + + set fd [open [lindex $argv 0] r] + array set api [read $fd] + close $fd + + set fd [open [lindex $argv 1] w] + + puts $fd "/* This file was automatically generated by [set ::this_script]. */" + puts $fd $::license + + puts $fd " +#ifndef APPLE_XGL_API_H +#define APPLE_XGL_API_H +" + + puts $fd "struct apple_xgl_api \{" + + set sorted [lsort -dictionary [array names api]] + + foreach f $sorted { + set attr $api($f) + set pstr "" + + if {[dict exists $attr alias_for] || [dict exists $attr noop]} { + #Skip this function. + continue + } + + foreach p [dict get $attr parameters] { + append pstr "[lindex $p 0] [lindex $p 1], " + } + + set pstr [string trimright $pstr ", "] + puts $fd "\t[dict get $attr return] (*[set f])([set pstr]);" + } + + puts $fd "\};" + puts $fd "void apple_xgl_init_direct(void); + +#endif /*APPLE_XGL_API_H*/ +" + + return 0 +} +exit [main $::argc $::argv]
\ No newline at end of file diff --git a/src/glx/apple/gen_api_library.tcl b/src/glx/apple/gen_api_library.tcl new file mode 100644 index 00000000000..159f9c085f1 --- /dev/null +++ b/src/glx/apple/gen_api_library.tcl @@ -0,0 +1,212 @@ +package require Tcl 8.5 + +set license { +/* + Copyright (c) 2008, 2009 Apple Inc. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT + HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name(s) of the above + copyright holders shall not be used in advertising or otherwise to + promote the sale, use or other dealings in this Software without + prior written authorization. +*/ +} + +set gl_license { +/* +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: This software was created using the +** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has +** not been independently verified as being compliant with the OpenGL(R) +** version 1.2.1 Specification. +*/ +} + +set init_code { +static void *glsym(void *handle, const char *name) { + void *sym = dlsym(handle, name); + + if(NULL == sym) { + fprintf(stderr, "Error: symbol not found: '%s'. " + "Error information: %s\n", + name, dlerror()); + abort(); + } + + return sym; +} + +} + +set dlopen_code { +#ifndef LIBGLNAME +#define LIBGLNAME "/System/Library/Frameworks/OpenGL.framework/Libraries/libGL.dylib" +#endif LIBGLNAME + + (void)dlerror(); /*drain dlerror()*/ + + handle = dlopen(LIBGLNAME, RTLD_LAZY); + + if(NULL == handle) { + fprintf(stderr, "error: unable to dlopen " + LIBGLNAME " :" "%s\n", dlerror()); + abort(); + } +} + +set this_script [info script] + +proc main {argc argv} { + if {2 != $argc} { + puts stderr "syntax is: [set ::this_script] serialized-array-file output.c" + return 1 + } + + + set fd [open [lindex $argv 0] r] + array set api [read $fd] + close $fd + + set fd [open [lindex $argv 1] w] + + puts $fd "/* This file was automatically generated by [set ::this_script]. */" + puts $fd $::license + + puts $fd { +#define GL_GLEXT_PROTOTYPES +#include <GL/gl.h> +#include <dlfcn.h> +#include "glxclient.h" +#include "apple_xgl_api.h" +#include "apple_glx_context.h" + } + + puts $fd "struct apple_xgl_api __gl_api;" + + set sorted [lsort -dictionary [array names api]] + + set exclude [list DrawBuffer DrawBuffers DrawBuffersARB] + + #These are special to glXMakeContextCurrent. + #See also: apple_xgl_api_read.c. + lappend exclude ReadPixels CopyPixels CopyColorTable + + #This is excluded to work with surface updates. + lappend exclude Viewport + + foreach f $sorted { + if {$f in $exclude} { + continue + } + + set attr $api($f) + + set pstr "" + + foreach p [dict get $attr parameters] { + append pstr "[lindex $p 0] [lindex $p 1], " + } + + set pstr [string trimright $pstr ", "] + + if {![string length $pstr]} { + set pstr void + } + + set callvars "" + + foreach p [dict get $attr parameters] { + append callvars "[lindex $p end], " + } + + set callvars [string trimright $callvars ", "] + + set return "" + if {"void" ne [dict get $attr return]} { + set return "return " + } + + if {[dict exists $attr noop]} { + if {"void" eq [dict get $attr return]} { + set body "/*noop*/" + } else { + set body "return 0; /*noop*/" + } + } elseif {[dict exists $attr alias_for]} { + set alias [dict get $attr alias_for] + set body "[set return] gl[set alias]([set callvars]);" + } else { + set body "[set return]__gl_api.[set f]([set callvars]);" + } + + puts $fd "GLAPI [dict get $attr return] APIENTRY gl[set f]([set pstr]) \{\n\t$body\n\}" + } + + puts $fd $::init_code + + puts $fd "void apple_xgl_init_direct(void) \{" + puts $fd "\tvoid *handle;" + + puts $fd $::dlopen_code + + foreach f $sorted { + set attr $api($f) + + puts $attr + puts $f + + if {[dict exists $attr alias_for] || [dict exists $attr noop]} { + #Function f is an alias_for another, so we shouldn't try + #to load it. + continue + } + + puts $fd "\t__gl_api.$f = glsym(handle, \"gl$f\");" + } + + puts $fd "\}\n" + close $fd + + return 0 +} +exit [main $::argc $::argv] diff --git a/src/glx/apple/gen_code.tcl b/src/glx/apple/gen_code.tcl new file mode 100644 index 00000000000..bb38d9f1c97 --- /dev/null +++ b/src/glx/apple/gen_code.tcl @@ -0,0 +1,50 @@ +if 0 { + Copyright (c) 2008 Apple Inc. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT + HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name(s) of the above + copyright holders shall not be used in advertising or otherwise to + promote the sale, use or other dealings in this Software without + prior written authorization. +} + +package require Tcl 8.5 + +proc main {} { + set tclsh [info nameofexecutable] + + puts TYPES + exec $tclsh ./gen_types.tcl stage.1 + puts DEFS + exec $tclsh ./gen_defs.tcl specs/enum.spec stage.2 + puts FUNCS + exec $tclsh ./gen_funcs.tcl specs/gl.spec stage.3 stage.4 + puts HEADER + exec $tclsh ./gen_api_header.tcl stage.4 apple_xgl_api.h + puts "C API" + exec $tclsh ./gen_api_library.tcl stage.4 apple_xgl_api.c + puts "EXPORTS" + exec $tclsh ./gen_exports.tcl stage.4 exports.list + + return 0 +} +exit [main] diff --git a/src/glx/apple/gen_defs.tcl b/src/glx/apple/gen_defs.tcl new file mode 100644 index 00000000000..d32694db72e --- /dev/null +++ b/src/glx/apple/gen_defs.tcl @@ -0,0 +1,67 @@ +#This parses and generates #defines from an enum.spec type of file. + +proc main {argc argv} { + if {2 != $argc} { + puts stderr "syntax is: [info script] input.spec output.h" + exit 1 + } + + set fd [open [lindex $argv 0] r] + set data [read $fd] + close $fd + + set fd [open [lindex $argv 1] w] + + set state "" + + puts $fd "#define GL_VERSION_1_1 1" + puts $fd "#define GL_VERSION_1_2 1" + puts $fd "#define GL_VERSION_1_3 1" + puts $fd "#define GL_VERSION_1_4 1" + puts $fd "#define GL_VERSION_1_5 1" + puts $fd "#define GL_VERSION_2_0 1" + #puts $fd "#define GL_VERSION_3_0 1" + + set mask "" + array set ar {} + + foreach line [split $data \n] { + if {[regexp {^\S*#.*} $line] > 0} { + #puts COMMENT:$line + set state "" + } elseif {"enum" eq $state} { + if {[string match "\t*" $line]} { + if {[regexp {^\tuse.*} $line] > 0} { + lassign [split [string trim $line]] use usemask def + set usemask [string trim $usemask] + set def [string trim $def] + puts $fd "/* GL_$def */" + } else { + lassign [split [string trim $line] =] def value + set def [string trim $def] + set value [string trim $value] + + #Trim out the data like: 0x0B00 # 4 F + set value [lindex [split $value] 0] + + puts $fd "#define GL_$def $value" + + #Save this association with the value. + set d $ar($mask) + dict set d $def $value + set ar($mask) $d + } + } else { + set state "" + } + } elseif {[string match "* enum:*" $line]} { + lassign [split $line] mask _ + puts $fd "\n/*[string trim $mask]*/" + set ar($mask) [dict create] + set state enum + } + } + + close $fd +} +main $::argc $::argv diff --git a/src/glx/apple/gen_exports.tcl b/src/glx/apple/gen_exports.tcl new file mode 100644 index 00000000000..acfe6e6a9e6 --- /dev/null +++ b/src/glx/apple/gen_exports.tcl @@ -0,0 +1,132 @@ +if 0 { + Copyright (c) 2008, 2009 Apple Inc. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT + HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name(s) of the above + copyright holders shall not be used in advertising or otherwise to + promote the sale, use or other dealings in this Software without + prior written authorization. +} + +package require Tcl 8.5 + +proc main {argc argv} { + if {2 != $argc} { + puts stderr "syntax is: [info script] serialized-array-file export.list" + return 1 + } + + set fd [open [lindex $argv 0] r] + array set api [read $fd] + close $fd + + #Start with 1.0 + set glxlist [list \ + glXChooseVisual glXCreateContext glXDestroyContext \ + glXMakeCurrent glXCopyContext glXSwapBuffers \ + glXCreateGLXPixmap glXDestroyGLXPixmap \ + glXQueryExtension glXQueryVersion \ + glXIsDirect glXGetConfig \ + glXGetCurrentContext glXGetCurrentDrawable \ + glXWaitGL glXWaitX glXUseXFont] + + #GLX 1.1 and later + lappend glxlist glXQueryExtensionsString glXQueryServerString \ + glXGetClientString + + #GLX 1.2 and later + lappend glxlist glXGetCurrentDisplay + + #GLX 1.3 and later + lappend glxlist glXChooseFBConfig glXGetFBConfigAttrib \ + glXGetFBConfigs glXGetVisualFromFBConfig \ + glXCreateWindow glXDestroyWindow \ + glXCreatePixmap glXDestroyPixmap \ + glXCreatePbuffer glXDestroyPbuffer \ + glXQueryDrawable glXCreateNewContext \ + glXMakeContextCurrent glXGetCurrentReadDrawable \ + glXQueryContext glXSelectEvent glXGetSelectedEvent + + #GLX 1.4 and later + lappend glxlist glXGetProcAddress + + #Extensions + lappend glxlist glXGetProcAddressARB + + #Old extensions we don't support and never really have, but need for + #symbol compatibility. See also: glx_empty.c + lappend glxlist glXSwapIntervalSGI glXSwapIntervalMESA \ + glXGetSwapIntervalMESA glXBeginFrameTrackingMESA \ + glXEndFrameTrackingMESA glXGetFrameUsageMESA \ + glXQueryFrameTrackingMESA glXGetVideoSyncSGI \ + glXWaitVideoSyncSGI glXJoinSwapGroupSGIX \ + glXBindSwapBarrierSGIX glXQueryMaxSwapBarriersSGIX \ + glXGetSyncValuesOML glXSwapBuffersMscOML \ + glXWaitForMscOML glXWaitForSbcOML \ + glXAllocateMemoryMESA glXFreeMemoryMESA \ + glXGetMemoryOffsetMESA glXReleaseBuffersMESA \ + glXCreateGLXPixmapMESA glXCopySubBufferMESA \ + glXQueryGLXPbufferSGIX glXCreateGLXPbufferSGIX \ + glXDestroyGLXPbufferSGIX glXSelectEventSGIX \ + glXGetSelectedEventSGIX + + #These are for GLX_SGIX_fbconfig, which isn't implemented, because + #we have the GLX 1.3 GLXFBConfig functions which are in the standard spec. + #It should be possible to support these to some extent. + #The old libGL somewhat supported the GLXFBConfigSGIX code, but lacked + #pbuffer, and pixmap support. + #We mainly just need these stubs for linking with apps, because for + #some reason the OpenGL site suggests using the latest glxext.h, + #and glxext.h defines all GLX extensions, which doesn't seem right for + #compile-time capability detection. + #See also: http://www.mesa3d.org/brianp/sig97/exten.htm#Compile + #which conflicts with: the ABI registry from what I saw on opengl.org. + #By disabling some of the #defines in glxext.h we break some software, + #and by enabling them without the symbols we break others (in Mesa). + #I think a lot of OpenGL-based programs have issues one way or another. + #It seems that even Mesa developers are confused on this issue, because + #Mesa-7.3/progs/xdemos/glxgears_fbconfig.c has comments about breakage + #in some comments. + lappend glxlist glXGetFBConfigAttribSGIX \ + glXChooseFBConfigSGIX \ + glXGetVisualFromFBConfigSGIX \ + glXCreateGLXPixmapWithConfigSGIX \ + glXCreateContextWithConfigSGIX \ + glXGetFBConfigFromVisualSGIX + + + set fd [open [lindex $argv 1] w] + + foreach f [lsort -dictionary [array names api]] { + puts $fd _gl$f + } + + foreach f [lsort -dictionary $glxlist] { + puts $fd _$f + } + + close $fd + + return 0 +} + +exit [main $::argc $::argv]
\ No newline at end of file diff --git a/src/glx/apple/gen_funcs.tcl b/src/glx/apple/gen_funcs.tcl new file mode 100644 index 00000000000..1392c155a84 --- /dev/null +++ b/src/glx/apple/gen_funcs.tcl @@ -0,0 +1,735 @@ +package require Tcl 8.5 + +#input is specs/gl.spec + +set license { +/* + Copyright (c) 2008, 2009 Apple Inc. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT + HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name(s) of the above + copyright holders shall not be used in advertising or otherwise to + promote the sale, use or other dealings in this Software without + prior written authorization. +*/ +} + + +proc extension name { + global extensions + + set extensions($name) 1 +} + +proc alias {from to} { + global aliases + + set aliases($from) $to +} + +proc promoted name { + global promoted + + set promoted($name) 1 +} + +proc noop name { + global noop + + set noop($name) 1 +} + +set dir [file dirname [info script]] + +source [file join $dir GL_extensions] +source [file join $dir GL_aliases] +source [file join $dir GL_promoted] +source [file join $dir GL_noop] + +proc is-extension-supported? name { + global extensions + + return [info exists extensions($name)] +} + +# This is going to need to be updated for future OpenGL versions: +# cat specs/gl.tm | grep -v '^#' | awk -F, '{sub(/[ \t]+/, ""); print " "$1 " \"" $4 "\""}' +# then change void from "*" to "void" +# +# TextureComponentCount is GLenum in SL for everything +# It is GLint in mesa, but is GLenum for glTexImage3DEXT +array set typemap { + AccumOp "GLenum" + AlphaFunction "GLenum" + AttribMask "GLbitfield" + BeginMode "GLenum" + BinormalPointerTypeEXT "GLenum" + BlendEquationMode "GLenum" + BlendEquationModeEXT "GLenum" + BlendFuncSeparateParameterEXT "GLenum" + BlendingFactorDest "GLenum" + BlendingFactorSrc "GLenum" + Boolean "GLboolean" + BooleanPointer "GLboolean*" + Char "GLchar" + CharPointer "GLchar*" + CheckedFloat32 "GLfloat" + CheckedInt32 "GLint" + ClampColorTargetARB "GLenum" + ClampColorModeARB "GLenum" + ClampedColorF "GLclampf" + ClampedFloat32 "GLclampf" + ClampedFloat64 "GLclampd" + ClampedStencilValue "GLint" + ClearBufferMask "GLbitfield" + ClientAttribMask "GLbitfield" + ClipPlaneName "GLenum" + ColorB "GLbyte" + ColorD "GLdouble" + ColorF "GLfloat" + ColorI "GLint" + ColorIndexValueD "GLdouble" + ColorIndexValueF "GLfloat" + ColorIndexValueI "GLint" + ColorIndexValueS "GLshort" + ColorIndexValueUB "GLubyte" + ColorMaterialParameter "GLenum" + ColorPointerType "GLenum" + ColorS "GLshort" + ColorTableParameterPName "GLenum" + ColorTableParameterPNameSGI "GLenum" + ColorTableTarget "GLenum" + ColorTableTargetSGI "GLenum" + ColorUB "GLubyte" + ColorUI "GLuint" + ColorUS "GLushort" + CombinerBiasNV "GLenum" + CombinerComponentUsageNV "GLenum" + CombinerMappingNV "GLenum" + CombinerParameterNV "GLenum" + CombinerPortionNV "GLenum" + CombinerRegisterNV "GLenum" + CombinerScaleNV "GLenum" + CombinerStageNV "GLenum" + CombinerVariableNV "GLenum" + CompressedTextureARB "GLvoid" + ControlPointNV "GLvoid" + ControlPointTypeNV "GLenum" + ConvolutionParameter "GLenum" + ConvolutionParameterEXT "GLenum" + ConvolutionTarget "GLenum" + ConvolutionTargetEXT "GLenum" + CoordD "GLdouble" + CoordF "GLfloat" + CoordI "GLint" + CoordS "GLshort" + CullFaceMode "GLenum" + CullParameterEXT "GLenum" + DepthFunction "GLenum" + DrawBufferMode "GLenum" + DrawBufferName "GLint" + DrawElementsType "GLenum" + ElementPointerTypeATI "GLenum" + EnableCap "GLenum" + ErrorCode "GLenum" + EvalMapsModeNV "GLenum" + EvalTargetNV "GLenum" + FeedbackElement "GLfloat" + FeedbackType "GLenum" + FenceNV "GLuint" + FenceConditionNV "GLenum" + FenceParameterNameNV "GLenum" + FfdMaskSGIX "GLbitfield" + FfdTargetSGIX "GLenum" + Float32 "GLfloat" + Float32Pointer "GLfloat*" + Float64 "GLdouble" + Float64Pointer "GLdouble*" + FogParameter "GLenum" + FogPointerTypeEXT "GLenum" + FogPointerTypeIBM "GLenum" + FragmentLightModelParameterSGIX "GLenum" + FragmentLightNameSGIX "GLenum" + FragmentLightParameterSGIX "GLenum" + FramebufferAttachment "GLenum" + FramebufferTarget "GLenum" + FrontFaceDirection "GLenum" + FunctionPointer "_GLfuncptr" + GetColorTableParameterPName "GLenum" + GetColorTableParameterPNameSGI "GLenum" + GetConvolutionParameterPName "GLenum" + GetHistogramParameterPName "GLenum" + GetHistogramParameterPNameEXT "GLenum" + GetMapQuery "GLenum" + GetMinmaxParameterPName "GLenum" + GetMinmaxParameterPNameEXT "GLenum" + GetPName "GLenum" + GetPointervPName "GLenum" + GetTextureParameter "GLenum" + HintMode "GLenum" + HintTarget "GLenum" + HintTargetPGI "GLenum" + HistogramTarget "GLenum" + HistogramTargetEXT "GLenum" + IglooFunctionSelectSGIX "GLenum" + IglooParameterSGIX "GLvoid" + ImageTransformPNameHP "GLenum" + ImageTransformTargetHP "GLenum" + IndexFunctionEXT "GLenum" + IndexMaterialParameterEXT "GLenum" + IndexPointerType "GLenum" + Int16 "GLshort" + Int32 "GLint" + Int8 "GLbyte" + InterleavedArrayFormat "GLenum" + LightEnvParameterSGIX "GLenum" + LightModelParameter "GLenum" + LightName "GLenum" + LightParameter "GLenum" + LightTextureModeEXT "GLenum" + LightTexturePNameEXT "GLenum" + LineStipple "GLushort" + List "GLuint" + ListMode "GLenum" + ListNameType "GLenum" + ListParameterName "GLenum" + LogicOp "GLenum" + MapAttribParameterNV "GLenum" + MapParameterNV "GLenum" + MapTarget "GLenum" + MapTargetNV "GLenum" + MapTypeNV "GLenum" + MaskedColorIndexValueF "GLfloat" + MaskedColorIndexValueI "GLuint" + MaskedStencilValue "GLuint" + MaterialFace "GLenum" + MaterialParameter "GLenum" + MatrixIndexPointerTypeARB "GLenum" + MatrixMode "GLenum" + MatrixTransformNV "GLenum" + MeshMode1 "GLenum" + MeshMode2 "GLenum" + MinmaxTarget "GLenum" + MinmaxTargetEXT "GLenum" + NormalPointerType "GLenum" + NurbsCallback "GLenum" + NurbsObj "GLUnurbs*" + NurbsProperty "GLenum" + NurbsTrim "GLenum" + OcclusionQueryParameterNameNV "GLenum" + PixelCopyType "GLenum" + PixelFormat "GLenum" + PixelInternalFormat "GLenum" + PixelMap "GLenum" + PixelStoreParameter "GLenum" + PixelTexGenModeSGIX "GLenum" + PixelTexGenParameterNameSGIS "GLenum" + PixelTransferParameter "GLenum" + PixelTransformPNameEXT "GLenum" + PixelTransformTargetEXT "GLenum" + PixelType "GLenum" + PointParameterNameARB "GLenum" + PolygonMode "GLenum" + ProgramNV "GLuint" + ProgramCharacterNV "GLubyte" + ProgramParameterNV "GLenum" + ProgramParameterPName "GLenum" + QuadricCallback "GLenum" + QuadricDrawStyle "GLenum" + QuadricNormal "GLenum" + QuadricObj "GLUquadric*" + QuadricOrientation "GLenum" + ReadBufferMode "GLenum" + RenderbufferTarget "GLenum" + RenderingMode "GLenum" + ReplacementCodeSUN "GLuint" + ReplacementCodeTypeSUN "GLenum" + SamplePassARB "GLenum" + SamplePatternEXT "GLenum" + SamplePatternSGIS "GLenum" + SecondaryColorPointerTypeIBM "GLenum" + SelectName "GLuint" + SeparableTarget "GLenum" + SeparableTargetEXT "GLenum" + ShadingModel "GLenum" + SizeI "GLsizei" + SpriteParameterNameSGIX "GLenum" + StencilFunction "GLenum" + StencilFaceDirection "GLenum" + StencilOp "GLenum" + StencilValue "GLint" + String "const GLubyte *" + StringName "GLenum" + TangentPointerTypeEXT "GLenum" + TessCallback "GLenum" + TessContour "GLenum" + TessProperty "GLenum" + TesselatorObj "GLUtesselator*" + TexCoordPointerType "GLenum" + Texture "GLuint" + TextureComponentCount "GLint" + TextureCoordName "GLenum" + TextureEnvParameter "GLenum" + TextureEnvTarget "GLenum" + TextureFilterSGIS "GLenum" + TextureGenParameter "GLenum" + TextureNormalModeEXT "GLenum" + TextureParameterName "GLenum" + TextureTarget "GLenum" + TextureUnit "GLenum" + UInt16 "GLushort" + UInt32 "GLuint" + UInt8 "GLubyte" + VertexAttribEnum "GLenum" + VertexAttribEnumNV "GLenum" + VertexAttribPointerTypeNV "GLenum" + VertexPointerType "GLenum" + VertexWeightPointerTypeEXT "GLenum" + Void "GLvoid" + VoidPointer "GLvoid*" + ConstVoidPointer "GLvoid* const" + WeightPointerTypeARB "GLenum" + WinCoord "GLint" + void "void" + ArrayObjectPNameATI "GLenum" + ArrayObjectUsageATI "GLenum" + ConstFloat32 "GLfloat" + ConstInt32 "GLint" + ConstUInt32 "GLuint" + ConstVoid "GLvoid" + DataTypeEXT "GLenum" + FragmentOpATI "GLenum" + GetTexBumpParameterATI "GLenum" + GetVariantValueEXT "GLenum" + ParameterRangeEXT "GLenum" + PreserveModeATI "GLenum" + ProgramFormatARB "GLenum" + ProgramTargetARB "GLenum" + ProgramTarget "GLenum" + ProgramPropertyARB "GLenum" + ProgramStringPropertyARB "GLenum" + ScalarType "GLenum" + SwizzleOpATI "GLenum" + TexBumpParameterATI "GLenum" + VariantCapEXT "GLenum" + VertexAttribPointerPropertyARB "GLenum" + VertexAttribPointerTypeARB "GLenum" + VertexAttribPropertyARB "GLenum" + VertexShaderCoordOutEXT "GLenum" + VertexShaderOpEXT "GLenum" + VertexShaderParameterEXT "GLenum" + VertexShaderStorageTypeEXT "GLenum" + VertexShaderTextureUnitParameter "GLenum" + VertexShaderWriteMaskEXT "GLenum" + VertexStreamATI "GLenum" + PNTrianglesPNameATI "GLenum" + BufferOffset "GLintptr" + BufferSize "GLsizeiptr" + BufferAccessARB "GLenum" + BufferOffsetARB "GLintptrARB" + BufferPNameARB "GLenum" + BufferPointerNameARB "GLenum" + BufferSizeARB "GLsizeiptrARB" + BufferTargetARB "GLenum" + BufferUsageARB "GLenum" + ObjectTypeAPPLE "GLenum" + VertexArrayPNameAPPLE "GLenum" + DrawBufferModeATI "GLenum" + Half16NV "GLhalfNV" + PixelDataRangeTargetNV "GLenum" + TypeEnum "GLenum" + GLbitfield "GLbitfield" + GLenum "GLenum" + Int64 "GLint64" + UInt64 "GLuint64" + handleARB "GLhandleARB" + charARB "GLcharARB" + charPointerARB "GLcharARB*" + sync "GLsync" + Int64EXT "GLint64EXT" + UInt64EXT "GLuint64EXT" + FramebufferAttachment "GLenum" + FramebufferAttachmentParameterName "GLenum" + Framebuffer "GLuint" + FramebufferStatus "GLenum" + FramebufferTarget "GLenum" + GetFramebufferParameter "GLenum" + Intptr "GLintptr" + ProgramFormat "GLenum" + ProgramProperty "GLenum" + ProgramStringProperty "GLenum" + ProgramTarget "GLenum" + Renderbuffer "GLuint" + RenderbufferParameterName "GLenum" + Sizeiptr "GLsizeiptr" + TextureInternalFormat "GLenum" + VertexBufferObjectAccess "GLenum" + VertexBufferObjectParameter "GLenum" + VertexBufferObjectUsage "GLenum" + BufferAccessMask "GLbitfield" + GetMultisamplePNameNV "GLenum" + SampleMaskNV "GLbitfield" +} + +proc psplit s { + set r [list] + set token "" + + foreach c [split $s ""] { + if {[string is space -strict $c]} { + if {[string length $token]} { + lappend r $token + } + set token "" + } else { + append token $c + } + } + + if {[string length $token]} { + lappend r $token + } + + return $r +} + +proc is-extension? str { + #Check if the trailing name of the function is NV, or EXT, and so on. + + if {[string is upper [string index $str end]] + && [string is upper [string index $str end-1]]} { + return 1 + } + + return 0 +} + + +proc parse {data arvar} { + upvar 1 $arvar ar + + set state "" + set name "" + + foreach line [split $data \n] { + if {"attr" eq $state} { + if {[string match "\t*" $line]} { + set plist [psplit [lindex [split $line "#"] 0]] + #puts PLIST:$plist + set master $ar($name) + set param [dict get $master parameters] + + switch -- [llength $plist] { + 1 { + dict set master [lindex $plist 0] "" + } + + 2 { + #standard key, value pair + set key [lindex $plist 0] + set value [lindex $plist 1] + + dict set master $key $value + } + + default { + set key [lindex $plist 0] + + #puts PLIST:$plist + + if {"param" eq $key} { + lappend param [list [lindex $plist 1] [lindex $plist 2] [lindex $plist 3] [lindex $plist 4]] + } else { + dict set master $key [lrange $plist 1 end] + } + } + } + + dict set master parameters $param + + set ar($name) $master + } else { + set state "" + } + } elseif {[regexp {^([A-Z_a-z0-9]+)\((.*)\)\S*} $line all name argv] > 0} { + #puts "MATCH:$name ARGV:$argv" + + #Trim the spaces in the elements. + set newargv [list] + foreach a [split $argv ,] { + lappend newargv [string trim $a] + } + + + set d [dict create name $name arguments $newargv \ + parameters [dict create]] + set ar($name) $d + set state attr + } + } +} + +#This returns true if the category is valid for an extension. +proc is-valid-category? c { + set clist [list display-list drawing drawing-control feedback framebuf misc modeling pixel-op pixel-rw state-req xform VERSION_1_0 VERSION_1_0_DEPRECATED VERSION_1_1 VERSION_1_1_DEPRECATED VERSION_1_2 VERSION_1_2_DEPRECATED VERSION_1_3 VERSION_1_3_DEPRECATED VERSION_1_4 VERSION_1_4_DEPRECATED VERSION_1_5 VERSION_2_0 VERSION_2_1 VERSION_3_0 VERSION_3_0_DEPRECATED VERSION_3_1 VERSION_3_2] + + set result [expr {$c in $clist}] + + + if {!$result} { + set result [is-extension-supported? $c] + } + + return $result +} + +proc translate-parameters {func parameters} { + global typemap + + set newparams [list] + + foreach p $parameters { + set var [lindex $p 0] + + set ptype [lindex $p 1] + + if {![info exists typemap($ptype)]} { + set ::missingTypes($ptype) $func + continue + } + + set type $typemap($ptype) + + if {"array" eq [lindex $p 3]} { + if {"in" eq [lindex $p 2]} { + set final_type "const $type *" + } else { + set final_type "$type *" + } + } else { + set final_type $type + } + + lappend newparams [list $final_type $var] + } + + return $newparams +} + +proc api-new-entry {info func} { + global typemap + + set master [dict create] + set rettype [dict get $info return] + + if {![info exists typemap($rettype)]} { + set ::missingTypes($rettype) $func + } else { + dict set master return $typemap($rettype) + } + + dict set master parameters [translate-parameters $func \ + [dict get $info parameters]] + + return $master +} + +proc main {argc argv} { + global extensions typemap aliases promoted noop + + set fd [open [lindex $argv 0] r] + set data [read $fd] + close $fd + + array set ar {} + + parse $data ar + + array set newapi {} + array set missingTypes {} + + foreach {key value} [array get ar] { + puts "KEY:$key VALUE:$value" + + set category [dict get $value category] + + #Invalidate any of the extensions and things not in the spec we support. + set valid [is-valid-category? $category] + puts VALID:$valid + + if {!$valid} { + continue + } + + puts "VALID:$key" + + if {"BlitFramebuffer" eq $key} { + #This was promoted to an ARB extension after Leopard it seems. + set key BlitFramebufferEXT + } + + if {"ARB_framebuffer_object" eq $category} { + #This wasn't an ARB extension in Leopard either. + if {![string match *EXT $key]} { + append key EXT + } + } + + set newapi($key) [api-new-entry $value $key] + } + + #Now iterate and support as many aliases as we can for promoted functions + #based on if the newapi contains the function. + foreach {func value} [array get ar] { + if {![info exists promoted([dict get $value category])]} { + continue + } + + if {[dict exists $value alias]} { + #We have an alias. Let's see if we have the implementation. + set alias [dict get $value alias] + + if {[info exists newapi($alias)] && ![info exists newapi($func)]} { + #We have an implementing function available. + puts "HAVE:$key ALIAS:$alias" + + set master [api-new-entry $value $func] + dict set master alias_for $alias + set newapi($func) $master + } + } + } + + parray noop + + #Now handle the no-op compatibility categories. + foreach {func value} [array get ar] { + if {[info exists noop([dict get $value category])]} { + if {[info exists newapi($func)]} { + puts stderr "$func shouldn't be a noop" + exit 1 + } + + set master [api-new-entry $value $func] + dict set master noop 1 + set newapi($func) $master + } + } + + + + parray newapi + + if {[array size ::missingTypes]} { + parray ::missingTypes + return 1 + } + + foreach {from to} [array get aliases] { + set d $newapi($to) + dict set d alias_for $to + set newapi($from) $d + } + + #Iterate the nm output and set each symbol in an associative array. + array set validapi {} + + foreach line [split [exec nm -j -g /System/Library/Frameworks/OpenGL.framework/Libraries/libGL.dylib] \n] { + set fn [string trim $line] + + #Only match the _gl functions. + if {[string match _gl* $fn]} { + set finalfn [string range $fn 3 end] + puts FINALFN:$finalfn + set validapi($finalfn) $finalfn + } + } + + puts "Correcting the API functions to match the OpenGL framework." + #parray validapi + + #Iterate the newapi and unset any members that the + #libGL.dylib doesn't support, assuming they aren't no-ops. + foreach fn [array names newapi] { + if {![info exists validapi($fn)]} { + puts "WARNING: libGL.dylib lacks support for: $fn" + + if {[dict exists $newapi($fn) noop] + && [dict get $newapi($fn) noop]} { + #This is no-op, so we should skip it. + continue + } + + #Is the function an alias for another in libGL? + if {[dict exists $newapi($fn) alias_for]} { + set alias [dict get $newapi($fn) alias_for] + + if {![info exists validapi($alias)]} { + puts "WARNING: alias function doesn't exist for $fn." + puts "The alias is $alias." + puts "unsetting $fn" + unset newapi($fn) + } + } else { + puts "unsetting $fn" + unset newapi($fn) + } + } + } + + + #Now print a warning about any symbols that libGL supports that we don't. + foreach fn [array names validapi] { + if {![info exists newapi($fn)]} { + puts "AppleSGLX is missing $fn" + } + } + + puts "NOW GENERATING:[lindex $::argv 1]" + set fd [open [lindex $::argv 1] w] + + set sorted [lsort -dictionary [array names newapi]] + + foreach f $sorted { + set attr $newapi($f) + set pstr "" + foreach p [dict get $attr parameters] { + append pstr "[lindex $p 0] [lindex $p 1], " + } + set pstr [string trimright $pstr ", "] + puts $fd "[dict get $attr return] gl[set f]($pstr); " + } + + close $fd + + if {$::argc == 3} { + puts "NOW GENERATING:[lindex $::argv 2]" + #Dump the array as a serialized list. + set fd [open [lindex $::argv 2] w] + puts $fd [array get newapi] + close $fd + } + + return 0 +} +exit [main $::argc $::argv] + diff --git a/src/glx/apple/gen_types.tcl b/src/glx/apple/gen_types.tcl new file mode 100644 index 00000000000..ed20bdaec0d --- /dev/null +++ b/src/glx/apple/gen_types.tcl @@ -0,0 +1,32 @@ + +proc main {argc argv} { + if {1 != $argc} { + puts stderr "syntax is: [info script] output.h" + exit 1 + } + + set fd [open [lindex $argv 0] w] + puts $fd " +/*OpenGL primitive typedefs*/ +typedef unsigned int GLenum; +typedef unsigned char GLboolean; +typedef unsigned int GLbitfield; +typedef signed char GLbyte; +typedef short GLshort; +typedef int GLint; +typedef int GLsizei; +typedef unsigned char GLubyte; +typedef unsigned short GLushort; +typedef unsigned int GLuint; +typedef float GLfloat; +typedef float GLclampf; +typedef double GLdouble; +typedef double GLclampd; +typedef void GLvoid; + +typedef long GLintptr; +typedef long GLsizeiptr; +" + +} +main $::argc $::argv diff --git a/src/glx/apple/glx_empty.c b/src/glx/apple/glx_empty.c new file mode 100644 index 00000000000..44c5a256f20 --- /dev/null +++ b/src/glx/apple/glx_empty.c @@ -0,0 +1,375 @@ +#include "glxclient.h" +#include "glxextensions.h" +#include "glcontextmodes.h" + +/* +** GLX_SGI_swap_control +*/ +int +glXSwapIntervalSGI(int interval) +{ + (void) interval; + return 0; +} + + +/* +** GLX_MESA_swap_control +*/ +int +glXSwapIntervalMESA(unsigned int interval) +{ + (void) interval; + return GLX_BAD_CONTEXT; +} + + +int +glXGetSwapIntervalMESA(void) +{ + return 0; +} + + +/* +** GLX_MESA_swap_frame_usage +*/ + +int +glXBeginFrameTrackingMESA(Display * dpy, GLXDrawable drawable) +{ + int status = GLX_BAD_CONTEXT; + (void) dpy; + (void) drawable; + return status; +} + + +int +glXEndFrameTrackingMESA(Display * dpy, GLXDrawable drawable) +{ + int status = GLX_BAD_CONTEXT; + (void) dpy; + (void) drawable; + return status; +} + + +int +glXGetFrameUsageMESA(Display * dpy, GLXDrawable drawable, GLfloat * usage) +{ + int status = GLX_BAD_CONTEXT; + (void) dpy; + (void) drawable; + (void) usage; + return status; +} + +int +glXQueryFrameTrackingMESA(Display * dpy, GLXDrawable drawable, + int64_t * sbc, int64_t * missedFrames, + GLfloat * lastMissedUsage) +{ + int status = GLX_BAD_CONTEXT; + (void) dpy; + (void) drawable; + (void) sbc; + (void) missedFrames; + (void) lastMissedUsage; + return status; +} + +/* +** GLX_SGI_video_sync +*/ +int +glXGetVideoSyncSGI(unsigned int *count) +{ + (void) count; + return GLX_BAD_CONTEXT; +} + +int +glXWaitVideoSyncSGI(int divisor, int remainder, unsigned int *count) +{ + (void) count; + return GLX_BAD_CONTEXT; +} + + +/* +** GLX_SGIX_swap_group +*/ +void +glXJoinSwapGroupSGIX(Display * dpy, GLXDrawable drawable, GLXDrawable member) +{ + (void) dpy; + (void) drawable; + (void) member; +} + + +/* +** GLX_SGIX_swap_barrier +*/ +void +glXBindSwapBarrierSGIX(Display * dpy, GLXDrawable drawable, int barrier) +{ + (void) dpy; + (void) drawable; + (void) barrier; +} + +Bool +glXQueryMaxSwapBarriersSGIX(Display * dpy, int screen, int *max) +{ + (void) dpy; + (void) screen; + (void) max; + return False; +} + + +/* +** GLX_OML_sync_control +*/ +Bool +glXGetSyncValuesOML(Display * dpy, GLXDrawable drawable, + int64_t * ust, int64_t * msc, int64_t * sbc) +{ + (void) dpy; + (void) drawable; + (void) ust; + (void) msc; + (void) sbc; + return False; +} + +int64_t +glXSwapBuffersMscOML(Display * dpy, GLXDrawable drawable, + int64_t target_msc, int64_t divisor, int64_t remainder) +{ + (void) dpy; + (void) drawable; + (void) target_msc; + (void) divisor; + (void) remainder; + return 0; +} + + +Bool +glXWaitForMscOML(Display * dpy, GLXDrawable drawable, + int64_t target_msc, int64_t divisor, + int64_t remainder, int64_t * ust, + int64_t * msc, int64_t * sbc) +{ + (void) dpy; + (void) drawable; + (void) target_msc; + (void) divisor; + (void) remainder; + (void) ust; + (void) msc; + (void) sbc; + return False; +} + + +Bool +glXWaitForSbcOML(Display * dpy, GLXDrawable drawable, + int64_t target_sbc, int64_t * ust, + int64_t * msc, int64_t * sbc) +{ + (void) dpy; + (void) drawable; + (void) target_sbc; + (void) ust; + (void) msc; + (void) sbc; + return False; +} + + +/** + * GLX_MESA_allocate_memory + */ +/*@{*/ + +PUBLIC void * +glXAllocateMemoryMESA(Display * dpy, int scrn, + size_t size, float readFreq, + float writeFreq, float priority) +{ + (void) dpy; + (void) scrn; + (void) size; + (void) readFreq; + (void) writeFreq; + (void) priority; + return NULL; +} + + +PUBLIC void +glXFreeMemoryMESA(Display * dpy, int scrn, void *pointer) +{ +#ifdef __DRI_ALLOCATE + __GLXscreenConfigs *const psc = GetGLXScreenConfigs(dpy, scrn); + + if (psc && psc->allocate) + (*psc->allocate->freeMemory) (psc->__driScreen, pointer); + +#else + (void) dpy; + (void) scrn; + (void) pointer; +#endif /* __DRI_ALLOCATE */ +} + + +PUBLIC GLuint +glXGetMemoryOffsetMESA(Display * dpy, int scrn, const void *pointer) +{ + (void) dpy; + (void) scrn; + (void) pointer; + return ~0L; +} + +Bool +glXReleaseBuffersMESA(Display * dpy, GLXDrawable d) +{ + (void) dpy; + (void) d; + return False; +} + + +PUBLIC GLXPixmap +glXCreateGLXPixmapMESA(Display * dpy, XVisualInfo * visual, + Pixmap pixmap, Colormap cmap) +{ + (void) dpy; + (void) visual; + (void) pixmap; + (void) cmap; + return 0; +} + + +/** + * GLX_MESA_copy_sub_buffer + */ +void +glXCopySubBufferMESA(Display * dpy, GLXDrawable drawable, + int x, int y, int width, int height) +{ + (void) dpy; + (void) drawable; + (void) x; + (void) y; + (void) width; + (void) height; +} + + +PUBLIC int +glXQueryGLXPbufferSGIX(Display * dpy, GLXDrawable drawable, + int attribute, unsigned int *value) +{ + (void) dpy; + (void) drawable; + (void) attribute; + (void) value; + return 0; +} + +PUBLIC GLXDrawable +glXCreateGLXPbufferSGIX(Display * dpy, GLXFBConfig config, + unsigned int width, unsigned int height, + int *attrib_list) +{ + (void) dpy; + (void) config; + (void) width; + (void) height; + (void) attrib_list; + return None; +} + +#if 0 +/* GLX_SGIX_fbconfig */ +PUBLIC int +glXGetFBConfigAttribSGIX(Display * dpy, void *config, int a, int *b) +{ + (void) dpy; + (void) config; + (void) a; + (void) b; + return 0; +} + +PUBLIC void * +glXChooseFBConfigSGIX(Display * dpy, int a, int *b, int *c) +{ + (void) dpy; + (void) a; + (void) b; + (void) c; + return NULL; +} + +PUBLIC GLXPixmap +glXCreateGLXPixmapWithConfigSGIX(Display * dpy, void *config, Pixmap p) +{ + (void) dpy; + (void) config; + (void) p; + return None; +} + +PUBLIC GLXContext +glXCreateContextWithConfigSGIX(Display * dpy, void *config, int a, + GLXContext b, Bool c) +{ + (void) dpy; + (void) config; + (void) a; + (void) b; + (void) c; + return NULL; +} + +PUBLIC XVisualInfo * +glXGetVisualFromFBConfigSGIX(Display * dpy, void *config) +{ + (void) dpy; + (void) config; + return NULL; +} + +PUBLIC void * +glXGetFBConfigFromVisualSGIX(Display * dpy, XVisualInfo * visinfo) +{ + (void) dpy; + (void) visinfo; + return NULL; +} +#endif + + +PUBLIC +GLX_ALIAS_VOID(glXDestroyGLXPbufferSGIX, + (Display * dpy, GLXDrawable pbuf), + (dpy, pbuf), glXDestroyPbuffer) + + PUBLIC GLX_ALIAS_VOID(glXSelectEventSGIX, + (Display * dpy, GLXDrawable drawable, + unsigned long mask), (dpy, drawable, mask), + glXSelectEvent) + + PUBLIC GLX_ALIAS_VOID(glXGetSelectedEventSGIX, + (Display * dpy, GLXDrawable drawable, + unsigned long *mask), (dpy, drawable, mask), + glXGetSelectedEvent) diff --git a/src/glx/apple/glx_error.c b/src/glx/apple/glx_error.c new file mode 100644 index 00000000000..282f7ae40b1 --- /dev/null +++ b/src/glx/apple/glx_error.c @@ -0,0 +1,65 @@ +/* + Copyright (c) 2009 Apple Inc. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT + HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name(s) of the above + copyright holders shall not be used in advertising or otherwise to + promote the sale, use or other dealings in this Software without + prior written authorization. +*/ +#include <stdbool.h> +#include <X11/Xlibint.h> +#include <X11/extensions/extutil.h> +#include <X11/extensions/Xext.h> +#include "glxclient.h" +#include "glx_error.h" + +extern XExtDisplayInfo *__glXFindDisplay(Display * dpy); + +void +__glXSendError(Display * dpy, int errorCode, unsigned long resourceID, + unsigned long minorCode, bool coreX11error) +{ + XExtDisplayInfo *info = __glXFindDisplay(dpy); + GLXContext gc = __glXGetCurrentContext(); + xError error; + + LockDisplay(dpy); + + error.type = X_Error; + + if (coreX11error) { + error.errorCode = errorCode; + } + else { + error.errorCode = info->codes->first_error + errorCode; + } + + error.sequenceNumber = dpy->request; + error.resourceID = resourceID; + error.minorCode = minorCode; + error.majorCode = gc ? gc->majorOpcode : 0; + + _XError(dpy, &error); + + UnlockDisplay(dpy); +} diff --git a/src/glx/apple/glx_error.h b/src/glx/apple/glx_error.h new file mode 100644 index 00000000000..6ba2f854dbf --- /dev/null +++ b/src/glx/apple/glx_error.h @@ -0,0 +1,33 @@ +/* + Copyright (c) 2009 Apple Inc. + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation files + (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, + and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT + HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name(s) of the above + copyright holders shall not be used in advertising or otherwise to + promote the sale, use or other dealings in this Software without + prior written authorization. +*/ +#include <stdbool.h> +#include <X11/Xlib.h> + +void __glXSendError(Display * dpy, int errorCode, unsigned long resourceID, + unsigned long minorCode, bool coreX11error); diff --git a/src/glx/apple/glxreply.c b/src/glx/apple/glxreply.c new file mode 100644 index 00000000000..7280bc9715a --- /dev/null +++ b/src/glx/apple/glxreply.c @@ -0,0 +1,134 @@ +/* + * (C) Copyright Apple Inc. 2008 + * (C) Copyright IBM Corporation 2004, 2005 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * IBM, + * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#include <GL/gl.h> +#include "glxclient.h" +#include <GL/glxproto.h> + +CARD32 +__glXReadReply(Display * dpy, size_t size, void *dest, + GLboolean reply_is_always_array) +{ + xGLXSingleReply reply; + + (void) _XReply(dpy, (xReply *) & reply, 0, False); + if (size != 0) { + if ((reply.length > 0) || reply_is_always_array) { + const GLint bytes = (reply_is_always_array) + ? (4 * reply.length) : (reply.size * size); + const GLint extra = 4 - (bytes & 3); + + _XRead(dpy, dest, bytes); + if (extra < 4) { + _XEatData(dpy, extra); + } + } + else { + (void) memcpy(dest, &(reply.pad3), size); + } + } + + return reply.retval; +} + +void +__glXReadPixelReply(Display * dpy, __GLXcontext * gc, unsigned max_dim, + GLint width, GLint height, GLint depth, GLenum format, + GLenum type, void *dest, GLboolean dimensions_in_reply) +{ + xGLXSingleReply reply; + GLint size; + + (void) _XReply(dpy, (xReply *) & reply, 0, False); + + if (dimensions_in_reply) { + width = reply.pad3; + height = reply.pad4; + depth = reply.pad5; + + if ((height == 0) || (max_dim < 2)) { + height = 1; + } + if ((depth == 0) || (max_dim < 3)) { + depth = 1; + } + } + + size = reply.length * 4; + if (size != 0) { + void *buf = Xmalloc(size); + + if (buf == NULL) { + _XEatData(dpy, size); + __glXSetError(gc, GL_OUT_OF_MEMORY); + } + else { + const GLint extra = 4 - (size & 3); + + _XRead(dpy, buf, size); + if (extra < 4) { + _XEatData(dpy, extra); + } + + __glEmptyImage(gc, 3, width, height, depth, format, type, buf, dest); + Xfree(buf); + } + } +} + +#if 0 +GLubyte * +__glXSetupSingleRequest(__GLXcontext * gc, GLint sop, GLint cmdlen) +{ + xGLXSingleReq *req; + Display *const dpy = gc->currentDpy; + + (void) __glXFlushRenderBuffer(gc, gc->pc); + LockDisplay(dpy); + GetReqExtra(GLXSingle, cmdlen, req); + req->reqType = gc->majorOpcode; + req->contextTag = gc->currentContextTag; + req->glxCode = sop; + return (GLubyte *) (req) + sz_xGLXSingleReq; +} +#endif + +GLubyte * +__glXSetupVendorRequest(__GLXcontext * gc, GLint code, GLint vop, + GLint cmdlen) +{ + xGLXVendorPrivateReq *req; + Display *const dpy = gc->currentDpy; + + (void) __glXFlushRenderBuffer(gc, gc->pc); + LockDisplay(dpy); + GetReqExtra(GLXVendorPrivate, cmdlen, req); + req->reqType = gc->majorOpcode; + req->glxCode = code; + req->vendorCode = vop; + req->contextTag = gc->currentContextTag; + return (GLubyte *) (req) + sz_xGLXVendorPrivateReq; +} diff --git a/src/glx/apple/specs/enum.spec b/src/glx/apple/specs/enum.spec new file mode 100644 index 00000000000..20f96f24180 --- /dev/null +++ b/src/glx/apple/specs/enum.spec @@ -0,0 +1,7522 @@ +# This is the OpenGL and OpenGL ES enumerant registry. +# +# It is an extremely important file. Do not mess with it unless +# you know what you're doing and have permission to do so. +# +# $Revision: 10971 $ on $Date: 2010-04-09 02:45:33 -0700 (Fri, 09 Apr 2010) $ + +############################################################################### +# +# Before modifying this file, read the following: +# +# ONLY the Khronos API Registrar (Jon Leech, jon 'at' alumni.caltech.edu) +# may allocate new enumerants outside the 'experimental' range described +# below. Any modifications to this file not performed by the Registrar +# are incompatible with the OpenGL API. The master copy of the registry, +# showing up-to-date enumerant allocations, is maintained in the +# OpenGL registry at +# +# http://www.opengl.org/registry/ +# +# The following guidelines are thus only for reference purposes +# (unless you're the Registrar) +# +# Enumerant values for extensions CANNOT be chosen arbitrarily, since +# the enumerant value space is shared by all GL implementations. It is +# therefore imperative that the procedures described in this file be +# followed carefully when allocating extension enum values. +# +# - Use tabs, not spaces. +# +# - When adding enum values for a new extension, use existing extensions +# as a guide. +# +# - When a vendor has committed to releasing a new extension and needs to +# allocate enum values for that extension, the vendor may request that the +# ARB allocate a previously unallocated block of 16 enum values, in the +# range 0x8000-0xFFFF, for the vendor's exclusive use. +# +# - The vendor that introduces an extension will allocate enum values for +# it as if it is a single-vendor extension, even if it is a multi-vendor +# (EXT) extension. +# +# - The file enum.spec is primarily a reference. The file enumext.spec +# contains enumerants for all OpenGL 1.2 and OpenGL extensions in a form +# used to generate <GL/glext.h>. +# +# - If a vendor hasn't yet released an extension, just add a comment to +# enum.spec that contains the name of the extension and the range of enum +# values used by the extension. When the vendor releases the extension, +# put the actual enum assignments in enum.spec and enumext.spec. +# +# - Allocate all of the enum values for an extension in a single contiguous +# block. +# +# - If an extension is experimental, allocate temporary enum values in the +# range 0x6000-0x8000 during development work. When the vendor commits to +# releasing the extension, allocate permanent enum values (see below). +# There are two reasons for this policy: +# +# 1. It is desirable to keep extension enum values tightly packed and to +# make all of the enum values for an extension be contiguous. This is +# possible only if permanent enum values for a new extension are not +# allocated until the extension spec is stable and the number of new +# enum values needed by the extension has therefore stopped changing. +# +# 2. OpenGL ARB policy is that a vendor may allocate a new block of 16 +# extension enum values only if it has committed to releasing an +# extension that will use values in that block. +# +# - To allocate a new block of permanent enum values for an extension, do the +# following: +# +# 1. Start at the top of enum.spec and choose the first future_use +# range that is not allocated to another vendor and is large enough +# to contain the new block. This will almost certainly be the +# 'Any_vendor_future_use' range near the end of enum.spec. This +# process helps keep allocated enum values tightly packed into +# the start of the 0x8000-0xFFFF range. +# +# 2. Allocate a block of enum values at the start of this range. If +# the enum definitions are going into enumfuture.spec, add a comment +# to enum.spec that contains the name of the extension and the range +# of values in the new block. Use existing extensions as a guide. +# +# 3. Add the size of the block you just allocated to the start of the +# chosen future_use range. If you have allocated the entire range, +# eliminate its future_use entry. +# +# 4. Note that there are historical enum allocations above 0xFFFF, but +# no new allocations will be made there in the forseeable future. +# +############################################################################### + +Extensions define: + VERSION_1_1 = 1 + VERSION_1_2 = 1 + VERSION_1_3 = 1 + VERSION_1_4 = 1 + VERSION_1_5 = 1 + VERSION_2_0 = 1 + VERSION_2_1 = 1 + VERSION_3_0 = 1 + VERSION_3_1 = 1 + VERSION_3_2 = 1 + ARB_imaging = 1 + EXT_abgr = 1 + EXT_blend_color = 1 + EXT_blend_logic_op = 1 + EXT_blend_minmax = 1 + EXT_blend_subtract = 1 + EXT_cmyka = 1 + EXT_convolution = 1 + EXT_copy_texture = 1 + EXT_histogram = 1 + EXT_packed_pixels = 1 + EXT_point_parameters = 1 + EXT_polygon_offset = 1 + EXT_rescale_normal = 1 + EXT_shared_texture_palette = 1 + EXT_subtexture = 1 + EXT_texture = 1 + EXT_texture3D = 1 + EXT_texture_object = 1 + EXT_vertex_array = 1 + SGIS_detail_texture = 1 + SGIS_fog_function = 1 + SGIS_generate_mipmap = 1 + SGIS_multisample = 1 + SGIS_pixel_texture = 1 + SGIS_point_line_texgen = 1 + SGIS_point_parameters = 1 + SGIS_sharpen_texture = 1 + SGIS_texture4D = 1 + SGIS_texture_border_clamp = 1 + SGIS_texture_edge_clamp = 1 + SGIS_texture_filter4 = 1 + SGIS_texture_lod = 1 + SGIS_texture_select = 1 + SGIX_async = 1 + SGIX_async_histogram = 1 + SGIX_async_pixel = 1 + SGIX_blend_alpha_minmax = 1 + SGIX_calligraphic_fragment = 1 + SGIX_clipmap = 1 + SGIX_convolution_accuracy = 1 + SGIX_depth_texture = 1 + SGIX_flush_raster = 1 + SGIX_fog_offset = 1 + SGIX_fragment_lighting = 1 + SGIX_framezoom = 1 + SGIX_icc_texture = 1 + SGIX_impact_pixel_texture = 1 + SGIX_instruments = 1 + SGIX_interlace = 1 + SGIX_ir_instrument1 = 1 + SGIX_list_priority = 1 + SGIX_pixel_texture = 1 + SGIX_pixel_tiles = 1 + SGIX_polynomial_ffd = 1 + SGIX_reference_plane = 1 + SGIX_resample = 1 + SGIX_scalebias_hint = 1 + SGIX_shadow = 1 + SGIX_shadow_ambient = 1 + SGIX_sprite = 1 + SGIX_subsample = 1 + SGIX_tag_sample_buffer = 1 + SGIX_texture_add_env = 1 + SGIX_texture_coordinate_clamp = 1 + SGIX_texture_lod_bias = 1 + SGIX_texture_multi_buffer = 1 + SGIX_texture_scale_bias = 1 + SGIX_vertex_preclip = 1 + SGIX_ycrcb = 1 + SGI_color_matrix = 1 + SGI_color_table = 1 + SGI_texture_color_table = 1 + +############################################################################### + +AttribMask enum: + CURRENT_BIT = 0x00000001 + POINT_BIT = 0x00000002 + LINE_BIT = 0x00000004 + POLYGON_BIT = 0x00000008 + POLYGON_STIPPLE_BIT = 0x00000010 + PIXEL_MODE_BIT = 0x00000020 + LIGHTING_BIT = 0x00000040 + FOG_BIT = 0x00000080 + DEPTH_BUFFER_BIT = 0x00000100 + ACCUM_BUFFER_BIT = 0x00000200 + STENCIL_BUFFER_BIT = 0x00000400 + VIEWPORT_BIT = 0x00000800 + TRANSFORM_BIT = 0x00001000 + ENABLE_BIT = 0x00002000 + COLOR_BUFFER_BIT = 0x00004000 + HINT_BIT = 0x00008000 + EVAL_BIT = 0x00010000 + LIST_BIT = 0x00020000 + TEXTURE_BIT = 0x00040000 + SCISSOR_BIT = 0x00080000 + ALL_ATTRIB_BITS = 0xFFFFFFFF +#??? ALL_ATTRIB_BITS mask value changed to all-1s in OpenGL 1.3 - this affects covgl. +# use ARB_multisample MULTISAMPLE_BIT_ARB +# use EXT_multisample MULTISAMPLE_BIT_EXT +# use 3DFX_multisample MULTISAMPLE_BIT_3DFX + +VERSION_1_3 enum: (Promoted for OpenGL 1.3) + MULTISAMPLE_BIT = 0x20000000 + +ARB_multisample enum: + MULTISAMPLE_BIT_ARB = 0x20000000 + +EXT_multisample enum: + MULTISAMPLE_BIT_EXT = 0x20000000 + +3DFX_multisample enum: + MULTISAMPLE_BIT_3DFX = 0x20000000 + +############################################################################### + +# Note that COVERAGE_BUFFER_BIT_NV collides with AttribMask bit +# HINT_BIT. This is OK since the extension is for OpenGL ES 2, which +# doesn't have attribute groups. +ClearBufferMask enum: + use AttribMask DEPTH_BUFFER_BIT # = 0x00000100 + use AttribMask ACCUM_BUFFER_BIT # = 0x00000200 + use AttribMask STENCIL_BUFFER_BIT # = 0x00000400 + use AttribMask COLOR_BUFFER_BIT # = 0x00004000 + use NV_coverage_sample COVERAGE_BUFFER_BIT_NV # = 0x00008000 + +############################################################################### + +ClientAttribMask enum: + CLIENT_PIXEL_STORE_BIT = 0x00000001 + CLIENT_VERTEX_ARRAY_BIT = 0x00000002 + CLIENT_ALL_ATTRIB_BITS = 0xFFFFFFFF + +############################################################################### + +# There's no obvious better place to put non-attribute-group mask bits +VERSION_3_0 enum: + use ARB_map_buffer_range MAP_READ_BIT + use ARB_map_buffer_range MAP_WRITE_BIT + use ARB_map_buffer_range MAP_INVALIDATE_RANGE_BIT + use ARB_map_buffer_range MAP_INVALIDATE_BUFFER_BIT + use ARB_map_buffer_range MAP_FLUSH_EXPLICIT_BIT + use ARB_map_buffer_range MAP_UNSYNCHRONIZED_BIT + +ARB_map_buffer_range enum: + MAP_READ_BIT = 0x0001 # VERSION_3_0 / ARB_mbr + MAP_WRITE_BIT = 0x0002 # VERSION_3_0 / ARB_mbr + MAP_INVALIDATE_RANGE_BIT = 0x0004 # VERSION_3_0 / ARB_mbr + MAP_INVALIDATE_BUFFER_BIT = 0x0008 # VERSION_3_0 / ARB_mbr + MAP_FLUSH_EXPLICIT_BIT = 0x0010 # VERSION_3_0 / ARB_mbr + MAP_UNSYNCHRONIZED_BIT = 0x0020 # VERSION_3_0 / ARB_mbr + +############################################################################### + +VERSION_3_0 enum: + CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT = 0x0001 # VERSION_3_0 + +############################################################################### + +Boolean enum: + FALSE = 0 + TRUE = 1 + +############################################################################### + +BeginMode enum: + POINTS = 0x0000 + LINES = 0x0001 + LINE_LOOP = 0x0002 + LINE_STRIP = 0x0003 + TRIANGLES = 0x0004 + TRIANGLE_STRIP = 0x0005 + TRIANGLE_FAN = 0x0006 + QUADS = 0x0007 + QUAD_STRIP = 0x0008 + POLYGON = 0x0009 + +VERSION_3_2 enum: + LINES_ADJACENCY = 0x000A + LINE_STRIP_ADJACENCY = 0x000B + TRIANGLES_ADJACENCY = 0x000C + TRIANGLE_STRIP_ADJACENCY = 0x000D + +ARB_geometry_shader4 enum: (additional; see below) + LINES_ADJACENCY_ARB = 0x000A + LINE_STRIP_ADJACENCY_ARB = 0x000B + TRIANGLES_ADJACENCY_ARB = 0x000C + TRIANGLE_STRIP_ADJACENCY_ARB = 0x000D + +NV_geometry_program4 enum: (additional; see below) + LINES_ADJACENCY_EXT = 0x000A + LINE_STRIP_ADJACENCY_EXT = 0x000B + TRIANGLES_ADJACENCY_EXT = 0x000C + TRIANGLE_STRIP_ADJACENCY_EXT = 0x000D + +# BeginMode_future_use: 0x000E + +############################################################################### + +AccumOp enum: + ACCUM = 0x0100 + LOAD = 0x0101 + RETURN = 0x0102 + MULT = 0x0103 + ADD = 0x0104 + +############################################################################### + +AlphaFunction enum: + NEVER = 0x0200 + LESS = 0x0201 + EQUAL = 0x0202 + LEQUAL = 0x0203 + GREATER = 0x0204 + NOTEQUAL = 0x0205 + GEQUAL = 0x0206 + ALWAYS = 0x0207 + +############################################################################### + +BlendingFactorDest enum: + ZERO = 0 + ONE = 1 + SRC_COLOR = 0x0300 + ONE_MINUS_SRC_COLOR = 0x0301 + SRC_ALPHA = 0x0302 + ONE_MINUS_SRC_ALPHA = 0x0303 + DST_ALPHA = 0x0304 + ONE_MINUS_DST_ALPHA = 0x0305 + use EXT_blend_color CONSTANT_COLOR_EXT + use EXT_blend_color ONE_MINUS_CONSTANT_COLOR_EXT + use EXT_blend_color CONSTANT_ALPHA_EXT + use EXT_blend_color ONE_MINUS_CONSTANT_ALPHA_EXT + +############################################################################### + +BlendingFactorSrc enum: + use BlendingFactorDest ZERO + use BlendingFactorDest ONE + DST_COLOR = 0x0306 + ONE_MINUS_DST_COLOR = 0x0307 + SRC_ALPHA_SATURATE = 0x0308 + use BlendingFactorDest SRC_ALPHA + use BlendingFactorDest ONE_MINUS_SRC_ALPHA + use BlendingFactorDest DST_ALPHA + use BlendingFactorDest ONE_MINUS_DST_ALPHA + use EXT_blend_color CONSTANT_COLOR_EXT + use EXT_blend_color ONE_MINUS_CONSTANT_COLOR_EXT + use EXT_blend_color CONSTANT_ALPHA_EXT + use EXT_blend_color ONE_MINUS_CONSTANT_ALPHA_EXT + +############################################################################### + +BlendEquationModeEXT enum: + use GetPName LOGIC_OP + use EXT_blend_minmax FUNC_ADD_EXT + use EXT_blend_minmax MIN_EXT + use EXT_blend_minmax MAX_EXT + use EXT_blend_subtract FUNC_SUBTRACT_EXT + use EXT_blend_subtract FUNC_REVERSE_SUBTRACT_EXT + use SGIX_blend_alpha_minmax ALPHA_MIN_SGIX + use SGIX_blend_alpha_minmax ALPHA_MAX_SGIX + +############################################################################### + +ColorMaterialFace enum: + use DrawBufferMode FRONT + use DrawBufferMode BACK + use DrawBufferMode FRONT_AND_BACK + +############################################################################### + +ColorMaterialParameter enum: + use LightParameter AMBIENT + use LightParameter DIFFUSE + use LightParameter SPECULAR + use MaterialParameter EMISSION + use MaterialParameter AMBIENT_AND_DIFFUSE + +############################################################################### + +ColorPointerType enum: + use DataType BYTE + use DataType UNSIGNED_BYTE + use DataType SHORT + use DataType UNSIGNED_SHORT + use DataType INT + use DataType UNSIGNED_INT + use DataType FLOAT + use DataType DOUBLE + +############################################################################### + +ColorTableParameterPNameSGI enum: + use SGI_color_table COLOR_TABLE_SCALE_SGI + use SGI_color_table COLOR_TABLE_BIAS_SGI + +############################################################################### + +ColorTableTargetSGI enum: + use SGI_color_table COLOR_TABLE_SGI + use SGI_color_table POST_CONVOLUTION_COLOR_TABLE_SGI + use SGI_color_table POST_COLOR_MATRIX_COLOR_TABLE_SGI + use SGI_color_table PROXY_COLOR_TABLE_SGI + use SGI_color_table PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI + use SGI_color_table PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI + use SGI_texture_color_table TEXTURE_COLOR_TABLE_SGI + use SGI_texture_color_table PROXY_TEXTURE_COLOR_TABLE_SGI + +############################################################################### + +ConvolutionBorderModeEXT enum: + use EXT_convolution REDUCE_EXT + +############################################################################### + +ConvolutionParameterEXT enum: + use EXT_convolution CONVOLUTION_BORDER_MODE_EXT + use EXT_convolution CONVOLUTION_FILTER_SCALE_EXT + use EXT_convolution CONVOLUTION_FILTER_BIAS_EXT + +############################################################################### + +ConvolutionTargetEXT enum: + use EXT_convolution CONVOLUTION_1D_EXT + use EXT_convolution CONVOLUTION_2D_EXT + +############################################################################### + +CullFaceMode enum: + use DrawBufferMode FRONT + use DrawBufferMode BACK + use DrawBufferMode FRONT_AND_BACK + +############################################################################### + +DepthFunction enum: + use AlphaFunction NEVER + use AlphaFunction LESS + use AlphaFunction EQUAL + use AlphaFunction LEQUAL + use AlphaFunction GREATER + use AlphaFunction NOTEQUAL + use AlphaFunction GEQUAL + use AlphaFunction ALWAYS + +############################################################################### + +DrawBufferMode enum: + NONE = 0 + FRONT_LEFT = 0x0400 + FRONT_RIGHT = 0x0401 + BACK_LEFT = 0x0402 + BACK_RIGHT = 0x0403 + FRONT = 0x0404 + BACK = 0x0405 + LEFT = 0x0406 + RIGHT = 0x0407 + FRONT_AND_BACK = 0x0408 + AUX0 = 0x0409 + AUX1 = 0x040A + AUX2 = 0x040B + AUX3 = 0x040C + +# Aliases DrawBufferMode enum above +OES_framebuffer_object enum: (OpenGL ES only; additional; see below) +# NONE_OES = 0 + +############################################################################### + +EnableCap enum: + use GetPName FOG + use GetPName LIGHTING + use GetPName TEXTURE_1D + use GetPName TEXTURE_2D + use GetPName LINE_STIPPLE + use GetPName POLYGON_STIPPLE + use GetPName CULL_FACE + use GetPName ALPHA_TEST + use GetPName BLEND + use GetPName INDEX_LOGIC_OP + use GetPName COLOR_LOGIC_OP + use GetPName DITHER + use GetPName STENCIL_TEST + use GetPName DEPTH_TEST + use GetPName CLIP_PLANE0 + use GetPName CLIP_PLANE1 + use GetPName CLIP_PLANE2 + use GetPName CLIP_PLANE3 + use GetPName CLIP_PLANE4 + use GetPName CLIP_PLANE5 + use GetPName LIGHT0 + use GetPName LIGHT1 + use GetPName LIGHT2 + use GetPName LIGHT3 + use GetPName LIGHT4 + use GetPName LIGHT5 + use GetPName LIGHT6 + use GetPName LIGHT7 + use GetPName TEXTURE_GEN_S + use GetPName TEXTURE_GEN_T + use GetPName TEXTURE_GEN_R + use GetPName TEXTURE_GEN_Q + use GetPName MAP1_VERTEX_3 + use GetPName MAP1_VERTEX_4 + use GetPName MAP1_COLOR_4 + use GetPName MAP1_INDEX + use GetPName MAP1_NORMAL + use GetPName MAP1_TEXTURE_COORD_1 + use GetPName MAP1_TEXTURE_COORD_2 + use GetPName MAP1_TEXTURE_COORD_3 + use GetPName MAP1_TEXTURE_COORD_4 + use GetPName MAP2_VERTEX_3 + use GetPName MAP2_VERTEX_4 + use GetPName MAP2_COLOR_4 + use GetPName MAP2_INDEX + use GetPName MAP2_NORMAL + use GetPName MAP2_TEXTURE_COORD_1 + use GetPName MAP2_TEXTURE_COORD_2 + use GetPName MAP2_TEXTURE_COORD_3 + use GetPName MAP2_TEXTURE_COORD_4 + use GetPName POINT_SMOOTH + use GetPName LINE_SMOOTH + use GetPName POLYGON_SMOOTH + use GetPName SCISSOR_TEST + use GetPName COLOR_MATERIAL + use GetPName NORMALIZE + use GetPName AUTO_NORMAL + use GetPName POLYGON_OFFSET_POINT + use GetPName POLYGON_OFFSET_LINE + use GetPName POLYGON_OFFSET_FILL + use GetPName VERTEX_ARRAY + use GetPName NORMAL_ARRAY + use GetPName COLOR_ARRAY + use GetPName INDEX_ARRAY + use GetPName TEXTURE_COORD_ARRAY + use GetPName EDGE_FLAG_ARRAY + use EXT_convolution CONVOLUTION_1D_EXT + use EXT_convolution CONVOLUTION_2D_EXT + use EXT_convolution SEPARABLE_2D_EXT + use EXT_histogram HISTOGRAM_EXT + use EXT_histogram MINMAX_EXT + use EXT_rescale_normal RESCALE_NORMAL_EXT + use EXT_shared_texture_palette SHARED_TEXTURE_PALETTE_EXT + use EXT_texture3D TEXTURE_3D_EXT + use SGIS_multisample MULTISAMPLE_SGIS + use SGIS_multisample SAMPLE_ALPHA_TO_MASK_SGIS + use SGIS_multisample SAMPLE_ALPHA_TO_ONE_SGIS + use SGIS_multisample SAMPLE_MASK_SGIS + use SGIS_texture4D TEXTURE_4D_SGIS + use SGIX_async_histogram ASYNC_HISTOGRAM_SGIX + use SGIX_async_pixel ASYNC_TEX_IMAGE_SGIX + use SGIX_async_pixel ASYNC_DRAW_PIXELS_SGIX + use SGIX_async_pixel ASYNC_READ_PIXELS_SGIX + use SGIX_calligraphic_fragment CALLIGRAPHIC_FRAGMENT_SGIX + use SGIX_fog_offset FOG_OFFSET_SGIX + use SGIX_fragment_lighting FRAGMENT_LIGHTING_SGIX + use SGIX_fragment_lighting FRAGMENT_COLOR_MATERIAL_SGIX + use SGIX_fragment_lighting FRAGMENT_LIGHT0_SGIX + use SGIX_fragment_lighting FRAGMENT_LIGHT1_SGIX + use SGIX_fragment_lighting FRAGMENT_LIGHT2_SGIX + use SGIX_fragment_lighting FRAGMENT_LIGHT3_SGIX + use SGIX_fragment_lighting FRAGMENT_LIGHT4_SGIX + use SGIX_fragment_lighting FRAGMENT_LIGHT5_SGIX + use SGIX_fragment_lighting FRAGMENT_LIGHT6_SGIX + use SGIX_fragment_lighting FRAGMENT_LIGHT7_SGIX + use SGIX_framezoom FRAMEZOOM_SGIX + use SGIX_interlace INTERLACE_SGIX + use SGIX_ir_instrument1 IR_INSTRUMENT1_SGIX + use SGIX_pixel_texture PIXEL_TEX_GEN_SGIX + use SGIS_pixel_texture PIXEL_TEXTURE_SGIS + use SGIX_reference_plane REFERENCE_PLANE_SGIX + use SGIX_sprite SPRITE_SGIX + use SGI_color_table COLOR_TABLE_SGI + use SGI_color_table POST_CONVOLUTION_COLOR_TABLE_SGI + use SGI_color_table POST_COLOR_MATRIX_COLOR_TABLE_SGI + use SGI_texture_color_table TEXTURE_COLOR_TABLE_SGI + +############################################################################### + +ErrorCode enum: + NO_ERROR = 0 + INVALID_ENUM = 0x0500 + INVALID_VALUE = 0x0501 + INVALID_OPERATION = 0x0502 + STACK_OVERFLOW = 0x0503 + STACK_UNDERFLOW = 0x0504 + OUT_OF_MEMORY = 0x0505 + use EXT_histogram TABLE_TOO_LARGE_EXT + use EXT_texture TEXTURE_TOO_LARGE_EXT + +# Additional error codes + +VERSION_3_0 enum: +# use ARB_framebuffer_object INVALID_FRAMEBUFFER_OPERATION + +ARB_framebuffer_object enum: (note: no ARB suffixes) + INVALID_FRAMEBUFFER_OPERATION = 0x0506 # VERSION_3_0 / ARB_fbo + +EXT_framebuffer_object enum: + INVALID_FRAMEBUFFER_OPERATION_EXT = 0x0506 + +# Aliases EXT_fbo enum above +OES_framebuffer_object enum: (OpenGL ES only; additional; see below) + INVALID_FRAMEBUFFER_OPERATION_OES = 0x0506 + +############################################################################### + +FeedbackType enum: + 2D = 0x0600 + 3D = 0x0601 + 3D_COLOR = 0x0602 + 3D_COLOR_TEXTURE = 0x0603 + 4D_COLOR_TEXTURE = 0x0604 + +############################################################################### + +FeedBackToken enum: + PASS_THROUGH_TOKEN = 0x0700 + POINT_TOKEN = 0x0701 + LINE_TOKEN = 0x0702 + POLYGON_TOKEN = 0x0703 + BITMAP_TOKEN = 0x0704 + DRAW_PIXEL_TOKEN = 0x0705 + COPY_PIXEL_TOKEN = 0x0706 + LINE_RESET_TOKEN = 0x0707 + +############################################################################### + +FfdMaskSGIX enum: + TEXTURE_DEFORMATION_BIT_SGIX = 0x00000001 + GEOMETRY_DEFORMATION_BIT_SGIX = 0x00000002 + +############################################################################### + +FfdTargetSGIX enum: + use SGIX_polynomial_ffd GEOMETRY_DEFORMATION_SGIX + use SGIX_polynomial_ffd TEXTURE_DEFORMATION_SGIX + +############################################################################### + +FogMode enum: + use TextureMagFilter LINEAR + EXP = 0x0800 + EXP2 = 0x0801 + use SGIS_fog_function FOG_FUNC_SGIS + +############################################################################### + +FogParameter enum: + use GetPName FOG_COLOR + use GetPName FOG_DENSITY + use GetPName FOG_END + use GetPName FOG_INDEX + use GetPName FOG_MODE + use GetPName FOG_START + use SGIX_fog_offset FOG_OFFSET_VALUE_SGIX + +############################################################################### + +FragmentLightModelParameterSGIX enum: + use SGIX_fragment_lighting FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX + use SGIX_fragment_lighting FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX + use SGIX_fragment_lighting FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX + use SGIX_fragment_lighting FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX + +############################################################################### + +FrontFaceDirection enum: + CW = 0x0900 + CCW = 0x0901 + +############################################################################### + +GetColorTableParameterPNameSGI enum: + use SGI_color_table COLOR_TABLE_SCALE_SGI + use SGI_color_table COLOR_TABLE_BIAS_SGI + use SGI_color_table COLOR_TABLE_FORMAT_SGI + use SGI_color_table COLOR_TABLE_WIDTH_SGI + use SGI_color_table COLOR_TABLE_RED_SIZE_SGI + use SGI_color_table COLOR_TABLE_GREEN_SIZE_SGI + use SGI_color_table COLOR_TABLE_BLUE_SIZE_SGI + use SGI_color_table COLOR_TABLE_ALPHA_SIZE_SGI + use SGI_color_table COLOR_TABLE_LUMINANCE_SIZE_SGI + use SGI_color_table COLOR_TABLE_INTENSITY_SIZE_SGI + +############################################################################### + +GetConvolutionParameter enum: + use EXT_convolution CONVOLUTION_BORDER_MODE_EXT + use EXT_convolution CONVOLUTION_FILTER_SCALE_EXT + use EXT_convolution CONVOLUTION_FILTER_BIAS_EXT + use EXT_convolution CONVOLUTION_FORMAT_EXT + use EXT_convolution CONVOLUTION_WIDTH_EXT + use EXT_convolution CONVOLUTION_HEIGHT_EXT + use EXT_convolution MAX_CONVOLUTION_WIDTH_EXT + use EXT_convolution MAX_CONVOLUTION_HEIGHT_EXT + +############################################################################### + +GetHistogramParameterPNameEXT enum: + use EXT_histogram HISTOGRAM_WIDTH_EXT + use EXT_histogram HISTOGRAM_FORMAT_EXT + use EXT_histogram HISTOGRAM_RED_SIZE_EXT + use EXT_histogram HISTOGRAM_GREEN_SIZE_EXT + use EXT_histogram HISTOGRAM_BLUE_SIZE_EXT + use EXT_histogram HISTOGRAM_ALPHA_SIZE_EXT + use EXT_histogram HISTOGRAM_LUMINANCE_SIZE_EXT + use EXT_histogram HISTOGRAM_SINK_EXT + +############################################################################### + +GetMapQuery enum: + COEFF = 0x0A00 + ORDER = 0x0A01 + DOMAIN = 0x0A02 + +############################################################################### + +GetMinmaxParameterPNameEXT enum: + use EXT_histogram MINMAX_FORMAT_EXT + use EXT_histogram MINMAX_SINK_EXT + +############################################################################### + +GetPixelMap enum: + PIXEL_MAP_I_TO_I = 0x0C70 + PIXEL_MAP_S_TO_S = 0x0C71 + PIXEL_MAP_I_TO_R = 0x0C72 + PIXEL_MAP_I_TO_G = 0x0C73 + PIXEL_MAP_I_TO_B = 0x0C74 + PIXEL_MAP_I_TO_A = 0x0C75 + PIXEL_MAP_R_TO_R = 0x0C76 + PIXEL_MAP_G_TO_G = 0x0C77 + PIXEL_MAP_B_TO_B = 0x0C78 + PIXEL_MAP_A_TO_A = 0x0C79 + +############################################################################### + +GetPointervPName enum: + VERTEX_ARRAY_POINTER = 0x808E + NORMAL_ARRAY_POINTER = 0x808F + COLOR_ARRAY_POINTER = 0x8090 + INDEX_ARRAY_POINTER = 0x8091 + TEXTURE_COORD_ARRAY_POINTER = 0x8092 + EDGE_FLAG_ARRAY_POINTER = 0x8093 + FEEDBACK_BUFFER_POINTER = 0x0DF0 + SELECTION_BUFFER_POINTER = 0x0DF3 + use SGIX_instruments INSTRUMENT_BUFFER_POINTER_SGIX + +############################################################################### + +# the columns after the comment symbol (#) indicate: number of params, type +# (F - float, D - double, I - integer) for the returned values +GetPName enum: + CURRENT_COLOR = 0x0B00 # 4 F + CURRENT_INDEX = 0x0B01 # 1 F + CURRENT_NORMAL = 0x0B02 # 3 F + CURRENT_TEXTURE_COORDS = 0x0B03 # 4 F + CURRENT_RASTER_COLOR = 0x0B04 # 4 F + CURRENT_RASTER_INDEX = 0x0B05 # 1 F + CURRENT_RASTER_TEXTURE_COORDS = 0x0B06 # 4 F + CURRENT_RASTER_POSITION = 0x0B07 # 4 F + CURRENT_RASTER_POSITION_VALID = 0x0B08 # 1 I + CURRENT_RASTER_DISTANCE = 0x0B09 # 1 F + + POINT_SMOOTH = 0x0B10 # 1 I + POINT_SIZE = 0x0B11 # 1 F + POINT_SIZE_RANGE = 0x0B12 # 2 F + POINT_SIZE_GRANULARITY = 0x0B13 # 1 F + + LINE_SMOOTH = 0x0B20 # 1 I + LINE_WIDTH = 0x0B21 # 1 F + LINE_WIDTH_RANGE = 0x0B22 # 2 F + LINE_WIDTH_GRANULARITY = 0x0B23 # 1 F + LINE_STIPPLE = 0x0B24 # 1 I + LINE_STIPPLE_PATTERN = 0x0B25 # 1 I + LINE_STIPPLE_REPEAT = 0x0B26 # 1 I + use VERSION_1_2 SMOOTH_POINT_SIZE_RANGE + use VERSION_1_2 SMOOTH_POINT_SIZE_GRANULARITY + use VERSION_1_2 SMOOTH_LINE_WIDTH_RANGE + use VERSION_1_2 SMOOTH_LINE_WIDTH_GRANULARITY + use VERSION_1_2 ALIASED_POINT_SIZE_RANGE + use VERSION_1_2 ALIASED_LINE_WIDTH_RANGE + + LIST_MODE = 0x0B30 # 1 I + MAX_LIST_NESTING = 0x0B31 # 1 I + LIST_BASE = 0x0B32 # 1 I + LIST_INDEX = 0x0B33 # 1 I + + POLYGON_MODE = 0x0B40 # 2 I + POLYGON_SMOOTH = 0x0B41 # 1 I + POLYGON_STIPPLE = 0x0B42 # 1 I + EDGE_FLAG = 0x0B43 # 1 I + CULL_FACE = 0x0B44 # 1 I + CULL_FACE_MODE = 0x0B45 # 1 I + FRONT_FACE = 0x0B46 # 1 I + + LIGHTING = 0x0B50 # 1 I + LIGHT_MODEL_LOCAL_VIEWER = 0x0B51 # 1 I + LIGHT_MODEL_TWO_SIDE = 0x0B52 # 1 I + LIGHT_MODEL_AMBIENT = 0x0B53 # 4 F + SHADE_MODEL = 0x0B54 # 1 I + COLOR_MATERIAL_FACE = 0x0B55 # 1 I + COLOR_MATERIAL_PARAMETER = 0x0B56 # 1 I + COLOR_MATERIAL = 0x0B57 # 1 I + + FOG = 0x0B60 # 1 I + FOG_INDEX = 0x0B61 # 1 I + FOG_DENSITY = 0x0B62 # 1 F + FOG_START = 0x0B63 # 1 F + FOG_END = 0x0B64 # 1 F + FOG_MODE = 0x0B65 # 1 I + FOG_COLOR = 0x0B66 # 4 F + + DEPTH_RANGE = 0x0B70 # 2 F + DEPTH_TEST = 0x0B71 # 1 I + DEPTH_WRITEMASK = 0x0B72 # 1 I + DEPTH_CLEAR_VALUE = 0x0B73 # 1 F + DEPTH_FUNC = 0x0B74 # 1 I + + ACCUM_CLEAR_VALUE = 0x0B80 # 4 F + + STENCIL_TEST = 0x0B90 # 1 I + STENCIL_CLEAR_VALUE = 0x0B91 # 1 I + STENCIL_FUNC = 0x0B92 # 1 I + STENCIL_VALUE_MASK = 0x0B93 # 1 I + STENCIL_FAIL = 0x0B94 # 1 I + STENCIL_PASS_DEPTH_FAIL = 0x0B95 # 1 I + STENCIL_PASS_DEPTH_PASS = 0x0B96 # 1 I + STENCIL_REF = 0x0B97 # 1 I + STENCIL_WRITEMASK = 0x0B98 # 1 I + + MATRIX_MODE = 0x0BA0 # 1 I + NORMALIZE = 0x0BA1 # 1 I + VIEWPORT = 0x0BA2 # 4 I + MODELVIEW_STACK_DEPTH = 0x0BA3 # 1 I + PROJECTION_STACK_DEPTH = 0x0BA4 # 1 I + TEXTURE_STACK_DEPTH = 0x0BA5 # 1 I + MODELVIEW_MATRIX = 0x0BA6 # 16 F + PROJECTION_MATRIX = 0x0BA7 # 16 F + TEXTURE_MATRIX = 0x0BA8 # 16 F + + ATTRIB_STACK_DEPTH = 0x0BB0 # 1 I + CLIENT_ATTRIB_STACK_DEPTH = 0x0BB1 # 1 I + + ALPHA_TEST = 0x0BC0 # 1 I + ALPHA_TEST_FUNC = 0x0BC1 # 1 I + ALPHA_TEST_REF = 0x0BC2 # 1 F + + DITHER = 0x0BD0 # 1 I + + BLEND_DST = 0x0BE0 # 1 I + BLEND_SRC = 0x0BE1 # 1 I + BLEND = 0x0BE2 # 1 I + + LOGIC_OP_MODE = 0x0BF0 # 1 I + INDEX_LOGIC_OP = 0x0BF1 # 1 I + LOGIC_OP = 0x0BF1 # 1 I + COLOR_LOGIC_OP = 0x0BF2 # 1 I + + AUX_BUFFERS = 0x0C00 # 1 I + DRAW_BUFFER = 0x0C01 # 1 I + READ_BUFFER = 0x0C02 # 1 I + + SCISSOR_BOX = 0x0C10 # 4 I + SCISSOR_TEST = 0x0C11 # 1 I + + INDEX_CLEAR_VALUE = 0x0C20 # 1 I + INDEX_WRITEMASK = 0x0C21 # 1 I + COLOR_CLEAR_VALUE = 0x0C22 # 4 F + COLOR_WRITEMASK = 0x0C23 # 4 I + + INDEX_MODE = 0x0C30 # 1 I + RGBA_MODE = 0x0C31 # 1 I + DOUBLEBUFFER = 0x0C32 # 1 I + STEREO = 0x0C33 # 1 I + + RENDER_MODE = 0x0C40 # 1 I + + PERSPECTIVE_CORRECTION_HINT = 0x0C50 # 1 I + POINT_SMOOTH_HINT = 0x0C51 # 1 I + LINE_SMOOTH_HINT = 0x0C52 # 1 I + POLYGON_SMOOTH_HINT = 0x0C53 # 1 I + FOG_HINT = 0x0C54 # 1 I + + TEXTURE_GEN_S = 0x0C60 # 1 I + TEXTURE_GEN_T = 0x0C61 # 1 I + TEXTURE_GEN_R = 0x0C62 # 1 I + TEXTURE_GEN_Q = 0x0C63 # 1 I + + PIXEL_MAP_I_TO_I_SIZE = 0x0CB0 # 1 I + PIXEL_MAP_S_TO_S_SIZE = 0x0CB1 # 1 I + PIXEL_MAP_I_TO_R_SIZE = 0x0CB2 # 1 I + PIXEL_MAP_I_TO_G_SIZE = 0x0CB3 # 1 I + PIXEL_MAP_I_TO_B_SIZE = 0x0CB4 # 1 I + PIXEL_MAP_I_TO_A_SIZE = 0x0CB5 # 1 I + PIXEL_MAP_R_TO_R_SIZE = 0x0CB6 # 1 I + PIXEL_MAP_G_TO_G_SIZE = 0x0CB7 # 1 I + PIXEL_MAP_B_TO_B_SIZE = 0x0CB8 # 1 I + PIXEL_MAP_A_TO_A_SIZE = 0x0CB9 # 1 I + + UNPACK_SWAP_BYTES = 0x0CF0 # 1 I + UNPACK_LSB_FIRST = 0x0CF1 # 1 I + UNPACK_ROW_LENGTH = 0x0CF2 # 1 I + UNPACK_SKIP_ROWS = 0x0CF3 # 1 I + UNPACK_SKIP_PIXELS = 0x0CF4 # 1 I + UNPACK_ALIGNMENT = 0x0CF5 # 1 I + + PACK_SWAP_BYTES = 0x0D00 # 1 I + PACK_LSB_FIRST = 0x0D01 # 1 I + PACK_ROW_LENGTH = 0x0D02 # 1 I + PACK_SKIP_ROWS = 0x0D03 # 1 I + PACK_SKIP_PIXELS = 0x0D04 # 1 I + PACK_ALIGNMENT = 0x0D05 # 1 I + + MAP_COLOR = 0x0D10 # 1 I + MAP_STENCIL = 0x0D11 # 1 I + INDEX_SHIFT = 0x0D12 # 1 I + INDEX_OFFSET = 0x0D13 # 1 I + RED_SCALE = 0x0D14 # 1 F + RED_BIAS = 0x0D15 # 1 F + ZOOM_X = 0x0D16 # 1 F + ZOOM_Y = 0x0D17 # 1 F + GREEN_SCALE = 0x0D18 # 1 F + GREEN_BIAS = 0x0D19 # 1 F + BLUE_SCALE = 0x0D1A # 1 F + BLUE_BIAS = 0x0D1B # 1 F + ALPHA_SCALE = 0x0D1C # 1 F + ALPHA_BIAS = 0x0D1D # 1 F + DEPTH_SCALE = 0x0D1E # 1 F + DEPTH_BIAS = 0x0D1F # 1 F + + MAX_EVAL_ORDER = 0x0D30 # 1 I + MAX_LIGHTS = 0x0D31 # 1 I + +# VERSION_3_0 enum: (aliases) + MAX_CLIP_DISTANCES = 0x0D32 # VERSION_3_0 # alias GL_MAX_CLIP_PLANES + + MAX_CLIP_PLANES = 0x0D32 # 1 I + MAX_TEXTURE_SIZE = 0x0D33 # 1 I + MAX_PIXEL_MAP_TABLE = 0x0D34 # 1 I + MAX_ATTRIB_STACK_DEPTH = 0x0D35 # 1 I + MAX_MODELVIEW_STACK_DEPTH = 0x0D36 # 1 I + MAX_NAME_STACK_DEPTH = 0x0D37 # 1 I + MAX_PROJECTION_STACK_DEPTH = 0x0D38 # 1 I + MAX_TEXTURE_STACK_DEPTH = 0x0D39 # 1 I + MAX_VIEWPORT_DIMS = 0x0D3A # 2 F + MAX_CLIENT_ATTRIB_STACK_DEPTH = 0x0D3B # 1 I + + SUBPIXEL_BITS = 0x0D50 # 1 I + INDEX_BITS = 0x0D51 # 1 I + RED_BITS = 0x0D52 # 1 I + GREEN_BITS = 0x0D53 # 1 I + BLUE_BITS = 0x0D54 # 1 I + ALPHA_BITS = 0x0D55 # 1 I + DEPTH_BITS = 0x0D56 # 1 I + STENCIL_BITS = 0x0D57 # 1 I + ACCUM_RED_BITS = 0x0D58 # 1 I + ACCUM_GREEN_BITS = 0x0D59 # 1 I + ACCUM_BLUE_BITS = 0x0D5A # 1 I + ACCUM_ALPHA_BITS = 0x0D5B # 1 I + + NAME_STACK_DEPTH = 0x0D70 # 1 I + + AUTO_NORMAL = 0x0D80 # 1 I + + MAP1_COLOR_4 = 0x0D90 # 1 I + MAP1_INDEX = 0x0D91 # 1 I + MAP1_NORMAL = 0x0D92 # 1 I + MAP1_TEXTURE_COORD_1 = 0x0D93 # 1 I + MAP1_TEXTURE_COORD_2 = 0x0D94 # 1 I + MAP1_TEXTURE_COORD_3 = 0x0D95 # 1 I + MAP1_TEXTURE_COORD_4 = 0x0D96 # 1 I + MAP1_VERTEX_3 = 0x0D97 # 1 I + MAP1_VERTEX_4 = 0x0D98 # 1 I + + MAP2_COLOR_4 = 0x0DB0 # 1 I + MAP2_INDEX = 0x0DB1 # 1 I + MAP2_NORMAL = 0x0DB2 # 1 I + MAP2_TEXTURE_COORD_1 = 0x0DB3 # 1 I + MAP2_TEXTURE_COORD_2 = 0x0DB4 # 1 I + MAP2_TEXTURE_COORD_3 = 0x0DB5 # 1 I + MAP2_TEXTURE_COORD_4 = 0x0DB6 # 1 I + MAP2_VERTEX_3 = 0x0DB7 # 1 I + MAP2_VERTEX_4 = 0x0DB8 # 1 I + + MAP1_GRID_DOMAIN = 0x0DD0 # 2 F + MAP1_GRID_SEGMENTS = 0x0DD1 # 1 I + MAP2_GRID_DOMAIN = 0x0DD2 # 4 F + MAP2_GRID_SEGMENTS = 0x0DD3 # 2 I + + TEXTURE_1D = 0x0DE0 # 1 I + TEXTURE_2D = 0x0DE1 # 1 I + + FEEDBACK_BUFFER_SIZE = 0x0DF1 # 1 I + FEEDBACK_BUFFER_TYPE = 0x0DF2 # 1 I + + SELECTION_BUFFER_SIZE = 0x0DF4 # 1 I + + POLYGON_OFFSET_UNITS = 0x2A00 # 1 F + POLYGON_OFFSET_POINT = 0x2A01 # 1 I + POLYGON_OFFSET_LINE = 0x2A02 # 1 I + POLYGON_OFFSET_FILL = 0x8037 # 1 I + POLYGON_OFFSET_FACTOR = 0x8038 # 1 F + + TEXTURE_BINDING_1D = 0x8068 # 1 I + TEXTURE_BINDING_2D = 0x8069 # 1 I + TEXTURE_BINDING_3D = 0x806A # 1 I + + VERTEX_ARRAY = 0x8074 # 1 I + NORMAL_ARRAY = 0x8075 # 1 I + COLOR_ARRAY = 0x8076 # 1 I + INDEX_ARRAY = 0x8077 # 1 I + TEXTURE_COORD_ARRAY = 0x8078 # 1 I + EDGE_FLAG_ARRAY = 0x8079 # 1 I + + VERTEX_ARRAY_SIZE = 0x807A # 1 I + VERTEX_ARRAY_TYPE = 0x807B # 1 I + VERTEX_ARRAY_STRIDE = 0x807C # 1 I + + NORMAL_ARRAY_TYPE = 0x807E # 1 I + NORMAL_ARRAY_STRIDE = 0x807F # 1 I + + COLOR_ARRAY_SIZE = 0x8081 # 1 I + COLOR_ARRAY_TYPE = 0x8082 # 1 I + COLOR_ARRAY_STRIDE = 0x8083 # 1 I + + INDEX_ARRAY_TYPE = 0x8085 # 1 I + INDEX_ARRAY_STRIDE = 0x8086 # 1 I + + TEXTURE_COORD_ARRAY_SIZE = 0x8088 # 1 I + TEXTURE_COORD_ARRAY_TYPE = 0x8089 # 1 I + TEXTURE_COORD_ARRAY_STRIDE = 0x808A # 1 I + + EDGE_FLAG_ARRAY_STRIDE = 0x808C # 1 I + + use ClipPlaneName CLIP_PLANE0 + use ClipPlaneName CLIP_PLANE1 + use ClipPlaneName CLIP_PLANE2 + use ClipPlaneName CLIP_PLANE3 + use ClipPlaneName CLIP_PLANE4 + use ClipPlaneName CLIP_PLANE5 + + use LightName LIGHT0 + use LightName LIGHT1 + use LightName LIGHT2 + use LightName LIGHT3 + use LightName LIGHT4 + use LightName LIGHT5 + use LightName LIGHT6 + use LightName LIGHT7 + +# use ARB_transpose_matrix TRANSPOSE_MODELVIEW_MATRIX_ARB +# use ARB_transpose_matrix TRANSPOSE_PROJECTION_MATRIX_ARB +# use ARB_transpose_matrix TRANSPOSE_TEXTURE_MATRIX_ARB +# use ARB_transpose_matrix TRANSPOSE_COLOR_MATRIX_ARB + + use VERSION_1_2 LIGHT_MODEL_COLOR_CONTROL + + use EXT_blend_color BLEND_COLOR_EXT + + use EXT_blend_minmax BLEND_EQUATION_EXT + + use EXT_cmyka PACK_CMYK_HINT_EXT + use EXT_cmyka UNPACK_CMYK_HINT_EXT + + use EXT_convolution CONVOLUTION_1D_EXT + use EXT_convolution CONVOLUTION_2D_EXT + use EXT_convolution SEPARABLE_2D_EXT + use EXT_convolution POST_CONVOLUTION_RED_SCALE_EXT + use EXT_convolution POST_CONVOLUTION_GREEN_SCALE_EXT + use EXT_convolution POST_CONVOLUTION_BLUE_SCALE_EXT + use EXT_convolution POST_CONVOLUTION_ALPHA_SCALE_EXT + use EXT_convolution POST_CONVOLUTION_RED_BIAS_EXT + use EXT_convolution POST_CONVOLUTION_GREEN_BIAS_EXT + use EXT_convolution POST_CONVOLUTION_BLUE_BIAS_EXT + use EXT_convolution POST_CONVOLUTION_ALPHA_BIAS_EXT + + use EXT_histogram HISTOGRAM_EXT + use EXT_histogram MINMAX_EXT + + use EXT_polygon_offset POLYGON_OFFSET_BIAS_EXT + + use EXT_rescale_normal RESCALE_NORMAL_EXT + + use EXT_shared_texture_palette SHARED_TEXTURE_PALETTE_EXT + + use EXT_texture_object TEXTURE_3D_BINDING_EXT + + use EXT_texture3D PACK_SKIP_IMAGES_EXT + use EXT_texture3D PACK_IMAGE_HEIGHT_EXT + use EXT_texture3D UNPACK_SKIP_IMAGES_EXT + use EXT_texture3D UNPACK_IMAGE_HEIGHT_EXT + use EXT_texture3D TEXTURE_3D_EXT + use EXT_texture3D MAX_3D_TEXTURE_SIZE_EXT + + use EXT_vertex_array VERTEX_ARRAY_COUNT_EXT + use EXT_vertex_array NORMAL_ARRAY_COUNT_EXT + use EXT_vertex_array COLOR_ARRAY_COUNT_EXT + use EXT_vertex_array INDEX_ARRAY_COUNT_EXT + use EXT_vertex_array TEXTURE_COORD_ARRAY_COUNT_EXT + use EXT_vertex_array EDGE_FLAG_ARRAY_COUNT_EXT + + use SGIS_detail_texture DETAIL_TEXTURE_2D_BINDING_SGIS + + use SGIS_fog_function FOG_FUNC_POINTS_SGIS + use SGIS_fog_function MAX_FOG_FUNC_POINTS_SGIS + + use SGIS_generate_mipmap GENERATE_MIPMAP_HINT_SGIS + + use SGIS_multisample MULTISAMPLE_SGIS + use SGIS_multisample SAMPLE_ALPHA_TO_MASK_SGIS + use SGIS_multisample SAMPLE_ALPHA_TO_ONE_SGIS + use SGIS_multisample SAMPLE_MASK_SGIS + use SGIS_multisample SAMPLE_BUFFERS_SGIS + use SGIS_multisample SAMPLES_SGIS + use SGIS_multisample SAMPLE_MASK_VALUE_SGIS + use SGIS_multisample SAMPLE_MASK_INVERT_SGIS + use SGIS_multisample SAMPLE_PATTERN_SGIS + + use SGIS_pixel_texture PIXEL_TEXTURE_SGIS + + use SGIS_point_parameters POINT_SIZE_MIN_SGIS + use SGIS_point_parameters POINT_SIZE_MAX_SGIS + use SGIS_point_parameters POINT_FADE_THRESHOLD_SIZE_SGIS + use SGIS_point_parameters DISTANCE_ATTENUATION_SGIS + + use SGIS_texture4D PACK_SKIP_VOLUMES_SGIS + use SGIS_texture4D PACK_IMAGE_DEPTH_SGIS + use SGIS_texture4D UNPACK_SKIP_VOLUMES_SGIS + use SGIS_texture4D UNPACK_IMAGE_DEPTH_SGIS + use SGIS_texture4D TEXTURE_4D_SGIS + use SGIS_texture4D MAX_4D_TEXTURE_SIZE_SGIS + use SGIS_texture4D TEXTURE_4D_BINDING_SGIS + + use SGIX_async ASYNC_MARKER_SGIX + + use SGIX_async_histogram ASYNC_HISTOGRAM_SGIX + use SGIX_async_histogram MAX_ASYNC_HISTOGRAM_SGIX + + use SGIX_async_pixel ASYNC_TEX_IMAGE_SGIX + use SGIX_async_pixel ASYNC_DRAW_PIXELS_SGIX + use SGIX_async_pixel ASYNC_READ_PIXELS_SGIX + use SGIX_async_pixel MAX_ASYNC_TEX_IMAGE_SGIX + use SGIX_async_pixel MAX_ASYNC_DRAW_PIXELS_SGIX + use SGIX_async_pixel MAX_ASYNC_READ_PIXELS_SGIX + + use SGIX_calligraphic_fragment CALLIGRAPHIC_FRAGMENT_SGIX + + use SGIX_clipmap MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX + use SGIX_clipmap MAX_CLIPMAP_DEPTH_SGIX + + use SGIX_convolution_accuracy CONVOLUTION_HINT_SGIX + + use SGIX_fog_offset FOG_OFFSET_SGIX + use SGIX_fog_offset FOG_OFFSET_VALUE_SGIX + + use SGIX_fragment_lighting FRAGMENT_LIGHTING_SGIX + use SGIX_fragment_lighting FRAGMENT_COLOR_MATERIAL_SGIX + use SGIX_fragment_lighting FRAGMENT_COLOR_MATERIAL_FACE_SGIX + use SGIX_fragment_lighting FRAGMENT_COLOR_MATERIAL_PARAMETER_SGIX + use SGIX_fragment_lighting MAX_FRAGMENT_LIGHTS_SGIX + use SGIX_fragment_lighting MAX_ACTIVE_LIGHTS_SGIX + use SGIX_fragment_lighting LIGHT_ENV_MODE_SGIX + use SGIX_fragment_lighting FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX + use SGIX_fragment_lighting FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX + use SGIX_fragment_lighting FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX + use SGIX_fragment_lighting FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX + use SGIX_fragment_lighting FRAGMENT_LIGHT0_SGIX + + use SGIX_framezoom FRAMEZOOM_SGIX + use SGIX_framezoom FRAMEZOOM_FACTOR_SGIX + use SGIX_framezoom MAX_FRAMEZOOM_FACTOR_SGIX + + use SGIX_instruments INSTRUMENT_MEASUREMENTS_SGIX + + use SGIX_interlace INTERLACE_SGIX + + use SGIX_ir_instrument1 IR_INSTRUMENT1_SGIX + + use SGIX_pixel_texture PIXEL_TEX_GEN_SGIX + use SGIX_pixel_texture PIXEL_TEX_GEN_MODE_SGIX + + use SGIX_pixel_tiles PIXEL_TILE_BEST_ALIGNMENT_SGIX + use SGIX_pixel_tiles PIXEL_TILE_CACHE_INCREMENT_SGIX + use SGIX_pixel_tiles PIXEL_TILE_WIDTH_SGIX + use SGIX_pixel_tiles PIXEL_TILE_HEIGHT_SGIX + use SGIX_pixel_tiles PIXEL_TILE_GRID_WIDTH_SGIX + use SGIX_pixel_tiles PIXEL_TILE_GRID_HEIGHT_SGIX + use SGIX_pixel_tiles PIXEL_TILE_GRID_DEPTH_SGIX + use SGIX_pixel_tiles PIXEL_TILE_CACHE_SIZE_SGIX + + use SGIX_polynomial_ffd DEFORMATIONS_MASK_SGIX + + use SGIX_reference_plane REFERENCE_PLANE_EQUATION_SGIX + use SGIX_reference_plane REFERENCE_PLANE_SGIX + + use SGIX_sprite SPRITE_SGIX + use SGIX_sprite SPRITE_MODE_SGIX + use SGIX_sprite SPRITE_AXIS_SGIX + use SGIX_sprite SPRITE_TRANSLATION_SGIX + + use SGIX_subsample PACK_SUBSAMPLE_RATE_SGIX + use SGIX_subsample UNPACK_SUBSAMPLE_RATE_SGIX + use SGIX_resample PACK_RESAMPLE_SGIX + use SGIX_resample UNPACK_RESAMPLE_SGIX + + use SGIX_texture_scale_bias POST_TEXTURE_FILTER_BIAS_RANGE_SGIX + use SGIX_texture_scale_bias POST_TEXTURE_FILTER_SCALE_RANGE_SGIX + + use SGIX_vertex_preclip VERTEX_PRECLIP_SGIX + use SGIX_vertex_preclip VERTEX_PRECLIP_HINT_SGIX + + use SGI_color_matrix COLOR_MATRIX_SGI + use SGI_color_matrix COLOR_MATRIX_STACK_DEPTH_SGI + use SGI_color_matrix MAX_COLOR_MATRIX_STACK_DEPTH_SGI + use SGI_color_matrix POST_COLOR_MATRIX_RED_SCALE_SGI + use SGI_color_matrix POST_COLOR_MATRIX_GREEN_SCALE_SGI + use SGI_color_matrix POST_COLOR_MATRIX_BLUE_SCALE_SGI + use SGI_color_matrix POST_COLOR_MATRIX_ALPHA_SCALE_SGI + use SGI_color_matrix POST_COLOR_MATRIX_RED_BIAS_SGI + use SGI_color_matrix POST_COLOR_MATRIX_GREEN_BIAS_SGI + use SGI_color_matrix POST_COLOR_MATRIX_BLUE_BIAS_SGI + use SGI_color_matrix POST_COLOR_MATRIX_ALPHA_BIAS_SGI + + use SGI_color_table COLOR_TABLE_SGI + use SGI_color_table POST_CONVOLUTION_COLOR_TABLE_SGI + use SGI_color_table POST_COLOR_MATRIX_COLOR_TABLE_SGI + + use SGI_texture_color_table TEXTURE_COLOR_TABLE_SGI + +############################################################################### + +GetTextureParameter enum: + use TextureParameterName TEXTURE_MAG_FILTER + use TextureParameterName TEXTURE_MIN_FILTER + use TextureParameterName TEXTURE_WRAP_S + use TextureParameterName TEXTURE_WRAP_T + TEXTURE_WIDTH = 0x1000 + TEXTURE_HEIGHT = 0x1001 + TEXTURE_INTERNAL_FORMAT = 0x1003 + TEXTURE_COMPONENTS = 0x1003 + TEXTURE_BORDER_COLOR = 0x1004 + TEXTURE_BORDER = 0x1005 + TEXTURE_RED_SIZE = 0x805C + TEXTURE_GREEN_SIZE = 0x805D + TEXTURE_BLUE_SIZE = 0x805E + TEXTURE_ALPHA_SIZE = 0x805F + TEXTURE_LUMINANCE_SIZE = 0x8060 + TEXTURE_INTENSITY_SIZE = 0x8061 + TEXTURE_PRIORITY = 0x8066 + TEXTURE_RESIDENT = 0x8067 + use EXT_texture3D TEXTURE_DEPTH_EXT + use EXT_texture3D TEXTURE_WRAP_R_EXT + use SGIS_detail_texture DETAIL_TEXTURE_LEVEL_SGIS + use SGIS_detail_texture DETAIL_TEXTURE_MODE_SGIS + use SGIS_detail_texture DETAIL_TEXTURE_FUNC_POINTS_SGIS + use SGIS_generate_mipmap GENERATE_MIPMAP_SGIS + use SGIS_sharpen_texture SHARPEN_TEXTURE_FUNC_POINTS_SGIS + use SGIS_texture_filter4 TEXTURE_FILTER4_SIZE_SGIS + use SGIS_texture_lod TEXTURE_MIN_LOD_SGIS + use SGIS_texture_lod TEXTURE_MAX_LOD_SGIS + use SGIS_texture_lod TEXTURE_BASE_LEVEL_SGIS + use SGIS_texture_lod TEXTURE_MAX_LEVEL_SGIS + use SGIS_texture_select DUAL_TEXTURE_SELECT_SGIS + use SGIS_texture_select QUAD_TEXTURE_SELECT_SGIS + use SGIS_texture4D TEXTURE_4DSIZE_SGIS + use SGIS_texture4D TEXTURE_WRAP_Q_SGIS + use SGIX_clipmap TEXTURE_CLIPMAP_CENTER_SGIX + use SGIX_clipmap TEXTURE_CLIPMAP_FRAME_SGIX + use SGIX_clipmap TEXTURE_CLIPMAP_OFFSET_SGIX + use SGIX_clipmap TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX + use SGIX_clipmap TEXTURE_CLIPMAP_LOD_OFFSET_SGIX + use SGIX_clipmap TEXTURE_CLIPMAP_DEPTH_SGIX + use SGIX_shadow TEXTURE_COMPARE_SGIX + use SGIX_shadow TEXTURE_COMPARE_OPERATOR_SGIX + use SGIX_shadow TEXTURE_LEQUAL_R_SGIX + use SGIX_shadow TEXTURE_GEQUAL_R_SGIX + use SGIX_shadow_ambient SHADOW_AMBIENT_SGIX + use SGIX_texture_coordinate_clamp TEXTURE_MAX_CLAMP_S_SGIX + use SGIX_texture_coordinate_clamp TEXTURE_MAX_CLAMP_T_SGIX + use SGIX_texture_coordinate_clamp TEXTURE_MAX_CLAMP_R_SGIX + use SGIX_texture_lod_bias TEXTURE_LOD_BIAS_S_SGIX + use SGIX_texture_lod_bias TEXTURE_LOD_BIAS_T_SGIX + use SGIX_texture_lod_bias TEXTURE_LOD_BIAS_R_SGIX + use SGIX_texture_scale_bias POST_TEXTURE_FILTER_BIAS_SGIX + use SGIX_texture_scale_bias POST_TEXTURE_FILTER_SCALE_SGIX + +############################################################################### + +HintMode enum: + DONT_CARE = 0x1100 + FASTEST = 0x1101 + NICEST = 0x1102 + +############################################################################### + +HintTarget enum: + use GetPName PERSPECTIVE_CORRECTION_HINT + use GetPName POINT_SMOOTH_HINT + use GetPName LINE_SMOOTH_HINT + use GetPName POLYGON_SMOOTH_HINT + use GetPName FOG_HINT + use EXT_cmyka PACK_CMYK_HINT_EXT + use EXT_cmyka UNPACK_CMYK_HINT_EXT + use SGIS_generate_mipmap GENERATE_MIPMAP_HINT_SGIS + use SGIX_convolution_accuracy CONVOLUTION_HINT_SGIX + use SGIX_texture_multi_buffer TEXTURE_MULTI_BUFFER_HINT_SGIX + use SGIX_vertex_preclip VERTEX_PRECLIP_HINT_SGIX + +############################################################################### + +HistogramTargetEXT enum: + use EXT_histogram HISTOGRAM_EXT + use EXT_histogram PROXY_HISTOGRAM_EXT + +############################################################################### + +IndexPointerType enum: + use DataType SHORT + use DataType INT + use DataType FLOAT + use DataType DOUBLE + +############################################################################### + +LightEnvModeSGIX enum: + use StencilOp REPLACE + use TextureEnvMode MODULATE + use AccumOp ADD + +############################################################################### + +LightEnvParameterSGIX enum: + use SGIX_fragment_lighting LIGHT_ENV_MODE_SGIX + +############################################################################### + +LightModelColorControl enum: + use VERSION_1_2 SINGLE_COLOR + use VERSION_1_2 SEPARATE_SPECULAR_COLOR + +############################################################################### + +LightModelParameter enum: + use GetPName LIGHT_MODEL_AMBIENT + use GetPName LIGHT_MODEL_LOCAL_VIEWER + use GetPName LIGHT_MODEL_TWO_SIDE + use VERSION_1_2 LIGHT_MODEL_COLOR_CONTROL + +############################################################################### + +LightParameter enum: + AMBIENT = 0x1200 + DIFFUSE = 0x1201 + SPECULAR = 0x1202 + POSITION = 0x1203 + SPOT_DIRECTION = 0x1204 + SPOT_EXPONENT = 0x1205 + SPOT_CUTOFF = 0x1206 + CONSTANT_ATTENUATION = 0x1207 + LINEAR_ATTENUATION = 0x1208 + QUADRATIC_ATTENUATION = 0x1209 + +############################################################################### + +ListMode enum: + COMPILE = 0x1300 + COMPILE_AND_EXECUTE = 0x1301 + +############################################################################### + +DataType enum: + BYTE = 0x1400 + UNSIGNED_BYTE = 0x1401 + SHORT = 0x1402 + UNSIGNED_SHORT = 0x1403 + INT = 0x1404 + UNSIGNED_INT = 0x1405 + FLOAT = 0x1406 + 2_BYTES = 0x1407 + 3_BYTES = 0x1408 + 4_BYTES = 0x1409 + DOUBLE = 0x140A + DOUBLE_EXT = 0x140A + +# OES_byte_coordinates: (OpenGL ES only) +# use DataType BYTE + +OES_element_index_uint enum: (OpenGL ES only) +# use DataType UNSIGNED_INT + +OES_texture_float enum: (OpenGL ES only; additional; see below) +# use DataType FLOAT + +VERSION_3_0 enum: +# use ARB_half_float_vertex HALF_FLOAT + +ARB_half_float_vertex enum: (note: no ARB suffixes) + HALF_FLOAT = 0x140B # VERSION_3_0 / ARB_half_float_vertex + +ARB_half_float_pixel enum: + HALF_FLOAT_ARB = 0x140B + +NV_half_float enum: + HALF_FLOAT_NV = 0x140B + +APPLE_float_pixels enum: (additional; see below) + HALF_APPLE = 0x140B + +OES_fixed_point enum: (OpenGL ES only) + FIXED_OES = 0x140C + +# Leave a gap to preserve even/odd int/uint token values +# ARB_future_use: 0x140D + +# Future NV extension (Khronos bug 5172) + INT64_NV = 0x140E + UNSIGNED_INT64_NV = 0x140F + +############################################################################### + +ListNameType enum: + use DataType BYTE + use DataType UNSIGNED_BYTE + use DataType SHORT + use DataType UNSIGNED_SHORT + use DataType INT + use DataType UNSIGNED_INT + use DataType FLOAT + use DataType 2_BYTES + use DataType 3_BYTES + use DataType 4_BYTES + +############################################################################### + +ListParameterName enum: + use SGIX_list_priority LIST_PRIORITY_SGIX + +############################################################################### + +LogicOp enum: + CLEAR = 0x1500 + AND = 0x1501 + AND_REVERSE = 0x1502 + COPY = 0x1503 + AND_INVERTED = 0x1504 + NOOP = 0x1505 + XOR = 0x1506 + OR = 0x1507 + NOR = 0x1508 + EQUIV = 0x1509 + INVERT = 0x150A + OR_REVERSE = 0x150B + COPY_INVERTED = 0x150C + OR_INVERTED = 0x150D + NAND = 0x150E + SET = 0x150F + +############################################################################### + +MapTarget enum: + use GetPName MAP1_COLOR_4 + use GetPName MAP1_INDEX + use GetPName MAP1_NORMAL + use GetPName MAP1_TEXTURE_COORD_1 + use GetPName MAP1_TEXTURE_COORD_2 + use GetPName MAP1_TEXTURE_COORD_3 + use GetPName MAP1_TEXTURE_COORD_4 + use GetPName MAP1_VERTEX_3 + use GetPName MAP1_VERTEX_4 + use GetPName MAP2_COLOR_4 + use GetPName MAP2_INDEX + use GetPName MAP2_NORMAL + use GetPName MAP2_TEXTURE_COORD_1 + use GetPName MAP2_TEXTURE_COORD_2 + use GetPName MAP2_TEXTURE_COORD_3 + use GetPName MAP2_TEXTURE_COORD_4 + use GetPName MAP2_VERTEX_3 + use GetPName MAP2_VERTEX_4 + use SGIX_polynomial_ffd GEOMETRY_DEFORMATION_SGIX + use SGIX_polynomial_ffd TEXTURE_DEFORMATION_SGIX + +############################################################################### + +MaterialFace enum: + use DrawBufferMode FRONT + use DrawBufferMode BACK + use DrawBufferMode FRONT_AND_BACK + + +############################################################################### + +MaterialParameter enum: + EMISSION = 0x1600 + SHININESS = 0x1601 + AMBIENT_AND_DIFFUSE = 0x1602 + COLOR_INDEXES = 0x1603 + use LightParameter AMBIENT + use LightParameter DIFFUSE + use LightParameter SPECULAR + +############################################################################### + +MatrixMode enum: + MODELVIEW = 0x1700 + PROJECTION = 0x1701 + TEXTURE = 0x1702 + +############################################################################### + +MeshMode1 enum: + use PolygonMode POINT + use PolygonMode LINE + +############################################################################### + +MeshMode2 enum: + use PolygonMode POINT + use PolygonMode LINE + use PolygonMode FILL + +############################################################################### + +MinmaxTargetEXT enum: + use EXT_histogram MINMAX_EXT + +############################################################################### + +NormalPointerType enum: + use DataType BYTE + use DataType SHORT + use DataType INT + use DataType FLOAT + use DataType DOUBLE + +############################################################################### + +PixelCopyType enum: + COLOR = 0x1800 + DEPTH = 0x1801 + STENCIL = 0x1802 + +EXT_discard_framebuffer enum: (OpenGL ES only) + COLOR_EXT = 0x1800 + DEPTH_EXT = 0x1801 + STENCIL_EXT = 0x1802 + +############################################################################### + +PixelFormat enum: + COLOR_INDEX = 0x1900 + STENCIL_INDEX = 0x1901 + DEPTH_COMPONENT = 0x1902 + RED = 0x1903 + GREEN = 0x1904 + BLUE = 0x1905 + ALPHA = 0x1906 + RGB = 0x1907 + RGBA = 0x1908 + LUMINANCE = 0x1909 + LUMINANCE_ALPHA = 0x190A + use EXT_abgr ABGR_EXT + use EXT_cmyka CMYK_EXT + use EXT_cmyka CMYKA_EXT + use SGIX_icc_texture R5_G6_B5_ICC_SGIX + use SGIX_icc_texture R5_G6_B5_A8_ICC_SGIX + use SGIX_icc_texture ALPHA16_ICC_SGIX + use SGIX_icc_texture LUMINANCE16_ICC_SGIX + use SGIX_icc_texture LUMINANCE16_ALPHA8_ICC_SGIX + use SGIX_ycrcb YCRCB_422_SGIX + use SGIX_ycrcb YCRCB_444_SGIX + +OES_depth_texture enum: (OpenGL ES only) +# use DataType UNSIGNED_SHORT +# use DataType UNSIGNED_INT +# use PixelFormat DEPTH_COMPONENT + +############################################################################### + +PixelMap enum: + use GetPixelMap PIXEL_MAP_I_TO_I + use GetPixelMap PIXEL_MAP_S_TO_S + use GetPixelMap PIXEL_MAP_I_TO_R + use GetPixelMap PIXEL_MAP_I_TO_G + use GetPixelMap PIXEL_MAP_I_TO_B + use GetPixelMap PIXEL_MAP_I_TO_A + use GetPixelMap PIXEL_MAP_R_TO_R + use GetPixelMap PIXEL_MAP_G_TO_G + use GetPixelMap PIXEL_MAP_B_TO_B + use GetPixelMap PIXEL_MAP_A_TO_A + +############################################################################### + +PixelStoreParameter enum: + use GetPName UNPACK_SWAP_BYTES + use GetPName UNPACK_LSB_FIRST + use GetPName UNPACK_ROW_LENGTH + use GetPName UNPACK_SKIP_ROWS + use GetPName UNPACK_SKIP_PIXELS + use GetPName UNPACK_ALIGNMENT + use GetPName PACK_SWAP_BYTES + use GetPName PACK_LSB_FIRST + use GetPName PACK_ROW_LENGTH + use GetPName PACK_SKIP_ROWS + use GetPName PACK_SKIP_PIXELS + use GetPName PACK_ALIGNMENT + use EXT_texture3D PACK_SKIP_IMAGES_EXT + use EXT_texture3D PACK_IMAGE_HEIGHT_EXT + use EXT_texture3D UNPACK_SKIP_IMAGES_EXT + use EXT_texture3D UNPACK_IMAGE_HEIGHT_EXT + use SGIS_texture4D PACK_SKIP_VOLUMES_SGIS + use SGIS_texture4D PACK_IMAGE_DEPTH_SGIS + use SGIS_texture4D UNPACK_SKIP_VOLUMES_SGIS + use SGIS_texture4D UNPACK_IMAGE_DEPTH_SGIS + use SGIX_pixel_tiles PIXEL_TILE_WIDTH_SGIX + use SGIX_pixel_tiles PIXEL_TILE_HEIGHT_SGIX + use SGIX_pixel_tiles PIXEL_TILE_GRID_WIDTH_SGIX + use SGIX_pixel_tiles PIXEL_TILE_GRID_HEIGHT_SGIX + use SGIX_pixel_tiles PIXEL_TILE_GRID_DEPTH_SGIX + use SGIX_pixel_tiles PIXEL_TILE_CACHE_SIZE_SGIX + use SGIX_subsample PACK_SUBSAMPLE_RATE_SGIX + use SGIX_subsample UNPACK_SUBSAMPLE_RATE_SGIX + use SGIX_resample PACK_RESAMPLE_SGIX + use SGIX_resample UNPACK_RESAMPLE_SGIX + +############################################################################### + +PixelStoreResampleMode enum: + use SGIX_resample RESAMPLE_REPLICATE_SGIX + use SGIX_resample RESAMPLE_ZERO_FILL_SGIX + use SGIX_resample RESAMPLE_DECIMATE_SGIX + +############################################################################### + +PixelStoreSubsampleRate enum: + use SGIX_subsample PIXEL_SUBSAMPLE_4444_SGIX + use SGIX_subsample PIXEL_SUBSAMPLE_2424_SGIX + use SGIX_subsample PIXEL_SUBSAMPLE_4242_SGIX + +############################################################################### + +PixelTexGenMode enum: + use DrawBufferMode NONE + use PixelFormat RGB + use PixelFormat RGBA + use PixelFormat LUMINANCE + use PixelFormat LUMINANCE_ALPHA + use SGIX_impact_pixel_texture PIXEL_TEX_GEN_ALPHA_REPLACE_SGIX + use SGIX_impact_pixel_texture PIXEL_TEX_GEN_ALPHA_NO_REPLACE_SGIX + use SGIX_impact_pixel_texture PIXEL_TEX_GEN_ALPHA_MS_SGIX + use SGIX_impact_pixel_texture PIXEL_TEX_GEN_ALPHA_LS_SGIX + +############################################################################### + +PixelTexGenParameterNameSGIS enum: + use SGIS_pixel_texture PIXEL_FRAGMENT_RGB_SOURCE_SGIS + use SGIS_pixel_texture PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS + +############################################################################### + +PixelTransferParameter enum: + use GetPName MAP_COLOR + use GetPName MAP_STENCIL + use GetPName INDEX_SHIFT + use GetPName INDEX_OFFSET + use GetPName RED_SCALE + use GetPName RED_BIAS + use GetPName GREEN_SCALE + use GetPName GREEN_BIAS + use GetPName BLUE_SCALE + use GetPName BLUE_BIAS + use GetPName ALPHA_SCALE + use GetPName ALPHA_BIAS + use GetPName DEPTH_SCALE + use GetPName DEPTH_BIAS + use EXT_convolution POST_CONVOLUTION_RED_SCALE_EXT + use EXT_convolution POST_CONVOLUTION_GREEN_SCALE_EXT + use EXT_convolution POST_CONVOLUTION_BLUE_SCALE_EXT + use EXT_convolution POST_CONVOLUTION_ALPHA_SCALE_EXT + use EXT_convolution POST_CONVOLUTION_RED_BIAS_EXT + use EXT_convolution POST_CONVOLUTION_GREEN_BIAS_EXT + use EXT_convolution POST_CONVOLUTION_BLUE_BIAS_EXT + use EXT_convolution POST_CONVOLUTION_ALPHA_BIAS_EXT + use SGI_color_matrix POST_COLOR_MATRIX_RED_SCALE_SGI + use SGI_color_matrix POST_COLOR_MATRIX_GREEN_SCALE_SGI + use SGI_color_matrix POST_COLOR_MATRIX_BLUE_SCALE_SGI + use SGI_color_matrix POST_COLOR_MATRIX_ALPHA_SCALE_SGI + use SGI_color_matrix POST_COLOR_MATRIX_RED_BIAS_SGI + use SGI_color_matrix POST_COLOR_MATRIX_GREEN_BIAS_SGI + use SGI_color_matrix POST_COLOR_MATRIX_BLUE_BIAS_SGI + use SGI_color_matrix POST_COLOR_MATRIX_ALPHA_BIAS_SGI + +############################################################################### + +PixelType enum: + BITMAP = 0x1A00 + use DataType BYTE + use DataType UNSIGNED_BYTE + use DataType SHORT + use DataType UNSIGNED_SHORT + use DataType INT + use DataType UNSIGNED_INT + use DataType FLOAT + use EXT_packed_pixels UNSIGNED_BYTE_3_3_2_EXT + use EXT_packed_pixels UNSIGNED_SHORT_4_4_4_4_EXT + use EXT_packed_pixels UNSIGNED_SHORT_5_5_5_1_EXT + use EXT_packed_pixels UNSIGNED_INT_8_8_8_8_EXT + use EXT_packed_pixels UNSIGNED_INT_10_10_10_2_EXT + +############################################################################### + +PointParameterNameSGIS enum: + use SGIS_point_parameters POINT_SIZE_MIN_SGIS + use SGIS_point_parameters POINT_SIZE_MAX_SGIS + use SGIS_point_parameters POINT_FADE_THRESHOLD_SIZE_SGIS + use SGIS_point_parameters DISTANCE_ATTENUATION_SGIS + +############################################################################### + +PolygonMode enum: + POINT = 0x1B00 + LINE = 0x1B01 + FILL = 0x1B02 + +############################################################################### + +ReadBufferMode enum: + use DrawBufferMode FRONT_LEFT + use DrawBufferMode FRONT_RIGHT + use DrawBufferMode BACK_LEFT + use DrawBufferMode BACK_RIGHT + use DrawBufferMode FRONT + use DrawBufferMode BACK + use DrawBufferMode LEFT + use DrawBufferMode RIGHT + use DrawBufferMode AUX0 + use DrawBufferMode AUX1 + use DrawBufferMode AUX2 + use DrawBufferMode AUX3 + +############################################################################### + +RenderingMode enum: + RENDER = 0x1C00 + FEEDBACK = 0x1C01 + SELECT = 0x1C02 + +############################################################################### + +SamplePatternSGIS enum: + use SGIS_multisample 1PASS_SGIS + use SGIS_multisample 2PASS_0_SGIS + use SGIS_multisample 2PASS_1_SGIS + use SGIS_multisample 4PASS_0_SGIS + use SGIS_multisample 4PASS_1_SGIS + use SGIS_multisample 4PASS_2_SGIS + use SGIS_multisample 4PASS_3_SGIS + +############################################################################### + +SeparableTargetEXT enum: + use EXT_convolution SEPARABLE_2D_EXT + +############################################################################### + +ShadingModel enum: + FLAT = 0x1D00 + SMOOTH = 0x1D01 + +############################################################################### + +StencilFunction enum: + use AlphaFunction NEVER + use AlphaFunction LESS + use AlphaFunction EQUAL + use AlphaFunction LEQUAL + use AlphaFunction GREATER + use AlphaFunction NOTEQUAL + use AlphaFunction GEQUAL + use AlphaFunction ALWAYS + +############################################################################### + +StencilOp enum: + use BlendingFactorDest ZERO + KEEP = 0x1E00 + REPLACE = 0x1E01 + INCR = 0x1E02 + DECR = 0x1E03 + use LogicOp INVERT + +############################################################################### + +StringName enum: + VENDOR = 0x1F00 + RENDERER = 0x1F01 + VERSION = 0x1F02 + EXTENSIONS = 0x1F03 + +############################################################################### + +TexCoordPointerType enum: + use DataType SHORT + use DataType INT + use DataType FLOAT + use DataType DOUBLE + +############################################################################### + +TextureCoordName enum: + S = 0x2000 + T = 0x2001 + R = 0x2002 + Q = 0x2003 + +############################################################################### + +TextureEnvMode enum: + MODULATE = 0x2100 + DECAL = 0x2101 + use GetPName BLEND + use EXT_texture REPLACE_EXT + use AccumOp ADD + use SGIX_texture_add_env TEXTURE_ENV_BIAS_SGIX + +############################################################################### + +TextureEnvParameter enum: + TEXTURE_ENV_MODE = 0x2200 + TEXTURE_ENV_COLOR = 0x2201 + +############################################################################### + +TextureEnvTarget enum: + TEXTURE_ENV = 0x2300 + +############################################################################### + +TextureFilterFuncSGIS enum: + use SGIS_texture_filter4 FILTER4_SGIS + +############################################################################### + +TextureGenMode enum: + EYE_LINEAR = 0x2400 + OBJECT_LINEAR = 0x2401 + SPHERE_MAP = 0x2402 + use SGIS_point_line_texgen EYE_DISTANCE_TO_POINT_SGIS + use SGIS_point_line_texgen OBJECT_DISTANCE_TO_POINT_SGIS + use SGIS_point_line_texgen EYE_DISTANCE_TO_LINE_SGIS + use SGIS_point_line_texgen OBJECT_DISTANCE_TO_LINE_SGIS + +############################################################################### + +TextureGenParameter enum: + TEXTURE_GEN_MODE = 0x2500 + OBJECT_PLANE = 0x2501 + EYE_PLANE = 0x2502 + use SGIS_point_line_texgen EYE_POINT_SGIS + use SGIS_point_line_texgen OBJECT_POINT_SGIS + use SGIS_point_line_texgen EYE_LINE_SGIS + use SGIS_point_line_texgen OBJECT_LINE_SGIS + +# Aliases TextureGenParameter enum above +OES_texture_cube_map enum: (OpenGL ES only; additional; see below) + TEXTURE_GEN_MODE = 0x2500 + +############################################################################### + +TextureMagFilter enum: + NEAREST = 0x2600 + LINEAR = 0x2601 + use SGIS_detail_texture LINEAR_DETAIL_SGIS + use SGIS_detail_texture LINEAR_DETAIL_ALPHA_SGIS + use SGIS_detail_texture LINEAR_DETAIL_COLOR_SGIS + use SGIS_sharpen_texture LINEAR_SHARPEN_SGIS + use SGIS_sharpen_texture LINEAR_SHARPEN_ALPHA_SGIS + use SGIS_sharpen_texture LINEAR_SHARPEN_COLOR_SGIS + use SGIS_texture_filter4 FILTER4_SGIS + use SGIX_impact_pixel_texture PIXEL_TEX_GEN_Q_CEILING_SGIX + use SGIX_impact_pixel_texture PIXEL_TEX_GEN_Q_ROUND_SGIX + use SGIX_impact_pixel_texture PIXEL_TEX_GEN_Q_FLOOR_SGIX + +############################################################################### + +TextureMinFilter enum: + use TextureMagFilter NEAREST + use TextureMagFilter LINEAR + NEAREST_MIPMAP_NEAREST = 0x2700 + LINEAR_MIPMAP_NEAREST = 0x2701 + NEAREST_MIPMAP_LINEAR = 0x2702 + LINEAR_MIPMAP_LINEAR = 0x2703 + use SGIS_texture_filter4 FILTER4_SGIS + use SGIX_clipmap LINEAR_CLIPMAP_LINEAR_SGIX + use SGIX_clipmap NEAREST_CLIPMAP_NEAREST_SGIX + use SGIX_clipmap NEAREST_CLIPMAP_LINEAR_SGIX + use SGIX_clipmap LINEAR_CLIPMAP_NEAREST_SGIX + use SGIX_impact_pixel_texture PIXEL_TEX_GEN_Q_CEILING_SGIX + use SGIX_impact_pixel_texture PIXEL_TEX_GEN_Q_ROUND_SGIX + use SGIX_impact_pixel_texture PIXEL_TEX_GEN_Q_FLOOR_SGIX + +############################################################################### + +TextureParameterName enum: + TEXTURE_MAG_FILTER = 0x2800 + TEXTURE_MIN_FILTER = 0x2801 + TEXTURE_WRAP_S = 0x2802 + TEXTURE_WRAP_T = 0x2803 + use GetTextureParameter TEXTURE_BORDER_COLOR + use GetTextureParameter TEXTURE_PRIORITY + use EXT_texture3D TEXTURE_WRAP_R_EXT + use SGIS_detail_texture DETAIL_TEXTURE_LEVEL_SGIS + use SGIS_detail_texture DETAIL_TEXTURE_MODE_SGIS + use SGIS_generate_mipmap GENERATE_MIPMAP_SGIS + use SGIS_texture_select DUAL_TEXTURE_SELECT_SGIS + use SGIS_texture_select QUAD_TEXTURE_SELECT_SGIS + use SGIS_texture4D TEXTURE_WRAP_Q_SGIS + use SGIX_clipmap TEXTURE_CLIPMAP_CENTER_SGIX + use SGIX_clipmap TEXTURE_CLIPMAP_FRAME_SGIX + use SGIX_clipmap TEXTURE_CLIPMAP_OFFSET_SGIX + use SGIX_clipmap TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX + use SGIX_clipmap TEXTURE_CLIPMAP_LOD_OFFSET_SGIX + use SGIX_clipmap TEXTURE_CLIPMAP_DEPTH_SGIX + use SGIX_shadow TEXTURE_COMPARE_SGIX + use SGIX_shadow TEXTURE_COMPARE_OPERATOR_SGIX + use SGIX_shadow_ambient SHADOW_AMBIENT_SGIX + use SGIX_texture_coordinate_clamp TEXTURE_MAX_CLAMP_S_SGIX + use SGIX_texture_coordinate_clamp TEXTURE_MAX_CLAMP_T_SGIX + use SGIX_texture_coordinate_clamp TEXTURE_MAX_CLAMP_R_SGIX + use SGIX_texture_lod_bias TEXTURE_LOD_BIAS_S_SGIX + use SGIX_texture_lod_bias TEXTURE_LOD_BIAS_T_SGIX + use SGIX_texture_lod_bias TEXTURE_LOD_BIAS_R_SGIX + use SGIX_texture_scale_bias POST_TEXTURE_FILTER_BIAS_SGIX + use SGIX_texture_scale_bias POST_TEXTURE_FILTER_SCALE_SGIX + +############################################################################### + +TextureTarget enum: + use GetPName TEXTURE_1D + use GetPName TEXTURE_2D + PROXY_TEXTURE_1D = 0x8063 + PROXY_TEXTURE_2D = 0x8064 + use EXT_texture3D TEXTURE_3D_EXT + use EXT_texture3D PROXY_TEXTURE_3D_EXT + use SGIS_detail_texture DETAIL_TEXTURE_2D_SGIS + use SGIS_texture4D TEXTURE_4D_SGIS + use SGIS_texture4D PROXY_TEXTURE_4D_SGIS + use SGIS_texture_lod TEXTURE_MIN_LOD_SGIS + use SGIS_texture_lod TEXTURE_MAX_LOD_SGIS + use SGIS_texture_lod TEXTURE_BASE_LEVEL_SGIS + use SGIS_texture_lod TEXTURE_MAX_LEVEL_SGIS + +############################################################################### + +TextureWrapMode enum: + CLAMP = 0x2900 + REPEAT = 0x2901 + use SGIS_texture_border_clamp CLAMP_TO_BORDER_SGIS + use SGIS_texture_edge_clamp CLAMP_TO_EDGE_SGIS + +############################################################################### + +PixelInternalFormat enum: + R3_G3_B2 = 0x2A10 + ALPHA4 = 0x803B + ALPHA8 = 0x803C + ALPHA12 = 0x803D + ALPHA16 = 0x803E + LUMINANCE4 = 0x803F + LUMINANCE8 = 0x8040 + LUMINANCE12 = 0x8041 + LUMINANCE16 = 0x8042 + LUMINANCE4_ALPHA4 = 0x8043 + LUMINANCE6_ALPHA2 = 0x8044 + LUMINANCE8_ALPHA8 = 0x8045 + LUMINANCE12_ALPHA4 = 0x8046 + LUMINANCE12_ALPHA12 = 0x8047 + LUMINANCE16_ALPHA16 = 0x8048 + INTENSITY = 0x8049 + INTENSITY4 = 0x804A + INTENSITY8 = 0x804B + INTENSITY12 = 0x804C + INTENSITY16 = 0x804D + RGB4 = 0x804F + RGB5 = 0x8050 + RGB8 = 0x8051 + RGB10 = 0x8052 + RGB12 = 0x8053 + RGB16 = 0x8054 + RGBA2 = 0x8055 + RGBA4 = 0x8056 + RGB5_A1 = 0x8057 + RGBA8 = 0x8058 + RGB10_A2 = 0x8059 + RGBA12 = 0x805A + RGBA16 = 0x805B + use EXT_texture RGB2_EXT + use SGIS_texture_select DUAL_ALPHA4_SGIS + use SGIS_texture_select DUAL_ALPHA8_SGIS + use SGIS_texture_select DUAL_ALPHA12_SGIS + use SGIS_texture_select DUAL_ALPHA16_SGIS + use SGIS_texture_select DUAL_LUMINANCE4_SGIS + use SGIS_texture_select DUAL_LUMINANCE8_SGIS + use SGIS_texture_select DUAL_LUMINANCE12_SGIS + use SGIS_texture_select DUAL_LUMINANCE16_SGIS + use SGIS_texture_select DUAL_INTENSITY4_SGIS + use SGIS_texture_select DUAL_INTENSITY8_SGIS + use SGIS_texture_select DUAL_INTENSITY12_SGIS + use SGIS_texture_select DUAL_INTENSITY16_SGIS + use SGIS_texture_select DUAL_LUMINANCE_ALPHA4_SGIS + use SGIS_texture_select DUAL_LUMINANCE_ALPHA8_SGIS + use SGIS_texture_select QUAD_ALPHA4_SGIS + use SGIS_texture_select QUAD_ALPHA8_SGIS + use SGIS_texture_select QUAD_LUMINANCE4_SGIS + use SGIS_texture_select QUAD_LUMINANCE8_SGIS + use SGIS_texture_select QUAD_INTENSITY4_SGIS + use SGIS_texture_select QUAD_INTENSITY8_SGIS + use SGIX_depth_texture DEPTH_COMPONENT16_SGIX + use SGIX_depth_texture DEPTH_COMPONENT24_SGIX + use SGIX_depth_texture DEPTH_COMPONENT32_SGIX + use SGIX_icc_texture RGB_ICC_SGIX + use SGIX_icc_texture RGBA_ICC_SGIX + use SGIX_icc_texture ALPHA_ICC_SGIX + use SGIX_icc_texture LUMINANCE_ICC_SGIX + use SGIX_icc_texture INTENSITY_ICC_SGIX + use SGIX_icc_texture LUMINANCE_ALPHA_ICC_SGIX + use SGIX_icc_texture R5_G6_B5_ICC_SGIX + use SGIX_icc_texture R5_G6_B5_A8_ICC_SGIX + use SGIX_icc_texture ALPHA16_ICC_SGIX + use SGIX_icc_texture LUMINANCE16_ICC_SGIX + use SGIX_icc_texture INTENSITY16_ICC_SGIX + use SGIX_icc_texture LUMINANCE16_ALPHA8_ICC_SGIX + +# Aliases PixelInternalFormat enums above +OES_rgb8_rgba8 enum: (OpenGL ES only) + RGB8 = 0x8051 + RGBA8 = 0x8058 + +############################################################################### + +InterleavedArrayFormat enum: + V2F = 0x2A20 + V3F = 0x2A21 + C4UB_V2F = 0x2A22 + C4UB_V3F = 0x2A23 + C3F_V3F = 0x2A24 + N3F_V3F = 0x2A25 + C4F_N3F_V3F = 0x2A26 + T2F_V3F = 0x2A27 + T4F_V4F = 0x2A28 + T2F_C4UB_V3F = 0x2A29 + T2F_C3F_V3F = 0x2A2A + T2F_N3F_V3F = 0x2A2B + T2F_C4F_N3F_V3F = 0x2A2C + T4F_C4F_N3F_V4F = 0x2A2D + +############################################################################### + +VertexPointerType enum: + use DataType SHORT + use DataType INT + use DataType FLOAT + use DataType DOUBLE + +############################################################################### + +# 0x3000 through 0x3FFF are reserved for clip planes +ClipPlaneName enum: + CLIP_PLANE0 = 0x3000 # 1 I + CLIP_PLANE1 = 0x3001 # 1 I + CLIP_PLANE2 = 0x3002 # 1 I + CLIP_PLANE3 = 0x3003 # 1 I + CLIP_PLANE4 = 0x3004 # 1 I + CLIP_PLANE5 = 0x3005 # 1 I + +VERSION_3_0 enum: (aliases) + CLIP_DISTANCE0 = 0x3000 # VERSION_3_0 # alias GL_CLIP_PLANE0 + CLIP_DISTANCE1 = 0x3001 # VERSION_3_0 # alias GL_CLIP_PLANE1 + CLIP_DISTANCE2 = 0x3002 # VERSION_3_0 # alias GL_CLIP_PLANE2 + CLIP_DISTANCE3 = 0x3003 # VERSION_3_0 # alias GL_CLIP_PLANE3 + CLIP_DISTANCE4 = 0x3004 # VERSION_3_0 # alias GL_CLIP_PLANE4 + CLIP_DISTANCE5 = 0x3005 # VERSION_3_0 # alias GL_CLIP_PLANE5 + CLIP_DISTANCE6 = 0x3006 # VERSION_3_0 # alias GL_CLIP_PLANE5 + CLIP_DISTANCE7 = 0x3007 # VERSION_3_0 # alias GL_CLIP_PLANE5 + +############################################################################### + +# 0x4000-0x4FFF are reserved for light numbers +LightName enum: + LIGHT0 = 0x4000 # 1 I + LIGHT1 = 0x4001 # 1 I + LIGHT2 = 0x4002 # 1 I + LIGHT3 = 0x4003 # 1 I + LIGHT4 = 0x4004 # 1 I + LIGHT5 = 0x4005 # 1 I + LIGHT6 = 0x4006 # 1 I + LIGHT7 = 0x4007 # 1 I + use SGIX_fragment_lighting FRAGMENT_LIGHT0_SGIX + use SGIX_fragment_lighting FRAGMENT_LIGHT1_SGIX + use SGIX_fragment_lighting FRAGMENT_LIGHT2_SGIX + use SGIX_fragment_lighting FRAGMENT_LIGHT3_SGIX + use SGIX_fragment_lighting FRAGMENT_LIGHT4_SGIX + use SGIX_fragment_lighting FRAGMENT_LIGHT5_SGIX + use SGIX_fragment_lighting FRAGMENT_LIGHT6_SGIX + use SGIX_fragment_lighting FRAGMENT_LIGHT7_SGIX + +############################################################################### + +EXT_abgr enum: + ABGR_EXT = 0x8000 + +############################################################################### + +VERSION_1_2 enum: (Promoted for OpenGL 1.2) + CONSTANT_COLOR = 0x8001 + ONE_MINUS_CONSTANT_COLOR = 0x8002 + CONSTANT_ALPHA = 0x8003 + ONE_MINUS_CONSTANT_ALPHA = 0x8004 + BLEND_COLOR = 0x8005 # 4 F + +EXT_blend_color enum: + CONSTANT_COLOR_EXT = 0x8001 + ONE_MINUS_CONSTANT_COLOR_EXT = 0x8002 + CONSTANT_ALPHA_EXT = 0x8003 + ONE_MINUS_CONSTANT_ALPHA_EXT = 0x8004 + BLEND_COLOR_EXT = 0x8005 # 4 F + +############################################################################### + +VERSION_1_2 enum: (Promoted for OpenGL 1.2) +EXT_blend_minmax enum: + FUNC_ADD = 0x8006 + FUNC_ADD_EXT = 0x8006 + MIN = 0x8007 + MIN_EXT = 0x8007 + MAX = 0x8008 + MAX_EXT = 0x8008 + BLEND_EQUATION = 0x8009 # 1 I + BLEND_EQUATION_EXT = 0x8009 # 1 I + +VERSION_2_0 enum: (Promoted for OpenGL 2.0) + BLEND_EQUATION_RGB = 0x8009 # VERSION_2_0 # alias GL_BLEND_EQUATION + +EXT_blend_equation_separate enum: (separate; see below) + BLEND_EQUATION_RGB_EXT = 0x8009 # alias GL_BLEND_EQUATION + +# Aliases EXT_blend_equation_separate enum above +OES_blend_equation_separate enum: (OpenGL ES only; additional; see below) + BLEND_EQUATION_RGB_OES = 0x8009 # 1 I + +############################################################################### + +VERSION_1_2 enum: (Promoted for OpenGL 1.2) +EXT_blend_subtract enum: + FUNC_SUBTRACT = 0x800A + FUNC_SUBTRACT_EXT = 0x800A + FUNC_REVERSE_SUBTRACT = 0x800B + FUNC_REVERSE_SUBTRACT_EXT = 0x800B + +# Aliases EXT_blend_minmax and EXT_blend_subtract enums above +OES_blend_subtract enum: (OpenGL ES only) + FUNC_ADD_OES = 0x8006 + BLEND_EQUATION_OES = 0x8009 # 1 I + FUNC_SUBTRACT_OES = 0x800A + FUNC_REVERSE_SUBTRACT_OES = 0x800B + +############################################################################### + +EXT_cmyka enum: + CMYK_EXT = 0x800C + CMYKA_EXT = 0x800D + PACK_CMYK_HINT_EXT = 0x800E # 1 I + UNPACK_CMYK_HINT_EXT = 0x800F # 1 I + +############################################################################### + +VERSION_1_2 enum: (Promoted for OpenGL 1.2) + CONVOLUTION_1D = 0x8010 # 1 I + CONVOLUTION_2D = 0x8011 # 1 I + SEPARABLE_2D = 0x8012 # 1 I + CONVOLUTION_BORDER_MODE = 0x8013 + CONVOLUTION_FILTER_SCALE = 0x8014 + CONVOLUTION_FILTER_BIAS = 0x8015 + REDUCE = 0x8016 + CONVOLUTION_FORMAT = 0x8017 + CONVOLUTION_WIDTH = 0x8018 + CONVOLUTION_HEIGHT = 0x8019 + MAX_CONVOLUTION_WIDTH = 0x801A + MAX_CONVOLUTION_HEIGHT = 0x801B + POST_CONVOLUTION_RED_SCALE = 0x801C # 1 F + POST_CONVOLUTION_GREEN_SCALE = 0x801D # 1 F + POST_CONVOLUTION_BLUE_SCALE = 0x801E # 1 F + POST_CONVOLUTION_ALPHA_SCALE = 0x801F # 1 F + POST_CONVOLUTION_RED_BIAS = 0x8020 # 1 F + POST_CONVOLUTION_GREEN_BIAS = 0x8021 # 1 F + POST_CONVOLUTION_BLUE_BIAS = 0x8022 # 1 F + POST_CONVOLUTION_ALPHA_BIAS = 0x8023 # 1 F + +EXT_convolution enum: + CONVOLUTION_1D_EXT = 0x8010 # 1 I + CONVOLUTION_2D_EXT = 0x8011 # 1 I + SEPARABLE_2D_EXT = 0x8012 # 1 I + CONVOLUTION_BORDER_MODE_EXT = 0x8013 + CONVOLUTION_FILTER_SCALE_EXT = 0x8014 + CONVOLUTION_FILTER_BIAS_EXT = 0x8015 + REDUCE_EXT = 0x8016 + CONVOLUTION_FORMAT_EXT = 0x8017 + CONVOLUTION_WIDTH_EXT = 0x8018 + CONVOLUTION_HEIGHT_EXT = 0x8019 + MAX_CONVOLUTION_WIDTH_EXT = 0x801A + MAX_CONVOLUTION_HEIGHT_EXT = 0x801B + POST_CONVOLUTION_RED_SCALE_EXT = 0x801C # 1 F + POST_CONVOLUTION_GREEN_SCALE_EXT = 0x801D # 1 F + POST_CONVOLUTION_BLUE_SCALE_EXT = 0x801E # 1 F + POST_CONVOLUTION_ALPHA_SCALE_EXT = 0x801F # 1 F + POST_CONVOLUTION_RED_BIAS_EXT = 0x8020 # 1 F + POST_CONVOLUTION_GREEN_BIAS_EXT = 0x8021 # 1 F + POST_CONVOLUTION_BLUE_BIAS_EXT = 0x8022 # 1 F + POST_CONVOLUTION_ALPHA_BIAS_EXT = 0x8023 # 1 F + +############################################################################### + +VERSION_1_2 enum: (Promoted for OpenGL 1.2) + HISTOGRAM = 0x8024 # 1 I + PROXY_HISTOGRAM = 0x8025 + HISTOGRAM_WIDTH = 0x8026 + HISTOGRAM_FORMAT = 0x8027 + HISTOGRAM_RED_SIZE = 0x8028 + HISTOGRAM_GREEN_SIZE = 0x8029 + HISTOGRAM_BLUE_SIZE = 0x802A + HISTOGRAM_ALPHA_SIZE = 0x802B + HISTOGRAM_SINK = 0x802D + MINMAX = 0x802E # 1 I + MINMAX_FORMAT = 0x802F + MINMAX_SINK = 0x8030 + TABLE_TOO_LARGE = 0x8031 + +EXT_histogram enum: + HISTOGRAM_EXT = 0x8024 # 1 I + PROXY_HISTOGRAM_EXT = 0x8025 + HISTOGRAM_WIDTH_EXT = 0x8026 + HISTOGRAM_FORMAT_EXT = 0x8027 + HISTOGRAM_RED_SIZE_EXT = 0x8028 + HISTOGRAM_GREEN_SIZE_EXT = 0x8029 + HISTOGRAM_BLUE_SIZE_EXT = 0x802A + HISTOGRAM_ALPHA_SIZE_EXT = 0x802B + HISTOGRAM_LUMINANCE_SIZE = 0x802C + HISTOGRAM_LUMINANCE_SIZE_EXT = 0x802C + HISTOGRAM_SINK_EXT = 0x802D + MINMAX_EXT = 0x802E # 1 I + MINMAX_FORMAT_EXT = 0x802F + MINMAX_SINK_EXT = 0x8030 + TABLE_TOO_LARGE_EXT = 0x8031 + +############################################################################### + +VERSION_1_2 enum: (Promoted for OpenGL 1.2) + UNSIGNED_BYTE_3_3_2 = 0x8032 + UNSIGNED_SHORT_4_4_4_4 = 0x8033 + UNSIGNED_SHORT_5_5_5_1 = 0x8034 + UNSIGNED_INT_8_8_8_8 = 0x8035 + UNSIGNED_INT_10_10_10_2 = 0x8036 + UNSIGNED_BYTE_2_3_3_REV = 0x8362 + UNSIGNED_SHORT_5_6_5 = 0x8363 + UNSIGNED_SHORT_5_6_5_REV = 0x8364 + UNSIGNED_SHORT_4_4_4_4_REV = 0x8365 + UNSIGNED_SHORT_1_5_5_5_REV = 0x8366 + UNSIGNED_INT_8_8_8_8_REV = 0x8367 + UNSIGNED_INT_2_10_10_10_REV = 0x8368 + +EXT_packed_pixels enum: + UNSIGNED_BYTE_3_3_2_EXT = 0x8032 + UNSIGNED_SHORT_4_4_4_4_EXT = 0x8033 + UNSIGNED_SHORT_5_5_5_1_EXT = 0x8034 + UNSIGNED_INT_8_8_8_8_EXT = 0x8035 + UNSIGNED_INT_10_10_10_2_EXT = 0x8036 + UNSIGNED_BYTE_2_3_3_REV_EXT = 0x8362 + UNSIGNED_SHORT_5_6_5_EXT = 0x8363 + UNSIGNED_SHORT_5_6_5_REV_EXT = 0x8364 + UNSIGNED_SHORT_4_4_4_4_REV_EXT = 0x8365 + UNSIGNED_SHORT_1_5_5_5_REV_EXT = 0x8366 + UNSIGNED_INT_8_8_8_8_REV_EXT = 0x8367 + UNSIGNED_INT_2_10_10_10_REV_EXT = 0x8368 + +EXT_texture_type_2_10_10_10_REV enum: (OpenGL ES only) +# use EXT_packed_pixels UNSIGNED_INT_2_10_10_10_REV_EXT + +############################################################################### + +EXT_polygon_offset enum: + POLYGON_OFFSET_EXT = 0x8037 + POLYGON_OFFSET_FACTOR_EXT = 0x8038 + POLYGON_OFFSET_BIAS_EXT = 0x8039 # 1 F + +############################################################################### + +VERSION_1_2 enum: (Promoted for OpenGL 1.2) + RESCALE_NORMAL = 0x803A # 1 I + +EXT_rescale_normal enum: + RESCALE_NORMAL_EXT = 0x803A # 1 I + +############################################################################### + +EXT_texture enum: + ALPHA4_EXT = 0x803B + ALPHA8_EXT = 0x803C + ALPHA12_EXT = 0x803D + ALPHA16_EXT = 0x803E + LUMINANCE4_EXT = 0x803F + LUMINANCE8_EXT = 0x8040 + LUMINANCE12_EXT = 0x8041 + LUMINANCE16_EXT = 0x8042 + LUMINANCE4_ALPHA4_EXT = 0x8043 + LUMINANCE6_ALPHA2_EXT = 0x8044 + LUMINANCE8_ALPHA8_EXT = 0x8045 + LUMINANCE12_ALPHA4_EXT = 0x8046 + LUMINANCE12_ALPHA12_EXT = 0x8047 + LUMINANCE16_ALPHA16_EXT = 0x8048 + INTENSITY_EXT = 0x8049 + INTENSITY4_EXT = 0x804A + INTENSITY8_EXT = 0x804B + INTENSITY12_EXT = 0x804C + INTENSITY16_EXT = 0x804D + RGB2_EXT = 0x804E + RGB4_EXT = 0x804F + RGB5_EXT = 0x8050 + RGB8_EXT = 0x8051 + RGB10_EXT = 0x8052 + RGB12_EXT = 0x8053 + RGB16_EXT = 0x8054 + RGBA2_EXT = 0x8055 + RGBA4_EXT = 0x8056 + RGB5_A1_EXT = 0x8057 + RGBA8_EXT = 0x8058 + RGB10_A2_EXT = 0x8059 + RGBA12_EXT = 0x805A + RGBA16_EXT = 0x805B + TEXTURE_RED_SIZE_EXT = 0x805C + TEXTURE_GREEN_SIZE_EXT = 0x805D + TEXTURE_BLUE_SIZE_EXT = 0x805E + TEXTURE_ALPHA_SIZE_EXT = 0x805F + TEXTURE_LUMINANCE_SIZE_EXT = 0x8060 + TEXTURE_INTENSITY_SIZE_EXT = 0x8061 + REPLACE_EXT = 0x8062 + PROXY_TEXTURE_1D_EXT = 0x8063 + PROXY_TEXTURE_2D_EXT = 0x8064 + TEXTURE_TOO_LARGE_EXT = 0x8065 + +# Aliases EXT_texture enums above +OES_framebuffer_object enum: (OpenGL ES only; additional; see below) + RGBA4_OES = 0x8056 + RGB5_A1_OES = 0x8057 + +############################################################################### + +EXT_texture_object enum: + TEXTURE_PRIORITY_EXT = 0x8066 + TEXTURE_RESIDENT_EXT = 0x8067 + TEXTURE_1D_BINDING_EXT = 0x8068 + TEXTURE_2D_BINDING_EXT = 0x8069 + TEXTURE_3D_BINDING_EXT = 0x806A # 1 I + +############################################################################### + +VERSION_1_2 enum: (Promoted for OpenGL 1.2) + PACK_SKIP_IMAGES = 0x806B # 1 I + PACK_IMAGE_HEIGHT = 0x806C # 1 F + UNPACK_SKIP_IMAGES = 0x806D # 1 I + UNPACK_IMAGE_HEIGHT = 0x806E # 1 F + TEXTURE_3D = 0x806F # 1 I + PROXY_TEXTURE_3D = 0x8070 + TEXTURE_DEPTH = 0x8071 + TEXTURE_WRAP_R = 0x8072 + MAX_3D_TEXTURE_SIZE = 0x8073 # 1 I + +EXT_texture3D enum: + PACK_SKIP_IMAGES_EXT = 0x806B # 1 I + PACK_IMAGE_HEIGHT_EXT = 0x806C # 1 F + UNPACK_SKIP_IMAGES_EXT = 0x806D # 1 I + UNPACK_IMAGE_HEIGHT_EXT = 0x806E # 1 F + TEXTURE_3D_EXT = 0x806F # 1 I + PROXY_TEXTURE_3D_EXT = 0x8070 + TEXTURE_DEPTH_EXT = 0x8071 + TEXTURE_WRAP_R_EXT = 0x8072 + MAX_3D_TEXTURE_SIZE_EXT = 0x8073 # 1 I + +# Aliases EXT_texture_object, EXT_texture3D enums above +OES_texture3D enum: (OpenGL ES only) + TEXTURE_3D_BINDING_OES = 0x806A # 1 I + TEXTURE_3D_OES = 0x806F # 1 I + TEXTURE_WRAP_R_OES = 0x8072 + MAX_3D_TEXTURE_SIZE_OES = 0x8073 # 1 I + +############################################################################### + +EXT_vertex_array enum: + VERTEX_ARRAY_EXT = 0x8074 + NORMAL_ARRAY_EXT = 0x8075 + COLOR_ARRAY_EXT = 0x8076 + INDEX_ARRAY_EXT = 0x8077 + TEXTURE_COORD_ARRAY_EXT = 0x8078 + EDGE_FLAG_ARRAY_EXT = 0x8079 + VERTEX_ARRAY_SIZE_EXT = 0x807A + VERTEX_ARRAY_TYPE_EXT = 0x807B + VERTEX_ARRAY_STRIDE_EXT = 0x807C + VERTEX_ARRAY_COUNT_EXT = 0x807D # 1 I + NORMAL_ARRAY_TYPE_EXT = 0x807E + NORMAL_ARRAY_STRIDE_EXT = 0x807F + NORMAL_ARRAY_COUNT_EXT = 0x8080 # 1 I + COLOR_ARRAY_SIZE_EXT = 0x8081 + COLOR_ARRAY_TYPE_EXT = 0x8082 + COLOR_ARRAY_STRIDE_EXT = 0x8083 + COLOR_ARRAY_COUNT_EXT = 0x8084 # 1 I + INDEX_ARRAY_TYPE_EXT = 0x8085 + INDEX_ARRAY_STRIDE_EXT = 0x8086 + INDEX_ARRAY_COUNT_EXT = 0x8087 # 1 I + TEXTURE_COORD_ARRAY_SIZE_EXT = 0x8088 + TEXTURE_COORD_ARRAY_TYPE_EXT = 0x8089 + TEXTURE_COORD_ARRAY_STRIDE_EXT = 0x808A + TEXTURE_COORD_ARRAY_COUNT_EXT = 0x808B # 1 I + EDGE_FLAG_ARRAY_STRIDE_EXT = 0x808C + EDGE_FLAG_ARRAY_COUNT_EXT = 0x808D # 1 I + VERTEX_ARRAY_POINTER_EXT = 0x808E + NORMAL_ARRAY_POINTER_EXT = 0x808F + COLOR_ARRAY_POINTER_EXT = 0x8090 + INDEX_ARRAY_POINTER_EXT = 0x8091 + TEXTURE_COORD_ARRAY_POINTER_EXT = 0x8092 + EDGE_FLAG_ARRAY_POINTER_EXT = 0x8093 + +############################################################################### + +SGIX_interlace enum: + INTERLACE_SGIX = 0x8094 # 1 I + +############################################################################### + +SGIS_detail_texture enum: + DETAIL_TEXTURE_2D_SGIS = 0x8095 + DETAIL_TEXTURE_2D_BINDING_SGIS = 0x8096 # 1 I + LINEAR_DETAIL_SGIS = 0x8097 + LINEAR_DETAIL_ALPHA_SGIS = 0x8098 + LINEAR_DETAIL_COLOR_SGIS = 0x8099 + DETAIL_TEXTURE_LEVEL_SGIS = 0x809A + DETAIL_TEXTURE_MODE_SGIS = 0x809B + DETAIL_TEXTURE_FUNC_POINTS_SGIS = 0x809C + +############################################################################### + +# Reuses some SGIS_multisample values +VERSION_1_3 enum: (Promoted for OpenGL 1.3) + MULTISAMPLE = 0x809D + SAMPLE_ALPHA_TO_COVERAGE = 0x809E + SAMPLE_ALPHA_TO_ONE = 0x809F + SAMPLE_COVERAGE = 0x80A0 + SAMPLE_BUFFERS = 0x80A8 # 1 I + SAMPLES = 0x80A9 # 1 I + SAMPLE_COVERAGE_VALUE = 0x80AA # 1 F + SAMPLE_COVERAGE_INVERT = 0x80AB # 1 I + +ARB_multisample enum: + MULTISAMPLE_ARB = 0x809D + SAMPLE_ALPHA_TO_COVERAGE_ARB = 0x809E + SAMPLE_ALPHA_TO_ONE_ARB = 0x809F + SAMPLE_COVERAGE_ARB = 0x80A0 + SAMPLE_BUFFERS_ARB = 0x80A8 # 1 I + SAMPLES_ARB = 0x80A9 # 1 I + SAMPLE_COVERAGE_VALUE_ARB = 0x80AA # 1 F + SAMPLE_COVERAGE_INVERT_ARB = 0x80AB # 1 I + +SGIS_multisample enum: + MULTISAMPLE_SGIS = 0x809D # 1 I + SAMPLE_ALPHA_TO_MASK_SGIS = 0x809E # 1 I + SAMPLE_ALPHA_TO_ONE_SGIS = 0x809F # 1 I + SAMPLE_MASK_SGIS = 0x80A0 # 1 I + 1PASS_SGIS = 0x80A1 + 2PASS_0_SGIS = 0x80A2 + 2PASS_1_SGIS = 0x80A3 + 4PASS_0_SGIS = 0x80A4 + 4PASS_1_SGIS = 0x80A5 + 4PASS_2_SGIS = 0x80A6 + 4PASS_3_SGIS = 0x80A7 + SAMPLE_BUFFERS_SGIS = 0x80A8 # 1 I + SAMPLES_SGIS = 0x80A9 # 1 I + SAMPLE_MASK_VALUE_SGIS = 0x80AA # 1 F + SAMPLE_MASK_INVERT_SGIS = 0x80AB # 1 I + SAMPLE_PATTERN_SGIS = 0x80AC # 1 I + +# Reuses SGIS_multisample values. +EXT_multisample enum: + MULTISAMPLE_EXT = 0x809D + SAMPLE_ALPHA_TO_MASK_EXT = 0x809E + SAMPLE_ALPHA_TO_ONE_EXT = 0x809F + SAMPLE_MASK_EXT = 0x80A0 + 1PASS_EXT = 0x80A1 + 2PASS_0_EXT = 0x80A2 + 2PASS_1_EXT = 0x80A3 + 4PASS_0_EXT = 0x80A4 + 4PASS_1_EXT = 0x80A5 + 4PASS_2_EXT = 0x80A6 + 4PASS_3_EXT = 0x80A7 + SAMPLE_BUFFERS_EXT = 0x80A8 # 1 I + SAMPLES_EXT = 0x80A9 # 1 I + SAMPLE_MASK_VALUE_EXT = 0x80AA # 1 F + SAMPLE_MASK_INVERT_EXT = 0x80AB # 1 I + SAMPLE_PATTERN_EXT = 0x80AC # 1 I + MULTISAMPLE_BIT_EXT = 0x20000000 + +############################################################################### + +SGIS_sharpen_texture enum: + LINEAR_SHARPEN_SGIS = 0x80AD + LINEAR_SHARPEN_ALPHA_SGIS = 0x80AE + LINEAR_SHARPEN_COLOR_SGIS = 0x80AF + SHARPEN_TEXTURE_FUNC_POINTS_SGIS = 0x80B0 + +############################################################################### + +VERSION_1_2 enum: (Promoted for OpenGL 1.2) + COLOR_MATRIX = 0x80B1 # 16 F + COLOR_MATRIX_STACK_DEPTH = 0x80B2 # 1 I + MAX_COLOR_MATRIX_STACK_DEPTH = 0x80B3 # 1 I + POST_COLOR_MATRIX_RED_SCALE = 0x80B4 # 1 F + POST_COLOR_MATRIX_GREEN_SCALE = 0x80B5 # 1 F + POST_COLOR_MATRIX_BLUE_SCALE = 0x80B6 # 1 F + POST_COLOR_MATRIX_ALPHA_SCALE = 0x80B7 # 1 F + POST_COLOR_MATRIX_RED_BIAS = 0x80B8 # 1 F + POST_COLOR_MATRIX_GREEN_BIAS = 0x80B9 # 1 F + POST_COLOR_MATRIX_BLUE_BIAS = 0x80BA # 1 F + POST_COLOR_MATRIX_ALPHA_BIAS = 0x80BB # 1 F + +SGI_color_matrix enum: + COLOR_MATRIX_SGI = 0x80B1 # 16 F + COLOR_MATRIX_STACK_DEPTH_SGI = 0x80B2 # 1 I + MAX_COLOR_MATRIX_STACK_DEPTH_SGI = 0x80B3 # 1 I + POST_COLOR_MATRIX_RED_SCALE_SGI = 0x80B4 # 1 F + POST_COLOR_MATRIX_GREEN_SCALE_SGI = 0x80B5 # 1 F + POST_COLOR_MATRIX_BLUE_SCALE_SGI = 0x80B6 # 1 F + POST_COLOR_MATRIX_ALPHA_SCALE_SGI = 0x80B7 # 1 F + POST_COLOR_MATRIX_RED_BIAS_SGI = 0x80B8 # 1 F + POST_COLOR_MATRIX_GREEN_BIAS_SGI = 0x80B9 # 1 F + POST_COLOR_MATRIX_BLUE_BIAS_SGI = 0x80BA # 1 F + POST_COLOR_MATRIX_ALPHA_BIAS_SGI = 0x80BB # 1 F + +############################################################################### + +SGI_texture_color_table enum: + TEXTURE_COLOR_TABLE_SGI = 0x80BC # 1 I + PROXY_TEXTURE_COLOR_TABLE_SGI = 0x80BD + +############################################################################### + +SGIX_texture_add_env enum: + TEXTURE_ENV_BIAS_SGIX = 0x80BE + +############################################################################### + +SGIX_shadow_ambient enum: + SHADOW_AMBIENT_SGIX = 0x80BF + +############################################################################### + +# Intergraph/Intense3D/3Dlabs: 0x80C0-0x80CF + +# 3Dlabs_future_use: 0x80C0-0x80C7 + +VERSION_1_4 enum: (Promoted for OpenGL 1.4) + BLEND_DST_RGB = 0x80C8 + BLEND_SRC_RGB = 0x80C9 + BLEND_DST_ALPHA = 0x80CA + BLEND_SRC_ALPHA = 0x80CB + +EXT_blend_func_separate enum: + BLEND_DST_RGB_EXT = 0x80C8 + BLEND_SRC_RGB_EXT = 0x80C9 + BLEND_DST_ALPHA_EXT = 0x80CA + BLEND_SRC_ALPHA_EXT = 0x80CB + +# Aliases EXT_blend_func_separate enums above +OES_blend_func_separate enum: (OpenGL ES only) + BLEND_DST_RGB_OES = 0x80C8 + BLEND_SRC_RGB_OES = 0x80C9 + BLEND_DST_ALPHA_OES = 0x80CA + BLEND_SRC_ALPHA_OES = 0x80CB + +EXT_422_pixels enum: + 422_EXT = 0x80CC + 422_REV_EXT = 0x80CD + 422_AVERAGE_EXT = 0x80CE + 422_REV_AVERAGE_EXT = 0x80CF + +############################################################################### + +VERSION_1_2 enum: (Promoted for OpenGL 1.2) + COLOR_TABLE = 0x80D0 # 1 I + POST_CONVOLUTION_COLOR_TABLE = 0x80D1 # 1 I + POST_COLOR_MATRIX_COLOR_TABLE = 0x80D2 # 1 I + PROXY_COLOR_TABLE = 0x80D3 + PROXY_POST_CONVOLUTION_COLOR_TABLE = 0x80D4 + PROXY_POST_COLOR_MATRIX_COLOR_TABLE = 0x80D5 + COLOR_TABLE_SCALE = 0x80D6 + COLOR_TABLE_BIAS = 0x80D7 + COLOR_TABLE_FORMAT = 0x80D8 + COLOR_TABLE_WIDTH = 0x80D9 + COLOR_TABLE_RED_SIZE = 0x80DA + COLOR_TABLE_GREEN_SIZE = 0x80DB + COLOR_TABLE_BLUE_SIZE = 0x80DC + COLOR_TABLE_ALPHA_SIZE = 0x80DD + COLOR_TABLE_LUMINANCE_SIZE = 0x80DE + COLOR_TABLE_INTENSITY_SIZE = 0x80DF + +SGI_color_table enum: + COLOR_TABLE_SGI = 0x80D0 # 1 I + POST_CONVOLUTION_COLOR_TABLE_SGI = 0x80D1 # 1 I + POST_COLOR_MATRIX_COLOR_TABLE_SGI = 0x80D2 # 1 I + PROXY_COLOR_TABLE_SGI = 0x80D3 + PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI = 0x80D4 + PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI = 0x80D5 + COLOR_TABLE_SCALE_SGI = 0x80D6 + COLOR_TABLE_BIAS_SGI = 0x80D7 + COLOR_TABLE_FORMAT_SGI = 0x80D8 + COLOR_TABLE_WIDTH_SGI = 0x80D9 + COLOR_TABLE_RED_SIZE_SGI = 0x80DA + COLOR_TABLE_GREEN_SIZE_SGI = 0x80DB + COLOR_TABLE_BLUE_SIZE_SGI = 0x80DC + COLOR_TABLE_ALPHA_SIZE_SGI = 0x80DD + COLOR_TABLE_LUMINANCE_SIZE_SGI = 0x80DE + COLOR_TABLE_INTENSITY_SIZE_SGI = 0x80DF + +############################################################################### + +VERSION_1_2 enum: (Promoted for OpenGL 1.2) + BGR = 0x80E0 + BGRA = 0x80E1 + +ARB_vertex_array_bgra enum: +# use VERSION_1_2 BGRA + +EXT_bgra enum: + BGR_EXT = 0x80E0 + BGRA_EXT = 0x80E1 + +############################################################################### + +# Microsoft: 0x80E2-0x80E7 + +############################################################################### + +VERSION_1_2 enum: + MAX_ELEMENTS_VERTICES = 0x80E8 + MAX_ELEMENTS_INDICES = 0x80E9 + +############################################################################### + +# Microsoft: 0x80EA-0x810F + +############################################################################### + +SGIS_texture_select enum: + DUAL_ALPHA4_SGIS = 0x8110 + DUAL_ALPHA8_SGIS = 0x8111 + DUAL_ALPHA12_SGIS = 0x8112 + DUAL_ALPHA16_SGIS = 0x8113 + DUAL_LUMINANCE4_SGIS = 0x8114 + DUAL_LUMINANCE8_SGIS = 0x8115 + DUAL_LUMINANCE12_SGIS = 0x8116 + DUAL_LUMINANCE16_SGIS = 0x8117 + DUAL_INTENSITY4_SGIS = 0x8118 + DUAL_INTENSITY8_SGIS = 0x8119 + DUAL_INTENSITY12_SGIS = 0x811A + DUAL_INTENSITY16_SGIS = 0x811B + DUAL_LUMINANCE_ALPHA4_SGIS = 0x811C + DUAL_LUMINANCE_ALPHA8_SGIS = 0x811D + QUAD_ALPHA4_SGIS = 0x811E + QUAD_ALPHA8_SGIS = 0x811F + QUAD_LUMINANCE4_SGIS = 0x8120 + QUAD_LUMINANCE8_SGIS = 0x8121 + QUAD_INTENSITY4_SGIS = 0x8122 + QUAD_INTENSITY8_SGIS = 0x8123 + DUAL_TEXTURE_SELECT_SGIS = 0x8124 + QUAD_TEXTURE_SELECT_SGIS = 0x8125 + +############################################################################### + +VERSION_1_4 enum: (Promoted for OpenGL 1.4) + POINT_SIZE_MIN = 0x8126 # 1 F + POINT_SIZE_MAX = 0x8127 # 1 F + POINT_FADE_THRESHOLD_SIZE = 0x8128 # 1 F + POINT_DISTANCE_ATTENUATION = 0x8129 # 3 F + +ARB_point_parameters enum: + POINT_SIZE_MIN_ARB = 0x8126 # 1 F + POINT_SIZE_MAX_ARB = 0x8127 # 1 F + POINT_FADE_THRESHOLD_SIZE_ARB = 0x8128 # 1 F + POINT_DISTANCE_ATTENUATION_ARB = 0x8129 # 3 F + +EXT_point_parameters enum: + POINT_SIZE_MIN_EXT = 0x8126 # 1 F + POINT_SIZE_MAX_EXT = 0x8127 # 1 F + POINT_FADE_THRESHOLD_SIZE_EXT = 0x8128 # 1 F + DISTANCE_ATTENUATION_EXT = 0x8129 # 3 F + +SGIS_point_parameters enum: + POINT_SIZE_MIN_SGIS = 0x8126 # 1 F + POINT_SIZE_MAX_SGIS = 0x8127 # 1 F + POINT_FADE_THRESHOLD_SIZE_SGIS = 0x8128 # 1 F + DISTANCE_ATTENUATION_SGIS = 0x8129 # 3 F + +############################################################################### + +SGIS_fog_function enum: + FOG_FUNC_SGIS = 0x812A + FOG_FUNC_POINTS_SGIS = 0x812B # 1 I + MAX_FOG_FUNC_POINTS_SGIS = 0x812C # 1 I + +############################################################################### + +VERSION_1_3 enum: (Promoted for OpenGL 1.3) + CLAMP_TO_BORDER = 0x812D + +ARB_texture_border_clamp enum: + CLAMP_TO_BORDER_ARB = 0x812D + +SGIS_texture_border_clamp enum: + CLAMP_TO_BORDER_SGIS = 0x812D + +############################################################################### + +SGIX_texture_multi_buffer enum: + TEXTURE_MULTI_BUFFER_HINT_SGIX = 0x812E + +############################################################################### + +VERSION_1_2 enum: (Promoted for OpenGL 1.2) + CLAMP_TO_EDGE = 0x812F + +SGIS_texture_edge_clamp enum: + CLAMP_TO_EDGE_SGIS = 0x812F + +############################################################################### + +SGIS_texture4D enum: + PACK_SKIP_VOLUMES_SGIS = 0x8130 # 1 I + PACK_IMAGE_DEPTH_SGIS = 0x8131 # 1 I + UNPACK_SKIP_VOLUMES_SGIS = 0x8132 # 1 I + UNPACK_IMAGE_DEPTH_SGIS = 0x8133 # 1 I + TEXTURE_4D_SGIS = 0x8134 # 1 I + PROXY_TEXTURE_4D_SGIS = 0x8135 + TEXTURE_4DSIZE_SGIS = 0x8136 + TEXTURE_WRAP_Q_SGIS = 0x8137 + MAX_4D_TEXTURE_SIZE_SGIS = 0x8138 # 1 I + TEXTURE_4D_BINDING_SGIS = 0x814F # 1 I + +############################################################################### + +SGIX_pixel_texture enum: + PIXEL_TEX_GEN_SGIX = 0x8139 # 1 I + PIXEL_TEX_GEN_MODE_SGIX = 0x832B # 1 I + +############################################################################### + +VERSION_1_2 enum: (Promoted for OpenGL 1.2) + TEXTURE_MIN_LOD = 0x813A + TEXTURE_MAX_LOD = 0x813B + TEXTURE_BASE_LEVEL = 0x813C + TEXTURE_MAX_LEVEL = 0x813D + +SGIS_texture_lod enum: + TEXTURE_MIN_LOD_SGIS = 0x813A + TEXTURE_MAX_LOD_SGIS = 0x813B + TEXTURE_BASE_LEVEL_SGIS = 0x813C + TEXTURE_MAX_LEVEL_SGIS = 0x813D + +############################################################################### + +SGIX_pixel_tiles enum: + PIXEL_TILE_BEST_ALIGNMENT_SGIX = 0x813E # 1 I + PIXEL_TILE_CACHE_INCREMENT_SGIX = 0x813F # 1 I + PIXEL_TILE_WIDTH_SGIX = 0x8140 # 1 I + PIXEL_TILE_HEIGHT_SGIX = 0x8141 # 1 I + PIXEL_TILE_GRID_WIDTH_SGIX = 0x8142 # 1 I + PIXEL_TILE_GRID_HEIGHT_SGIX = 0x8143 # 1 I + PIXEL_TILE_GRID_DEPTH_SGIX = 0x8144 # 1 I + PIXEL_TILE_CACHE_SIZE_SGIX = 0x8145 # 1 I + +############################################################################### + +SGIS_texture_filter4 enum: + FILTER4_SGIS = 0x8146 + TEXTURE_FILTER4_SIZE_SGIS = 0x8147 + +############################################################################### + +SGIX_sprite enum: + SPRITE_SGIX = 0x8148 # 1 I + SPRITE_MODE_SGIX = 0x8149 # 1 I + SPRITE_AXIS_SGIX = 0x814A # 3 F + SPRITE_TRANSLATION_SGIX = 0x814B # 3 F + SPRITE_AXIAL_SGIX = 0x814C + SPRITE_OBJECT_ALIGNED_SGIX = 0x814D + SPRITE_EYE_ALIGNED_SGIX = 0x814E + +############################################################################### + +# SGIS_texture4D (additional; see above): 0x814F + +############################################################################### + +VERSION_1_2 enum: (Promoted for OpenGL 1.2) + CONSTANT_BORDER = 0x8151 +# WRAP_BORDER = 0x8152 # Not actually used + REPLICATE_BORDER = 0x8153 + CONVOLUTION_BORDER_COLOR = 0x8154 + +HP_convolution_border_modes enum: + IGNORE_BORDER_HP = 0x8150 # Not promoted + CONSTANT_BORDER_HP = 0x8151 + REPLICATE_BORDER_HP = 0x8153 + CONVOLUTION_BORDER_COLOR_HP = 0x8154 + +############################################################################### + +# HP: 0x8155-0x816F + +############################################################################### + +SGIX_clipmap enum: + LINEAR_CLIPMAP_LINEAR_SGIX = 0x8170 + TEXTURE_CLIPMAP_CENTER_SGIX = 0x8171 + TEXTURE_CLIPMAP_FRAME_SGIX = 0x8172 + TEXTURE_CLIPMAP_OFFSET_SGIX = 0x8173 + TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX = 0x8174 + TEXTURE_CLIPMAP_LOD_OFFSET_SGIX = 0x8175 + TEXTURE_CLIPMAP_DEPTH_SGIX = 0x8176 + MAX_CLIPMAP_DEPTH_SGIX = 0x8177 # 1 I + MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX = 0x8178 # 1 I + NEAREST_CLIPMAP_NEAREST_SGIX = 0x844D + NEAREST_CLIPMAP_LINEAR_SGIX = 0x844E + LINEAR_CLIPMAP_NEAREST_SGIX = 0x844F + +############################################################################### + +SGIX_texture_scale_bias enum: + POST_TEXTURE_FILTER_BIAS_SGIX = 0x8179 + POST_TEXTURE_FILTER_SCALE_SGIX = 0x817A + POST_TEXTURE_FILTER_BIAS_RANGE_SGIX = 0x817B # 2 F + POST_TEXTURE_FILTER_SCALE_RANGE_SGIX = 0x817C # 2 F + +############################################################################### + +SGIX_reference_plane enum: + REFERENCE_PLANE_SGIX = 0x817D # 1 I + REFERENCE_PLANE_EQUATION_SGIX = 0x817E # 4 F + +############################################################################### + +SGIX_ir_instrument1 enum: + IR_INSTRUMENT1_SGIX = 0x817F # 1 I + +############################################################################### + +SGIX_instruments enum: + INSTRUMENT_BUFFER_POINTER_SGIX = 0x8180 + INSTRUMENT_MEASUREMENTS_SGIX = 0x8181 # 1 I + +############################################################################### + +SGIX_list_priority enum: + LIST_PRIORITY_SGIX = 0x8182 + +############################################################################### + +SGIX_calligraphic_fragment enum: + CALLIGRAPHIC_FRAGMENT_SGIX = 0x8183 # 1 I + +############################################################################### + +SGIX_impact_pixel_texture enum: + PIXEL_TEX_GEN_Q_CEILING_SGIX = 0x8184 + PIXEL_TEX_GEN_Q_ROUND_SGIX = 0x8185 + PIXEL_TEX_GEN_Q_FLOOR_SGIX = 0x8186 + PIXEL_TEX_GEN_ALPHA_REPLACE_SGIX = 0x8187 + PIXEL_TEX_GEN_ALPHA_NO_REPLACE_SGIX = 0x8188 + PIXEL_TEX_GEN_ALPHA_LS_SGIX = 0x8189 + PIXEL_TEX_GEN_ALPHA_MS_SGIX = 0x818A + +############################################################################### + +SGIX_framezoom enum: + FRAMEZOOM_SGIX = 0x818B # 1 I + FRAMEZOOM_FACTOR_SGIX = 0x818C # 1 I + MAX_FRAMEZOOM_FACTOR_SGIX = 0x818D # 1 I + +############################################################################### + +SGIX_texture_lod_bias enum: + TEXTURE_LOD_BIAS_S_SGIX = 0x818E + TEXTURE_LOD_BIAS_T_SGIX = 0x818F + TEXTURE_LOD_BIAS_R_SGIX = 0x8190 + +############################################################################### + +VERSION_1_4 enum: (Promoted for OpenGL 1.4) + GENERATE_MIPMAP = 0x8191 + GENERATE_MIPMAP_HINT = 0x8192 # 1 I + +SGIS_generate_mipmap enum: + GENERATE_MIPMAP_SGIS = 0x8191 + GENERATE_MIPMAP_HINT_SGIS = 0x8192 # 1 I + +############################################################################### + +# Incomplete extension, not in enumext.spec +# SGIX_spotlight_cutoff: 0x8193 +# SPOT_CUTOFF_DELTA_SGIX = 0x8193 + +############################################################################### + +SGIX_polynomial_ffd enum: + GEOMETRY_DEFORMATION_SGIX = 0x8194 + TEXTURE_DEFORMATION_SGIX = 0x8195 + DEFORMATIONS_MASK_SGIX = 0x8196 # 1 I + MAX_DEFORMATION_ORDER_SGIX = 0x8197 + +############################################################################### + +SGIX_fog_offset enum: + FOG_OFFSET_SGIX = 0x8198 # 1 I + FOG_OFFSET_VALUE_SGIX = 0x8199 # 4 F + +############################################################################### + +SGIX_shadow enum: + TEXTURE_COMPARE_SGIX = 0x819A + TEXTURE_COMPARE_OPERATOR_SGIX = 0x819B + TEXTURE_LEQUAL_R_SGIX = 0x819C + TEXTURE_GEQUAL_R_SGIX = 0x819D + +############################################################################### + +# SGI private extension, not in enumext.spec +# SGIX_igloo_interface: 0x819E-0x81A4 +# IGLOO_FULLSCREEN_SGIX = 0x819E +# IGLOO_VIEWPORT_OFFSET_SGIX = 0x819F +# IGLOO_SWAPTMESH_SGIX = 0x81A0 +# IGLOO_COLORNORMAL_SGIX = 0x81A1 +# IGLOO_IRISGL_MODE_SGIX = 0x81A2 +# IGLOO_LMC_COLOR_SGIX = 0x81A3 +# IGLOO_TMESHMODE_SGIX = 0x81A4 + +############################################################################### + +VERSION_1_4 enum: (Promoted for OpenGL 1.4) + DEPTH_COMPONENT16 = 0x81A5 + DEPTH_COMPONENT24 = 0x81A6 + DEPTH_COMPONENT32 = 0x81A7 + +ARB_depth_texture enum: + DEPTH_COMPONENT16_ARB = 0x81A5 + DEPTH_COMPONENT24_ARB = 0x81A6 + DEPTH_COMPONENT32_ARB = 0x81A7 + +SGIX_depth_texture enum: + DEPTH_COMPONENT16_SGIX = 0x81A5 + DEPTH_COMPONENT24_SGIX = 0x81A6 + DEPTH_COMPONENT32_SGIX = 0x81A7 + +# Aliases ARB_depth_texture enum above +OES_framebuffer_object enum: (OpenGL ES only; additional; see below) + DEPTH_COMPONENT16_OES = 0x81A5 + +# Aliases ARB_depth_texture enum above +OES_depth24 enum: (OpenGL ES only) + DEPTH_COMPONENT24_OES = 0x81A6 + +# Aliases ARB_depth_texture enum above +OES_depth32 enum: (OpenGL ES only) + DEPTH_COMPONENT32_OES = 0x81A7 + +############################################################################### + +EXT_compiled_vertex_array enum: + ARRAY_ELEMENT_LOCK_FIRST_EXT = 0x81A8 + ARRAY_ELEMENT_LOCK_COUNT_EXT = 0x81A9 + +############################################################################### + +EXT_cull_vertex enum: + CULL_VERTEX_EXT = 0x81AA + CULL_VERTEX_EYE_POSITION_EXT = 0x81AB + CULL_VERTEX_OBJECT_POSITION_EXT = 0x81AC + +############################################################################### + +# Promoted from SGI? +EXT_index_array_formats enum: + IUI_V2F_EXT = 0x81AD + IUI_V3F_EXT = 0x81AE + IUI_N3F_V2F_EXT = 0x81AF + IUI_N3F_V3F_EXT = 0x81B0 + T2F_IUI_V2F_EXT = 0x81B1 + T2F_IUI_V3F_EXT = 0x81B2 + T2F_IUI_N3F_V2F_EXT = 0x81B3 + T2F_IUI_N3F_V3F_EXT = 0x81B4 + +############################################################################### + +# Promoted from SGI? +EXT_index_func enum: + INDEX_TEST_EXT = 0x81B5 + INDEX_TEST_FUNC_EXT = 0x81B6 + INDEX_TEST_REF_EXT = 0x81B7 + +############################################################################### + +# Promoted from SGI? +EXT_index_material enum: + INDEX_MATERIAL_EXT = 0x81B8 + INDEX_MATERIAL_PARAMETER_EXT = 0x81B9 + INDEX_MATERIAL_FACE_EXT = 0x81BA + +############################################################################### + +SGIX_ycrcb enum: + YCRCB_422_SGIX = 0x81BB + YCRCB_444_SGIX = 0x81BC + +############################################################################### + +# Incomplete extension, not in enumext.spec +# SGI_complex_type: 0x81BD-0x81C3 +# COMPLEX_UNSIGNED_BYTE_SGI = 0x81BD +# COMPLEX_BYTE_SGI = 0x81BE +# COMPLEX_UNSIGNED_SHORT_SGI = 0x81BF +# COMPLEX_SHORT_SGI = 0x81C0 +# COMPLEX_UNSIGNED_INT_SGI = 0x81C1 +# COMPLEX_INT_SGI = 0x81C2 +# COMPLEX_FLOAT_SGI = 0x81C3 + +############################################################################### + +# Incomplete extension, not in enumext.spec +# SGI_fft: 0x81C4-0x81CA +# POST_TRANSFORM_RED_SCALE_SGI = ???? # 1 F +# POST_TRANSFORM_GREEN_SCALE_SGI = ???? # 1 F +# POST_TRANSFORM_BLUE_SCALE_SGI = ???? # 1 F +# POST_TRANSFORM_ALPHA_SCALE_SGI = ???? # 1 F +# POST_TRANSFORM_RED_BIAS_SGI = ???? # 1 F +# POST_TRANSFORM_GREEN_BIAS_SGI = ???? # 1 F +# POST_TRANSFORM_BLUE_BIAS_SGI = ???? # 1 F +# POST_TRANSFORM_ALPHA_BIAS_SGI = ???? # 1 F +# PIXEL_TRANSFORM_OPERATOR_SGI = 0x81C4 # 1 I +# CONVOLUTION_SGI = 0x81C5 +# FFT_1D_SGI = 0x81C6 +# PIXEL_TRANSFORM_SGI = 0x81C7 +# MAX_FFT_WIDTH_SGI = 0x81C8 +# SORT_SGI = 0x81C9 +# TRANSPOSE_SGI = 0x81CA + +############################################################################### + +# Incomplete extension, not in enumext.spec +# SGIX_nurbs_eval: 0x81CB-0x81CF +# MAP1_VERTEX_3_NURBS_SGIX = 0x81CB # 1 I +# MAP1_VERTEX_4_NURBS_SGIX = 0x81CC # 1 I +# MAP1_INDEX_NURBS_SGIX = 0x81CD # 1 I +# MAP1_COLOR_4_NURBS_SGIX = 0x81CE # 1 I +# MAP1_NORMAL_NURBS_SGIX = 0x81CF # 1 I +# MAP1_TEXTURE_COORD_1_NURBS_SGIX = 0x81E0 # 1 I +# MAP1_TEXTURE_COORD_2_NURBS_SGIX = 0x81E1 # 1 I +# MAP1_TEXTURE_COORD_3_NURBS_SGIX = 0x81E2 # 1 I +# MAP1_TEXTURE_COORD_4_NURBS_SGIX = 0x81E3 # 1 I +# MAP2_VERTEX_3_NURBS_SGIX = 0x81E4 # 1 I +# MAP2_VERTEX_4_NURBS_SGIX = 0x81E5 # 1 I +# MAP2_INDEX_NURBS_SGIX = 0x81E6 # 1 I +# MAP2_COLOR_4_NURBS_SGIX = 0x81E7 # 1 I +# MAP2_NORMAL_NURBS_SGIX = 0x81E8 # 1 I +# MAP2_TEXTURE_COORD_1_NURBS_SGIX = 0x81E9 # 1 I +# MAP2_TEXTURE_COORD_2_NURBS_SGIX = 0x81EA # 1 I +# MAP2_TEXTURE_COORD_3_NURBS_SGIX = 0x81EB # 1 I +# MAP2_TEXTURE_COORD_4_NURBS_SGIX = 0x81EC # 1 I +# NURBS_KNOT_COUNT_SGIX = 0x81ED +# NURBS_KNOT_VECTOR_SGIX = 0x81EE + +############################################################################### + +# Sun: 0x81D0-0x81DF + +# No extension spec, not in enumext.spec +# SUNX_surface_hint enum: +# SURFACE_SIZE_HINT_SUNX = 0x81D2 +# LARGE_SUNX = 0x81D3 + +SUNX_general_triangle_list enum: + RESTART_SUN = 0x0001 + REPLACE_MIDDLE_SUN = 0x0002 + REPLACE_OLDEST_SUN = 0x0003 + WRAP_BORDER_SUN = 0x81D4 + TRIANGLE_LIST_SUN = 0x81D7 + REPLACEMENT_CODE_SUN = 0x81D8 + +SUNX_constant_data enum: + UNPACK_CONSTANT_DATA_SUNX = 0x81D5 + TEXTURE_CONSTANT_DATA_SUNX = 0x81D6 + +SUN_global_alpha enum: + GLOBAL_ALPHA_SUN = 0x81D9 + GLOBAL_ALPHA_FACTOR_SUN = 0x81DA + +############################################################################### + +# SGIX_nurbs_eval (additional; see above): 0x81E0-0x81EE + +############################################################################### + +SGIS_texture_color_mask enum: + TEXTURE_COLOR_WRITEMASK_SGIS = 0x81EF + +############################################################################### + +SGIS_point_line_texgen enum: + EYE_DISTANCE_TO_POINT_SGIS = 0x81F0 + OBJECT_DISTANCE_TO_POINT_SGIS = 0x81F1 + EYE_DISTANCE_TO_LINE_SGIS = 0x81F2 + OBJECT_DISTANCE_TO_LINE_SGIS = 0x81F3 + EYE_POINT_SGIS = 0x81F4 + OBJECT_POINT_SGIS = 0x81F5 + EYE_LINE_SGIS = 0x81F6 + OBJECT_LINE_SGIS = 0x81F7 + +############################################################################### + +VERSION_1_2 enum: (Promoted for OpenGL 1.2) + LIGHT_MODEL_COLOR_CONTROL = 0x81F8 # 1 I + SINGLE_COLOR = 0x81F9 + SEPARATE_SPECULAR_COLOR = 0x81FA + +EXT_separate_specular_color enum: + LIGHT_MODEL_COLOR_CONTROL_EXT = 0x81F8 + SINGLE_COLOR_EXT = 0x81F9 + SEPARATE_SPECULAR_COLOR_EXT = 0x81FA + +############################################################################### + +EXT_shared_texture_palette enum: + SHARED_TEXTURE_PALETTE_EXT = 0x81FB # 1 I + +############################################################################### + +# Incomplete extension, not in enumext.spec +# SGIX_fog_scale: 0x81FC-0x81FD +# FOG_SCALE_SGIX = 0x81FC # 1 I +# FOG_SCALE_VALUE_SGIX = 0x81FD # 1 F + +############################################################################### + +# Incomplete extension, not in enumext.spec +# SGIX_fog_blend: 0x81FE-0x81FF +# FOG_BLEND_ALPHA_SGIX = 0x81FE # 1 I +# FOG_BLEND_COLOR_SGIX = 0x81FF # 1 I + +############################################################################### + +# ATI: 0x8200-0x820F (released by Microsoft 2002/9/16) +ATI_text_fragment_shader enum: + TEXT_FRAGMENT_SHADER_ATI = 0x8200 + +############################################################################### + +# OpenGL ARB: 0x8210-0x823F + +VERSION_3_0 enum: + use ARB_framebuffer_object FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING + use ARB_framebuffer_object FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE + use ARB_framebuffer_object FRAMEBUFFER_ATTACHMENT_RED_SIZE + use ARB_framebuffer_object FRAMEBUFFER_ATTACHMENT_GREEN_SIZE + use ARB_framebuffer_object FRAMEBUFFER_ATTACHMENT_BLUE_SIZE + use ARB_framebuffer_object FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE + use ARB_framebuffer_object FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE + use ARB_framebuffer_object FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE + use ARB_framebuffer_object FRAMEBUFFER_DEFAULT + use ARB_framebuffer_object FRAMEBUFFER_UNDEFINED + use ARB_framebuffer_object DEPTH_STENCIL_ATTACHMENT + +ARB_framebuffer_object enum: (note: no ARB suffixes) + FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING = 0x8210 # VERSION_3_0 / ARB_fbo + FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE = 0x8211 # VERSION_3_0 / ARB_fbo + FRAMEBUFFER_ATTACHMENT_RED_SIZE = 0x8212 # VERSION_3_0 / ARB_fbo + FRAMEBUFFER_ATTACHMENT_GREEN_SIZE = 0x8213 # VERSION_3_0 / ARB_fbo + FRAMEBUFFER_ATTACHMENT_BLUE_SIZE = 0x8214 # VERSION_3_0 / ARB_fbo + FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE = 0x8215 # VERSION_3_0 / ARB_fbo + FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE = 0x8216 # VERSION_3_0 / ARB_fbo + FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE = 0x8217 # VERSION_3_0 / ARB_fbo + FRAMEBUFFER_DEFAULT = 0x8218 # VERSION_3_0 / ARB_fbo + FRAMEBUFFER_UNDEFINED = 0x8219 # VERSION_3_0 / ARB_fbo + DEPTH_STENCIL_ATTACHMENT = 0x821A # VERSION_3_0 / ARB_fbo + +VERSION_3_0 enum: + MAJOR_VERSION = 0x821B # VERSION_3_0 + MINOR_VERSION = 0x821C # VERSION_3_0 + NUM_EXTENSIONS = 0x821D # VERSION_3_0 + CONTEXT_FLAGS = 0x821E # VERSION_3_0 + +# ARB_future_use: 0x821F-0x8221 + +VERSION_3_0 enum: + use ARB_framebuffer_object INDEX + +ARB_framebuffer_object enum: (note: no ARB suffixes) + INDEX = 0x8222 # VERSION_3_0 / ARB_fbo + +VERSION_3_0 enum: + DEPTH_BUFFER = 0x8223 # VERSION_3_0 + STENCIL_BUFFER = 0x8224 # VERSION_3_0 + COMPRESSED_RED = 0x8225 # VERSION_3_0 + COMPRESSED_RG = 0x8226 # VERSION_3_0 + +VERSION_3_0 enum: + use ARB_texture_rg RG + use ARB_texture_rg RG_INTEGER + use ARB_texture_rg R8 + use ARB_texture_rg R16 + use ARB_texture_rg RG8 + use ARB_texture_rg RG16 + use ARB_texture_rg R16F + use ARB_texture_rg R32F + use ARB_texture_rg RG16F + use ARB_texture_rg RG32F + use ARB_texture_rg R8I + use ARB_texture_rg R8UI + use ARB_texture_rg R16I + use ARB_texture_rg R16UI + use ARB_texture_rg R32I + use ARB_texture_rg R32UI + use ARB_texture_rg RG8I + use ARB_texture_rg RG8UI + use ARB_texture_rg RG16I + use ARB_texture_rg RG16UI + use ARB_texture_rg RG32I + use ARB_texture_rg RG32UI + +ARB_texture_rg enum: (note: no ARB suffixes) + RG = 0x8227 # VERSION_3_0 / ARB_trg + RG_INTEGER = 0x8228 # VERSION_3_0 / ARB_trg + R8 = 0x8229 # VERSION_3_0 / ARB_trg + R16 = 0x822A # VERSION_3_0 / ARB_trg + RG8 = 0x822B # VERSION_3_0 / ARB_trg + RG16 = 0x822C # VERSION_3_0 / ARB_trg + R16F = 0x822D # VERSION_3_0 / ARB_trg + R32F = 0x822E # VERSION_3_0 / ARB_trg + RG16F = 0x822F # VERSION_3_0 / ARB_trg + RG32F = 0x8230 # VERSION_3_0 / ARB_trg + R8I = 0x8231 # VERSION_3_0 / ARB_trg + R8UI = 0x8232 # VERSION_3_0 / ARB_trg + R16I = 0x8233 # VERSION_3_0 / ARB_trg + R16UI = 0x8234 # VERSION_3_0 / ARB_trg + R32I = 0x8235 # VERSION_3_0 / ARB_trg + R32UI = 0x8236 # VERSION_3_0 / ARB_trg + RG8I = 0x8237 # VERSION_3_0 / ARB_trg + RG8UI = 0x8238 # VERSION_3_0 / ARB_trg + RG16I = 0x8239 # VERSION_3_0 / ARB_trg + RG16UI = 0x823A # VERSION_3_0 / ARB_trg + RG32I = 0x823B # VERSION_3_0 / ARB_trg + RG32UI = 0x823C # VERSION_3_0 / ARB_trg + +# ARB_future_use: 0x823D-0x823F + +############################################################################### + +# @@@ Any_vendor_future_use: 0x8240-0x82AF (released by Microsoft 2002/9/16) + +############################################################################### + +# ADD: 0x82B0-0x830F + +############################################################################### + +SGIX_depth_pass_instrument enum: 0x8310-0x8312 + DEPTH_PASS_INSTRUMENT_SGIX = 0x8310 + DEPTH_PASS_INSTRUMENT_COUNTERS_SGIX = 0x8311 + DEPTH_PASS_INSTRUMENT_MAX_SGIX = 0x8312 + +############################################################################### + +SGIX_fragments_instrument enum: 0x8313-0x8315 + FRAGMENTS_INSTRUMENT_SGIX = 0x8313 # 1 I + FRAGMENTS_INSTRUMENT_COUNTERS_SGIX = 0x8314 # 1 I + FRAGMENTS_INSTRUMENT_MAX_SGIX = 0x8315 # 1 I + +############################################################################### + +SGIX_convolution_accuracy enum: + CONVOLUTION_HINT_SGIX = 0x8316 # 1 I + +############################################################################### + +# SGIX_color_matrix_accuracy: 0x8317 + +############################################################################### + +# 0x8318-0x8319 +SGIX_ycrcba enum: + YCRCB_SGIX = 0x8318 + YCRCBA_SGIX = 0x8319 + +############################################################################### + +# 0x831A-0x831F +SGIX_slim enum: + UNPACK_COMPRESSED_SIZE_SGIX = 0x831A + PACK_MAX_COMPRESSED_SIZE_SGIX = 0x831B + PACK_COMPRESSED_SIZE_SGIX = 0x831C + SLIM8U_SGIX = 0x831D + SLIM10U_SGIX = 0x831E + SLIM12S_SGIX = 0x831F + +############################################################################### + +SGIX_blend_alpha_minmax enum: + ALPHA_MIN_SGIX = 0x8320 + ALPHA_MAX_SGIX = 0x8321 + +############################################################################### + +SGIX_scalebias_hint enum: + SCALEBIAS_HINT_SGIX = 0x8322 + +############################################################################### + +# Incomplete extension, not in enumext.spec +# SGIX_fog_layers: 0x8323-0x8328 +# FOG_TYPE_SGIX = 0x8323 # 1 I +# UNIFORM_SGIX = 0x8324 +# LAYERED_SGIX = 0x8325 +# FOG_GROUND_PLANE_SGIX = 0x8326 # 4 F +# FOG_LAYERS_POINTS_SGIX = 0x8327 # 1 I +# MAX_FOG_LAYERS_POINTS_SGIX = 0x8328 # 1 I + +############################################################################### + +SGIX_async enum: + ASYNC_MARKER_SGIX = 0x8329 + +############################################################################### + +# Incomplete extension, not in enumext.spec +# SGIX_texture_phase: 0x832A +# PHASE_SGIX = 0x832A + +############################################################################### + +# SGIX_pixel_texture (additional; see above): 0x832B + +############################################################################### + +SGIX_async_histogram enum: + ASYNC_HISTOGRAM_SGIX = 0x832C + MAX_ASYNC_HISTOGRAM_SGIX = 0x832D + +############################################################################### + +# Incomplete extension, not in enumext.spec +# SGIX_texture_mipmap_anisotropic: 0x832E-0x832F +# TEXTURE_MIPMAP_ANISOTROPY_SGIX = 0x832E +# MAX_MIPMAP_ANISOTROPY_SGIX = 0x832F # 1 I + +############################################################################### + +EXT_pixel_transform enum: + PIXEL_TRANSFORM_2D_EXT = 0x8330 + PIXEL_MAG_FILTER_EXT = 0x8331 + PIXEL_MIN_FILTER_EXT = 0x8332 + PIXEL_CUBIC_WEIGHT_EXT = 0x8333 + CUBIC_EXT = 0x8334 + AVERAGE_EXT = 0x8335 + PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT = 0x8336 + MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT = 0x8337 + PIXEL_TRANSFORM_2D_MATRIX_EXT = 0x8338 + +# SUN_future_use: 0x8339-0x833F + +############################################################################### + +# Incomplete extension, not in enumext.spec +# SGIX_cube_map: 0x8340-0x8348 +# ENV_MAP_SGIX = 0x8340 +# CUBE_MAP_SGIX = 0x8341 +# CUBE_MAP_ZP_SGIX = 0x8342 +# CUBE_MAP_ZN_SGIX = 0x8343 +# CUBE_MAP_XN_SGIX = 0x8344 +# CUBE_MAP_XP_SGIX = 0x8345 +# CUBE_MAP_YN_SGIX = 0x8346 +# CUBE_MAP_YP_SGIX = 0x8347 +# CUBE_MAP_BINDING_SGIX = 0x8348 # 1 I + +############################################################################### + +# Unfortunately, there was a collision promoting to EXT from SGIX. +# Use fog_coord's value of 0x8452 instead of the previously +# assigned FRAGMENT_DEPTH_EXT -> 0x834B. +# EXT_light_texture: 0x8349-0x8352 +EXT_light_texture enum: 0x8349-0x8352 + FRAGMENT_MATERIAL_EXT = 0x8349 + FRAGMENT_NORMAL_EXT = 0x834A + FRAGMENT_COLOR_EXT = 0x834C + ATTENUATION_EXT = 0x834D + SHADOW_ATTENUATION_EXT = 0x834E + TEXTURE_APPLICATION_MODE_EXT = 0x834F # 1 I + TEXTURE_LIGHT_EXT = 0x8350 # 1 I + TEXTURE_MATERIAL_FACE_EXT = 0x8351 # 1 I + TEXTURE_MATERIAL_PARAMETER_EXT = 0x8352 # 1 I + use EXT_fog_coord FRAGMENT_DEPTH_EXT + +############################################################################### + +SGIS_pixel_texture enum: + PIXEL_TEXTURE_SGIS = 0x8353 # 1 I + PIXEL_FRAGMENT_RGB_SOURCE_SGIS = 0x8354 # 1 I + PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS = 0x8355 # 1 I + PIXEL_GROUP_COLOR_SGIS = 0x8356 # 1 I + +############################################################################### + +# Incomplete extension, not in enumext.spec +# SGIX_pixel_texture_bits: 0x8357-0x8359 +# COLOR_TO_TEXTURE_COORD_SGIX = 0x8357 +# COLOR_BIT_PATTERN_SGIX = 0x8358 +# COLOR_VALUE_SGIX = 0x8359 + +############################################################################### + +# Incomplete extension, not in enumext.spec +# SGIX_pixel_texture_lod: 0x835A +# PIXEL_TEX_GEN_LAMBDA_SOURCE_SGIX = 0x835A + +############################################################################### + +SGIX_line_quality_hint enum: + LINE_QUALITY_HINT_SGIX = 0x835B + +############################################################################### + +SGIX_async_pixel enum: + ASYNC_TEX_IMAGE_SGIX = 0x835C + ASYNC_DRAW_PIXELS_SGIX = 0x835D + ASYNC_READ_PIXELS_SGIX = 0x835E + MAX_ASYNC_TEX_IMAGE_SGIX = 0x835F + MAX_ASYNC_DRAW_PIXELS_SGIX = 0x8360 + MAX_ASYNC_READ_PIXELS_SGIX = 0x8361 + +############################################################################### + +# EXT_packed_pixels (additional; see above): 0x8362-0x8368 + +############################################################################### + +SGIX_texture_coordinate_clamp enum: + TEXTURE_MAX_CLAMP_S_SGIX = 0x8369 + TEXTURE_MAX_CLAMP_T_SGIX = 0x836A + TEXTURE_MAX_CLAMP_R_SGIX = 0x836B + +############################################################################### + +# Incomplete extension, not in enumext.spec +# SGIX_fog_texture: 0x836C-0x836E +# FRAGMENT_FOG_SGIX = 0x836C +# TEXTURE_FOG_SGIX = 0x836D # 1 I +# FOG_PATCHY_FACTOR_SGIX = 0x836E + +############################################################################### + +# Incomplete extension, not in enumext.spec +# SGIX_fog_factor_to_alpha: 0x836F + FOG_FACTOR_TO_ALPHA_SGIX = 0x836F + +############################################################################### + +# HP: 0x8370-0x837F +# NOTE: IBM is using values in this range, because of a bobble +# when Pat Brown left at the same time as I assigned them the +# next range and their registry became inconsistent. Unknown +# whether HP has any conflicts as they have never reported using +# any values in this range. + +VERSION_1_4 enum: (Promoted for OpenGL 1.4) + MIRRORED_REPEAT = 0x8370 + +ARB_texture_mirrored_repeat enum: + MIRRORED_REPEAT_ARB = 0x8370 + +IBM_texture_mirrored_repeat enum: + MIRRORED_REPEAT_IBM = 0x8370 + +# Aliases ARB_texture_mirrored_repeat enum above +OES_texture_mirrored_repeat enum: (OpenGL ES only) + MIRRORED_REPEAT_OES = 0x8370 + +############################################################################### + +# IBM: 0x8380-0x839F + +############################################################################### + +# S3: 0x83A0-0x83BF + +S3_s3tc enum: + RGB_S3TC = 0x83A0 + RGB4_S3TC = 0x83A1 + RGBA_S3TC = 0x83A2 + RGBA4_S3TC = 0x83A3 + +# S3_future_use: 0x83A4-0x83BF + +############################################################################### + +# Obsolete extension, never to be put in enumext.spec +# SGIS_multitexture: 0x83C0-0x83E5 +# SELECTED_TEXTURE_SGIS = 0x83C0 # 1 I +# SELECTED_TEXTURE_COORD_SET_SGIS = 0x83C1 # 1 I +# SELECTED_TEXTURE_TRANSFORM_SGIS = 0x83C2 # 1 I +# MAX_TEXTURES_SGIS = 0x83C3 # 1 I +# MAX_TEXTURE_COORD_SETS_SGIS = 0x83C4 # 1 I +# TEXTURE_COORD_SET_INTERLEAVE_FACTOR_SGIS = 0x83C5 # 1 I +# TEXTURE_ENV_COORD_SET_SGIS = 0x83C6 +# TEXTURE0_SGIS = 0x83C7 +# TEXTURE1_SGIS = 0x83C8 +# TEXTURE2_SGIS = 0x83C9 +# TEXTURE3_SGIS = 0x83CA +# +# SGIS_multitexture_future_use: 0x83CB-0x83E5 + +############################################################################### + +# Incomplete extension, not in enumext.spec +# SGIX_bali_g_instruments: 0x83E6-0x83E9 +# BALI_NUM_TRIS_CULLED_INSTRUMENT_SGIX = 0x83E6 # 1 I +# BALI_NUM_PRIMS_CLIPPED_INSTRUMENT_SGIX = 0x83E7 # 1 I +# BALI_NUM_PRIMS_REJECT_INSTRUMENT_SGIX = 0x83E8 # 1 I +# BALI_NUM_PRIMS_CLIP_RESULT_INSTRUMENT_SGIX = 0x83E9 # 1 I + +############################################################################### + +# Incomplete extension, not in enumext.spec +# SGIX_bali_r_instruments: 0x83EA-0x83EC +# BALI_FRAGMENTS_GENERATED_INSTRUMENT_SGIX = 0x83EA # 1 I +# BALI_DEPTH_PASS_INSTRUMENT_SGIX = 0x83EB # 1 I +# BALI_R_CHIP_COUNT_SGIX = 0x83EC # 1 I + +############################################################################### + +# Incomplete extension, not in enumext.spec +# SGIX_occlusion_instrument: 0x83ED +# OCCLUSION_INSTRUMENT_SGIX = 0x83ED # 1 I + +############################################################################### + +SGIX_vertex_preclip enum: + VERTEX_PRECLIP_SGIX = 0x83EE + VERTEX_PRECLIP_HINT_SGIX = 0x83EF + +############################################################################### + +# INTEL: 0x83F0-0x83FF +# Note that this block was reclaimed from NTP, who never shipped it, +# and reassigned to Intel. + +EXT_texture_compression_s3tc enum: + COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83F0 + COMPRESSED_RGBA_S3TC_DXT1_EXT = 0x83F1 + COMPRESSED_RGBA_S3TC_DXT3_EXT = 0x83F2 + COMPRESSED_RGBA_S3TC_DXT5_EXT = 0x83F3 + +INTEL_parallel_arrays enum: + PARALLEL_ARRAYS_INTEL = 0x83F4 + VERTEX_ARRAY_PARALLEL_POINTERS_INTEL = 0x83F5 + NORMAL_ARRAY_PARALLEL_POINTERS_INTEL = 0x83F6 + COLOR_ARRAY_PARALLEL_POINTERS_INTEL = 0x83F7 + TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL = 0x83F8 + +# INTEL_future_use: 0x83F9-0x83FF + +############################################################################### + +SGIX_fragment_lighting enum: + FRAGMENT_LIGHTING_SGIX = 0x8400 # 1 I + FRAGMENT_COLOR_MATERIAL_SGIX = 0x8401 # 1 I + FRAGMENT_COLOR_MATERIAL_FACE_SGIX = 0x8402 # 1 I + FRAGMENT_COLOR_MATERIAL_PARAMETER_SGIX = 0x8403 # 1 I + MAX_FRAGMENT_LIGHTS_SGIX = 0x8404 # 1 I + MAX_ACTIVE_LIGHTS_SGIX = 0x8405 # 1 I + CURRENT_RASTER_NORMAL_SGIX = 0x8406 # 1 I + LIGHT_ENV_MODE_SGIX = 0x8407 # 1 I + FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX = 0x8408 # 1 I + FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX = 0x8409 # 1 I + FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX = 0x840A # 4 F + FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX = 0x840B # 1 I + FRAGMENT_LIGHT0_SGIX = 0x840C # 1 I + FRAGMENT_LIGHT1_SGIX = 0x840D + FRAGMENT_LIGHT2_SGIX = 0x840E + FRAGMENT_LIGHT3_SGIX = 0x840F + FRAGMENT_LIGHT4_SGIX = 0x8410 + FRAGMENT_LIGHT5_SGIX = 0x8411 + FRAGMENT_LIGHT6_SGIX = 0x8412 + FRAGMENT_LIGHT7_SGIX = 0x8413 + +# SGIX_fragment_lighting_future_use: 0x8414-0x842B + +############################################################################### + +SGIX_resample enum: + PACK_RESAMPLE_SGIX = 0x842C + UNPACK_RESAMPLE_SGIX = 0x842D + RESAMPLE_REPLICATE_SGIX = 0x842E + RESAMPLE_ZERO_FILL_SGIX = 0x842F + RESAMPLE_DECIMATE_SGIX = 0x8430 + +# SGIX_resample_future_use: 0x8431-0x8435 + +############################################################################### + +# Incomplete extension, not in enumext.spec +# SGIX_fragment_lighting_space: 0x8436-0x8449 +# EYE_SPACE_SGIX = 0x8436 +# TANGENT_SPACE_SGIX = 0x8437 +# OBJECT_SPACE_SGIX = 0x8438 +# TANGENT_ARRAY_SGIX = 0x8439 +# BINORMAL_ARRAY_SGIX = 0x843A +# CURRENT_TANGENT_SGIX = 0x843B # 3 F +# CURRENT_BINORMAL_SGIX = 0x843C # 3 F +# FRAGMENT_LIGHT_SPACE_SGIX = 0x843D # 1 I +# TANGENT_ARRAY_TYPE_SGIX = 0x843E +# TANGENT_ARRAY_STRIDE_SGIX = 0x843F +# TANGENT_ARRAY_COUNT_SGIX = 0x8440 +# BINORMAL_ARRAY_TYPE_SGIX = 0x8441 +# BINORMAL_ARRAY_STRIDE_SGIX = 0x8442 +# BINORMAL_ARRAY_COUNT_SGIX = 0x8443 +# TANGENT_ARRAY_POINTER_SGIX = 0x8444 +# BINORMAL_ARRAY_POINTER_SGIX = 0x8445 +# MAP1_TANGENT_SGIX = 0x8446 +# MAP2_TANGENT_SGIX = 0x8447 +# MAP1_BINORMAL_SGIX = 0x8448 +# MAP2_BINORMAL_SGIX = 0x8449 + +############################################################################### + +# Incomplete extension, not in enumext.spec +# SGIX_bali_timer_instruments: 0x844A-0x844C +# BALI_GEOM_TIMER_INSTRUMENT_SGIX = 0x844A # 1 I +# BALI_RASTER_TIMER_INSTRUMENT_SGIX = 0x844B # 1 I +# BALI_INSTRUMENT_TIME_UNIT_SGIX = 0x844C # 1 I + +############################################################################### + +# SGIX_clipmap (additional; see above): 0x844D-0x844F + +############################################################################### + +# SGI (actually brokered for Id Software): 0x8450-0x845F + +VERSION_1_5 enum: (Consistent naming scheme for OpenGL 1.5) + FOG_COORD_SRC = 0x8450 # alias GL_FOG_COORDINATE_SOURCE + FOG_COORD = 0x8451 # alias GL_FOG_COORDINATE + CURRENT_FOG_COORD = 0x8453 # alias GL_CURRENT_FOG_COORDINATE + FOG_COORD_ARRAY_TYPE = 0x8454 # alias GL_FOG_COORDINATE_ARRAY_TYPE + FOG_COORD_ARRAY_STRIDE = 0x8455 # alias GL_FOG_COORDINATE_ARRAY_STRIDE + FOG_COORD_ARRAY_POINTER = 0x8456 # alias GL_FOG_COORDINATE_ARRAY_POINTER + FOG_COORD_ARRAY = 0x8457 # alias GL_FOG_COORDINATE_ARRAY + +VERSION_1_4 enum: (Promoted for OpenGL 1.4) + FOG_COORDINATE_SOURCE = 0x8450 # 1 I + FOG_COORDINATE = 0x8451 + FRAGMENT_DEPTH = 0x8452 + CURRENT_FOG_COORDINATE = 0x8453 # 1 F + FOG_COORDINATE_ARRAY_TYPE = 0x8454 # 1 I + FOG_COORDINATE_ARRAY_STRIDE = 0x8455 # 1 I + FOG_COORDINATE_ARRAY_POINTER = 0x8456 + FOG_COORDINATE_ARRAY = 0x8457 # 1 I + +EXT_fog_coord enum: + FOG_COORDINATE_SOURCE_EXT = 0x8450 # 1 I + FOG_COORDINATE_EXT = 0x8451 + FRAGMENT_DEPTH_EXT = 0x8452 + CURRENT_FOG_COORDINATE_EXT = 0x8453 # 1 F + FOG_COORDINATE_ARRAY_TYPE_EXT = 0x8454 # 1 I + FOG_COORDINATE_ARRAY_STRIDE_EXT = 0x8455 # 1 I + FOG_COORDINATE_ARRAY_POINTER_EXT = 0x8456 + FOG_COORDINATE_ARRAY_EXT = 0x8457 # 1 I + +VERSION_1_4 enum: (Promoted for OpenGL 1.4) + COLOR_SUM = 0x8458 # 1 I + CURRENT_SECONDARY_COLOR = 0x8459 # 3 F + SECONDARY_COLOR_ARRAY_SIZE = 0x845A # 1 I + SECONDARY_COLOR_ARRAY_TYPE = 0x845B # 1 I + SECONDARY_COLOR_ARRAY_STRIDE = 0x845C # 1 I + SECONDARY_COLOR_ARRAY_POINTER = 0x845D + SECONDARY_COLOR_ARRAY = 0x845E # 1 I + +EXT_secondary_color enum: + COLOR_SUM_EXT = 0x8458 # 1 I + CURRENT_SECONDARY_COLOR_EXT = 0x8459 # 3 F + SECONDARY_COLOR_ARRAY_SIZE_EXT = 0x845A # 1 I + SECONDARY_COLOR_ARRAY_TYPE_EXT = 0x845B # 1 I + SECONDARY_COLOR_ARRAY_STRIDE_EXT = 0x845C # 1 I + SECONDARY_COLOR_ARRAY_POINTER_EXT = 0x845D + SECONDARY_COLOR_ARRAY_EXT = 0x845E # 1 I + +ARB_vertex_program enum: + COLOR_SUM_ARB = 0x8458 # 1 I # ARB_vertex_program + +VERSION_2_1 enum: + CURRENT_RASTER_SECONDARY_COLOR = 0x845F + +############################################################################### + +# Incomplete extension, not in enumext.spec +SGIX_icc_texture enum: +# RGB_ICC_SGIX = 0x8460 +# RGBA_ICC_SGIX = 0x8461 +# ALPHA_ICC_SGIX = 0x8462 +# LUMINANCE_ICC_SGIX = 0x8463 +# INTENSITY_ICC_SGIX = 0x8464 +# LUMINANCE_ALPHA_ICC_SGIX = 0x8465 +# R5_G6_B5_ICC_SGIX = 0x8466 +# R5_G6_B5_A8_ICC_SGIX = 0x8467 +# ALPHA16_ICC_SGIX = 0x8468 +# LUMINANCE16_ICC_SGIX = 0x8469 +# INTENSITY16_ICC_SGIX = 0x846A +# LUMINANCE16_ALPHA8_ICC_SGIX = 0x846B + +############################################################################### + +# SGI_future_use: 0x846C + +############################################################################### + +# SMOOTH_* enums are new names for pre-1.2 enums. +VERSION_1_2 enum: + SMOOTH_POINT_SIZE_RANGE = 0x0B12 # 2 F + SMOOTH_POINT_SIZE_GRANULARITY = 0x0B13 # 1 F + SMOOTH_LINE_WIDTH_RANGE = 0x0B22 # 2 F + SMOOTH_LINE_WIDTH_GRANULARITY = 0x0B23 # 1 F + ALIASED_POINT_SIZE_RANGE = 0x846D # 2 F + ALIASED_LINE_WIDTH_RANGE = 0x846E # 2 F + +############################################################################### + +# SGI_future_use: 0x846F + +############################################################################### + +# ATI Technologies (vendor multitexture, spec not yet released): 0x8470-0x848F + +############################################################################### + +# REND (Rendition): 0x8490-0x849F + +REND_screen_coordinates enum: + SCREEN_COORDINATES_REND = 0x8490 + INVERTED_SCREEN_W_REND = 0x8491 + +############################################################################### + +# ATI Technologies (vendor multitexture, spec not yet released): 0x84A0-84BF + +############################################################################### + +# OpenGL ARB: 0x84C0-0x84EF + +VERSION_1_3 enum: (Promoted for OpenGL 1.3) + TEXTURE0 = 0x84C0 + TEXTURE1 = 0x84C1 + TEXTURE2 = 0x84C2 + TEXTURE3 = 0x84C3 + TEXTURE4 = 0x84C4 + TEXTURE5 = 0x84C5 + TEXTURE6 = 0x84C6 + TEXTURE7 = 0x84C7 + TEXTURE8 = 0x84C8 + TEXTURE9 = 0x84C9 + TEXTURE10 = 0x84CA + TEXTURE11 = 0x84CB + TEXTURE12 = 0x84CC + TEXTURE13 = 0x84CD + TEXTURE14 = 0x84CE + TEXTURE15 = 0x84CF + TEXTURE16 = 0x84D0 + TEXTURE17 = 0x84D1 + TEXTURE18 = 0x84D2 + TEXTURE19 = 0x84D3 + TEXTURE20 = 0x84D4 + TEXTURE21 = 0x84D5 + TEXTURE22 = 0x84D6 + TEXTURE23 = 0x84D7 + TEXTURE24 = 0x84D8 + TEXTURE25 = 0x84D9 + TEXTURE26 = 0x84DA + TEXTURE27 = 0x84DB + TEXTURE28 = 0x84DC + TEXTURE29 = 0x84DD + TEXTURE30 = 0x84DE + TEXTURE31 = 0x84DF + ACTIVE_TEXTURE = 0x84E0 # 1 I + CLIENT_ACTIVE_TEXTURE = 0x84E1 # 1 I + MAX_TEXTURE_UNITS = 0x84E2 # 1 I + +ARB_multitexture enum: + TEXTURE0_ARB = 0x84C0 + TEXTURE1_ARB = 0x84C1 + TEXTURE2_ARB = 0x84C2 + TEXTURE3_ARB = 0x84C3 + TEXTURE4_ARB = 0x84C4 + TEXTURE5_ARB = 0x84C5 + TEXTURE6_ARB = 0x84C6 + TEXTURE7_ARB = 0x84C7 + TEXTURE8_ARB = 0x84C8 + TEXTURE9_ARB = 0x84C9 + TEXTURE10_ARB = 0x84CA + TEXTURE11_ARB = 0x84CB + TEXTURE12_ARB = 0x84CC + TEXTURE13_ARB = 0x84CD + TEXTURE14_ARB = 0x84CE + TEXTURE15_ARB = 0x84CF + TEXTURE16_ARB = 0x84D0 + TEXTURE17_ARB = 0x84D1 + TEXTURE18_ARB = 0x84D2 + TEXTURE19_ARB = 0x84D3 + TEXTURE20_ARB = 0x84D4 + TEXTURE21_ARB = 0x84D5 + TEXTURE22_ARB = 0x84D6 + TEXTURE23_ARB = 0x84D7 + TEXTURE24_ARB = 0x84D8 + TEXTURE25_ARB = 0x84D9 + TEXTURE26_ARB = 0x84DA + TEXTURE27_ARB = 0x84DB + TEXTURE28_ARB = 0x84DC + TEXTURE29_ARB = 0x84DD + TEXTURE30_ARB = 0x84DE + TEXTURE31_ARB = 0x84DF + ACTIVE_TEXTURE_ARB = 0x84E0 # 1 I + CLIENT_ACTIVE_TEXTURE_ARB = 0x84E1 # 1 I + MAX_TEXTURE_UNITS_ARB = 0x84E2 # 1 I + +# These are really core ES 1.1 enums, but haven't included +# ES core enums in enum.spec yet +OES_texture_env_crossbar enum: (OpenGL ES only) + use VERSION_1_3 TEXTURE0 + use VERSION_1_3 TEXTURE1 + use VERSION_1_3 TEXTURE2 + use VERSION_1_3 TEXTURE3 + use VERSION_1_3 TEXTURE4 + use VERSION_1_3 TEXTURE5 + use VERSION_1_3 TEXTURE6 + use VERSION_1_3 TEXTURE7 + use VERSION_1_3 TEXTURE8 + use VERSION_1_3 TEXTURE9 + use VERSION_1_3 TEXTURE10 + use VERSION_1_3 TEXTURE11 + use VERSION_1_3 TEXTURE12 + use VERSION_1_3 TEXTURE13 + use VERSION_1_3 TEXTURE14 + use VERSION_1_3 TEXTURE15 + use VERSION_1_3 TEXTURE16 + use VERSION_1_3 TEXTURE17 + use VERSION_1_3 TEXTURE18 + use VERSION_1_3 TEXTURE19 + use VERSION_1_3 TEXTURE20 + use VERSION_1_3 TEXTURE21 + use VERSION_1_3 TEXTURE22 + use VERSION_1_3 TEXTURE23 + use VERSION_1_3 TEXTURE24 + use VERSION_1_3 TEXTURE25 + use VERSION_1_3 TEXTURE26 + use VERSION_1_3 TEXTURE27 + use VERSION_1_3 TEXTURE28 + use VERSION_1_3 TEXTURE29 + use VERSION_1_3 TEXTURE30 + use VERSION_1_3 TEXTURE31 + +############################################################################### + +VERSION_1_3 enum: (Promoted for OpenGL 1.3) + TRANSPOSE_MODELVIEW_MATRIX = 0x84E3 # 16 F + TRANSPOSE_PROJECTION_MATRIX = 0x84E4 # 16 F + TRANSPOSE_TEXTURE_MATRIX = 0x84E5 # 16 F + TRANSPOSE_COLOR_MATRIX = 0x84E6 # 16 F + +ARB_transpose_matrix enum: + TRANSPOSE_MODELVIEW_MATRIX_ARB = 0x84E3 # 16 F + TRANSPOSE_PROJECTION_MATRIX_ARB = 0x84E4 # 16 F + TRANSPOSE_TEXTURE_MATRIX_ARB = 0x84E5 # 16 F + TRANSPOSE_COLOR_MATRIX_ARB = 0x84E6 # 16 F + +VERSION_1_3 enum: (Promoted for OpenGL 1.3) + SUBTRACT = 0x84E7 + +ARB_texture_env_combine enum: + SUBTRACT_ARB = 0x84E7 + +VERSION_3_0 enum: + use ARB_framebuffer_object MAX_RENDERBUFFER_SIZE + +ARB_framebuffer_object enum: (note: no ARB suffixes) + MAX_RENDERBUFFER_SIZE = 0x84E8 # VERSION_3_0 / ARB_fbo + +EXT_framebuffer_object enum: (additional; see below): + MAX_RENDERBUFFER_SIZE_EXT = 0x84E8 + +# Aliases EXT_framebuffer_object enum above +OES_framebuffer_object enum: (OpenGL ES only; additional; see below) + MAX_RENDERBUFFER_SIZE_OES = 0x84E8 + +VERSION_1_3 enum: (Promoted for OpenGL 1.3) + COMPRESSED_ALPHA = 0x84E9 + COMPRESSED_LUMINANCE = 0x84EA + COMPRESSED_LUMINANCE_ALPHA = 0x84EB + COMPRESSED_INTENSITY = 0x84EC + COMPRESSED_RGB = 0x84ED + COMPRESSED_RGBA = 0x84EE + TEXTURE_COMPRESSION_HINT = 0x84EF + TEXTURE_COMPRESSED_IMAGE_SIZE = 0x86A0 + TEXTURE_COMPRESSED = 0x86A1 + NUM_COMPRESSED_TEXTURE_FORMATS = 0x86A2 + COMPRESSED_TEXTURE_FORMATS = 0x86A3 + +ARB_texture_compression enum: + COMPRESSED_ALPHA_ARB = 0x84E9 + COMPRESSED_LUMINANCE_ARB = 0x84EA + COMPRESSED_LUMINANCE_ALPHA_ARB = 0x84EB + COMPRESSED_INTENSITY_ARB = 0x84EC + COMPRESSED_RGB_ARB = 0x84ED + COMPRESSED_RGBA_ARB = 0x84EE + TEXTURE_COMPRESSION_HINT_ARB = 0x84EF + TEXTURE_COMPRESSED_IMAGE_SIZE_ARB = 0x86A0 + TEXTURE_COMPRESSED_ARB = 0x86A1 + NUM_COMPRESSED_TEXTURE_FORMATS_ARB = 0x86A2 + COMPRESSED_TEXTURE_FORMATS_ARB = 0x86A3 + +############################################################################### + +# NVIDIA: 0x84F0-0x855F + +# NV_future_use: 0x84F0-0x84F1 + +NV_fence enum: + ALL_COMPLETED_NV = 0x84F2 + FENCE_STATUS_NV = 0x84F3 + FENCE_CONDITION_NV = 0x84F4 + +VERSION_3_1 enum: + TEXTURE_RECTANGLE = 0x84F5 + TEXTURE_BINDING_RECTANGLE = 0x84F6 + PROXY_TEXTURE_RECTANGLE = 0x84F7 + MAX_RECTANGLE_TEXTURE_SIZE = 0x84F8 + +ARB_texture_rectangle enum: + TEXTURE_RECTANGLE_ARB = 0x84F5 + TEXTURE_BINDING_RECTANGLE_ARB = 0x84F6 + PROXY_TEXTURE_RECTANGLE_ARB = 0x84F7 + MAX_RECTANGLE_TEXTURE_SIZE_ARB = 0x84F8 + +NV_texture_rectangle enum: + TEXTURE_RECTANGLE_NV = 0x84F5 + TEXTURE_BINDING_RECTANGLE_NV = 0x84F6 + PROXY_TEXTURE_RECTANGLE_NV = 0x84F7 + MAX_RECTANGLE_TEXTURE_SIZE_NV = 0x84F8 + +VERSION_3_0 enum: + use ARB_framebuffer_object DEPTH_STENCIL + use ARB_framebuffer_object UNSIGNED_INT_24_8 + +ARB_framebuffer_object enum: (note: no ARB suffixes) + DEPTH_STENCIL = 0x84F9 # VERSION_3_0 / ARB_fbo + UNSIGNED_INT_24_8 = 0x84FA # VERSION_3_0 / ARB_fbo + +EXT_packed_depth_stencil enum: + DEPTH_STENCIL_EXT = 0x84F9 + UNSIGNED_INT_24_8_EXT = 0x84FA + +NV_packed_depth_stencil enum: + DEPTH_STENCIL_NV = 0x84F9 + UNSIGNED_INT_24_8_NV = 0x84FA + +# Aliases EXT_packed_depth_stencil enums above +OES_packed_depth_stencil enum: (OpenGL ES only) + DEPTH_STENCIL_OES = 0x84F9 + UNSIGNED_INT_24_8_OES = 0x84FA + +# NV_future_use: 0x84FB-0x84FC + +VERSION_1_4 enum: (Promoted for OpenGL 1.4) + MAX_TEXTURE_LOD_BIAS = 0x84FD + +EXT_texture_lod_bias enum: + MAX_TEXTURE_LOD_BIAS_EXT = 0x84FD + +EXT_texture_filter_anisotropic enum: + TEXTURE_MAX_ANISOTROPY_EXT = 0x84FE + MAX_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FF + +VERSION_1_4 enum: (Promoted for OpenGL 1.4) + TEXTURE_FILTER_CONTROL = 0x8500 + TEXTURE_LOD_BIAS = 0x8501 + +EXT_texture_lod_bias enum: + TEXTURE_FILTER_CONTROL_EXT = 0x8500 + TEXTURE_LOD_BIAS_EXT = 0x8501 + +EXT_vertex_weighting enum: + MODELVIEW1_STACK_DEPTH_EXT = 0x8502 + +# NV_texture_env_combine4 (additional; see below): 0x8503 + +NV_light_max_exponent enum: + MAX_SHININESS_NV = 0x8504 + MAX_SPOT_EXPONENT_NV = 0x8505 + +EXT_vertex_weighting enum: + MODELVIEW_MATRIX1_EXT = 0x8506 + +VERSION_1_4 enum: (Promoted for OpenGL 1.4) + INCR_WRAP = 0x8507 + DECR_WRAP = 0x8508 + +EXT_stencil_wrap enum: + INCR_WRAP_EXT = 0x8507 + DECR_WRAP_EXT = 0x8508 + +# Aliases EXT_stencil_wrap enums above +OES_stencil_wrap enum: (OpenGL ES only) + INCR_WRAP_OES = 0x8507 + DECR_WRAP_OES = 0x8508 + +EXT_vertex_weighting enum: + VERTEX_WEIGHTING_EXT = 0x8509 + MODELVIEW1_EXT = 0x850A + CURRENT_VERTEX_WEIGHT_EXT = 0x850B + VERTEX_WEIGHT_ARRAY_EXT = 0x850C + VERTEX_WEIGHT_ARRAY_SIZE_EXT = 0x850D + VERTEX_WEIGHT_ARRAY_TYPE_EXT = 0x850E + VERTEX_WEIGHT_ARRAY_STRIDE_EXT = 0x850F + VERTEX_WEIGHT_ARRAY_POINTER_EXT = 0x8510 + +VERSION_1_3 enum: (Promoted for OpenGL 1.3) + NORMAL_MAP = 0x8511 + REFLECTION_MAP = 0x8512 + TEXTURE_CUBE_MAP = 0x8513 + TEXTURE_BINDING_CUBE_MAP = 0x8514 + TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515 + TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516 + TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517 + TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518 + TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519 + TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A + PROXY_TEXTURE_CUBE_MAP = 0x851B + MAX_CUBE_MAP_TEXTURE_SIZE = 0x851C + +EXT_texture_cube_map enum: + NORMAL_MAP_EXT = 0x8511 + REFLECTION_MAP_EXT = 0x8512 + TEXTURE_CUBE_MAP_EXT = 0x8513 + TEXTURE_BINDING_CUBE_MAP_EXT = 0x8514 + TEXTURE_CUBE_MAP_POSITIVE_X_EXT = 0x8515 + TEXTURE_CUBE_MAP_NEGATIVE_X_EXT = 0x8516 + TEXTURE_CUBE_MAP_POSITIVE_Y_EXT = 0x8517 + TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT = 0x8518 + TEXTURE_CUBE_MAP_POSITIVE_Z_EXT = 0x8519 + TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT = 0x851A + PROXY_TEXTURE_CUBE_MAP_EXT = 0x851B + MAX_CUBE_MAP_TEXTURE_SIZE_EXT = 0x851C + +NV_texgen_reflection enum: + NORMAL_MAP = 0x8511 + REFLECTION_MAP = 0x8512 + +ARB_texture_cube_map enum: + NORMAL_MAP_ARB = 0x8511 + REFLECTION_MAP_ARB = 0x8512 + TEXTURE_CUBE_MAP_ARB = 0x8513 + TEXTURE_BINDING_CUBE_MAP_ARB = 0x8514 + TEXTURE_CUBE_MAP_POSITIVE_X_ARB = 0x8515 + TEXTURE_CUBE_MAP_NEGATIVE_X_ARB = 0x8516 + TEXTURE_CUBE_MAP_POSITIVE_Y_ARB = 0x8517 + TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB = 0x8518 + TEXTURE_CUBE_MAP_POSITIVE_Z_ARB = 0x8519 + TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB = 0x851A + PROXY_TEXTURE_CUBE_MAP_ARB = 0x851B + MAX_CUBE_MAP_TEXTURE_SIZE_ARB = 0x851C + +# Aliases ARB_texture_cube_map enums above +OES_texture_cube_map enum: (OpenGL ES only; additional; see below) + NORMAL_MAP_OES = 0x8511 + REFLECTION_MAP_OES = 0x8512 + TEXTURE_CUBE_MAP_OES = 0x8513 + TEXTURE_BINDING_CUBE_MAP_OES = 0x8514 + TEXTURE_CUBE_MAP_POSITIVE_X_OES = 0x8515 + TEXTURE_CUBE_MAP_NEGATIVE_X_OES = 0x8516 + TEXTURE_CUBE_MAP_POSITIVE_Y_OES = 0x8517 + TEXTURE_CUBE_MAP_NEGATIVE_Y_OES = 0x8518 + TEXTURE_CUBE_MAP_POSITIVE_Z_OES = 0x8519 + TEXTURE_CUBE_MAP_NEGATIVE_Z_OES = 0x851A + MAX_CUBE_MAP_TEXTURE_SIZE_OES = 0x851C + +NV_vertex_array_range enum: + VERTEX_ARRAY_RANGE_NV = 0x851D + VERTEX_ARRAY_RANGE_LENGTH_NV = 0x851E + VERTEX_ARRAY_RANGE_VALID_NV = 0x851F + MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV = 0x8520 + VERTEX_ARRAY_RANGE_POINTER_NV = 0x8521 + +# @@@ How does this interact with NV_vertex_array_range? +APPLE_vertex_array_range enum: + VERTEX_ARRAY_RANGE_APPLE = 0x851D + VERTEX_ARRAY_RANGE_LENGTH_APPLE = 0x851E + VERTEX_ARRAY_STORAGE_HINT_APPLE = 0x851F + VERTEX_ARRAY_RANGE_POINTER_APPLE = 0x8521 + STORAGE_CACHED_APPLE = 0x85BE + STORAGE_SHARED_APPLE = 0x85BF + +NV_register_combiners enum: + REGISTER_COMBINERS_NV = 0x8522 + VARIABLE_A_NV = 0x8523 + VARIABLE_B_NV = 0x8524 + VARIABLE_C_NV = 0x8525 + VARIABLE_D_NV = 0x8526 + VARIABLE_E_NV = 0x8527 + VARIABLE_F_NV = 0x8528 + VARIABLE_G_NV = 0x8529 + CONSTANT_COLOR0_NV = 0x852A + CONSTANT_COLOR1_NV = 0x852B + PRIMARY_COLOR_NV = 0x852C + SECONDARY_COLOR_NV = 0x852D + SPARE0_NV = 0x852E + SPARE1_NV = 0x852F + DISCARD_NV = 0x8530 + E_TIMES_F_NV = 0x8531 + SPARE0_PLUS_SECONDARY_COLOR_NV = 0x8532 + +# NV_vertex_array_range2: + VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV = 0x8533 + +# NV_multisample_filter_hint: + MULTISAMPLE_FILTER_HINT_NV = 0x8534 + +NV_register_combiners2 enum: + PER_STAGE_CONSTANTS_NV = 0x8535 + +NV_register_combiners enum: (additional; see above): + UNSIGNED_IDENTITY_NV = 0x8536 + UNSIGNED_INVERT_NV = 0x8537 + EXPAND_NORMAL_NV = 0x8538 + EXPAND_NEGATE_NV = 0x8539 + HALF_BIAS_NORMAL_NV = 0x853A + HALF_BIAS_NEGATE_NV = 0x853B + SIGNED_IDENTITY_NV = 0x853C + UNSIGNED_NEGATE_NV = 0x853D + SCALE_BY_TWO_NV = 0x853E + SCALE_BY_FOUR_NV = 0x853F + SCALE_BY_ONE_HALF_NV = 0x8540 + BIAS_BY_NEGATIVE_ONE_HALF_NV = 0x8541 + COMBINER_INPUT_NV = 0x8542 + COMBINER_MAPPING_NV = 0x8543 + COMBINER_COMPONENT_USAGE_NV = 0x8544 + COMBINER_AB_DOT_PRODUCT_NV = 0x8545 + COMBINER_CD_DOT_PRODUCT_NV = 0x8546 + COMBINER_MUX_SUM_NV = 0x8547 + COMBINER_SCALE_NV = 0x8548 + COMBINER_BIAS_NV = 0x8549 + COMBINER_AB_OUTPUT_NV = 0x854A + COMBINER_CD_OUTPUT_NV = 0x854B + COMBINER_SUM_OUTPUT_NV = 0x854C + MAX_GENERAL_COMBINERS_NV = 0x854D + NUM_GENERAL_COMBINERS_NV = 0x854E + COLOR_SUM_CLAMP_NV = 0x854F + COMBINER0_NV = 0x8550 + COMBINER1_NV = 0x8551 + COMBINER2_NV = 0x8552 + COMBINER3_NV = 0x8553 + COMBINER4_NV = 0x8554 + COMBINER5_NV = 0x8555 + COMBINER6_NV = 0x8556 + COMBINER7_NV = 0x8557 + + +NV_primitive_restart enum: + PRIMITIVE_RESTART_NV = 0x8558 + PRIMITIVE_RESTART_INDEX_NV = 0x8559 + +NV_fog_distance enum: + FOG_GEN_MODE_NV = 0x855A + EYE_RADIAL_NV = 0x855B + EYE_PLANE_ABSOLUTE_NV = 0x855C + +NV_texgen_emboss enum: + EMBOSS_LIGHT_NV = 0x855D + EMBOSS_CONSTANT_NV = 0x855E + EMBOSS_MAP_NV = 0x855F + +############################################################################### + +# Intergraph/Intense3D/3Dlabs: 0x8560-0x856F + +INGR_color_clamp enum: + RED_MIN_CLAMP_INGR = 0x8560 + GREEN_MIN_CLAMP_INGR = 0x8561 + BLUE_MIN_CLAMP_INGR = 0x8562 + ALPHA_MIN_CLAMP_INGR = 0x8563 + RED_MAX_CLAMP_INGR = 0x8564 + GREEN_MAX_CLAMP_INGR = 0x8565 + BLUE_MAX_CLAMP_INGR = 0x8566 + ALPHA_MAX_CLAMP_INGR = 0x8567 + +INGR_interlace_read enum: + INTERLACE_READ_INGR = 0x8568 + +# 3Dlabs_future_use: 0x8569-0x856F + +############################################################################### + +# ATI/NVIDIA: 0x8570-0x859F + +VERSION_1_5 enum: (Consistent naming scheme for OpenGL 1.5) + SRC0_RGB = 0x8580 # alias GL_SOURCE0_RGB + SRC1_RGB = 0x8581 # alias GL_SOURCE1_RGB + SRC2_RGB = 0x8582 # alias GL_SOURCE2_RGB + SRC0_ALPHA = 0x8588 # alias GL_SOURCE0_ALPHA + SRC1_ALPHA = 0x8589 # alias GL_SOURCE1_ALPHA + SRC2_ALPHA = 0x858A # alias GL_SOURCE2_ALPHA + +VERSION_1_3 enum: (Promoted for OpenGL 1.3) + COMBINE = 0x8570 + COMBINE_RGB = 0x8571 + COMBINE_ALPHA = 0x8572 + RGB_SCALE = 0x8573 + ADD_SIGNED = 0x8574 + INTERPOLATE = 0x8575 + CONSTANT = 0x8576 + PRIMARY_COLOR = 0x8577 + PREVIOUS = 0x8578 + SOURCE0_RGB = 0x8580 + SOURCE1_RGB = 0x8581 + SOURCE2_RGB = 0x8582 + SOURCE0_ALPHA = 0x8588 + SOURCE1_ALPHA = 0x8589 + SOURCE2_ALPHA = 0x858A + OPERAND0_RGB = 0x8590 + OPERAND1_RGB = 0x8591 + OPERAND2_RGB = 0x8592 + OPERAND0_ALPHA = 0x8598 + OPERAND1_ALPHA = 0x8599 + OPERAND2_ALPHA = 0x859A + +EXT_texture_env_combine enum: + COMBINE_EXT = 0x8570 + COMBINE_RGB_EXT = 0x8571 + COMBINE_ALPHA_EXT = 0x8572 + RGB_SCALE_EXT = 0x8573 + ADD_SIGNED_EXT = 0x8574 + INTERPOLATE_EXT = 0x8575 + CONSTANT_EXT = 0x8576 + PRIMARY_COLOR_EXT = 0x8577 + PREVIOUS_EXT = 0x8578 + SOURCE0_RGB_EXT = 0x8580 + SOURCE1_RGB_EXT = 0x8581 + SOURCE2_RGB_EXT = 0x8582 + SOURCE0_ALPHA_EXT = 0x8588 + SOURCE1_ALPHA_EXT = 0x8589 + SOURCE2_ALPHA_EXT = 0x858A + OPERAND0_RGB_EXT = 0x8590 + OPERAND1_RGB_EXT = 0x8591 + OPERAND2_RGB_EXT = 0x8592 + OPERAND0_ALPHA_EXT = 0x8598 + OPERAND1_ALPHA_EXT = 0x8599 + OPERAND2_ALPHA_EXT = 0x859A + +NV_texture_env_combine4 enum: + COMBINE4_NV = 0x8503 + SOURCE3_RGB_NV = 0x8583 + SOURCE3_ALPHA_NV = 0x858B + OPERAND3_RGB_NV = 0x8593 + OPERAND3_ALPHA_NV = 0x859B + +# "Future use" => "additional combiner input/output enums" only +# ATI/NVIDIA_future_use: 0x8584-0x8587 +# ATI/NVIDIA_future_use: 0x858C-0x858F +# ATI/NVIDIA_future_use: 0x8594-0x8597 +# ATI/NVIDIA_future_use: 0x859C-0x859F + +############################################################################### + +SGIX_subsample enum: + PACK_SUBSAMPLE_RATE_SGIX = 0x85A0 + UNPACK_SUBSAMPLE_RATE_SGIX = 0x85A1 + PIXEL_SUBSAMPLE_4444_SGIX = 0x85A2 + PIXEL_SUBSAMPLE_2424_SGIX = 0x85A3 + PIXEL_SUBSAMPLE_4242_SGIX = 0x85A4 + +############################################################################### + +# Incomplete extension, not in enumext.spec +# SGIS_color_range: 0x85A5-0x85AD +# EXTENDED_RANGE_SGIS = 0x85A5 +# MIN_RED_SGIS = 0x85A6 +# MAX_RED_SGIS = 0x85A7 +# MIN_GREEN_SGIS = 0x85A8 +# MAX_GREEN_SGIS = 0x85A9 +# MIN_BLUE_SGIS = 0x85AA +# MAX_BLUE_SGIS = 0x85AB +# MIN_ALPHA_SGIS = 0x85AC +# MAX_ALPHA_SGIS = 0x85AD + +############################################################################### + +EXT_texture_perturb_normal enum: + PERTURB_EXT = 0x85AE + TEXTURE_NORMAL_EXT = 0x85AF + +############################################################################### + +# Apple: 0x85B0-0x85BF + +APPLE_specular_vector enum: + LIGHT_MODEL_SPECULAR_VECTOR_APPLE = 0x85B0 + +APPLE_transform_hint enum: + TRANSFORM_HINT_APPLE = 0x85B1 + +APPLE_client_storage enum: + UNPACK_CLIENT_STORAGE_APPLE = 0x85B2 + +# May also be part of APPLE_fence +APPLE_object_purgeable enum: (additional; see below) + BUFFER_OBJECT_APPLE = 0x85B3 + +# APPLE_future_use: 0x85B4 + +## From Jeremy 2006/10/18 (Khronos bug 632) - unknown extension name +# STORAGE_CLIENT_APPLE = 0x85B4 + +VERSION_3_0 enum: + use ARB_vertex_array_object VERTEX_ARRAY_BINDING + +ARB_vertex_array_object enum: (note: no ARB suffixes) + VERTEX_ARRAY_BINDING = 0x85B5 # VERSION_3_0 / ARB_vao + +APPLE_vertex_array_object enum: + VERTEX_ARRAY_BINDING_APPLE = 0x85B5 + +# APPLE_future_use: 0x85B6 +## From Jeremy 2006/10/18 (Khronos bug 632) - unknown extension name +# TEXTURE_MINIMIZE_STORAGE_APPLE = 0x85B6 + +APPLE_texture_range enum: (additional; see below) + TEXTURE_RANGE_LENGTH_APPLE = 0x85B7 + TEXTURE_RANGE_POINTER_APPLE = 0x85B8 + +APPLE_ycbcr_422 enum: + YCBCR_422_APPLE = 0x85B9 + UNSIGNED_SHORT_8_8_APPLE = 0x85BA + UNSIGNED_SHORT_8_8_REV_APPLE = 0x85BB + +MESA_ycbcr_texture enum: (additional; see below) + UNSIGNED_SHORT_8_8_MESA = 0x85BA + UNSIGNED_SHORT_8_8_REV_MESA = 0x85BB + +APPLE_texture_range enum: + TEXTURE_STORAGE_HINT_APPLE = 0x85BC + STORAGE_PRIVATE_APPLE = 0x85BD + +APPLE_vertex_array_range enum: (additional; see above): + STORAGE_CACHED_APPLE = 0x85BE + STORAGE_SHARED_APPLE = 0x85BF + +APPLE_texture_range enum: + use APPLE_vertex_array_range STORAGE_CACHED_APPLE + use APPLE_vertex_array_range STORAGE_SHARED_APPLE + +############################################################################### + +# Sun: 0x85C0-0x85CF + +SUNX_general_triangle_list enum: (additional; see above) + REPLACEMENT_CODE_ARRAY_SUN = 0x85C0 + REPLACEMENT_CODE_ARRAY_TYPE_SUN = 0x85C1 + REPLACEMENT_CODE_ARRAY_STRIDE_SUN = 0x85C2 + REPLACEMENT_CODE_ARRAY_POINTER_SUN = 0x85C3 + R1UI_V3F_SUN = 0x85C4 + R1UI_C4UB_V3F_SUN = 0x85C5 + R1UI_C3F_V3F_SUN = 0x85C6 + R1UI_N3F_V3F_SUN = 0x85C7 + R1UI_C4F_N3F_V3F_SUN = 0x85C8 + R1UI_T2F_V3F_SUN = 0x85C9 + R1UI_T2F_N3F_V3F_SUN = 0x85CA + R1UI_T2F_C4F_N3F_V3F_SUN = 0x85CB + +SUN_slice_accum enum: + SLICE_ACCUM_SUN = 0x85CC + +# SUN_future_use: 0x85CD-0x85CF + +############################################################################### + +# Unknown extension name, not in enumext.spec +# 3Dlabs/Autodesk: 0x85D0-0x85DF +# FACET_NORMAL_AUTODESK = 0x85D0 +# FACET_NORMAL_ARRAY_AUTODESK = 0x85D1 + +############################################################################### + +# Incomplete extension, not in enumext.spec +# SGIX_texture_range: 0x85E0-0x85FB +# RGB_SIGNED_SGIX = 0x85E0 +# RGBA_SIGNED_SGIX = 0x85E1 +# ALPHA_SIGNED_SGIX = 0x85E2 +# LUMINANCE_SIGNED_SGIX = 0x85E3 +# INTENSITY_SIGNED_SGIX = 0x85E4 +# LUMINANCE_ALPHA_SIGNED_SGIX = 0x85E5 +# RGB16_SIGNED_SGIX = 0x85E6 +# RGBA16_SIGNED_SGIX = 0x85E7 +# ALPHA16_SIGNED_SGIX = 0x85E8 +# LUMINANCE16_SIGNED_SGIX = 0x85E9 +# INTENSITY16_SIGNED_SGIX = 0x85EA +# LUMINANCE16_ALPHA16_SIGNED_SGIX = 0x85EB +# RGB_EXTENDED_RANGE_SGIX = 0x85EC +# RGBA_EXTENDED_RANGE_SGIX = 0x85ED +# ALPHA_EXTENDED_RANGE_SGIX = 0x85EE +# LUMINANCE_EXTENDED_RANGE_SGIX = 0x85EF +# INTENSITY_EXTENDED_RANGE_SGIX = 0x85F0 +# LUMINANCE_ALPHA_EXTENDED_RANGE_SGIX = 0x85F1 +# RGB16_EXTENDED_RANGE_SGIX = 0x85F2 +# RGBA16_EXTENDED_RANGE_SGIX = 0x85F3 +# ALPHA16_EXTENDED_RANGE_SGIX = 0x85F4 +# LUMINANCE16_EXTENDED_RANGE_SGIX = 0x85F5 +# INTENSITY16_EXTENDED_RANGE_SGIX = 0x85F6 +# LUMINANCE16_ALPHA16_EXTENDED_RANGE_SGIX = 0x85F7 +# MIN_LUMINANCE_SGIS = 0x85F8 +# MAX_LUMINANCE_SGIS = 0x85F9 +# MIN_INTENSITY_SGIS = 0x85FA +# MAX_INTENSITY_SGIS = 0x85FB + +############################################################################### + +# SGI_future_use: 0x85FC-0x85FF + +############################################################################### + +# Sun: 0x8600-0x861F + +# SUN_future_use: 0x8600-0x8613 + +SUN_mesh_array enum: 0x8614-0x8615 + QUAD_MESH_SUN = 0x8614 + TRIANGLE_MESH_SUN = 0x8615 + +# SUN_future_use: 0x8614-0x861F + +############################################################################### + +# NVIDIA: 0x8620-0x867F + +NV_vertex_program enum: + VERTEX_PROGRAM_NV = 0x8620 + VERTEX_STATE_PROGRAM_NV = 0x8621 + ATTRIB_ARRAY_SIZE_NV = 0x8623 + ATTRIB_ARRAY_STRIDE_NV = 0x8624 + ATTRIB_ARRAY_TYPE_NV = 0x8625 + CURRENT_ATTRIB_NV = 0x8626 + PROGRAM_LENGTH_NV = 0x8627 + PROGRAM_STRING_NV = 0x8628 + MODELVIEW_PROJECTION_NV = 0x8629 + IDENTITY_NV = 0x862A + INVERSE_NV = 0x862B + TRANSPOSE_NV = 0x862C + INVERSE_TRANSPOSE_NV = 0x862D + MAX_TRACK_MATRIX_STACK_DEPTH_NV = 0x862E + MAX_TRACK_MATRICES_NV = 0x862F + MATRIX0_NV = 0x8630 + MATRIX1_NV = 0x8631 + MATRIX2_NV = 0x8632 + MATRIX3_NV = 0x8633 + MATRIX4_NV = 0x8634 + MATRIX5_NV = 0x8635 + MATRIX6_NV = 0x8636 + MATRIX7_NV = 0x8637 +################## +# +# Reserved: +# +# MATRIX8_NV = 0x8638 +# MATRIX9_NV = 0x8639 +# MATRIX10_NV = 0x863A +# MATRIX11_NV = 0x863B +# MATRIX12_NV = 0x863C +# MATRIX13_NV = 0x863D +# MATRIX14_NV = 0x863E +# MATRIX15_NV = 0x863F +# +################### + CURRENT_MATRIX_STACK_DEPTH_NV = 0x8640 + CURRENT_MATRIX_NV = 0x8641 + VERTEX_PROGRAM_POINT_SIZE_NV = 0x8642 + VERTEX_PROGRAM_TWO_SIDE_NV = 0x8643 + PROGRAM_PARAMETER_NV = 0x8644 + ATTRIB_ARRAY_POINTER_NV = 0x8645 + PROGRAM_TARGET_NV = 0x8646 + PROGRAM_RESIDENT_NV = 0x8647 + TRACK_MATRIX_NV = 0x8648 + TRACK_MATRIX_TRANSFORM_NV = 0x8649 + VERTEX_PROGRAM_BINDING_NV = 0x864A + PROGRAM_ERROR_POSITION_NV = 0x864B + VERTEX_ATTRIB_ARRAY0_NV = 0x8650 + VERTEX_ATTRIB_ARRAY1_NV = 0x8651 + VERTEX_ATTRIB_ARRAY2_NV = 0x8652 + VERTEX_ATTRIB_ARRAY3_NV = 0x8653 + VERTEX_ATTRIB_ARRAY4_NV = 0x8654 + VERTEX_ATTRIB_ARRAY5_NV = 0x8655 + VERTEX_ATTRIB_ARRAY6_NV = 0x8656 + VERTEX_ATTRIB_ARRAY7_NV = 0x8657 + VERTEX_ATTRIB_ARRAY8_NV = 0x8658 + VERTEX_ATTRIB_ARRAY9_NV = 0x8659 + VERTEX_ATTRIB_ARRAY10_NV = 0x865A + VERTEX_ATTRIB_ARRAY11_NV = 0x865B + VERTEX_ATTRIB_ARRAY12_NV = 0x865C + VERTEX_ATTRIB_ARRAY13_NV = 0x865D + VERTEX_ATTRIB_ARRAY14_NV = 0x865E + VERTEX_ATTRIB_ARRAY15_NV = 0x865F + MAP1_VERTEX_ATTRIB0_4_NV = 0x8660 + MAP1_VERTEX_ATTRIB1_4_NV = 0x8661 + MAP1_VERTEX_ATTRIB2_4_NV = 0x8662 + MAP1_VERTEX_ATTRIB3_4_NV = 0x8663 + MAP1_VERTEX_ATTRIB4_4_NV = 0x8664 + MAP1_VERTEX_ATTRIB5_4_NV = 0x8665 + MAP1_VERTEX_ATTRIB6_4_NV = 0x8666 + MAP1_VERTEX_ATTRIB7_4_NV = 0x8667 + MAP1_VERTEX_ATTRIB8_4_NV = 0x8668 + MAP1_VERTEX_ATTRIB9_4_NV = 0x8669 + MAP1_VERTEX_ATTRIB10_4_NV = 0x866A + MAP1_VERTEX_ATTRIB11_4_NV = 0x866B + MAP1_VERTEX_ATTRIB12_4_NV = 0x866C + MAP1_VERTEX_ATTRIB13_4_NV = 0x866D + MAP1_VERTEX_ATTRIB14_4_NV = 0x866E + MAP1_VERTEX_ATTRIB15_4_NV = 0x866F + MAP2_VERTEX_ATTRIB0_4_NV = 0x8670 + MAP2_VERTEX_ATTRIB1_4_NV = 0x8671 + MAP2_VERTEX_ATTRIB2_4_NV = 0x8672 + MAP2_VERTEX_ATTRIB3_4_NV = 0x8673 + MAP2_VERTEX_ATTRIB4_4_NV = 0x8674 + MAP2_VERTEX_ATTRIB5_4_NV = 0x8675 + MAP2_VERTEX_ATTRIB6_4_NV = 0x8676 + MAP2_VERTEX_ATTRIB7_4_NV = 0x8677 + MAP2_VERTEX_ATTRIB8_4_NV = 0x8678 + MAP2_VERTEX_ATTRIB9_4_NV = 0x8679 + MAP2_VERTEX_ATTRIB10_4_NV = 0x867A + MAP2_VERTEX_ATTRIB11_4_NV = 0x867B + MAP2_VERTEX_ATTRIB12_4_NV = 0x867C + MAP2_VERTEX_ATTRIB13_4_NV = 0x867D + MAP2_VERTEX_ATTRIB14_4_NV = 0x867E + MAP2_VERTEX_ATTRIB15_4_NV = 0x867F + +# NV_texture_shader (additional; see below): 0x864C-0x864E + +VERSION_3_2 enum: + PROGRAM_POINT_SIZE = 0x8642 + +ARB_geometry_shader4 enum: (additional; see below) + PROGRAM_POINT_SIZE_ARB = 0x8642 + +NV_geometry_program4 enum: (additional; see below) + PROGRAM_POINT_SIZE_EXT = 0x8642 + +VERSION_3_2 enum: + use ARB_depth_clamp DEPTH_CLAMP + +ARB_depth_clamp enum: + DEPTH_CLAMP = 0x864F + +NV_depth_clamp enum: + DEPTH_CLAMP_NV = 0x864F + +VERSION_2_0 enum: (Promoted from ARB_vertex_shader; only some values) + VERTEX_ATTRIB_ARRAY_ENABLED = 0x8622 # VERSION_2_0 + VERTEX_ATTRIB_ARRAY_SIZE = 0x8623 # VERSION_2_0 + VERTEX_ATTRIB_ARRAY_STRIDE = 0x8624 # VERSION_2_0 + VERTEX_ATTRIB_ARRAY_TYPE = 0x8625 # VERSION_2_0 + CURRENT_VERTEX_ATTRIB = 0x8626 # VERSION_2_0 + VERTEX_PROGRAM_POINT_SIZE = 0x8642 # VERSION_2_0 + VERTEX_PROGRAM_TWO_SIDE = 0x8643 # VERSION_2_0 + VERTEX_ATTRIB_ARRAY_POINTER = 0x8645 # VERSION_2_0 + +ARB_vertex_program enum: (additional; see above; reuses NV_vertex_program values) +ARB_fragment_program enum: (additional; only some values; see below) +# (Unfortunately, PROGRAM_BINDING_ARB does accidentally reuse 0x8677) + VERTEX_PROGRAM_ARB = 0x8620 + VERTEX_ATTRIB_ARRAY_ENABLED_ARB = 0x8622 + VERTEX_ATTRIB_ARRAY_SIZE_ARB = 0x8623 + VERTEX_ATTRIB_ARRAY_STRIDE_ARB = 0x8624 + VERTEX_ATTRIB_ARRAY_TYPE_ARB = 0x8625 + CURRENT_VERTEX_ATTRIB_ARB = 0x8626 + PROGRAM_LENGTH_ARB = 0x8627 # ARB_fragment_program + PROGRAM_STRING_ARB = 0x8628 # ARB_fragment_program + MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB = 0x862E # ARB_fragment_program + MAX_PROGRAM_MATRICES_ARB = 0x862F # ARB_fragment_program + CURRENT_MATRIX_STACK_DEPTH_ARB = 0x8640 # ARB_fragment_program + CURRENT_MATRIX_ARB = 0x8641 # ARB_fragment_program + VERTEX_PROGRAM_POINT_SIZE_ARB = 0x8642 + VERTEX_PROGRAM_TWO_SIDE_ARB = 0x8643 + VERTEX_ATTRIB_ARRAY_POINTER_ARB = 0x8645 + PROGRAM_ERROR_POSITION_ARB = 0x864B # ARB_fragment_program + PROGRAM_BINDING_ARB = 0x8677 # ARB_fragment_program + +############################################################################### + +# Pixelfusion: 0x8680-0x869F + +############################################################################### + +# OpenGL ARB: 0x86A0-0x86AF + +# ARB_texture_compression/1.3 (additional; see above): 0x86A0-0x86A3 + +ARB_vertex_blend enum: + MAX_VERTEX_UNITS_ARB = 0x86A4 + ACTIVE_VERTEX_UNITS_ARB = 0x86A5 + WEIGHT_SUM_UNITY_ARB = 0x86A6 + VERTEX_BLEND_ARB = 0x86A7 + CURRENT_WEIGHT_ARB = 0x86A8 + WEIGHT_ARRAY_TYPE_ARB = 0x86A9 + WEIGHT_ARRAY_STRIDE_ARB = 0x86AA + WEIGHT_ARRAY_SIZE_ARB = 0x86AB + WEIGHT_ARRAY_POINTER_ARB = 0x86AC + WEIGHT_ARRAY_ARB = 0x86AD +# Note: MODELVIEW0/1 are defined in other extensions, but not as ARB) + MODELVIEW0_ARB = 0x1700 + MODELVIEW1_ARB = 0x850A + MODELVIEW2_ARB = 0x8722 + MODELVIEW3_ARB = 0x8723 + MODELVIEW4_ARB = 0x8724 + MODELVIEW5_ARB = 0x8725 + MODELVIEW6_ARB = 0x8726 + MODELVIEW7_ARB = 0x8727 + MODELVIEW8_ARB = 0x8728 + MODELVIEW9_ARB = 0x8729 + MODELVIEW10_ARB = 0x872A + MODELVIEW11_ARB = 0x872B + MODELVIEW12_ARB = 0x872C + MODELVIEW13_ARB = 0x872D + MODELVIEW14_ARB = 0x872E + MODELVIEW15_ARB = 0x872F + MODELVIEW16_ARB = 0x8730 + MODELVIEW17_ARB = 0x8731 + MODELVIEW18_ARB = 0x8732 + MODELVIEW19_ARB = 0x8733 + MODELVIEW20_ARB = 0x8734 + MODELVIEW21_ARB = 0x8735 + MODELVIEW22_ARB = 0x8736 + MODELVIEW23_ARB = 0x8737 + MODELVIEW24_ARB = 0x8738 + MODELVIEW25_ARB = 0x8739 + MODELVIEW26_ARB = 0x873A + MODELVIEW27_ARB = 0x873B + MODELVIEW28_ARB = 0x873C + MODELVIEW29_ARB = 0x873D + MODELVIEW30_ARB = 0x873E + MODELVIEW31_ARB = 0x873F + +# Aliases ARB_vertex_blend enums above +OES_matrix_palette enum: (OpenGL ES only; additional; see below) + MAX_VERTEX_UNITS_OES = 0x86A4 + WEIGHT_ARRAY_OES = 0x86AD + WEIGHT_ARRAY_TYPE_OES = 0x86A9 + WEIGHT_ARRAY_STRIDE_OES = 0x86AA + WEIGHT_ARRAY_SIZE_OES = 0x86AB + WEIGHT_ARRAY_POINTER_OES = 0x86AC + +VERSION_1_3 enum: (Promoted for OpenGL 1.3) + DOT3_RGB = 0x86AE + DOT3_RGBA = 0x86AF + +ARB_texture_env_dot3 enum: + DOT3_RGB_ARB = 0x86AE + DOT3_RGBA_ARB = 0x86AF + +IMG_texture_env_enhanced_fixed_function enum: (OpenGL ES only; additional; see below) + DOT3_RGBA_IMG = 0x86AF + +############################################################################### + +# 3Dfx: 0x86B0-0x86BF + +3DFX_texture_compression_FXT1 enum: + COMPRESSED_RGB_FXT1_3DFX = 0x86B0 + COMPRESSED_RGBA_FXT1_3DFX = 0x86B1 + +3DFX_multisample enum: + MULTISAMPLE_3DFX = 0x86B2 + SAMPLE_BUFFERS_3DFX = 0x86B3 + SAMPLES_3DFX = 0x86B4 + MULTISAMPLE_BIT_3DFX = 0x20000000 + +# 3DFX_future_use: 0x86B5-0x86BF + +############################################################################### + +# NVIDIA: 0x86C0-0x871F + +NV_evaluators enum: + EVAL_2D_NV = 0x86C0 + EVAL_TRIANGULAR_2D_NV = 0x86C1 + MAP_TESSELLATION_NV = 0x86C2 + MAP_ATTRIB_U_ORDER_NV = 0x86C3 + MAP_ATTRIB_V_ORDER_NV = 0x86C4 + EVAL_FRACTIONAL_TESSELLATION_NV = 0x86C5 + EVAL_VERTEX_ATRRIB0_NV = 0x86C6 + EVAL_VERTEX_ATRRIB1_NV = 0x86C7 + EVAL_VERTEX_ATRRIB2_NV = 0x86C8 + EVAL_VERTEX_ATRRIB3_NV = 0x86C9 + EVAL_VERTEX_ATRRIB4_NV = 0x86CA + EVAL_VERTEX_ATRRIB5_NV = 0x86CB + EVAL_VERTEX_ATRRIB6_NV = 0x86CC + EVAL_VERTEX_ATRRIB7_NV = 0x86CD + EVAL_VERTEX_ATRRIB8_NV = 0x86CE + EVAL_VERTEX_ATRRIB9_NV = 0x86CF + EVAL_VERTEX_ATRRIB10_NV = 0x86D0 + EVAL_VERTEX_ATRRIB11_NV = 0x86D1 + EVAL_VERTEX_ATRRIB12_NV = 0x86D2 + EVAL_VERTEX_ATRRIB13_NV = 0x86D3 + EVAL_VERTEX_ATRRIB14_NV = 0x86D4 + EVAL_VERTEX_ATRRIB15_NV = 0x86D5 + MAX_MAP_TESSELLATION_NV = 0x86D6 + MAX_RATIONAL_EVAL_ORDER_NV = 0x86D7 + +# NV_future_use: 0x86D8 + +NV_texture_shader enum: + OFFSET_TEXTURE_RECTANGLE_NV = 0x864C + OFFSET_TEXTURE_RECTANGLE_SCALE_NV = 0x864D + DOT_PRODUCT_TEXTURE_RECTANGLE_NV = 0x864E + RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV = 0x86D9 + UNSIGNED_INT_S8_S8_8_8_NV = 0x86DA + UNSIGNED_INT_8_8_S8_S8_REV_NV = 0x86DB + DSDT_MAG_INTENSITY_NV = 0x86DC + SHADER_CONSISTENT_NV = 0x86DD + TEXTURE_SHADER_NV = 0x86DE + SHADER_OPERATION_NV = 0x86DF + CULL_MODES_NV = 0x86E0 + OFFSET_TEXTURE_MATRIX_NV = 0x86E1 + OFFSET_TEXTURE_SCALE_NV = 0x86E2 + OFFSET_TEXTURE_BIAS_NV = 0x86E3 + OFFSET_TEXTURE_2D_MATRIX_NV = GL_OFFSET_TEXTURE_MATRIX_NV + OFFSET_TEXTURE_2D_SCALE_NV = GL_OFFSET_TEXTURE_SCALE_NV + OFFSET_TEXTURE_2D_BIAS_NV = GL_OFFSET_TEXTURE_BIAS_NV + PREVIOUS_TEXTURE_INPUT_NV = 0x86E4 + CONST_EYE_NV = 0x86E5 + PASS_THROUGH_NV = 0x86E6 + CULL_FRAGMENT_NV = 0x86E7 + OFFSET_TEXTURE_2D_NV = 0x86E8 + DEPENDENT_AR_TEXTURE_2D_NV = 0x86E9 + DEPENDENT_GB_TEXTURE_2D_NV = 0x86EA + DOT_PRODUCT_NV = 0x86EC + DOT_PRODUCT_DEPTH_REPLACE_NV = 0x86ED + DOT_PRODUCT_TEXTURE_2D_NV = 0x86EE + DOT_PRODUCT_TEXTURE_CUBE_MAP_NV = 0x86F0 + DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV = 0x86F1 + DOT_PRODUCT_REFLECT_CUBE_MAP_NV = 0x86F2 + DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV = 0x86F3 + HILO_NV = 0x86F4 + DSDT_NV = 0x86F5 + DSDT_MAG_NV = 0x86F6 + DSDT_MAG_VIB_NV = 0x86F7 + HILO16_NV = 0x86F8 + SIGNED_HILO_NV = 0x86F9 + SIGNED_HILO16_NV = 0x86FA + SIGNED_RGBA_NV = 0x86FB + SIGNED_RGBA8_NV = 0x86FC + SIGNED_RGB_NV = 0x86FE + SIGNED_RGB8_NV = 0x86FF + SIGNED_LUMINANCE_NV = 0x8701 + SIGNED_LUMINANCE8_NV = 0x8702 + SIGNED_LUMINANCE_ALPHA_NV = 0x8703 + SIGNED_LUMINANCE8_ALPHA8_NV = 0x8704 + SIGNED_ALPHA_NV = 0x8705 + SIGNED_ALPHA8_NV = 0x8706 + SIGNED_INTENSITY_NV = 0x8707 + SIGNED_INTENSITY8_NV = 0x8708 + DSDT8_NV = 0x8709 + DSDT8_MAG8_NV = 0x870A + DSDT8_MAG8_INTENSITY8_NV = 0x870B + SIGNED_RGB_UNSIGNED_ALPHA_NV = 0x870C + SIGNED_RGB8_UNSIGNED_ALPHA8_NV = 0x870D + HI_SCALE_NV = 0x870E + LO_SCALE_NV = 0x870F + DS_SCALE_NV = 0x8710 + DT_SCALE_NV = 0x8711 + MAGNITUDE_SCALE_NV = 0x8712 + VIBRANCE_SCALE_NV = 0x8713 + HI_BIAS_NV = 0x8714 + LO_BIAS_NV = 0x8715 + DS_BIAS_NV = 0x8716 + DT_BIAS_NV = 0x8717 + MAGNITUDE_BIAS_NV = 0x8718 + VIBRANCE_BIAS_NV = 0x8719 + TEXTURE_BORDER_VALUES_NV = 0x871A + TEXTURE_HI_SIZE_NV = 0x871B + TEXTURE_LO_SIZE_NV = 0x871C + TEXTURE_DS_SIZE_NV = 0x871D + TEXTURE_DT_SIZE_NV = 0x871E + TEXTURE_MAG_SIZE_NV = 0x871F + +NV_texture_shader2 enum: + DOT_PRODUCT_TEXTURE_3D_NV = 0x86EF + +# NV_future_use: 0x86EB +# NV_future_use: 0x86FD +# NV_future_use: 0x8700 + +############################################################################### + +# OpenGL ARB: 0x8720-0x873F + +# ARB_vertex_blend (additional; see above): 0x8720-0x873F + +############################################################################### + +# ATI: 0x8740-0x874F + +EXT_texture_env_dot3 enum: + DOT3_RGB_EXT = 0x8740 + DOT3_RGBA_EXT = 0x8741 + +# There's a collision between AMD_program_binary_Z400 and EXT_texture_env_dot3! +AMD_program_binary_Z400 enum: (OpenGL ES only) + Z400_BINARY_AMD = 0x8740 + +# There's a collision between OES_get_program_binary and EXT_texture_env_dot3! +OES_get_program_binary enum: (OpenGL ES only; additional; see below) + PROGRAM_BINARY_LENGTH_OES = 0x8741 + +ATI_texture_mirror_once enum: + MIRROR_CLAMP_ATI = 0x8742 + MIRROR_CLAMP_TO_EDGE_ATI = 0x8743 + +EXT_texture_mirror_clamp enum: + MIRROR_CLAMP_EXT = 0x8742 + MIRROR_CLAMP_TO_EDGE_EXT = 0x8743 + +ATI_texture_env_combine3 enum: + MODULATE_ADD_ATI = 0x8744 + MODULATE_SIGNED_ADD_ATI = 0x8745 + MODULATE_SUBTRACT_ATI = 0x8746 + +# ATI_future_use: 0x8747-0x874F + +############################################################################### + +# MESA: 0x8750-0x875F + +MESA_packed_depth_stencil enum: + DEPTH_STENCIL_MESA = 0x8750 + UNSIGNED_INT_24_8_MESA = 0x8751 + UNSIGNED_INT_8_24_REV_MESA = 0x8752 + UNSIGNED_SHORT_15_1_MESA = 0x8753 + UNSIGNED_SHORT_1_15_REV_MESA = 0x8754 + +MESA_trace enum: + TRACE_ALL_BITS_MESA = 0xFFFF + TRACE_OPERATIONS_BIT_MESA = 0x0001 + TRACE_PRIMITIVES_BIT_MESA = 0x0002 + TRACE_ARRAYS_BIT_MESA = 0x0004 + TRACE_TEXTURES_BIT_MESA = 0x0008 + TRACE_PIXELS_BIT_MESA = 0x0010 + TRACE_ERRORS_BIT_MESA = 0x0020 + TRACE_MASK_MESA = 0x8755 + TRACE_NAME_MESA = 0x8756 + +MESA_ycbcr_texture enum: + YCBCR_MESA = 0x8757 + +MESA_pack_invert enum: + PACK_INVERT_MESA = 0x8758 + +MESAX_texture_stack enum: + TEXTURE_1D_STACK_MESAX = 0x8759 + TEXTURE_2D_STACK_MESAX = 0x875A + PROXY_TEXTURE_1D_STACK_MESAX = 0x875B + PROXY_TEXTURE_2D_STACK_MESAX = 0x875C + TEXTURE_1D_STACK_BINDING_MESAX = 0x875D + TEXTURE_2D_STACK_BINDING_MESAX = 0x875E + +MESA_shader_debug enum: + DEBUG_OBJECT_MESA = 0x8759 + DEBUG_PRINT_MESA = 0x875A + DEBUG_ASSERT_MESA = 0x875B + +# MESA_future_use: 0x875F + +############################################################################### + +# ATI: 0x8760-0x883F + +ATI_vertex_array_object enum: + STATIC_ATI = 0x8760 + DYNAMIC_ATI = 0x8761 + PRESERVE_ATI = 0x8762 + DISCARD_ATI = 0x8763 + OBJECT_BUFFER_SIZE_ATI = 0x8764 + OBJECT_BUFFER_USAGE_ATI = 0x8765 + ARRAY_OBJECT_BUFFER_ATI = 0x8766 + ARRAY_OBJECT_OFFSET_ATI = 0x8767 + +VERSION_1_5 enum: (Promoted for OpenGL 1.5) + BUFFER_SIZE = 0x8764 + BUFFER_USAGE = 0x8765 + +ARB_vertex_buffer_object enum: (additional; aliases some ATI enums; see below) + BUFFER_SIZE_ARB = 0x8764 + BUFFER_USAGE_ARB = 0x8765 + +ATI_element_array enum: + ELEMENT_ARRAY_ATI = 0x8768 + ELEMENT_ARRAY_TYPE_ATI = 0x8769 + ELEMENT_ARRAY_POINTER_ATI = 0x876A + +# @@@ (extends ATI_element_array, I think???) +APPLE_element_array enum: + ELEMENT_ARRAY_APPLE = 0x8768 + ELEMENT_ARRAY_TYPE_APPLE = 0x8769 + ELEMENT_ARRAY_POINTER_APPLE = 0x876A + +ATI_vertex_streams enum: + MAX_VERTEX_STREAMS_ATI = 0x876B + VERTEX_STREAM0_ATI = 0x876C + VERTEX_STREAM1_ATI = 0x876D + VERTEX_STREAM2_ATI = 0x876E + VERTEX_STREAM3_ATI = 0x876F + VERTEX_STREAM4_ATI = 0x8770 + VERTEX_STREAM5_ATI = 0x8771 + VERTEX_STREAM6_ATI = 0x8772 + VERTEX_STREAM7_ATI = 0x8773 + VERTEX_SOURCE_ATI = 0x8774 + +ATI_envmap_bumpmap enum: + BUMP_ROT_MATRIX_ATI = 0x8775 + BUMP_ROT_MATRIX_SIZE_ATI = 0x8776 + BUMP_NUM_TEX_UNITS_ATI = 0x8777 + BUMP_TEX_UNITS_ATI = 0x8778 + DUDV_ATI = 0x8779 + DU8DV8_ATI = 0x877A + BUMP_ENVMAP_ATI = 0x877B + BUMP_TARGET_ATI = 0x877C + +# ATI_future_use: 0x877D-0x877F + +EXT_vertex_shader enum: + VERTEX_SHADER_EXT = 0x8780 + VERTEX_SHADER_BINDING_EXT = 0x8781 + OP_INDEX_EXT = 0x8782 + OP_NEGATE_EXT = 0x8783 + OP_DOT3_EXT = 0x8784 + OP_DOT4_EXT = 0x8785 + OP_MUL_EXT = 0x8786 + OP_ADD_EXT = 0x8787 + OP_MADD_EXT = 0x8788 + OP_FRAC_EXT = 0x8789 + OP_MAX_EXT = 0x878A + OP_MIN_EXT = 0x878B + OP_SET_GE_EXT = 0x878C + OP_SET_LT_EXT = 0x878D + OP_CLAMP_EXT = 0x878E + OP_FLOOR_EXT = 0x878F + OP_ROUND_EXT = 0x8790 + OP_EXP_BASE_2_EXT = 0x8791 + OP_LOG_BASE_2_EXT = 0x8792 + OP_POWER_EXT = 0x8793 + OP_RECIP_EXT = 0x8794 + OP_RECIP_SQRT_EXT = 0x8795 + OP_SUB_EXT = 0x8796 + OP_CROSS_PRODUCT_EXT = 0x8797 + OP_MULTIPLY_MATRIX_EXT = 0x8798 + OP_MOV_EXT = 0x8799 + OUTPUT_VERTEX_EXT = 0x879A + OUTPUT_COLOR0_EXT = 0x879B + OUTPUT_COLOR1_EXT = 0x879C + OUTPUT_TEXTURE_COORD0_EXT = 0x879D + OUTPUT_TEXTURE_COORD1_EXT = 0x879E + OUTPUT_TEXTURE_COORD2_EXT = 0x879F + OUTPUT_TEXTURE_COORD3_EXT = 0x87A0 + OUTPUT_TEXTURE_COORD4_EXT = 0x87A1 + OUTPUT_TEXTURE_COORD5_EXT = 0x87A2 + OUTPUT_TEXTURE_COORD6_EXT = 0x87A3 + OUTPUT_TEXTURE_COORD7_EXT = 0x87A4 + OUTPUT_TEXTURE_COORD8_EXT = 0x87A5 + OUTPUT_TEXTURE_COORD9_EXT = 0x87A6 + OUTPUT_TEXTURE_COORD10_EXT = 0x87A7 + OUTPUT_TEXTURE_COORD11_EXT = 0x87A8 + OUTPUT_TEXTURE_COORD12_EXT = 0x87A9 + OUTPUT_TEXTURE_COORD13_EXT = 0x87AA + OUTPUT_TEXTURE_COORD14_EXT = 0x87AB + OUTPUT_TEXTURE_COORD15_EXT = 0x87AC + OUTPUT_TEXTURE_COORD16_EXT = 0x87AD + OUTPUT_TEXTURE_COORD17_EXT = 0x87AE + OUTPUT_TEXTURE_COORD18_EXT = 0x87AF + OUTPUT_TEXTURE_COORD19_EXT = 0x87B0 + OUTPUT_TEXTURE_COORD20_EXT = 0x87B1 + OUTPUT_TEXTURE_COORD21_EXT = 0x87B2 + OUTPUT_TEXTURE_COORD22_EXT = 0x87B3 + OUTPUT_TEXTURE_COORD23_EXT = 0x87B4 + OUTPUT_TEXTURE_COORD24_EXT = 0x87B5 + OUTPUT_TEXTURE_COORD25_EXT = 0x87B6 + OUTPUT_TEXTURE_COORD26_EXT = 0x87B7 + OUTPUT_TEXTURE_COORD27_EXT = 0x87B8 + OUTPUT_TEXTURE_COORD28_EXT = 0x87B9 + OUTPUT_TEXTURE_COORD29_EXT = 0x87BA + OUTPUT_TEXTURE_COORD30_EXT = 0x87BB + OUTPUT_TEXTURE_COORD31_EXT = 0x87BC + OUTPUT_FOG_EXT = 0x87BD + SCALAR_EXT = 0x87BE + VECTOR_EXT = 0x87BF + MATRIX_EXT = 0x87C0 + VARIANT_EXT = 0x87C1 + INVARIANT_EXT = 0x87C2 + LOCAL_CONSTANT_EXT = 0x87C3 + LOCAL_EXT = 0x87C4 + MAX_VERTEX_SHADER_INSTRUCTIONS_EXT = 0x87C5 + MAX_VERTEX_SHADER_VARIANTS_EXT = 0x87C6 + MAX_VERTEX_SHADER_INVARIANTS_EXT = 0x87C7 + MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT = 0x87C8 + MAX_VERTEX_SHADER_LOCALS_EXT = 0x87C9 + MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT = 0x87CA + MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT = 0x87CB + MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT = 0x87CC + MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT = 0x87CD + MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT = 0x87CE + VERTEX_SHADER_INSTRUCTIONS_EXT = 0x87CF + VERTEX_SHADER_VARIANTS_EXT = 0x87D0 + VERTEX_SHADER_INVARIANTS_EXT = 0x87D1 + VERTEX_SHADER_LOCAL_CONSTANTS_EXT = 0x87D2 + VERTEX_SHADER_LOCALS_EXT = 0x87D3 + VERTEX_SHADER_OPTIMIZED_EXT = 0x87D4 + X_EXT = 0x87D5 + Y_EXT = 0x87D6 + Z_EXT = 0x87D7 + W_EXT = 0x87D8 + NEGATIVE_X_EXT = 0x87D9 + NEGATIVE_Y_EXT = 0x87DA + NEGATIVE_Z_EXT = 0x87DB + NEGATIVE_W_EXT = 0x87DC + ZERO_EXT = 0x87DD + ONE_EXT = 0x87DE + NEGATIVE_ONE_EXT = 0x87DF + NORMALIZED_RANGE_EXT = 0x87E0 + FULL_RANGE_EXT = 0x87E1 + CURRENT_VERTEX_EXT = 0x87E2 + MVP_MATRIX_EXT = 0x87E3 + VARIANT_VALUE_EXT = 0x87E4 + VARIANT_DATATYPE_EXT = 0x87E5 + VARIANT_ARRAY_STRIDE_EXT = 0x87E6 + VARIANT_ARRAY_TYPE_EXT = 0x87E7 + VARIANT_ARRAY_EXT = 0x87E8 + VARIANT_ARRAY_POINTER_EXT = 0x87E9 + INVARIANT_VALUE_EXT = 0x87EA + INVARIANT_DATATYPE_EXT = 0x87EB + LOCAL_CONSTANT_VALUE_EXT = 0x87EC + LOCAL_CONSTANT_DATATYPE_EXT = 0x87ED + +AMD_compressed_ATC_texture enum: (OpenGL ES only) (additional; see below) + ATC_RGBA_INTERPOLATED_ALPHA_AMD = 0x87EE + +ATI_pn_triangles enum: + PN_TRIANGLES_ATI = 0x87F0 + MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI = 0x87F1 + PN_TRIANGLES_POINT_MODE_ATI = 0x87F2 + PN_TRIANGLES_NORMAL_MODE_ATI = 0x87F3 + PN_TRIANGLES_TESSELATION_LEVEL_ATI = 0x87F4 + PN_TRIANGLES_POINT_MODE_LINEAR_ATI = 0x87F5 + PN_TRIANGLES_POINT_MODE_CUBIC_ATI = 0x87F6 + PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI = 0x87F7 + PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI = 0x87F8 + +AMD_compressed_3DC_texture enum: (OpenGL ES only) + 3DC_X_AMD = 0x87F9 + 3DC_XY_AMD = 0x87FA + +ATI_meminfo enum: + VBO_FREE_MEMORY_ATI = 0x87FB + TEXTURE_FREE_MEMORY_ATI = 0x87FC + RENDERBUFFER_FREE_MEMORY_ATI = 0x87FD + +OES_get_program_binary enum: (OpenGL ES only; + NUM_PROGRAM_BINARY_FORMATS_OES = 0x87FE + PROGRAM_BINARY_FORMATS_OES = 0x87FF + +VERSION_2_0 enum: (Promoted for OpenGL 2.0) + STENCIL_BACK_FUNC = 0x8800 # VERSION_2_0 + STENCIL_BACK_FAIL = 0x8801 # VERSION_2_0 + STENCIL_BACK_PASS_DEPTH_FAIL = 0x8802 # VERSION_2_0 + STENCIL_BACK_PASS_DEPTH_PASS = 0x8803 # VERSION_2_0 + STENCIL_BACK_FAIL_ATI = 0x8801 + +ATI_separate_stencil enum: + STENCIL_BACK_FUNC_ATI = 0x8800 + STENCIL_BACK_PASS_DEPTH_FAIL_ATI = 0x8802 + STENCIL_BACK_PASS_DEPTH_PASS_ATI = 0x8803 + +ARB_fragment_program enum: + FRAGMENT_PROGRAM_ARB = 0x8804 + PROGRAM_ALU_INSTRUCTIONS_ARB = 0x8805 + PROGRAM_TEX_INSTRUCTIONS_ARB = 0x8806 + PROGRAM_TEX_INDIRECTIONS_ARB = 0x8807 + PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB = 0x8808 + PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB = 0x8809 + PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB = 0x880A + MAX_PROGRAM_ALU_INSTRUCTIONS_ARB = 0x880B + MAX_PROGRAM_TEX_INSTRUCTIONS_ARB = 0x880C + MAX_PROGRAM_TEX_INDIRECTIONS_ARB = 0x880D + MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB = 0x880E + MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB = 0x880F + MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB = 0x8810 + +# ATI_future_use: 0x8811-0x8813 + +VERSION_3_0 enum: + RGBA32F = 0x8814 # VERSION_3_0 + RGB32F = 0x8815 # VERSION_3_0 + RGBA16F = 0x881A # VERSION_3_0 + RGB16F = 0x881B # VERSION_3_0 + +ARB_texture_float enum: + RGBA32F_ARB = 0x8814 + RGB32F_ARB = 0x8815 + ALPHA32F_ARB = 0x8816 + INTENSITY32F_ARB = 0x8817 + LUMINANCE32F_ARB = 0x8818 + LUMINANCE_ALPHA32F_ARB = 0x8819 + RGBA16F_ARB = 0x881A + RGB16F_ARB = 0x881B + ALPHA16F_ARB = 0x881C + INTENSITY16F_ARB = 0x881D + LUMINANCE16F_ARB = 0x881E + LUMINANCE_ALPHA16F_ARB = 0x881F + +ATI_texture_float enum: + RGBA_FLOAT32_ATI = 0x8814 + RGB_FLOAT32_ATI = 0x8815 + ALPHA_FLOAT32_ATI = 0x8816 + INTENSITY_FLOAT32_ATI = 0x8817 + LUMINANCE_FLOAT32_ATI = 0x8818 + LUMINANCE_ALPHA_FLOAT32_ATI = 0x8819 + RGBA_FLOAT16_ATI = 0x881A + RGB_FLOAT16_ATI = 0x881B + ALPHA_FLOAT16_ATI = 0x881C + INTENSITY_FLOAT16_ATI = 0x881D + LUMINANCE_FLOAT16_ATI = 0x881E + LUMINANCE_ALPHA_FLOAT16_ATI = 0x881F + +APPLE_float_pixels enum: (additional; see below) + RGBA_FLOAT32_APPLE = 0x8814 + RGB_FLOAT32_APPLE = 0x8815 + ALPHA_FLOAT32_APPLE = 0x8816 + INTENSITY_FLOAT32_APPLE = 0x8817 + LUMINANCE_FLOAT32_APPLE = 0x8818 + LUMINANCE_ALPHA_FLOAT32_APPLE = 0x8819 + RGBA_FLOAT16_APPLE = 0x881A + RGB_FLOAT16_APPLE = 0x881B + ALPHA_FLOAT16_APPLE = 0x881C + INTENSITY_FLOAT16_APPLE = 0x881D + LUMINANCE_FLOAT16_APPLE = 0x881E + LUMINANCE_ALPHA_FLOAT16_APPLE = 0x881F + +ARB_color_buffer_float enum: + RGBA_FLOAT_MODE_ARB = 0x8820 # Equivalent to TYPE_RGBA_FLOAT_ATI + +ATI_pixel_format_float enum: (really WGL_ATI_pixel_format_float) + TYPE_RGBA_FLOAT_ATI = 0x8820 + +# ATI_future_use: 0x8821-0x8822 + +QCOM_writeonly_rendering enum: (OpenGL ES only) + WRITEONLY_RENDERING_QCOM = 0x8823 + +VERSION_2_0 enum: (Promoted for OpenGL 2.0) + MAX_DRAW_BUFFERS = 0x8824 # VERSION_2_0 + DRAW_BUFFER0 = 0x8825 # VERSION_2_0 + DRAW_BUFFER1 = 0x8826 # VERSION_2_0 + DRAW_BUFFER2 = 0x8827 # VERSION_2_0 + DRAW_BUFFER3 = 0x8828 # VERSION_2_0 + DRAW_BUFFER4 = 0x8829 # VERSION_2_0 + DRAW_BUFFER5 = 0x882A # VERSION_2_0 + DRAW_BUFFER6 = 0x882B # VERSION_2_0 + DRAW_BUFFER7 = 0x882C # VERSION_2_0 + DRAW_BUFFER8 = 0x882D # VERSION_2_0 + DRAW_BUFFER9 = 0x882E # VERSION_2_0 + DRAW_BUFFER10 = 0x882F # VERSION_2_0 + DRAW_BUFFER11 = 0x8830 # VERSION_2_0 + DRAW_BUFFER12 = 0x8831 # VERSION_2_0 + DRAW_BUFFER13 = 0x8832 # VERSION_2_0 + DRAW_BUFFER14 = 0x8833 # VERSION_2_0 + DRAW_BUFFER15 = 0x8834 # VERSION_2_0 + +ARB_draw_buffers enum: + MAX_DRAW_BUFFERS_ARB = 0x8824 + DRAW_BUFFER0_ARB = 0x8825 + DRAW_BUFFER1_ARB = 0x8826 + DRAW_BUFFER2_ARB = 0x8827 + DRAW_BUFFER3_ARB = 0x8828 + DRAW_BUFFER4_ARB = 0x8829 + DRAW_BUFFER5_ARB = 0x882A + DRAW_BUFFER6_ARB = 0x882B + DRAW_BUFFER7_ARB = 0x882C + DRAW_BUFFER8_ARB = 0x882D + DRAW_BUFFER9_ARB = 0x882E + DRAW_BUFFER10_ARB = 0x882F + DRAW_BUFFER11_ARB = 0x8830 + DRAW_BUFFER12_ARB = 0x8831 + DRAW_BUFFER13_ARB = 0x8832 + DRAW_BUFFER14_ARB = 0x8833 + DRAW_BUFFER15_ARB = 0x8834 + +ATI_draw_buffers enum: + MAX_DRAW_BUFFERS_ATI = 0x8824 + DRAW_BUFFER0_ATI = 0x8825 + DRAW_BUFFER1_ATI = 0x8826 + DRAW_BUFFER2_ATI = 0x8827 + DRAW_BUFFER3_ATI = 0x8828 + DRAW_BUFFER4_ATI = 0x8829 + DRAW_BUFFER5_ATI = 0x882A + DRAW_BUFFER6_ATI = 0x882B + DRAW_BUFFER7_ATI = 0x882C + DRAW_BUFFER8_ATI = 0x882D + DRAW_BUFFER9_ATI = 0x882E + DRAW_BUFFER10_ATI = 0x882F + DRAW_BUFFER11_ATI = 0x8830 + DRAW_BUFFER12_ATI = 0x8831 + DRAW_BUFFER13_ATI = 0x8832 + DRAW_BUFFER14_ATI = 0x8833 + DRAW_BUFFER15_ATI = 0x8834 + +ATI_pixel_format_float enum: (really WGL_ATI_pixel_format_float) (additional; see above) + COLOR_CLEAR_UNCLAMPED_VALUE_ATI = 0x8835 + +# ATI_future_use: 0x8836-0x883F + +VERSION_2_0 enum: (Promoted for OpenGL 2.0) + BLEND_EQUATION_ALPHA = 0x883D # VERSION_2_0 + +EXT_blend_equation_separate enum: + BLEND_EQUATION_ALPHA_EXT = 0x883D + +# Aliases EXT_blend_equation_separate enum above +OES_blend_equation_separate enum: (OpenGL ES only) + BLEND_EQUATION_ALPHA_OES = 0x883D + +############################################################################### + +# OpenGL ARB: 0x8840-0x884F + +ARB_matrix_palette enum: + MATRIX_PALETTE_ARB = 0x8840 + MAX_MATRIX_PALETTE_STACK_DEPTH_ARB = 0x8841 + MAX_PALETTE_MATRICES_ARB = 0x8842 + CURRENT_PALETTE_MATRIX_ARB = 0x8843 + MATRIX_INDEX_ARRAY_ARB = 0x8844 + CURRENT_MATRIX_INDEX_ARB = 0x8845 + MATRIX_INDEX_ARRAY_SIZE_ARB = 0x8846 + MATRIX_INDEX_ARRAY_TYPE_ARB = 0x8847 + MATRIX_INDEX_ARRAY_STRIDE_ARB = 0x8848 + MATRIX_INDEX_ARRAY_POINTER_ARB = 0x8849 + +# Aliases ARB_matrix_palette enums above +OES_matrix_palette enum: (OpenGL ES only; additional; see below) + MATRIX_PALETTE_OES = 0x8840 + MAX_PALETTE_MATRICES_OES = 0x8842 + CURRENT_PALETTE_MATRIX_OES = 0x8843 + MATRIX_INDEX_ARRAY_OES = 0x8844 + MATRIX_INDEX_ARRAY_SIZE_OES = 0x8846 + MATRIX_INDEX_ARRAY_TYPE_OES = 0x8847 + MATRIX_INDEX_ARRAY_STRIDE_OES = 0x8848 + MATRIX_INDEX_ARRAY_POINTER_OES = 0x8849 + +VERSION_1_4 enum: (Promoted for OpenGL 1.4) + TEXTURE_DEPTH_SIZE = 0x884A + DEPTH_TEXTURE_MODE = 0x884B + +ARB_depth_texture enum: + TEXTURE_DEPTH_SIZE_ARB = 0x884A + DEPTH_TEXTURE_MODE_ARB = 0x884B + +VERSION_3_0 enum: (aliases) + COMPARE_REF_TO_TEXTURE = 0x884E # VERSION_3_0 # alias GL_COMPARE_R_TO_TEXTURE_ARB + +VERSION_1_4 enum: (Promoted for OpenGL 1.4) + TEXTURE_COMPARE_MODE = 0x884C + TEXTURE_COMPARE_FUNC = 0x884D + COMPARE_R_TO_TEXTURE = 0x884E + +ARB_shadow enum: + TEXTURE_COMPARE_MODE_ARB = 0x884C + TEXTURE_COMPARE_FUNC_ARB = 0x884D + COMPARE_R_TO_TEXTURE_ARB = 0x884E + +EXT_texture_array enum: (additional; see below) + COMPARE_REF_DEPTH_TO_TEXTURE_EXT = 0x884E + +VERSION_3_2 enum: + use ARB_seamless_cube_map TEXTURE_CUBE_MAP_SEAMLESS + +ARB_seamless_cube_map enum: + TEXTURE_CUBE_MAP_SEAMLESS = 0x884F + +############################################################################### + +# NVIDIA: 0x8850-0x891F + +NV_texture_shader3 enum: + OFFSET_PROJECTIVE_TEXTURE_2D_NV = 0x8850 + OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV = 0x8851 + OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV = 0x8852 + OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV = 0x8853 + OFFSET_HILO_TEXTURE_2D_NV = 0x8854 + OFFSET_HILO_TEXTURE_RECTANGLE_NV = 0x8855 + OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV = 0x8856 + OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV = 0x8857 + DEPENDENT_HILO_TEXTURE_2D_NV = 0x8858 + DEPENDENT_RGB_TEXTURE_3D_NV = 0x8859 + DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV = 0x885A + DOT_PRODUCT_PASS_THROUGH_NV = 0x885B + DOT_PRODUCT_TEXTURE_1D_NV = 0x885C + DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV = 0x885D + HILO8_NV = 0x885E + SIGNED_HILO8_NV = 0x885F + FORCE_BLUE_TO_ONE_NV = 0x8860 + +VERSION_2_0 enum: (Promoted for OpenGL 2.0) + POINT_SPRITE = 0x8861 # VERSION_2_0 + COORD_REPLACE = 0x8862 # VERSION_2_0 + +ARB_point_sprite enum: + POINT_SPRITE_ARB = 0x8861 + COORD_REPLACE_ARB = 0x8862 + +NV_point_sprite enum: + POINT_SPRITE_NV = 0x8861 + COORD_REPLACE_NV = 0x8862 + +# Aliases ARB_point_sprite enums above +OES_point_sprite enum: (OpenGL ES only) + POINT_SPRITE_ARB = 0x8861 + COORD_REPLACE_ARB = 0x8862 + +NV_point_sprite enum: + POINT_SPRITE_R_MODE_NV = 0x8863 + +VERSION_1_5 enum: (Promoted for OpenGL 1.5) + QUERY_COUNTER_BITS = 0x8864 + CURRENT_QUERY = 0x8865 + QUERY_RESULT = 0x8866 + QUERY_RESULT_AVAILABLE = 0x8867 + +ARB_occlusion_query enum: + QUERY_COUNTER_BITS_ARB = 0x8864 + CURRENT_QUERY_ARB = 0x8865 + QUERY_RESULT_ARB = 0x8866 + QUERY_RESULT_AVAILABLE_ARB = 0x8867 + +NV_occlusion_query enum: + PIXEL_COUNTER_BITS_NV = 0x8864 + CURRENT_OCCLUSION_QUERY_ID_NV = 0x8865 + PIXEL_COUNT_NV = 0x8866 + PIXEL_COUNT_AVAILABLE_NV = 0x8867 + +NV_fragment_program enum: + MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV = 0x8868 + +VERSION_2_0 enum: (Promoted from ARB_vertex_shader) + MAX_VERTEX_ATTRIBS = 0x8869 # VERSION_2_0 + VERTEX_ATTRIB_ARRAY_NORMALIZED = 0x886A # VERSION_2_0 + +ARB_vertex_program enum: (additional; see above) + MAX_VERTEX_ATTRIBS_ARB = 0x8869 + VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB = 0x886A + +# NV_future_use: 0x886B-0x886D + +NV_copy_depth_to_color enum: + DEPTH_STENCIL_TO_RGBA_NV = 0x886E + DEPTH_STENCIL_TO_BGRA_NV = 0x886F + +NV_fragment_program enum: (additional; see above) + FRAGMENT_PROGRAM_NV = 0x8870 + MAX_TEXTURE_COORDS_NV = 0x8871 + MAX_TEXTURE_IMAGE_UNITS_NV = 0x8872 + FRAGMENT_PROGRAM_BINDING_NV = 0x8873 + PROGRAM_ERROR_STRING_NV = 0x8874 + +VERSION_2_0 enum: (Promoted from ARB_fragment_shader; only some values) + MAX_TEXTURE_COORDS = 0x8871 # VERSION_2_0 + MAX_TEXTURE_IMAGE_UNITS = 0x8872 # VERSION_2_0 + +ARB_vertex_program enum: (additional; see above) +ARB_fragment_program enum: (additional; see above) + MAX_TEXTURE_COORDS_ARB = 0x8871 # ARB_fragment_program + MAX_TEXTURE_IMAGE_UNITS_ARB = 0x8872 # ARB_fragment_program + PROGRAM_ERROR_STRING_ARB = 0x8874 # ARB_vertex_program / ARB_fragment_program + PROGRAM_FORMAT_ASCII_ARB = 0x8875 # ARB_vertex_program / ARB_fragment_program + PROGRAM_FORMAT_ARB = 0x8876 # ARB_vertex_program / ARB_fragment_program + +# 0x8877 *should have been* assigned to PROGRAM_BINDING_ARB. Oops. + +NV_pixel_data_range enum: + WRITE_PIXEL_DATA_RANGE_NV = 0x8878 + READ_PIXEL_DATA_RANGE_NV = 0x8879 + WRITE_PIXEL_DATA_RANGE_LENGTH_NV = 0x887A + READ_PIXEL_DATA_RANGE_LENGTH_NV = 0x887B + WRITE_PIXEL_DATA_RANGE_POINTER_NV = 0x887C + READ_PIXEL_DATA_RANGE_POINTER_NV = 0x887D + +# NV_future_use: 0x887E-0x887F + +NV_float_buffer enum: + FLOAT_R_NV = 0x8880 + FLOAT_RG_NV = 0x8881 + FLOAT_RGB_NV = 0x8882 + FLOAT_RGBA_NV = 0x8883 + FLOAT_R16_NV = 0x8884 + FLOAT_R32_NV = 0x8885 + FLOAT_RG16_NV = 0x8886 + FLOAT_RG32_NV = 0x8887 + FLOAT_RGB16_NV = 0x8888 + FLOAT_RGB32_NV = 0x8889 + FLOAT_RGBA16_NV = 0x888A + FLOAT_RGBA32_NV = 0x888B + TEXTURE_FLOAT_COMPONENTS_NV = 0x888C + FLOAT_CLEAR_COLOR_VALUE_NV = 0x888D + FLOAT_RGBA_MODE_NV = 0x888E + +NV_texture_expand_normal enum: + TEXTURE_UNSIGNED_REMAP_MODE_NV = 0x888F + +EXT_depth_bounds_test enum: + DEPTH_BOUNDS_TEST_EXT = 0x8890 + DEPTH_BOUNDS_EXT = 0x8891 + +VERSION_1_5 enum: (Promoted for OpenGL 1.5) + ARRAY_BUFFER = 0x8892 + ELEMENT_ARRAY_BUFFER = 0x8893 + ARRAY_BUFFER_BINDING = 0x8894 + ELEMENT_ARRAY_BUFFER_BINDING = 0x8895 + VERTEX_ARRAY_BUFFER_BINDING = 0x8896 + NORMAL_ARRAY_BUFFER_BINDING = 0x8897 + COLOR_ARRAY_BUFFER_BINDING = 0x8898 + INDEX_ARRAY_BUFFER_BINDING = 0x8899 + TEXTURE_COORD_ARRAY_BUFFER_BINDING = 0x889A + EDGE_FLAG_ARRAY_BUFFER_BINDING = 0x889B + SECONDARY_COLOR_ARRAY_BUFFER_BINDING = 0x889C + FOG_COORD_ARRAY_BUFFER_BINDING = 0x889D # alias GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING + FOG_COORDINATE_ARRAY_BUFFER_BINDING = 0x889D + WEIGHT_ARRAY_BUFFER_BINDING = 0x889E + VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889F + +ARB_vertex_buffer_object enum: + ARRAY_BUFFER_ARB = 0x8892 + ELEMENT_ARRAY_BUFFER_ARB = 0x8893 + ARRAY_BUFFER_BINDING_ARB = 0x8894 + ELEMENT_ARRAY_BUFFER_BINDING_ARB = 0x8895 + VERTEX_ARRAY_BUFFER_BINDING_ARB = 0x8896 + NORMAL_ARRAY_BUFFER_BINDING_ARB = 0x8897 + COLOR_ARRAY_BUFFER_BINDING_ARB = 0x8898 + INDEX_ARRAY_BUFFER_BINDING_ARB = 0x8899 + TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB = 0x889A + EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB = 0x889B + SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB = 0x889C + FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB = 0x889D + WEIGHT_ARRAY_BUFFER_BINDING_ARB = 0x889E + VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB = 0x889F + +# Aliases ARB_vertex_buffer_object enum above +OES_matrix_palette enum: (OpenGL ES only; additional; see below) + WEIGHT_ARRAY_BUFFER_BINDING_OES = 0x889E + +ARB_vertex_program enum: (additional; see above) +ARB_fragment_program enum: (additional; see above) + PROGRAM_INSTRUCTIONS_ARB = 0x88A0 + MAX_PROGRAM_INSTRUCTIONS_ARB = 0x88A1 + PROGRAM_NATIVE_INSTRUCTIONS_ARB = 0x88A2 + MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB = 0x88A3 + PROGRAM_TEMPORARIES_ARB = 0x88A4 + MAX_PROGRAM_TEMPORARIES_ARB = 0x88A5 + PROGRAM_NATIVE_TEMPORARIES_ARB = 0x88A6 + MAX_PROGRAM_NATIVE_TEMPORARIES_ARB = 0x88A7 + PROGRAM_PARAMETERS_ARB = 0x88A8 + MAX_PROGRAM_PARAMETERS_ARB = 0x88A9 + PROGRAM_NATIVE_PARAMETERS_ARB = 0x88AA + MAX_PROGRAM_NATIVE_PARAMETERS_ARB = 0x88AB + PROGRAM_ATTRIBS_ARB = 0x88AC + MAX_PROGRAM_ATTRIBS_ARB = 0x88AD + PROGRAM_NATIVE_ATTRIBS_ARB = 0x88AE + MAX_PROGRAM_NATIVE_ATTRIBS_ARB = 0x88AF + PROGRAM_ADDRESS_REGISTERS_ARB = 0x88B0 + MAX_PROGRAM_ADDRESS_REGISTERS_ARB = 0x88B1 + PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB = 0x88B2 + MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB = 0x88B3 + MAX_PROGRAM_LOCAL_PARAMETERS_ARB = 0x88B4 + MAX_PROGRAM_ENV_PARAMETERS_ARB = 0x88B5 + PROGRAM_UNDER_NATIVE_LIMITS_ARB = 0x88B6 + TRANSPOSE_CURRENT_MATRIX_ARB = 0x88B7 + +VERSION_1_5 enum: (Promoted for OpenGL 1.5) + READ_ONLY = 0x88B8 + WRITE_ONLY = 0x88B9 + READ_WRITE = 0x88BA + BUFFER_ACCESS = 0x88BB + BUFFER_MAPPED = 0x88BC + BUFFER_MAP_POINTER = 0x88BD + +ARB_vertex_buffer_object enum: (additional; see above) + READ_ONLY_ARB = 0x88B8 + WRITE_ONLY_ARB = 0x88B9 + READ_WRITE_ARB = 0x88BA + BUFFER_ACCESS_ARB = 0x88BB + BUFFER_MAPPED_ARB = 0x88BC + BUFFER_MAP_POINTER_ARB = 0x88BD + +# Aliases ARB_vertex_buffer_object enums above +OES_mapbuffer enum: (OpenGL ES only) + WRITE_ONLY_OES = 0x88B9 + BUFFER_ACCESS_OES = 0x88BB + BUFFER_MAPPED_OES = 0x88BC + BUFFER_MAP_POINTER_OES = 0x88BD + +# NV_future_use: 0x88BE + +EXT_timer_query enum: + TIME_ELAPSED_EXT = 0x88BF + +ARB_vertex_program enum: (additional; see above) +ARB_fragment_program enum: (additional; see above) + MATRIX0_ARB = 0x88C0 + MATRIX1_ARB = 0x88C1 + MATRIX2_ARB = 0x88C2 + MATRIX3_ARB = 0x88C3 + MATRIX4_ARB = 0x88C4 + MATRIX5_ARB = 0x88C5 + MATRIX6_ARB = 0x88C6 + MATRIX7_ARB = 0x88C7 + MATRIX8_ARB = 0x88C8 + MATRIX9_ARB = 0x88C9 + MATRIX10_ARB = 0x88CA + MATRIX11_ARB = 0x88CB + MATRIX12_ARB = 0x88CC + MATRIX13_ARB = 0x88CD + MATRIX14_ARB = 0x88CE + MATRIX15_ARB = 0x88CF + MATRIX16_ARB = 0x88D0 + MATRIX17_ARB = 0x88D1 + MATRIX18_ARB = 0x88D2 + MATRIX19_ARB = 0x88D3 + MATRIX20_ARB = 0x88D4 + MATRIX21_ARB = 0x88D5 + MATRIX22_ARB = 0x88D6 + MATRIX23_ARB = 0x88D7 + MATRIX24_ARB = 0x88D8 + MATRIX25_ARB = 0x88D9 + MATRIX26_ARB = 0x88DA + MATRIX27_ARB = 0x88DB + MATRIX28_ARB = 0x88DC + MATRIX29_ARB = 0x88DD + MATRIX30_ARB = 0x88DE + MATRIX31_ARB = 0x88DF + +VERSION_1_5 enum: (Promoted for OpenGL 1.5) + STREAM_DRAW = 0x88E0 + STREAM_READ = 0x88E1 + STREAM_COPY = 0x88E2 + STATIC_DRAW = 0x88E4 + STATIC_READ = 0x88E5 + STATIC_COPY = 0x88E6 + DYNAMIC_DRAW = 0x88E8 + DYNAMIC_READ = 0x88E9 + DYNAMIC_COPY = 0x88EA + +ARB_vertex_buffer_object enum: (additional; see above) + STREAM_DRAW_ARB = 0x88E0 + STREAM_READ_ARB = 0x88E1 + STREAM_COPY_ARB = 0x88E2 + STATIC_DRAW_ARB = 0x88E4 + STATIC_READ_ARB = 0x88E5 + STATIC_COPY_ARB = 0x88E6 + DYNAMIC_DRAW_ARB = 0x88E8 + DYNAMIC_READ_ARB = 0x88E9 + DYNAMIC_COPY_ARB = 0x88EA + +VERSION_2_1 enum: + PIXEL_PACK_BUFFER = 0x88EB # VERSION_2_1 + PIXEL_UNPACK_BUFFER = 0x88EC # VERSION_2_1 + PIXEL_PACK_BUFFER_BINDING = 0x88ED # VERSION_2_1 + PIXEL_UNPACK_BUFFER_BINDING = 0x88EF # VERSION_2_1 + +ARB_pixel_buffer_object enum: + PIXEL_PACK_BUFFER_ARB = 0x88EB # ARB_pixel_buffer_object + PIXEL_UNPACK_BUFFER_ARB = 0x88EC # ARB_pixel_buffer_object + PIXEL_PACK_BUFFER_BINDING_ARB = 0x88ED # ARB_pixel_buffer_object + PIXEL_UNPACK_BUFFER_BINDING_ARB = 0x88EF # ARB_pixel_buffer_object + +EXT_pixel_buffer_object enum: + PIXEL_PACK_BUFFER_EXT = 0x88EB # EXT_pixel_buffer_object + PIXEL_UNPACK_BUFFER_EXT = 0x88EC # EXT_pixel_buffer_object + PIXEL_PACK_BUFFER_BINDING_EXT = 0x88ED # EXT_pixel_buffer_object + PIXEL_UNPACK_BUFFER_BINDING_EXT = 0x88EF # EXT_pixel_buffer_object + +# ARB_future_use: 0x88E3, 0x88E7, 0x88EE +# (for extending ARB_vertex_buffer_object): + +VERSION_3_0 enum: + use ARB_framebuffer_object DEPTH24_STENCIL8 + use ARB_framebuffer_object TEXTURE_STENCIL_SIZE + +ARB_framebuffer_object enum: (note: no ARB suffixes) + DEPTH24_STENCIL8 = 0x88F0 # VERSION_3_0 / ARB_fbo + TEXTURE_STENCIL_SIZE = 0x88F1 # VERSION_3_0 / ARB_fbo + +EXT_packed_depth_stencil enum: (additional; see above) + DEPTH24_STENCIL8_EXT = 0x88F0 + TEXTURE_STENCIL_SIZE_EXT = 0x88F1 + +# Aliases EXT_packed_depth_stencil enum above +OES_packed_depth_stencil enum: (OpenGL ES only; additional; see above) + DEPTH24_STENCIL8_OES = 0x88F0 + +EXT_stencil_clear_tag enum: + STENCIL_TAG_BITS_EXT = 0x88F2 + STENCIL_CLEAR_TAG_VALUE_EXT = 0x88F3 + +NV_vertex_program2_option enum: (duplicated in NV_fragment_prgoram2 below) + MAX_PROGRAM_EXEC_INSTRUCTIONS_NV = 0x88F4 + MAX_PROGRAM_CALL_DEPTH_NV = 0x88F5 + +NV_fragment_program2 enum: + MAX_PROGRAM_EXEC_INSTRUCTIONS_NV = 0x88F4 + MAX_PROGRAM_CALL_DEPTH_NV = 0x88F5 + MAX_PROGRAM_IF_DEPTH_NV = 0x88F6 + MAX_PROGRAM_LOOP_DEPTH_NV = 0x88F7 + MAX_PROGRAM_LOOP_COUNT_NV = 0x88F8 + +# NV_future_use: 0x88F9-0x88FC + +VERSION_3_0 enum: + VERTEX_ATTRIB_ARRAY_INTEGER = 0x88FD # VERSION_3_0 + +NV_vertex_program4 enum: + VERTEX_ATTRIB_ARRAY_INTEGER_NV = 0x88FD + +ARB_instanced_arrays enum: + VERTEX_ATTRIB_ARRAY_DIVISOR_ARB = 0x88FE + +VERSION_3_0 enum: + MAX_ARRAY_TEXTURE_LAYERS = 0x88FF # VERSION_3_0 + +EXT_texture_array enum: (additional; see below) + MAX_ARRAY_TEXTURE_LAYERS_EXT = 0x88FF + +VERSION_3_0 enum: + MIN_PROGRAM_TEXEL_OFFSET = 0x8904 # VERSION_3_0 + MAX_PROGRAM_TEXEL_OFFSET = 0x8905 # VERSION_3_0 + +NV_gpu_program4 enum: + MIN_PROGRAM_TEXEL_OFFSET_NV = 0x8904 + MAX_PROGRAM_TEXEL_OFFSET_NV = 0x8905 + PROGRAM_ATTRIB_COMPONENTS_NV = 0x8906 + PROGRAM_RESULT_COMPONENTS_NV = 0x8907 + MAX_PROGRAM_ATTRIB_COMPONENTS_NV = 0x8908 + MAX_PROGRAM_RESULT_COMPONENTS_NV = 0x8909 + +EXT_stencil_two_side enum: + STENCIL_TEST_TWO_SIDE_EXT = 0x8910 + ACTIVE_STENCIL_FACE_EXT = 0x8911 + +EXT_texture_mirror_clamp enum: (additional; see above): + MIRROR_CLAMP_TO_BORDER_EXT = 0x8912 + +# NV_future_use: 0x8913 + +VERSION_1_5 enum: (Promoted for OpenGL 1.5) + SAMPLES_PASSED = 0x8914 + +ARB_occlusion_query enum: (additional; see above) + SAMPLES_PASSED_ARB = 0x8914 + +# NV_future_use: 0x8915 + +VERSION_3_2 enum: + GEOMETRY_VERTICES_OUT = 0x8916 + GEOMETRY_INPUT_TYPE = 0x8917 + GEOMETRY_OUTPUT_TYPE = 0x8918 + +# NV_future_use: 0x8919 + +VERSION_3_0 enum: + CLAMP_VERTEX_COLOR = 0x891A # VERSION_3_0 + CLAMP_FRAGMENT_COLOR = 0x891B # VERSION_3_0 + CLAMP_READ_COLOR = 0x891C # VERSION_3_0 + FIXED_ONLY = 0x891D # VERSION_3_0 + +ARB_color_buffer_float enum: (additional; see above) + CLAMP_VERTEX_COLOR_ARB = 0x891A + CLAMP_FRAGMENT_COLOR_ARB = 0x891B + CLAMP_READ_COLOR_ARB = 0x891C + FIXED_ONLY_ARB = 0x891D + +# NV_future_use: 0x891E-0x891F + +############################################################################### + +# ATI: 0x8920-0x897F + +ATI_fragment_shader enum: + FRAGMENT_SHADER_ATI = 0x8920 + REG_0_ATI = 0x8921 + REG_1_ATI = 0x8922 + REG_2_ATI = 0x8923 + REG_3_ATI = 0x8924 + REG_4_ATI = 0x8925 + REG_5_ATI = 0x8926 + REG_6_ATI = 0x8927 + REG_7_ATI = 0x8928 + REG_8_ATI = 0x8929 + REG_9_ATI = 0x892A + REG_10_ATI = 0x892B + REG_11_ATI = 0x892C + REG_12_ATI = 0x892D + REG_13_ATI = 0x892E + REG_14_ATI = 0x892F + REG_15_ATI = 0x8930 + REG_16_ATI = 0x8931 + REG_17_ATI = 0x8932 + REG_18_ATI = 0x8933 + REG_19_ATI = 0x8934 + REG_20_ATI = 0x8935 + REG_21_ATI = 0x8936 + REG_22_ATI = 0x8937 + REG_23_ATI = 0x8938 + REG_24_ATI = 0x8939 + REG_25_ATI = 0x893A + REG_26_ATI = 0x893B + REG_27_ATI = 0x893C + REG_28_ATI = 0x893D + REG_29_ATI = 0x893E + REG_30_ATI = 0x893F + REG_31_ATI = 0x8940 + CON_0_ATI = 0x8941 + CON_1_ATI = 0x8942 + CON_2_ATI = 0x8943 + CON_3_ATI = 0x8944 + CON_4_ATI = 0x8945 + CON_5_ATI = 0x8946 + CON_6_ATI = 0x8947 + CON_7_ATI = 0x8948 + CON_8_ATI = 0x8949 + CON_9_ATI = 0x894A + CON_10_ATI = 0x894B + CON_11_ATI = 0x894C + CON_12_ATI = 0x894D + CON_13_ATI = 0x894E + CON_14_ATI = 0x894F + CON_15_ATI = 0x8950 + CON_16_ATI = 0x8951 + CON_17_ATI = 0x8952 + CON_18_ATI = 0x8953 + CON_19_ATI = 0x8954 + CON_20_ATI = 0x8955 + CON_21_ATI = 0x8956 + CON_22_ATI = 0x8957 + CON_23_ATI = 0x8958 + CON_24_ATI = 0x8959 + CON_25_ATI = 0x895A + CON_26_ATI = 0x895B + CON_27_ATI = 0x895C + CON_28_ATI = 0x895D + CON_29_ATI = 0x895E + CON_30_ATI = 0x895F + CON_31_ATI = 0x8960 + MOV_ATI = 0x8961 + ADD_ATI = 0x8963 + MUL_ATI = 0x8964 + SUB_ATI = 0x8965 + DOT3_ATI = 0x8966 + DOT4_ATI = 0x8967 + MAD_ATI = 0x8968 + LERP_ATI = 0x8969 + CND_ATI = 0x896A + CND0_ATI = 0x896B + DOT2_ADD_ATI = 0x896C + SECONDARY_INTERPOLATOR_ATI = 0x896D + NUM_FRAGMENT_REGISTERS_ATI = 0x896E + NUM_FRAGMENT_CONSTANTS_ATI = 0x896F + NUM_PASSES_ATI = 0x8970 + NUM_INSTRUCTIONS_PER_PASS_ATI = 0x8971 + NUM_INSTRUCTIONS_TOTAL_ATI = 0x8972 + NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI = 0x8973 + NUM_LOOPBACK_COMPONENTS_ATI = 0x8974 + COLOR_ALPHA_PAIRING_ATI = 0x8975 + SWIZZLE_STR_ATI = 0x8976 + SWIZZLE_STQ_ATI = 0x8977 + SWIZZLE_STR_DR_ATI = 0x8978 + SWIZZLE_STQ_DQ_ATI = 0x8979 + SWIZZLE_STRQ_ATI = 0x897A + SWIZZLE_STRQ_DQ_ATI = 0x897B +# ??? Not clear where to put new types of mask bits yet + RED_BIT_ATI = 0x00000001 + GREEN_BIT_ATI = 0x00000002 + BLUE_BIT_ATI = 0x00000004 + 2X_BIT_ATI = 0x00000001 + 4X_BIT_ATI = 0x00000002 + 8X_BIT_ATI = 0x00000004 + HALF_BIT_ATI = 0x00000008 + QUARTER_BIT_ATI = 0x00000010 + EIGHTH_BIT_ATI = 0x00000020 + SATURATE_BIT_ATI = 0x00000040 + 2X_BIT_ATI = 0x00000001 + COMP_BIT_ATI = 0x00000002 + NEGATE_BIT_ATI = 0x00000004 + BIAS_BIT_ATI = 0x00000008 + +# ATI_future_use: 0x897C-0x897F + +############################################################################### + +# Khronos OpenML WG / OpenGL ES WG: 0x8980-0x898F + +OML_interlace enum: + INTERLACE_OML = 0x8980 + INTERLACE_READ_OML = 0x8981 + +OML_subsample enum: + FORMAT_SUBSAMPLE_24_24_OML = 0x8982 + FORMAT_SUBSAMPLE_244_244_OML = 0x8983 + +OML_resample enum: + PACK_RESAMPLE_OML = 0x8984 + UNPACK_RESAMPLE_OML = 0x8985 + RESAMPLE_REPLICATE_OML = 0x8986 + RESAMPLE_ZERO_FILL_OML = 0x8987 + RESAMPLE_AVERAGE_OML = 0x8988 + RESAMPLE_DECIMATE_OML = 0x8989 + +OES_point_size_array enum: (OpenGL ES only) + POINT_SIZE_ARRAY_TYPE_OES = 0x898A + POINT_SIZE_ARRAY_STRIDE_OES = 0x898B + POINT_SIZE_ARRAY_POINTER_OES = 0x898C + +OES_matrix_get enum: (OpenGL ES only) + MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES = 0x898D + PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES = 0x898E + TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES = 0x898F + +############################################################################### + +# 3dlabs: 0x8990-0x899F + +############################################################################### + +# Matrox: 0x89A0-0x89FF + +############################################################################### + +# Apple: 0x8A00-0x8A7F + +APPLE_vertex_program_evaluators enum: + VERTEX_ATTRIB_MAP1_APPLE = 0x8A00 + VERTEX_ATTRIB_MAP2_APPLE = 0x8A01 + VERTEX_ATTRIB_MAP1_SIZE_APPLE = 0x8A02 + VERTEX_ATTRIB_MAP1_COEFF_APPLE = 0x8A03 + VERTEX_ATTRIB_MAP1_ORDER_APPLE = 0x8A04 + VERTEX_ATTRIB_MAP1_DOMAIN_APPLE = 0x8A05 + VERTEX_ATTRIB_MAP2_SIZE_APPLE = 0x8A06 + VERTEX_ATTRIB_MAP2_COEFF_APPLE = 0x8A07 + VERTEX_ATTRIB_MAP2_ORDER_APPLE = 0x8A08 + VERTEX_ATTRIB_MAP2_DOMAIN_APPLE = 0x8A09 + +APPLE_fence enum: + DRAW_PIXELS_APPLE = 0x8A0A + FENCE_APPLE = 0x8A0B + +## From Jeremy 2006/10/18 (Khronos bug 632) - unknown extension name + ELEMENT_ARRAY_APPLE = 0x8A0C + ELEMENT_ARRAY_TYPE_APPLE = 0x8A0D + ELEMENT_ARRAY_POINTER_APPLE = 0x8A0E + +APPLE_float_pixels enum: + COLOR_FLOAT_APPLE = 0x8A0F + +# APPLE_future_use: 0x8A10 +## From Jeremy 2006/10/18 (Khronos bug 632) - unknown extension name +# MIN_PBUFFER_VIEWPORT_DIMS_APPLE = 0x8A10 +# ELEMENT_BUFFER_BINDING_APPLE = 0x8A11 +# Apple says the extension that defined ELEMENT_BUFFER_BINDING_APPLE +# never shipped and there's no actual collision with UNIFORM_BUFFER + +VERSION_3_1 enum: + use ARB_uniform_buffer_object UNIFORM_BUFFER + +ARB_uniform_buffer_object enum: (additional; see below) + UNIFORM_BUFFER = 0x8A11 + +APPLE_flush_buffer_range enum: + BUFFER_SERIALIZED_MODIFY_APPLE = 0x8A12 + BUFFER_FLUSHING_UNMAP_APPLE = 0x8A13 + +APPLE_aux_depth_stencil enum: + AUX_DEPTH_STENCIL_APPLE = 0x8A14 + +APPLE_row_bytes enum: + PACK_ROW_BYTES_APPLE = 0x8A15 + UNPACK_ROW_BYTES_APPLE = 0x8A16 + +# APPLE_future_use: 0x8A17-0x8A18 + +APPLE_object_purgeable enum: + RELEASED_APPLE = 0x8A19 + VOLATILE_APPLE = 0x8A1A + RETAINED_APPLE = 0x8A1B + UNDEFINED_APPLE = 0x8A1C + PURGEABLE_APPLE = 0x8A1D + +# APPLE_future_use: 0x8A1E + +APPLE_rgb_422 enum: + RGB_422_APPLE = 0x8A1F + use APPLE_ycbcr_422 UNSIGNED_SHORT_8_8_APPLE + use APPLE_ycbcr_422 UNSIGNED_SHORT_8_8_REV_APPLE + +# APPLE_future_use: 0x8A20--0x8A27 + +VERSION_3_1 enum: + use ARB_uniform_buffer_object UNIFORM_BUFFER_BINDING + use ARB_uniform_buffer_object UNIFORM_BUFFER_START + use ARB_uniform_buffer_object UNIFORM_BUFFER_SIZE + use ARB_uniform_buffer_object MAX_VERTEX_UNIFORM_BLOCKS + use ARB_uniform_buffer_object MAX_GEOMETRY_UNIFORM_BLOCKS + use ARB_uniform_buffer_object MAX_FRAGMENT_UNIFORM_BLOCKS + use ARB_uniform_buffer_object MAX_COMBINED_UNIFORM_BLOCKS + use ARB_uniform_buffer_object MAX_UNIFORM_BUFFER_BINDINGS + use ARB_uniform_buffer_object MAX_UNIFORM_BLOCK_SIZE + use ARB_uniform_buffer_object MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS + use ARB_uniform_buffer_object MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS + use ARB_uniform_buffer_object MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS + use ARB_uniform_buffer_object UNIFORM_BUFFER_OFFSET_ALIGNMENT + use ARB_uniform_buffer_object ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH + use ARB_uniform_buffer_object ACTIVE_UNIFORM_BLOCKS + use ARB_uniform_buffer_object UNIFORM_TYPE + use ARB_uniform_buffer_object UNIFORM_SIZE + use ARB_uniform_buffer_object UNIFORM_NAME_LENGTH + use ARB_uniform_buffer_object UNIFORM_BLOCK_INDEX + use ARB_uniform_buffer_object UNIFORM_OFFSET + use ARB_uniform_buffer_object UNIFORM_ARRAY_STRIDE + use ARB_uniform_buffer_object UNIFORM_MATRIX_STRIDE + use ARB_uniform_buffer_object UNIFORM_IS_ROW_MAJOR + use ARB_uniform_buffer_object UNIFORM_BLOCK_BINDING + use ARB_uniform_buffer_object UNIFORM_BLOCK_DATA_SIZE + use ARB_uniform_buffer_object UNIFORM_BLOCK_NAME_LENGTH + use ARB_uniform_buffer_object UNIFORM_BLOCK_ACTIVE_UNIFORMS + use ARB_uniform_buffer_object UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES + use ARB_uniform_buffer_object UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER + use ARB_uniform_buffer_object UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER + use ARB_uniform_buffer_object UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER + use ARB_uniform_buffer_object INVALID_INDEX + +ARB_uniform_buffer_object enum: + UNIFORM_BUFFER_BINDING = 0x8A28 + UNIFORM_BUFFER_START = 0x8A29 + UNIFORM_BUFFER_SIZE = 0x8A2A + MAX_VERTEX_UNIFORM_BLOCKS = 0x8A2B + MAX_GEOMETRY_UNIFORM_BLOCKS = 0x8A2C + MAX_FRAGMENT_UNIFORM_BLOCKS = 0x8A2D + MAX_COMBINED_UNIFORM_BLOCKS = 0x8A2E + MAX_UNIFORM_BUFFER_BINDINGS = 0x8A2F + MAX_UNIFORM_BLOCK_SIZE = 0x8A30 + MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS = 0x8A31 + MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS = 0x8A32 + MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS = 0x8A33 + UNIFORM_BUFFER_OFFSET_ALIGNMENT = 0x8A34 + ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH = 0x8A35 + ACTIVE_UNIFORM_BLOCKS = 0x8A36 + UNIFORM_TYPE = 0x8A37 + UNIFORM_SIZE = 0x8A38 + UNIFORM_NAME_LENGTH = 0x8A39 + UNIFORM_BLOCK_INDEX = 0x8A3A + UNIFORM_OFFSET = 0x8A3B + UNIFORM_ARRAY_STRIDE = 0x8A3C + UNIFORM_MATRIX_STRIDE = 0x8A3D + UNIFORM_IS_ROW_MAJOR = 0x8A3E + UNIFORM_BLOCK_BINDING = 0x8A3F + UNIFORM_BLOCK_DATA_SIZE = 0x8A40 + UNIFORM_BLOCK_NAME_LENGTH = 0x8A41 + UNIFORM_BLOCK_ACTIVE_UNIFORMS = 0x8A42 + UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES = 0x8A43 + UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER = 0x8A44 + UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER = 0x8A45 + UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER = 0x8A46 + INVALID_INDEX = 0xFFFFFFFFu + +# APPLE_future_use: 0x8A47-0x8A7F + +############################################################################### + +# Matrox: 0x8A80-0x8AEF + +############################################################################### + +# Chromium (Brian Paul): 0x8AF0-0x8B2F + +############################################################################### + +# ARB HLSL shader extensions: 0x8B30-0x8B8F + + +VERSION_3_1 enum: (Promoted from ARB_shader_objects + ARB_texture_rectangle) + SAMPLER_2D_RECT = 0x8B63 # ARB_shader_objects + ARB_texture_rectangle + SAMPLER_2D_RECT_SHADOW = 0x8B64 # ARB_shader_objects + ARB_texture_rectangle + +#@@ separate extensions +VERSION_2_0 enum: (Promoted for OpenGL 2.0; only some values; renaming in many cases) +ARB_shader_objects, ARB_vertex_shader, ARB_fragment_shader enum: +NV_vertex_program3 enum: (reuses 0x8B4C) +##Shader types + room for expansion + FRAGMENT_SHADER = 0x8B30 # VERSION_2_0 + FRAGMENT_SHADER_ARB = 0x8B30 # ARB_fragment_shader + VERTEX_SHADER = 0x8B31 # VERSION_2_0 + VERTEX_SHADER_ARB = 0x8B31 # ARB_vertex_shader +# ARB_future_use: 0x8B32-0x8B3F (for shader types) +##Container types + room for expansion + PROGRAM_OBJECT_ARB = 0x8B40 # ARB_shader_objects +# ARB_future_use: 0x8B41-0x8B47 (for container types) +##Misc. shader enums + SHADER_OBJECT_ARB = 0x8B48 # ARB_shader_objects + MAX_FRAGMENT_UNIFORM_COMPONENTS = 0x8B49 # VERSION_2_0 + MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB = 0x8B49 # ARB_fragment_shader + MAX_VERTEX_UNIFORM_COMPONENTS = 0x8B4A # VERSION_2_0 + MAX_VERTEX_UNIFORM_COMPONENTS_ARB = 0x8B4A # ARB_vertex_shader + MAX_VARYING_FLOATS = 0x8B4B # VERSION_2_0 + MAX_VARYING_FLOATS_ARB = 0x8B4B # ARB_vertex_shader + MAX_VERTEX_TEXTURE_IMAGE_UNITS = 0x8B4C # VERSION_2_0 + MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB = 0x8B4C # ARB_vertex_shader, NV_vertex_program3 + MAX_COMBINED_TEXTURE_IMAGE_UNITS = 0x8B4D # VERSION_2_0 + MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB = 0x8B4D # ARB_vertex_shader + OBJECT_TYPE_ARB = 0x8B4E # ARB_shader_objects + SHADER_TYPE = 0x8B4F # VERSION_2_0 (renamed) + OBJECT_SUBTYPE_ARB = 0x8B4F # ARB_shader_objects +##Attribute types + room for expansion. + FLOAT_VEC2 = 0x8B50 # VERSION_2_0 + FLOAT_VEC2_ARB = 0x8B50 # ARB_shader_objects + FLOAT_VEC3 = 0x8B51 # VERSION_2_0 + FLOAT_VEC3_ARB = 0x8B51 # ARB_shader_objects + FLOAT_VEC4 = 0x8B52 # VERSION_2_0 + FLOAT_VEC4_ARB = 0x8B52 # ARB_shader_objects + INT_VEC2 = 0x8B53 # VERSION_2_0 + INT_VEC2_ARB = 0x8B53 # ARB_shader_objects + INT_VEC3 = 0x8B54 # VERSION_2_0 + INT_VEC3_ARB = 0x8B54 # ARB_shader_objects + INT_VEC4 = 0x8B55 # VERSION_2_0 + INT_VEC4_ARB = 0x8B55 # ARB_shader_objects + BOOL = 0x8B56 # VERSION_2_0 + BOOL_ARB = 0x8B56 # ARB_shader_objects + BOOL_VEC2 = 0x8B57 # VERSION_2_0 + BOOL_VEC2_ARB = 0x8B57 # ARB_shader_objects + BOOL_VEC3 = 0x8B58 # VERSION_2_0 + BOOL_VEC3_ARB = 0x8B58 # ARB_shader_objects + BOOL_VEC4 = 0x8B59 # VERSION_2_0 + BOOL_VEC4_ARB = 0x8B59 # ARB_shader_objects + FLOAT_MAT2 = 0x8B5A # VERSION_2_0 + FLOAT_MAT2_ARB = 0x8B5A # ARB_shader_objects + FLOAT_MAT3 = 0x8B5B # VERSION_2_0 + FLOAT_MAT3_ARB = 0x8B5B # ARB_shader_objects + FLOAT_MAT4 = 0x8B5C # VERSION_2_0 + FLOAT_MAT4_ARB = 0x8B5C # ARB_shader_objects + SAMPLER_1D = 0x8B5D # VERSION_2_0 + SAMPLER_1D_ARB = 0x8B5D # ARB_shader_objects + SAMPLER_2D = 0x8B5E # VERSION_2_0 + SAMPLER_2D_ARB = 0x8B5E # ARB_shader_objects + SAMPLER_3D = 0x8B5F # VERSION_2_0 + SAMPLER_3D_ARB = 0x8B5F # ARB_shader_objects + SAMPLER_CUBE = 0x8B60 # VERSION_2_0 + SAMPLER_CUBE_ARB = 0x8B60 # ARB_shader_objects + SAMPLER_1D_SHADOW = 0x8B61 # VERSION_2_0 + SAMPLER_1D_SHADOW_ARB = 0x8B61 # ARB_shader_objects + SAMPLER_2D_SHADOW = 0x8B62 # VERSION_2_0 + SAMPLER_2D_SHADOW_ARB = 0x8B62 # ARB_shader_objects + SAMPLER_2D_RECT_ARB = 0x8B63 # ARB_shader_objects + SAMPLER_2D_RECT_SHADOW_ARB = 0x8B64 # ARB_shader_objects + FLOAT_MAT2x3 = 0x8B65 # VERSION_2_1 + FLOAT_MAT2x4 = 0x8B66 # VERSION_2_1 + FLOAT_MAT3x2 = 0x8B67 # VERSION_2_1 + FLOAT_MAT3x4 = 0x8B68 # VERSION_2_1 + FLOAT_MAT4x2 = 0x8B69 # VERSION_2_1 + FLOAT_MAT4x3 = 0x8B6A # VERSION_2_1 +# ARB_future_use: 0x8B6B-0x8B7F (for attribute types) + DELETE_STATUS = 0x8B80 # VERSION_2_0 (renamed) + OBJECT_DELETE_STATUS_ARB = 0x8B80 # ARB_shader_objects + COMPILE_STATUS = 0x8B81 # VERSION_2_0 (renamed) + OBJECT_COMPILE_STATUS_ARB = 0x8B81 # ARB_shader_objects + LINK_STATUS = 0x8B82 # VERSION_2_0 (renamed) + OBJECT_LINK_STATUS_ARB = 0x8B82 # ARB_shader_objects + VALIDATE_STATUS = 0x8B83 # VERSION_2_0 (renamed) + OBJECT_VALIDATE_STATUS_ARB = 0x8B83 # ARB_shader_objects + INFO_LOG_LENGTH = 0x8B84 # VERSION_2_0 (renamed) + OBJECT_INFO_LOG_LENGTH_ARB = 0x8B84 # ARB_shader_objects + ATTACHED_SHADERS = 0x8B85 # VERSION_2_0 (renamed) + OBJECT_ATTACHED_OBJECTS_ARB = 0x8B85 # ARB_shader_objects + ACTIVE_UNIFORMS = 0x8B86 # VERSION_2_0 (renamed) + OBJECT_ACTIVE_UNIFORMS_ARB = 0x8B86 # ARB_shader_objects + ACTIVE_UNIFORM_MAX_LENGTH = 0x8B87 # VERSION_2_0 (renamed) + OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB = 0x8B87 # ARB_shader_objects + SHADER_SOURCE_LENGTH = 0x8B88 # VERSION_2_0 (renamed) + OBJECT_SHADER_SOURCE_LENGTH_ARB = 0x8B88 # ARB_shader_objects + ACTIVE_ATTRIBUTES = 0x8B89 # VERSION_2_0 (renamed) + OBJECT_ACTIVE_ATTRIBUTES_ARB = 0x8B89 # ARB_vertex_shader + ACTIVE_ATTRIBUTE_MAX_LENGTH = 0x8B8A # VERSION_2_0 (renamed) + OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB = 0x8B8A # ARB_vertex_shader + FRAGMENT_SHADER_DERIVATIVE_HINT = 0x8B8B # VERSION_2_0 + FRAGMENT_SHADER_DERIVATIVE_HINT_ARB = 0x8B8B # ARB_fragment_shader + SHADING_LANGUAGE_VERSION = 0x8B8C # VERSION_2_0 + SHADING_LANGUAGE_VERSION_ARB = 0x8B8C # ARB_shading_language_100 + +# Aliases ARB_shader_objects enum above +OES_texture3D enum: (OpenGL ES only; additional; see above) + SAMPLER_3D_OES = 0x8B5F # ARB_shader_objects + +# Aliases ARB_fragment_shader enum above +OES_standard_derivatives enum: (OpenGL ES only) + FRAGMENT_SHADER_DERIVATIVE_HINT_OES = 0x8B8B + +VERSION_3_0 enum: + MAX_VARYING_COMPONENTS = 0x8B4B # VERSION_3_0 # alias GL_MAX_VARYING_FLOATS + +ARB_geometry_shader4 enum: (additional; see below; note: no ARB suffixes) + use VERSION_3_0 MAX_VARYING_COMPONENTS + +EXT_geometry_shader4 enum: (additional; see below) + MAX_VARYING_COMPONENTS_EXT = 0x8B4B + +VERSION_2_0 enum: + CURRENT_PROGRAM = 0x8B8D + +# Aliases CURRENT_PROGRAM +EXT_separate_shader_objects enum: + ACTIVE_PROGRAM_EXT = 0x8B8D + +# ARB_future_use: 0x8B8E-0x8B8F + +############################################################################### + +# Khronos OpenGL ES WG: 0x8B90-0x8B9F + +OES_compressed_paletted_texture enum: (OpenGL ES only) + PALETTE4_RGB8_OES = 0x8B90 + PALETTE4_RGBA8_OES = 0x8B91 + PALETTE4_R5_G6_B5_OES = 0x8B92 + PALETTE4_RGBA4_OES = 0x8B93 + PALETTE4_RGB5_A1_OES = 0x8B94 + PALETTE8_RGB8_OES = 0x8B95 + PALETTE8_RGBA8_OES = 0x8B96 + PALETTE8_R5_G6_B5_OES = 0x8B97 + PALETTE8_RGBA4_OES = 0x8B98 + PALETTE8_RGB5_A1_OES = 0x8B99 + +OES_read_format enum: (OpenGL ES, also implemented in Mesa) + IMPLEMENTATION_COLOR_READ_TYPE_OES = 0x8B9A + IMPLEMENTATION_COLOR_READ_FORMAT_OES = 0x8B9B + +OES_point_size_array enum: (OpenGL ES only; additional; see above) + POINT_SIZE_ARRAY_OES = 0x8B9C + +OES_draw_texture enum: (OpenGL ES only) + TEXTURE_CROP_RECT_OES = 0x8B9D + +OES_matrix_palette enum: (OpenGL ES only) + MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES = 0x8B9E + +OES_point_size_array enum: (OpenGL ES only; additional; see above) + POINT_SIZE_ARRAY_BUFFER_BINDING_OES = 0x8B9F + +############################################################################### + +# Seaweed: 0x8BA0-0x8BAF + +############################################################################### + +# Mesa: 0x8BB0-0x8BBF +# Probably one of the two 0x8BB4 enums should be 0x8BB5, but the +# extension spec is not complete in any event. +MESA_program_debug enum: + FRAGMENT_PROGRAM_POSITION_MESA = 0x8BB0 + FRAGMENT_PROGRAM_CALLBACK_MESA = 0x8BB1 + FRAGMENT_PROGRAM_CALLBACK_FUNC_MESA = 0x8BB2 + FRAGMENT_PROGRAM_CALLBACK_DATA_MESA = 0x8BB3 + VERTEX_PROGRAM_CALLBACK_MESA = 0x8BB4 + VERTEX_PROGRAM_POSITION_MESA = 0x8BB4 + VERTEX_PROGRAM_CALLBACK_FUNC_MESA = 0x8BB6 + VERTEX_PROGRAM_CALLBACK_DATA_MESA = 0x8BB7 + +############################################################################### + +# ATI: 0x8BC0-0x8BFF + +AMD_performance_monitor enum: + COUNTER_TYPE_AMD = 0x8BC0 + COUNTER_RANGE_AMD = 0x8BC1 + UNSIGNED_INT64_AMD = 0x8BC2 + PERCENTAGE_AMD = 0x8BC3 + PERFMON_RESULT_AVAILABLE_AMD = 0x8BC4 + PERFMON_RESULT_SIZE_AMD = 0x8BC5 + PERFMON_RESULT_AMD = 0x8BC6 + +# ATI_future_use: 0x8BC7-0x8BD1 + +QCOM_extended_get enum: (OpenGL ES only) + TEXTURE_WIDTH_QCOM = 0x8BD2 + TEXTURE_HEIGHT_QCOM = 0x8BD3 + TEXTURE_DEPTH_QCOM = 0x8BD4 + TEXTURE_INTERNAL_FORMAT_QCOM = 0x8BD5 + TEXTURE_FORMAT_QCOM = 0x8BD6 + TEXTURE_TYPE_QCOM = 0x8BD7 + TEXTURE_IMAGE_VALID_QCOM = 0x8BD8 + TEXTURE_NUM_LEVELS_QCOM = 0x8BD9 + TEXTURE_TARGET_QCOM = 0x8BDA + TEXTURE_OBJECT_VALID_QCOM = 0x8BDB + STATE_RESTORE = 0x8BDC + +# ATI_future_use: 0x8BDD-0x8BFF + +############################################################################### + +# Imagination Tech.: 0x8C00-0x8C0F + +IMG_texture_compression_pvrtc enum: (OpenGL ES only) + COMPRESSED_RGB_PVRTC_4BPPV1_IMG = 0x8C00 + COMPRESSED_RGB_PVRTC_2BPPV1_IMG = 0x8C01 + COMPRESSED_RGBA_PVRTC_4BPPV1_IMG = 0x8C02 + COMPRESSED_RGBA_PVRTC_2BPPV1_IMG = 0x8C03 + +IMG_texture_env_enhanced_fixed_function enum: (OpenGL ES only) + MODULATE_COLOR_IMG = 0x8C04 + RECIP_ADD_SIGNED_ALPHA_IMG = 0x8C05 + TEXTURE_ALPHA_MODULATE_IMG = 0x8C06 + FACTOR_ALPHA_MODULATE_IMG = 0x8C07 + FRAGMENT_ALPHA_MODULATE_IMG = 0x8C08 + ADD_BLEND_IMG = 0x8C09 + +IMG_shader_binary: (OpenGL ES only) + SGX_BINARY_IMG = 0x8C0A + +# IMG_future_use: 0x8C0B-0x8C0F + +############################################################################### + +# NVIDIA: 0x8C10-0x8C8F (Pat Brown) + +VERSION_3_0 enum: + use ARB_framebuffer_object TEXTURE_RED_TYPE + use ARB_framebuffer_object TEXTURE_GREEN_TYPE + use ARB_framebuffer_object TEXTURE_BLUE_TYPE + use ARB_framebuffer_object TEXTURE_ALPHA_TYPE + use ARB_framebuffer_object TEXTURE_LUMINANCE_TYPE + use ARB_framebuffer_object TEXTURE_INTENSITY_TYPE + use ARB_framebuffer_object TEXTURE_DEPTH_TYPE + use ARB_framebuffer_object UNSIGNED_NORMALIZED + +ARB_framebuffer_object enum: (note: no ARB suffixes) + TEXTURE_RED_TYPE = 0x8C10 # VERSION_3_0 / ARB_fbo + TEXTURE_GREEN_TYPE = 0x8C11 # VERSION_3_0 / ARB_fbo + TEXTURE_BLUE_TYPE = 0x8C12 # VERSION_3_0 / ARB_fbo + TEXTURE_ALPHA_TYPE = 0x8C13 # VERSION_3_0 / ARB_fbo + TEXTURE_LUMINANCE_TYPE = 0x8C14 # VERSION_3_0 / ARB_fbo + TEXTURE_INTENSITY_TYPE = 0x8C15 # VERSION_3_0 / ARB_fbo + TEXTURE_DEPTH_TYPE = 0x8C16 # VERSION_3_0 / ARB_fbo + UNSIGNED_NORMALIZED = 0x8C17 # VERSION_3_0 / ARB_fbo + +ARB_texture_float enum: (additional; see above) + TEXTURE_RED_TYPE_ARB = 0x8C10 + TEXTURE_GREEN_TYPE_ARB = 0x8C11 + TEXTURE_BLUE_TYPE_ARB = 0x8C12 + TEXTURE_ALPHA_TYPE_ARB = 0x8C13 + TEXTURE_LUMINANCE_TYPE_ARB = 0x8C14 + TEXTURE_INTENSITY_TYPE_ARB = 0x8C15 + TEXTURE_DEPTH_TYPE_ARB = 0x8C16 + UNSIGNED_NORMALIZED_ARB = 0x8C17 + +VERSION_3_0 enum: + TEXTURE_1D_ARRAY = 0x8C18 # VERSION_3_0 + PROXY_TEXTURE_1D_ARRAY = 0x8C19 # VERSION_3_0 + TEXTURE_2D_ARRAY = 0x8C1A # VERSION_3_0 + PROXY_TEXTURE_2D_ARRAY = 0x8C1B # VERSION_3_0 + TEXTURE_BINDING_1D_ARRAY = 0x8C1C # VERSION_3_0 + TEXTURE_BINDING_2D_ARRAY = 0x8C1D # VERSION_3_0 + +EXT_texture_array enum: + TEXTURE_1D_ARRAY_EXT = 0x8C18 + PROXY_TEXTURE_1D_ARRAY_EXT = 0x8C19 + TEXTURE_2D_ARRAY_EXT = 0x8C1A + PROXY_TEXTURE_2D_ARRAY_EXT = 0x8C1B + TEXTURE_BINDING_1D_ARRAY_EXT = 0x8C1C + TEXTURE_BINDING_2D_ARRAY_EXT = 0x8C1D + +# NV_future_use: 0x8C1E-0x8C25 + +VERSION_3_2 enum: + MAX_GEOMETRY_TEXTURE_IMAGE_UNITS = 0x8C29 + +ARB_geometry_shader4 enum: (additional; see below) + MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB = 0x8C29 + +NV_geometry_program4 enum: + GEOMETRY_PROGRAM_NV = 0x8C26 + MAX_PROGRAM_OUTPUT_VERTICES_NV = 0x8C27 + MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV = 0x8C28 + MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT = 0x8C29 + +VERSION_3_1 enum: + TEXTURE_BUFFER = 0x8C2A + MAX_TEXTURE_BUFFER_SIZE = 0x8C2B + TEXTURE_BINDING_BUFFER = 0x8C2C + TEXTURE_BUFFER_DATA_STORE_BINDING = 0x8C2D + TEXTURE_BUFFER_FORMAT = 0x8C2E + +ARB_texture_buffer_object enum: + TEXTURE_BUFFER_ARB = 0x8C2A + MAX_TEXTURE_BUFFER_SIZE_ARB = 0x8C2B + TEXTURE_BINDING_BUFFER_ARB = 0x8C2C + TEXTURE_BUFFER_DATA_STORE_BINDING_ARB = 0x8C2D + TEXTURE_BUFFER_FORMAT_ARB = 0x8C2E + +EXT_texture_buffer_object enum: + TEXTURE_BUFFER_EXT = 0x8C2A + MAX_TEXTURE_BUFFER_SIZE_EXT = 0x8C2B + TEXTURE_BINDING_BUFFER_EXT = 0x8C2C + TEXTURE_BUFFER_DATA_STORE_BINDING_EXT = 0x8C2D + TEXTURE_BUFFER_FORMAT_EXT = 0x8C2E + +# NV_future_use: 0x8C2F-0x8C35 + +ARB_sample_shading enum: + SAMPLE_SHADING_ARB = 0x8C36 + MIN_SAMPLE_SHADING_VALUE_ARB = 0x8C37 + +# NV_future_use: 0x8C38-0x8C39 + +VERSION_3_0 enum: + R11F_G11F_B10F = 0x8C3A # VERSION_3_0 + UNSIGNED_INT_10F_11F_11F_REV = 0x8C3B # VERSION_3_0 + +EXT_packed_float enum: + R11F_G11F_B10F_EXT = 0x8C3A + UNSIGNED_INT_10F_11F_11F_REV_EXT = 0x8C3B + RGBA_SIGNED_COMPONENTS_EXT = 0x8C3C + +VERSION_3_0 enum: + RGB9_E5 = 0x8C3D # VERSION_3_0 + UNSIGNED_INT_5_9_9_9_REV = 0x8C3E # VERSION_3_0 + TEXTURE_SHARED_SIZE = 0x8C3F # VERSION_3_0 + +EXT_texture_shared_exponent enum: + RGB9_E5_EXT = 0x8C3D + UNSIGNED_INT_5_9_9_9_REV_EXT = 0x8C3E + TEXTURE_SHARED_SIZE_EXT = 0x8C3F + +VERSION_2_1 enum: (Generic formats promoted for OpenGL 2.1) + SRGB = 0x8C40 # VERSION_2_1 + SRGB8 = 0x8C41 # VERSION_2_1 + SRGB_ALPHA = 0x8C42 # VERSION_2_1 + SRGB8_ALPHA8 = 0x8C43 # VERSION_2_1 + SLUMINANCE_ALPHA = 0x8C44 # VERSION_2_1 + SLUMINANCE8_ALPHA8 = 0x8C45 # VERSION_2_1 + SLUMINANCE = 0x8C46 # VERSION_2_1 + SLUMINANCE8 = 0x8C47 # VERSION_2_1 + COMPRESSED_SRGB = 0x8C48 # VERSION_2_1 + COMPRESSED_SRGB_ALPHA = 0x8C49 # VERSION_2_1 + COMPRESSED_SLUMINANCE = 0x8C4A # VERSION_2_1 + COMPRESSED_SLUMINANCE_ALPHA = 0x8C4B # VERSION_2_1 + +EXT_texture_sRGB enum: + SRGB_EXT = 0x8C40 # EXT_texture_sRGB + SRGB8_EXT = 0x8C41 # EXT_texture_sRGB + SRGB_ALPHA_EXT = 0x8C42 # EXT_texture_sRGB + SRGB8_ALPHA8_EXT = 0x8C43 # EXT_texture_sRGB + SLUMINANCE_ALPHA_EXT = 0x8C44 # EXT_texture_sRGB + SLUMINANCE8_ALPHA8_EXT = 0x8C45 # EXT_texture_sRGB + SLUMINANCE_EXT = 0x8C46 # EXT_texture_sRGB + SLUMINANCE8_EXT = 0x8C47 # EXT_texture_sRGB + COMPRESSED_SRGB_EXT = 0x8C48 # EXT_texture_sRGB + COMPRESSED_SRGB_ALPHA_EXT = 0x8C49 # EXT_texture_sRGB + COMPRESSED_SLUMINANCE_EXT = 0x8C4A # EXT_texture_sRGB + COMPRESSED_SLUMINANCE_ALPHA_EXT = 0x8C4B # EXT_texture_sRGB + COMPRESSED_SRGB_S3TC_DXT1_EXT = 0x8C4C + COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT = 0x8C4D + COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT = 0x8C4E + COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT = 0x8C4F + +# NV_future_use: 0x8C50-0x8C6F + +EXT_texture_compression_latc enum: + COMPRESSED_LUMINANCE_LATC1_EXT = 0x8C70 + COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT = 0x8C71 + COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT = 0x8C72 + COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT = 0x8C73 + +# NV_future_use: 0x8C74-0x8C75 + +#@@ separate extensions +VERSION_3_0 enum: +EXT_transform_feedback enum: +NV_transform_feedback enum: + TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH = 0x8C76 # VERSION_3_0 + TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT = 0x8C76 + BACK_PRIMARY_COLOR_NV = 0x8C77 + BACK_SECONDARY_COLOR_NV = 0x8C78 + TEXTURE_COORD_NV = 0x8C79 + CLIP_DISTANCE_NV = 0x8C7A + VERTEX_ID_NV = 0x8C7B + PRIMITIVE_ID_NV = 0x8C7C + GENERIC_ATTRIB_NV = 0x8C7D + TRANSFORM_FEEDBACK_ATTRIBS_NV = 0x8C7E + TRANSFORM_FEEDBACK_BUFFER_MODE = 0x8C7F # VERSION_3_0 + TRANSFORM_FEEDBACK_BUFFER_MODE_EXT = 0x8C7F + TRANSFORM_FEEDBACK_BUFFER_MODE_NV = 0x8C7F + MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS = 0x8C80 # VERSION_3_0 + MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT = 0x8C80 + MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV = 0x8C80 + ACTIVE_VARYINGS_NV = 0x8C81 + ACTIVE_VARYING_MAX_LENGTH_NV = 0x8C82 + TRANSFORM_FEEDBACK_VARYINGS = 0x8C83 # VERSION_3_0 + TRANSFORM_FEEDBACK_VARYINGS_EXT = 0x8C83 + TRANSFORM_FEEDBACK_VARYINGS_NV = 0x8C83 + TRANSFORM_FEEDBACK_BUFFER_START = 0x8C84 # VERSION_3_0 + TRANSFORM_FEEDBACK_BUFFER_START_EXT = 0x8C84 + TRANSFORM_FEEDBACK_BUFFER_START_NV = 0x8C84 + TRANSFORM_FEEDBACK_BUFFER_SIZE = 0x8C85 # VERSION_3_0 + TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT = 0x8C85 + TRANSFORM_FEEDBACK_BUFFER_SIZE_NV = 0x8C85 + TRANSFORM_FEEDBACK_RECORD_NV = 0x8C86 + PRIMITIVES_GENERATED = 0x8C87 # VERSION_3_0 + PRIMITIVES_GENERATED_EXT = 0x8C87 + PRIMITIVES_GENERATED_NV = 0x8C87 + TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN = 0x8C88 # VERSION_3_0 + TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT = 0x8C88 + TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV = 0x8C88 + RASTERIZER_DISCARD = 0x8C89 # VERSION_3_0 + RASTERIZER_DISCARD_EXT = 0x8C89 + RASTERIZER_DISCARD_NV = 0x8C89 + MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS = 0x8C8A # VERSION_3_0 + MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT = 0x8C8A + MAX_TRANSFORM_FEEDBACK_INTERLEAVED_ATTRIBS_NV = 0x8C8A + MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS = 0x8C8B # VERSION_3_0 + MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT = 0x8C8B + MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV = 0x8C8B + INTERLEAVED_ATTRIBS = 0x8C8C # VERSION_3_0 + INTERLEAVED_ATTRIBS_EXT = 0x8C8C + INTERLEAVED_ATTRIBS_NV = 0x8C8C + SEPARATE_ATTRIBS = 0x8C8D # VERSION_3_0 + SEPARATE_ATTRIBS_EXT = 0x8C8D + SEPARATE_ATTRIBS_NV = 0x8C8D + TRANSFORM_FEEDBACK_BUFFER = 0x8C8E # VERSION_3_0 + TRANSFORM_FEEDBACK_BUFFER_EXT = 0x8C8E + TRANSFORM_FEEDBACK_BUFFER_NV = 0x8C8E + TRANSFORM_FEEDBACK_BUFFER_BINDING = 0x8C8F # VERSION_3_0 + TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT = 0x8C8F + TRANSFORM_FEEDBACK_BUFFER_BINDING_NV = 0x8C8F + +############################################################################### + +# ATI: 0x8C90-0x8C9F (Affie Munshi, OpenGL ES extensions) + +# Reassigned to Qualcomm at time of mobile/desktop split (bug 5874) +# Qualcomm__future_use: 0x8C90-0x8C91 + +AMD_compressed_ATC_texture enum: (OpenGL ES only) + ATC_RGB_AMD = 0x8C92 + ATC_RGBA_EXPLICIT_ALPHA_AMD = 0x8C93 + +# Reassigned to Qualcomm at time of mobile/desktop split (bug 5874) +# Qualcomm_future_use: 0x8C94-0x8C9F + +############################################################################### + +# OpenGL ARB: 0x8CA0-0x8CAF + +VERSION_2_0 enum: + POINT_SPRITE_COORD_ORIGIN = 0x8CA0 + LOWER_LEFT = 0x8CA1 + UPPER_LEFT = 0x8CA2 + STENCIL_BACK_REF = 0x8CA3 + STENCIL_BACK_VALUE_MASK = 0x8CA4 + STENCIL_BACK_WRITEMASK = 0x8CA5 + +VERSION_3_0 enum: + use ARB_framebuffer_object FRAMEBUFFER_BINDING + use ARB_framebuffer_object DRAW_FRAMEBUFFER_BINDING + use ARB_framebuffer_object RENDERBUFFER_BINDING + +ARB_framebuffer_object enum: (note: no ARB suffixes) + FRAMEBUFFER_BINDING = 0x8CA6 # VERSION_3_0 / ARB_fbo + DRAW_FRAMEBUFFER_BINDING = 0x8CA6 # VERSION_3_0 / ARB_fbo # alias GL_FRAMEBUFFER_BINDING + RENDERBUFFER_BINDING = 0x8CA7 # VERSION_3_0 / ARB_fbo + +EXT_framebuffer_object enum: (additional; see below) + FRAMEBUFFER_BINDING_EXT = 0x8CA6 + RENDERBUFFER_BINDING_EXT = 0x8CA7 + +EXT_framebuffer_blit enum: (additional; see below) + DRAW_FRAMEBUFFER_BINDING_EXT = 0x8CA6 # EXT_framebuffer_blit # alias GL_FRAMEBUFFER_BINDING_EXT + +# Aliases EXT_framebuffer_object enums above +OES_framebuffer_object enum: (OpenGL ES only; additional; see below) + FRAMEBUFFER_BINDING_OES = 0x8CA6 + RENDERBUFFER_BINDING_OES = 0x8CA7 + +VERSION_3_0 enum: + use ARB_framebuffer_object READ_FRAMEBUFFER + use ARB_framebuffer_object DRAW_FRAMEBUFFER + use ARB_framebuffer_object READ_FRAMEBUFFER_BINDING + +ARB_framebuffer_object enum: (note: no ARB suffixes) + READ_FRAMEBUFFER = 0x8CA8 # VERSION_3_0 / ARB_fbo + DRAW_FRAMEBUFFER = 0x8CA9 # VERSION_3_0 / ARB_fbo + READ_FRAMEBUFFER_BINDING = 0x8CAA # VERSION_3_0 / ARB_fbo + +EXT_framebuffer_blit enum: + READ_FRAMEBUFFER_EXT = 0x8CA8 + DRAW_FRAMEBUFFER_EXT = 0x8CA9 + DRAW_FRAMEBUFFER_BINDING_EXT = 0x8CA6 # alias GL_FRAMEBUFFER_BINDING_EXT + READ_FRAMEBUFFER_BINDING_EXT = 0x8CAA + +VERSION_3_0 enum: + use ARB_framebuffer_object RENDERBUFFER_SAMPLES + +ARB_framebuffer_object enum: (note: no ARB suffixes) + RENDERBUFFER_SAMPLES = 0x8CAB # VERSION_3_0 / ARB_fbo + +EXT_framebuffer_multisample enum: + RENDERBUFFER_SAMPLES_EXT = 0x8CAB + +NV_framebuffer_multisample_coverage enum: (additional; see below) + RENDERBUFFER_COVERAGE_SAMPLES_NV = 0x8CAB + +# All enums except external format are incompatible with NV_depth_buffer_float +VERSION_3_0 enum: +ARB_depth_buffer_float enum: (note: no ARB suffixes) + DEPTH_COMPONENT32F = 0x8CAC + DEPTH32F_STENCIL8 = 0x8CAD + +# ARB_future_use: 0x8CAF + +############################################################################### + +# 3Dlabs: 0x8CB0-0x8CCF (Barthold Lichtenbelt, 2004/12/1) + +############################################################################### + +# OpenGL ARB: 0x8CD0-0x8D5F (Framebuffer object specification + headroom) + +#@@ separate extensions +VERSION_3_0 enum: +ARB_geometry_shader4 enum: (additional; see below; note: no ARB suffixes) +ARB_framebuffer_object enum: (note: no ARB suffixes) +EXT_framebuffer_object enum: (additional; see above) + FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 0x8CD0 # VERSION_3_0 / ARB_fbo + FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT = 0x8CD0 + FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 0x8CD1 # VERSION_3_0 / ARB_fbo + FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT = 0x8CD1 + FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 0x8CD2 # VERSION_3_0 / ARB_fbo + FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT = 0x8CD2 + FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 0x8CD3 # VERSION_3_0 / ARB_fbo + FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT = 0x8CD3 + FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER = 0x8CD4 # VERSION_3_0 / ARB_fbo + FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT = 0x8CD4 + FRAMEBUFFER_COMPLETE = 0x8CD5 # VERSION_3_0 / ARB_fbo + FRAMEBUFFER_COMPLETE_EXT = 0x8CD5 + FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 0x8CD6 # VERSION_3_0 / ARB_fbo + FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT = 0x8CD6 + FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 0x8CD7 # VERSION_3_0 / ARB_fbo + FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT = 0x8CD7 +## Removed 2005/09/26 in revision #117 of the extension: +## FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT = 0x8CD8 + FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT = 0x8CD9 + FRAMEBUFFER_INCOMPLETE_FORMATS_EXT = 0x8CDA + FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER = 0x8CDB # VERSION_3_0 / ARB_fbo + FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT = 0x8CDB + FRAMEBUFFER_INCOMPLETE_READ_BUFFER = 0x8CDC # VERSION_3_0 / ARB_fbo + FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT = 0x8CDC + FRAMEBUFFER_UNSUPPORTED = 0x8CDD # VERSION_3_0 / ARB_fbo + FRAMEBUFFER_UNSUPPORTED_EXT = 0x8CDD +## Removed 2005/05/31 in revision #113 of the extension: +## FRAMEBUFFER_STATUS_ERROR_EXT = 0x8CDE + MAX_COLOR_ATTACHMENTS = 0x8CDF # VERSION_3_0 / ARB_fbo + MAX_COLOR_ATTACHMENTS_EXT = 0x8CDF + COLOR_ATTACHMENT0 = 0x8CE0 # VERSION_3_0 / ARB_fbo + COLOR_ATTACHMENT0_EXT = 0x8CE0 + COLOR_ATTACHMENT1 = 0x8CE1 # VERSION_3_0 / ARB_fbo + COLOR_ATTACHMENT1_EXT = 0x8CE1 + COLOR_ATTACHMENT2 = 0x8CE2 # VERSION_3_0 / ARB_fbo + COLOR_ATTACHMENT2_EXT = 0x8CE2 + COLOR_ATTACHMENT3 = 0x8CE3 # VERSION_3_0 / ARB_fbo + COLOR_ATTACHMENT3_EXT = 0x8CE3 + COLOR_ATTACHMENT4 = 0x8CE4 # VERSION_3_0 / ARB_fbo + COLOR_ATTACHMENT4_EXT = 0x8CE4 + COLOR_ATTACHMENT5 = 0x8CE5 # VERSION_3_0 / ARB_fbo + COLOR_ATTACHMENT5_EXT = 0x8CE5 + COLOR_ATTACHMENT6 = 0x8CE6 # VERSION_3_0 / ARB_fbo + COLOR_ATTACHMENT6_EXT = 0x8CE6 + COLOR_ATTACHMENT7 = 0x8CE7 # VERSION_3_0 / ARB_fbo + COLOR_ATTACHMENT7_EXT = 0x8CE7 + COLOR_ATTACHMENT8 = 0x8CE8 # VERSION_3_0 / ARB_fbo + COLOR_ATTACHMENT8_EXT = 0x8CE8 + COLOR_ATTACHMENT9 = 0x8CE9 # VERSION_3_0 / ARB_fbo + COLOR_ATTACHMENT9_EXT = 0x8CE9 + COLOR_ATTACHMENT10 = 0x8CEA # VERSION_3_0 / ARB_fbo + COLOR_ATTACHMENT10_EXT = 0x8CEA + COLOR_ATTACHMENT11 = 0x8CEB # VERSION_3_0 / ARB_fbo + COLOR_ATTACHMENT11_EXT = 0x8CEB + COLOR_ATTACHMENT12 = 0x8CEC # VERSION_3_0 / ARB_fbo + COLOR_ATTACHMENT12_EXT = 0x8CEC + COLOR_ATTACHMENT13 = 0x8CED # VERSION_3_0 / ARB_fbo + COLOR_ATTACHMENT13_EXT = 0x8CED + COLOR_ATTACHMENT14 = 0x8CEE # VERSION_3_0 / ARB_fbo + COLOR_ATTACHMENT14_EXT = 0x8CEE + COLOR_ATTACHMENT15 = 0x8CEF # VERSION_3_0 / ARB_fbo + COLOR_ATTACHMENT15_EXT = 0x8CEF +# 0x8CF0-0x8CFF reserved for color attachments 16-31, if needed + DEPTH_ATTACHMENT = 0x8D00 # VERSION_3_0 / ARB_fbo + DEPTH_ATTACHMENT_EXT = 0x8D00 +# 0x8D01-0x8D1F reserved for depth attachments 1-31, if needed + STENCIL_ATTACHMENT = 0x8D20 # VERSION_3_0 / ARB_fbo + STENCIL_ATTACHMENT_EXT = 0x8D20 +# 0x8D21-0x8D3F reserved for stencil attachments 1-31, if needed + FRAMEBUFFER = 0x8D40 # VERSION_3_0 / ARB_fbo + FRAMEBUFFER_EXT = 0x8D40 + RENDERBUFFER = 0x8D41 # VERSION_3_0 / ARB_fbo + RENDERBUFFER_EXT = 0x8D41 + RENDERBUFFER_WIDTH = 0x8D42 # VERSION_3_0 / ARB_fbo + RENDERBUFFER_WIDTH_EXT = 0x8D42 + RENDERBUFFER_HEIGHT = 0x8D43 # VERSION_3_0 / ARB_fbo + RENDERBUFFER_HEIGHT_EXT = 0x8D43 + RENDERBUFFER_INTERNAL_FORMAT = 0x8D44 # VERSION_3_0 / ARB_fbo + RENDERBUFFER_INTERNAL_FORMAT_EXT = 0x8D44 +# 0x8D45 unused (reserved for STENCIL_INDEX_EXT, but now use core STENCIL_INDEX instead) + STENCIL_INDEX1 = 0x8D46 # VERSION_3_0 / ARB_fbo + STENCIL_INDEX1_EXT = 0x8D46 + STENCIL_INDEX4 = 0x8D47 # VERSION_3_0 / ARB_fbo + STENCIL_INDEX4_EXT = 0x8D47 + STENCIL_INDEX8 = 0x8D48 # VERSION_3_0 / ARB_fbo + STENCIL_INDEX8_EXT = 0x8D48 + STENCIL_INDEX16 = 0x8D49 # VERSION_3_0 / ARB_fbo + STENCIL_INDEX16_EXT = 0x8D49 +# 0x8D4A-0x8D4D reserved for additional stencil formats +# Added 2005/05/31 in revision #113 of the extension: + RENDERBUFFER_RED_SIZE = 0x8D50 # VERSION_3_0 / ARB_fbo + RENDERBUFFER_RED_SIZE_EXT = 0x8D50 + RENDERBUFFER_GREEN_SIZE = 0x8D51 # VERSION_3_0 / ARB_fbo + RENDERBUFFER_GREEN_SIZE_EXT = 0x8D51 + RENDERBUFFER_BLUE_SIZE = 0x8D52 # VERSION_3_0 / ARB_fbo + RENDERBUFFER_BLUE_SIZE_EXT = 0x8D52 + RENDERBUFFER_ALPHA_SIZE = 0x8D53 # VERSION_3_0 / ARB_fbo + RENDERBUFFER_ALPHA_SIZE_EXT = 0x8D53 + RENDERBUFFER_DEPTH_SIZE = 0x8D54 # VERSION_3_0 / ARB_fbo + RENDERBUFFER_DEPTH_SIZE_EXT = 0x8D54 + RENDERBUFFER_STENCIL_SIZE = 0x8D55 # VERSION_3_0 / ARB_fbo + RENDERBUFFER_STENCIL_SIZE_EXT = 0x8D55 + +# Aliases EXT_framebuffer_object enum above +# @@@??? does this appear in OES_texture3D, or OES_framebuffer_object? +# extension spec & gl2ext.h disagree! +OES_texture3D enum: (OpenGL ES only; additional; see above) + FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES = 0x8CD4 + +# Aliases EXT_framebuffer_object enums above +OES_framebuffer_object enum: (OpenGL ES only; additional; see below) + FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES = 0x8CD0 + FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES = 0x8CD1 + FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES = 0x8CD2 + FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES = 0x8CD3 + FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES = 0x8CD4 + FRAMEBUFFER_COMPLETE_OES = 0x8CD5 + FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES = 0x8CD6 + FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES = 0x8CD7 + FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES = 0x8CD9 + FRAMEBUFFER_INCOMPLETE_FORMATS_OES = 0x8CDA + FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_OES = 0x8CDB + FRAMEBUFFER_INCOMPLETE_READ_BUFFER_OES = 0x8CDC + FRAMEBUFFER_UNSUPPORTED_OES = 0x8CDD + COLOR_ATTACHMENT0_OES = 0x8CE0 + DEPTH_ATTACHMENT_OES = 0x8D00 + STENCIL_ATTACHMENT_OES = 0x8D20 + FRAMEBUFFER_OES = 0x8D40 + RENDERBUFFER_OES = 0x8D41 + RENDERBUFFER_WIDTH_OES = 0x8D42 + RENDERBUFFER_HEIGHT_OES = 0x8D43 + RENDERBUFFER_INTERNAL_FORMAT_OES = 0x8D44 + STENCIL_INDEX1_OES = 0x8D46 + STENCIL_INDEX4_OES = 0x8D47 + STENCIL_INDEX8_OES = 0x8D48 + RENDERBUFFER_RED_SIZE_OES = 0x8D50 + RENDERBUFFER_GREEN_SIZE_OES = 0x8D51 + RENDERBUFFER_BLUE_SIZE_OES = 0x8D52 + RENDERBUFFER_ALPHA_SIZE_OES = 0x8D53 + RENDERBUFFER_DEPTH_SIZE_OES = 0x8D54 + RENDERBUFFER_STENCIL_SIZE_OES = 0x8D55 + +OES_stencil1 enum: (OpenGL ES only; additional; see below) + use OES_framebuffer_object STENCIL_INDEX1_OES + +OES_stencil4 enum: (OpenGL ES only; additional; see below) + use OES_framebuffer_object STENCIL_INDEX4_OES + +OES_stencil8 enum: (OpenGL ES only; additional; see below) + use OES_framebuffer_object STENCIL_INDEX8_OES + +VERSION_3_0 enum: +ARB_framebuffer_object enum: (note: no ARB suffixes) +# Added 2006/10/10 in revision #6b of the extension. + FRAMEBUFFER_INCOMPLETE_MULTISAMPLE = 0x8D56 # VERSION_3_0 / ARB_fbo + MAX_SAMPLES = 0x8D57 # VERSION_3_0 / ARB_fbo + +EXT_framebuffer_multisample enum: (additional; see above) + FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT = 0x8D56 + MAX_SAMPLES_EXT = 0x8D57 + +# 0x8D58-0x8D5F reserved for additional FBO enums + +NV_geometry_program4 enum: (additional; see above) + FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT = 0x8CD4 + +############################################################################### + +# Khronos OpenGL ES WG: 0x8D60-0x8D6F + +OES_texture_cube_map enum: (OpenGL ES only) + TEXTURE_GEN_STR_OES = 0x8D60 + +OES_texture_float enum: (OpenGL ES only) + HALF_FLOAT_OES = 0x8D61 + +OES_vertex_half_float enum: (OpenGL ES only) + use OES_texture_float HALF_FLOAT_OES + +OES_framebuffer_object enum: (OpenGL ES only) + RGB565_OES = 0x8D62 + +# Khronos_future_use: 0x8D63 + +OES_compressed_ETC1_RGB8_texture enum: (OpenGL ES only) + ETC1_RGB8_OES = 0x8D64 + +OES_EGL_image_external enum: (OpenGL ES only) (Khronos bug 4621) + TEXTURE_EXTERNAL_OES = 0x8D65 + SAMPLER_EXTERNAL_OES = 0x8D66 + TEXTURE_BINDING_EXTERNAL_OES = 0x8D67 + REQUIRED_TEXTURE_IMAGE_UNITS_OES = 0x8D68 + +# Khronos_future_use: 0x8D69-0x8D6F + +############################################################################### + +# NVIDIA: 0x8D70-0x8DEF +# Reserved per email from Pat Brown 2005/10/13 + +#@@ separate extensions +VERSION_3_0 enum: +EXT_texture_integer enum: + RGBA32UI = 0x8D70 # VERSION_3_0 + RGBA32UI_EXT = 0x8D70 + RGB32UI = 0x8D71 # VERSION_3_0 + RGB32UI_EXT = 0x8D71 + ALPHA32UI_EXT = 0x8D72 + INTENSITY32UI_EXT = 0x8D73 + LUMINANCE32UI_EXT = 0x8D74 + LUMINANCE_ALPHA32UI_EXT = 0x8D75 + RGBA16UI = 0x8D76 # VERSION_3_0 + RGBA16UI_EXT = 0x8D76 + RGB16UI = 0x8D77 # VERSION_3_0 + RGB16UI_EXT = 0x8D77 + ALPHA16UI_EXT = 0x8D78 + INTENSITY16UI_EXT = 0x8D79 + LUMINANCE16UI_EXT = 0x8D7A + LUMINANCE_ALPHA16UI_EXT = 0x8D7B + RGBA8UI = 0x8D7C # VERSION_3_0 + RGBA8UI_EXT = 0x8D7C + RGB8UI = 0x8D7D # VERSION_3_0 + RGB8UI_EXT = 0x8D7D + ALPHA8UI_EXT = 0x8D7E + INTENSITY8UI_EXT = 0x8D7F + LUMINANCE8UI_EXT = 0x8D80 + LUMINANCE_ALPHA8UI_EXT = 0x8D81 + RGBA32I = 0x8D82 # VERSION_3_0 + RGBA32I_EXT = 0x8D82 + RGB32I = 0x8D83 # VERSION_3_0 + RGB32I_EXT = 0x8D83 + ALPHA32I_EXT = 0x8D84 + INTENSITY32I_EXT = 0x8D85 + LUMINANCE32I_EXT = 0x8D86 + LUMINANCE_ALPHA32I_EXT = 0x8D87 + RGBA16I = 0x8D88 # VERSION_3_0 + RGBA16I_EXT = 0x8D88 + RGB16I = 0x8D89 # VERSION_3_0 + RGB16I_EXT = 0x8D89 + ALPHA16I_EXT = 0x8D8A + INTENSITY16I_EXT = 0x8D8B + LUMINANCE16I_EXT = 0x8D8C + LUMINANCE_ALPHA16I_EXT = 0x8D8D + RGBA8I = 0x8D8E # VERSION_3_0 + RGBA8I_EXT = 0x8D8E + RGB8I = 0x8D8F # VERSION_3_0 + RGB8I_EXT = 0x8D8F + ALPHA8I_EXT = 0x8D90 + INTENSITY8I_EXT = 0x8D91 + LUMINANCE8I_EXT = 0x8D92 + LUMINANCE_ALPHA8I_EXT = 0x8D93 + RED_INTEGER = 0x8D94 # VERSION_3_0 + RED_INTEGER_EXT = 0x8D94 + GREEN_INTEGER = 0x8D95 # VERSION_3_0 + GREEN_INTEGER_EXT = 0x8D95 + BLUE_INTEGER = 0x8D96 # VERSION_3_0 + BLUE_INTEGER_EXT = 0x8D96 + ALPHA_INTEGER = 0x8D97 # VERSION_3_0 + ALPHA_INTEGER_EXT = 0x8D97 + RGB_INTEGER = 0x8D98 # VERSION_3_0 + RGB_INTEGER_EXT = 0x8D98 + RGBA_INTEGER = 0x8D99 # VERSION_3_0 + RGBA_INTEGER_EXT = 0x8D99 + BGR_INTEGER = 0x8D9A # VERSION_3_0 + BGR_INTEGER_EXT = 0x8D9A + BGRA_INTEGER = 0x8D9B # VERSION_3_0 + BGRA_INTEGER_EXT = 0x8D9B + LUMINANCE_INTEGER_EXT = 0x8D9C + LUMINANCE_ALPHA_INTEGER_EXT = 0x8D9D + RGBA_INTEGER_MODE_EXT = 0x8D9E + +# NV_future_use: 0x8D9F + +NV_parameter_buffer_object enum: + MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV = 0x8DA0 + MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV = 0x8DA1 + VERTEX_PROGRAM_PARAMETER_BUFFER_NV = 0x8DA2 + GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV = 0x8DA3 + FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV = 0x8DA4 + +NV_gpu_program4 enum: (additional; see above) + MAX_PROGRAM_GENERIC_ATTRIBS_NV = 0x8DA5 + MAX_PROGRAM_GENERIC_RESULTS_NV = 0x8DA6 + +VERSION_3_2 enum: + FRAMEBUFFER_ATTACHMENT_LAYERED = 0x8DA7 + FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS = 0x8DA8 + +ARB_geometry_shader4 enum: (additional; see below) + FRAMEBUFFER_ATTACHMENT_LAYERED_ARB = 0x8DA7 + FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB = 0x8DA8 + FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB = 0x8DA9 + +NV_geometry_program4 enum: (additional; see above) + FRAMEBUFFER_ATTACHMENT_LAYERED_EXT = 0x8DA7 + FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT = 0x8DA8 + FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT = 0x8DA9 + +# NV_future_use: 0x8DAA + +VERSION_3_0 enum: +ARB_depth_buffer_float enum: (additional; see above; some values different from NV; note: no ARB suffixes) + FLOAT_32_UNSIGNED_INT_24_8_REV = 0x8DAD + +NV_depth_buffer_float enum: + DEPTH_COMPONENT32F_NV = 0x8DAB + DEPTH32F_STENCIL8_NV = 0x8DAC + FLOAT_32_UNSIGNED_INT_24_8_REV_NV = 0x8DAD + DEPTH_BUFFER_FLOAT_MODE_NV = 0x8DAF + +# NV_future_use: 0x8DAE +# NV_future_use: 0x8DB0-0x8DB8 + +VERSION_3_0 enum: +ARB_framebuffer_sRGB enum: (note: no ARB suffixes) + FRAMEBUFFER_SRGB = 0x8DB9 # VERSION_3_0 / ARB_sRGB + +EXT_framebuffer_sRGB enum: + FRAMEBUFFER_SRGB_EXT = 0x8DB9 + FRAMEBUFFER_SRGB_CAPABLE_EXT = 0x8DBA + +VERSION_3_0 enum: +ARB_texture_compression_rgtc enum: (note: no ARB suffixes) + COMPRESSED_RED_RGTC1 = 0x8DBB # VERSION_3_0 / ARB_tcrgtc + COMPRESSED_SIGNED_RED_RGTC1 = 0x8DBC # VERSION_3_0 / ARB_tcrgtc + COMPRESSED_RG_RGTC2 = 0x8DBD # VERSION_3_0 / ARB_tcrgtc + COMPRESSED_SIGNED_RG_RGTC2 = 0x8DBE # VERSION_3_0 / ARB_tcrgtc + +EXT_texture_compression_rgtc enum: + COMPRESSED_RED_RGTC1_EXT = 0x8DBB + COMPRESSED_SIGNED_RED_RGTC1_EXT = 0x8DBC + COMPRESSED_RED_GREEN_RGTC2_EXT = 0x8DBD + COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT = 0x8DBE + +# NV_future_use: 0x8DBF + +VERSION_3_0 enum: + SAMPLER_1D_ARRAY = 0x8DC0 # VERSION_3_0 + SAMPLER_2D_ARRAY = 0x8DC1 # VERSION_3_0 + SAMPLER_1D_ARRAY_SHADOW = 0x8DC3 # VERSION_3_0 + SAMPLER_2D_ARRAY_SHADOW = 0x8DC4 # VERSION_3_0 + SAMPLER_CUBE_SHADOW = 0x8DC5 # VERSION_3_0 + UNSIGNED_INT_VEC2 = 0x8DC6 # VERSION_3_0 + UNSIGNED_INT_VEC3 = 0x8DC7 # VERSION_3_0 + UNSIGNED_INT_VEC4 = 0x8DC8 # VERSION_3_0 + INT_SAMPLER_1D = 0x8DC9 # VERSION_3_0 + INT_SAMPLER_2D = 0x8DCA # VERSION_3_0 + INT_SAMPLER_3D = 0x8DCB # VERSION_3_0 + INT_SAMPLER_CUBE = 0x8DCC # VERSION_3_0 + INT_SAMPLER_1D_ARRAY = 0x8DCE # VERSION_3_0 + INT_SAMPLER_2D_ARRAY = 0x8DCF # VERSION_3_0 + UNSIGNED_INT_SAMPLER_1D = 0x8DD1 # VERSION_3_0 + UNSIGNED_INT_SAMPLER_2D = 0x8DD2 # VERSION_3_0 + UNSIGNED_INT_SAMPLER_3D = 0x8DD3 # VERSION_3_0 + UNSIGNED_INT_SAMPLER_CUBE = 0x8DD4 # VERSION_3_0 + UNSIGNED_INT_SAMPLER_1D_ARRAY = 0x8DD6 # VERSION_3_0 + UNSIGNED_INT_SAMPLER_2D_ARRAY = 0x8DD7 # VERSION_3_0 + +VERSION_3_1 enum: (Promoted from EXT_gpu_shader4 + ARB_texture_rectangle / ARB_uniform_buffer_object) + SAMPLER_BUFFER = 0x8DC2 # EXT_gpu_shader4 + ARB_texture_buffer_object + INT_SAMPLER_2D_RECT = 0x8DCD # EXT_gpu_shader4 + ARB_texture_rectangle + INT_SAMPLER_BUFFER = 0x8DD0 # EXT_gpu_shader4 + ARB_texture_buffer_object + UNSIGNED_INT_SAMPLER_2D_RECT = 0x8DD5 # EXT_gpu_shader4 + ARB_texture_rectangle + UNSIGNED_INT_SAMPLER_BUFFER = 0x8DD8 # EXT_gpu_shader4 + ARB_texture_buffer_object + +EXT_gpu_shader4 enum: + SAMPLER_1D_ARRAY_EXT = 0x8DC0 + SAMPLER_2D_ARRAY_EXT = 0x8DC1 + SAMPLER_BUFFER_EXT = 0x8DC2 + SAMPLER_1D_ARRAY_SHADOW_EXT = 0x8DC3 + SAMPLER_2D_ARRAY_SHADOW_EXT = 0x8DC4 + SAMPLER_CUBE_SHADOW_EXT = 0x8DC5 + UNSIGNED_INT_VEC2_EXT = 0x8DC6 + UNSIGNED_INT_VEC3_EXT = 0x8DC7 + UNSIGNED_INT_VEC4_EXT = 0x8DC8 + INT_SAMPLER_1D_EXT = 0x8DC9 + INT_SAMPLER_2D_EXT = 0x8DCA + INT_SAMPLER_3D_EXT = 0x8DCB + INT_SAMPLER_CUBE_EXT = 0x8DCC + INT_SAMPLER_2D_RECT_EXT = 0x8DCD + INT_SAMPLER_1D_ARRAY_EXT = 0x8DCE + INT_SAMPLER_2D_ARRAY_EXT = 0x8DCF + INT_SAMPLER_BUFFER_EXT = 0x8DD0 + UNSIGNED_INT_SAMPLER_1D_EXT = 0x8DD1 + UNSIGNED_INT_SAMPLER_2D_EXT = 0x8DD2 + UNSIGNED_INT_SAMPLER_3D_EXT = 0x8DD3 + UNSIGNED_INT_SAMPLER_CUBE_EXT = 0x8DD4 + UNSIGNED_INT_SAMPLER_2D_RECT_EXT = 0x8DD5 + UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT = 0x8DD6 + UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT = 0x8DD7 + UNSIGNED_INT_SAMPLER_BUFFER_EXT = 0x8DD8 + +VERSION_3_2 enum: + GEOMETRY_SHADER = 0x8DD9 + +ARB_geometry_shader4 enum: + GEOMETRY_SHADER_ARB = 0x8DD9 + +EXT_geometry_shader4 enum: + GEOMETRY_SHADER_EXT = 0x8DD9 + +ARB_geometry_shader4 enum: (additional; see above) + GEOMETRY_VERTICES_OUT_ARB = 0x8DDA + GEOMETRY_INPUT_TYPE_ARB = 0x8DDB + GEOMETRY_OUTPUT_TYPE_ARB = 0x8DDC + +NV_geometry_program4 enum: (additional; see above) + GEOMETRY_VERTICES_OUT_EXT = 0x8DDA + GEOMETRY_INPUT_TYPE_EXT = 0x8DDB + GEOMETRY_OUTPUT_TYPE_EXT = 0x8DDC + +ARB_geometry_shader4 enum: (additional; see above) + MAX_GEOMETRY_VARYING_COMPONENTS_ARB = 0x8DDD + MAX_VERTEX_VARYING_COMPONENTS_ARB = 0x8DDE + MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB = 0x8DDF + MAX_GEOMETRY_OUTPUT_VERTICES_ARB = 0x8DE0 + MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB = 0x8DE1 + +VERSION_3_2 enum: + MAX_GEOMETRY_UNIFORM_COMPONENTS = 0x8DDF + MAX_GEOMETRY_OUTPUT_VERTICES = 0x8DE0 + MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS = 0x8DE1 + +EXT_geometry_shader4 enum: (additional; see above) + MAX_GEOMETRY_VARYING_COMPONENTS_EXT = 0x8DDD + MAX_VERTEX_VARYING_COMPONENTS_EXT = 0x8DDE + MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT = 0x8DDF + MAX_GEOMETRY_OUTPUT_VERTICES_EXT = 0x8DE0 + MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT = 0x8DE1 + +EXT_bindable_uniform enum: + MAX_VERTEX_BINDABLE_UNIFORMS_EXT = 0x8DE2 + MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT = 0x8DE3 + MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT = 0x8DE4 + +# NV_future_use: 0x8DE5-0x8DEC + +EXT_bindable_uniform enum: (additional; see above) + MAX_BINDABLE_UNIFORM_SIZE_EXT = 0x8DED + UNIFORM_BUFFER_EXT = 0x8DEE + UNIFORM_BUFFER_BINDING_EXT = 0x8DEF + +############################################################################### + +# Khronos OpenGL ES WG: 0x8DF0-0x8E0F + +# Khronos_future_use: 0x8DF0-0x8DF5 + +OES_vertex_type_10_10_10_2 enum: (OpenGL ES only) + UNSIGNED_INT_10_10_10_2_OES = 0x8DF6 + INT_10_10_10_2_OES = 0x8DF7 + +# Khronos_future_use: 0x8DF8-0x8E0F + +############################################################################### + +# NVIDIA: 0x8E10-0x8E8F +# Reserved per email from Michael Gold 2006/8/7 + +NV_framebuffer_multisample_coverage enum: + RENDERBUFFER_COLOR_SAMPLES_NV = 0x8E10 + MAX_MULTISAMPLE_COVERAGE_MODES_NV = 0x8E11 + MULTISAMPLE_COVERAGE_MODES_NV = 0x8E12 + +VERSION_3_0 enum: + QUERY_WAIT = 0x8E13 # VERSION_3_0 + QUERY_NO_WAIT = 0x8E14 # VERSION_3_0 + QUERY_BY_REGION_WAIT = 0x8E15 # VERSION_3_0 + QUERY_BY_REGION_NO_WAIT = 0x8E16 # VERSION_3_0 + +GL_NV_conditional_render enum: + QUERY_WAIT_NV = 0x8E13 + QUERY_NO_WAIT_NV = 0x8E14 + QUERY_BY_REGION_WAIT_NV = 0x8E15 + QUERY_BY_REGION_NO_WAIT_NV = 0x8E16 + +# NV_future_use: 0x8E17-0x8E21 + +NV_transform_feedback2 enum: + TRANSFORM_FEEDBACK_NV = 0x8E22 + TRANSFORM_FEEDBACK_BUFFER_PAUSED_NV = 0x8E23 + TRANSFORM_FEEDBACK_BUFFER_ACTIVE_NV = 0x8E24 + TRANSFORM_FEEDBACK_BINDING_NV = 0x8E25 + +NV_present_video enum: + FRAME_NV = 0x8E26 + FIELDS_NV = 0x8E27 + CURRENT_TIME_NV = 0x8E28 + NUM_FILL_STREAMS_NV = 0x8E29 + PRESENT_TIME_NV = 0x8E2A + PRESENT_DURATION_NV = 0x8E2B + +NV_depth_nonlinear enum: (OpenGL ES only) + DEPTH_COMPONENT16_NONLINEAR_NV = 0x8E2C + +EXT_direct_state_access enum: + PROGRAM_MATRIX_EXT = 0x8E2D + TRANSPOSE_PROGRAM_MATRIX_EXT = 0x8E2E + PROGRAM_MATRIX_STACK_DEPTH_EXT = 0x8E2F + +# NV_future_use: 0x8E30-0x8E41 + +EXT_texture_swizzle enum: + TEXTURE_SWIZZLE_R_EXT = 0x8E42 + TEXTURE_SWIZZLE_G_EXT = 0x8E43 + TEXTURE_SWIZZLE_B_EXT = 0x8E44 + TEXTURE_SWIZZLE_A_EXT = 0x8E45 + TEXTURE_SWIZZLE_RGBA_EXT = 0x8E46 + +# NV_future_use: 0x8E47-0x8E4B + +VERSION_3_2 enum: + use ARB_provoking_vertex QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION + use ARB_provoking_vertex FIRST_VERTEX_CONVENTION + use ARB_provoking_vertex LAST_VERTEX_CONVENTION + use ARB_provoking_vertex PROVOKING_VERTEX + +ARB_provoking_vertex enum: + QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION = 0x8E4C + FIRST_VERTEX_CONVENTION = 0x8E4D + LAST_VERTEX_CONVENTION = 0x8E4E + PROVOKING_VERTEX = 0x8E4F + +EXT_provoking_vertex enum: + QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT = 0x8E4C + FIRST_VERTEX_CONVENTION_EXT = 0x8E4D + LAST_VERTEX_CONVENTION_EXT = 0x8E4E + PROVOKING_VERTEX_EXT = 0x8E4F + +VERSION_3_2 enum: + use ARB_texture_multisample SAMPLE_POSITION + use ARB_texture_multisample SAMPLE_MASK + use ARB_texture_multisample SAMPLE_MASK_VALUE + use ARB_texture_multisample MAX_SAMPLE_MASK_WORDS + +ARB_texture_multisample enum: + SAMPLE_POSITION = 0x8E50 + SAMPLE_MASK = 0x8E51 + SAMPLE_MASK_VALUE = 0x8E52 + MAX_SAMPLE_MASK_WORDS = 0x8E59 + +NV_explicit_multisample enum: + SAMPLE_POSITION_NV = 0x8E50 + SAMPLE_MASK_NV = 0x8E51 + SAMPLE_MASK_VALUE_NV = 0x8E52 + TEXTURE_BINDING_RENDERBUFFER_NV = 0x8E53 + TEXTURE_RENDERBUFFER_DATA_STORE_BINDING_NV = 0x8E54 + TEXTURE_RENDERBUFFER_NV = 0x8E55 + SAMPLER_RENDERBUFFER_NV = 0x8E56 + INT_SAMPLER_RENDERBUFFER_NV = 0x8E57 + UNSIGNED_INT_SAMPLER_RENDERBUFFER_NV = 0x8E58 + MAX_SAMPLE_MASK_WORDS_NV = 0x8E59 + +# NV_future_use: 0x8E5A-0x8E5D + +ARB_texture_gather enum: + MIN_PROGRAM_TEXTURE_GATHER_OFFSET = 0x8E5E + MAX_PROGRAM_TEXTURE_GATHER_OFFSET = 0x8E5F + +# NV_future_use: 0x8E60-0x8E8F + +############################################################################### + +# QNX: 0x8E90-0x8E9F +# For GL_QNX_texture_tiling, GL_QNX_complex_polygon, GL_QNX_stippled_lines +# (Khronos bug 696) + +# QNX_future_use: 0x8E90-0x8E9F + +############################################################################### + +# Imagination Tech.: 0x8EA0-0x8EAF + +############################################################################### + +# Khronos OpenGL ES WG: 0x8EB0-0x8EBF +# Assigned for Affie Munshi on 2007/07/20 + +############################################################################### + +# Vincent: 0x8EC0-0x8ECF + +############################################################################### + +# NVIDIA: 0x8ED0-0x8F4F +# Assigned for Pat Brown (Khronos bug 3191) + +NV_coverage_sample enum: (OpenGL ES only) + COVERAGE_COMPONENT_NV = 0x8ED0 + COVERAGE_COMPONENT4_NV = 0x8ED1 + COVERAGE_ATTACHMENT_NV = 0x8ED2 + COVERAGE_BUFFERS_NV = 0x8ED3 + COVERAGE_SAMPLES_NV = 0x8ED4 + COVERAGE_ALL_FRAGMENTS_NV = 0x8ED5 + COVERAGE_EDGE_FRAGMENTS_NV = 0x8ED6 + COVERAGE_AUTOMATIC_NV = 0x8ED7 + COVERAGE_BUFFER_BIT_NV = 0x00008000 + +# NV_future_use: 0x8ED8-0x8F1C + +NV_shader_buffer_load enum: + BUFFER_GPU_ADDRESS_NV = 0x8F1D + +NV_vertex_buffer_unified_memory enum: + VERTEX_ATTRIB_ARRAY_UNIFIED_NV = 0x8F1E + ELEMENT_ARRAY_UNIFIED_NV = 0x8F1F + VERTEX_ATTRIB_ARRAY_ADDRESS_NV = 0x8F20 + VERTEX_ARRAY_ADDRESS_NV = 0x8F21 + NORMAL_ARRAY_ADDRESS_NV = 0x8F22 + COLOR_ARRAY_ADDRESS_NV = 0x8F23 + INDEX_ARRAY_ADDRESS_NV = 0x8F24 + TEXTURE_COORD_ARRAY_ADDRESS_NV = 0x8F25 + EDGE_FLAG_ARRAY_ADDRESS_NV = 0x8F26 + SECONDARY_COLOR_ARRAY_ADDRESS_NV = 0x8F27 + FOG_COORD_ARRAY_ADDRESS_NV = 0x8F28 + ELEMENT_ARRAY_ADDRESS_NV = 0x8F29 + VERTEX_ATTRIB_ARRAY_LENGTH_NV = 0x8F2A + VERTEX_ARRAY_LENGTH_NV = 0x8F2B + NORMAL_ARRAY_LENGTH_NV = 0x8F2C + COLOR_ARRAY_LENGTH_NV = 0x8F2D + INDEX_ARRAY_LENGTH_NV = 0x8F2E + TEXTURE_COORD_ARRAY_LENGTH_NV = 0x8F2F + EDGE_FLAG_ARRAY_LENGTH_NV = 0x8F30 + SECONDARY_COLOR_ARRAY_LENGTH_NV = 0x8F31 + FOG_COORD_ARRAY_LENGTH_NV = 0x8F32 + ELEMENT_ARRAY_LENGTH_NV = 0x8F33 + +NV_shader_buffer_load enum: (additional; see above) + GPU_ADDRESS_NV = 0x8F34 + MAX_SHADER_BUFFER_ADDRESS_NV = 0x8F35 + +ARB_copy_buffer enum: + COPY_READ_BUFFER = 0x8F36 + COPY_WRITE_BUFFER = 0x8F37 + +VERSION_3_1 enum: + use ARB_copy_buffer COPY_READ_BUFFER + use ARB_copy_buffer COPY_WRITE_BUFFER + +# NVIDIA_future_use: 0x8F38-0x8F4F + +############################################################################### + +# 3Dlabs: 0x8F50-0x8F5F +# Assigned for Jon Kennedy (Khronos public bug 75) + +############################################################################### + +# ARM: 0x8F60-0x8F6F +# Assigned for Remi Pedersen (Khronos bug 3745) + +############################################################################### + +# HI Corp: 0x8F70-0x8F7F +# Assigned for Mark Callow (Khronos bug 4055) + +############################################################################### + +# Zebra Imaging: 0x8F80-0x8F8F +# Assigned for Mike Weiblen (Khronos public bug 91) + +############################################################################### + +# OpenGL ARB: 0x8F90-0x8F9F (SNORM textures, 3.1 primitive restart server state) + +VERSION_3_1 enum: + RED_SNORM = 0x8F90 # VERSION_3_1 + RG_SNORM = 0x8F91 # VERSION_3_1 + RGB_SNORM = 0x8F92 # VERSION_3_1 + RGBA_SNORM = 0x8F93 # VERSION_3_1 + R8_SNORM = 0x8F94 # VERSION_3_1 + RG8_SNORM = 0x8F95 # VERSION_3_1 + RGB8_SNORM = 0x8F96 # VERSION_3_1 + RGBA8_SNORM = 0x8F97 # VERSION_3_1 + R16_SNORM = 0x8F98 # VERSION_3_1 + RG16_SNORM = 0x8F99 # VERSION_3_1 + RGB16_SNORM = 0x8F9A # VERSION_3_1 + RGBA16_SNORM = 0x8F9B # VERSION_3_1 + SIGNED_NORMALIZED = 0x8F9C # VERSION_3_1 + PRIMITIVE_RESTART = 0x8F9D # Different from NV_primitive_restart value + PRIMITIVE_RESTART_INDEX = 0x8F9E # Different from NV_primitive_restart value + +ARB_texture_gather enum: (additional; see above) + MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS = 0x8F9F + +############################################################################### + +# Qualcomm: 0x8FA0-0x8FBF +# Assigned for Maurice Ribble (Khronos bug 4512) + +QCOM_driver_control enum: (OpenGL ES only) + PERFMON_GLOBAL_MODE_QCOM = 0x8FA0 + +# QCOM_future_use: 0x8FA1-0x8FBF + +############################################################################### + +# Vivante: 0x8FC0-0x8FDF +# Assigned for Frido Garritsen (Khronos bug 4526) + +############################################################################### + +# NVIDIA: 0x8FE0-0x8FFF +# Assigned for Pat Brown (Khronos bug 4935) + +# NV_future_use: 0x8FE0-0x8FFF + +############################################################################### + +# AMD: 0x9000-0x901F +# Assigned for Bill Licea-Kane + +AMD_vertex_shader_tesselator enum: + SAMPLER_BUFFER_AMD = 0x9001 + INT_SAMPLER_BUFFER_AMD = 0x9002 + UNSIGNED_INT_SAMPLER_BUFFER_AMD = 0x9003 + TESSELLATION_MODE_AMD = 0x9004 + TESSELLATION_FACTOR_AMD = 0x9005 + DISCRETE_AMD = 0x9006 + CONTINUOUS_AMD = 0x9007 + +# AMD_future_use: 0x9008 + +ARB_texture_cube_map_array enum: + TEXTURE_CUBE_MAP_ARRAY = 0x9009 + TEXTURE_BINDING_CUBE_MAP_ARRAY = 0x900A + PROXY_TEXTURE_CUBE_MAP_ARRAY = 0x900B + SAMPLER_CUBE_MAP_ARRAY = 0x900C + SAMPLER_CUBE_MAP_ARRAY_SHADOW = 0x900D + INT_SAMPLER_CUBE_MAP_ARRAY = 0x900E + UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY = 0x900F + +EXT_texture_snorm enum: + ALPHA_SNORM = 0x9010 + LUMINANCE_SNORM = 0x9011 + LUMINANCE_ALPHA_SNORM = 0x9012 + INTENSITY_SNORM = 0x9013 + ALPHA8_SNORM = 0x9014 + LUMINANCE8_SNORM = 0x9015 + LUMINANCE8_ALPHA8_SNORM = 0x9016 + INTENSITY8_SNORM = 0x9017 + ALPHA16_SNORM = 0x9018 + LUMINANCE16_SNORM = 0x9019 + LUMINANCE16_ALPHA16_SNORM = 0x901A + INTENSITY16_SNORM = 0x901B + +# AMD_future_use: 0x901C-0x901F + +############################################################################### + +# NVIDIA: 0x9020-0x90FF +# Assigned for Pat Brown (Khronos bug 4935) + +NV_video_capture enum: + VIDEO_BUFFER_NV = 0x9020 + VIDEO_BUFFER_BINDING_NV = 0x9021 + FIELD_UPPER_NV = 0x9022 + FIELD_LOWER_NV = 0x9023 + NUM_VIDEO_CAPTURE_STREAMS_NV = 0x9024 + NEXT_VIDEO_CAPTURE_BUFFER_STATUS_NV = 0x9025 + VIDEO_CAPTURE_TO_422_SUPPORTED_NV = 0x9026 + LAST_VIDEO_CAPTURE_STATUS_NV = 0x9027 + VIDEO_BUFFER_PITCH_NV = 0x9028 + VIDEO_COLOR_CONVERSION_MATRIX_NV = 0x9029 + VIDEO_COLOR_CONVERSION_MAX_NV = 0x902A + VIDEO_COLOR_CONVERSION_MIN_NV = 0x902B + VIDEO_COLOR_CONVERSION_OFFSET_NV = 0x902C + VIDEO_BUFFER_INTERNAL_FORMAT_NV = 0x902D + PARTIAL_SUCCESS_NV = 0x902E + SUCCESS_NV = 0x902F + FAILURE_NV = 0x9030 + YCBYCR8_422_NV = 0x9031 + YCBAYCR8A_4224_NV = 0x9032 + Z6Y10Z6CB10Z6Y10Z6CR10_422_NV = 0x9033 + Z6Y10Z6CB10Z6A10Z6Y10Z6CR10Z6A10_4224_NV = 0x9034 + Z4Y12Z4CB12Z4Y12Z4CR12_422_NV = 0x9035 + Z4Y12Z4CB12Z4A12Z4Y12Z4CR12Z4A12_4224_NV = 0x9036 + Z4Y12Z4CB12Z4CR12_444_NV = 0x9037 + VIDEO_CAPTURE_FRAME_WIDTH_NV = 0x9038 + VIDEO_CAPTURE_FRAME_HEIGHT_NV = 0x9039 + VIDEO_CAPTURE_FIELD_UPPER_HEIGHT_NV = 0x903A + VIDEO_CAPTURE_FIELD_LOWER_HEIGHT_NV = 0x903B + VIDEO_CAPTURE_SURFACE_ORIGIN_NV = 0x903C + +# NV_future_use: 0x903D-0x90FF + +############################################################################### + +# OpenGL ARB: 0x9100-0x912F + +VERSION_3_2 enum: + use ARB_texture_multisample TEXTURE_2D_MULTISAMPLE + use ARB_texture_multisample PROXY_TEXTURE_2D_MULTISAMPLE + use ARB_texture_multisample TEXTURE_2D_MULTISAMPLE_ARRAY + use ARB_texture_multisample PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY + use ARB_texture_multisample TEXTURE_BINDING_2D_MULTISAMPLE + use ARB_texture_multisample TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY + use ARB_texture_multisample TEXTURE_SAMPLES + use ARB_texture_multisample TEXTURE_FIXED_SAMPLE_LOCATIONS + use ARB_texture_multisample SAMPLER_2D_MULTISAMPLE + use ARB_texture_multisample INT_SAMPLER_2D_MULTISAMPLE + use ARB_texture_multisample UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE + use ARB_texture_multisample SAMPLER_2D_MULTISAMPLE_ARRAY + use ARB_texture_multisample INT_SAMPLER_2D_MULTISAMPLE_ARRAY + use ARB_texture_multisample UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY + use ARB_texture_multisample MAX_COLOR_TEXTURE_SAMPLES + use ARB_texture_multisample MAX_DEPTH_TEXTURE_SAMPLES + use ARB_texture_multisample MAX_INTEGER_SAMPLES + +ARB_texture_multisample enum: + TEXTURE_2D_MULTISAMPLE = 0x9100 + PROXY_TEXTURE_2D_MULTISAMPLE = 0x9101 + TEXTURE_2D_MULTISAMPLE_ARRAY = 0x9102 + PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY = 0x9103 + TEXTURE_BINDING_2D_MULTISAMPLE = 0x9104 + TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY = 0x9105 + TEXTURE_SAMPLES = 0x9106 + TEXTURE_FIXED_SAMPLE_LOCATIONS = 0x9107 + SAMPLER_2D_MULTISAMPLE = 0x9108 + INT_SAMPLER_2D_MULTISAMPLE = 0x9109 + UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE = 0x910A + SAMPLER_2D_MULTISAMPLE_ARRAY = 0x910B + INT_SAMPLER_2D_MULTISAMPLE_ARRAY = 0x910C + UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY = 0x910D + MAX_COLOR_TEXTURE_SAMPLES = 0x910E + MAX_DEPTH_TEXTURE_SAMPLES = 0x910F + MAX_INTEGER_SAMPLES = 0x9110 + +VERSION_3_2 enum: + use ARB_sync MAX_SERVER_WAIT_TIMEOUT + use ARB_sync OBJECT_TYPE + use ARB_sync SYNC_CONDITION + use ARB_sync SYNC_STATUS + use ARB_sync SYNC_FLAGS + use ARB_sync SYNC_FENCE + use ARB_sync SYNC_GPU_COMMANDS_COMPLETE + use ARB_sync UNSIGNALED + use ARB_sync SIGNALED + use ARB_sync ALREADY_SIGNALED + use ARB_sync TIMEOUT_EXPIRED + use ARB_sync CONDITION_SATISFIED + use ARB_sync WAIT_FAILED + use ARB_sync TIMEOUT_IGNORED + use ARB_sync SYNC_FLUSH_COMMANDS_BIT + use ARB_sync TIMEOUT_IGNORED + +ARB_sync enum: + MAX_SERVER_WAIT_TIMEOUT = 0x9111 + OBJECT_TYPE = 0x9112 + SYNC_CONDITION = 0x9113 + SYNC_STATUS = 0x9114 + SYNC_FLAGS = 0x9115 + SYNC_FENCE = 0x9116 + SYNC_GPU_COMMANDS_COMPLETE = 0x9117 + UNSIGNALED = 0x9118 + SIGNALED = 0x9119 + ALREADY_SIGNALED = 0x911A + TIMEOUT_EXPIRED = 0x911B + CONDITION_SATISFIED = 0x911C + WAIT_FAILED = 0x911D + SYNC_FLUSH_COMMANDS_BIT = 0x00000001 + TIMEOUT_IGNORED = 0xFFFFFFFFFFFFFFFFull + +VERSION_3_0 enum: + BUFFER_ACCESS_FLAGS = 0x911F + BUFFER_MAP_LENGTH = 0x9120 + BUFFER_MAP_OFFSET = 0x9121 + +VERSION_3_2 enum: + MAX_VERTEX_OUTPUT_COMPONENTS = 0x9122 + MAX_GEOMETRY_INPUT_COMPONENTS = 0x9123 + MAX_GEOMETRY_OUTPUT_COMPONENTS = 0x9124 + MAX_FRAGMENT_INPUT_COMPONENTS = 0x9125 + +VERSION_3_2 enum: + CONTEXT_CORE_PROFILE_BIT = 0x00000001 + CONTEXT_COMPATIBILITY_PROFILE_BIT = 0x00000002 + CONTEXT_PROFILE_MASK = 0x9126 + +# ARB_future_use: 0x9127-0x912F + +############################################################################### + +# Imagination Tech.: 0x9130-0x913F (Khronos bug 882) + +IMG_program_binary enum: (OpenGL ES only) + SGX_PROGRAM_BINARY_IMG = 0x9130 + +# IMG_future_use: 0x9131-0x9132 + +IMG_multisampled_render_to_texture enum: (OpenGL ES only) + RENDERBUFFER_SAMPLES_IMG = 0x9133 + FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG = 0x9134 + MAX_SAMPLES_IMG = 0x9135 + TEXTURE_SAMPLES_IMG = 0x9136 + +# IMG_future_use: 0x9137-0x913F + +############################################################################### + +# AMD: 0x9140-0x91BF (Khronos bugs 5899, 6004) + +# AMD_future_use: 0x9140-0x91BF +# AMD_future_use: 0x91C0-0x923F + +############################################################################### +### Please remember that new enumerant allocations must be obtained by request +### to the Khronos API registrar (see comments at the top of this file) +### File requests in the Khronos Bugzilla, OpenGL project, Registry component. +############################################################################### + +# Any_vendor_future_use: 0x9140-0xFFFF +# +# This range must be the last range in the file. To generate a new +# range, allocate multiples of 16 from the beginning of the +# Any_vendor_future_use range and update enum.spec + +# (NOTE: first fill the gap from 0x8FE0-0x8FFF before proceeding here) + +############################################################################### + +# ARB: 100000-100999 (GLU enumerants only) +# ARB: 101000-101999 (Conformance tests only) + +############################################################################### + +# IBM: 103000-103999 +# CULL_VERTEX_IBM = 103050 +# VERTEX_ARRAY_LIST_IBM = 103070 +# NORMAL_ARRAY_LIST_IBM = 103071 +# COLOR_ARRAY_LIST_IBM = 103072 +# INDEX_ARRAY_LIST_IBM = 103073 +# TEXTURE_COORD_ARRAY_LIST_IBM = 103074 +# EDGE_FLAG_ARRAY_LIST_IBM = 103075 +# FOG_COORDINATE_ARRAY_LIST_IBM = 103076 +# SECONDARY_COLOR_ARRAY_LIST_IBM = 103077 +# VERTEX_ARRAY_LIST_STRIDE_IBM = 103080 +# NORMAL_ARRAY_LIST_STRIDE_IBM = 103081 +# COLOR_ARRAY_LIST_STRIDE_IBM = 103082 +# INDEX_ARRAY_LIST_STRIDE_IBM = 103083 +# TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM = 103084 +# EDGE_FLAG_ARRAY_LIST_STRIDE_IBM = 103085 +# FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM = 103086 +# SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM = 103087 + +############################################################################### + +# NEC: 104000-104999 +# Compaq: 105000-105999 (Compaq was acquired by HP) +# KPC: 106000-106999 (Kubota is out of business) +# PGI: 107000-107999 (Portable was acquired by Template Graphics) +# E&S: 108000-108999 + +############################################################################### diff --git a/src/glx/apple/specs/enumext.spec b/src/glx/apple/specs/enumext.spec new file mode 100644 index 00000000000..6302ed446f1 --- /dev/null +++ b/src/glx/apple/specs/enumext.spec @@ -0,0 +1,6542 @@ +# enumext.spec - list of GL enumerants for glext.h header +# +# $Revision: 10971 $ on $Date: 2010-04-09 02:45:33 -0700 (Fri, 09 Apr 2010) $ + +# This is derived from the master GL enumerant registry (enum.spec). +# +# Unlike enum.spec, enumext.spec is +# (1) Grouped by GL core version or extension number +# (2) While it includes all extension and core enumerants, the +# generator scripts for glext.h leave out VERSION_1_1 +# tokens since it's assumed all <gl.h> today support at least +# OpenGL 1.1 +# (3) Has no 'Extensions' section, since enums are always +# conditionally protected against multiple definition +# by glextenum.pl. +# (4) Is processed by glextenum.pl, which has evolved +# from enum.pl - should merge back into one script. + +# The release number encoded into glext.h is now defined in +# glextrelease.txt. + +############################################################################### +# +# OpenGL 1.0/1.1 enums (there is no VERSION_1_0 token) +# +############################################################################### + +VERSION_1_1 enum: +passthru: /* AttribMask */ + DEPTH_BUFFER_BIT = 0x00000100 # AttribMask + STENCIL_BUFFER_BIT = 0x00000400 # AttribMask + COLOR_BUFFER_BIT = 0x00004000 # AttribMask +passthru: /* Boolean */ + FALSE = 0 # Boolean + TRUE = 1 # Boolean +passthru: /* BeginMode */ + POINTS = 0x0000 # BeginMode + LINES = 0x0001 # BeginMode + LINE_LOOP = 0x0002 # BeginMode + LINE_STRIP = 0x0003 # BeginMode + TRIANGLES = 0x0004 # BeginMode + TRIANGLE_STRIP = 0x0005 # BeginMode + TRIANGLE_FAN = 0x0006 # BeginMode +passthru: /* AlphaFunction */ + NEVER = 0x0200 # AlphaFunction + LESS = 0x0201 # AlphaFunction + EQUAL = 0x0202 # AlphaFunction + LEQUAL = 0x0203 # AlphaFunction + GREATER = 0x0204 # AlphaFunction + NOTEQUAL = 0x0205 # AlphaFunction + GEQUAL = 0x0206 # AlphaFunction + ALWAYS = 0x0207 # AlphaFunction +passthru: /* BlendingFactorDest */ + ZERO = 0 # BlendingFactorDest + ONE = 1 # BlendingFactorDest + SRC_COLOR = 0x0300 # BlendingFactorDest + ONE_MINUS_SRC_COLOR = 0x0301 # BlendingFactorDest + SRC_ALPHA = 0x0302 # BlendingFactorDest + ONE_MINUS_SRC_ALPHA = 0x0303 # BlendingFactorDest + DST_ALPHA = 0x0304 # BlendingFactorDest + ONE_MINUS_DST_ALPHA = 0x0305 # BlendingFactorDest +passthru: /* BlendingFactorSrc */ + DST_COLOR = 0x0306 # BlendingFactorSrc + ONE_MINUS_DST_COLOR = 0x0307 # BlendingFactorSrc + SRC_ALPHA_SATURATE = 0x0308 # BlendingFactorSrc +passthru: /* DrawBufferMode */ + NONE = 0 # DrawBufferMode + FRONT_LEFT = 0x0400 # DrawBufferMode + FRONT_RIGHT = 0x0401 # DrawBufferMode + BACK_LEFT = 0x0402 # DrawBufferMode + BACK_RIGHT = 0x0403 # DrawBufferMode + FRONT = 0x0404 # DrawBufferMode + BACK = 0x0405 # DrawBufferMode + LEFT = 0x0406 # DrawBufferMode + RIGHT = 0x0407 # DrawBufferMode + FRONT_AND_BACK = 0x0408 # DrawBufferMode +passthru: /* ErrorCode */ + NO_ERROR = 0 # ErrorCode + INVALID_ENUM = 0x0500 # ErrorCode + INVALID_VALUE = 0x0501 # ErrorCode + INVALID_OPERATION = 0x0502 # ErrorCode + OUT_OF_MEMORY = 0x0505 # ErrorCode +passthru: /* FrontFaceDirection */ + CW = 0x0900 # FrontFaceDirection + CCW = 0x0901 # FrontFaceDirection +passthru: /* GetPName */ + POINT_SIZE = 0x0B11 # 1 F # GetPName + POINT_SIZE_RANGE = 0x0B12 # 2 F # GetPName + POINT_SIZE_GRANULARITY = 0x0B13 # 1 F # GetPName + LINE_SMOOTH = 0x0B20 # 1 I # GetPName + LINE_WIDTH = 0x0B21 # 1 F # GetPName + LINE_WIDTH_RANGE = 0x0B22 # 2 F # GetPName + LINE_WIDTH_GRANULARITY = 0x0B23 # 1 F # GetPName + POLYGON_SMOOTH = 0x0B41 # 1 I # GetPName + CULL_FACE = 0x0B44 # 1 I # GetPName + CULL_FACE_MODE = 0x0B45 # 1 I # GetPName + FRONT_FACE = 0x0B46 # 1 I # GetPName + DEPTH_RANGE = 0x0B70 # 2 F # GetPName + DEPTH_TEST = 0x0B71 # 1 I # GetPName + DEPTH_WRITEMASK = 0x0B72 # 1 I # GetPName + DEPTH_CLEAR_VALUE = 0x0B73 # 1 F # GetPName + DEPTH_FUNC = 0x0B74 # 1 I # GetPName + STENCIL_TEST = 0x0B90 # 1 I # GetPName + STENCIL_CLEAR_VALUE = 0x0B91 # 1 I # GetPName + STENCIL_FUNC = 0x0B92 # 1 I # GetPName + STENCIL_VALUE_MASK = 0x0B93 # 1 I # GetPName + STENCIL_FAIL = 0x0B94 # 1 I # GetPName + STENCIL_PASS_DEPTH_FAIL = 0x0B95 # 1 I # GetPName + STENCIL_PASS_DEPTH_PASS = 0x0B96 # 1 I # GetPName + STENCIL_REF = 0x0B97 # 1 I # GetPName + STENCIL_WRITEMASK = 0x0B98 # 1 I # GetPName + VIEWPORT = 0x0BA2 # 4 I # GetPName + DITHER = 0x0BD0 # 1 I # GetPName + BLEND_DST = 0x0BE0 # 1 I # GetPName + BLEND_SRC = 0x0BE1 # 1 I # GetPName + BLEND = 0x0BE2 # 1 I # GetPName + LOGIC_OP_MODE = 0x0BF0 # 1 I # GetPName + COLOR_LOGIC_OP = 0x0BF2 # 1 I # GetPName + DRAW_BUFFER = 0x0C01 # 1 I # GetPName + READ_BUFFER = 0x0C02 # 1 I # GetPName + SCISSOR_BOX = 0x0C10 # 4 I # GetPName + SCISSOR_TEST = 0x0C11 # 1 I # GetPName + COLOR_CLEAR_VALUE = 0x0C22 # 4 F # GetPName + COLOR_WRITEMASK = 0x0C23 # 4 I # GetPName + DOUBLEBUFFER = 0x0C32 # 1 I # GetPName + STEREO = 0x0C33 # 1 I # GetPName + LINE_SMOOTH_HINT = 0x0C52 # 1 I # GetPName + POLYGON_SMOOTH_HINT = 0x0C53 # 1 I # GetPName + UNPACK_SWAP_BYTES = 0x0CF0 # 1 I # GetPName + UNPACK_LSB_FIRST = 0x0CF1 # 1 I # GetPName + UNPACK_ROW_LENGTH = 0x0CF2 # 1 I # GetPName + UNPACK_SKIP_ROWS = 0x0CF3 # 1 I # GetPName + UNPACK_SKIP_PIXELS = 0x0CF4 # 1 I # GetPName + UNPACK_ALIGNMENT = 0x0CF5 # 1 I # GetPName + PACK_SWAP_BYTES = 0x0D00 # 1 I # GetPName + PACK_LSB_FIRST = 0x0D01 # 1 I # GetPName + PACK_ROW_LENGTH = 0x0D02 # 1 I # GetPName + PACK_SKIP_ROWS = 0x0D03 # 1 I # GetPName + PACK_SKIP_PIXELS = 0x0D04 # 1 I # GetPName + PACK_ALIGNMENT = 0x0D05 # 1 I # GetPName + MAX_TEXTURE_SIZE = 0x0D33 # 1 I # GetPName + MAX_VIEWPORT_DIMS = 0x0D3A # 2 F # GetPName + SUBPIXEL_BITS = 0x0D50 # 1 I # GetPName + TEXTURE_1D = 0x0DE0 # 1 I # GetPName + TEXTURE_2D = 0x0DE1 # 1 I # GetPName + POLYGON_OFFSET_UNITS = 0x2A00 # 1 F # GetPName + POLYGON_OFFSET_POINT = 0x2A01 # 1 I # GetPName + POLYGON_OFFSET_LINE = 0x2A02 # 1 I # GetPName + POLYGON_OFFSET_FILL = 0x8037 # 1 I # GetPName + POLYGON_OFFSET_FACTOR = 0x8038 # 1 F # GetPName + TEXTURE_BINDING_1D = 0x8068 # 1 I # GetPName + TEXTURE_BINDING_2D = 0x8069 # 1 I # GetPName +passthru: /* GetTextureParameter */ + TEXTURE_WIDTH = 0x1000 # GetTextureParameter + TEXTURE_HEIGHT = 0x1001 # GetTextureParameter + TEXTURE_INTERNAL_FORMAT = 0x1003 # GetTextureParameter + TEXTURE_BORDER_COLOR = 0x1004 # GetTextureParameter + TEXTURE_RED_SIZE = 0x805C # GetTextureParameter + TEXTURE_GREEN_SIZE = 0x805D # GetTextureParameter + TEXTURE_BLUE_SIZE = 0x805E # GetTextureParameter + TEXTURE_ALPHA_SIZE = 0x805F # GetTextureParameter +passthru: /* HintMode */ + DONT_CARE = 0x1100 # HintMode + FASTEST = 0x1101 # HintMode + NICEST = 0x1102 # HintMode +passthru: /* DataType */ + BYTE = 0x1400 # DataType + UNSIGNED_BYTE = 0x1401 # DataType + SHORT = 0x1402 # DataType + UNSIGNED_SHORT = 0x1403 # DataType + INT = 0x1404 # DataType + UNSIGNED_INT = 0x1405 # DataType + FLOAT = 0x1406 # DataType + DOUBLE = 0x140A # DataType +passthru: /* LogicOp */ + CLEAR = 0x1500 # LogicOp + AND = 0x1501 # LogicOp + AND_REVERSE = 0x1502 # LogicOp + COPY = 0x1503 # LogicOp + AND_INVERTED = 0x1504 # LogicOp + NOOP = 0x1505 # LogicOp + XOR = 0x1506 # LogicOp + OR = 0x1507 # LogicOp + NOR = 0x1508 # LogicOp + EQUIV = 0x1509 # LogicOp + INVERT = 0x150A # LogicOp + OR_REVERSE = 0x150B # LogicOp + COPY_INVERTED = 0x150C # LogicOp + OR_INVERTED = 0x150D # LogicOp + NAND = 0x150E # LogicOp + SET = 0x150F # LogicOp +passthru: /* MatrixMode (for gl3.h, FBO attachment type) */ + TEXTURE = 0x1702 # MatrixMode +passthru: /* PixelCopyType */ + COLOR = 0x1800 # PixelCopyType + DEPTH = 0x1801 # PixelCopyType + STENCIL = 0x1802 # PixelCopyType +passthru: /* PixelFormat */ + STENCIL_INDEX = 0x1901 # PixelFormat + DEPTH_COMPONENT = 0x1902 # PixelFormat + RED = 0x1903 # PixelFormat + GREEN = 0x1904 # PixelFormat + BLUE = 0x1905 # PixelFormat + ALPHA = 0x1906 # PixelFormat + RGB = 0x1907 # PixelFormat + RGBA = 0x1908 # PixelFormat +passthru: /* PolygonMode */ + POINT = 0x1B00 # PolygonMode + LINE = 0x1B01 # PolygonMode + FILL = 0x1B02 # PolygonMode +passthru: /* StencilOp */ + KEEP = 0x1E00 # StencilOp + REPLACE = 0x1E01 # StencilOp + INCR = 0x1E02 # StencilOp + DECR = 0x1E03 # StencilOp +passthru: /* StringName */ + VENDOR = 0x1F00 # StringName + RENDERER = 0x1F01 # StringName + VERSION = 0x1F02 # StringName + EXTENSIONS = 0x1F03 # StringName +passthru: /* TextureMagFilter */ + NEAREST = 0x2600 # TextureMagFilter + LINEAR = 0x2601 # TextureMagFilter +passthru: /* TextureMinFilter */ + NEAREST_MIPMAP_NEAREST = 0x2700 # TextureMinFilter + LINEAR_MIPMAP_NEAREST = 0x2701 # TextureMinFilter + NEAREST_MIPMAP_LINEAR = 0x2702 # TextureMinFilter + LINEAR_MIPMAP_LINEAR = 0x2703 # TextureMinFilter +passthru: /* TextureParameterName */ + TEXTURE_MAG_FILTER = 0x2800 # TextureParameterName + TEXTURE_MIN_FILTER = 0x2801 # TextureParameterName + TEXTURE_WRAP_S = 0x2802 # TextureParameterName + TEXTURE_WRAP_T = 0x2803 # TextureParameterName +passthru: /* TextureTarget */ + PROXY_TEXTURE_1D = 0x8063 # TextureTarget + PROXY_TEXTURE_2D = 0x8064 # TextureTarget +passthru: /* TextureWrapMode */ + REPEAT = 0x2901 # TextureWrapMode +passthru: /* PixelInternalFormat */ + R3_G3_B2 = 0x2A10 # PixelInternalFormat + RGB4 = 0x804F # PixelInternalFormat + RGB5 = 0x8050 # PixelInternalFormat + RGB8 = 0x8051 # PixelInternalFormat + RGB10 = 0x8052 # PixelInternalFormat + RGB12 = 0x8053 # PixelInternalFormat + RGB16 = 0x8054 # PixelInternalFormat + RGBA2 = 0x8055 # PixelInternalFormat + RGBA4 = 0x8056 # PixelInternalFormat + RGB5_A1 = 0x8057 # PixelInternalFormat + RGBA8 = 0x8058 # PixelInternalFormat + RGB10_A2 = 0x8059 # PixelInternalFormat + RGBA12 = 0x805A # PixelInternalFormat + RGBA16 = 0x805B # PixelInternalFormat + +VERSION_1_1_DEPRECATED enum: +passthru: /* AttribMask */ + CURRENT_BIT = 0x00000001 # AttribMask + POINT_BIT = 0x00000002 # AttribMask + LINE_BIT = 0x00000004 # AttribMask + POLYGON_BIT = 0x00000008 # AttribMask + POLYGON_STIPPLE_BIT = 0x00000010 # AttribMask + PIXEL_MODE_BIT = 0x00000020 # AttribMask + LIGHTING_BIT = 0x00000040 # AttribMask + FOG_BIT = 0x00000080 # AttribMask + ACCUM_BUFFER_BIT = 0x00000200 # AttribMask + VIEWPORT_BIT = 0x00000800 # AttribMask + TRANSFORM_BIT = 0x00001000 # AttribMask + ENABLE_BIT = 0x00002000 # AttribMask + HINT_BIT = 0x00008000 # AttribMask + EVAL_BIT = 0x00010000 # AttribMask + LIST_BIT = 0x00020000 # AttribMask + TEXTURE_BIT = 0x00040000 # AttribMask + SCISSOR_BIT = 0x00080000 # AttribMask + ALL_ATTRIB_BITS = 0xFFFFFFFF # AttribMask +passthru: /* ClientAttribMask */ + CLIENT_PIXEL_STORE_BIT = 0x00000001 # ClientAttribMask + CLIENT_VERTEX_ARRAY_BIT = 0x00000002 # ClientAttribMask + CLIENT_ALL_ATTRIB_BITS = 0xFFFFFFFF # ClientAttribMask +passthru: /* BeginMode */ + QUADS = 0x0007 # BeginMode + QUAD_STRIP = 0x0008 # BeginMode + POLYGON = 0x0009 # BeginMode +passthru: /* AccumOp */ + ACCUM = 0x0100 # AccumOp + LOAD = 0x0101 # AccumOp + RETURN = 0x0102 # AccumOp + MULT = 0x0103 # AccumOp + ADD = 0x0104 # AccumOp +passthru: /* DrawBufferMode */ + AUX0 = 0x0409 # DrawBufferMode + AUX1 = 0x040A # DrawBufferMode + AUX2 = 0x040B # DrawBufferMode + AUX3 = 0x040C # DrawBufferMode +passthru: /* ErrorCode */ + STACK_OVERFLOW = 0x0503 # ErrorCode + STACK_UNDERFLOW = 0x0504 # ErrorCode +passthru: /* FeedbackType */ + 2D = 0x0600 # FeedbackType + 3D = 0x0601 # FeedbackType + 3D_COLOR = 0x0602 # FeedbackType + 3D_COLOR_TEXTURE = 0x0603 # FeedbackType + 4D_COLOR_TEXTURE = 0x0604 # FeedbackType +passthru: /* FeedBackToken */ + PASS_THROUGH_TOKEN = 0x0700 # FeedBackToken + POINT_TOKEN = 0x0701 # FeedBackToken + LINE_TOKEN = 0x0702 # FeedBackToken + POLYGON_TOKEN = 0x0703 # FeedBackToken + BITMAP_TOKEN = 0x0704 # FeedBackToken + DRAW_PIXEL_TOKEN = 0x0705 # FeedBackToken + COPY_PIXEL_TOKEN = 0x0706 # FeedBackToken + LINE_RESET_TOKEN = 0x0707 # FeedBackToken +passthru: /* FogMode */ + EXP = 0x0800 # FogMode + EXP2 = 0x0801 # FogMode +passthru: /* GetMapQuery */ + COEFF = 0x0A00 # GetMapQuery + ORDER = 0x0A01 # GetMapQuery + DOMAIN = 0x0A02 # GetMapQuery +passthru: /* GetPixelMap */ + PIXEL_MAP_I_TO_I = 0x0C70 # GetPixelMap + PIXEL_MAP_S_TO_S = 0x0C71 # GetPixelMap + PIXEL_MAP_I_TO_R = 0x0C72 # GetPixelMap + PIXEL_MAP_I_TO_G = 0x0C73 # GetPixelMap + PIXEL_MAP_I_TO_B = 0x0C74 # GetPixelMap + PIXEL_MAP_I_TO_A = 0x0C75 # GetPixelMap + PIXEL_MAP_R_TO_R = 0x0C76 # GetPixelMap + PIXEL_MAP_G_TO_G = 0x0C77 # GetPixelMap + PIXEL_MAP_B_TO_B = 0x0C78 # GetPixelMap + PIXEL_MAP_A_TO_A = 0x0C79 # GetPixelMap +passthru: /* GetPointervPName */ + VERTEX_ARRAY_POINTER = 0x808E # GetPointervPName + NORMAL_ARRAY_POINTER = 0x808F # GetPointervPName + COLOR_ARRAY_POINTER = 0x8090 # GetPointervPName + INDEX_ARRAY_POINTER = 0x8091 # GetPointervPName + TEXTURE_COORD_ARRAY_POINTER = 0x8092 # GetPointervPName + EDGE_FLAG_ARRAY_POINTER = 0x8093 # GetPointervPName + FEEDBACK_BUFFER_POINTER = 0x0DF0 # GetPointervPName + SELECTION_BUFFER_POINTER = 0x0DF3 # GetPointervPName +passthru: /* GetPName */ + CURRENT_COLOR = 0x0B00 # 4 F # GetPName + CURRENT_INDEX = 0x0B01 # 1 F # GetPName + CURRENT_NORMAL = 0x0B02 # 3 F # GetPName + CURRENT_TEXTURE_COORDS = 0x0B03 # 4 F # GetPName + CURRENT_RASTER_COLOR = 0x0B04 # 4 F # GetPName + CURRENT_RASTER_INDEX = 0x0B05 # 1 F # GetPName + CURRENT_RASTER_TEXTURE_COORDS = 0x0B06 # 4 F # GetPName + CURRENT_RASTER_POSITION = 0x0B07 # 4 F # GetPName + CURRENT_RASTER_POSITION_VALID = 0x0B08 # 1 I # GetPName + CURRENT_RASTER_DISTANCE = 0x0B09 # 1 F # GetPName + POINT_SMOOTH = 0x0B10 # 1 I # GetPName + LINE_STIPPLE = 0x0B24 # 1 I # GetPName + LINE_STIPPLE_PATTERN = 0x0B25 # 1 I # GetPName + LINE_STIPPLE_REPEAT = 0x0B26 # 1 I # GetPName + LIST_MODE = 0x0B30 # 1 I # GetPName + MAX_LIST_NESTING = 0x0B31 # 1 I # GetPName + LIST_BASE = 0x0B32 # 1 I # GetPName + LIST_INDEX = 0x0B33 # 1 I # GetPName + POLYGON_MODE = 0x0B40 # 2 I # GetPName + POLYGON_STIPPLE = 0x0B42 # 1 I # GetPName + EDGE_FLAG = 0x0B43 # 1 I # GetPName + LIGHTING = 0x0B50 # 1 I # GetPName + LIGHT_MODEL_LOCAL_VIEWER = 0x0B51 # 1 I # GetPName + LIGHT_MODEL_TWO_SIDE = 0x0B52 # 1 I # GetPName + LIGHT_MODEL_AMBIENT = 0x0B53 # 4 F # GetPName + SHADE_MODEL = 0x0B54 # 1 I # GetPName + COLOR_MATERIAL_FACE = 0x0B55 # 1 I # GetPName + COLOR_MATERIAL_PARAMETER = 0x0B56 # 1 I # GetPName + COLOR_MATERIAL = 0x0B57 # 1 I # GetPName + FOG = 0x0B60 # 1 I # GetPName + FOG_INDEX = 0x0B61 # 1 I # GetPName + FOG_DENSITY = 0x0B62 # 1 F # GetPName + FOG_START = 0x0B63 # 1 F # GetPName + FOG_END = 0x0B64 # 1 F # GetPName + FOG_MODE = 0x0B65 # 1 I # GetPName + FOG_COLOR = 0x0B66 # 4 F # GetPName + ACCUM_CLEAR_VALUE = 0x0B80 # 4 F # GetPName + MATRIX_MODE = 0x0BA0 # 1 I # GetPName + NORMALIZE = 0x0BA1 # 1 I # GetPName + MODELVIEW_STACK_DEPTH = 0x0BA3 # 1 I # GetPName + PROJECTION_STACK_DEPTH = 0x0BA4 # 1 I # GetPName + TEXTURE_STACK_DEPTH = 0x0BA5 # 1 I # GetPName + MODELVIEW_MATRIX = 0x0BA6 # 16 F # GetPName + PROJECTION_MATRIX = 0x0BA7 # 16 F # GetPName + TEXTURE_MATRIX = 0x0BA8 # 16 F # GetPName + ATTRIB_STACK_DEPTH = 0x0BB0 # 1 I # GetPName + CLIENT_ATTRIB_STACK_DEPTH = 0x0BB1 # 1 I # GetPName + ALPHA_TEST = 0x0BC0 # 1 I # GetPName + ALPHA_TEST_FUNC = 0x0BC1 # 1 I # GetPName + ALPHA_TEST_REF = 0x0BC2 # 1 F # GetPName + INDEX_LOGIC_OP = 0x0BF1 # 1 I # GetPName + LOGIC_OP = 0x0BF1 # 1 I # GetPName + AUX_BUFFERS = 0x0C00 # 1 I # GetPName + INDEX_CLEAR_VALUE = 0x0C20 # 1 I # GetPName + INDEX_WRITEMASK = 0x0C21 # 1 I # GetPName + INDEX_MODE = 0x0C30 # 1 I # GetPName + RGBA_MODE = 0x0C31 # 1 I # GetPName + RENDER_MODE = 0x0C40 # 1 I # GetPName + PERSPECTIVE_CORRECTION_HINT = 0x0C50 # 1 I # GetPName + POINT_SMOOTH_HINT = 0x0C51 # 1 I # GetPName + FOG_HINT = 0x0C54 # 1 I # GetPName + TEXTURE_GEN_S = 0x0C60 # 1 I # GetPName + TEXTURE_GEN_T = 0x0C61 # 1 I # GetPName + TEXTURE_GEN_R = 0x0C62 # 1 I # GetPName + TEXTURE_GEN_Q = 0x0C63 # 1 I # GetPName + PIXEL_MAP_I_TO_I_SIZE = 0x0CB0 # 1 I # GetPName + PIXEL_MAP_S_TO_S_SIZE = 0x0CB1 # 1 I # GetPName + PIXEL_MAP_I_TO_R_SIZE = 0x0CB2 # 1 I # GetPName + PIXEL_MAP_I_TO_G_SIZE = 0x0CB3 # 1 I # GetPName + PIXEL_MAP_I_TO_B_SIZE = 0x0CB4 # 1 I # GetPName + PIXEL_MAP_I_TO_A_SIZE = 0x0CB5 # 1 I # GetPName + PIXEL_MAP_R_TO_R_SIZE = 0x0CB6 # 1 I # GetPName + PIXEL_MAP_G_TO_G_SIZE = 0x0CB7 # 1 I # GetPName + PIXEL_MAP_B_TO_B_SIZE = 0x0CB8 # 1 I # GetPName + PIXEL_MAP_A_TO_A_SIZE = 0x0CB9 # 1 I # GetPName + MAP_COLOR = 0x0D10 # 1 I # GetPName + MAP_STENCIL = 0x0D11 # 1 I # GetPName + INDEX_SHIFT = 0x0D12 # 1 I # GetPName + INDEX_OFFSET = 0x0D13 # 1 I # GetPName + RED_SCALE = 0x0D14 # 1 F # GetPName + RED_BIAS = 0x0D15 # 1 F # GetPName + ZOOM_X = 0x0D16 # 1 F # GetPName + ZOOM_Y = 0x0D17 # 1 F # GetPName + GREEN_SCALE = 0x0D18 # 1 F # GetPName + GREEN_BIAS = 0x0D19 # 1 F # GetPName + BLUE_SCALE = 0x0D1A # 1 F # GetPName + BLUE_BIAS = 0x0D1B # 1 F # GetPName + ALPHA_SCALE = 0x0D1C # 1 F # GetPName + ALPHA_BIAS = 0x0D1D # 1 F # GetPName + DEPTH_SCALE = 0x0D1E # 1 F # GetPName + DEPTH_BIAS = 0x0D1F # 1 F # GetPName + MAX_EVAL_ORDER = 0x0D30 # 1 I # GetPName + MAX_LIGHTS = 0x0D31 # 1 I # GetPName + MAX_CLIP_PLANES = 0x0D32 # 1 I # GetPName + MAX_PIXEL_MAP_TABLE = 0x0D34 # 1 I # GetPName + MAX_ATTRIB_STACK_DEPTH = 0x0D35 # 1 I # GetPName + MAX_MODELVIEW_STACK_DEPTH = 0x0D36 # 1 I # GetPName + MAX_NAME_STACK_DEPTH = 0x0D37 # 1 I # GetPName + MAX_PROJECTION_STACK_DEPTH = 0x0D38 # 1 I # GetPName + MAX_TEXTURE_STACK_DEPTH = 0x0D39 # 1 I # GetPName + MAX_CLIENT_ATTRIB_STACK_DEPTH = 0x0D3B # 1 I # GetPName + INDEX_BITS = 0x0D51 # 1 I # GetPName + RED_BITS = 0x0D52 # 1 I # GetPName + GREEN_BITS = 0x0D53 # 1 I # GetPName + BLUE_BITS = 0x0D54 # 1 I # GetPName + ALPHA_BITS = 0x0D55 # 1 I # GetPName + DEPTH_BITS = 0x0D56 # 1 I # GetPName + STENCIL_BITS = 0x0D57 # 1 I # GetPName + ACCUM_RED_BITS = 0x0D58 # 1 I # GetPName + ACCUM_GREEN_BITS = 0x0D59 # 1 I # GetPName + ACCUM_BLUE_BITS = 0x0D5A # 1 I # GetPName + ACCUM_ALPHA_BITS = 0x0D5B # 1 I # GetPName + NAME_STACK_DEPTH = 0x0D70 # 1 I # GetPName + AUTO_NORMAL = 0x0D80 # 1 I # GetPName + MAP1_COLOR_4 = 0x0D90 # 1 I # GetPName + MAP1_INDEX = 0x0D91 # 1 I # GetPName + MAP1_NORMAL = 0x0D92 # 1 I # GetPName + MAP1_TEXTURE_COORD_1 = 0x0D93 # 1 I # GetPName + MAP1_TEXTURE_COORD_2 = 0x0D94 # 1 I # GetPName + MAP1_TEXTURE_COORD_3 = 0x0D95 # 1 I # GetPName + MAP1_TEXTURE_COORD_4 = 0x0D96 # 1 I # GetPName + MAP1_VERTEX_3 = 0x0D97 # 1 I # GetPName + MAP1_VERTEX_4 = 0x0D98 # 1 I # GetPName + MAP2_COLOR_4 = 0x0DB0 # 1 I # GetPName + MAP2_INDEX = 0x0DB1 # 1 I # GetPName + MAP2_NORMAL = 0x0DB2 # 1 I # GetPName + MAP2_TEXTURE_COORD_1 = 0x0DB3 # 1 I # GetPName + MAP2_TEXTURE_COORD_2 = 0x0DB4 # 1 I # GetPName + MAP2_TEXTURE_COORD_3 = 0x0DB5 # 1 I # GetPName + MAP2_TEXTURE_COORD_4 = 0x0DB6 # 1 I # GetPName + MAP2_VERTEX_3 = 0x0DB7 # 1 I # GetPName + MAP2_VERTEX_4 = 0x0DB8 # 1 I # GetPName + MAP1_GRID_DOMAIN = 0x0DD0 # 2 F # GetPName + MAP1_GRID_SEGMENTS = 0x0DD1 # 1 I # GetPName + MAP2_GRID_DOMAIN = 0x0DD2 # 4 F # GetPName + MAP2_GRID_SEGMENTS = 0x0DD3 # 2 I # GetPName + FEEDBACK_BUFFER_SIZE = 0x0DF1 # 1 I # GetPName + FEEDBACK_BUFFER_TYPE = 0x0DF2 # 1 I # GetPName + SELECTION_BUFFER_SIZE = 0x0DF4 # 1 I # GetPName + VERTEX_ARRAY = 0x8074 # 1 I # GetPName + NORMAL_ARRAY = 0x8075 # 1 I # GetPName + COLOR_ARRAY = 0x8076 # 1 I # GetPName + INDEX_ARRAY = 0x8077 # 1 I # GetPName + TEXTURE_COORD_ARRAY = 0x8078 # 1 I # GetPName + EDGE_FLAG_ARRAY = 0x8079 # 1 I # GetPName + VERTEX_ARRAY_SIZE = 0x807A # 1 I # GetPName + VERTEX_ARRAY_TYPE = 0x807B # 1 I # GetPName + VERTEX_ARRAY_STRIDE = 0x807C # 1 I # GetPName + NORMAL_ARRAY_TYPE = 0x807E # 1 I # GetPName + NORMAL_ARRAY_STRIDE = 0x807F # 1 I # GetPName + COLOR_ARRAY_SIZE = 0x8081 # 1 I # GetPName + COLOR_ARRAY_TYPE = 0x8082 # 1 I # GetPName + COLOR_ARRAY_STRIDE = 0x8083 # 1 I # GetPName + INDEX_ARRAY_TYPE = 0x8085 # 1 I # GetPName + INDEX_ARRAY_STRIDE = 0x8086 # 1 I # GetPName + TEXTURE_COORD_ARRAY_SIZE = 0x8088 # 1 I # GetPName + TEXTURE_COORD_ARRAY_TYPE = 0x8089 # 1 I # GetPName + TEXTURE_COORD_ARRAY_STRIDE = 0x808A # 1 I # GetPName + EDGE_FLAG_ARRAY_STRIDE = 0x808C # 1 I # GetPName +passthru: /* GetTextureParameter */ + TEXTURE_COMPONENTS = 0x1003 # GetTextureParameter + TEXTURE_BORDER = 0x1005 # GetTextureParameter + TEXTURE_LUMINANCE_SIZE = 0x8060 # GetTextureParameter + TEXTURE_INTENSITY_SIZE = 0x8061 # GetTextureParameter + TEXTURE_PRIORITY = 0x8066 # GetTextureParameter + TEXTURE_RESIDENT = 0x8067 # GetTextureParameter +passthru: /* LightParameter */ + AMBIENT = 0x1200 # LightParameter + DIFFUSE = 0x1201 # LightParameter + SPECULAR = 0x1202 # LightParameter + POSITION = 0x1203 # LightParameter + SPOT_DIRECTION = 0x1204 # LightParameter + SPOT_EXPONENT = 0x1205 # LightParameter + SPOT_CUTOFF = 0x1206 # LightParameter + CONSTANT_ATTENUATION = 0x1207 # LightParameter + LINEAR_ATTENUATION = 0x1208 # LightParameter + QUADRATIC_ATTENUATION = 0x1209 # LightParameter +passthru: /* ListMode */ + COMPILE = 0x1300 # ListMode + COMPILE_AND_EXECUTE = 0x1301 # ListMode +passthru: /* DataType */ + 2_BYTES = 0x1407 # DataType + 3_BYTES = 0x1408 # DataType + 4_BYTES = 0x1409 # DataType +passthru: /* MaterialParameter */ + EMISSION = 0x1600 # MaterialParameter + SHININESS = 0x1601 # MaterialParameter + AMBIENT_AND_DIFFUSE = 0x1602 # MaterialParameter + COLOR_INDEXES = 0x1603 # MaterialParameter +passthru: /* MatrixMode */ + MODELVIEW = 0x1700 # MatrixMode + PROJECTION = 0x1701 # MatrixMode +passthru: /* PixelFormat */ + COLOR_INDEX = 0x1900 # PixelFormat + LUMINANCE = 0x1909 # PixelFormat + LUMINANCE_ALPHA = 0x190A # PixelFormat +passthru: /* PixelType */ + BITMAP = 0x1A00 # PixelType +passthru: /* RenderingMode */ + RENDER = 0x1C00 # RenderingMode + FEEDBACK = 0x1C01 # RenderingMode + SELECT = 0x1C02 # RenderingMode +passthru: /* ShadingModel */ + FLAT = 0x1D00 # ShadingModel + SMOOTH = 0x1D01 # ShadingModel +passthru: /* TextureCoordName */ + S = 0x2000 # TextureCoordName + T = 0x2001 # TextureCoordName + R = 0x2002 # TextureCoordName + Q = 0x2003 # TextureCoordName +passthru: /* TextureEnvMode */ + MODULATE = 0x2100 # TextureEnvMode + DECAL = 0x2101 # TextureEnvMode +passthru: /* TextureEnvParameter */ + TEXTURE_ENV_MODE = 0x2200 # TextureEnvParameter + TEXTURE_ENV_COLOR = 0x2201 # TextureEnvParameter +passthru: /* TextureEnvTarget */ + TEXTURE_ENV = 0x2300 # TextureEnvTarget +passthru: /* TextureGenMode */ + EYE_LINEAR = 0x2400 # TextureGenMode + OBJECT_LINEAR = 0x2401 # TextureGenMode + SPHERE_MAP = 0x2402 # TextureGenMode +passthru: /* TextureGenParameter */ + TEXTURE_GEN_MODE = 0x2500 # TextureGenParameter + OBJECT_PLANE = 0x2501 # TextureGenParameter + EYE_PLANE = 0x2502 # TextureGenParameter +passthru: /* TextureWrapMode */ + CLAMP = 0x2900 # TextureWrapMode +passthru: /* PixelInternalFormat */ + ALPHA4 = 0x803B # PixelInternalFormat + ALPHA8 = 0x803C # PixelInternalFormat + ALPHA12 = 0x803D # PixelInternalFormat + ALPHA16 = 0x803E # PixelInternalFormat + LUMINANCE4 = 0x803F # PixelInternalFormat + LUMINANCE8 = 0x8040 # PixelInternalFormat + LUMINANCE12 = 0x8041 # PixelInternalFormat + LUMINANCE16 = 0x8042 # PixelInternalFormat + LUMINANCE4_ALPHA4 = 0x8043 # PixelInternalFormat + LUMINANCE6_ALPHA2 = 0x8044 # PixelInternalFormat + LUMINANCE8_ALPHA8 = 0x8045 # PixelInternalFormat + LUMINANCE12_ALPHA4 = 0x8046 # PixelInternalFormat + LUMINANCE12_ALPHA12 = 0x8047 # PixelInternalFormat + LUMINANCE16_ALPHA16 = 0x8048 # PixelInternalFormat + INTENSITY = 0x8049 # PixelInternalFormat + INTENSITY4 = 0x804A # PixelInternalFormat + INTENSITY8 = 0x804B # PixelInternalFormat + INTENSITY12 = 0x804C # PixelInternalFormat + INTENSITY16 = 0x804D # PixelInternalFormat +passthru: /* InterleavedArrayFormat */ + V2F = 0x2A20 # InterleavedArrayFormat + V3F = 0x2A21 # InterleavedArrayFormat + C4UB_V2F = 0x2A22 # InterleavedArrayFormat + C4UB_V3F = 0x2A23 # InterleavedArrayFormat + C3F_V3F = 0x2A24 # InterleavedArrayFormat + N3F_V3F = 0x2A25 # InterleavedArrayFormat + C4F_N3F_V3F = 0x2A26 # InterleavedArrayFormat + T2F_V3F = 0x2A27 # InterleavedArrayFormat + T4F_V4F = 0x2A28 # InterleavedArrayFormat + T2F_C4UB_V3F = 0x2A29 # InterleavedArrayFormat + T2F_C3F_V3F = 0x2A2A # InterleavedArrayFormat + T2F_N3F_V3F = 0x2A2B # InterleavedArrayFormat + T2F_C4F_N3F_V3F = 0x2A2C # InterleavedArrayFormat + T4F_C4F_N3F_V4F = 0x2A2D # InterleavedArrayFormat +passthru: /* ClipPlaneName */ + CLIP_PLANE0 = 0x3000 # 1 I # ClipPlaneName + CLIP_PLANE1 = 0x3001 # 1 I # ClipPlaneName + CLIP_PLANE2 = 0x3002 # 1 I # ClipPlaneName + CLIP_PLANE3 = 0x3003 # 1 I # ClipPlaneName + CLIP_PLANE4 = 0x3004 # 1 I # ClipPlaneName + CLIP_PLANE5 = 0x3005 # 1 I # ClipPlaneName +passthru: /* LightName */ + LIGHT0 = 0x4000 # 1 I # LightName + LIGHT1 = 0x4001 # 1 I # LightName + LIGHT2 = 0x4002 # 1 I # LightName + LIGHT3 = 0x4003 # 1 I # LightName + LIGHT4 = 0x4004 # 1 I # LightName + LIGHT5 = 0x4005 # 1 I # LightName + LIGHT6 = 0x4006 # 1 I # LightName + LIGHT7 = 0x4007 # 1 I # LightName + + +############################################################################### +# +# OpenGL 1.2 enums +# +############################################################################### + +VERSION_1_2 enum: + UNSIGNED_BYTE_3_3_2 = 0x8032 # Equivalent to EXT_packed_pixels + UNSIGNED_SHORT_4_4_4_4 = 0x8033 + UNSIGNED_SHORT_5_5_5_1 = 0x8034 + UNSIGNED_INT_8_8_8_8 = 0x8035 + UNSIGNED_INT_10_10_10_2 = 0x8036 + TEXTURE_BINDING_3D = 0x806A # 1 I + PACK_SKIP_IMAGES = 0x806B # 1 I + PACK_IMAGE_HEIGHT = 0x806C # 1 F + UNPACK_SKIP_IMAGES = 0x806D # 1 I + UNPACK_IMAGE_HEIGHT = 0x806E # 1 F + TEXTURE_3D = 0x806F # 1 I + PROXY_TEXTURE_3D = 0x8070 + TEXTURE_DEPTH = 0x8071 + TEXTURE_WRAP_R = 0x8072 + MAX_3D_TEXTURE_SIZE = 0x8073 # 1 I + UNSIGNED_BYTE_2_3_3_REV = 0x8362 # New for OpenGL 1.2 + UNSIGNED_SHORT_5_6_5 = 0x8363 + UNSIGNED_SHORT_5_6_5_REV = 0x8364 + UNSIGNED_SHORT_4_4_4_4_REV = 0x8365 + UNSIGNED_SHORT_1_5_5_5_REV = 0x8366 + UNSIGNED_INT_8_8_8_8_REV = 0x8367 + UNSIGNED_INT_2_10_10_10_REV = 0x8368 + BGR = 0x80E0 + BGRA = 0x80E1 + MAX_ELEMENTS_VERTICES = 0x80E8 + MAX_ELEMENTS_INDICES = 0x80E9 + CLAMP_TO_EDGE = 0x812F # Equivalent to SGIS_texture_edge_clamp + TEXTURE_MIN_LOD = 0x813A # Equivalent to SGIS_texture_lod + TEXTURE_MAX_LOD = 0x813B + TEXTURE_BASE_LEVEL = 0x813C + TEXTURE_MAX_LEVEL = 0x813D + SMOOTH_POINT_SIZE_RANGE = 0x0B12 # 2 F + SMOOTH_POINT_SIZE_GRANULARITY = 0x0B13 # 1 F + SMOOTH_LINE_WIDTH_RANGE = 0x0B22 # 2 F + SMOOTH_LINE_WIDTH_GRANULARITY = 0x0B23 # 1 F + ALIASED_LINE_WIDTH_RANGE = 0x846E # 2 F + +VERSION_1_2_DEPRECATED enum: + RESCALE_NORMAL = 0x803A # 1 I # Equivalent to EXT_rescale_normal + LIGHT_MODEL_COLOR_CONTROL = 0x81F8 # 1 I + SINGLE_COLOR = 0x81F9 + SEPARATE_SPECULAR_COLOR = 0x81FA + ALIASED_POINT_SIZE_RANGE = 0x846D # 2 F + +ARB_imaging enum: + CONSTANT_COLOR = 0x8001 # Equivalent to EXT_blend_color + ONE_MINUS_CONSTANT_COLOR = 0x8002 + CONSTANT_ALPHA = 0x8003 + ONE_MINUS_CONSTANT_ALPHA = 0x8004 + BLEND_COLOR = 0x8005 # 4 F + FUNC_ADD = 0x8006 # Equivalent to EXT_blend_minmax + MIN = 0x8007 + MAX = 0x8008 + BLEND_EQUATION = 0x8009 # 1 I + FUNC_SUBTRACT = 0x800A # Equivalent to EXT_blend_subtract + FUNC_REVERSE_SUBTRACT = 0x800B + +ARB_imaging_DEPRECATED enum: + CONVOLUTION_1D = 0x8010 # 1 I # Equivalent to EXT_convolution + CONVOLUTION_2D = 0x8011 # 1 I + SEPARABLE_2D = 0x8012 # 1 I + CONVOLUTION_BORDER_MODE = 0x8013 + CONVOLUTION_FILTER_SCALE = 0x8014 + CONVOLUTION_FILTER_BIAS = 0x8015 + REDUCE = 0x8016 + CONVOLUTION_FORMAT = 0x8017 + CONVOLUTION_WIDTH = 0x8018 + CONVOLUTION_HEIGHT = 0x8019 + MAX_CONVOLUTION_WIDTH = 0x801A + MAX_CONVOLUTION_HEIGHT = 0x801B + POST_CONVOLUTION_RED_SCALE = 0x801C # 1 F + POST_CONVOLUTION_GREEN_SCALE = 0x801D # 1 F + POST_CONVOLUTION_BLUE_SCALE = 0x801E # 1 F + POST_CONVOLUTION_ALPHA_SCALE = 0x801F # 1 F + POST_CONVOLUTION_RED_BIAS = 0x8020 # 1 F + POST_CONVOLUTION_GREEN_BIAS = 0x8021 # 1 F + POST_CONVOLUTION_BLUE_BIAS = 0x8022 # 1 F + POST_CONVOLUTION_ALPHA_BIAS = 0x8023 # 1 F + HISTOGRAM = 0x8024 # 1 I # Equivalent to EXT_histogram + PROXY_HISTOGRAM = 0x8025 + HISTOGRAM_WIDTH = 0x8026 + HISTOGRAM_FORMAT = 0x8027 + HISTOGRAM_RED_SIZE = 0x8028 + HISTOGRAM_GREEN_SIZE = 0x8029 + HISTOGRAM_BLUE_SIZE = 0x802A + HISTOGRAM_ALPHA_SIZE = 0x802B + HISTOGRAM_LUMINANCE_SIZE = 0x802C + HISTOGRAM_SINK = 0x802D + MINMAX = 0x802E # 1 I + MINMAX_FORMAT = 0x802F + MINMAX_SINK = 0x8030 + TABLE_TOO_LARGE = 0x8031 + COLOR_MATRIX = 0x80B1 # 16 F # Equivalent to SGI_color_matrix + COLOR_MATRIX_STACK_DEPTH = 0x80B2 # 1 I + MAX_COLOR_MATRIX_STACK_DEPTH = 0x80B3 # 1 I + POST_COLOR_MATRIX_RED_SCALE = 0x80B4 # 1 F + POST_COLOR_MATRIX_GREEN_SCALE = 0x80B5 # 1 F + POST_COLOR_MATRIX_BLUE_SCALE = 0x80B6 # 1 F + POST_COLOR_MATRIX_ALPHA_SCALE = 0x80B7 # 1 F + POST_COLOR_MATRIX_RED_BIAS = 0x80B8 # 1 F + POST_COLOR_MATRIX_GREEN_BIAS = 0x80B9 # 1 F + POST_COLOR_MATRIX_BLUE_BIAS = 0x80BA # 1 F + POST_COLOR_MATRIX_ALPHA_BIAS = 0x80BB # 1 F + COLOR_TABLE = 0x80D0 # 1 I # Equivalent to SGI_color_table + POST_CONVOLUTION_COLOR_TABLE = 0x80D1 # 1 I + POST_COLOR_MATRIX_COLOR_TABLE = 0x80D2 # 1 I + PROXY_COLOR_TABLE = 0x80D3 + PROXY_POST_CONVOLUTION_COLOR_TABLE = 0x80D4 + PROXY_POST_COLOR_MATRIX_COLOR_TABLE = 0x80D5 + COLOR_TABLE_SCALE = 0x80D6 + COLOR_TABLE_BIAS = 0x80D7 + COLOR_TABLE_FORMAT = 0x80D8 + COLOR_TABLE_WIDTH = 0x80D9 + COLOR_TABLE_RED_SIZE = 0x80DA + COLOR_TABLE_GREEN_SIZE = 0x80DB + COLOR_TABLE_BLUE_SIZE = 0x80DC + COLOR_TABLE_ALPHA_SIZE = 0x80DD + COLOR_TABLE_LUMINANCE_SIZE = 0x80DE + COLOR_TABLE_INTENSITY_SIZE = 0x80DF + CONSTANT_BORDER = 0x8151 + REPLICATE_BORDER = 0x8153 + CONVOLUTION_BORDER_COLOR = 0x8154 + + +############################################################################### +# +# OpenGL 1.3 enums +# +############################################################################### + +VERSION_1_3 enum: + TEXTURE0 = 0x84C0 # Promoted from ARB_multitexture + TEXTURE1 = 0x84C1 + TEXTURE2 = 0x84C2 + TEXTURE3 = 0x84C3 + TEXTURE4 = 0x84C4 + TEXTURE5 = 0x84C5 + TEXTURE6 = 0x84C6 + TEXTURE7 = 0x84C7 + TEXTURE8 = 0x84C8 + TEXTURE9 = 0x84C9 + TEXTURE10 = 0x84CA + TEXTURE11 = 0x84CB + TEXTURE12 = 0x84CC + TEXTURE13 = 0x84CD + TEXTURE14 = 0x84CE + TEXTURE15 = 0x84CF + TEXTURE16 = 0x84D0 + TEXTURE17 = 0x84D1 + TEXTURE18 = 0x84D2 + TEXTURE19 = 0x84D3 + TEXTURE20 = 0x84D4 + TEXTURE21 = 0x84D5 + TEXTURE22 = 0x84D6 + TEXTURE23 = 0x84D7 + TEXTURE24 = 0x84D8 + TEXTURE25 = 0x84D9 + TEXTURE26 = 0x84DA + TEXTURE27 = 0x84DB + TEXTURE28 = 0x84DC + TEXTURE29 = 0x84DD + TEXTURE30 = 0x84DE + TEXTURE31 = 0x84DF + ACTIVE_TEXTURE = 0x84E0 # 1 I + MULTISAMPLE = 0x809D # Promoted from ARB_multisample + SAMPLE_ALPHA_TO_COVERAGE = 0x809E + SAMPLE_ALPHA_TO_ONE = 0x809F + SAMPLE_COVERAGE = 0x80A0 + SAMPLE_BUFFERS = 0x80A8 + SAMPLES = 0x80A9 + SAMPLE_COVERAGE_VALUE = 0x80AA + SAMPLE_COVERAGE_INVERT = 0x80AB + TEXTURE_CUBE_MAP = 0x8513 + TEXTURE_BINDING_CUBE_MAP = 0x8514 + TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515 + TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516 + TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517 + TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518 + TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519 + TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A + PROXY_TEXTURE_CUBE_MAP = 0x851B + MAX_CUBE_MAP_TEXTURE_SIZE = 0x851C + COMPRESSED_RGB = 0x84ED + COMPRESSED_RGBA = 0x84EE + TEXTURE_COMPRESSION_HINT = 0x84EF + TEXTURE_COMPRESSED_IMAGE_SIZE = 0x86A0 + TEXTURE_COMPRESSED = 0x86A1 + NUM_COMPRESSED_TEXTURE_FORMATS = 0x86A2 + COMPRESSED_TEXTURE_FORMATS = 0x86A3 + CLAMP_TO_BORDER = 0x812D # Promoted from ARB_texture_border_clamp + +VERSION_1_3_DEPRECATED enum: + CLIENT_ACTIVE_TEXTURE = 0x84E1 # 1 I + MAX_TEXTURE_UNITS = 0x84E2 # 1 I + TRANSPOSE_MODELVIEW_MATRIX = 0x84E3 # 16 F # Promoted from ARB_transpose_matrix + TRANSPOSE_PROJECTION_MATRIX = 0x84E4 # 16 F + TRANSPOSE_TEXTURE_MATRIX = 0x84E5 # 16 F + TRANSPOSE_COLOR_MATRIX = 0x84E6 # 16 F + MULTISAMPLE_BIT = 0x20000000 + NORMAL_MAP = 0x8511 # Promoted from ARB_texture_cube_map + REFLECTION_MAP = 0x8512 + COMPRESSED_ALPHA = 0x84E9 # Promoted from ARB_texture_compression + COMPRESSED_LUMINANCE = 0x84EA + COMPRESSED_LUMINANCE_ALPHA = 0x84EB + COMPRESSED_INTENSITY = 0x84EC + COMBINE = 0x8570 # Promoted from ARB_texture_env_combine + COMBINE_RGB = 0x8571 + COMBINE_ALPHA = 0x8572 + SOURCE0_RGB = 0x8580 + SOURCE1_RGB = 0x8581 + SOURCE2_RGB = 0x8582 + SOURCE0_ALPHA = 0x8588 + SOURCE1_ALPHA = 0x8589 + SOURCE2_ALPHA = 0x858A + OPERAND0_RGB = 0x8590 + OPERAND1_RGB = 0x8591 + OPERAND2_RGB = 0x8592 + OPERAND0_ALPHA = 0x8598 + OPERAND1_ALPHA = 0x8599 + OPERAND2_ALPHA = 0x859A + RGB_SCALE = 0x8573 + ADD_SIGNED = 0x8574 + INTERPOLATE = 0x8575 + SUBTRACT = 0x84E7 + CONSTANT = 0x8576 + PRIMARY_COLOR = 0x8577 + PREVIOUS = 0x8578 + DOT3_RGB = 0x86AE # Promoted from ARB_texture_env_dot3 + DOT3_RGBA = 0x86AF + + +############################################################################### +# +# OpenGL 1.4 enums +# +############################################################################### + +VERSION_1_4 enum: + BLEND_DST_RGB = 0x80C8 + BLEND_SRC_RGB = 0x80C9 + BLEND_DST_ALPHA = 0x80CA + BLEND_SRC_ALPHA = 0x80CB + POINT_FADE_THRESHOLD_SIZE = 0x8128 # 1 F + DEPTH_COMPONENT16 = 0x81A5 + DEPTH_COMPONENT24 = 0x81A6 + DEPTH_COMPONENT32 = 0x81A7 + MIRRORED_REPEAT = 0x8370 + MAX_TEXTURE_LOD_BIAS = 0x84FD + TEXTURE_LOD_BIAS = 0x8501 + INCR_WRAP = 0x8507 + DECR_WRAP = 0x8508 + TEXTURE_DEPTH_SIZE = 0x884A + TEXTURE_COMPARE_MODE = 0x884C + TEXTURE_COMPARE_FUNC = 0x884D + +VERSION_1_4_DEPRECATED enum: + POINT_SIZE_MIN = 0x8126 # 1 F + POINT_SIZE_MAX = 0x8127 # 1 F + POINT_DISTANCE_ATTENUATION = 0x8129 # 3 F + GENERATE_MIPMAP = 0x8191 + GENERATE_MIPMAP_HINT = 0x8192 # 1 I + FOG_COORDINATE_SOURCE = 0x8450 # 1 I + FOG_COORDINATE = 0x8451 + FRAGMENT_DEPTH = 0x8452 + CURRENT_FOG_COORDINATE = 0x8453 # 1 F + FOG_COORDINATE_ARRAY_TYPE = 0x8454 # 1 I + FOG_COORDINATE_ARRAY_STRIDE = 0x8455 # 1 I + FOG_COORDINATE_ARRAY_POINTER = 0x8456 + FOG_COORDINATE_ARRAY = 0x8457 # 1 I + COLOR_SUM = 0x8458 # 1 I + CURRENT_SECONDARY_COLOR = 0x8459 # 3 F + SECONDARY_COLOR_ARRAY_SIZE = 0x845A # 1 I + SECONDARY_COLOR_ARRAY_TYPE = 0x845B # 1 I + SECONDARY_COLOR_ARRAY_STRIDE = 0x845C # 1 I + SECONDARY_COLOR_ARRAY_POINTER = 0x845D + SECONDARY_COLOR_ARRAY = 0x845E # 1 I + TEXTURE_FILTER_CONTROL = 0x8500 + DEPTH_TEXTURE_MODE = 0x884B + COMPARE_R_TO_TEXTURE = 0x884E + + +############################################################################### +# +# OpenGL 1.5 enums +# +############################################################################### + +VERSION_1_5 enum: + BUFFER_SIZE = 0x8764 # ARB_vertex_buffer_object + BUFFER_USAGE = 0x8765 # ARB_vertex_buffer_object + QUERY_COUNTER_BITS = 0x8864 # ARB_occlusion_query + CURRENT_QUERY = 0x8865 # ARB_occlusion_query + QUERY_RESULT = 0x8866 # ARB_occlusion_query + QUERY_RESULT_AVAILABLE = 0x8867 # ARB_occlusion_query + ARRAY_BUFFER = 0x8892 # ARB_vertex_buffer_object + ELEMENT_ARRAY_BUFFER = 0x8893 # ARB_vertex_buffer_object + ARRAY_BUFFER_BINDING = 0x8894 # ARB_vertex_buffer_object + ELEMENT_ARRAY_BUFFER_BINDING = 0x8895 # ARB_vertex_buffer_object + VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889F # ARB_vertex_buffer_object + READ_ONLY = 0x88B8 # ARB_vertex_buffer_object + WRITE_ONLY = 0x88B9 # ARB_vertex_buffer_object + READ_WRITE = 0x88BA # ARB_vertex_buffer_object + BUFFER_ACCESS = 0x88BB # ARB_vertex_buffer_object + BUFFER_MAPPED = 0x88BC # ARB_vertex_buffer_object + BUFFER_MAP_POINTER = 0x88BD # ARB_vertex_buffer_object + STREAM_DRAW = 0x88E0 # ARB_vertex_buffer_object + STREAM_READ = 0x88E1 # ARB_vertex_buffer_object + STREAM_COPY = 0x88E2 # ARB_vertex_buffer_object + STATIC_DRAW = 0x88E4 # ARB_vertex_buffer_object + STATIC_READ = 0x88E5 # ARB_vertex_buffer_object + STATIC_COPY = 0x88E6 # ARB_vertex_buffer_object + DYNAMIC_DRAW = 0x88E8 # ARB_vertex_buffer_object + DYNAMIC_READ = 0x88E9 # ARB_vertex_buffer_object + DYNAMIC_COPY = 0x88EA # ARB_vertex_buffer_object + SAMPLES_PASSED = 0x8914 # ARB_occlusion_query + +VERSION_1_5_DEPRECATED enum: + VERTEX_ARRAY_BUFFER_BINDING = 0x8896 # ARB_vertex_buffer_object + NORMAL_ARRAY_BUFFER_BINDING = 0x8897 # ARB_vertex_buffer_object + COLOR_ARRAY_BUFFER_BINDING = 0x8898 # ARB_vertex_buffer_object + INDEX_ARRAY_BUFFER_BINDING = 0x8899 # ARB_vertex_buffer_object + TEXTURE_COORD_ARRAY_BUFFER_BINDING = 0x889A # ARB_vertex_buffer_object + EDGE_FLAG_ARRAY_BUFFER_BINDING = 0x889B # ARB_vertex_buffer_object + SECONDARY_COLOR_ARRAY_BUFFER_BINDING = 0x889C # ARB_vertex_buffer_object + FOG_COORDINATE_ARRAY_BUFFER_BINDING = 0x889D # ARB_vertex_buffer_object + WEIGHT_ARRAY_BUFFER_BINDING = 0x889E # ARB_vertex_buffer_object + FOG_COORD_SRC = 0x8450 # alias GL_FOG_COORDINATE_SOURCE + FOG_COORD = 0x8451 # alias GL_FOG_COORDINATE + CURRENT_FOG_COORD = 0x8453 # alias GL_CURRENT_FOG_COORDINATE + FOG_COORD_ARRAY_TYPE = 0x8454 # alias GL_FOG_COORDINATE_ARRAY_TYPE + FOG_COORD_ARRAY_STRIDE = 0x8455 # alias GL_FOG_COORDINATE_ARRAY_STRIDE + FOG_COORD_ARRAY_POINTER = 0x8456 # alias GL_FOG_COORDINATE_ARRAY_POINTER + FOG_COORD_ARRAY = 0x8457 # alias GL_FOG_COORDINATE_ARRAY + FOG_COORD_ARRAY_BUFFER_BINDING = 0x889D # alias GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING +# New naming scheme + SRC0_RGB = 0x8580 # alias GL_SOURCE0_RGB + SRC1_RGB = 0x8581 # alias GL_SOURCE1_RGB + SRC2_RGB = 0x8582 # alias GL_SOURCE2_RGB + SRC0_ALPHA = 0x8588 # alias GL_SOURCE0_ALPHA + SRC1_ALPHA = 0x8589 # alias GL_SOURCE1_ALPHA + SRC2_ALPHA = 0x858A # alias GL_SOURCE2_ALPHA + +############################################################################### +# +# OpenGL 2.0 enums +# +############################################################################### + +VERSION_2_0 enum: + BLEND_EQUATION_RGB = 0x8009 # EXT_blend_equation_separate # alias GL_BLEND_EQUATION + VERTEX_ATTRIB_ARRAY_ENABLED = 0x8622 # ARB_vertex_shader + VERTEX_ATTRIB_ARRAY_SIZE = 0x8623 # ARB_vertex_shader + VERTEX_ATTRIB_ARRAY_STRIDE = 0x8624 # ARB_vertex_shader + VERTEX_ATTRIB_ARRAY_TYPE = 0x8625 # ARB_vertex_shader + CURRENT_VERTEX_ATTRIB = 0x8626 # ARB_vertex_shader + VERTEX_PROGRAM_POINT_SIZE = 0x8642 # ARB_vertex_shader + VERTEX_ATTRIB_ARRAY_POINTER = 0x8645 # ARB_vertex_shader + STENCIL_BACK_FUNC = 0x8800 # ARB_stencil_two_side + STENCIL_BACK_FAIL = 0x8801 # ARB_stencil_two_side + STENCIL_BACK_PASS_DEPTH_FAIL = 0x8802 # ARB_stencil_two_side + STENCIL_BACK_PASS_DEPTH_PASS = 0x8803 # ARB_stencil_two_side + MAX_DRAW_BUFFERS = 0x8824 # ARB_draw_buffers + DRAW_BUFFER0 = 0x8825 # ARB_draw_buffers + DRAW_BUFFER1 = 0x8826 # ARB_draw_buffers + DRAW_BUFFER2 = 0x8827 # ARB_draw_buffers + DRAW_BUFFER3 = 0x8828 # ARB_draw_buffers + DRAW_BUFFER4 = 0x8829 # ARB_draw_buffers + DRAW_BUFFER5 = 0x882A # ARB_draw_buffers + DRAW_BUFFER6 = 0x882B # ARB_draw_buffers + DRAW_BUFFER7 = 0x882C # ARB_draw_buffers + DRAW_BUFFER8 = 0x882D # ARB_draw_buffers + DRAW_BUFFER9 = 0x882E # ARB_draw_buffers + DRAW_BUFFER10 = 0x882F # ARB_draw_buffers + DRAW_BUFFER11 = 0x8830 # ARB_draw_buffers + DRAW_BUFFER12 = 0x8831 # ARB_draw_buffers + DRAW_BUFFER13 = 0x8832 # ARB_draw_buffers + DRAW_BUFFER14 = 0x8833 # ARB_draw_buffers + DRAW_BUFFER15 = 0x8834 # ARB_draw_buffers + BLEND_EQUATION_ALPHA = 0x883D # EXT_blend_equation_separate + MAX_VERTEX_ATTRIBS = 0x8869 # ARB_vertex_shader + VERTEX_ATTRIB_ARRAY_NORMALIZED = 0x886A # ARB_vertex_shader + MAX_TEXTURE_IMAGE_UNITS = 0x8872 # ARB_vertex_shader, ARB_fragment_shader + FRAGMENT_SHADER = 0x8B30 # ARB_fragment_shader + VERTEX_SHADER = 0x8B31 # ARB_vertex_shader + MAX_FRAGMENT_UNIFORM_COMPONENTS = 0x8B49 # ARB_fragment_shader + MAX_VERTEX_UNIFORM_COMPONENTS = 0x8B4A # ARB_vertex_shader + MAX_VARYING_FLOATS = 0x8B4B # ARB_vertex_shader + MAX_VERTEX_TEXTURE_IMAGE_UNITS = 0x8B4C # ARB_vertex_shader + MAX_COMBINED_TEXTURE_IMAGE_UNITS = 0x8B4D # ARB_vertex_shader + SHADER_TYPE = 0x8B4F # ARB_shader_objects + FLOAT_VEC2 = 0x8B50 # ARB_shader_objects + FLOAT_VEC3 = 0x8B51 # ARB_shader_objects + FLOAT_VEC4 = 0x8B52 # ARB_shader_objects + INT_VEC2 = 0x8B53 # ARB_shader_objects + INT_VEC3 = 0x8B54 # ARB_shader_objects + INT_VEC4 = 0x8B55 # ARB_shader_objects + BOOL = 0x8B56 # ARB_shader_objects + BOOL_VEC2 = 0x8B57 # ARB_shader_objects + BOOL_VEC3 = 0x8B58 # ARB_shader_objects + BOOL_VEC4 = 0x8B59 # ARB_shader_objects + FLOAT_MAT2 = 0x8B5A # ARB_shader_objects + FLOAT_MAT3 = 0x8B5B # ARB_shader_objects + FLOAT_MAT4 = 0x8B5C # ARB_shader_objects + SAMPLER_1D = 0x8B5D # ARB_shader_objects + SAMPLER_2D = 0x8B5E # ARB_shader_objects + SAMPLER_3D = 0x8B5F # ARB_shader_objects + SAMPLER_CUBE = 0x8B60 # ARB_shader_objects + SAMPLER_1D_SHADOW = 0x8B61 # ARB_shader_objects + SAMPLER_2D_SHADOW = 0x8B62 # ARB_shader_objects + DELETE_STATUS = 0x8B80 # ARB_shader_objects + COMPILE_STATUS = 0x8B81 # ARB_shader_objects + LINK_STATUS = 0x8B82 # ARB_shader_objects + VALIDATE_STATUS = 0x8B83 # ARB_shader_objects + INFO_LOG_LENGTH = 0x8B84 # ARB_shader_objects + ATTACHED_SHADERS = 0x8B85 # ARB_shader_objects + ACTIVE_UNIFORMS = 0x8B86 # ARB_shader_objects + ACTIVE_UNIFORM_MAX_LENGTH = 0x8B87 # ARB_shader_objects + SHADER_SOURCE_LENGTH = 0x8B88 # ARB_shader_objects + ACTIVE_ATTRIBUTES = 0x8B89 # ARB_vertex_shader + ACTIVE_ATTRIBUTE_MAX_LENGTH = 0x8B8A # ARB_vertex_shader + FRAGMENT_SHADER_DERIVATIVE_HINT = 0x8B8B # ARB_fragment_shader + SHADING_LANGUAGE_VERSION = 0x8B8C # ARB_shading_language_100 + CURRENT_PROGRAM = 0x8B8D # ARB_shader_objects (added for 2.0) + POINT_SPRITE_COORD_ORIGIN = 0x8CA0 # ARB_point_sprite (added for 2.0) + LOWER_LEFT = 0x8CA1 # ARB_point_sprite (added for 2.0) + UPPER_LEFT = 0x8CA2 # ARB_point_sprite (added for 2.0) + STENCIL_BACK_REF = 0x8CA3 # ARB_stencil_two_side + STENCIL_BACK_VALUE_MASK = 0x8CA4 # ARB_stencil_two_side + STENCIL_BACK_WRITEMASK = 0x8CA5 # ARB_stencil_two_side + +VERSION_2_0_DEPRECATED enum: + VERTEX_PROGRAM_TWO_SIDE = 0x8643 # ARB_vertex_shader + POINT_SPRITE = 0x8861 # ARB_point_sprite + COORD_REPLACE = 0x8862 # ARB_point_sprite + MAX_TEXTURE_COORDS = 0x8871 # ARB_vertex_shader, ARB_fragment_shader + + +############################################################################### +# +# OpenGL 2.1 enums +# +############################################################################### + +VERSION_2_1 enum: + PIXEL_PACK_BUFFER = 0x88EB # ARB_pixel_buffer_object + PIXEL_UNPACK_BUFFER = 0x88EC # ARB_pixel_buffer_object + PIXEL_PACK_BUFFER_BINDING = 0x88ED # ARB_pixel_buffer_object + PIXEL_UNPACK_BUFFER_BINDING = 0x88EF # ARB_pixel_buffer_object + FLOAT_MAT2x3 = 0x8B65 # New for 2.1 + FLOAT_MAT2x4 = 0x8B66 # New for 2.1 + FLOAT_MAT3x2 = 0x8B67 # New for 2.1 + FLOAT_MAT3x4 = 0x8B68 # New for 2.1 + FLOAT_MAT4x2 = 0x8B69 # New for 2.1 + FLOAT_MAT4x3 = 0x8B6A # New for 2.1 + SRGB = 0x8C40 # EXT_texture_sRGB + SRGB8 = 0x8C41 # EXT_texture_sRGB + SRGB_ALPHA = 0x8C42 # EXT_texture_sRGB + SRGB8_ALPHA8 = 0x8C43 # EXT_texture_sRGB + COMPRESSED_SRGB = 0x8C48 # EXT_texture_sRGB + COMPRESSED_SRGB_ALPHA = 0x8C49 # EXT_texture_sRGB + +VERSION_2_1_DEPRECATED enum: + CURRENT_RASTER_SECONDARY_COLOR = 0x845F # New for 2.1 + SLUMINANCE_ALPHA = 0x8C44 # EXT_texture_sRGB + SLUMINANCE8_ALPHA8 = 0x8C45 # EXT_texture_sRGB + SLUMINANCE = 0x8C46 # EXT_texture_sRGB + SLUMINANCE8 = 0x8C47 # EXT_texture_sRGB + COMPRESSED_SLUMINANCE = 0x8C4A # EXT_texture_sRGB + COMPRESSED_SLUMINANCE_ALPHA = 0x8C4B # EXT_texture_sRGB + + +############################################################################### +# +# OpenGL 3.0 enums +# +############################################################################### + +VERSION_3_0 enum: + COMPARE_REF_TO_TEXTURE = 0x884E # alias GL_COMPARE_R_TO_TEXTURE_ARB + CLIP_DISTANCE0 = 0x3000 # alias GL_CLIP_PLANE0 + CLIP_DISTANCE1 = 0x3001 # alias GL_CLIP_PLANE1 + CLIP_DISTANCE2 = 0x3002 # alias GL_CLIP_PLANE2 + CLIP_DISTANCE3 = 0x3003 # alias GL_CLIP_PLANE3 + CLIP_DISTANCE4 = 0x3004 # alias GL_CLIP_PLANE4 + CLIP_DISTANCE5 = 0x3005 # alias GL_CLIP_PLANE5 + CLIP_DISTANCE6 = 0x3006 + CLIP_DISTANCE7 = 0x3007 + MAX_CLIP_DISTANCES = 0x0D32 # alias GL_MAX_CLIP_PLANES + MAJOR_VERSION = 0x821B + MINOR_VERSION = 0x821C + NUM_EXTENSIONS = 0x821D + CONTEXT_FLAGS = 0x821E + DEPTH_BUFFER = 0x8223 + STENCIL_BUFFER = 0x8224 + COMPRESSED_RED = 0x8225 + COMPRESSED_RG = 0x8226 + CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT = 0x0001 + RGBA32F = 0x8814 + RGB32F = 0x8815 + RGBA16F = 0x881A + RGB16F = 0x881B + VERTEX_ATTRIB_ARRAY_INTEGER = 0x88FD + MAX_ARRAY_TEXTURE_LAYERS = 0x88FF + MIN_PROGRAM_TEXEL_OFFSET = 0x8904 + MAX_PROGRAM_TEXEL_OFFSET = 0x8905 + CLAMP_READ_COLOR = 0x891C + FIXED_ONLY = 0x891D + MAX_VARYING_COMPONENTS = 0x8B4B # alias GL_MAX_VARYING_FLOATS + TEXTURE_1D_ARRAY = 0x8C18 + PROXY_TEXTURE_1D_ARRAY = 0x8C19 + TEXTURE_2D_ARRAY = 0x8C1A + PROXY_TEXTURE_2D_ARRAY = 0x8C1B + TEXTURE_BINDING_1D_ARRAY = 0x8C1C + TEXTURE_BINDING_2D_ARRAY = 0x8C1D + R11F_G11F_B10F = 0x8C3A + UNSIGNED_INT_10F_11F_11F_REV = 0x8C3B + RGB9_E5 = 0x8C3D + UNSIGNED_INT_5_9_9_9_REV = 0x8C3E + TEXTURE_SHARED_SIZE = 0x8C3F + TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH = 0x8C76 + TRANSFORM_FEEDBACK_BUFFER_MODE = 0x8C7F + MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS = 0x8C80 + TRANSFORM_FEEDBACK_VARYINGS = 0x8C83 + TRANSFORM_FEEDBACK_BUFFER_START = 0x8C84 + TRANSFORM_FEEDBACK_BUFFER_SIZE = 0x8C85 + PRIMITIVES_GENERATED = 0x8C87 + TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN = 0x8C88 + RASTERIZER_DISCARD = 0x8C89 + MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS = 0x8C8A + MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS = 0x8C8B + INTERLEAVED_ATTRIBS = 0x8C8C + SEPARATE_ATTRIBS = 0x8C8D + TRANSFORM_FEEDBACK_BUFFER = 0x8C8E + TRANSFORM_FEEDBACK_BUFFER_BINDING = 0x8C8F + RGBA32UI = 0x8D70 + RGB32UI = 0x8D71 + RGBA16UI = 0x8D76 + RGB16UI = 0x8D77 + RGBA8UI = 0x8D7C + RGB8UI = 0x8D7D + RGBA32I = 0x8D82 + RGB32I = 0x8D83 + RGBA16I = 0x8D88 + RGB16I = 0x8D89 + RGBA8I = 0x8D8E + RGB8I = 0x8D8F + RED_INTEGER = 0x8D94 + GREEN_INTEGER = 0x8D95 + BLUE_INTEGER = 0x8D96 + RGB_INTEGER = 0x8D98 + RGBA_INTEGER = 0x8D99 + BGR_INTEGER = 0x8D9A + BGRA_INTEGER = 0x8D9B + SAMPLER_1D_ARRAY = 0x8DC0 + SAMPLER_2D_ARRAY = 0x8DC1 + SAMPLER_1D_ARRAY_SHADOW = 0x8DC3 + SAMPLER_2D_ARRAY_SHADOW = 0x8DC4 + SAMPLER_CUBE_SHADOW = 0x8DC5 + UNSIGNED_INT_VEC2 = 0x8DC6 + UNSIGNED_INT_VEC3 = 0x8DC7 + UNSIGNED_INT_VEC4 = 0x8DC8 + INT_SAMPLER_1D = 0x8DC9 + INT_SAMPLER_2D = 0x8DCA + INT_SAMPLER_3D = 0x8DCB + INT_SAMPLER_CUBE = 0x8DCC + INT_SAMPLER_1D_ARRAY = 0x8DCE + INT_SAMPLER_2D_ARRAY = 0x8DCF + UNSIGNED_INT_SAMPLER_1D = 0x8DD1 + UNSIGNED_INT_SAMPLER_2D = 0x8DD2 + UNSIGNED_INT_SAMPLER_3D = 0x8DD3 + UNSIGNED_INT_SAMPLER_CUBE = 0x8DD4 + UNSIGNED_INT_SAMPLER_1D_ARRAY = 0x8DD6 + UNSIGNED_INT_SAMPLER_2D_ARRAY = 0x8DD7 + QUERY_WAIT = 0x8E13 + QUERY_NO_WAIT = 0x8E14 + QUERY_BY_REGION_WAIT = 0x8E15 + QUERY_BY_REGION_NO_WAIT = 0x8E16 + BUFFER_ACCESS_FLAGS = 0x911F + BUFFER_MAP_LENGTH = 0x9120 + BUFFER_MAP_OFFSET = 0x9121 +passthru: /* Reuse tokens from ARB_depth_buffer_float */ + use ARB_depth_buffer_float DEPTH_COMPONENT32F + use ARB_depth_buffer_float DEPTH32F_STENCIL8 + use ARB_depth_buffer_float FLOAT_32_UNSIGNED_INT_24_8_REV +passthru: /* Reuse tokens from ARB_framebuffer_object */ + use ARB_framebuffer_object INVALID_FRAMEBUFFER_OPERATION + use ARB_framebuffer_object FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING + use ARB_framebuffer_object FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE + use ARB_framebuffer_object FRAMEBUFFER_ATTACHMENT_RED_SIZE + use ARB_framebuffer_object FRAMEBUFFER_ATTACHMENT_GREEN_SIZE + use ARB_framebuffer_object FRAMEBUFFER_ATTACHMENT_BLUE_SIZE + use ARB_framebuffer_object FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE + use ARB_framebuffer_object FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE + use ARB_framebuffer_object FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE + use ARB_framebuffer_object FRAMEBUFFER_DEFAULT + use ARB_framebuffer_object FRAMEBUFFER_UNDEFINED + use ARB_framebuffer_object DEPTH_STENCIL_ATTACHMENT + use ARB_framebuffer_object INDEX + use ARB_framebuffer_object MAX_RENDERBUFFER_SIZE + use ARB_framebuffer_object DEPTH_STENCIL + use ARB_framebuffer_object UNSIGNED_INT_24_8 + use ARB_framebuffer_object DEPTH24_STENCIL8 + use ARB_framebuffer_object TEXTURE_STENCIL_SIZE + use ARB_framebuffer_object TEXTURE_RED_TYPE + use ARB_framebuffer_object TEXTURE_GREEN_TYPE + use ARB_framebuffer_object TEXTURE_BLUE_TYPE + use ARB_framebuffer_object TEXTURE_ALPHA_TYPE + use ARB_framebuffer_object TEXTURE_DEPTH_TYPE + use ARB_framebuffer_object UNSIGNED_NORMALIZED + use ARB_framebuffer_object FRAMEBUFFER_BINDING + use ARB_framebuffer_object DRAW_FRAMEBUFFER_BINDING + use ARB_framebuffer_object RENDERBUFFER_BINDING + use ARB_framebuffer_object READ_FRAMEBUFFER + use ARB_framebuffer_object DRAW_FRAMEBUFFER + use ARB_framebuffer_object READ_FRAMEBUFFER_BINDING + use ARB_framebuffer_object RENDERBUFFER_SAMPLES + use ARB_framebuffer_object FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE + use ARB_framebuffer_object FRAMEBUFFER_ATTACHMENT_OBJECT_NAME + use ARB_framebuffer_object FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL + use ARB_framebuffer_object FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE + use ARB_framebuffer_object FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER + use ARB_framebuffer_object FRAMEBUFFER_COMPLETE + use ARB_framebuffer_object FRAMEBUFFER_INCOMPLETE_ATTACHMENT + use ARB_framebuffer_object FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT + use ARB_framebuffer_object FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER + use ARB_framebuffer_object FRAMEBUFFER_INCOMPLETE_READ_BUFFER + use ARB_framebuffer_object FRAMEBUFFER_UNSUPPORTED + use ARB_framebuffer_object MAX_COLOR_ATTACHMENTS + use ARB_framebuffer_object COLOR_ATTACHMENT0 + use ARB_framebuffer_object COLOR_ATTACHMENT1 + use ARB_framebuffer_object COLOR_ATTACHMENT2 + use ARB_framebuffer_object COLOR_ATTACHMENT3 + use ARB_framebuffer_object COLOR_ATTACHMENT4 + use ARB_framebuffer_object COLOR_ATTACHMENT5 + use ARB_framebuffer_object COLOR_ATTACHMENT6 + use ARB_framebuffer_object COLOR_ATTACHMENT7 + use ARB_framebuffer_object COLOR_ATTACHMENT8 + use ARB_framebuffer_object COLOR_ATTACHMENT9 + use ARB_framebuffer_object COLOR_ATTACHMENT10 + use ARB_framebuffer_object COLOR_ATTACHMENT11 + use ARB_framebuffer_object COLOR_ATTACHMENT12 + use ARB_framebuffer_object COLOR_ATTACHMENT13 + use ARB_framebuffer_object COLOR_ATTACHMENT14 + use ARB_framebuffer_object COLOR_ATTACHMENT15 + use ARB_framebuffer_object DEPTH_ATTACHMENT + use ARB_framebuffer_object STENCIL_ATTACHMENT + use ARB_framebuffer_object FRAMEBUFFER + use ARB_framebuffer_object RENDERBUFFER + use ARB_framebuffer_object RENDERBUFFER_WIDTH + use ARB_framebuffer_object RENDERBUFFER_HEIGHT + use ARB_framebuffer_object RENDERBUFFER_INTERNAL_FORMAT + use ARB_framebuffer_object STENCIL_INDEX1 + use ARB_framebuffer_object STENCIL_INDEX4 + use ARB_framebuffer_object STENCIL_INDEX8 + use ARB_framebuffer_object STENCIL_INDEX16 + use ARB_framebuffer_object RENDERBUFFER_RED_SIZE + use ARB_framebuffer_object RENDERBUFFER_GREEN_SIZE + use ARB_framebuffer_object RENDERBUFFER_BLUE_SIZE + use ARB_framebuffer_object RENDERBUFFER_ALPHA_SIZE + use ARB_framebuffer_object RENDERBUFFER_DEPTH_SIZE + use ARB_framebuffer_object RENDERBUFFER_STENCIL_SIZE + use ARB_framebuffer_object FRAMEBUFFER_INCOMPLETE_MULTISAMPLE + use ARB_framebuffer_object MAX_SAMPLES +passthru: /* Reuse tokens from ARB_framebuffer_sRGB */ + use ARB_framebuffer_sRGB FRAMEBUFFER_SRGB +passthru: /* Reuse tokens from ARB_half_float_vertex */ + use ARB_half_float_vertex HALF_FLOAT +passthru: /* Reuse tokens from ARB_map_buffer_range */ + use ARB_map_buffer_range MAP_READ_BIT + use ARB_map_buffer_range MAP_WRITE_BIT + use ARB_map_buffer_range MAP_INVALIDATE_RANGE_BIT + use ARB_map_buffer_range MAP_INVALIDATE_BUFFER_BIT + use ARB_map_buffer_range MAP_FLUSH_EXPLICIT_BIT + use ARB_map_buffer_range MAP_UNSYNCHRONIZED_BIT +passthru: /* Reuse tokens from ARB_texture_compression_rgtc */ + use ARB_texture_compression_rgtc COMPRESSED_RED_RGTC1 + use ARB_texture_compression_rgtc COMPRESSED_SIGNED_RED_RGTC1 + use ARB_texture_compression_rgtc COMPRESSED_RG_RGTC2 + use ARB_texture_compression_rgtc COMPRESSED_SIGNED_RG_RGTC2 +passthru: /* Reuse tokens from ARB_texture_rg */ + use ARB_texture_rg RG + use ARB_texture_rg RG_INTEGER + use ARB_texture_rg R8 + use ARB_texture_rg R16 + use ARB_texture_rg RG8 + use ARB_texture_rg RG16 + use ARB_texture_rg R16F + use ARB_texture_rg R32F + use ARB_texture_rg RG16F + use ARB_texture_rg RG32F + use ARB_texture_rg R8I + use ARB_texture_rg R8UI + use ARB_texture_rg R16I + use ARB_texture_rg R16UI + use ARB_texture_rg R32I + use ARB_texture_rg R32UI + use ARB_texture_rg RG8I + use ARB_texture_rg RG8UI + use ARB_texture_rg RG16I + use ARB_texture_rg RG16UI + use ARB_texture_rg RG32I + use ARB_texture_rg RG32UI +passthru: /* Reuse tokens from ARB_vertex_array_object */ + use ARB_vertex_array_object VERTEX_ARRAY_BINDING + +VERSION_3_0_DEPRECATED enum: + CLAMP_VERTEX_COLOR = 0x891A + CLAMP_FRAGMENT_COLOR = 0x891B + ALPHA_INTEGER = 0x8D97 +passthru: /* Reuse tokens from ARB_framebuffer_object */ + use ARB_framebuffer_object TEXTURE_LUMINANCE_TYPE + use ARB_framebuffer_object TEXTURE_INTENSITY_TYPE + + +############################################################################### +# +# OpenGL 3.1 enums +# +############################################################################### + +VERSION_3_1 enum: + SAMPLER_2D_RECT = 0x8B63 # ARB_shader_objects + ARB_texture_rectangle + SAMPLER_2D_RECT_SHADOW = 0x8B64 # ARB_shader_objects + ARB_texture_rectangle + SAMPLER_BUFFER = 0x8DC2 # EXT_gpu_shader4 + ARB_texture_buffer_object + INT_SAMPLER_2D_RECT = 0x8DCD # EXT_gpu_shader4 + ARB_texture_rectangle + INT_SAMPLER_BUFFER = 0x8DD0 # EXT_gpu_shader4 + ARB_texture_buffer_object + UNSIGNED_INT_SAMPLER_2D_RECT = 0x8DD5 # EXT_gpu_shader4 + ARB_texture_rectangle + UNSIGNED_INT_SAMPLER_BUFFER = 0x8DD8 # EXT_gpu_shader4 + ARB_texture_buffer_object + TEXTURE_BUFFER = 0x8C2A # ARB_texture_buffer_object + MAX_TEXTURE_BUFFER_SIZE = 0x8C2B # ARB_texture_buffer_object + TEXTURE_BINDING_BUFFER = 0x8C2C # ARB_texture_buffer_object + TEXTURE_BUFFER_DATA_STORE_BINDING = 0x8C2D # ARB_texture_buffer_object + TEXTURE_BUFFER_FORMAT = 0x8C2E # ARB_texture_buffer_object + TEXTURE_RECTANGLE = 0x84F5 # ARB_texture_rectangle + TEXTURE_BINDING_RECTANGLE = 0x84F6 # ARB_texture_rectangle + PROXY_TEXTURE_RECTANGLE = 0x84F7 # ARB_texture_rectangle + MAX_RECTANGLE_TEXTURE_SIZE = 0x84F8 # ARB_texture_rectangle + RED_SNORM = 0x8F90 # 3.1 + RG_SNORM = 0x8F91 # 3.1 + RGB_SNORM = 0x8F92 # 3.1 + RGBA_SNORM = 0x8F93 # 3.1 + R8_SNORM = 0x8F94 # 3.1 + RG8_SNORM = 0x8F95 # 3.1 + RGB8_SNORM = 0x8F96 # 3.1 + RGBA8_SNORM = 0x8F97 # 3.1 + R16_SNORM = 0x8F98 # 3.1 + RG16_SNORM = 0x8F99 # 3.1 + RGB16_SNORM = 0x8F9A # 3.1 + RGBA16_SNORM = 0x8F9B # 3.1 + SIGNED_NORMALIZED = 0x8F9C # 3.1 + PRIMITIVE_RESTART = 0x8F9D # 3.1 (different from NV_primitive_restart) + PRIMITIVE_RESTART_INDEX = 0x8F9E # 3.1 (different from NV_primitive_restart) +passthru: /* Reuse tokens from ARB_copy_buffer */ + use ARB_copy_buffer COPY_READ_BUFFER + use ARB_copy_buffer COPY_WRITE_BUFFER +passthru: /* Would reuse tokens from ARB_draw_instanced, but it has none */ +passthru: /* Reuse tokens from ARB_uniform_buffer_object */ + use ARB_uniform_buffer_object UNIFORM_BUFFER + use ARB_uniform_buffer_object UNIFORM_BUFFER_BINDING + use ARB_uniform_buffer_object UNIFORM_BUFFER_START + use ARB_uniform_buffer_object UNIFORM_BUFFER_SIZE + use ARB_uniform_buffer_object MAX_VERTEX_UNIFORM_BLOCKS + use ARB_uniform_buffer_object MAX_FRAGMENT_UNIFORM_BLOCKS + use ARB_uniform_buffer_object MAX_COMBINED_UNIFORM_BLOCKS + use ARB_uniform_buffer_object MAX_UNIFORM_BUFFER_BINDINGS + use ARB_uniform_buffer_object MAX_UNIFORM_BLOCK_SIZE + use ARB_uniform_buffer_object MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS + use ARB_uniform_buffer_object MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS + use ARB_uniform_buffer_object UNIFORM_BUFFER_OFFSET_ALIGNMENT + use ARB_uniform_buffer_object ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH + use ARB_uniform_buffer_object ACTIVE_UNIFORM_BLOCKS + use ARB_uniform_buffer_object UNIFORM_TYPE + use ARB_uniform_buffer_object UNIFORM_SIZE + use ARB_uniform_buffer_object UNIFORM_NAME_LENGTH + use ARB_uniform_buffer_object UNIFORM_BLOCK_INDEX + use ARB_uniform_buffer_object UNIFORM_OFFSET + use ARB_uniform_buffer_object UNIFORM_ARRAY_STRIDE + use ARB_uniform_buffer_object UNIFORM_MATRIX_STRIDE + use ARB_uniform_buffer_object UNIFORM_IS_ROW_MAJOR + use ARB_uniform_buffer_object UNIFORM_BLOCK_BINDING + use ARB_uniform_buffer_object UNIFORM_BLOCK_DATA_SIZE + use ARB_uniform_buffer_object UNIFORM_BLOCK_NAME_LENGTH + use ARB_uniform_buffer_object UNIFORM_BLOCK_ACTIVE_UNIFORMS + use ARB_uniform_buffer_object UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES + use ARB_uniform_buffer_object UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER + use ARB_uniform_buffer_object UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER + use ARB_uniform_buffer_object INVALID_INDEX + + +############################################################################### +# +# OpenGL 3.2 enums +# +############################################################################### + +VERSION_3_2 enum: + CONTEXT_CORE_PROFILE_BIT = 0x00000001 + CONTEXT_COMPATIBILITY_PROFILE_BIT = 0x00000002 + LINES_ADJACENCY = 0x000A + LINE_STRIP_ADJACENCY = 0x000B + TRIANGLES_ADJACENCY = 0x000C + TRIANGLE_STRIP_ADJACENCY = 0x000D + PROGRAM_POINT_SIZE = 0x8642 + MAX_GEOMETRY_TEXTURE_IMAGE_UNITS = 0x8C29 + FRAMEBUFFER_ATTACHMENT_LAYERED = 0x8DA7 + FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS = 0x8DA8 + GEOMETRY_SHADER = 0x8DD9 + GEOMETRY_VERTICES_OUT = 0x8916 + GEOMETRY_INPUT_TYPE = 0x8917 + GEOMETRY_OUTPUT_TYPE = 0x8918 + MAX_GEOMETRY_UNIFORM_COMPONENTS = 0x8DDF + MAX_GEOMETRY_OUTPUT_VERTICES = 0x8DE0 + MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS = 0x8DE1 + MAX_VERTEX_OUTPUT_COMPONENTS = 0x9122 + MAX_GEOMETRY_INPUT_COMPONENTS = 0x9123 + MAX_GEOMETRY_OUTPUT_COMPONENTS = 0x9124 + MAX_FRAGMENT_INPUT_COMPONENTS = 0x9125 + CONTEXT_PROFILE_MASK = 0x9126 + use VERSION_3_0 MAX_VARYING_COMPONENTS + use ARB_framebuffer_object FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER +passthru: /* Reuse tokens from ARB_depth_clamp */ + use ARB_depth_clamp DEPTH_CLAMP +passthru: /* Would reuse tokens from ARB_draw_elements_base_vertex, but it has none */ +passthru: /* Would reuse tokens from ARB_fragment_coord_conventions, but it has none */ +passthru: /* Reuse tokens from ARB_provoking_vertex */ + use ARB_provoking_vertex QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION + use ARB_provoking_vertex FIRST_VERTEX_CONVENTION + use ARB_provoking_vertex LAST_VERTEX_CONVENTION + use ARB_provoking_vertex PROVOKING_VERTEX +passthru: /* Reuse tokens from ARB_seamless_cube_map */ + use ARB_seamless_cube_map TEXTURE_CUBE_MAP_SEAMLESS +passthru: /* Reuse tokens from ARB_sync */ + use ARB_sync MAX_SERVER_WAIT_TIMEOUT + use ARB_sync OBJECT_TYPE + use ARB_sync SYNC_CONDITION + use ARB_sync SYNC_STATUS + use ARB_sync SYNC_FLAGS + use ARB_sync SYNC_FENCE + use ARB_sync SYNC_GPU_COMMANDS_COMPLETE + use ARB_sync UNSIGNALED + use ARB_sync SIGNALED + use ARB_sync ALREADY_SIGNALED + use ARB_sync TIMEOUT_EXPIRED + use ARB_sync CONDITION_SATISFIED + use ARB_sync WAIT_FAILED + use ARB_sync TIMEOUT_IGNORED + use ARB_sync SYNC_FLUSH_COMMANDS_BIT + use ARB_sync TIMEOUT_IGNORED +passthru: /* Reuse tokens from ARB_texture_multisample */ + use ARB_texture_multisample SAMPLE_POSITION + use ARB_texture_multisample SAMPLE_MASK + use ARB_texture_multisample SAMPLE_MASK_VALUE + use ARB_texture_multisample MAX_SAMPLE_MASK_WORDS + use ARB_texture_multisample TEXTURE_2D_MULTISAMPLE + use ARB_texture_multisample PROXY_TEXTURE_2D_MULTISAMPLE + use ARB_texture_multisample TEXTURE_2D_MULTISAMPLE_ARRAY + use ARB_texture_multisample PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY + use ARB_texture_multisample TEXTURE_BINDING_2D_MULTISAMPLE + use ARB_texture_multisample TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY + use ARB_texture_multisample TEXTURE_SAMPLES + use ARB_texture_multisample TEXTURE_FIXED_SAMPLE_LOCATIONS + use ARB_texture_multisample SAMPLER_2D_MULTISAMPLE + use ARB_texture_multisample INT_SAMPLER_2D_MULTISAMPLE + use ARB_texture_multisample UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE + use ARB_texture_multisample SAMPLER_2D_MULTISAMPLE_ARRAY + use ARB_texture_multisample INT_SAMPLER_2D_MULTISAMPLE_ARRAY + use ARB_texture_multisample UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY + use ARB_texture_multisample MAX_COLOR_TEXTURE_SAMPLES + use ARB_texture_multisample MAX_DEPTH_TEXTURE_SAMPLES + use ARB_texture_multisample MAX_INTEGER_SAMPLES +passthru: /* Don't need to reuse tokens from ARB_vertex_array_bgra since they're already in 1.2 core */ + +############################################################################### +# +# OpenGL 3.3 enums +# +############################################################################### + +VERSION_3_3 enum: +passthru: /* Reuse tokens from ARB_blend_func_extended */ + use ARB_blend_func_extended SRC1_COLOR + use ARB_blend_func_extended ONE_MINUS_SRC1_COLOR + use ARB_blend_func_extended ONE_MINUS_SRC1_ALPHA + use ARB_blend_func_extended MAX_DUAL_SOURCE_DRAW_BUFFERS +passthru: /* Would reuse tokens from ARB_explicit_attrib_location, but it has none */ +passthru: /* Reuse tokens from ARB_occlusion_query2 */ + use ARB_occlusion_query2 ANY_SAMPLES_PASSED +passthru: /* Reuse tokens from ARB_sampler_objects */ + use ARB_sampler_objects SAMPLER_BINDING +passthru: /* Would reuse tokens from ARB_shader_bit_encoding, but it has none */ +passthru: /* Reuse tokens from ARB_texture_rgb10_a2ui */ + use ARB_texture_rgb10_a2ui RGB10_A2UI +passthru: /* Reuse tokens from ARB_texture_swizzle */ + use ARB_texture_swizzle TEXTURE_SWIZZLE_R + use ARB_texture_swizzle TEXTURE_SWIZZLE_G + use ARB_texture_swizzle TEXTURE_SWIZZLE_B + use ARB_texture_swizzle TEXTURE_SWIZZLE_A + use ARB_texture_swizzle TEXTURE_SWIZZLE_RGBA +passthru: /* Reuse tokens from ARB_timer_query */ + use ARB_timer_query TIME_ELAPSED + use ARB_timer_query TIMESTAMP +passthru: /* Reuse tokens from ARB_vertex_type_2_10_10_10_rev */ + use ARB_vertex_type_2_10_10_10_rev INT_2_10_10_10_REV + +############################################################################### +# +# OpenGL 4.0 enums +# +############################################################################### + +VERSION_4_0 enum: +passthru: /* Reuse tokens from ARB_draw_indirect */ + use ARB_draw_indirect DRAW_INDIRECT_BUFFER + use ARB_draw_indirect DRAW_INDIRECT_BUFFER_BINDING +passthru: /* Reuse tokens from ARB_gpu_shader5 */ + use ARB_gpu_shader5 GEOMETRY_SHADER_INVOCATIONS + use ARB_gpu_shader5 MAX_GEOMETRY_SHADER_INVOCATIONS + use ARB_gpu_shader5 MIN_FRAGMENT_INTERPOLATION_OFFSET + use ARB_gpu_shader5 MAX_FRAGMENT_INTERPOLATION_OFFSET + use ARB_gpu_shader5 FRAGMENT_INTERPOLATION_OFFSET_BITS + use ARB_gpu_shader5 MAX_VERTEX_STREAMS +passthru: /* Reuse tokens from ARB_gpu_shader_fp64 */ + use ARB_gpu_shader_fp64 DOUBLE_VEC2 + use ARB_gpu_shader_fp64 DOUBLE_VEC3 + use ARB_gpu_shader_fp64 DOUBLE_VEC4 + use ARB_gpu_shader_fp64 DOUBLE_MAT2 + use ARB_gpu_shader_fp64 DOUBLE_MAT3 + use ARB_gpu_shader_fp64 DOUBLE_MAT4 + use ARB_gpu_shader_fp64 DOUBLE_MAT2x3 + use ARB_gpu_shader_fp64 DOUBLE_MAT2x4 + use ARB_gpu_shader_fp64 DOUBLE_MAT3x2 + use ARB_gpu_shader_fp64 DOUBLE_MAT3x4 + use ARB_gpu_shader_fp64 DOUBLE_MAT4x2 + use ARB_gpu_shader_fp64 DOUBLE_MAT4x3 +passthru: /* Reuse tokens from ARB_shader_subroutine */ + use ARB_shader_subroutine ACTIVE_SUBROUTINES + use ARB_shader_subroutine ACTIVE_SUBROUTINE_UNIFORMS + use ARB_shader_subroutine ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS + use ARB_shader_subroutine ACTIVE_SUBROUTINE_MAX_LENGTH + use ARB_shader_subroutine ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH + use ARB_shader_subroutine MAX_SUBROUTINES + use ARB_shader_subroutine MAX_SUBROUTINE_UNIFORM_LOCATIONS + use ARB_shader_subroutine NUM_COMPATIBLE_SUBROUTINES + use ARB_shader_subroutine COMPATIBLE_SUBROUTINES +passthru: /* Reuse tokens from ARB_tessellation_shader */ + use ARB_tessellation_shader PATCHES + use ARB_tessellation_shader PATCH_VERTICES + use ARB_tessellation_shader PATCH_DEFAULT_INNER_LEVEL + use ARB_tessellation_shader PATCH_DEFAULT_OUTER_LEVEL + use ARB_tessellation_shader TESS_CONTROL_OUTPUT_VERTICES + use ARB_tessellation_shader TESS_GEN_MODE + use ARB_tessellation_shader TESS_GEN_SPACING + use ARB_tessellation_shader TESS_GEN_VERTEX_ORDER + use ARB_tessellation_shader TESS_GEN_POINT_MODE + use ARB_tessellation_shader ISOLINES + use ARB_tessellation_shader FRACTIONAL_ODD + use ARB_tessellation_shader FRACTIONAL_EVEN + use ARB_tessellation_shader MAX_PATCH_VERTICES + use ARB_tessellation_shader MAX_TESS_GEN_LEVEL + use ARB_tessellation_shader MAX_TESS_CONTROL_UNIFORM_COMPONENTS + use ARB_tessellation_shader MAX_TESS_EVALUATION_UNIFORM_COMPONENTS + use ARB_tessellation_shader MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS + use ARB_tessellation_shader MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS + use ARB_tessellation_shader MAX_TESS_CONTROL_OUTPUT_COMPONENTS + use ARB_tessellation_shader MAX_TESS_PATCH_COMPONENTS + use ARB_tessellation_shader MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS + use ARB_tessellation_shader MAX_TESS_EVALUATION_OUTPUT_COMPONENTS + use ARB_tessellation_shader MAX_TESS_CONTROL_UNIFORM_BLOCKS + use ARB_tessellation_shader MAX_TESS_EVALUATION_UNIFORM_BLOCKS + use ARB_tessellation_shader MAX_TESS_CONTROL_INPUT_COMPONENTS + use ARB_tessellation_shader MAX_TESS_EVALUATION_INPUT_COMPONENTS + use ARB_tessellation_shader MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS + use ARB_tessellation_shader MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS + use ARB_tessellation_shader UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER + use ARB_tessellation_shader UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER + use ARB_tessellation_shader TESS_EVALUATION_SHADER + use ARB_tessellation_shader TESS_CONTROL_SHADER +passthru: /* Would reuse tokens from ARB_texture_buffer_object_rgb32, but it has none */ +passthru: /* Reuse tokens from ARB_transform_feedback2 */ + use ARB_tessellation_shader TRANSFORM_FEEDBACK + use ARB_tessellation_shader TRANSFORM_FEEDBACK_BUFFER_PAUSED + use ARB_tessellation_shader TRANSFORM_FEEDBACK_BUFFER_ACTIVE + use ARB_tessellation_shader TRANSFORM_FEEDBACK_BINDING +passthru: /* Reuse tokens from ARB_transform_feedback3 */ + use ARB_tessellation_shader MAX_TRANSFORM_FEEDBACK_BUFFERS + use ARB_tessellation_shader MAX_VERTEX_STREAMS + + +############################################################################### +# +# ARB extensions, in ARB extension order +# +############################################################################### + +############################################################################### + +# ARB Extension #1 +ARB_multitexture enum: + TEXTURE0_ARB = 0x84C0 + TEXTURE1_ARB = 0x84C1 + TEXTURE2_ARB = 0x84C2 + TEXTURE3_ARB = 0x84C3 + TEXTURE4_ARB = 0x84C4 + TEXTURE5_ARB = 0x84C5 + TEXTURE6_ARB = 0x84C6 + TEXTURE7_ARB = 0x84C7 + TEXTURE8_ARB = 0x84C8 + TEXTURE9_ARB = 0x84C9 + TEXTURE10_ARB = 0x84CA + TEXTURE11_ARB = 0x84CB + TEXTURE12_ARB = 0x84CC + TEXTURE13_ARB = 0x84CD + TEXTURE14_ARB = 0x84CE + TEXTURE15_ARB = 0x84CF + TEXTURE16_ARB = 0x84D0 + TEXTURE17_ARB = 0x84D1 + TEXTURE18_ARB = 0x84D2 + TEXTURE19_ARB = 0x84D3 + TEXTURE20_ARB = 0x84D4 + TEXTURE21_ARB = 0x84D5 + TEXTURE22_ARB = 0x84D6 + TEXTURE23_ARB = 0x84D7 + TEXTURE24_ARB = 0x84D8 + TEXTURE25_ARB = 0x84D9 + TEXTURE26_ARB = 0x84DA + TEXTURE27_ARB = 0x84DB + TEXTURE28_ARB = 0x84DC + TEXTURE29_ARB = 0x84DD + TEXTURE30_ARB = 0x84DE + TEXTURE31_ARB = 0x84DF + ACTIVE_TEXTURE_ARB = 0x84E0 # 1 I + CLIENT_ACTIVE_TEXTURE_ARB = 0x84E1 # 1 I + MAX_TEXTURE_UNITS_ARB = 0x84E2 # 1 I + +############################################################################### + +# No new tokens +# ARB Extension #2 - GLX_ARB_get_proc_address + +############################################################################### + +# ARB Extension #3 +ARB_transpose_matrix enum: + TRANSPOSE_MODELVIEW_MATRIX_ARB = 0x84E3 # 16 F + TRANSPOSE_PROJECTION_MATRIX_ARB = 0x84E4 # 16 F + TRANSPOSE_TEXTURE_MATRIX_ARB = 0x84E5 # 16 F + TRANSPOSE_COLOR_MATRIX_ARB = 0x84E6 # 16 F + +############################################################################### + +# No new tokens +# ARB Extension #4 - WGL_ARB_buffer_region + +############################################################################### + +# ARB Extension #5 +ARB_multisample enum: + MULTISAMPLE_ARB = 0x809D + SAMPLE_ALPHA_TO_COVERAGE_ARB = 0x809E + SAMPLE_ALPHA_TO_ONE_ARB = 0x809F + SAMPLE_COVERAGE_ARB = 0x80A0 + SAMPLE_BUFFERS_ARB = 0x80A8 + SAMPLES_ARB = 0x80A9 + SAMPLE_COVERAGE_VALUE_ARB = 0x80AA + SAMPLE_COVERAGE_INVERT_ARB = 0x80AB + MULTISAMPLE_BIT_ARB = 0x20000000 + +############################################################################### + +# No new tokens +# ARB Extension #6 +ARB_texture_env_add enum: + +############################################################################### + +# ARB Extension #7 +ARB_texture_cube_map enum: + NORMAL_MAP_ARB = 0x8511 + REFLECTION_MAP_ARB = 0x8512 + TEXTURE_CUBE_MAP_ARB = 0x8513 + TEXTURE_BINDING_CUBE_MAP_ARB = 0x8514 + TEXTURE_CUBE_MAP_POSITIVE_X_ARB = 0x8515 + TEXTURE_CUBE_MAP_NEGATIVE_X_ARB = 0x8516 + TEXTURE_CUBE_MAP_POSITIVE_Y_ARB = 0x8517 + TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB = 0x8518 + TEXTURE_CUBE_MAP_POSITIVE_Z_ARB = 0x8519 + TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB = 0x851A + PROXY_TEXTURE_CUBE_MAP_ARB = 0x851B + MAX_CUBE_MAP_TEXTURE_SIZE_ARB = 0x851C + +############################################################################### + +# No new tokens +# ARB Extension #8 - WGL_ARB_extensions_string +# ARB Extension #9 - WGL_ARB_pixel_format +# ARB Extension #10 - WGL_ARB_make_current_read +# ARB Extension #11 - WGL_ARB_pbuffer + +############################################################################### + +# ARB Extension #12 +ARB_texture_compression enum: + COMPRESSED_ALPHA_ARB = 0x84E9 + COMPRESSED_LUMINANCE_ARB = 0x84EA + COMPRESSED_LUMINANCE_ALPHA_ARB = 0x84EB + COMPRESSED_INTENSITY_ARB = 0x84EC + COMPRESSED_RGB_ARB = 0x84ED + COMPRESSED_RGBA_ARB = 0x84EE + TEXTURE_COMPRESSION_HINT_ARB = 0x84EF + TEXTURE_COMPRESSED_IMAGE_SIZE_ARB = 0x86A0 + TEXTURE_COMPRESSED_ARB = 0x86A1 + NUM_COMPRESSED_TEXTURE_FORMATS_ARB = 0x86A2 + COMPRESSED_TEXTURE_FORMATS_ARB = 0x86A3 + +############################################################################### + +# ARB Extension #13 +# Promoted from #36 SGIS_texture_border_clamp +ARB_texture_border_clamp enum: + CLAMP_TO_BORDER_ARB = 0x812D + +############################################################################### + +# ARB Extension #14 - promoted from #54 EXT_point_parameters +# Promoted from #54 {SGIS,EXT}_point_parameters +ARB_point_parameters enum: + POINT_SIZE_MIN_ARB = 0x8126 # 1 F + POINT_SIZE_MAX_ARB = 0x8127 # 1 F + POINT_FADE_THRESHOLD_SIZE_ARB = 0x8128 # 1 F + POINT_DISTANCE_ATTENUATION_ARB = 0x8129 # 3 F + +############################################################################### + +# ARB Extension #15 +ARB_vertex_blend enum: + MAX_VERTEX_UNITS_ARB = 0x86A4 + ACTIVE_VERTEX_UNITS_ARB = 0x86A5 + WEIGHT_SUM_UNITY_ARB = 0x86A6 + VERTEX_BLEND_ARB = 0x86A7 + CURRENT_WEIGHT_ARB = 0x86A8 + WEIGHT_ARRAY_TYPE_ARB = 0x86A9 + WEIGHT_ARRAY_STRIDE_ARB = 0x86AA + WEIGHT_ARRAY_SIZE_ARB = 0x86AB + WEIGHT_ARRAY_POINTER_ARB = 0x86AC + WEIGHT_ARRAY_ARB = 0x86AD + MODELVIEW0_ARB = 0x1700 + MODELVIEW1_ARB = 0x850A + MODELVIEW2_ARB = 0x8722 + MODELVIEW3_ARB = 0x8723 + MODELVIEW4_ARB = 0x8724 + MODELVIEW5_ARB = 0x8725 + MODELVIEW6_ARB = 0x8726 + MODELVIEW7_ARB = 0x8727 + MODELVIEW8_ARB = 0x8728 + MODELVIEW9_ARB = 0x8729 + MODELVIEW10_ARB = 0x872A + MODELVIEW11_ARB = 0x872B + MODELVIEW12_ARB = 0x872C + MODELVIEW13_ARB = 0x872D + MODELVIEW14_ARB = 0x872E + MODELVIEW15_ARB = 0x872F + MODELVIEW16_ARB = 0x8730 + MODELVIEW17_ARB = 0x8731 + MODELVIEW18_ARB = 0x8732 + MODELVIEW19_ARB = 0x8733 + MODELVIEW20_ARB = 0x8734 + MODELVIEW21_ARB = 0x8735 + MODELVIEW22_ARB = 0x8736 + MODELVIEW23_ARB = 0x8737 + MODELVIEW24_ARB = 0x8738 + MODELVIEW25_ARB = 0x8739 + MODELVIEW26_ARB = 0x873A + MODELVIEW27_ARB = 0x873B + MODELVIEW28_ARB = 0x873C + MODELVIEW29_ARB = 0x873D + MODELVIEW30_ARB = 0x873E + MODELVIEW31_ARB = 0x873F + +############################################################################### + +# ARB Extension #16 +ARB_matrix_palette enum: + MATRIX_PALETTE_ARB = 0x8840 + MAX_MATRIX_PALETTE_STACK_DEPTH_ARB = 0x8841 + MAX_PALETTE_MATRICES_ARB = 0x8842 + CURRENT_PALETTE_MATRIX_ARB = 0x8843 + MATRIX_INDEX_ARRAY_ARB = 0x8844 + CURRENT_MATRIX_INDEX_ARB = 0x8845 + MATRIX_INDEX_ARRAY_SIZE_ARB = 0x8846 + MATRIX_INDEX_ARRAY_TYPE_ARB = 0x8847 + MATRIX_INDEX_ARRAY_STRIDE_ARB = 0x8848 + MATRIX_INDEX_ARRAY_POINTER_ARB = 0x8849 + +############################################################################### + +# ARB Extension #17 +# Shares enum values with EXT_texture_env_combine +ARB_texture_env_combine enum: + COMBINE_ARB = 0x8570 + COMBINE_RGB_ARB = 0x8571 + COMBINE_ALPHA_ARB = 0x8572 + SOURCE0_RGB_ARB = 0x8580 + SOURCE1_RGB_ARB = 0x8581 + SOURCE2_RGB_ARB = 0x8582 + SOURCE0_ALPHA_ARB = 0x8588 + SOURCE1_ALPHA_ARB = 0x8589 + SOURCE2_ALPHA_ARB = 0x858A + OPERAND0_RGB_ARB = 0x8590 + OPERAND1_RGB_ARB = 0x8591 + OPERAND2_RGB_ARB = 0x8592 + OPERAND0_ALPHA_ARB = 0x8598 + OPERAND1_ALPHA_ARB = 0x8599 + OPERAND2_ALPHA_ARB = 0x859A + RGB_SCALE_ARB = 0x8573 + ADD_SIGNED_ARB = 0x8574 + INTERPOLATE_ARB = 0x8575 + SUBTRACT_ARB = 0x84E7 + CONSTANT_ARB = 0x8576 + PRIMARY_COLOR_ARB = 0x8577 + PREVIOUS_ARB = 0x8578 + +############################################################################### + +# No new tokens +# ARB Extension #18 +ARB_texture_env_crossbar enum: + +############################################################################### + +# ARB Extension #19 +# Promoted from #220 EXT_texture_env_dot3; enum values changed +ARB_texture_env_dot3 enum: + DOT3_RGB_ARB = 0x86AE + DOT3_RGBA_ARB = 0x86AF + +############################################################################### + +# No new tokens +# ARB Extension #20 - WGL_ARB_render_texture + +############################################################################### + +# ARB Extension #21 +ARB_texture_mirrored_repeat enum: + MIRRORED_REPEAT_ARB = 0x8370 + +############################################################################### + +# ARB Extension #22 +ARB_depth_texture enum: + DEPTH_COMPONENT16_ARB = 0x81A5 + DEPTH_COMPONENT24_ARB = 0x81A6 + DEPTH_COMPONENT32_ARB = 0x81A7 + TEXTURE_DEPTH_SIZE_ARB = 0x884A + DEPTH_TEXTURE_MODE_ARB = 0x884B + +############################################################################### + +# ARB Extension #23 +ARB_shadow enum: + TEXTURE_COMPARE_MODE_ARB = 0x884C + TEXTURE_COMPARE_FUNC_ARB = 0x884D + COMPARE_R_TO_TEXTURE_ARB = 0x884E + +############################################################################### + +# ARB Extension #24 +ARB_shadow_ambient enum: + TEXTURE_COMPARE_FAIL_VALUE_ARB = 0x80BF + +############################################################################### + +# No new tokens +# ARB Extension #25 +ARB_window_pos enum: + +############################################################################### + +# ARB Extension #26 +# ARB_vertex_program enums are shared by ARB_fragment_program are so marked. +# Unfortunately, PROGRAM_BINDING_ARB does accidentally reuse 0x8677 - +# this was a spec editing typo that's now uncorrectable. +ARB_vertex_program enum: + COLOR_SUM_ARB = 0x8458 + VERTEX_PROGRAM_ARB = 0x8620 + VERTEX_ATTRIB_ARRAY_ENABLED_ARB = 0x8622 + VERTEX_ATTRIB_ARRAY_SIZE_ARB = 0x8623 + VERTEX_ATTRIB_ARRAY_STRIDE_ARB = 0x8624 + VERTEX_ATTRIB_ARRAY_TYPE_ARB = 0x8625 + CURRENT_VERTEX_ATTRIB_ARB = 0x8626 + PROGRAM_LENGTH_ARB = 0x8627 # shared + PROGRAM_STRING_ARB = 0x8628 # shared + MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB = 0x862E # shared + MAX_PROGRAM_MATRICES_ARB = 0x862F # shared + CURRENT_MATRIX_STACK_DEPTH_ARB = 0x8640 # shared + CURRENT_MATRIX_ARB = 0x8641 # shared + VERTEX_PROGRAM_POINT_SIZE_ARB = 0x8642 + VERTEX_PROGRAM_TWO_SIDE_ARB = 0x8643 + VERTEX_ATTRIB_ARRAY_POINTER_ARB = 0x8645 + PROGRAM_ERROR_POSITION_ARB = 0x864B # shared + PROGRAM_BINDING_ARB = 0x8677 # shared + MAX_VERTEX_ATTRIBS_ARB = 0x8869 + VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB = 0x886A + PROGRAM_ERROR_STRING_ARB = 0x8874 # shared + PROGRAM_FORMAT_ASCII_ARB = 0x8875 # shared + PROGRAM_FORMAT_ARB = 0x8876 # shared + PROGRAM_INSTRUCTIONS_ARB = 0x88A0 # shared + MAX_PROGRAM_INSTRUCTIONS_ARB = 0x88A1 # shared + PROGRAM_NATIVE_INSTRUCTIONS_ARB = 0x88A2 # shared + MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB = 0x88A3 # shared + PROGRAM_TEMPORARIES_ARB = 0x88A4 # shared + MAX_PROGRAM_TEMPORARIES_ARB = 0x88A5 # shared + PROGRAM_NATIVE_TEMPORARIES_ARB = 0x88A6 # shared + MAX_PROGRAM_NATIVE_TEMPORARIES_ARB = 0x88A7 # shared + PROGRAM_PARAMETERS_ARB = 0x88A8 # shared + MAX_PROGRAM_PARAMETERS_ARB = 0x88A9 # shared + PROGRAM_NATIVE_PARAMETERS_ARB = 0x88AA # shared + MAX_PROGRAM_NATIVE_PARAMETERS_ARB = 0x88AB # shared + PROGRAM_ATTRIBS_ARB = 0x88AC # shared + MAX_PROGRAM_ATTRIBS_ARB = 0x88AD # shared + PROGRAM_NATIVE_ATTRIBS_ARB = 0x88AE # shared + MAX_PROGRAM_NATIVE_ATTRIBS_ARB = 0x88AF # shared + PROGRAM_ADDRESS_REGISTERS_ARB = 0x88B0 # shared + MAX_PROGRAM_ADDRESS_REGISTERS_ARB = 0x88B1 # shared + PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB = 0x88B2 # shared + MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB = 0x88B3 # shared + MAX_PROGRAM_LOCAL_PARAMETERS_ARB = 0x88B4 # shared + MAX_PROGRAM_ENV_PARAMETERS_ARB = 0x88B5 # shared + PROGRAM_UNDER_NATIVE_LIMITS_ARB = 0x88B6 # shared + TRANSPOSE_CURRENT_MATRIX_ARB = 0x88B7 # shared + MATRIX0_ARB = 0x88C0 # shared + MATRIX1_ARB = 0x88C1 # shared + MATRIX2_ARB = 0x88C2 # shared + MATRIX3_ARB = 0x88C3 # shared + MATRIX4_ARB = 0x88C4 # shared + MATRIX5_ARB = 0x88C5 # shared + MATRIX6_ARB = 0x88C6 # shared + MATRIX7_ARB = 0x88C7 # shared + MATRIX8_ARB = 0x88C8 # shared + MATRIX9_ARB = 0x88C9 # shared + MATRIX10_ARB = 0x88CA # shared + MATRIX11_ARB = 0x88CB # shared + MATRIX12_ARB = 0x88CC # shared + MATRIX13_ARB = 0x88CD # shared + MATRIX14_ARB = 0x88CE # shared + MATRIX15_ARB = 0x88CF # shared + MATRIX16_ARB = 0x88D0 # shared + MATRIX17_ARB = 0x88D1 # shared + MATRIX18_ARB = 0x88D2 # shared + MATRIX19_ARB = 0x88D3 # shared + MATRIX20_ARB = 0x88D4 # shared + MATRIX21_ARB = 0x88D5 # shared + MATRIX22_ARB = 0x88D6 # shared + MATRIX23_ARB = 0x88D7 # shared + MATRIX24_ARB = 0x88D8 # shared + MATRIX25_ARB = 0x88D9 # shared + MATRIX26_ARB = 0x88DA # shared + MATRIX27_ARB = 0x88DB # shared + MATRIX28_ARB = 0x88DC # shared + MATRIX29_ARB = 0x88DD # shared + MATRIX30_ARB = 0x88DE # shared + MATRIX31_ARB = 0x88DF # shared + +############################################################################### + +# ARB Extension #27 +# Some ARB_fragment_program enums are shared with ARB_vertex_program, +# and are only included in that #define block, for now. +ARB_fragment_program enum: +# PROGRAM_LENGTH_ARB = 0x8627 # shared +# PROGRAM_STRING_ARB = 0x8628 # shared +# MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB = 0x862E # shared +# MAX_PROGRAM_MATRICES_ARB = 0x862F # shared +# CURRENT_MATRIX_STACK_DEPTH_ARB = 0x8640 # shared +# CURRENT_MATRIX_ARB = 0x8641 # shared +# PROGRAM_ERROR_POSITION_ARB = 0x864B # shared +# PROGRAM_BINDING_ARB = 0x8677 # shared + FRAGMENT_PROGRAM_ARB = 0x8804 + PROGRAM_ALU_INSTRUCTIONS_ARB = 0x8805 + PROGRAM_TEX_INSTRUCTIONS_ARB = 0x8806 + PROGRAM_TEX_INDIRECTIONS_ARB = 0x8807 + PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB = 0x8808 + PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB = 0x8809 + PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB = 0x880A + MAX_PROGRAM_ALU_INSTRUCTIONS_ARB = 0x880B + MAX_PROGRAM_TEX_INSTRUCTIONS_ARB = 0x880C + MAX_PROGRAM_TEX_INDIRECTIONS_ARB = 0x880D + MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB = 0x880E + MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB = 0x880F + MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB = 0x8810 + MAX_TEXTURE_COORDS_ARB = 0x8871 + MAX_TEXTURE_IMAGE_UNITS_ARB = 0x8872 +# PROGRAM_ERROR_STRING_ARB = 0x8874 # shared +# PROGRAM_FORMAT_ASCII_ARB = 0x8875 # shared +# PROGRAM_FORMAT_ARB = 0x8876 # shared +# PROGRAM_INSTRUCTIONS_ARB = 0x88A0 # shared +# MAX_PROGRAM_INSTRUCTIONS_ARB = 0x88A1 # shared +# PROGRAM_NATIVE_INSTRUCTIONS_ARB = 0x88A2 # shared +# MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB = 0x88A3 # shared +# PROGRAM_TEMPORARIES_ARB = 0x88A4 # shared +# MAX_PROGRAM_TEMPORARIES_ARB = 0x88A5 # shared +# PROGRAM_NATIVE_TEMPORARIES_ARB = 0x88A6 # shared +# MAX_PROGRAM_NATIVE_TEMPORARIES_ARB = 0x88A7 # shared +# PROGRAM_PARAMETERS_ARB = 0x88A8 # shared +# MAX_PROGRAM_PARAMETERS_ARB = 0x88A9 # shared +# PROGRAM_NATIVE_PARAMETERS_ARB = 0x88AA # shared +# MAX_PROGRAM_NATIVE_PARAMETERS_ARB = 0x88AB # shared +# PROGRAM_ATTRIBS_ARB = 0x88AC # shared +# MAX_PROGRAM_ATTRIBS_ARB = 0x88AD # shared +# PROGRAM_NATIVE_ATTRIBS_ARB = 0x88AE # shared +# MAX_PROGRAM_NATIVE_ATTRIBS_ARB = 0x88AF # shared +# PROGRAM_ADDRESS_REGISTERS_ARB = 0x88B0 # shared +# MAX_PROGRAM_ADDRESS_REGISTERS_ARB = 0x88B1 # shared +# PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB = 0x88B2 # shared +# MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB = 0x88B3 # shared +# MAX_PROGRAM_LOCAL_PARAMETERS_ARB = 0x88B4 # shared +# MAX_PROGRAM_ENV_PARAMETERS_ARB = 0x88B5 # shared +# PROGRAM_UNDER_NATIVE_LIMITS_ARB = 0x88B6 # shared +# TRANSPOSE_CURRENT_MATRIX_ARB = 0x88B7 # shared +# MATRIX0_ARB = 0x88C0 # shared +# MATRIX1_ARB = 0x88C1 # shared +# MATRIX2_ARB = 0x88C2 # shared +# MATRIX3_ARB = 0x88C3 # shared +# MATRIX4_ARB = 0x88C4 # shared +# MATRIX5_ARB = 0x88C5 # shared +# MATRIX6_ARB = 0x88C6 # shared +# MATRIX7_ARB = 0x88C7 # shared +# MATRIX8_ARB = 0x88C8 # shared +# MATRIX9_ARB = 0x88C9 # shared +# MATRIX10_ARB = 0x88CA # shared +# MATRIX11_ARB = 0x88CB # shared +# MATRIX12_ARB = 0x88CC # shared +# MATRIX13_ARB = 0x88CD # shared +# MATRIX14_ARB = 0x88CE # shared +# MATRIX15_ARB = 0x88CF # shared +# MATRIX16_ARB = 0x88D0 # shared +# MATRIX17_ARB = 0x88D1 # shared +# MATRIX18_ARB = 0x88D2 # shared +# MATRIX19_ARB = 0x88D3 # shared +# MATRIX20_ARB = 0x88D4 # shared +# MATRIX21_ARB = 0x88D5 # shared +# MATRIX22_ARB = 0x88D6 # shared +# MATRIX23_ARB = 0x88D7 # shared +# MATRIX24_ARB = 0x88D8 # shared +# MATRIX25_ARB = 0x88D9 # shared +# MATRIX26_ARB = 0x88DA # shared +# MATRIX27_ARB = 0x88DB # shared +# MATRIX28_ARB = 0x88DC # shared +# MATRIX29_ARB = 0x88DD # shared +# MATRIX30_ARB = 0x88DE # shared +# MATRIX31_ARB = 0x88DF # shared + + +############################################################################### + +# ARB Extension #28 +ARB_vertex_buffer_object enum: + BUFFER_SIZE_ARB = 0x8764 + BUFFER_USAGE_ARB = 0x8765 + ARRAY_BUFFER_ARB = 0x8892 + ELEMENT_ARRAY_BUFFER_ARB = 0x8893 + ARRAY_BUFFER_BINDING_ARB = 0x8894 + ELEMENT_ARRAY_BUFFER_BINDING_ARB = 0x8895 + VERTEX_ARRAY_BUFFER_BINDING_ARB = 0x8896 + NORMAL_ARRAY_BUFFER_BINDING_ARB = 0x8897 + COLOR_ARRAY_BUFFER_BINDING_ARB = 0x8898 + INDEX_ARRAY_BUFFER_BINDING_ARB = 0x8899 + TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB = 0x889A + EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB = 0x889B + SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB = 0x889C + FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB = 0x889D + WEIGHT_ARRAY_BUFFER_BINDING_ARB = 0x889E + VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB = 0x889F + READ_ONLY_ARB = 0x88B8 + WRITE_ONLY_ARB = 0x88B9 + READ_WRITE_ARB = 0x88BA + BUFFER_ACCESS_ARB = 0x88BB + BUFFER_MAPPED_ARB = 0x88BC + BUFFER_MAP_POINTER_ARB = 0x88BD + STREAM_DRAW_ARB = 0x88E0 + STREAM_READ_ARB = 0x88E1 + STREAM_COPY_ARB = 0x88E2 + STATIC_DRAW_ARB = 0x88E4 + STATIC_READ_ARB = 0x88E5 + STATIC_COPY_ARB = 0x88E6 + DYNAMIC_DRAW_ARB = 0x88E8 + DYNAMIC_READ_ARB = 0x88E9 + DYNAMIC_COPY_ARB = 0x88EA + +############################################################################### + +# ARB Extension #29 +ARB_occlusion_query enum: + QUERY_COUNTER_BITS_ARB = 0x8864 + CURRENT_QUERY_ARB = 0x8865 + QUERY_RESULT_ARB = 0x8866 + QUERY_RESULT_AVAILABLE_ARB = 0x8867 + SAMPLES_PASSED_ARB = 0x8914 + +############################################################################### + +# ARB Extension #30 +ARB_shader_objects enum: + PROGRAM_OBJECT_ARB = 0x8B40 + SHADER_OBJECT_ARB = 0x8B48 + OBJECT_TYPE_ARB = 0x8B4E + OBJECT_SUBTYPE_ARB = 0x8B4F + FLOAT_VEC2_ARB = 0x8B50 + FLOAT_VEC3_ARB = 0x8B51 + FLOAT_VEC4_ARB = 0x8B52 + INT_VEC2_ARB = 0x8B53 + INT_VEC3_ARB = 0x8B54 + INT_VEC4_ARB = 0x8B55 + BOOL_ARB = 0x8B56 + BOOL_VEC2_ARB = 0x8B57 + BOOL_VEC3_ARB = 0x8B58 + BOOL_VEC4_ARB = 0x8B59 + FLOAT_MAT2_ARB = 0x8B5A + FLOAT_MAT3_ARB = 0x8B5B + FLOAT_MAT4_ARB = 0x8B5C + SAMPLER_1D_ARB = 0x8B5D + SAMPLER_2D_ARB = 0x8B5E + SAMPLER_3D_ARB = 0x8B5F + SAMPLER_CUBE_ARB = 0x8B60 + SAMPLER_1D_SHADOW_ARB = 0x8B61 + SAMPLER_2D_SHADOW_ARB = 0x8B62 + SAMPLER_2D_RECT_ARB = 0x8B63 + SAMPLER_2D_RECT_SHADOW_ARB = 0x8B64 + OBJECT_DELETE_STATUS_ARB = 0x8B80 + OBJECT_COMPILE_STATUS_ARB = 0x8B81 + OBJECT_LINK_STATUS_ARB = 0x8B82 + OBJECT_VALIDATE_STATUS_ARB = 0x8B83 + OBJECT_INFO_LOG_LENGTH_ARB = 0x8B84 + OBJECT_ATTACHED_OBJECTS_ARB = 0x8B85 + OBJECT_ACTIVE_UNIFORMS_ARB = 0x8B86 + OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB = 0x8B87 + OBJECT_SHADER_SOURCE_LENGTH_ARB = 0x8B88 + +############################################################################### + +# ARB Extension #31 +# Additional enums are reused from ARB_vertex/fragment_program and ARB_shader_objects +ARB_vertex_shader enum: + VERTEX_SHADER_ARB = 0x8B31 + MAX_VERTEX_UNIFORM_COMPONENTS_ARB = 0x8B4A + MAX_VARYING_FLOATS_ARB = 0x8B4B + MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB = 0x8B4C + MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB = 0x8B4D + OBJECT_ACTIVE_ATTRIBUTES_ARB = 0x8B89 + OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB = 0x8B8A + +############################################################################### + +# ARB Extension #32 +# Additional enums are reused from ARB_fragment_program and ARB_shader_objects +ARB_fragment_shader enum: + FRAGMENT_SHADER_ARB = 0x8B30 + MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB = 0x8B49 + FRAGMENT_SHADER_DERIVATIVE_HINT_ARB = 0x8B8B + +############################################################################### + +# ARB Extension #33 +ARB_shading_language_100 enum: + SHADING_LANGUAGE_VERSION_ARB = 0x8B8C + +############################################################################### + +# ARB Extension #34 +# No new tokens +ARB_texture_non_power_of_two enum: + +############################################################################### + +# ARB Extension #35 +ARB_point_sprite enum: + POINT_SPRITE_ARB = 0x8861 + COORD_REPLACE_ARB = 0x8862 + +############################################################################### + +# ARB Extension #36 +# No new tokens +ARB_fragment_program_shadow enum: + +############################################################################### + +# ARB Extension #37 +ARB_draw_buffers enum: + MAX_DRAW_BUFFERS_ARB = 0x8824 + DRAW_BUFFER0_ARB = 0x8825 + DRAW_BUFFER1_ARB = 0x8826 + DRAW_BUFFER2_ARB = 0x8827 + DRAW_BUFFER3_ARB = 0x8828 + DRAW_BUFFER4_ARB = 0x8829 + DRAW_BUFFER5_ARB = 0x882A + DRAW_BUFFER6_ARB = 0x882B + DRAW_BUFFER7_ARB = 0x882C + DRAW_BUFFER8_ARB = 0x882D + DRAW_BUFFER9_ARB = 0x882E + DRAW_BUFFER10_ARB = 0x882F + DRAW_BUFFER11_ARB = 0x8830 + DRAW_BUFFER12_ARB = 0x8831 + DRAW_BUFFER13_ARB = 0x8832 + DRAW_BUFFER14_ARB = 0x8833 + DRAW_BUFFER15_ARB = 0x8834 + +############################################################################### + +# ARB Extension #38 +ARB_texture_rectangle enum: + TEXTURE_RECTANGLE_ARB = 0x84F5 + TEXTURE_BINDING_RECTANGLE_ARB = 0x84F6 + PROXY_TEXTURE_RECTANGLE_ARB = 0x84F7 + MAX_RECTANGLE_TEXTURE_SIZE_ARB = 0x84F8 + +############################################################################### + +# ARB Extension #39 +ARB_color_buffer_float enum: + RGBA_FLOAT_MODE_ARB = 0x8820 + CLAMP_VERTEX_COLOR_ARB = 0x891A + CLAMP_FRAGMENT_COLOR_ARB = 0x891B + CLAMP_READ_COLOR_ARB = 0x891C + FIXED_ONLY_ARB = 0x891D + +############################################################################### + +# ARB Extension #40 +ARB_half_float_pixel enum: + HALF_FLOAT_ARB = 0x140B + +############################################################################### + +# ARB Extension #41 +ARB_texture_float enum: + TEXTURE_RED_TYPE_ARB = 0x8C10 + TEXTURE_GREEN_TYPE_ARB = 0x8C11 + TEXTURE_BLUE_TYPE_ARB = 0x8C12 + TEXTURE_ALPHA_TYPE_ARB = 0x8C13 + TEXTURE_LUMINANCE_TYPE_ARB = 0x8C14 + TEXTURE_INTENSITY_TYPE_ARB = 0x8C15 + TEXTURE_DEPTH_TYPE_ARB = 0x8C16 + UNSIGNED_NORMALIZED_ARB = 0x8C17 + RGBA32F_ARB = 0x8814 + RGB32F_ARB = 0x8815 + ALPHA32F_ARB = 0x8816 + INTENSITY32F_ARB = 0x8817 + LUMINANCE32F_ARB = 0x8818 + LUMINANCE_ALPHA32F_ARB = 0x8819 + RGBA16F_ARB = 0x881A + RGB16F_ARB = 0x881B + ALPHA16F_ARB = 0x881C + INTENSITY16F_ARB = 0x881D + LUMINANCE16F_ARB = 0x881E + LUMINANCE_ALPHA16F_ARB = 0x881F + +############################################################################### + +# ARB Extension #42 +ARB_pixel_buffer_object enum: + PIXEL_PACK_BUFFER_ARB = 0x88EB + PIXEL_UNPACK_BUFFER_ARB = 0x88EC + PIXEL_PACK_BUFFER_BINDING_ARB = 0x88ED + PIXEL_UNPACK_BUFFER_BINDING_ARB = 0x88EF + +############################################################################### + +# ARB Extension #43 +ARB_depth_buffer_float enum: + DEPTH_COMPONENT32F = 0x8CAC + DEPTH32F_STENCIL8 = 0x8CAD + FLOAT_32_UNSIGNED_INT_24_8_REV = 0x8DAD + +############################################################################### + +# ARB Extension #44 +# No new tokens +ARB_draw_instanced enum: + +############################################################################### + +# ARB Extension #45 +ARB_framebuffer_object enum: + INVALID_FRAMEBUFFER_OPERATION = 0x0506 + FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING = 0x8210 + FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE = 0x8211 + FRAMEBUFFER_ATTACHMENT_RED_SIZE = 0x8212 + FRAMEBUFFER_ATTACHMENT_GREEN_SIZE = 0x8213 + FRAMEBUFFER_ATTACHMENT_BLUE_SIZE = 0x8214 + FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE = 0x8215 + FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE = 0x8216 + FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE = 0x8217 + FRAMEBUFFER_DEFAULT = 0x8218 + FRAMEBUFFER_UNDEFINED = 0x8219 + DEPTH_STENCIL_ATTACHMENT = 0x821A + MAX_RENDERBUFFER_SIZE = 0x84E8 + DEPTH_STENCIL = 0x84F9 + UNSIGNED_INT_24_8 = 0x84FA + DEPTH24_STENCIL8 = 0x88F0 + TEXTURE_STENCIL_SIZE = 0x88F1 + TEXTURE_RED_TYPE = 0x8C10 + TEXTURE_GREEN_TYPE = 0x8C11 + TEXTURE_BLUE_TYPE = 0x8C12 + TEXTURE_ALPHA_TYPE = 0x8C13 + TEXTURE_DEPTH_TYPE = 0x8C16 + UNSIGNED_NORMALIZED = 0x8C17 + FRAMEBUFFER_BINDING = 0x8CA6 + DRAW_FRAMEBUFFER_BINDING = GL_FRAMEBUFFER_BINDING + RENDERBUFFER_BINDING = 0x8CA7 + READ_FRAMEBUFFER = 0x8CA8 + DRAW_FRAMEBUFFER = 0x8CA9 + READ_FRAMEBUFFER_BINDING = 0x8CAA + RENDERBUFFER_SAMPLES = 0x8CAB + FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 0x8CD0 + FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 0x8CD1 + FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 0x8CD2 + FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 0x8CD3 + FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER = 0x8CD4 + FRAMEBUFFER_COMPLETE = 0x8CD5 + FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 0x8CD6 + FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 0x8CD7 + FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER = 0x8CDB + FRAMEBUFFER_INCOMPLETE_READ_BUFFER = 0x8CDC + FRAMEBUFFER_UNSUPPORTED = 0x8CDD + MAX_COLOR_ATTACHMENTS = 0x8CDF + COLOR_ATTACHMENT0 = 0x8CE0 + COLOR_ATTACHMENT1 = 0x8CE1 + COLOR_ATTACHMENT2 = 0x8CE2 + COLOR_ATTACHMENT3 = 0x8CE3 + COLOR_ATTACHMENT4 = 0x8CE4 + COLOR_ATTACHMENT5 = 0x8CE5 + COLOR_ATTACHMENT6 = 0x8CE6 + COLOR_ATTACHMENT7 = 0x8CE7 + COLOR_ATTACHMENT8 = 0x8CE8 + COLOR_ATTACHMENT9 = 0x8CE9 + COLOR_ATTACHMENT10 = 0x8CEA + COLOR_ATTACHMENT11 = 0x8CEB + COLOR_ATTACHMENT12 = 0x8CEC + COLOR_ATTACHMENT13 = 0x8CED + COLOR_ATTACHMENT14 = 0x8CEE + COLOR_ATTACHMENT15 = 0x8CEF + DEPTH_ATTACHMENT = 0x8D00 + STENCIL_ATTACHMENT = 0x8D20 + FRAMEBUFFER = 0x8D40 + RENDERBUFFER = 0x8D41 + RENDERBUFFER_WIDTH = 0x8D42 + RENDERBUFFER_HEIGHT = 0x8D43 + RENDERBUFFER_INTERNAL_FORMAT = 0x8D44 + STENCIL_INDEX1 = 0x8D46 + STENCIL_INDEX4 = 0x8D47 + STENCIL_INDEX8 = 0x8D48 + STENCIL_INDEX16 = 0x8D49 + RENDERBUFFER_RED_SIZE = 0x8D50 + RENDERBUFFER_GREEN_SIZE = 0x8D51 + RENDERBUFFER_BLUE_SIZE = 0x8D52 + RENDERBUFFER_ALPHA_SIZE = 0x8D53 + RENDERBUFFER_DEPTH_SIZE = 0x8D54 + RENDERBUFFER_STENCIL_SIZE = 0x8D55 + FRAMEBUFFER_INCOMPLETE_MULTISAMPLE = 0x8D56 + MAX_SAMPLES = 0x8D57 + +ARB_framebuffer_object_DEPRECATED enum: + INDEX = 0x8222 + TEXTURE_LUMINANCE_TYPE = 0x8C14 + TEXTURE_INTENSITY_TYPE = 0x8C15 + +############################################################################### + +# ARB Extension #46 +ARB_framebuffer_sRGB enum: + FRAMEBUFFER_SRGB = 0x8DB9 + +############################################################################### + +# ARB Extension #47 +ARB_geometry_shader4 enum: + LINES_ADJACENCY_ARB = 0x000A + LINE_STRIP_ADJACENCY_ARB = 0x000B + TRIANGLES_ADJACENCY_ARB = 0x000C + TRIANGLE_STRIP_ADJACENCY_ARB = 0x000D + PROGRAM_POINT_SIZE_ARB = 0x8642 + MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB = 0x8C29 + FRAMEBUFFER_ATTACHMENT_LAYERED_ARB = 0x8DA7 + FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB = 0x8DA8 + FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB = 0x8DA9 + GEOMETRY_SHADER_ARB = 0x8DD9 + GEOMETRY_VERTICES_OUT_ARB = 0x8DDA + GEOMETRY_INPUT_TYPE_ARB = 0x8DDB + GEOMETRY_OUTPUT_TYPE_ARB = 0x8DDC + MAX_GEOMETRY_VARYING_COMPONENTS_ARB = 0x8DDD + MAX_VERTEX_VARYING_COMPONENTS_ARB = 0x8DDE + MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB = 0x8DDF + MAX_GEOMETRY_OUTPUT_VERTICES_ARB = 0x8DE0 + MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB = 0x8DE1 + use VERSION_3_0 MAX_VARYING_COMPONENTS + use ARB_framebuffer_object FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER + +############################################################################### + +# ARB Extension #48 +ARB_half_float_vertex enum: + HALF_FLOAT = 0x140B + +############################################################################### + +# ARB Extension #49 +ARB_instanced_arrays enum: + VERTEX_ATTRIB_ARRAY_DIVISOR_ARB = 0x88FE + +############################################################################### + +# ARB Extension #50 +ARB_map_buffer_range enum: + MAP_READ_BIT = 0x0001 + MAP_WRITE_BIT = 0x0002 + MAP_INVALIDATE_RANGE_BIT = 0x0004 + MAP_INVALIDATE_BUFFER_BIT = 0x0008 + MAP_FLUSH_EXPLICIT_BIT = 0x0010 + MAP_UNSYNCHRONIZED_BIT = 0x0020 + +############################################################################### + +# ARB Extension #51 +ARB_texture_buffer_object enum: + TEXTURE_BUFFER_ARB = 0x8C2A + MAX_TEXTURE_BUFFER_SIZE_ARB = 0x8C2B + TEXTURE_BINDING_BUFFER_ARB = 0x8C2C + TEXTURE_BUFFER_DATA_STORE_BINDING_ARB = 0x8C2D + TEXTURE_BUFFER_FORMAT_ARB = 0x8C2E + +############################################################################### + +# ARB Extension #52 +ARB_texture_compression_rgtc enum: + COMPRESSED_RED_RGTC1 = 0x8DBB + COMPRESSED_SIGNED_RED_RGTC1 = 0x8DBC + COMPRESSED_RG_RGTC2 = 0x8DBD + COMPRESSED_SIGNED_RG_RGTC2 = 0x8DBE + +############################################################################### + +# ARB Extension #53 +ARB_texture_rg enum: + RG = 0x8227 + RG_INTEGER = 0x8228 + R8 = 0x8229 + R16 = 0x822A + RG8 = 0x822B + RG16 = 0x822C + R16F = 0x822D + R32F = 0x822E + RG16F = 0x822F + RG32F = 0x8230 + R8I = 0x8231 + R8UI = 0x8232 + R16I = 0x8233 + R16UI = 0x8234 + R32I = 0x8235 + R32UI = 0x8236 + RG8I = 0x8237 + RG8UI = 0x8238 + RG16I = 0x8239 + RG16UI = 0x823A + RG32I = 0x823B + RG32UI = 0x823C + +############################################################################### + +# ARB Extension #54 +ARB_vertex_array_object enum: + VERTEX_ARRAY_BINDING = 0x85B5 + +############################################################################### + +# No new tokens +# ARB Extension #55 - WGL_ARB_create_context +# ARB Extension #56 - GLX_ARB_create_context + +############################################################################### + +# ARB Extension #57 +ARB_uniform_buffer_object enum: + UNIFORM_BUFFER = 0x8A11 + UNIFORM_BUFFER_BINDING = 0x8A28 + UNIFORM_BUFFER_START = 0x8A29 + UNIFORM_BUFFER_SIZE = 0x8A2A + MAX_VERTEX_UNIFORM_BLOCKS = 0x8A2B + MAX_GEOMETRY_UNIFORM_BLOCKS = 0x8A2C + MAX_FRAGMENT_UNIFORM_BLOCKS = 0x8A2D + MAX_COMBINED_UNIFORM_BLOCKS = 0x8A2E + MAX_UNIFORM_BUFFER_BINDINGS = 0x8A2F + MAX_UNIFORM_BLOCK_SIZE = 0x8A30 + MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS = 0x8A31 + MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS = 0x8A32 + MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS = 0x8A33 + UNIFORM_BUFFER_OFFSET_ALIGNMENT = 0x8A34 + ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH = 0x8A35 + ACTIVE_UNIFORM_BLOCKS = 0x8A36 + UNIFORM_TYPE = 0x8A37 + UNIFORM_SIZE = 0x8A38 + UNIFORM_NAME_LENGTH = 0x8A39 + UNIFORM_BLOCK_INDEX = 0x8A3A + UNIFORM_OFFSET = 0x8A3B + UNIFORM_ARRAY_STRIDE = 0x8A3C + UNIFORM_MATRIX_STRIDE = 0x8A3D + UNIFORM_IS_ROW_MAJOR = 0x8A3E + UNIFORM_BLOCK_BINDING = 0x8A3F + UNIFORM_BLOCK_DATA_SIZE = 0x8A40 + UNIFORM_BLOCK_NAME_LENGTH = 0x8A41 + UNIFORM_BLOCK_ACTIVE_UNIFORMS = 0x8A42 + UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES = 0x8A43 + UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER = 0x8A44 + UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER = 0x8A45 + UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER = 0x8A46 + INVALID_INDEX = 0xFFFFFFFFu + +############################################################################### + +# ARB Extension #58 +# No new tokens +ARB_compatibility enum: +passthru: /* ARB_compatibility just defines tokens from core 3.0 */ + +############################################################################### + +# ARB Extension #59 +ARB_copy_buffer enum: + COPY_READ_BUFFER = 0x8F36 + COPY_WRITE_BUFFER = 0x8F37 + +############################################################################### + +# ARB Extension #60 +# No new tokens +ARB_shader_texture_lod enum: + +############################################################################### + +# ARB Extension #61 +ARB_depth_clamp enum: + DEPTH_CLAMP = 0x864F + +############################################################################### + +# No new tokens +# ARB Extension #62 +ARB_draw_elements_base_vertex enum: + +############################################################################### + +# No new tokens +# ARB Extension #63 +ARB_fragment_coord_conventions enum: + +############################################################################### + +# ARB Extension #64 +ARB_provoking_vertex enum: + QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION = 0x8E4C + FIRST_VERTEX_CONVENTION = 0x8E4D + LAST_VERTEX_CONVENTION = 0x8E4E + PROVOKING_VERTEX = 0x8E4F + +############################################################################### + +# ARB Extension #65 +ARB_seamless_cube_map enum: + TEXTURE_CUBE_MAP_SEAMLESS = 0x884F + +############################################################################### + +# ARB Extension #66 +ARB_sync enum: + MAX_SERVER_WAIT_TIMEOUT = 0x9111 + OBJECT_TYPE = 0x9112 + SYNC_CONDITION = 0x9113 + SYNC_STATUS = 0x9114 + SYNC_FLAGS = 0x9115 + SYNC_FENCE = 0x9116 + SYNC_GPU_COMMANDS_COMPLETE = 0x9117 + UNSIGNALED = 0x9118 + SIGNALED = 0x9119 + ALREADY_SIGNALED = 0x911A + TIMEOUT_EXPIRED = 0x911B + CONDITION_SATISFIED = 0x911C + WAIT_FAILED = 0x911D + SYNC_FLUSH_COMMANDS_BIT = 0x00000001 + TIMEOUT_IGNORED = 0xFFFFFFFFFFFFFFFFull + +############################################################################### + +# ARB Extension #67 +ARB_texture_multisample enum: + SAMPLE_POSITION = 0x8E50 + SAMPLE_MASK = 0x8E51 + SAMPLE_MASK_VALUE = 0x8E52 + MAX_SAMPLE_MASK_WORDS = 0x8E59 + TEXTURE_2D_MULTISAMPLE = 0x9100 + PROXY_TEXTURE_2D_MULTISAMPLE = 0x9101 + TEXTURE_2D_MULTISAMPLE_ARRAY = 0x9102 + PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY = 0x9103 + TEXTURE_BINDING_2D_MULTISAMPLE = 0x9104 + TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY = 0x9105 + TEXTURE_SAMPLES = 0x9106 + TEXTURE_FIXED_SAMPLE_LOCATIONS = 0x9107 + SAMPLER_2D_MULTISAMPLE = 0x9108 + INT_SAMPLER_2D_MULTISAMPLE = 0x9109 + UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE = 0x910A + SAMPLER_2D_MULTISAMPLE_ARRAY = 0x910B + INT_SAMPLER_2D_MULTISAMPLE_ARRAY = 0x910C + UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY = 0x910D + MAX_COLOR_TEXTURE_SAMPLES = 0x910E + MAX_DEPTH_TEXTURE_SAMPLES = 0x910F + MAX_INTEGER_SAMPLES = 0x9110 + +############################################################################### + +# ARB Extension #68 +ARB_vertex_array_bgra enum: + use VERSION_1_2 BGRA + +############################################################################### + +# No new tokens +# ARB Extension #69 +ARB_draw_buffers_blend enum: +#@@@ Add ARB suffixes here & functions! + +############################################################################### + +# ARB Extension #70 +#@@@ Add ARB suffixes here & functions! +ARB_sample_shading enum: + SAMPLE_SHADING = 0x8C36 + MIN_SAMPLE_SHADING_VALUE = 0x8C37 + +############################################################################### + +# ARB Extension #71 +#@@@ Add ARB suffixes here & functions! +ARB_texture_cube_map_array enum: + TEXTURE_CUBE_MAP_ARRAY = 0x9009 + TEXTURE_BINDING_CUBE_MAP_ARRAY = 0x900A + PROXY_TEXTURE_CUBE_MAP_ARRAY = 0x900B + SAMPLER_CUBE_MAP_ARRAY = 0x900C + SAMPLER_CUBE_MAP_ARRAY_SHADOW = 0x900D + INT_SAMPLER_CUBE_MAP_ARRAY = 0x900E + UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY = 0x900F + +############################################################################### + +# ARB Extension #72 +#@@@ Add ARB suffixes here & functions! +ARB_texture_gather enum: + MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB = 0x8E5E + MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB = 0x8E5F + +############################################################################### + +# No new tokens +# ARB Extension #73 +ARB_texture_query_lod enum: + +############################################################################### + +# No new tokens +# ARB Extension #74 - WGL_ARB_create_context_profile +# ARB Extension #75 - GLX_ARB_create_context_profile + +############################################################################### + +# ARB Extension #76 +ARB_shading_language_include enum: + SHADER_INCLUDE_ARB = 0x8DAE + NAMED_STRING_LENGTH_ARB = 0x8DE9 + NAMED_STRING_TYPE_ARB = 0x8DEA + +############################################################################### + +# ARB Extension #77 +ARB_texture_compression_bptc enum: + COMPRESSED_RGBA_BPTC_UNORM_ARB = 0x8E8C + COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB = 0x8E8D + COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB = 0x8E8E + COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB = 0x8E8F + +############################################################################### + +# ARB Extension #78 +ARB_blend_func_extended enum: + SRC1_COLOR = 0x88F9 + use VERSION_1_5_DEPRECATED SRC1_ALPHA + ONE_MINUS_SRC1_COLOR = 0x88FA + ONE_MINUS_SRC1_ALPHA = 0x88FB + MAX_DUAL_SOURCE_DRAW_BUFFERS = 0x88FC + +############################################################################### + +# No new tokens +# ARB Extension #79 +ARB_explicit_attrib_location enum: + +############################################################################### + +# ARB Extension #80 +ARB_occlusion_query2 enum: + ANY_SAMPLES_PASSED = 0x8C2F + +############################################################################### + +# ARB Extension #81 +ARB_sampler_objects enum: + SAMPLER_BINDING = 0x8919 + +############################################################################### + +# No new tokens +# ARB Extension #82 +ARB_shader_bit_encoding enum: + +############################################################################### + +# ARB Extension #83 +ARB_texture_rgb10_a2ui enum: + RGB10_A2UI = 0x906F + +############################################################################### + +# ARB Extension #84 +ARB_texture_swizzle enum: + TEXTURE_SWIZZLE_R = 0x8E42 + TEXTURE_SWIZZLE_G = 0x8E43 + TEXTURE_SWIZZLE_B = 0x8E44 + TEXTURE_SWIZZLE_A = 0x8E45 + TEXTURE_SWIZZLE_RGBA = 0x8E46 + +############################################################################### + +# ARB Extension #85 +ARB_timer_query enum: + TIME_ELAPSED = 0x88BF + TIMESTAMP = 0x8E28 + +############################################################################### + +# ARB Extension #86 +ARB_vertex_type_2_10_10_10_rev enum: + use VERSION_1_2 UNSIGNED_INT_2_10_10_10_REV + INT_2_10_10_10_REV = 0x8D9F + +############################################################################### + +# ARB Extension #87 +ARB_draw_indirect enum: + DRAW_INDIRECT_BUFFER = 0x8F3F + DRAW_INDIRECT_BUFFER_BINDING = 0x8F43 + +############################################################################### + +# ARB Extension #88 +ARB_gpu_shader5 enum: + GEOMETRY_SHADER_INVOCATIONS = 0x887F + MAX_GEOMETRY_SHADER_INVOCATIONS = 0x8E5A + MIN_FRAGMENT_INTERPOLATION_OFFSET = 0x8E5B + MAX_FRAGMENT_INTERPOLATION_OFFSET = 0x8E5C + FRAGMENT_INTERPOLATION_OFFSET_BITS = 0x8E5D + MAX_VERTEX_STREAMS = 0x8E71 + +############################################################################### + +# ARB Extension #89 +ARB_gpu_shader_fp64 enum: + use VERSION_1_1 DOUBLE + DOUBLE_VEC2 = 0x8FFC + DOUBLE_VEC3 = 0x8FFD + DOUBLE_VEC4 = 0x8FFE + DOUBLE_MAT2 = 0x8F46 + DOUBLE_MAT3 = 0x8F47 + DOUBLE_MAT4 = 0x8F48 + DOUBLE_MAT2x3 = 0x8F49 + DOUBLE_MAT2x4 = 0x8F4A + DOUBLE_MAT3x2 = 0x8F4B + DOUBLE_MAT3x4 = 0x8F4C + DOUBLE_MAT4x2 = 0x8F4D + DOUBLE_MAT4x3 = 0x8F4E + +############################################################################### + +# ARB Extension #90 +ARB_shader_subroutine enum: + ACTIVE_SUBROUTINES = 0x8DE5 + ACTIVE_SUBROUTINE_UNIFORMS = 0x8DE6 + ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS = 0x8E47 + ACTIVE_SUBROUTINE_MAX_LENGTH = 0x8E48 + ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH = 0x8E49 + MAX_SUBROUTINES = 0x8DE7 + MAX_SUBROUTINE_UNIFORM_LOCATIONS = 0x8DE8 + NUM_COMPATIBLE_SUBROUTINES = 0x8E4A + COMPATIBLE_SUBROUTINES = 0x8E4B + use ARB_uniform_buffer_object UNIFORM_SIZE + use ARB_uniform_buffer_object UNIFORM_NAME_LENGTH + +############################################################################### + +# ARB Extension #91 +ARB_tessellation_shader enum: + PATCHES = 0x000E + PATCH_VERTICES = 0x8E72 + PATCH_DEFAULT_INNER_LEVEL = 0x8E73 + PATCH_DEFAULT_OUTER_LEVEL = 0x8E74 + TESS_CONTROL_OUTPUT_VERTICES = 0x8E75 + TESS_GEN_MODE = 0x8E76 + TESS_GEN_SPACING = 0x8E77 + TESS_GEN_VERTEX_ORDER = 0x8E78 + TESS_GEN_POINT_MODE = 0x8E79 + use VERSION_1_1 TRIANGLES + use VERSION_1_1 QUADS + ISOLINES = 0x8E7A + use VERSION_1_1 EQUAL + FRACTIONAL_ODD = 0x8E7B + FRACTIONAL_EVEN = 0x8E7C + use VERSION_1_1 CCW + use VERSION_1_1 CW + MAX_PATCH_VERTICES = 0x8E7D + MAX_TESS_GEN_LEVEL = 0x8E7E + MAX_TESS_CONTROL_UNIFORM_COMPONENTS = 0x8E7F + MAX_TESS_EVALUATION_UNIFORM_COMPONENTS = 0x8E80 + MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS = 0x8E81 + MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS = 0x8E82 + MAX_TESS_CONTROL_OUTPUT_COMPONENTS = 0x8E83 + MAX_TESS_PATCH_COMPONENTS = 0x8E84 + MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS = 0x8E85 + MAX_TESS_EVALUATION_OUTPUT_COMPONENTS = 0x8E86 + MAX_TESS_CONTROL_UNIFORM_BLOCKS = 0x8E89 + MAX_TESS_EVALUATION_UNIFORM_BLOCKS = 0x8E8A + MAX_TESS_CONTROL_INPUT_COMPONENTS = 0x886C + MAX_TESS_EVALUATION_INPUT_COMPONENTS = 0x886D + MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS = 0x8E1E + MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS = 0x8E1F + UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER = 0x84F0 + UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER = 0x84F1 + TESS_EVALUATION_SHADER = 0x8E87 + TESS_CONTROL_SHADER = 0x8E88 + +############################################################################### + +# ARB Extension #92 +ARB_texture_buffer_object_rgb32 enum: + use VERSION_3_0 RGB32F + use VERSION_3_0 RGB32UI + use VERSION_3_0 RGB32I + +############################################################################### + +# ARB Extension #93 +ARB_transform_feedback2 enum: + TRANSFORM_FEEDBACK = 0x8E22 + TRANSFORM_FEEDBACK_BUFFER_PAUSED = 0x8E23 + TRANSFORM_FEEDBACK_BUFFER_ACTIVE = 0x8E24 + TRANSFORM_FEEDBACK_BINDING = 0x8E25 + +############################################################################### + +# ARB Extension #94 +ARB_transform_feedback3 enum: + MAX_TRANSFORM_FEEDBACK_BUFFERS = 0x8E70 + MAX_VERTEX_STREAMS = 0x8E71 + + +############################################################################### +# +# non-ARB extensions follow, in registry order +# +############################################################################### + +############################################################################### + +# Extension #1 +EXT_abgr enum: + ABGR_EXT = 0x8000 + +############################################################################### + +# Extension #2 +EXT_blend_color enum: + CONSTANT_COLOR_EXT = 0x8001 + ONE_MINUS_CONSTANT_COLOR_EXT = 0x8002 + CONSTANT_ALPHA_EXT = 0x8003 + ONE_MINUS_CONSTANT_ALPHA_EXT = 0x8004 + BLEND_COLOR_EXT = 0x8005 # 4 F + +############################################################################### + +# Extension #3 +EXT_polygon_offset enum: + POLYGON_OFFSET_EXT = 0x8037 + POLYGON_OFFSET_FACTOR_EXT = 0x8038 + POLYGON_OFFSET_BIAS_EXT = 0x8039 # 1 F + +############################################################################### + +# Extension #4 +EXT_texture enum: + ALPHA4_EXT = 0x803B + ALPHA8_EXT = 0x803C + ALPHA12_EXT = 0x803D + ALPHA16_EXT = 0x803E + LUMINANCE4_EXT = 0x803F + LUMINANCE8_EXT = 0x8040 + LUMINANCE12_EXT = 0x8041 + LUMINANCE16_EXT = 0x8042 + LUMINANCE4_ALPHA4_EXT = 0x8043 + LUMINANCE6_ALPHA2_EXT = 0x8044 + LUMINANCE8_ALPHA8_EXT = 0x8045 + LUMINANCE12_ALPHA4_EXT = 0x8046 + LUMINANCE12_ALPHA12_EXT = 0x8047 + LUMINANCE16_ALPHA16_EXT = 0x8048 + INTENSITY_EXT = 0x8049 + INTENSITY4_EXT = 0x804A + INTENSITY8_EXT = 0x804B + INTENSITY12_EXT = 0x804C + INTENSITY16_EXT = 0x804D + RGB2_EXT = 0x804E + RGB4_EXT = 0x804F + RGB5_EXT = 0x8050 + RGB8_EXT = 0x8051 + RGB10_EXT = 0x8052 + RGB12_EXT = 0x8053 + RGB16_EXT = 0x8054 + RGBA2_EXT = 0x8055 + RGBA4_EXT = 0x8056 + RGB5_A1_EXT = 0x8057 + RGBA8_EXT = 0x8058 + RGB10_A2_EXT = 0x8059 + RGBA12_EXT = 0x805A + RGBA16_EXT = 0x805B + TEXTURE_RED_SIZE_EXT = 0x805C + TEXTURE_GREEN_SIZE_EXT = 0x805D + TEXTURE_BLUE_SIZE_EXT = 0x805E + TEXTURE_ALPHA_SIZE_EXT = 0x805F + TEXTURE_LUMINANCE_SIZE_EXT = 0x8060 + TEXTURE_INTENSITY_SIZE_EXT = 0x8061 + REPLACE_EXT = 0x8062 + PROXY_TEXTURE_1D_EXT = 0x8063 + PROXY_TEXTURE_2D_EXT = 0x8064 + TEXTURE_TOO_LARGE_EXT = 0x8065 + +############################################################################### + +# Extension #5 - skipped + +############################################################################### + +# Extension #6 +EXT_texture3D enum: + PACK_SKIP_IMAGES_EXT = 0x806B # 1 I + PACK_IMAGE_HEIGHT_EXT = 0x806C # 1 F + UNPACK_SKIP_IMAGES_EXT = 0x806D # 1 I + UNPACK_IMAGE_HEIGHT_EXT = 0x806E # 1 F + TEXTURE_3D_EXT = 0x806F # 1 I + PROXY_TEXTURE_3D_EXT = 0x8070 + TEXTURE_DEPTH_EXT = 0x8071 + TEXTURE_WRAP_R_EXT = 0x8072 + MAX_3D_TEXTURE_SIZE_EXT = 0x8073 # 1 I + +############################################################################### + +# Extension #7 +SGIS_texture_filter4 enum: + FILTER4_SGIS = 0x8146 + TEXTURE_FILTER4_SIZE_SGIS = 0x8147 + +############################################################################### + +# Extension #8 - skipped + +############################################################################### + +# No new tokens +# Extension #9 +EXT_subtexture enum: + +############################################################################### + +# No new tokens +# Extension #10 +EXT_copy_texture enum: + +############################################################################### + +# Extension #11 +EXT_histogram enum: + HISTOGRAM_EXT = 0x8024 # 1 I + PROXY_HISTOGRAM_EXT = 0x8025 + HISTOGRAM_WIDTH_EXT = 0x8026 + HISTOGRAM_FORMAT_EXT = 0x8027 + HISTOGRAM_RED_SIZE_EXT = 0x8028 + HISTOGRAM_GREEN_SIZE_EXT = 0x8029 + HISTOGRAM_BLUE_SIZE_EXT = 0x802A + HISTOGRAM_ALPHA_SIZE_EXT = 0x802B + HISTOGRAM_LUMINANCE_SIZE_EXT = 0x802C + HISTOGRAM_SINK_EXT = 0x802D + MINMAX_EXT = 0x802E # 1 I + MINMAX_FORMAT_EXT = 0x802F + MINMAX_SINK_EXT = 0x8030 + TABLE_TOO_LARGE_EXT = 0x8031 + +############################################################################### + +# Extension #12 +EXT_convolution enum: + CONVOLUTION_1D_EXT = 0x8010 # 1 I + CONVOLUTION_2D_EXT = 0x8011 # 1 I + SEPARABLE_2D_EXT = 0x8012 # 1 I + CONVOLUTION_BORDER_MODE_EXT = 0x8013 + CONVOLUTION_FILTER_SCALE_EXT = 0x8014 + CONVOLUTION_FILTER_BIAS_EXT = 0x8015 + REDUCE_EXT = 0x8016 + CONVOLUTION_FORMAT_EXT = 0x8017 + CONVOLUTION_WIDTH_EXT = 0x8018 + CONVOLUTION_HEIGHT_EXT = 0x8019 + MAX_CONVOLUTION_WIDTH_EXT = 0x801A + MAX_CONVOLUTION_HEIGHT_EXT = 0x801B + POST_CONVOLUTION_RED_SCALE_EXT = 0x801C # 1 F + POST_CONVOLUTION_GREEN_SCALE_EXT = 0x801D # 1 F + POST_CONVOLUTION_BLUE_SCALE_EXT = 0x801E # 1 F + POST_CONVOLUTION_ALPHA_SCALE_EXT = 0x801F # 1 F + POST_CONVOLUTION_RED_BIAS_EXT = 0x8020 # 1 F + POST_CONVOLUTION_GREEN_BIAS_EXT = 0x8021 # 1 F + POST_CONVOLUTION_BLUE_BIAS_EXT = 0x8022 # 1 F + POST_CONVOLUTION_ALPHA_BIAS_EXT = 0x8023 # 1 F + +############################################################################### + +# Extension #13 +SGI_color_matrix enum: + COLOR_MATRIX_SGI = 0x80B1 # 16 F + COLOR_MATRIX_STACK_DEPTH_SGI = 0x80B2 # 1 I + MAX_COLOR_MATRIX_STACK_DEPTH_SGI = 0x80B3 # 1 I + POST_COLOR_MATRIX_RED_SCALE_SGI = 0x80B4 # 1 F + POST_COLOR_MATRIX_GREEN_SCALE_SGI = 0x80B5 # 1 F + POST_COLOR_MATRIX_BLUE_SCALE_SGI = 0x80B6 # 1 F + POST_COLOR_MATRIX_ALPHA_SCALE_SGI = 0x80B7 # 1 F + POST_COLOR_MATRIX_RED_BIAS_SGI = 0x80B8 # 1 F + POST_COLOR_MATRIX_GREEN_BIAS_SGI = 0x80B9 # 1 F + POST_COLOR_MATRIX_BLUE_BIAS_SGI = 0x80BA # 1 F + POST_COLOR_MATRIX_ALPHA_BIAS_SGI = 0x80BB # 1 F + +############################################################################### + +# Extension #14 +SGI_color_table enum: + COLOR_TABLE_SGI = 0x80D0 # 1 I + POST_CONVOLUTION_COLOR_TABLE_SGI = 0x80D1 # 1 I + POST_COLOR_MATRIX_COLOR_TABLE_SGI = 0x80D2 # 1 I + PROXY_COLOR_TABLE_SGI = 0x80D3 + PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI = 0x80D4 + PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI = 0x80D5 + COLOR_TABLE_SCALE_SGI = 0x80D6 + COLOR_TABLE_BIAS_SGI = 0x80D7 + COLOR_TABLE_FORMAT_SGI = 0x80D8 + COLOR_TABLE_WIDTH_SGI = 0x80D9 + COLOR_TABLE_RED_SIZE_SGI = 0x80DA + COLOR_TABLE_GREEN_SIZE_SGI = 0x80DB + COLOR_TABLE_BLUE_SIZE_SGI = 0x80DC + COLOR_TABLE_ALPHA_SIZE_SGI = 0x80DD + COLOR_TABLE_LUMINANCE_SIZE_SGI = 0x80DE + COLOR_TABLE_INTENSITY_SIZE_SGI = 0x80DF + +############################################################################### + +# Extension #15 +SGIS_pixel_texture enum: + PIXEL_TEXTURE_SGIS = 0x8353 # 1 I + PIXEL_FRAGMENT_RGB_SOURCE_SGIS = 0x8354 # 1 I + PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS = 0x8355 # 1 I + PIXEL_GROUP_COLOR_SGIS = 0x8356 # 1 I + +############################################################################### + +# Extension #15a +SGIX_pixel_texture enum: + PIXEL_TEX_GEN_SGIX = 0x8139 # 1 I + PIXEL_TEX_GEN_MODE_SGIX = 0x832B # 1 I + +############################################################################### + +# Extension #16 +SGIS_texture4D enum: + PACK_SKIP_VOLUMES_SGIS = 0x8130 # 1 I + PACK_IMAGE_DEPTH_SGIS = 0x8131 # 1 I + UNPACK_SKIP_VOLUMES_SGIS = 0x8132 # 1 I + UNPACK_IMAGE_DEPTH_SGIS = 0x8133 # 1 I + TEXTURE_4D_SGIS = 0x8134 # 1 I + PROXY_TEXTURE_4D_SGIS = 0x8135 + TEXTURE_4DSIZE_SGIS = 0x8136 + TEXTURE_WRAP_Q_SGIS = 0x8137 + MAX_4D_TEXTURE_SIZE_SGIS = 0x8138 # 1 I + TEXTURE_4D_BINDING_SGIS = 0x814F # 1 I + +############################################################################### + +# Extension #17 +SGI_texture_color_table enum: + TEXTURE_COLOR_TABLE_SGI = 0x80BC # 1 I + PROXY_TEXTURE_COLOR_TABLE_SGI = 0x80BD + +############################################################################### + +# Extension #18 +EXT_cmyka enum: + CMYK_EXT = 0x800C + CMYKA_EXT = 0x800D + PACK_CMYK_HINT_EXT = 0x800E # 1 I + UNPACK_CMYK_HINT_EXT = 0x800F # 1 I + +############################################################################### + +# Extension #19 - skipped + +############################################################################### + +# Extension #20 +EXT_texture_object enum: + TEXTURE_PRIORITY_EXT = 0x8066 + TEXTURE_RESIDENT_EXT = 0x8067 + TEXTURE_1D_BINDING_EXT = 0x8068 + TEXTURE_2D_BINDING_EXT = 0x8069 + TEXTURE_3D_BINDING_EXT = 0x806A # 1 I + +############################################################################### + +# Extension #21 +SGIS_detail_texture enum: + DETAIL_TEXTURE_2D_SGIS = 0x8095 + DETAIL_TEXTURE_2D_BINDING_SGIS = 0x8096 # 1 I + LINEAR_DETAIL_SGIS = 0x8097 + LINEAR_DETAIL_ALPHA_SGIS = 0x8098 + LINEAR_DETAIL_COLOR_SGIS = 0x8099 + DETAIL_TEXTURE_LEVEL_SGIS = 0x809A + DETAIL_TEXTURE_MODE_SGIS = 0x809B + DETAIL_TEXTURE_FUNC_POINTS_SGIS = 0x809C + +############################################################################### + +# Extension #22 +SGIS_sharpen_texture enum: + LINEAR_SHARPEN_SGIS = 0x80AD + LINEAR_SHARPEN_ALPHA_SGIS = 0x80AE + LINEAR_SHARPEN_COLOR_SGIS = 0x80AF + SHARPEN_TEXTURE_FUNC_POINTS_SGIS = 0x80B0 + +############################################################################### + +# Extension #23 +EXT_packed_pixels enum: + UNSIGNED_BYTE_3_3_2_EXT = 0x8032 + UNSIGNED_SHORT_4_4_4_4_EXT = 0x8033 + UNSIGNED_SHORT_5_5_5_1_EXT = 0x8034 + UNSIGNED_INT_8_8_8_8_EXT = 0x8035 + UNSIGNED_INT_10_10_10_2_EXT = 0x8036 + +############################################################################### + +# Extension #24 +SGIS_texture_lod enum: + TEXTURE_MIN_LOD_SGIS = 0x813A + TEXTURE_MAX_LOD_SGIS = 0x813B + TEXTURE_BASE_LEVEL_SGIS = 0x813C + TEXTURE_MAX_LEVEL_SGIS = 0x813D + +############################################################################### + +# Extension #25 +SGIS_multisample enum: + MULTISAMPLE_SGIS = 0x809D # 1 I + SAMPLE_ALPHA_TO_MASK_SGIS = 0x809E # 1 I + SAMPLE_ALPHA_TO_ONE_SGIS = 0x809F # 1 I + SAMPLE_MASK_SGIS = 0x80A0 # 1 I + 1PASS_SGIS = 0x80A1 + 2PASS_0_SGIS = 0x80A2 + 2PASS_1_SGIS = 0x80A3 + 4PASS_0_SGIS = 0x80A4 + 4PASS_1_SGIS = 0x80A5 + 4PASS_2_SGIS = 0x80A6 + 4PASS_3_SGIS = 0x80A7 + SAMPLE_BUFFERS_SGIS = 0x80A8 # 1 I + SAMPLES_SGIS = 0x80A9 # 1 I + SAMPLE_MASK_VALUE_SGIS = 0x80AA # 1 F + SAMPLE_MASK_INVERT_SGIS = 0x80AB # 1 I + SAMPLE_PATTERN_SGIS = 0x80AC # 1 I + +############################################################################### + +# Extension #26 - no specification? +# SGIS_premultiply_blend enum: + +############################################################################## + +# Extension #27 +# Diamond ships an otherwise identical IBM_rescale_normal extension; +# Dan Brokenshire says this is deprecated and should not be advertised. +EXT_rescale_normal enum: + RESCALE_NORMAL_EXT = 0x803A # 1 I + +############################################################################### + +# Extension #28 - GLX_EXT_visual_info + +############################################################################### + +# Extension #29 - skipped + +############################################################################### + +# Extension #30 +EXT_vertex_array enum: + VERTEX_ARRAY_EXT = 0x8074 + NORMAL_ARRAY_EXT = 0x8075 + COLOR_ARRAY_EXT = 0x8076 + INDEX_ARRAY_EXT = 0x8077 + TEXTURE_COORD_ARRAY_EXT = 0x8078 + EDGE_FLAG_ARRAY_EXT = 0x8079 + VERTEX_ARRAY_SIZE_EXT = 0x807A + VERTEX_ARRAY_TYPE_EXT = 0x807B + VERTEX_ARRAY_STRIDE_EXT = 0x807C + VERTEX_ARRAY_COUNT_EXT = 0x807D # 1 I + NORMAL_ARRAY_TYPE_EXT = 0x807E + NORMAL_ARRAY_STRIDE_EXT = 0x807F + NORMAL_ARRAY_COUNT_EXT = 0x8080 # 1 I + COLOR_ARRAY_SIZE_EXT = 0x8081 + COLOR_ARRAY_TYPE_EXT = 0x8082 + COLOR_ARRAY_STRIDE_EXT = 0x8083 + COLOR_ARRAY_COUNT_EXT = 0x8084 # 1 I + INDEX_ARRAY_TYPE_EXT = 0x8085 + INDEX_ARRAY_STRIDE_EXT = 0x8086 + INDEX_ARRAY_COUNT_EXT = 0x8087 # 1 I + TEXTURE_COORD_ARRAY_SIZE_EXT = 0x8088 + TEXTURE_COORD_ARRAY_TYPE_EXT = 0x8089 + TEXTURE_COORD_ARRAY_STRIDE_EXT = 0x808A + TEXTURE_COORD_ARRAY_COUNT_EXT = 0x808B # 1 I + EDGE_FLAG_ARRAY_STRIDE_EXT = 0x808C + EDGE_FLAG_ARRAY_COUNT_EXT = 0x808D # 1 I + VERTEX_ARRAY_POINTER_EXT = 0x808E + NORMAL_ARRAY_POINTER_EXT = 0x808F + COLOR_ARRAY_POINTER_EXT = 0x8090 + INDEX_ARRAY_POINTER_EXT = 0x8091 + TEXTURE_COORD_ARRAY_POINTER_EXT = 0x8092 + EDGE_FLAG_ARRAY_POINTER_EXT = 0x8093 + +############################################################################### + +# Extension #31 +EXT_misc_attribute enum: +# MISC_BIT = 0x???? + +############################################################################### + +# Extension #32 +SGIS_generate_mipmap enum: + GENERATE_MIPMAP_SGIS = 0x8191 + GENERATE_MIPMAP_HINT_SGIS = 0x8192 # 1 I + +############################################################################### + +# Extension #33 +SGIX_clipmap enum: + LINEAR_CLIPMAP_LINEAR_SGIX = 0x8170 + TEXTURE_CLIPMAP_CENTER_SGIX = 0x8171 + TEXTURE_CLIPMAP_FRAME_SGIX = 0x8172 + TEXTURE_CLIPMAP_OFFSET_SGIX = 0x8173 + TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX = 0x8174 + TEXTURE_CLIPMAP_LOD_OFFSET_SGIX = 0x8175 + TEXTURE_CLIPMAP_DEPTH_SGIX = 0x8176 + MAX_CLIPMAP_DEPTH_SGIX = 0x8177 # 1 I + MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX = 0x8178 # 1 I + NEAREST_CLIPMAP_NEAREST_SGIX = 0x844D + NEAREST_CLIPMAP_LINEAR_SGIX = 0x844E + LINEAR_CLIPMAP_NEAREST_SGIX = 0x844F + +############################################################################### + +# Extension #34 +SGIX_shadow enum: + TEXTURE_COMPARE_SGIX = 0x819A + TEXTURE_COMPARE_OPERATOR_SGIX = 0x819B + TEXTURE_LEQUAL_R_SGIX = 0x819C + TEXTURE_GEQUAL_R_SGIX = 0x819D + +############################################################################### + +# Extension #35 +SGIS_texture_edge_clamp enum: + CLAMP_TO_EDGE_SGIS = 0x812F + +############################################################################### + +# Extension #36 +# Promoted to ARB_texture_border_clamp +SGIS_texture_border_clamp enum: + CLAMP_TO_BORDER_SGIS = 0x812D + +############################################################################### + +# Extension #37 +EXT_blend_minmax enum: + FUNC_ADD_EXT = 0x8006 + MIN_EXT = 0x8007 + MAX_EXT = 0x8008 + BLEND_EQUATION_EXT = 0x8009 # 1 I + +############################################################################### + +# Extension #38 +EXT_blend_subtract enum: + FUNC_SUBTRACT_EXT = 0x800A + FUNC_REVERSE_SUBTRACT_EXT = 0x800B + +############################################################################### + +# No new tokens +# Extension #39 +EXT_blend_logic_op enum: + +############################################################################### + +# Extension #40 - GLX_SGI_swap_control +# Extension #41 - GLX_SGI_video_sync +# Extension #42 - GLX_SGI_make_current_read +# Extension #43 - GLX_SGIX_video_source +# Extension #44 - GLX_EXT_visual_rating + +############################################################################### + +# Extension #45 +SGIX_interlace enum: + INTERLACE_SGIX = 0x8094 # 1 I + +############################################################################### + +# Extension #46 +SGIX_pixel_tiles enum: + PIXEL_TILE_BEST_ALIGNMENT_SGIX = 0x813E # 1 I + PIXEL_TILE_CACHE_INCREMENT_SGIX = 0x813F # 1 I + PIXEL_TILE_WIDTH_SGIX = 0x8140 # 1 I + PIXEL_TILE_HEIGHT_SGIX = 0x8141 # 1 I + PIXEL_TILE_GRID_WIDTH_SGIX = 0x8142 # 1 I + PIXEL_TILE_GRID_HEIGHT_SGIX = 0x8143 # 1 I + PIXEL_TILE_GRID_DEPTH_SGIX = 0x8144 # 1 I + PIXEL_TILE_CACHE_SIZE_SGIX = 0x8145 # 1 I + +############################################################################### + +# Extension #47 - GLX_EXT_import_context + +############################################################################### + +# Extension #48 - skipped + +############################################################################### + +# Extension #49 - GLX_SGIX_fbconfig +# Extension #50 - GLX_SGIX_pbuffer + +############################################################################### + +# Extension #51 +SGIS_texture_select enum: + DUAL_ALPHA4_SGIS = 0x8110 + DUAL_ALPHA8_SGIS = 0x8111 + DUAL_ALPHA12_SGIS = 0x8112 + DUAL_ALPHA16_SGIS = 0x8113 + DUAL_LUMINANCE4_SGIS = 0x8114 + DUAL_LUMINANCE8_SGIS = 0x8115 + DUAL_LUMINANCE12_SGIS = 0x8116 + DUAL_LUMINANCE16_SGIS = 0x8117 + DUAL_INTENSITY4_SGIS = 0x8118 + DUAL_INTENSITY8_SGIS = 0x8119 + DUAL_INTENSITY12_SGIS = 0x811A + DUAL_INTENSITY16_SGIS = 0x811B + DUAL_LUMINANCE_ALPHA4_SGIS = 0x811C + DUAL_LUMINANCE_ALPHA8_SGIS = 0x811D + QUAD_ALPHA4_SGIS = 0x811E + QUAD_ALPHA8_SGIS = 0x811F + QUAD_LUMINANCE4_SGIS = 0x8120 + QUAD_LUMINANCE8_SGIS = 0x8121 + QUAD_INTENSITY4_SGIS = 0x8122 + QUAD_INTENSITY8_SGIS = 0x8123 + DUAL_TEXTURE_SELECT_SGIS = 0x8124 + QUAD_TEXTURE_SELECT_SGIS = 0x8125 + +############################################################################### + +# Extension #52 +SGIX_sprite enum: + SPRITE_SGIX = 0x8148 # 1 I + SPRITE_MODE_SGIX = 0x8149 # 1 I + SPRITE_AXIS_SGIX = 0x814A # 3 F + SPRITE_TRANSLATION_SGIX = 0x814B # 3 F + SPRITE_AXIAL_SGIX = 0x814C + SPRITE_OBJECT_ALIGNED_SGIX = 0x814D + SPRITE_EYE_ALIGNED_SGIX = 0x814E + +############################################################################### + +# Extension #53 +SGIX_texture_multi_buffer enum: + TEXTURE_MULTI_BUFFER_HINT_SGIX = 0x812E + +############################################################################### + +# Extension #54 +# EXT form promoted from SGIS form; both are included +EXT_point_parameters enum: + POINT_SIZE_MIN_EXT = 0x8126 # 1 F + POINT_SIZE_MAX_EXT = 0x8127 # 1 F + POINT_FADE_THRESHOLD_SIZE_EXT = 0x8128 # 1 F + DISTANCE_ATTENUATION_EXT = 0x8129 # 3 F + +SGIS_point_parameters enum: + POINT_SIZE_MIN_SGIS = 0x8126 # 1 F + POINT_SIZE_MAX_SGIS = 0x8127 # 1 F + POINT_FADE_THRESHOLD_SIZE_SGIS = 0x8128 # 1 F + DISTANCE_ATTENUATION_SGIS = 0x8129 # 3 F + +############################################################################### + +# Extension #55 +SGIX_instruments enum: + INSTRUMENT_BUFFER_POINTER_SGIX = 0x8180 + INSTRUMENT_MEASUREMENTS_SGIX = 0x8181 # 1 I + +############################################################################### + +# Extension #56 +SGIX_texture_scale_bias enum: + POST_TEXTURE_FILTER_BIAS_SGIX = 0x8179 + POST_TEXTURE_FILTER_SCALE_SGIX = 0x817A + POST_TEXTURE_FILTER_BIAS_RANGE_SGIX = 0x817B # 2 F + POST_TEXTURE_FILTER_SCALE_RANGE_SGIX = 0x817C # 2 F + +############################################################################### + +# Extension #57 +SGIX_framezoom enum: + FRAMEZOOM_SGIX = 0x818B # 1 I + FRAMEZOOM_FACTOR_SGIX = 0x818C # 1 I + MAX_FRAMEZOOM_FACTOR_SGIX = 0x818D # 1 I + +############################################################################### + +# No new tokens +# Extension #58 +SGIX_tag_sample_buffer enum: + +############################################################################### + +# Extension #59 +FfdMaskSGIX enum: + TEXTURE_DEFORMATION_BIT_SGIX = 0x00000001 + GEOMETRY_DEFORMATION_BIT_SGIX = 0x00000002 +SGIX_polynomial_ffd enum: + GEOMETRY_DEFORMATION_SGIX = 0x8194 + TEXTURE_DEFORMATION_SGIX = 0x8195 + DEFORMATIONS_MASK_SGIX = 0x8196 # 1 I + MAX_DEFORMATION_ORDER_SGIX = 0x8197 + +############################################################################### + +# Extension #60 +SGIX_reference_plane enum: + REFERENCE_PLANE_SGIX = 0x817D # 1 I + REFERENCE_PLANE_EQUATION_SGIX = 0x817E # 4 F + +############################################################################### + +# No new tokens +# Extension #61 +SGIX_flush_raster enum: + +############################################################################### + +# Extension #62 - GLX_SGIX_cushion + +############################################################################### + +# Extension #63 +SGIX_depth_texture enum: + DEPTH_COMPONENT16_SGIX = 0x81A5 + DEPTH_COMPONENT24_SGIX = 0x81A6 + DEPTH_COMPONENT32_SGIX = 0x81A7 + +############################################################################### + +# Extension #64 +SGIS_fog_function enum: + FOG_FUNC_SGIS = 0x812A + FOG_FUNC_POINTS_SGIS = 0x812B # 1 I + MAX_FOG_FUNC_POINTS_SGIS = 0x812C # 1 I + +############################################################################### + +# Extension #65 +SGIX_fog_offset enum: + FOG_OFFSET_SGIX = 0x8198 # 1 I + FOG_OFFSET_VALUE_SGIX = 0x8199 # 4 F + +############################################################################### + +# Extension #66 +HP_image_transform enum: + IMAGE_SCALE_X_HP = 0x8155 + IMAGE_SCALE_Y_HP = 0x8156 + IMAGE_TRANSLATE_X_HP = 0x8157 + IMAGE_TRANSLATE_Y_HP = 0x8158 + IMAGE_ROTATE_ANGLE_HP = 0x8159 + IMAGE_ROTATE_ORIGIN_X_HP = 0x815A + IMAGE_ROTATE_ORIGIN_Y_HP = 0x815B + IMAGE_MAG_FILTER_HP = 0x815C + IMAGE_MIN_FILTER_HP = 0x815D + IMAGE_CUBIC_WEIGHT_HP = 0x815E + CUBIC_HP = 0x815F + AVERAGE_HP = 0x8160 + IMAGE_TRANSFORM_2D_HP = 0x8161 + POST_IMAGE_TRANSFORM_COLOR_TABLE_HP = 0x8162 + PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP = 0x8163 + +############################################################################### + +# Extension #67 +HP_convolution_border_modes enum: + IGNORE_BORDER_HP = 0x8150 + CONSTANT_BORDER_HP = 0x8151 + REPLICATE_BORDER_HP = 0x8153 + CONVOLUTION_BORDER_COLOR_HP = 0x8154 + +############################################################################### + +# Extension #68 +# (Unknown token values???) +INGR_palette_buffer enum: + +############################################################################### + +# Extension #69 +SGIX_texture_add_env enum: + TEXTURE_ENV_BIAS_SGIX = 0x80BE + +############################################################################### + +# Extension #70 - skipped +# Extension #71 - skipped +# Extension #72 - skipped +# Extension #73 - skipped + +############################################################################### + +# No new tokens +# Extension #74 +EXT_color_subtable enum: + +############################################################################### + +# Extension #75 - GLU_EXT_object_space_tess + +############################################################################### + +# Extension #76 +PGI_vertex_hints enum: + VERTEX_DATA_HINT_PGI = 0x1A22A + VERTEX_CONSISTENT_HINT_PGI = 0x1A22B + MATERIAL_SIDE_HINT_PGI = 0x1A22C + MAX_VERTEX_HINT_PGI = 0x1A22D + COLOR3_BIT_PGI = 0x00010000 + COLOR4_BIT_PGI = 0x00020000 + EDGEFLAG_BIT_PGI = 0x00040000 + INDEX_BIT_PGI = 0x00080000 + MAT_AMBIENT_BIT_PGI = 0x00100000 + MAT_AMBIENT_AND_DIFFUSE_BIT_PGI = 0x00200000 + MAT_DIFFUSE_BIT_PGI = 0x00400000 + MAT_EMISSION_BIT_PGI = 0x00800000 + MAT_COLOR_INDEXES_BIT_PGI = 0x01000000 + MAT_SHININESS_BIT_PGI = 0x02000000 + MAT_SPECULAR_BIT_PGI = 0x04000000 + NORMAL_BIT_PGI = 0x08000000 + TEXCOORD1_BIT_PGI = 0x10000000 + TEXCOORD2_BIT_PGI = 0x20000000 + TEXCOORD3_BIT_PGI = 0x40000000 + TEXCOORD4_BIT_PGI = 0x80000000 + VERTEX23_BIT_PGI = 0x00000004 + VERTEX4_BIT_PGI = 0x00000008 + +############################################################################### + +# Extension #77 +PGI_misc_hints enum: + PREFER_DOUBLEBUFFER_HINT_PGI = 0x1A1F8 + CONSERVE_MEMORY_HINT_PGI = 0x1A1FD + RECLAIM_MEMORY_HINT_PGI = 0x1A1FE + NATIVE_GRAPHICS_HANDLE_PGI = 0x1A202 + NATIVE_GRAPHICS_BEGIN_HINT_PGI = 0x1A203 + NATIVE_GRAPHICS_END_HINT_PGI = 0x1A204 + ALWAYS_FAST_HINT_PGI = 0x1A20C + ALWAYS_SOFT_HINT_PGI = 0x1A20D + ALLOW_DRAW_OBJ_HINT_PGI = 0x1A20E + ALLOW_DRAW_WIN_HINT_PGI = 0x1A20F + ALLOW_DRAW_FRG_HINT_PGI = 0x1A210 + ALLOW_DRAW_MEM_HINT_PGI = 0x1A211 + STRICT_DEPTHFUNC_HINT_PGI = 0x1A216 + STRICT_LIGHTING_HINT_PGI = 0x1A217 + STRICT_SCISSOR_HINT_PGI = 0x1A218 + FULL_STIPPLE_HINT_PGI = 0x1A219 + CLIP_NEAR_HINT_PGI = 0x1A220 + CLIP_FAR_HINT_PGI = 0x1A221 + WIDE_LINE_HINT_PGI = 0x1A222 + BACK_NORMALS_HINT_PGI = 0x1A223 + +############################################################################### + +# Extension #78 +EXT_paletted_texture enum: + COLOR_INDEX1_EXT = 0x80E2 + COLOR_INDEX2_EXT = 0x80E3 + COLOR_INDEX4_EXT = 0x80E4 + COLOR_INDEX8_EXT = 0x80E5 + COLOR_INDEX12_EXT = 0x80E6 + COLOR_INDEX16_EXT = 0x80E7 + TEXTURE_INDEX_SIZE_EXT = 0x80ED + +############################################################################### + +# Extension #79 +EXT_clip_volume_hint enum: + CLIP_VOLUME_CLIPPING_HINT_EXT = 0x80F0 + +############################################################################### + +# Extension #80 +SGIX_list_priority enum: + LIST_PRIORITY_SGIX = 0x8182 + +############################################################################### + +# Extension #81 +SGIX_ir_instrument1 enum: + IR_INSTRUMENT1_SGIX = 0x817F # 1 I + +############################################################################### + +# Extension #82 +SGIX_calligraphic_fragment enum: + CALLIGRAPHIC_FRAGMENT_SGIX = 0x8183 # 1 I + +############################################################################### + +# Extension #83 - GLX_SGIX_video_resize + +############################################################################### + +# Extension #84 +SGIX_texture_lod_bias enum: + TEXTURE_LOD_BIAS_S_SGIX = 0x818E + TEXTURE_LOD_BIAS_T_SGIX = 0x818F + TEXTURE_LOD_BIAS_R_SGIX = 0x8190 + +############################################################################### + +# Extension #85 - skipped + +############################################################################### + +# Extension #86 - GLX_SGIX_dmbuffer + +############################################################################### + +# Extension #87 - skipped +# Extension #88 - skipped +# Extension #89 - skipped + +############################################################################### + +# Extension #90 +SGIX_shadow_ambient enum: + SHADOW_AMBIENT_SGIX = 0x80BF + +############################################################################### + +# Extension #91 - GLX_SGIX_swap_group +# Extension #92 - GLX_SGIX_swap_barrier + +############################################################################### + +# No new tokens +# Extension #93 +EXT_index_texture enum: + +############################################################################### + +# Extension #94 +# Promoted from SGI? +EXT_index_material enum: + INDEX_MATERIAL_EXT = 0x81B8 + INDEX_MATERIAL_PARAMETER_EXT = 0x81B9 + INDEX_MATERIAL_FACE_EXT = 0x81BA + +############################################################################### + +# Extension #95 +# Promoted from SGI? +EXT_index_func enum: + INDEX_TEST_EXT = 0x81B5 + INDEX_TEST_FUNC_EXT = 0x81B6 + INDEX_TEST_REF_EXT = 0x81B7 + +############################################################################### + +# Extension #96 +# Promoted from SGI? +EXT_index_array_formats enum: + IUI_V2F_EXT = 0x81AD + IUI_V3F_EXT = 0x81AE + IUI_N3F_V2F_EXT = 0x81AF + IUI_N3F_V3F_EXT = 0x81B0 + T2F_IUI_V2F_EXT = 0x81B1 + T2F_IUI_V3F_EXT = 0x81B2 + T2F_IUI_N3F_V2F_EXT = 0x81B3 + T2F_IUI_N3F_V3F_EXT = 0x81B4 + +############################################################################### + +# Extension #97 +# Promoted from SGI? +EXT_compiled_vertex_array enum: + ARRAY_ELEMENT_LOCK_FIRST_EXT = 0x81A8 + ARRAY_ELEMENT_LOCK_COUNT_EXT = 0x81A9 + +############################################################################### + +# Extension #98 +# Promoted from SGI? +EXT_cull_vertex enum: + CULL_VERTEX_EXT = 0x81AA + CULL_VERTEX_EYE_POSITION_EXT = 0x81AB + CULL_VERTEX_OBJECT_POSITION_EXT = 0x81AC + +############################################################################### + +# Extension #99 - skipped + +############################################################################### + +# Extension #100 - GLU_EXT_nurbs_tessellator + +############################################################################### + +# Extension #101 +SGIX_ycrcb enum: + YCRCB_422_SGIX = 0x81BB + YCRCB_444_SGIX = 0x81BC + +############################################################################### + +# Extension #102 +SGIX_fragment_lighting enum: + FRAGMENT_LIGHTING_SGIX = 0x8400 # 1 I + FRAGMENT_COLOR_MATERIAL_SGIX = 0x8401 # 1 I + FRAGMENT_COLOR_MATERIAL_FACE_SGIX = 0x8402 # 1 I + FRAGMENT_COLOR_MATERIAL_PARAMETER_SGIX = 0x8403 # 1 I + MAX_FRAGMENT_LIGHTS_SGIX = 0x8404 # 1 I + MAX_ACTIVE_LIGHTS_SGIX = 0x8405 # 1 I + CURRENT_RASTER_NORMAL_SGIX = 0x8406 # 1 I + LIGHT_ENV_MODE_SGIX = 0x8407 # 1 I + FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX = 0x8408 # 1 I + FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX = 0x8409 # 1 I + FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX = 0x840A # 4 F + FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX = 0x840B # 1 I + FRAGMENT_LIGHT0_SGIX = 0x840C # 1 I + FRAGMENT_LIGHT1_SGIX = 0x840D + FRAGMENT_LIGHT2_SGIX = 0x840E + FRAGMENT_LIGHT3_SGIX = 0x840F + FRAGMENT_LIGHT4_SGIX = 0x8410 + FRAGMENT_LIGHT5_SGIX = 0x8411 + FRAGMENT_LIGHT6_SGIX = 0x8412 + FRAGMENT_LIGHT7_SGIX = 0x8413 + +############################################################################### + +# Extension #103 - skipped +# Extension #104 - skipped +# Extension #105 - skipped +# Extension #106 - skipped +# Extension #107 - skipped +# Extension #108 - skipped +# Extension #109 - skipped + +############################################################################### + +# Extension #110 +IBM_rasterpos_clip enum: + RASTER_POSITION_UNCLIPPED_IBM = 0x19262 + +############################################################################### + +# Extension #111 +HP_texture_lighting enum: + TEXTURE_LIGHTING_MODE_HP = 0x8167 + TEXTURE_POST_SPECULAR_HP = 0x8168 + TEXTURE_PRE_SPECULAR_HP = 0x8169 + +############################################################################### + +# Extension #112 +EXT_draw_range_elements enum: + MAX_ELEMENTS_VERTICES_EXT = 0x80E8 + MAX_ELEMENTS_INDICES_EXT = 0x80E9 + +############################################################################### + +# Extension #113 +WIN_phong_shading enum: + PHONG_WIN = 0x80EA + PHONG_HINT_WIN = 0x80EB + +############################################################################### + +# Extension #114 +WIN_specular_fog enum: + FOG_SPECULAR_TEXTURE_WIN = 0x80EC + +############################################################################### + +# Extension #115 - skipped +# Extension #116 - skipped + +############################################################################### + +# Extension #117 +EXT_light_texture enum: + FRAGMENT_MATERIAL_EXT = 0x8349 + FRAGMENT_NORMAL_EXT = 0x834A + FRAGMENT_COLOR_EXT = 0x834C + ATTENUATION_EXT = 0x834D + SHADOW_ATTENUATION_EXT = 0x834E + TEXTURE_APPLICATION_MODE_EXT = 0x834F # 1 I + TEXTURE_LIGHT_EXT = 0x8350 # 1 I + TEXTURE_MATERIAL_FACE_EXT = 0x8351 # 1 I + TEXTURE_MATERIAL_PARAMETER_EXT = 0x8352 # 1 I + use EXT_fog_coord FRAGMENT_DEPTH_EXT + +############################################################################### + +# Extension #118 - skipped + +############################################################################### + +# Extension #119 +SGIX_blend_alpha_minmax enum: + ALPHA_MIN_SGIX = 0x8320 + ALPHA_MAX_SGIX = 0x8321 + +############################################################################### + +# Extension #120 - skipped +# Extension #121 - skipped +# Extension #122 - skipped +# Extension #123 - skipped +# Extension #124 - skipped +# Extension #125 - skipped + +############################################################################### + +# Extension #126 +SGIX_impact_pixel_texture enum: + PIXEL_TEX_GEN_Q_CEILING_SGIX = 0x8184 + PIXEL_TEX_GEN_Q_ROUND_SGIX = 0x8185 + PIXEL_TEX_GEN_Q_FLOOR_SGIX = 0x8186 + PIXEL_TEX_GEN_ALPHA_REPLACE_SGIX = 0x8187 + PIXEL_TEX_GEN_ALPHA_NO_REPLACE_SGIX = 0x8188 + PIXEL_TEX_GEN_ALPHA_LS_SGIX = 0x8189 + PIXEL_TEX_GEN_ALPHA_MS_SGIX = 0x818A + +############################################################################### + +# Extension #127 - skipped +# Extension #128 - skipped + +############################################################################### + +# Extension #129 +EXT_bgra enum: + BGR_EXT = 0x80E0 + BGRA_EXT = 0x80E1 + +############################################################################### + +# Extension #130 - skipped +# Extension #131 - skipped + +############################################################################### + +# Extension #132 +SGIX_async enum: + ASYNC_MARKER_SGIX = 0x8329 + +############################################################################### + +# Extension #133 +SGIX_async_pixel enum: + ASYNC_TEX_IMAGE_SGIX = 0x835C + ASYNC_DRAW_PIXELS_SGIX = 0x835D + ASYNC_READ_PIXELS_SGIX = 0x835E + MAX_ASYNC_TEX_IMAGE_SGIX = 0x835F + MAX_ASYNC_DRAW_PIXELS_SGIX = 0x8360 + MAX_ASYNC_READ_PIXELS_SGIX = 0x8361 + +############################################################################### + +# Extension #134 +SGIX_async_histogram enum: + ASYNC_HISTOGRAM_SGIX = 0x832C + MAX_ASYNC_HISTOGRAM_SGIX = 0x832D + +############################################################################### + +# Intel has not implemented this; enums never assigned +# Extension #135 +INTEL_texture_scissor enum: +# TEXTURE_SCISSOR_INTEL = 0x???? +# TEXTURE_SCISSOR_INTEL = 0x???? +# TEXTURE_SCISSOR_FUNC_INTEL = 0x???? +# TEXTURE_SCISSOR_S_INTEL = 0x???? +# TEXTURE_SCISSOR_T_INTEL = 0x???? +# TEXTURE_SCISSOR_R_INTEL = 0x???? + +############################################################################### + +# Extension #136 +INTEL_parallel_arrays enum: + PARALLEL_ARRAYS_INTEL = 0x83F4 + VERTEX_ARRAY_PARALLEL_POINTERS_INTEL = 0x83F5 + NORMAL_ARRAY_PARALLEL_POINTERS_INTEL = 0x83F6 + COLOR_ARRAY_PARALLEL_POINTERS_INTEL = 0x83F7 + TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL = 0x83F8 + +############################################################################### + +# Extension #137 +HP_occlusion_test enum: + OCCLUSION_TEST_HP = 0x8165 + OCCLUSION_TEST_RESULT_HP = 0x8166 + +############################################################################### + +# Extension #138 +EXT_pixel_transform enum: + PIXEL_TRANSFORM_2D_EXT = 0x8330 + PIXEL_MAG_FILTER_EXT = 0x8331 + PIXEL_MIN_FILTER_EXT = 0x8332 + PIXEL_CUBIC_WEIGHT_EXT = 0x8333 + CUBIC_EXT = 0x8334 + AVERAGE_EXT = 0x8335 + PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT = 0x8336 + MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT = 0x8337 + PIXEL_TRANSFORM_2D_MATRIX_EXT = 0x8338 + +############################################################################### + +# Unknown enum values +# Extension #139 +EXT_pixel_transform_color_table enum: + +# PIXEL_TRANSFORM_COLOR_TABLE_EXT +# PROXY_PIXEL_TRANSFORM_COLOR_TABLE_EXT + +############################################################################### + +# Extension #140 - skipped + +############################################################################### + +# Extension #141 +EXT_shared_texture_palette enum: + SHARED_TEXTURE_PALETTE_EXT = 0x81FB + +############################################################################### + +# Extension #142 - GLX_SGIS_blended_overlay + +############################################################################### + +# Extension #143 - SGIS_shared_multisample +# MULTISAMPLE_SUB_RECT_POSITION_SGIS = <TBD> +# MULTISAMPLE_SUB_RECT_DIMS_SGIS = <TBD> + +############################################################################### + +# Extension #144 +EXT_separate_specular_color enum: + LIGHT_MODEL_COLOR_CONTROL_EXT = 0x81F8 + SINGLE_COLOR_EXT = 0x81F9 + SEPARATE_SPECULAR_COLOR_EXT = 0x81FA + +############################################################################### + +# Extension #145 +EXT_secondary_color enum: + COLOR_SUM_EXT = 0x8458 # 1 I + CURRENT_SECONDARY_COLOR_EXT = 0x8459 # 3 F + SECONDARY_COLOR_ARRAY_SIZE_EXT = 0x845A # 1 I + SECONDARY_COLOR_ARRAY_TYPE_EXT = 0x845B # 1 I + SECONDARY_COLOR_ARRAY_STRIDE_EXT = 0x845C # 1 I + SECONDARY_COLOR_ARRAY_POINTER_EXT = 0x845D + SECONDARY_COLOR_ARRAY_EXT = 0x845E # 1 I + +############################################################################### + +# Dead extension - EXT_texture_env_combine was finished instead +# Extension #146 +#EXT_texture_env enum: + +############################################################################### + +# Extension #147 +EXT_texture_perturb_normal enum: + PERTURB_EXT = 0x85AE + TEXTURE_NORMAL_EXT = 0x85AF + +############################################################################### + +# No new tokens +# Extension #148 +# Diamond ships an otherwise identical IBM_multi_draw_arrays extension; +# Dan Brokenshire says this is deprecated and should not be advertised. +EXT_multi_draw_arrays enum: + +############################################################################### + +# Extension #149 +EXT_fog_coord enum: + FOG_COORDINATE_SOURCE_EXT = 0x8450 # 1 I + FOG_COORDINATE_EXT = 0x8451 + FRAGMENT_DEPTH_EXT = 0x8452 + CURRENT_FOG_COORDINATE_EXT = 0x8453 # 1 F + FOG_COORDINATE_ARRAY_TYPE_EXT = 0x8454 # 1 I + FOG_COORDINATE_ARRAY_STRIDE_EXT = 0x8455 # 1 I + FOG_COORDINATE_ARRAY_POINTER_EXT = 0x8456 + FOG_COORDINATE_ARRAY_EXT = 0x8457 # 1 I + +############################################################################### + +# Extension #150 - skipped +# Extension #151 - skipped +# Extension #152 - skipped +# Extension #153 - skipped +# Extension #154 - skipped + +############################################################################### + +# Extension #155 +REND_screen_coordinates enum: + SCREEN_COORDINATES_REND = 0x8490 + INVERTED_SCREEN_W_REND = 0x8491 + +############################################################################### + +# Extension #156 +EXT_coordinate_frame enum: + TANGENT_ARRAY_EXT = 0x8439 + BINORMAL_ARRAY_EXT = 0x843A + CURRENT_TANGENT_EXT = 0x843B + CURRENT_BINORMAL_EXT = 0x843C + TANGENT_ARRAY_TYPE_EXT = 0x843E + TANGENT_ARRAY_STRIDE_EXT = 0x843F + BINORMAL_ARRAY_TYPE_EXT = 0x8440 + BINORMAL_ARRAY_STRIDE_EXT = 0x8441 + TANGENT_ARRAY_POINTER_EXT = 0x8442 + BINORMAL_ARRAY_POINTER_EXT = 0x8443 + MAP1_TANGENT_EXT = 0x8444 + MAP2_TANGENT_EXT = 0x8445 + MAP1_BINORMAL_EXT = 0x8446 + MAP2_BINORMAL_EXT = 0x8447 + +############################################################################### + +# Extension #157 - skipped + +############################################################################### + +# Extension #158 +EXT_texture_env_combine enum: + COMBINE_EXT = 0x8570 + COMBINE_RGB_EXT = 0x8571 + COMBINE_ALPHA_EXT = 0x8572 + RGB_SCALE_EXT = 0x8573 + ADD_SIGNED_EXT = 0x8574 + INTERPOLATE_EXT = 0x8575 + CONSTANT_EXT = 0x8576 + PRIMARY_COLOR_EXT = 0x8577 + PREVIOUS_EXT = 0x8578 + SOURCE0_RGB_EXT = 0x8580 + SOURCE1_RGB_EXT = 0x8581 + SOURCE2_RGB_EXT = 0x8582 + SOURCE0_ALPHA_EXT = 0x8588 + SOURCE1_ALPHA_EXT = 0x8589 + SOURCE2_ALPHA_EXT = 0x858A + OPERAND0_RGB_EXT = 0x8590 + OPERAND1_RGB_EXT = 0x8591 + OPERAND2_RGB_EXT = 0x8592 + OPERAND0_ALPHA_EXT = 0x8598 + OPERAND1_ALPHA_EXT = 0x8599 + OPERAND2_ALPHA_EXT = 0x859A + +############################################################################### + +# Extension #159 +APPLE_specular_vector enum: + LIGHT_MODEL_SPECULAR_VECTOR_APPLE = 0x85B0 + +############################################################################### + +# Extension #160 +APPLE_transform_hint enum: + TRANSFORM_HINT_APPLE = 0x85B1 + +############################################################################### + +# Extension #161 +SGIX_fog_scale enum: + FOG_SCALE_SGIX = 0x81FC + FOG_SCALE_VALUE_SGIX = 0x81FD + +############################################################################### + +# Extension #162 - skipped + +############################################################################### + +# Extension #163 +SUNX_constant_data enum: + UNPACK_CONSTANT_DATA_SUNX = 0x81D5 + TEXTURE_CONSTANT_DATA_SUNX = 0x81D6 + +############################################################################### + +# Extension #164 +SUN_global_alpha enum: + GLOBAL_ALPHA_SUN = 0x81D9 + GLOBAL_ALPHA_FACTOR_SUN = 0x81DA + +############################################################################### + +# Extension #165 +SUN_triangle_list enum: + RESTART_SUN = 0x0001 + REPLACE_MIDDLE_SUN = 0x0002 + REPLACE_OLDEST_SUN = 0x0003 + TRIANGLE_LIST_SUN = 0x81D7 + REPLACEMENT_CODE_SUN = 0x81D8 + REPLACEMENT_CODE_ARRAY_SUN = 0x85C0 + REPLACEMENT_CODE_ARRAY_TYPE_SUN = 0x85C1 + REPLACEMENT_CODE_ARRAY_STRIDE_SUN = 0x85C2 + REPLACEMENT_CODE_ARRAY_POINTER_SUN = 0x85C3 + R1UI_V3F_SUN = 0x85C4 + R1UI_C4UB_V3F_SUN = 0x85C5 + R1UI_C3F_V3F_SUN = 0x85C6 + R1UI_N3F_V3F_SUN = 0x85C7 + R1UI_C4F_N3F_V3F_SUN = 0x85C8 + R1UI_T2F_V3F_SUN = 0x85C9 + R1UI_T2F_N3F_V3F_SUN = 0x85CA + R1UI_T2F_C4F_N3F_V3F_SUN = 0x85CB + +############################################################################### + +# No new tokens +# Extension #166 +SUN_vertex enum: + +############################################################################### + +# Extension #167 - WGL_EXT_display_color_table +# Extension #168 - WGL_EXT_extensions_string +# Extension #169 - WGL_EXT_make_current_read +# Extension #170 - WGL_EXT_pixel_format +# Extension #171 - WGL_EXT_pbuffer +# Extension #172 - WGL_EXT_swap_control + +############################################################################### + +# Extension #173 +EXT_blend_func_separate enum: + BLEND_DST_RGB_EXT = 0x80C8 + BLEND_SRC_RGB_EXT = 0x80C9 + BLEND_DST_ALPHA_EXT = 0x80CA + BLEND_SRC_ALPHA_EXT = 0x80CB + +############################################################################### + +# Extension #174 +INGR_color_clamp enum: + RED_MIN_CLAMP_INGR = 0x8560 + GREEN_MIN_CLAMP_INGR = 0x8561 + BLUE_MIN_CLAMP_INGR = 0x8562 + ALPHA_MIN_CLAMP_INGR = 0x8563 + RED_MAX_CLAMP_INGR = 0x8564 + GREEN_MAX_CLAMP_INGR = 0x8565 + BLUE_MAX_CLAMP_INGR = 0x8566 + ALPHA_MAX_CLAMP_INGR = 0x8567 + +############################################################################### + +# Extension #175 +INGR_interlace_read enum: + INTERLACE_READ_INGR = 0x8568 + +############################################################################### + +# Extension #176 +EXT_stencil_wrap enum: + INCR_WRAP_EXT = 0x8507 + DECR_WRAP_EXT = 0x8508 + +############################################################################### + +# Extension #177 - skipped + +############################################################################### + +# Extension #178 +EXT_422_pixels enum: + 422_EXT = 0x80CC + 422_REV_EXT = 0x80CD + 422_AVERAGE_EXT = 0x80CE + 422_REV_AVERAGE_EXT = 0x80CF + +############################################################################### + +# Extension #179 +NV_texgen_reflection enum: + NORMAL_MAP_NV = 0x8511 + REFLECTION_MAP_NV = 0x8512 + +############################################################################### + +# Extension #180 - skipped +# Extension #181 - skipped + +############################################################################### + +# Is this shipping? No extension number assigned. +# Extension #? +EXT_texture_cube_map enum: + NORMAL_MAP_EXT = 0x8511 + REFLECTION_MAP_EXT = 0x8512 + TEXTURE_CUBE_MAP_EXT = 0x8513 + TEXTURE_BINDING_CUBE_MAP_EXT = 0x8514 + TEXTURE_CUBE_MAP_POSITIVE_X_EXT = 0x8515 + TEXTURE_CUBE_MAP_NEGATIVE_X_EXT = 0x8516 + TEXTURE_CUBE_MAP_POSITIVE_Y_EXT = 0x8517 + TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT = 0x8518 + TEXTURE_CUBE_MAP_POSITIVE_Z_EXT = 0x8519 + TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT = 0x851A + PROXY_TEXTURE_CUBE_MAP_EXT = 0x851B + MAX_CUBE_MAP_TEXTURE_SIZE_EXT = 0x851C + +############################################################################### + +# Extension #182 +SUN_convolution_border_modes enum: + WRAP_BORDER_SUN = 0x81D4 + +############################################################################### + +# Extension #183 - GLX_SUN_transparent_index + +############################################################################### + +# Extension #184 - skipped + +############################################################################### + +# No new tokens +# Extension #185 +EXT_texture_env_add enum: + +############################################################################### + +# Extension #186 +EXT_texture_lod_bias enum: + MAX_TEXTURE_LOD_BIAS_EXT = 0x84FD + TEXTURE_FILTER_CONTROL_EXT = 0x8500 + TEXTURE_LOD_BIAS_EXT = 0x8501 + +############################################################################### + +# Extension #187 +EXT_texture_filter_anisotropic enum: + TEXTURE_MAX_ANISOTROPY_EXT = 0x84FE + MAX_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FF + +############################################################################### + +# Extension #188 +EXT_vertex_weighting enum: + MODELVIEW0_STACK_DEPTH_EXT = GL_MODELVIEW_STACK_DEPTH + MODELVIEW1_STACK_DEPTH_EXT = 0x8502 + MODELVIEW0_MATRIX_EXT = GL_MODELVIEW_MATRIX + MODELVIEW1_MATRIX_EXT = 0x8506 + VERTEX_WEIGHTING_EXT = 0x8509 + MODELVIEW0_EXT = GL_MODELVIEW + MODELVIEW1_EXT = 0x850A + CURRENT_VERTEX_WEIGHT_EXT = 0x850B + VERTEX_WEIGHT_ARRAY_EXT = 0x850C + VERTEX_WEIGHT_ARRAY_SIZE_EXT = 0x850D + VERTEX_WEIGHT_ARRAY_TYPE_EXT = 0x850E + VERTEX_WEIGHT_ARRAY_STRIDE_EXT = 0x850F + VERTEX_WEIGHT_ARRAY_POINTER_EXT = 0x8510 + +############################################################################### + +# Extension #189 +NV_light_max_exponent enum: + MAX_SHININESS_NV = 0x8504 + MAX_SPOT_EXPONENT_NV = 0x8505 + +############################################################################### + +# Extension #190 +NV_vertex_array_range enum: + VERTEX_ARRAY_RANGE_NV = 0x851D + VERTEX_ARRAY_RANGE_LENGTH_NV = 0x851E + VERTEX_ARRAY_RANGE_VALID_NV = 0x851F + MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV = 0x8520 + VERTEX_ARRAY_RANGE_POINTER_NV = 0x8521 + +############################################################################### + +# Extension #191 +NV_register_combiners enum: + REGISTER_COMBINERS_NV = 0x8522 + VARIABLE_A_NV = 0x8523 + VARIABLE_B_NV = 0x8524 + VARIABLE_C_NV = 0x8525 + VARIABLE_D_NV = 0x8526 + VARIABLE_E_NV = 0x8527 + VARIABLE_F_NV = 0x8528 + VARIABLE_G_NV = 0x8529 + CONSTANT_COLOR0_NV = 0x852A + CONSTANT_COLOR1_NV = 0x852B + PRIMARY_COLOR_NV = 0x852C + SECONDARY_COLOR_NV = 0x852D + SPARE0_NV = 0x852E + SPARE1_NV = 0x852F + DISCARD_NV = 0x8530 + E_TIMES_F_NV = 0x8531 + SPARE0_PLUS_SECONDARY_COLOR_NV = 0x8532 + UNSIGNED_IDENTITY_NV = 0x8536 + UNSIGNED_INVERT_NV = 0x8537 + EXPAND_NORMAL_NV = 0x8538 + EXPAND_NEGATE_NV = 0x8539 + HALF_BIAS_NORMAL_NV = 0x853A + HALF_BIAS_NEGATE_NV = 0x853B + SIGNED_IDENTITY_NV = 0x853C + SIGNED_NEGATE_NV = 0x853D + SCALE_BY_TWO_NV = 0x853E + SCALE_BY_FOUR_NV = 0x853F + SCALE_BY_ONE_HALF_NV = 0x8540 + BIAS_BY_NEGATIVE_ONE_HALF_NV = 0x8541 + COMBINER_INPUT_NV = 0x8542 + COMBINER_MAPPING_NV = 0x8543 + COMBINER_COMPONENT_USAGE_NV = 0x8544 + COMBINER_AB_DOT_PRODUCT_NV = 0x8545 + COMBINER_CD_DOT_PRODUCT_NV = 0x8546 + COMBINER_MUX_SUM_NV = 0x8547 + COMBINER_SCALE_NV = 0x8548 + COMBINER_BIAS_NV = 0x8549 + COMBINER_AB_OUTPUT_NV = 0x854A + COMBINER_CD_OUTPUT_NV = 0x854B + COMBINER_SUM_OUTPUT_NV = 0x854C + MAX_GENERAL_COMBINERS_NV = 0x854D + NUM_GENERAL_COMBINERS_NV = 0x854E + COLOR_SUM_CLAMP_NV = 0x854F + COMBINER0_NV = 0x8550 + COMBINER1_NV = 0x8551 + COMBINER2_NV = 0x8552 + COMBINER3_NV = 0x8553 + COMBINER4_NV = 0x8554 + COMBINER5_NV = 0x8555 + COMBINER6_NV = 0x8556 + COMBINER7_NV = 0x8557 + use ARB_multitexture TEXTURE0_ARB + use ARB_multitexture TEXTURE1_ARB + use BlendingFactorDest ZERO + use DrawBufferMode NONE + use GetPName FOG + +############################################################################### + +# Extension #192 +NV_fog_distance enum: + FOG_DISTANCE_MODE_NV = 0x855A + EYE_RADIAL_NV = 0x855B + EYE_PLANE_ABSOLUTE_NV = 0x855C + use TextureGenParameter EYE_PLANE + +############################################################################### + +# Extension #193 +NV_texgen_emboss enum: + EMBOSS_LIGHT_NV = 0x855D + EMBOSS_CONSTANT_NV = 0x855E + EMBOSS_MAP_NV = 0x855F + +############################################################################### + +# No new tokens +# Extension #194 +NV_blend_square enum: + +############################################################################### + +# Extension #195 +NV_texture_env_combine4 enum: + COMBINE4_NV = 0x8503 + SOURCE3_RGB_NV = 0x8583 + SOURCE3_ALPHA_NV = 0x858B + OPERAND3_RGB_NV = 0x8593 + OPERAND3_ALPHA_NV = 0x859B + +############################################################################### + +# No new tokens +# Extension #196 +MESA_resize_buffers enum: + +############################################################################### + +# No new tokens +# Extension #197 +MESA_window_pos enum: + +############################################################################### + +# Extension #198 +EXT_texture_compression_s3tc enum: + COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83F0 + COMPRESSED_RGBA_S3TC_DXT1_EXT = 0x83F1 + COMPRESSED_RGBA_S3TC_DXT3_EXT = 0x83F2 + COMPRESSED_RGBA_S3TC_DXT5_EXT = 0x83F3 + +############################################################################### + +# Extension #199 +IBM_cull_vertex enum: + CULL_VERTEX_IBM = 103050 + +############################################################################### + +# No new tokens +# Extension #200 +IBM_multimode_draw_arrays enum: + +############################################################################### + +# Extension #201 +IBM_vertex_array_lists enum: + VERTEX_ARRAY_LIST_IBM = 103070 + NORMAL_ARRAY_LIST_IBM = 103071 + COLOR_ARRAY_LIST_IBM = 103072 + INDEX_ARRAY_LIST_IBM = 103073 + TEXTURE_COORD_ARRAY_LIST_IBM = 103074 + EDGE_FLAG_ARRAY_LIST_IBM = 103075 + FOG_COORDINATE_ARRAY_LIST_IBM = 103076 + SECONDARY_COLOR_ARRAY_LIST_IBM = 103077 + VERTEX_ARRAY_LIST_STRIDE_IBM = 103080 + NORMAL_ARRAY_LIST_STRIDE_IBM = 103081 + COLOR_ARRAY_LIST_STRIDE_IBM = 103082 + INDEX_ARRAY_LIST_STRIDE_IBM = 103083 + TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM = 103084 + EDGE_FLAG_ARRAY_LIST_STRIDE_IBM = 103085 + FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM = 103086 + SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM = 103087 + +############################################################################### + +# Extension #202 +SGIX_subsample enum: + PACK_SUBSAMPLE_RATE_SGIX = 0x85A0 + UNPACK_SUBSAMPLE_RATE_SGIX = 0x85A1 + PIXEL_SUBSAMPLE_4444_SGIX = 0x85A2 + PIXEL_SUBSAMPLE_2424_SGIX = 0x85A3 + PIXEL_SUBSAMPLE_4242_SGIX = 0x85A4 + +############################################################################### + +# Extension #203 +SGIX_ycrcb_subsample enum: + PACK_SUBSAMPLE_RATE_SGIX = 0x85A0 + UNPACK_SUBSAMPLE_RATE_SGIX = 0x85A1 + PIXEL_SUBSAMPLE_4444_SGIX = 0x85A2 + PIXEL_SUBSAMPLE_2424_SGIX = 0x85A3 + PIXEL_SUBSAMPLE_4242_SGIX = 0x85A4 + +############################################################################### + +# Extension #204 +SGIX_ycrcba enum: + YCRCB_SGIX = 0x8318 + YCRCBA_SGIX = 0x8319 + +############################################################################### + +# Extension #205 +SGI_depth_pass_instrument enum: + DEPTH_PASS_INSTRUMENT_SGIX = 0x8310 + DEPTH_PASS_INSTRUMENT_COUNTERS_SGIX = 0x8311 + DEPTH_PASS_INSTRUMENT_MAX_SGIX = 0x8312 + +############################################################################### + +# Extension #206 +3DFX_texture_compression_FXT1 enum: + COMPRESSED_RGB_FXT1_3DFX = 0x86B0 + COMPRESSED_RGBA_FXT1_3DFX = 0x86B1 + +############################################################################### + +# Extension #207 +3DFX_multisample enum: + MULTISAMPLE_3DFX = 0x86B2 + SAMPLE_BUFFERS_3DFX = 0x86B3 + SAMPLES_3DFX = 0x86B4 + MULTISAMPLE_BIT_3DFX = 0x20000000 + +############################################################################### + +# No new tokens +# Extension #208 +3DFX_tbuffer enum: + +############################################################################### + +# Extension #209 +EXT_multisample enum: + MULTISAMPLE_EXT = 0x809D + SAMPLE_ALPHA_TO_MASK_EXT = 0x809E + SAMPLE_ALPHA_TO_ONE_EXT = 0x809F + SAMPLE_MASK_EXT = 0x80A0 + 1PASS_EXT = 0x80A1 + 2PASS_0_EXT = 0x80A2 + 2PASS_1_EXT = 0x80A3 + 4PASS_0_EXT = 0x80A4 + 4PASS_1_EXT = 0x80A5 + 4PASS_2_EXT = 0x80A6 + 4PASS_3_EXT = 0x80A7 + SAMPLE_BUFFERS_EXT = 0x80A8 # 1 I + SAMPLES_EXT = 0x80A9 # 1 I + SAMPLE_MASK_VALUE_EXT = 0x80AA # 1 F + SAMPLE_MASK_INVERT_EXT = 0x80AB # 1 I + SAMPLE_PATTERN_EXT = 0x80AC # 1 I + MULTISAMPLE_BIT_EXT = 0x20000000 + +############################################################################### + +# Extension #210 +SGIX_vertex_preclip enum: + VERTEX_PRECLIP_SGIX = 0x83EE + VERTEX_PRECLIP_HINT_SGIX = 0x83EF + +############################################################################### + +# Extension #211 +SGIX_convolution_accuracy enum: + CONVOLUTION_HINT_SGIX = 0x8316 # 1 I + +############################################################################### + +# Extension #212 +SGIX_resample enum: + PACK_RESAMPLE_SGIX = 0x842C + UNPACK_RESAMPLE_SGIX = 0x842D + RESAMPLE_REPLICATE_SGIX = 0x842E + RESAMPLE_ZERO_FILL_SGIX = 0x842F + RESAMPLE_DECIMATE_SGIX = 0x8430 + +############################################################################### + +# Extension #213 +SGIS_point_line_texgen enum: + EYE_DISTANCE_TO_POINT_SGIS = 0x81F0 + OBJECT_DISTANCE_TO_POINT_SGIS = 0x81F1 + EYE_DISTANCE_TO_LINE_SGIS = 0x81F2 + OBJECT_DISTANCE_TO_LINE_SGIS = 0x81F3 + EYE_POINT_SGIS = 0x81F4 + OBJECT_POINT_SGIS = 0x81F5 + EYE_LINE_SGIS = 0x81F6 + OBJECT_LINE_SGIS = 0x81F7 + +############################################################################### + +# Extension #214 +SGIS_texture_color_mask enum: + TEXTURE_COLOR_WRITEMASK_SGIS = 0x81EF + +############################################################################### + +# Extension #220 +# Promoted to ARB_texture_env_dot3, enum values changed +EXT_texture_env_dot3 enum: + DOT3_RGB_EXT = 0x8740 + DOT3_RGBA_EXT = 0x8741 + +############################################################################### + +# Extension #221 +ATI_texture_mirror_once enum: + MIRROR_CLAMP_ATI = 0x8742 + MIRROR_CLAMP_TO_EDGE_ATI = 0x8743 + +############################################################################### + +# Extension #222 +NV_fence enum: + ALL_COMPLETED_NV = 0x84F2 + FENCE_STATUS_NV = 0x84F3 + FENCE_CONDITION_NV = 0x84F4 + +############################################################################### + +# Extension #224 +IBM_texture_mirrored_repeat enum: + MIRRORED_REPEAT_IBM = 0x8370 + +############################################################################### + +# Extension #225 +NV_evaluators enum: + EVAL_2D_NV = 0x86C0 + EVAL_TRIANGULAR_2D_NV = 0x86C1 + MAP_TESSELLATION_NV = 0x86C2 + MAP_ATTRIB_U_ORDER_NV = 0x86C3 + MAP_ATTRIB_V_ORDER_NV = 0x86C4 + EVAL_FRACTIONAL_TESSELLATION_NV = 0x86C5 + EVAL_VERTEX_ATTRIB0_NV = 0x86C6 + EVAL_VERTEX_ATTRIB1_NV = 0x86C7 + EVAL_VERTEX_ATTRIB2_NV = 0x86C8 + EVAL_VERTEX_ATTRIB3_NV = 0x86C9 + EVAL_VERTEX_ATTRIB4_NV = 0x86CA + EVAL_VERTEX_ATTRIB5_NV = 0x86CB + EVAL_VERTEX_ATTRIB6_NV = 0x86CC + EVAL_VERTEX_ATTRIB7_NV = 0x86CD + EVAL_VERTEX_ATTRIB8_NV = 0x86CE + EVAL_VERTEX_ATTRIB9_NV = 0x86CF + EVAL_VERTEX_ATTRIB10_NV = 0x86D0 + EVAL_VERTEX_ATTRIB11_NV = 0x86D1 + EVAL_VERTEX_ATTRIB12_NV = 0x86D2 + EVAL_VERTEX_ATTRIB13_NV = 0x86D3 + EVAL_VERTEX_ATTRIB14_NV = 0x86D4 + EVAL_VERTEX_ATTRIB15_NV = 0x86D5 + MAX_MAP_TESSELLATION_NV = 0x86D6 + MAX_RATIONAL_EVAL_ORDER_NV = 0x86D7 + +############################################################################### + +# Extension #226 +NV_packed_depth_stencil enum: + DEPTH_STENCIL_NV = 0x84F9 + UNSIGNED_INT_24_8_NV = 0x84FA + +############################################################################### + +# Extension #227 +NV_register_combiners2 enum: + PER_STAGE_CONSTANTS_NV = 0x8535 + +############################################################################### + +# No new tokens +# Extension #228 +NV_texture_compression_vtc enum: + +############################################################################### + +# Extension #229 +NV_texture_rectangle enum: + TEXTURE_RECTANGLE_NV = 0x84F5 + TEXTURE_BINDING_RECTANGLE_NV = 0x84F6 + PROXY_TEXTURE_RECTANGLE_NV = 0x84F7 + MAX_RECTANGLE_TEXTURE_SIZE_NV = 0x84F8 + +############################################################################### + +# Extension #230 +NV_texture_shader enum: + OFFSET_TEXTURE_RECTANGLE_NV = 0x864C + OFFSET_TEXTURE_RECTANGLE_SCALE_NV = 0x864D + DOT_PRODUCT_TEXTURE_RECTANGLE_NV = 0x864E + RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV = 0x86D9 + UNSIGNED_INT_S8_S8_8_8_NV = 0x86DA + UNSIGNED_INT_8_8_S8_S8_REV_NV = 0x86DB + DSDT_MAG_INTENSITY_NV = 0x86DC + SHADER_CONSISTENT_NV = 0x86DD + TEXTURE_SHADER_NV = 0x86DE + SHADER_OPERATION_NV = 0x86DF + CULL_MODES_NV = 0x86E0 + OFFSET_TEXTURE_MATRIX_NV = 0x86E1 + OFFSET_TEXTURE_SCALE_NV = 0x86E2 + OFFSET_TEXTURE_BIAS_NV = 0x86E3 + OFFSET_TEXTURE_2D_MATRIX_NV = GL_OFFSET_TEXTURE_MATRIX_NV + OFFSET_TEXTURE_2D_SCALE_NV = GL_OFFSET_TEXTURE_SCALE_NV + OFFSET_TEXTURE_2D_BIAS_NV = GL_OFFSET_TEXTURE_BIAS_NV + PREVIOUS_TEXTURE_INPUT_NV = 0x86E4 + CONST_EYE_NV = 0x86E5 + PASS_THROUGH_NV = 0x86E6 + CULL_FRAGMENT_NV = 0x86E7 + OFFSET_TEXTURE_2D_NV = 0x86E8 + DEPENDENT_AR_TEXTURE_2D_NV = 0x86E9 + DEPENDENT_GB_TEXTURE_2D_NV = 0x86EA + DOT_PRODUCT_NV = 0x86EC + DOT_PRODUCT_DEPTH_REPLACE_NV = 0x86ED + DOT_PRODUCT_TEXTURE_2D_NV = 0x86EE + DOT_PRODUCT_TEXTURE_CUBE_MAP_NV = 0x86F0 + DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV = 0x86F1 + DOT_PRODUCT_REFLECT_CUBE_MAP_NV = 0x86F2 + DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV = 0x86F3 + HILO_NV = 0x86F4 + DSDT_NV = 0x86F5 + DSDT_MAG_NV = 0x86F6 + DSDT_MAG_VIB_NV = 0x86F7 + HILO16_NV = 0x86F8 + SIGNED_HILO_NV = 0x86F9 + SIGNED_HILO16_NV = 0x86FA + SIGNED_RGBA_NV = 0x86FB + SIGNED_RGBA8_NV = 0x86FC + SIGNED_RGB_NV = 0x86FE + SIGNED_RGB8_NV = 0x86FF + SIGNED_LUMINANCE_NV = 0x8701 + SIGNED_LUMINANCE8_NV = 0x8702 + SIGNED_LUMINANCE_ALPHA_NV = 0x8703 + SIGNED_LUMINANCE8_ALPHA8_NV = 0x8704 + SIGNED_ALPHA_NV = 0x8705 + SIGNED_ALPHA8_NV = 0x8706 + SIGNED_INTENSITY_NV = 0x8707 + SIGNED_INTENSITY8_NV = 0x8708 + DSDT8_NV = 0x8709 + DSDT8_MAG8_NV = 0x870A + DSDT8_MAG8_INTENSITY8_NV = 0x870B + SIGNED_RGB_UNSIGNED_ALPHA_NV = 0x870C + SIGNED_RGB8_UNSIGNED_ALPHA8_NV = 0x870D + HI_SCALE_NV = 0x870E + LO_SCALE_NV = 0x870F + DS_SCALE_NV = 0x8710 + DT_SCALE_NV = 0x8711 + MAGNITUDE_SCALE_NV = 0x8712 + VIBRANCE_SCALE_NV = 0x8713 + HI_BIAS_NV = 0x8714 + LO_BIAS_NV = 0x8715 + DS_BIAS_NV = 0x8716 + DT_BIAS_NV = 0x8717 + MAGNITUDE_BIAS_NV = 0x8718 + VIBRANCE_BIAS_NV = 0x8719 + TEXTURE_BORDER_VALUES_NV = 0x871A + TEXTURE_HI_SIZE_NV = 0x871B + TEXTURE_LO_SIZE_NV = 0x871C + TEXTURE_DS_SIZE_NV = 0x871D + TEXTURE_DT_SIZE_NV = 0x871E + TEXTURE_MAG_SIZE_NV = 0x871F + +############################################################################### + +# Extension #231 +NV_texture_shader2 enum: + DOT_PRODUCT_TEXTURE_3D_NV = 0x86EF + +############################################################################### + +# Extension #232 +NV_vertex_array_range2 enum: + VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV = 0x8533 + +############################################################################### + +# Extension #233 +NV_vertex_program enum: + VERTEX_PROGRAM_NV = 0x8620 + VERTEX_STATE_PROGRAM_NV = 0x8621 + ATTRIB_ARRAY_SIZE_NV = 0x8623 + ATTRIB_ARRAY_STRIDE_NV = 0x8624 + ATTRIB_ARRAY_TYPE_NV = 0x8625 + CURRENT_ATTRIB_NV = 0x8626 + PROGRAM_LENGTH_NV = 0x8627 + PROGRAM_STRING_NV = 0x8628 + MODELVIEW_PROJECTION_NV = 0x8629 + IDENTITY_NV = 0x862A + INVERSE_NV = 0x862B + TRANSPOSE_NV = 0x862C + INVERSE_TRANSPOSE_NV = 0x862D + MAX_TRACK_MATRIX_STACK_DEPTH_NV = 0x862E + MAX_TRACK_MATRICES_NV = 0x862F + MATRIX0_NV = 0x8630 + MATRIX1_NV = 0x8631 + MATRIX2_NV = 0x8632 + MATRIX3_NV = 0x8633 + MATRIX4_NV = 0x8634 + MATRIX5_NV = 0x8635 + MATRIX6_NV = 0x8636 + MATRIX7_NV = 0x8637 +################## +# +# Reserved: +# +# MATRIX8_NV = 0x8638 +# MATRIX9_NV = 0x8639 +# MATRIX10_NV = 0x863A +# MATRIX11_NV = 0x863B +# MATRIX12_NV = 0x863C +# MATRIX13_NV = 0x863D +# MATRIX14_NV = 0x863E +# MATRIX15_NV = 0x863F +# +################### + CURRENT_MATRIX_STACK_DEPTH_NV = 0x8640 + CURRENT_MATRIX_NV = 0x8641 + VERTEX_PROGRAM_POINT_SIZE_NV = 0x8642 + VERTEX_PROGRAM_TWO_SIDE_NV = 0x8643 + PROGRAM_PARAMETER_NV = 0x8644 + ATTRIB_ARRAY_POINTER_NV = 0x8645 + PROGRAM_TARGET_NV = 0x8646 + PROGRAM_RESIDENT_NV = 0x8647 + TRACK_MATRIX_NV = 0x8648 + TRACK_MATRIX_TRANSFORM_NV = 0x8649 + VERTEX_PROGRAM_BINDING_NV = 0x864A + PROGRAM_ERROR_POSITION_NV = 0x864B + VERTEX_ATTRIB_ARRAY0_NV = 0x8650 + VERTEX_ATTRIB_ARRAY1_NV = 0x8651 + VERTEX_ATTRIB_ARRAY2_NV = 0x8652 + VERTEX_ATTRIB_ARRAY3_NV = 0x8653 + VERTEX_ATTRIB_ARRAY4_NV = 0x8654 + VERTEX_ATTRIB_ARRAY5_NV = 0x8655 + VERTEX_ATTRIB_ARRAY6_NV = 0x8656 + VERTEX_ATTRIB_ARRAY7_NV = 0x8657 + VERTEX_ATTRIB_ARRAY8_NV = 0x8658 + VERTEX_ATTRIB_ARRAY9_NV = 0x8659 + VERTEX_ATTRIB_ARRAY10_NV = 0x865A + VERTEX_ATTRIB_ARRAY11_NV = 0x865B + VERTEX_ATTRIB_ARRAY12_NV = 0x865C + VERTEX_ATTRIB_ARRAY13_NV = 0x865D + VERTEX_ATTRIB_ARRAY14_NV = 0x865E + VERTEX_ATTRIB_ARRAY15_NV = 0x865F + MAP1_VERTEX_ATTRIB0_4_NV = 0x8660 + MAP1_VERTEX_ATTRIB1_4_NV = 0x8661 + MAP1_VERTEX_ATTRIB2_4_NV = 0x8662 + MAP1_VERTEX_ATTRIB3_4_NV = 0x8663 + MAP1_VERTEX_ATTRIB4_4_NV = 0x8664 + MAP1_VERTEX_ATTRIB5_4_NV = 0x8665 + MAP1_VERTEX_ATTRIB6_4_NV = 0x8666 + MAP1_VERTEX_ATTRIB7_4_NV = 0x8667 + MAP1_VERTEX_ATTRIB8_4_NV = 0x8668 + MAP1_VERTEX_ATTRIB9_4_NV = 0x8669 + MAP1_VERTEX_ATTRIB10_4_NV = 0x866A + MAP1_VERTEX_ATTRIB11_4_NV = 0x866B + MAP1_VERTEX_ATTRIB12_4_NV = 0x866C + MAP1_VERTEX_ATTRIB13_4_NV = 0x866D + MAP1_VERTEX_ATTRIB14_4_NV = 0x866E + MAP1_VERTEX_ATTRIB15_4_NV = 0x866F + MAP2_VERTEX_ATTRIB0_4_NV = 0x8670 + MAP2_VERTEX_ATTRIB1_4_NV = 0x8671 + MAP2_VERTEX_ATTRIB2_4_NV = 0x8672 + MAP2_VERTEX_ATTRIB3_4_NV = 0x8673 + MAP2_VERTEX_ATTRIB4_4_NV = 0x8674 + MAP2_VERTEX_ATTRIB5_4_NV = 0x8675 + MAP2_VERTEX_ATTRIB6_4_NV = 0x8676 + MAP2_VERTEX_ATTRIB7_4_NV = 0x8677 + MAP2_VERTEX_ATTRIB8_4_NV = 0x8678 + MAP2_VERTEX_ATTRIB9_4_NV = 0x8679 + MAP2_VERTEX_ATTRIB10_4_NV = 0x867A + MAP2_VERTEX_ATTRIB11_4_NV = 0x867B + MAP2_VERTEX_ATTRIB12_4_NV = 0x867C + MAP2_VERTEX_ATTRIB13_4_NV = 0x867D + MAP2_VERTEX_ATTRIB14_4_NV = 0x867E + MAP2_VERTEX_ATTRIB15_4_NV = 0x867F + +############################################################################### + +# Extension #235 +SGIX_texture_coordinate_clamp enum: + TEXTURE_MAX_CLAMP_S_SGIX = 0x8369 + TEXTURE_MAX_CLAMP_T_SGIX = 0x836A + TEXTURE_MAX_CLAMP_R_SGIX = 0x836B + +############################################################################### + +# Extension #236 +SGIX_scalebias_hint enum: + SCALEBIAS_HINT_SGIX = 0x8322 + +############################################################################### + +# Extension #237 - GLX_OML_swap_method +# Extension #238 - GLX_OML_sync_control + +############################################################################### + +# Extension #239 +OML_interlace enum: + INTERLACE_OML = 0x8980 + INTERLACE_READ_OML = 0x8981 + +############################################################################### + +# Extension #240 +OML_subsample enum: + FORMAT_SUBSAMPLE_24_24_OML = 0x8982 + FORMAT_SUBSAMPLE_244_244_OML = 0x8983 + +############################################################################### + +# Extension #241 +OML_resample enum: + PACK_RESAMPLE_OML = 0x8984 + UNPACK_RESAMPLE_OML = 0x8985 + RESAMPLE_REPLICATE_OML = 0x8986 + RESAMPLE_ZERO_FILL_OML = 0x8987 + RESAMPLE_AVERAGE_OML = 0x8988 + RESAMPLE_DECIMATE_OML = 0x8989 + +############################################################################### + +# Extension #242 - WGL_OML_sync_control + +############################################################################### + +# Extension #243 +NV_copy_depth_to_color enum: + DEPTH_STENCIL_TO_RGBA_NV = 0x886E + DEPTH_STENCIL_TO_BGRA_NV = 0x886F + +############################################################################### + +# Extension #244 +ATI_envmap_bumpmap enum: + BUMP_ROT_MATRIX_ATI = 0x8775 + BUMP_ROT_MATRIX_SIZE_ATI = 0x8776 + BUMP_NUM_TEX_UNITS_ATI = 0x8777 + BUMP_TEX_UNITS_ATI = 0x8778 + DUDV_ATI = 0x8779 + DU8DV8_ATI = 0x877A + BUMP_ENVMAP_ATI = 0x877B + BUMP_TARGET_ATI = 0x877C + +############################################################################### + +# Extension #245 +ATI_fragment_shader enum: + FRAGMENT_SHADER_ATI = 0x8920 + REG_0_ATI = 0x8921 + REG_1_ATI = 0x8922 + REG_2_ATI = 0x8923 + REG_3_ATI = 0x8924 + REG_4_ATI = 0x8925 + REG_5_ATI = 0x8926 + REG_6_ATI = 0x8927 + REG_7_ATI = 0x8928 + REG_8_ATI = 0x8929 + REG_9_ATI = 0x892A + REG_10_ATI = 0x892B + REG_11_ATI = 0x892C + REG_12_ATI = 0x892D + REG_13_ATI = 0x892E + REG_14_ATI = 0x892F + REG_15_ATI = 0x8930 + REG_16_ATI = 0x8931 + REG_17_ATI = 0x8932 + REG_18_ATI = 0x8933 + REG_19_ATI = 0x8934 + REG_20_ATI = 0x8935 + REG_21_ATI = 0x8936 + REG_22_ATI = 0x8937 + REG_23_ATI = 0x8938 + REG_24_ATI = 0x8939 + REG_25_ATI = 0x893A + REG_26_ATI = 0x893B + REG_27_ATI = 0x893C + REG_28_ATI = 0x893D + REG_29_ATI = 0x893E + REG_30_ATI = 0x893F + REG_31_ATI = 0x8940 + CON_0_ATI = 0x8941 + CON_1_ATI = 0x8942 + CON_2_ATI = 0x8943 + CON_3_ATI = 0x8944 + CON_4_ATI = 0x8945 + CON_5_ATI = 0x8946 + CON_6_ATI = 0x8947 + CON_7_ATI = 0x8948 + CON_8_ATI = 0x8949 + CON_9_ATI = 0x894A + CON_10_ATI = 0x894B + CON_11_ATI = 0x894C + CON_12_ATI = 0x894D + CON_13_ATI = 0x894E + CON_14_ATI = 0x894F + CON_15_ATI = 0x8950 + CON_16_ATI = 0x8951 + CON_17_ATI = 0x8952 + CON_18_ATI = 0x8953 + CON_19_ATI = 0x8954 + CON_20_ATI = 0x8955 + CON_21_ATI = 0x8956 + CON_22_ATI = 0x8957 + CON_23_ATI = 0x8958 + CON_24_ATI = 0x8959 + CON_25_ATI = 0x895A + CON_26_ATI = 0x895B + CON_27_ATI = 0x895C + CON_28_ATI = 0x895D + CON_29_ATI = 0x895E + CON_30_ATI = 0x895F + CON_31_ATI = 0x8960 + MOV_ATI = 0x8961 + ADD_ATI = 0x8963 + MUL_ATI = 0x8964 + SUB_ATI = 0x8965 + DOT3_ATI = 0x8966 + DOT4_ATI = 0x8967 + MAD_ATI = 0x8968 + LERP_ATI = 0x8969 + CND_ATI = 0x896A + CND0_ATI = 0x896B + DOT2_ADD_ATI = 0x896C + SECONDARY_INTERPOLATOR_ATI = 0x896D + NUM_FRAGMENT_REGISTERS_ATI = 0x896E + NUM_FRAGMENT_CONSTANTS_ATI = 0x896F + NUM_PASSES_ATI = 0x8970 + NUM_INSTRUCTIONS_PER_PASS_ATI = 0x8971 + NUM_INSTRUCTIONS_TOTAL_ATI = 0x8972 + NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI = 0x8973 + NUM_LOOPBACK_COMPONENTS_ATI = 0x8974 + COLOR_ALPHA_PAIRING_ATI = 0x8975 + SWIZZLE_STR_ATI = 0x8976 + SWIZZLE_STQ_ATI = 0x8977 + SWIZZLE_STR_DR_ATI = 0x8978 + SWIZZLE_STQ_DQ_ATI = 0x8979 + SWIZZLE_STRQ_ATI = 0x897A + SWIZZLE_STRQ_DQ_ATI = 0x897B + RED_BIT_ATI = 0x00000001 + GREEN_BIT_ATI = 0x00000002 + BLUE_BIT_ATI = 0x00000004 + 2X_BIT_ATI = 0x00000001 + 4X_BIT_ATI = 0x00000002 + 8X_BIT_ATI = 0x00000004 + HALF_BIT_ATI = 0x00000008 + QUARTER_BIT_ATI = 0x00000010 + EIGHTH_BIT_ATI = 0x00000020 + SATURATE_BIT_ATI = 0x00000040 + 2X_BIT_ATI = 0x00000001 + COMP_BIT_ATI = 0x00000002 + NEGATE_BIT_ATI = 0x00000004 + BIAS_BIT_ATI = 0x00000008 + +############################################################################### + +# Extension #246 +ATI_pn_triangles enum: + PN_TRIANGLES_ATI = 0x87F0 + MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI = 0x87F1 + PN_TRIANGLES_POINT_MODE_ATI = 0x87F2 + PN_TRIANGLES_NORMAL_MODE_ATI = 0x87F3 + PN_TRIANGLES_TESSELATION_LEVEL_ATI = 0x87F4 + PN_TRIANGLES_POINT_MODE_LINEAR_ATI = 0x87F5 + PN_TRIANGLES_POINT_MODE_CUBIC_ATI = 0x87F6 + PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI = 0x87F7 + PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI = 0x87F8 + +############################################################################### + +# Extension #247 +ATI_vertex_array_object enum: + STATIC_ATI = 0x8760 + DYNAMIC_ATI = 0x8761 + PRESERVE_ATI = 0x8762 + DISCARD_ATI = 0x8763 + OBJECT_BUFFER_SIZE_ATI = 0x8764 + OBJECT_BUFFER_USAGE_ATI = 0x8765 + ARRAY_OBJECT_BUFFER_ATI = 0x8766 + ARRAY_OBJECT_OFFSET_ATI = 0x8767 + +############################################################################### + +# Extension #248 +EXT_vertex_shader enum: + VERTEX_SHADER_EXT = 0x8780 + VERTEX_SHADER_BINDING_EXT = 0x8781 + OP_INDEX_EXT = 0x8782 + OP_NEGATE_EXT = 0x8783 + OP_DOT3_EXT = 0x8784 + OP_DOT4_EXT = 0x8785 + OP_MUL_EXT = 0x8786 + OP_ADD_EXT = 0x8787 + OP_MADD_EXT = 0x8788 + OP_FRAC_EXT = 0x8789 + OP_MAX_EXT = 0x878A + OP_MIN_EXT = 0x878B + OP_SET_GE_EXT = 0x878C + OP_SET_LT_EXT = 0x878D + OP_CLAMP_EXT = 0x878E + OP_FLOOR_EXT = 0x878F + OP_ROUND_EXT = 0x8790 + OP_EXP_BASE_2_EXT = 0x8791 + OP_LOG_BASE_2_EXT = 0x8792 + OP_POWER_EXT = 0x8793 + OP_RECIP_EXT = 0x8794 + OP_RECIP_SQRT_EXT = 0x8795 + OP_SUB_EXT = 0x8796 + OP_CROSS_PRODUCT_EXT = 0x8797 + OP_MULTIPLY_MATRIX_EXT = 0x8798 + OP_MOV_EXT = 0x8799 + OUTPUT_VERTEX_EXT = 0x879A + OUTPUT_COLOR0_EXT = 0x879B + OUTPUT_COLOR1_EXT = 0x879C + OUTPUT_TEXTURE_COORD0_EXT = 0x879D + OUTPUT_TEXTURE_COORD1_EXT = 0x879E + OUTPUT_TEXTURE_COORD2_EXT = 0x879F + OUTPUT_TEXTURE_COORD3_EXT = 0x87A0 + OUTPUT_TEXTURE_COORD4_EXT = 0x87A1 + OUTPUT_TEXTURE_COORD5_EXT = 0x87A2 + OUTPUT_TEXTURE_COORD6_EXT = 0x87A3 + OUTPUT_TEXTURE_COORD7_EXT = 0x87A4 + OUTPUT_TEXTURE_COORD8_EXT = 0x87A5 + OUTPUT_TEXTURE_COORD9_EXT = 0x87A6 + OUTPUT_TEXTURE_COORD10_EXT = 0x87A7 + OUTPUT_TEXTURE_COORD11_EXT = 0x87A8 + OUTPUT_TEXTURE_COORD12_EXT = 0x87A9 + OUTPUT_TEXTURE_COORD13_EXT = 0x87AA + OUTPUT_TEXTURE_COORD14_EXT = 0x87AB + OUTPUT_TEXTURE_COORD15_EXT = 0x87AC + OUTPUT_TEXTURE_COORD16_EXT = 0x87AD + OUTPUT_TEXTURE_COORD17_EXT = 0x87AE + OUTPUT_TEXTURE_COORD18_EXT = 0x87AF + OUTPUT_TEXTURE_COORD19_EXT = 0x87B0 + OUTPUT_TEXTURE_COORD20_EXT = 0x87B1 + OUTPUT_TEXTURE_COORD21_EXT = 0x87B2 + OUTPUT_TEXTURE_COORD22_EXT = 0x87B3 + OUTPUT_TEXTURE_COORD23_EXT = 0x87B4 + OUTPUT_TEXTURE_COORD24_EXT = 0x87B5 + OUTPUT_TEXTURE_COORD25_EXT = 0x87B6 + OUTPUT_TEXTURE_COORD26_EXT = 0x87B7 + OUTPUT_TEXTURE_COORD27_EXT = 0x87B8 + OUTPUT_TEXTURE_COORD28_EXT = 0x87B9 + OUTPUT_TEXTURE_COORD29_EXT = 0x87BA + OUTPUT_TEXTURE_COORD30_EXT = 0x87BB + OUTPUT_TEXTURE_COORD31_EXT = 0x87BC + OUTPUT_FOG_EXT = 0x87BD + SCALAR_EXT = 0x87BE + VECTOR_EXT = 0x87BF + MATRIX_EXT = 0x87C0 + VARIANT_EXT = 0x87C1 + INVARIANT_EXT = 0x87C2 + LOCAL_CONSTANT_EXT = 0x87C3 + LOCAL_EXT = 0x87C4 + MAX_VERTEX_SHADER_INSTRUCTIONS_EXT = 0x87C5 + MAX_VERTEX_SHADER_VARIANTS_EXT = 0x87C6 + MAX_VERTEX_SHADER_INVARIANTS_EXT = 0x87C7 + MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT = 0x87C8 + MAX_VERTEX_SHADER_LOCALS_EXT = 0x87C9 + MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT = 0x87CA + MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT = 0x87CB + MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT = 0x87CC + MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT = 0x87CD + MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT = 0x87CE + VERTEX_SHADER_INSTRUCTIONS_EXT = 0x87CF + VERTEX_SHADER_VARIANTS_EXT = 0x87D0 + VERTEX_SHADER_INVARIANTS_EXT = 0x87D1 + VERTEX_SHADER_LOCAL_CONSTANTS_EXT = 0x87D2 + VERTEX_SHADER_LOCALS_EXT = 0x87D3 + VERTEX_SHADER_OPTIMIZED_EXT = 0x87D4 + X_EXT = 0x87D5 + Y_EXT = 0x87D6 + Z_EXT = 0x87D7 + W_EXT = 0x87D8 + NEGATIVE_X_EXT = 0x87D9 + NEGATIVE_Y_EXT = 0x87DA + NEGATIVE_Z_EXT = 0x87DB + NEGATIVE_W_EXT = 0x87DC + ZERO_EXT = 0x87DD + ONE_EXT = 0x87DE + NEGATIVE_ONE_EXT = 0x87DF + NORMALIZED_RANGE_EXT = 0x87E0 + FULL_RANGE_EXT = 0x87E1 + CURRENT_VERTEX_EXT = 0x87E2 + MVP_MATRIX_EXT = 0x87E3 + VARIANT_VALUE_EXT = 0x87E4 + VARIANT_DATATYPE_EXT = 0x87E5 + VARIANT_ARRAY_STRIDE_EXT = 0x87E6 + VARIANT_ARRAY_TYPE_EXT = 0x87E7 + VARIANT_ARRAY_EXT = 0x87E8 + VARIANT_ARRAY_POINTER_EXT = 0x87E9 + INVARIANT_VALUE_EXT = 0x87EA + INVARIANT_DATATYPE_EXT = 0x87EB + LOCAL_CONSTANT_VALUE_EXT = 0x87EC + LOCAL_CONSTANT_DATATYPE_EXT = 0x87ED + +############################################################################### + +# Extension #249 +ATI_vertex_streams enum: + MAX_VERTEX_STREAMS_ATI = 0x876B + VERTEX_STREAM0_ATI = 0x876C + VERTEX_STREAM1_ATI = 0x876D + VERTEX_STREAM2_ATI = 0x876E + VERTEX_STREAM3_ATI = 0x876F + VERTEX_STREAM4_ATI = 0x8770 + VERTEX_STREAM5_ATI = 0x8771 + VERTEX_STREAM6_ATI = 0x8772 + VERTEX_STREAM7_ATI = 0x8773 + VERTEX_SOURCE_ATI = 0x8774 + +############################################################################### + +# Extension #250 - WGL_I3D_digital_video_control +# Extension #251 - WGL_I3D_gamma +# Extension #252 - WGL_I3D_genlock +# Extension #253 - WGL_I3D_image_buffer +# Extension #254 - WGL_I3D_swap_frame_lock +# Extension #255 - WGL_I3D_swap_frame_usage + +############################################################################### + +# Extension #256 +ATI_element_array enum: + ELEMENT_ARRAY_ATI = 0x8768 + ELEMENT_ARRAY_TYPE_ATI = 0x8769 + ELEMENT_ARRAY_POINTER_ATI = 0x876A + +############################################################################### + +# Extension #257 +SUN_mesh_array enum: + QUAD_MESH_SUN = 0x8614 + TRIANGLE_MESH_SUN = 0x8615 + +############################################################################### + +# Extension #258 +SUN_slice_accum enum: + SLICE_ACCUM_SUN = 0x85CC + +############################################################################### + +# Extension #259 +NV_multisample_filter_hint enum: + MULTISAMPLE_FILTER_HINT_NV = 0x8534 + +############################################################################### + +# Extension #260 +NV_depth_clamp enum: + DEPTH_CLAMP_NV = 0x864F + +############################################################################### + +# Extension #261 +NV_occlusion_query enum: + PIXEL_COUNTER_BITS_NV = 0x8864 + CURRENT_OCCLUSION_QUERY_ID_NV = 0x8865 + PIXEL_COUNT_NV = 0x8866 + PIXEL_COUNT_AVAILABLE_NV = 0x8867 + +############################################################################### + +# Extension #262 +NV_point_sprite enum: + POINT_SPRITE_NV = 0x8861 + COORD_REPLACE_NV = 0x8862 + POINT_SPRITE_R_MODE_NV = 0x8863 + +############################################################################### + +# Extension #263 - WGL_NV_render_depth_texture +# Extension #264 - WGL_NV_render_texture_rectangle + +############################################################################### + +# Extension #265 +NV_texture_shader3 enum: + OFFSET_PROJECTIVE_TEXTURE_2D_NV = 0x8850 + OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV = 0x8851 + OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV = 0x8852 + OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV = 0x8853 + OFFSET_HILO_TEXTURE_2D_NV = 0x8854 + OFFSET_HILO_TEXTURE_RECTANGLE_NV = 0x8855 + OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV = 0x8856 + OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV = 0x8857 + DEPENDENT_HILO_TEXTURE_2D_NV = 0x8858 + DEPENDENT_RGB_TEXTURE_3D_NV = 0x8859 + DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV = 0x885A + DOT_PRODUCT_PASS_THROUGH_NV = 0x885B + DOT_PRODUCT_TEXTURE_1D_NV = 0x885C + DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV = 0x885D + HILO8_NV = 0x885E + SIGNED_HILO8_NV = 0x885F + FORCE_BLUE_TO_ONE_NV = 0x8860 + +############################################################################### + +# No new tokens +# Extension #266 +NV_vertex_program1_1 enum: + +############################################################################### + +# No new tokens +# Extension #267 +EXT_shadow_funcs enum: + +############################################################################### + +# Extension #268 +EXT_stencil_two_side enum: + STENCIL_TEST_TWO_SIDE_EXT = 0x8910 + ACTIVE_STENCIL_FACE_EXT = 0x8911 + +############################################################################### + +# Extension #269 +ATI_text_fragment_shader enum: + TEXT_FRAGMENT_SHADER_ATI = 0x8200 + +############################################################################### + +# Extension #270 +APPLE_client_storage enum: + UNPACK_CLIENT_STORAGE_APPLE = 0x85B2 + +############################################################################### + +# Extension #271 +# (extends ATI_element_array???) +APPLE_element_array enum: + ELEMENT_ARRAY_APPLE = 0x8768 + ELEMENT_ARRAY_TYPE_APPLE = 0x8769 + ELEMENT_ARRAY_POINTER_APPLE = 0x876A + +############################################################################### + +# Extension #272 +# ??? BUFFER_OBJECT_APPLE appears to be part of the shipping extension, +# but is not in the spec in the registry. Also appears in +# APPLE_object_purgeable below. +APPLE_fence enum: + DRAW_PIXELS_APPLE = 0x8A0A + FENCE_APPLE = 0x8A0B + +############################################################################### + +# Extension #273 +APPLE_vertex_array_object enum: + VERTEX_ARRAY_BINDING_APPLE = 0x85B5 + +############################################################################### + +# Extension #274 +# (How does this interact with NV_vertex_array_range???) +APPLE_vertex_array_range enum: + VERTEX_ARRAY_RANGE_APPLE = 0x851D + VERTEX_ARRAY_RANGE_LENGTH_APPLE = 0x851E + VERTEX_ARRAY_STORAGE_HINT_APPLE = 0x851F + VERTEX_ARRAY_RANGE_POINTER_APPLE = 0x8521 + STORAGE_CACHED_APPLE = 0x85BE + STORAGE_SHARED_APPLE = 0x85BF + +############################################################################### + +# Extension #275 +APPLE_ycbcr_422 enum: + YCBCR_422_APPLE = 0x85B9 + UNSIGNED_SHORT_8_8_APPLE = 0x85BA + UNSIGNED_SHORT_8_8_REV_APPLE = 0x85BB + +############################################################################### + +# Extension #276 +S3_s3tc enum: + RGB_S3TC = 0x83A0 + RGB4_S3TC = 0x83A1 + RGBA_S3TC = 0x83A2 + RGBA4_S3TC = 0x83A3 + +############################################################################### + +# Extension #277 +ATI_draw_buffers enum: + MAX_DRAW_BUFFERS_ATI = 0x8824 + DRAW_BUFFER0_ATI = 0x8825 + DRAW_BUFFER1_ATI = 0x8826 + DRAW_BUFFER2_ATI = 0x8827 + DRAW_BUFFER3_ATI = 0x8828 + DRAW_BUFFER4_ATI = 0x8829 + DRAW_BUFFER5_ATI = 0x882A + DRAW_BUFFER6_ATI = 0x882B + DRAW_BUFFER7_ATI = 0x882C + DRAW_BUFFER8_ATI = 0x882D + DRAW_BUFFER9_ATI = 0x882E + DRAW_BUFFER10_ATI = 0x882F + DRAW_BUFFER11_ATI = 0x8830 + DRAW_BUFFER12_ATI = 0x8831 + DRAW_BUFFER13_ATI = 0x8832 + DRAW_BUFFER14_ATI = 0x8833 + DRAW_BUFFER15_ATI = 0x8834 + +############################################################################### + +# Extension #278 +# This is really a WGL extension, but if defined there are +# some associated GL enumerants. +ATI_pixel_format_float enum: + TYPE_RGBA_FLOAT_ATI = 0x8820 + COLOR_CLEAR_UNCLAMPED_VALUE_ATI = 0x8835 + +############################################################################### + +# Extension #279 +ATI_texture_env_combine3 enum: + MODULATE_ADD_ATI = 0x8744 + MODULATE_SIGNED_ADD_ATI = 0x8745 + MODULATE_SUBTRACT_ATI = 0x8746 + +############################################################################### + +# Extension #280 +ATI_texture_float enum: + RGBA_FLOAT32_ATI = 0x8814 + RGB_FLOAT32_ATI = 0x8815 + ALPHA_FLOAT32_ATI = 0x8816 + INTENSITY_FLOAT32_ATI = 0x8817 + LUMINANCE_FLOAT32_ATI = 0x8818 + LUMINANCE_ALPHA_FLOAT32_ATI = 0x8819 + RGBA_FLOAT16_ATI = 0x881A + RGB_FLOAT16_ATI = 0x881B + ALPHA_FLOAT16_ATI = 0x881C + INTENSITY_FLOAT16_ATI = 0x881D + LUMINANCE_FLOAT16_ATI = 0x881E + LUMINANCE_ALPHA_FLOAT16_ATI = 0x881F + +############################################################################### + +# Extension #281 (also WGL_NV_float_buffer) +NV_float_buffer enum: + FLOAT_R_NV = 0x8880 + FLOAT_RG_NV = 0x8881 + FLOAT_RGB_NV = 0x8882 + FLOAT_RGBA_NV = 0x8883 + FLOAT_R16_NV = 0x8884 + FLOAT_R32_NV = 0x8885 + FLOAT_RG16_NV = 0x8886 + FLOAT_RG32_NV = 0x8887 + FLOAT_RGB16_NV = 0x8888 + FLOAT_RGB32_NV = 0x8889 + FLOAT_RGBA16_NV = 0x888A + FLOAT_RGBA32_NV = 0x888B + TEXTURE_FLOAT_COMPONENTS_NV = 0x888C + FLOAT_CLEAR_COLOR_VALUE_NV = 0x888D + FLOAT_RGBA_MODE_NV = 0x888E + +############################################################################### + +# Extension #282 +NV_fragment_program enum: + MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV = 0x8868 + FRAGMENT_PROGRAM_NV = 0x8870 + MAX_TEXTURE_COORDS_NV = 0x8871 + MAX_TEXTURE_IMAGE_UNITS_NV = 0x8872 + FRAGMENT_PROGRAM_BINDING_NV = 0x8873 + PROGRAM_ERROR_STRING_NV = 0x8874 + +############################################################################### + +# Extension #283 +NV_half_float enum: + HALF_FLOAT_NV = 0x140B + +############################################################################### + +# Extension #284 +NV_pixel_data_range enum: + WRITE_PIXEL_DATA_RANGE_NV = 0x8878 + READ_PIXEL_DATA_RANGE_NV = 0x8879 + WRITE_PIXEL_DATA_RANGE_LENGTH_NV = 0x887A + READ_PIXEL_DATA_RANGE_LENGTH_NV = 0x887B + WRITE_PIXEL_DATA_RANGE_POINTER_NV = 0x887C + READ_PIXEL_DATA_RANGE_POINTER_NV = 0x887D + +############################################################################### + +# Extension #285 +NV_primitive_restart enum: + PRIMITIVE_RESTART_NV = 0x8558 + PRIMITIVE_RESTART_INDEX_NV = 0x8559 + +############################################################################### + +# Extension #286 +NV_texture_expand_normal enum: + TEXTURE_UNSIGNED_REMAP_MODE_NV = 0x888F + +############################################################################### + +# No new tokens +# Extension #287 +NV_vertex_program2 enum: + +############################################################################### + +# No new tokens +# Extension #288 +ATI_map_object_buffer enum: + +############################################################################### + +# Extension #289 +ATI_separate_stencil enum: + STENCIL_BACK_FUNC_ATI = 0x8800 + STENCIL_BACK_FAIL_ATI = 0x8801 + STENCIL_BACK_PASS_DEPTH_FAIL_ATI = 0x8802 + STENCIL_BACK_PASS_DEPTH_PASS_ATI = 0x8803 + +############################################################################### + +# No new tokens +# Extension #290 +ATI_vertex_attrib_array_object enum: + +############################################################################### + +# No new tokens +# Extension #291 - OpenGL ES only, not in glext.h +# OES_byte_coordinates enum: + +############################################################################### + +# Extension #292 - OpenGL ES only, not in glext.h +# OES_fixed_point enum: +# FIXED_OES = 0x140C + +############################################################################### + +# No new tokens +# Extension #293 - OpenGL ES only, not in glext.h +# OES_single_precision enum: + +############################################################################### + +# Extension #294 - OpenGL ES only, not in glext.h +# OES_compressed_paletted_texture enum: +# PALETTE4_RGB8_OES = 0x8B90 +# PALETTE4_RGBA8_OES = 0x8B91 +# PALETTE4_R5_G6_B5_OES = 0x8B92 +# PALETTE4_RGBA4_OES = 0x8B93 +# PALETTE4_RGB5_A1_OES = 0x8B94 +# PALETTE8_RGB8_OES = 0x8B95 +# PALETTE8_RGBA8_OES = 0x8B96 +# PALETTE8_R5_G6_B5_OES = 0x8B97 +# PALETTE8_RGBA4_OES = 0x8B98 +# PALETTE8_RGB5_A1_OES = 0x8B99 + +############################################################################### + +# Extension #295 - This is an OpenGL ES extension, but also implemented in Mesa +OES_read_format enum: + IMPLEMENTATION_COLOR_READ_TYPE_OES = 0x8B9A + IMPLEMENTATION_COLOR_READ_FORMAT_OES = 0x8B9B + +############################################################################### + +# No new tokens +# Extension #296 - OpenGL ES only, not in glext.h +# OES_query_matrix enum: + +############################################################################### + +# Extension #297 +EXT_depth_bounds_test enum: + DEPTH_BOUNDS_TEST_EXT = 0x8890 + DEPTH_BOUNDS_EXT = 0x8891 + +############################################################################### + +# Extension #298 +EXT_texture_mirror_clamp enum: + MIRROR_CLAMP_EXT = 0x8742 + MIRROR_CLAMP_TO_EDGE_EXT = 0x8743 + MIRROR_CLAMP_TO_BORDER_EXT = 0x8912 + +############################################################################### + +# Extension #299 +EXT_blend_equation_separate enum: + BLEND_EQUATION_RGB_EXT = 0x8009 # alias GL_BLEND_EQUATION_EXT + BLEND_EQUATION_ALPHA_EXT = 0x883D + +############################################################################### + +# Extension #300 +MESA_pack_invert enum: + PACK_INVERT_MESA = 0x8758 + +############################################################################### + +# Extension #301 +MESA_ycbcr_texture enum: + UNSIGNED_SHORT_8_8_MESA = 0x85BA + UNSIGNED_SHORT_8_8_REV_MESA = 0x85BB + YCBCR_MESA = 0x8757 + +############################################################################### + +# Extension #302 +EXT_pixel_buffer_object enum: + PIXEL_PACK_BUFFER_EXT = 0x88EB + PIXEL_UNPACK_BUFFER_EXT = 0x88EC + PIXEL_PACK_BUFFER_BINDING_EXT = 0x88ED + PIXEL_UNPACK_BUFFER_BINDING_EXT = 0x88EF + +############################################################################### + +# No new tokens +# Extension #303 +NV_fragment_program_option enum: + +############################################################################### + +# Extension #304 +NV_fragment_program2 enum: + MAX_PROGRAM_EXEC_INSTRUCTIONS_NV = 0x88F4 + MAX_PROGRAM_CALL_DEPTH_NV = 0x88F5 + MAX_PROGRAM_IF_DEPTH_NV = 0x88F6 + MAX_PROGRAM_LOOP_DEPTH_NV = 0x88F7 + MAX_PROGRAM_LOOP_COUNT_NV = 0x88F8 + +############################################################################### + +# Extension #305 +NV_vertex_program2_option enum: + use NV_fragment_program2 MAX_PROGRAM_EXEC_INSTRUCTIONS_NV + use NV_fragment_program2 MAX_PROGRAM_CALL_DEPTH_NV + +############################################################################### + +# Extension #306 +NV_vertex_program3 enum: + use ARB_vertex_shader MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB + +############################################################################### + +# Extension #307 - GLX_SGIX_hyperpipe +# Extension #308 - GLX_MESA_agp_offset + +# Extension #309 - GL_EXT_texture_compression_dxt1 (OpenGL ES only, subset of _s3tc version) +# use EXT_texture_compression_s3tc COMPRESSED_RGB_S3TC_DXT1_EXT +# use EXT_texture_compression_s3tc COMPRESSED_RGBA_S3TC_DXT1_EXT + +############################################################################### + +# Extension #310 +EXT_framebuffer_object enum: + INVALID_FRAMEBUFFER_OPERATION_EXT = 0x0506 + MAX_RENDERBUFFER_SIZE_EXT = 0x84E8 + FRAMEBUFFER_BINDING_EXT = 0x8CA6 + RENDERBUFFER_BINDING_EXT = 0x8CA7 + FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT = 0x8CD0 + FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT = 0x8CD1 + FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT = 0x8CD2 + FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT = 0x8CD3 + FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT = 0x8CD4 + FRAMEBUFFER_COMPLETE_EXT = 0x8CD5 + FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT = 0x8CD6 + FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT = 0x8CD7 +## Removed 2005/09/26 in revision #117 of the extension: +## FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT = 0x8CD8 + FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT = 0x8CD9 + FRAMEBUFFER_INCOMPLETE_FORMATS_EXT = 0x8CDA + FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT = 0x8CDB + FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT = 0x8CDC + FRAMEBUFFER_UNSUPPORTED_EXT = 0x8CDD +## Removed 2005/05/31 in revision #113 of the extension: +## FRAMEBUFFER_STATUS_ERROR_EXT = 0x8CDE + MAX_COLOR_ATTACHMENTS_EXT = 0x8CDF + COLOR_ATTACHMENT0_EXT = 0x8CE0 + COLOR_ATTACHMENT1_EXT = 0x8CE1 + COLOR_ATTACHMENT2_EXT = 0x8CE2 + COLOR_ATTACHMENT3_EXT = 0x8CE3 + COLOR_ATTACHMENT4_EXT = 0x8CE4 + COLOR_ATTACHMENT5_EXT = 0x8CE5 + COLOR_ATTACHMENT6_EXT = 0x8CE6 + COLOR_ATTACHMENT7_EXT = 0x8CE7 + COLOR_ATTACHMENT8_EXT = 0x8CE8 + COLOR_ATTACHMENT9_EXT = 0x8CE9 + COLOR_ATTACHMENT10_EXT = 0x8CEA + COLOR_ATTACHMENT11_EXT = 0x8CEB + COLOR_ATTACHMENT12_EXT = 0x8CEC + COLOR_ATTACHMENT13_EXT = 0x8CED + COLOR_ATTACHMENT14_EXT = 0x8CEE + COLOR_ATTACHMENT15_EXT = 0x8CEF + DEPTH_ATTACHMENT_EXT = 0x8D00 + STENCIL_ATTACHMENT_EXT = 0x8D20 + FRAMEBUFFER_EXT = 0x8D40 + RENDERBUFFER_EXT = 0x8D41 + RENDERBUFFER_WIDTH_EXT = 0x8D42 + RENDERBUFFER_HEIGHT_EXT = 0x8D43 + RENDERBUFFER_INTERNAL_FORMAT_EXT = 0x8D44 +# removed STENCIL_INDEX_EXT = 0x8D45 in rev. #114 of the spec + STENCIL_INDEX1_EXT = 0x8D46 + STENCIL_INDEX4_EXT = 0x8D47 + STENCIL_INDEX8_EXT = 0x8D48 + STENCIL_INDEX16_EXT = 0x8D49 + RENDERBUFFER_RED_SIZE_EXT = 0x8D50 + RENDERBUFFER_GREEN_SIZE_EXT = 0x8D51 + RENDERBUFFER_BLUE_SIZE_EXT = 0x8D52 + RENDERBUFFER_ALPHA_SIZE_EXT = 0x8D53 + RENDERBUFFER_DEPTH_SIZE_EXT = 0x8D54 + RENDERBUFFER_STENCIL_SIZE_EXT = 0x8D55 + +############################################################################### + +# No new tokens +# Extension #311 +GREMEDY_string_marker enum: + +############################################################################### + +# Extension #312 +EXT_packed_depth_stencil enum: + DEPTH_STENCIL_EXT = 0x84F9 + UNSIGNED_INT_24_8_EXT = 0x84FA + DEPTH24_STENCIL8_EXT = 0x88F0 + TEXTURE_STENCIL_SIZE_EXT = 0x88F1 + +############################################################################### + +# Extension #313 - WGL_3DL_stereo_control + +############################################################################### + +# Extension #314 +EXT_stencil_clear_tag enum: + STENCIL_TAG_BITS_EXT = 0x88F2 + STENCIL_CLEAR_TAG_VALUE_EXT = 0x88F3 + +############################################################################### + +# Extension #315 +EXT_texture_sRGB enum: + SRGB_EXT = 0x8C40 + SRGB8_EXT = 0x8C41 + SRGB_ALPHA_EXT = 0x8C42 + SRGB8_ALPHA8_EXT = 0x8C43 + SLUMINANCE_ALPHA_EXT = 0x8C44 + SLUMINANCE8_ALPHA8_EXT = 0x8C45 + SLUMINANCE_EXT = 0x8C46 + SLUMINANCE8_EXT = 0x8C47 + COMPRESSED_SRGB_EXT = 0x8C48 + COMPRESSED_SRGB_ALPHA_EXT = 0x8C49 + COMPRESSED_SLUMINANCE_EXT = 0x8C4A + COMPRESSED_SLUMINANCE_ALPHA_EXT = 0x8C4B + COMPRESSED_SRGB_S3TC_DXT1_EXT = 0x8C4C + COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT = 0x8C4D + COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT = 0x8C4E + COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT = 0x8C4F + +############################################################################### + +# Extension #316 +EXT_framebuffer_blit enum: + READ_FRAMEBUFFER_EXT = 0x8CA8 + DRAW_FRAMEBUFFER_EXT = 0x8CA9 + DRAW_FRAMEBUFFER_BINDING_EXT = GL_FRAMEBUFFER_BINDING_EXT + READ_FRAMEBUFFER_BINDING_EXT = 0x8CAA + +############################################################################### + +# Extension #317 +EXT_framebuffer_multisample enum: + RENDERBUFFER_SAMPLES_EXT = 0x8CAB + FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT = 0x8D56 + MAX_SAMPLES_EXT = 0x8D57 + +############################################################################### + +# Extension #318 +MESAX_texture_stack enum: + TEXTURE_1D_STACK_MESAX = 0x8759 + TEXTURE_2D_STACK_MESAX = 0x875A + PROXY_TEXTURE_1D_STACK_MESAX = 0x875B + PROXY_TEXTURE_2D_STACK_MESAX = 0x875C + TEXTURE_1D_STACK_BINDING_MESAX = 0x875D + TEXTURE_2D_STACK_BINDING_MESAX = 0x875E + +############################################################################### + +# Extension #319 +EXT_timer_query enum: + TIME_ELAPSED_EXT = 0x88BF + +############################################################################### + +# No new tokens +# Extension #320 +EXT_gpu_program_parameters enum: + +############################################################################### + +# Extension #321 +APPLE_flush_buffer_range enum: + BUFFER_SERIALIZED_MODIFY_APPLE = 0x8A12 + BUFFER_FLUSHING_UNMAP_APPLE = 0x8A13 + +############################################################################### + +# Extension #322 +NV_gpu_program4 enum: + MIN_PROGRAM_TEXEL_OFFSET_NV = 0x8904 + MAX_PROGRAM_TEXEL_OFFSET_NV = 0x8905 + PROGRAM_ATTRIB_COMPONENTS_NV = 0x8906 + PROGRAM_RESULT_COMPONENTS_NV = 0x8907 + MAX_PROGRAM_ATTRIB_COMPONENTS_NV = 0x8908 + MAX_PROGRAM_RESULT_COMPONENTS_NV = 0x8909 + MAX_PROGRAM_GENERIC_ATTRIBS_NV = 0x8DA5 + MAX_PROGRAM_GENERIC_RESULTS_NV = 0x8DA6 + +############################################################################### + +# Extension #323 +NV_geometry_program4 enum: + LINES_ADJACENCY_EXT = 0x000A + LINE_STRIP_ADJACENCY_EXT = 0x000B + TRIANGLES_ADJACENCY_EXT = 0x000C + TRIANGLE_STRIP_ADJACENCY_EXT = 0x000D + GEOMETRY_PROGRAM_NV = 0x8C26 + MAX_PROGRAM_OUTPUT_VERTICES_NV = 0x8C27 + MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV = 0x8C28 + GEOMETRY_VERTICES_OUT_EXT = 0x8DDA + GEOMETRY_INPUT_TYPE_EXT = 0x8DDB + GEOMETRY_OUTPUT_TYPE_EXT = 0x8DDC + MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT = 0x8C29 + FRAMEBUFFER_ATTACHMENT_LAYERED_EXT = 0x8DA7 + FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT = 0x8DA8 + FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT = 0x8DA9 + FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT = 0x8CD4 + PROGRAM_POINT_SIZE_EXT = 0x8642 + +############################################################################### + +# Extension #324 +EXT_geometry_shader4 enum: + GEOMETRY_SHADER_EXT = 0x8DD9 + use NV_geometry_program4 GEOMETRY_VERTICES_OUT_EXT + use NV_geometry_program4 GEOMETRY_INPUT_TYPE_EXT + use NV_geometry_program4 GEOMETRY_OUTPUT_TYPE_EXT + use NV_geometry_program4 MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT + MAX_GEOMETRY_VARYING_COMPONENTS_EXT = 0x8DDD + MAX_VERTEX_VARYING_COMPONENTS_EXT = 0x8DDE + MAX_VARYING_COMPONENTS_EXT = 0x8B4B + MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT = 0x8DDF + MAX_GEOMETRY_OUTPUT_VERTICES_EXT = 0x8DE0 + MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT = 0x8DE1 + use NV_geometry_program4 LINES_ADJACENCY_EXT + use NV_geometry_program4 LINE_STRIP_ADJACENCY_EXT + use NV_geometry_program4 TRIANGLES_ADJACENCY_EXT + use NV_geometry_program4 TRIANGLE_STRIP_ADJACENCY_EXT + use NV_geometry_program4 FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT + use NV_geometry_program4 FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT + use NV_geometry_program4 FRAMEBUFFER_ATTACHMENT_LAYERED_EXT + use NV_geometry_program4 FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT + use NV_geometry_program4 PROGRAM_POINT_SIZE_EXT + +############################################################################### + +# Extension #325 +NV_vertex_program4 enum: + VERTEX_ATTRIB_ARRAY_INTEGER_NV = 0x88FD + +############################################################################### + +# Extension #326 +EXT_gpu_shader4 enum: + SAMPLER_1D_ARRAY_EXT = 0x8DC0 + SAMPLER_2D_ARRAY_EXT = 0x8DC1 + SAMPLER_BUFFER_EXT = 0x8DC2 + SAMPLER_1D_ARRAY_SHADOW_EXT = 0x8DC3 + SAMPLER_2D_ARRAY_SHADOW_EXT = 0x8DC4 + SAMPLER_CUBE_SHADOW_EXT = 0x8DC5 + UNSIGNED_INT_VEC2_EXT = 0x8DC6 + UNSIGNED_INT_VEC3_EXT = 0x8DC7 + UNSIGNED_INT_VEC4_EXT = 0x8DC8 + INT_SAMPLER_1D_EXT = 0x8DC9 + INT_SAMPLER_2D_EXT = 0x8DCA + INT_SAMPLER_3D_EXT = 0x8DCB + INT_SAMPLER_CUBE_EXT = 0x8DCC + INT_SAMPLER_2D_RECT_EXT = 0x8DCD + INT_SAMPLER_1D_ARRAY_EXT = 0x8DCE + INT_SAMPLER_2D_ARRAY_EXT = 0x8DCF + INT_SAMPLER_BUFFER_EXT = 0x8DD0 + UNSIGNED_INT_SAMPLER_1D_EXT = 0x8DD1 + UNSIGNED_INT_SAMPLER_2D_EXT = 0x8DD2 + UNSIGNED_INT_SAMPLER_3D_EXT = 0x8DD3 + UNSIGNED_INT_SAMPLER_CUBE_EXT = 0x8DD4 + UNSIGNED_INT_SAMPLER_2D_RECT_EXT = 0x8DD5 + UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT = 0x8DD6 + UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT = 0x8DD7 + UNSIGNED_INT_SAMPLER_BUFFER_EXT = 0x8DD8 + +############################################################################### + +# No new tokens +# Extension #327 +EXT_draw_instanced enum: + +############################################################################### + +# Extension #328 +EXT_packed_float enum: + R11F_G11F_B10F_EXT = 0x8C3A + UNSIGNED_INT_10F_11F_11F_REV_EXT = 0x8C3B + RGBA_SIGNED_COMPONENTS_EXT = 0x8C3C + +############################################################################### + +# Extension #329 +EXT_texture_array enum: + TEXTURE_1D_ARRAY_EXT = 0x8C18 + PROXY_TEXTURE_1D_ARRAY_EXT = 0x8C19 + TEXTURE_2D_ARRAY_EXT = 0x8C1A + PROXY_TEXTURE_2D_ARRAY_EXT = 0x8C1B + TEXTURE_BINDING_1D_ARRAY_EXT = 0x8C1C + TEXTURE_BINDING_2D_ARRAY_EXT = 0x8C1D + MAX_ARRAY_TEXTURE_LAYERS_EXT = 0x88FF + COMPARE_REF_DEPTH_TO_TEXTURE_EXT = 0x884E + use NV_geometry_program4 FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT + +############################################################################### + +# Extension #330 +EXT_texture_buffer_object enum: + TEXTURE_BUFFER_EXT = 0x8C2A + MAX_TEXTURE_BUFFER_SIZE_EXT = 0x8C2B + TEXTURE_BINDING_BUFFER_EXT = 0x8C2C + TEXTURE_BUFFER_DATA_STORE_BINDING_EXT = 0x8C2D + TEXTURE_BUFFER_FORMAT_EXT = 0x8C2E + +############################################################################### + +# Extension #331 +EXT_texture_compression_latc enum: + COMPRESSED_LUMINANCE_LATC1_EXT = 0x8C70 + COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT = 0x8C71 + COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT = 0x8C72 + COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT = 0x8C73 + +############################################################################### + +# Extension #332 +EXT_texture_compression_rgtc enum: + COMPRESSED_RED_RGTC1_EXT = 0x8DBB + COMPRESSED_SIGNED_RED_RGTC1_EXT = 0x8DBC + COMPRESSED_RED_GREEN_RGTC2_EXT = 0x8DBD + COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT = 0x8DBE + +############################################################################### + +# Extension #333 +EXT_texture_shared_exponent enum: + RGB9_E5_EXT = 0x8C3D + UNSIGNED_INT_5_9_9_9_REV_EXT = 0x8C3E + TEXTURE_SHARED_SIZE_EXT = 0x8C3F + +############################################################################### + +# Extension #334 +NV_depth_buffer_float enum: + DEPTH_COMPONENT32F_NV = 0x8DAB + DEPTH32F_STENCIL8_NV = 0x8DAC + FLOAT_32_UNSIGNED_INT_24_8_REV_NV = 0x8DAD + DEPTH_BUFFER_FLOAT_MODE_NV = 0x8DAF + +############################################################################### + +# No new tokens +# Extension #335 +NV_fragment_program4 enum: + +############################################################################### + +# Extension #336 +NV_framebuffer_multisample_coverage enum: + RENDERBUFFER_COVERAGE_SAMPLES_NV = 0x8CAB + RENDERBUFFER_COLOR_SAMPLES_NV = 0x8E10 + MAX_MULTISAMPLE_COVERAGE_MODES_NV = 0x8E11 + MULTISAMPLE_COVERAGE_MODES_NV = 0x8E12 + +############################################################################### + +# Extension #337 +# ??? Also WGL/GLX extensions ??? +EXT_framebuffer_sRGB enum: + FRAMEBUFFER_SRGB_EXT = 0x8DB9 + FRAMEBUFFER_SRGB_CAPABLE_EXT = 0x8DBA + +############################################################################### + +# No new tokens +# Extension #338 +NV_geometry_shader4 enum: + +############################################################################### + +# Extension #339 +NV_parameter_buffer_object enum: + MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV = 0x8DA0 + MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV = 0x8DA1 + VERTEX_PROGRAM_PARAMETER_BUFFER_NV = 0x8DA2 + GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV = 0x8DA3 + FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV = 0x8DA4 + +############################################################################### + +# No new tokens +# Extension #340 +EXT_draw_buffers2 enum: + +############################################################################### + +# Extension #341 +NV_transform_feedback enum: + BACK_PRIMARY_COLOR_NV = 0x8C77 + BACK_SECONDARY_COLOR_NV = 0x8C78 + TEXTURE_COORD_NV = 0x8C79 + CLIP_DISTANCE_NV = 0x8C7A + VERTEX_ID_NV = 0x8C7B + PRIMITIVE_ID_NV = 0x8C7C + GENERIC_ATTRIB_NV = 0x8C7D + TRANSFORM_FEEDBACK_ATTRIBS_NV = 0x8C7E + TRANSFORM_FEEDBACK_BUFFER_MODE_NV = 0x8C7F + MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV = 0x8C80 + ACTIVE_VARYINGS_NV = 0x8C81 + ACTIVE_VARYING_MAX_LENGTH_NV = 0x8C82 + TRANSFORM_FEEDBACK_VARYINGS_NV = 0x8C83 + TRANSFORM_FEEDBACK_BUFFER_START_NV = 0x8C84 + TRANSFORM_FEEDBACK_BUFFER_SIZE_NV = 0x8C85 + TRANSFORM_FEEDBACK_RECORD_NV = 0x8C86 + PRIMITIVES_GENERATED_NV = 0x8C87 + TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV = 0x8C88 + RASTERIZER_DISCARD_NV = 0x8C89 + MAX_TRANSFORM_FEEDBACK_INTERLEAVED_ATTRIBS_NV = 0x8C8A + MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV = 0x8C8B + INTERLEAVED_ATTRIBS_NV = 0x8C8C + SEPARATE_ATTRIBS_NV = 0x8C8D + TRANSFORM_FEEDBACK_BUFFER_NV = 0x8C8E + TRANSFORM_FEEDBACK_BUFFER_BINDING_NV = 0x8C8F + +############################################################################### + +# Extension #342 +EXT_bindable_uniform enum: + MAX_VERTEX_BINDABLE_UNIFORMS_EXT = 0x8DE2 + MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT = 0x8DE3 + MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT = 0x8DE4 + MAX_BINDABLE_UNIFORM_SIZE_EXT = 0x8DED + UNIFORM_BUFFER_EXT = 0x8DEE + UNIFORM_BUFFER_BINDING_EXT = 0x8DEF + +############################################################################### + +# Extension #343 +EXT_texture_integer enum: + RGBA32UI_EXT = 0x8D70 + RGB32UI_EXT = 0x8D71 + ALPHA32UI_EXT = 0x8D72 + INTENSITY32UI_EXT = 0x8D73 + LUMINANCE32UI_EXT = 0x8D74 + LUMINANCE_ALPHA32UI_EXT = 0x8D75 + RGBA16UI_EXT = 0x8D76 + RGB16UI_EXT = 0x8D77 + ALPHA16UI_EXT = 0x8D78 + INTENSITY16UI_EXT = 0x8D79 + LUMINANCE16UI_EXT = 0x8D7A + LUMINANCE_ALPHA16UI_EXT = 0x8D7B + RGBA8UI_EXT = 0x8D7C + RGB8UI_EXT = 0x8D7D + ALPHA8UI_EXT = 0x8D7E + INTENSITY8UI_EXT = 0x8D7F + LUMINANCE8UI_EXT = 0x8D80 + LUMINANCE_ALPHA8UI_EXT = 0x8D81 + RGBA32I_EXT = 0x8D82 + RGB32I_EXT = 0x8D83 + ALPHA32I_EXT = 0x8D84 + INTENSITY32I_EXT = 0x8D85 + LUMINANCE32I_EXT = 0x8D86 + LUMINANCE_ALPHA32I_EXT = 0x8D87 + RGBA16I_EXT = 0x8D88 + RGB16I_EXT = 0x8D89 + ALPHA16I_EXT = 0x8D8A + INTENSITY16I_EXT = 0x8D8B + LUMINANCE16I_EXT = 0x8D8C + LUMINANCE_ALPHA16I_EXT = 0x8D8D + RGBA8I_EXT = 0x8D8E + RGB8I_EXT = 0x8D8F + ALPHA8I_EXT = 0x8D90 + INTENSITY8I_EXT = 0x8D91 + LUMINANCE8I_EXT = 0x8D92 + LUMINANCE_ALPHA8I_EXT = 0x8D93 + RED_INTEGER_EXT = 0x8D94 + GREEN_INTEGER_EXT = 0x8D95 + BLUE_INTEGER_EXT = 0x8D96 + ALPHA_INTEGER_EXT = 0x8D97 + RGB_INTEGER_EXT = 0x8D98 + RGBA_INTEGER_EXT = 0x8D99 + BGR_INTEGER_EXT = 0x8D9A + BGRA_INTEGER_EXT = 0x8D9B + LUMINANCE_INTEGER_EXT = 0x8D9C + LUMINANCE_ALPHA_INTEGER_EXT = 0x8D9D + RGBA_INTEGER_MODE_EXT = 0x8D9E + +############################################################################### + +# Extension #344 - GLX_EXT_texture_from_pixmap + +############################################################################### + +# No new tokens +# Extension #345 +GREMEDY_frame_terminator enum: + +############################################################################### + +# Extension #346 +NV_conditional_render enum: + QUERY_WAIT_NV = 0x8E13 + QUERY_NO_WAIT_NV = 0x8E14 + QUERY_BY_REGION_WAIT_NV = 0x8E15 + QUERY_BY_REGION_NO_WAIT_NV = 0x8E16 + +############################################################################### + +# Extension #347 +NV_present_video enum: + FRAME_NV = 0x8E26 + FIELDS_NV = 0x8E27 + CURRENT_TIME_NV = 0x8E28 + NUM_FILL_STREAMS_NV = 0x8E29 + PRESENT_TIME_NV = 0x8E2A + PRESENT_DURATION_NV = 0x8E2B + +############################################################################### + +# Extension #348 - GLX_NV_video_out +# Extension #349 - WGL_NV_video_out +# Extension #350 - GLX_NV_swap_group +# Extension #351 - WGL_NV_swap_group + +############################################################################### + +# Extension #352 +EXT_transform_feedback enum: + TRANSFORM_FEEDBACK_BUFFER_EXT = 0x8C8E + TRANSFORM_FEEDBACK_BUFFER_START_EXT = 0x8C84 + TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT = 0x8C85 + TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT = 0x8C8F + INTERLEAVED_ATTRIBS_EXT = 0x8C8C + SEPARATE_ATTRIBS_EXT = 0x8C8D + PRIMITIVES_GENERATED_EXT = 0x8C87 + TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT = 0x8C88 + RASTERIZER_DISCARD_EXT = 0x8C89 + MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT = 0x8C8A + MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT = 0x8C8B + MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT = 0x8C80 + TRANSFORM_FEEDBACK_VARYINGS_EXT = 0x8C83 + TRANSFORM_FEEDBACK_BUFFER_MODE_EXT = 0x8C7F + TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT = 0x8C76 + +############################################################################### + +# Extension #353 +EXT_direct_state_access enum: + PROGRAM_MATRIX_EXT = 0x8E2D + TRANSPOSE_PROGRAM_MATRIX_EXT = 0x8E2E + PROGRAM_MATRIX_STACK_DEPTH_EXT = 0x8E2F + +############################################################################### + +# Extension #354 +EXT_vertex_array_bgra enum: + use VERSION_1_2 BGRA + +############################################################################### + +# Extension #355 - WGL_NV_gpu_affinity + +############################################################################### + +# Extension #356 +EXT_texture_swizzle enum: + TEXTURE_SWIZZLE_R_EXT = 0x8E42 + TEXTURE_SWIZZLE_G_EXT = 0x8E43 + TEXTURE_SWIZZLE_B_EXT = 0x8E44 + TEXTURE_SWIZZLE_A_EXT = 0x8E45 + TEXTURE_SWIZZLE_RGBA_EXT = 0x8E46 + +############################################################################### + +# Extension #357 +NV_explicit_multisample enum: + SAMPLE_POSITION_NV = 0x8E50 + SAMPLE_MASK_NV = 0x8E51 + SAMPLE_MASK_VALUE_NV = 0x8E52 + TEXTURE_BINDING_RENDERBUFFER_NV = 0x8E53 + TEXTURE_RENDERBUFFER_DATA_STORE_BINDING_NV = 0x8E54 + TEXTURE_RENDERBUFFER_NV = 0x8E55 + SAMPLER_RENDERBUFFER_NV = 0x8E56 + INT_SAMPLER_RENDERBUFFER_NV = 0x8E57 + UNSIGNED_INT_SAMPLER_RENDERBUFFER_NV = 0x8E58 + MAX_SAMPLE_MASK_WORDS_NV = 0x8E59 + +############################################################################### + +# Extension #358 +NV_transform_feedback2 enum: + TRANSFORM_FEEDBACK_NV = 0x8E22 + TRANSFORM_FEEDBACK_BUFFER_PAUSED_NV = 0x8E23 + TRANSFORM_FEEDBACK_BUFFER_ACTIVE_NV = 0x8E24 + TRANSFORM_FEEDBACK_BINDING_NV = 0x8E25 + +############################################################################### + +# Extension #359 +ATI_meminfo enum: + VBO_FREE_MEMORY_ATI = 0x87FB + TEXTURE_FREE_MEMORY_ATI = 0x87FC + RENDERBUFFER_FREE_MEMORY_ATI = 0x87FD + +############################################################################### + +# Extension #360 +AMD_performance_monitor enum: + COUNTER_TYPE_AMD = 0x8BC0 + COUNTER_RANGE_AMD = 0x8BC1 + UNSIGNED_INT64_AMD = 0x8BC2 + PERCENTAGE_AMD = 0x8BC3 + PERFMON_RESULT_AVAILABLE_AMD = 0x8BC4 + PERFMON_RESULT_SIZE_AMD = 0x8BC5 + PERFMON_RESULT_AMD = 0x8BC6 + +############################################################################### + +# Extension #361 - WGL_AMD_gpu_association + +############################################################################### + +# No new tokens +# Extension #362 +AMD_texture_texture4 enum: + +############################################################################### + +# Extension #363 +AMD_vertex_shader_tesselator enum: + SAMPLER_BUFFER_AMD = 0x9001 + INT_SAMPLER_BUFFER_AMD = 0x9002 + UNSIGNED_INT_SAMPLER_BUFFER_AMD = 0x9003 + TESSELLATION_MODE_AMD = 0x9004 + TESSELLATION_FACTOR_AMD = 0x9005 + DISCRETE_AMD = 0x9006 + CONTINUOUS_AMD = 0x9007 + +############################################################################### + +# Extension #364 +EXT_provoking_vertex enum: + QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT = 0x8E4C + FIRST_VERTEX_CONVENTION_EXT = 0x8E4D + LAST_VERTEX_CONVENTION_EXT = 0x8E4E + PROVOKING_VERTEX_EXT = 0x8E4F + +############################################################################### + +# Extension #365 +EXT_texture_snorm enum: + ALPHA_SNORM = 0x9010 + LUMINANCE_SNORM = 0x9011 + LUMINANCE_ALPHA_SNORM = 0x9012 + INTENSITY_SNORM = 0x9013 + ALPHA8_SNORM = 0x9014 + LUMINANCE8_SNORM = 0x9015 + LUMINANCE8_ALPHA8_SNORM = 0x9016 + INTENSITY8_SNORM = 0x9017 + ALPHA16_SNORM = 0x9018 + LUMINANCE16_SNORM = 0x9019 + LUMINANCE16_ALPHA16_SNORM = 0x901A + INTENSITY16_SNORM = 0x901B + use VERSION_3_1 RED_SNORM + use VERSION_3_1 RG_SNORM + use VERSION_3_1 RGB_SNORM + use VERSION_3_1 RGBA_SNORM + use VERSION_3_1 R8_SNORM + use VERSION_3_1 RG8_SNORM + use VERSION_3_1 RGB8_SNORM + use VERSION_3_1 RGBA8_SNORM + use VERSION_3_1 R16_SNORM + use VERSION_3_1 RG16_SNORM + use VERSION_3_1 RGB16_SNORM + use VERSION_3_1 RGBA16_SNORM + use VERSION_3_1 SIGNED_NORMALIZED + +############################################################################### + +# No new tokens +# Extension #366 +AMD_draw_buffers_blend enum: + +############################################################################### + +# Extension #367 +APPLE_texture_range enum: + TEXTURE_RANGE_LENGTH_APPLE = 0x85B7 + TEXTURE_RANGE_POINTER_APPLE = 0x85B8 + TEXTURE_STORAGE_HINT_APPLE = 0x85BC + STORAGE_PRIVATE_APPLE = 0x85BD + use APPLE_vertex_array_range STORAGE_CACHED_APPLE + use APPLE_vertex_array_range STORAGE_SHARED_APPLE + +############################################################################### + +# Extension #368 +APPLE_float_pixels enum: + HALF_APPLE = 0x140B + RGBA_FLOAT32_APPLE = 0x8814 + RGB_FLOAT32_APPLE = 0x8815 + ALPHA_FLOAT32_APPLE = 0x8816 + INTENSITY_FLOAT32_APPLE = 0x8817 + LUMINANCE_FLOAT32_APPLE = 0x8818 + LUMINANCE_ALPHA_FLOAT32_APPLE = 0x8819 + RGBA_FLOAT16_APPLE = 0x881A + RGB_FLOAT16_APPLE = 0x881B + ALPHA_FLOAT16_APPLE = 0x881C + INTENSITY_FLOAT16_APPLE = 0x881D + LUMINANCE_FLOAT16_APPLE = 0x881E + LUMINANCE_ALPHA_FLOAT16_APPLE = 0x881F + COLOR_FLOAT_APPLE = 0x8A0F + +############################################################################### + +# Extension #369 +APPLE_vertex_program_evaluators enum: + VERTEX_ATTRIB_MAP1_APPLE = 0x8A00 + VERTEX_ATTRIB_MAP2_APPLE = 0x8A01 + VERTEX_ATTRIB_MAP1_SIZE_APPLE = 0x8A02 + VERTEX_ATTRIB_MAP1_COEFF_APPLE = 0x8A03 + VERTEX_ATTRIB_MAP1_ORDER_APPLE = 0x8A04 + VERTEX_ATTRIB_MAP1_DOMAIN_APPLE = 0x8A05 + VERTEX_ATTRIB_MAP2_SIZE_APPLE = 0x8A06 + VERTEX_ATTRIB_MAP2_COEFF_APPLE = 0x8A07 + VERTEX_ATTRIB_MAP2_ORDER_APPLE = 0x8A08 + VERTEX_ATTRIB_MAP2_DOMAIN_APPLE = 0x8A09 + +############################################################################### + +# Extension #370 +APPLE_aux_depth_stencil enum: + AUX_DEPTH_STENCIL_APPLE = 0x8A14 + +############################################################################### + +# Extension #371 +APPLE_object_purgeable enum: + BUFFER_OBJECT_APPLE = 0x85B3 + RELEASED_APPLE = 0x8A19 + VOLATILE_APPLE = 0x8A1A + RETAINED_APPLE = 0x8A1B + UNDEFINED_APPLE = 0x8A1C + PURGEABLE_APPLE = 0x8A1D + +############################################################################### + +# Extension #372 +APPLE_row_bytes enum: + PACK_ROW_BYTES_APPLE = 0x8A15 + UNPACK_ROW_BYTES_APPLE = 0x8A16 + +############################################################################### + +# Extension #373 +APPLE_rgb_422 enum: + RGB_422_APPLE = 0x8A1F + use APPLE_ycbcr_422 UNSIGNED_SHORT_8_8_APPLE + use APPLE_ycbcr_422 UNSIGNED_SHORT_8_8_REV_APPLE + +############################################################################### + +# Extension #374 + +NV_video_capture enum: + VIDEO_BUFFER_NV = 0x9020 + VIDEO_BUFFER_BINDING_NV = 0x9021 + FIELD_UPPER_NV = 0x9022 + FIELD_LOWER_NV = 0x9023 + NUM_VIDEO_CAPTURE_STREAMS_NV = 0x9024 + NEXT_VIDEO_CAPTURE_BUFFER_STATUS_NV = 0x9025 + VIDEO_CAPTURE_TO_422_SUPPORTED_NV = 0x9026 + LAST_VIDEO_CAPTURE_STATUS_NV = 0x9027 + VIDEO_BUFFER_PITCH_NV = 0x9028 + VIDEO_COLOR_CONVERSION_MATRIX_NV = 0x9029 + VIDEO_COLOR_CONVERSION_MAX_NV = 0x902A + VIDEO_COLOR_CONVERSION_MIN_NV = 0x902B + VIDEO_COLOR_CONVERSION_OFFSET_NV = 0x902C + VIDEO_BUFFER_INTERNAL_FORMAT_NV = 0x902D + PARTIAL_SUCCESS_NV = 0x902E + SUCCESS_NV = 0x902F + FAILURE_NV = 0x9030 + YCBYCR8_422_NV = 0x9031 + YCBAYCR8A_4224_NV = 0x9032 + Z6Y10Z6CB10Z6Y10Z6CR10_422_NV = 0x9033 + Z6Y10Z6CB10Z6A10Z6Y10Z6CR10Z6A10_4224_NV = 0x9034 + Z4Y12Z4CB12Z4Y12Z4CR12_422_NV = 0x9035 + Z4Y12Z4CB12Z4A12Z4Y12Z4CR12Z4A12_4224_NV = 0x9036 + Z4Y12Z4CB12Z4CR12_444_NV = 0x9037 + VIDEO_CAPTURE_FRAME_WIDTH_NV = 0x9038 + VIDEO_CAPTURE_FRAME_HEIGHT_NV = 0x9039 + VIDEO_CAPTURE_FIELD_UPPER_HEIGHT_NV = 0x903A + VIDEO_CAPTURE_FIELD_LOWER_HEIGHT_NV = 0x903B + VIDEO_CAPTURE_SURFACE_ORIGIN_NV = 0x903C + +############################################################################### + +# Extension #375 - GLX_EXT_swap_control + +############################################################################### + +# No new tokens +# Extension #376 - also GLX_NV_copy_image, WGL_NV_copy_image +NV_copy_image enum: + +############################################################################### + +# Extension #377 +EXT_separate_shader_objects enum: + ACTIVE_PROGRAM_EXT = 0x8B8D + +############################################################################### + +# No new tokens +# Extension #378 +NV_parameter_buffer_object2 enum: + +############################################################################### + +# Extension #379 +NV_shader_buffer_load enum: + BUFFER_GPU_ADDRESS_NV = 0x8F1D + GPU_ADDRESS_NV = 0x8F34 + MAX_SHADER_BUFFER_ADDRESS_NV = 0x8F35 + +############################################################################### + +# Extension #380 +NV_vertex_buffer_unified_memory enum: + VERTEX_ATTRIB_ARRAY_UNIFIED_NV = 0x8F1E + ELEMENT_ARRAY_UNIFIED_NV = 0x8F1F + VERTEX_ATTRIB_ARRAY_ADDRESS_NV = 0x8F20 + VERTEX_ARRAY_ADDRESS_NV = 0x8F21 + NORMAL_ARRAY_ADDRESS_NV = 0x8F22 + COLOR_ARRAY_ADDRESS_NV = 0x8F23 + INDEX_ARRAY_ADDRESS_NV = 0x8F24 + TEXTURE_COORD_ARRAY_ADDRESS_NV = 0x8F25 + EDGE_FLAG_ARRAY_ADDRESS_NV = 0x8F26 + SECONDARY_COLOR_ARRAY_ADDRESS_NV = 0x8F27 + FOG_COORD_ARRAY_ADDRESS_NV = 0x8F28 + ELEMENT_ARRAY_ADDRESS_NV = 0x8F29 + VERTEX_ATTRIB_ARRAY_LENGTH_NV = 0x8F2A + VERTEX_ARRAY_LENGTH_NV = 0x8F2B + NORMAL_ARRAY_LENGTH_NV = 0x8F2C + COLOR_ARRAY_LENGTH_NV = 0x8F2D + INDEX_ARRAY_LENGTH_NV = 0x8F2E + TEXTURE_COORD_ARRAY_LENGTH_NV = 0x8F2F + EDGE_FLAG_ARRAY_LENGTH_NV = 0x8F30 + SECONDARY_COLOR_ARRAY_LENGTH_NV = 0x8F31 + FOG_COORD_ARRAY_LENGTH_NV = 0x8F32 + ELEMENT_ARRAY_LENGTH_NV = 0x8F33 + +############################################################################### + +# No new tokens +# Extension #381 +NV_texture_barrier enum: + +############################################################################### + +# No new tokens +# Extension #382 +AMD_shader_stencil_export enum: + +############################################################################### + +# Extension #383 +AMD_seamless_cubemap_per_texture enum: + use ARB_seamless_cube_map TEXTURE_CUBE_MAP_SEAMLESS_ARB + +############################################################################### + +# Extension #384 - GLX_INTEL_swap_event + +############################################################################### + +# No new tokens +# Extension #385 +AMD_conservative_depth enum: + diff --git a/src/glx/apple/specs/gl.spec b/src/glx/apple/specs/gl.spec new file mode 100644 index 00000000000..bc054f8643d --- /dev/null +++ b/src/glx/apple/specs/gl.spec @@ -0,0 +1,28563 @@ +# gl.spec file +# DON'T REMOVE PREVIOUS LINE!!! libspec depends on it! +# +# Copyright (c) 1991-2005 Silicon Graphics, Inc. All Rights Reserved. +# Copyright (c) 2006-2010 The Khronos Group Inc. +# +# This document is licensed under the SGI Free Software B License Version +# 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . +# +# $Revision: 10971 $ on $Date: 2010-04-09 02:45:33 -0700 (Fri, 09 Apr 2010) $ + +required-props: +# Description of a parameter +param: retval retained +# Display list flags +dlflags: notlistable handcode +# GLX implementation flags +glxflags: client-intercept client-handcode server-handcode EXT SGI ignore ARB +# Vector ('v') equivalent form of a command taking 1-4 explicit xyzw/rgba arguments +vectorequiv: * +# Category this function falls in. While there are many categories for +# early GL 1.0 functions, later functions just have a core version +# (e.g. VERSION_major_minor) or extension name for the category. +category: display-list drawing drawing-control feedback framebuf misc modeling pixel-op pixel-rw state-req xform VERSION_1_0 VERSION_1_0_DEPRECATED VERSION_1_1 VERSION_1_1_DEPRECATED VERSION_1_2 VERSION_1_2_DEPRECATED VERSION_1_3 VERSION_1_3_DEPRECATED VERSION_1_4 VERSION_1_4_DEPRECATED VERSION_1_5 VERSION_2_0 VERSION_2_1 VERSION_3_0 VERSION_3_0_DEPRECATED VERSION_3_1 VERSION_3_2 VERSION_3_3 VERSION_4_0 ATI_element_array ATI_envmap_bumpmap ATI_fragment_shader ATI_pn_triangles ATI_vertex_array_object ATI_vertex_streams EXT_blend_color EXT_blend_minmax EXT_convolution EXT_copy_texture EXT_histogram EXT_polygon_offset EXT_subtexture EXT_texture3D EXT_texture_object EXT_vertex_array EXT_vertex_shader SGIS_detail_texture SGIS_multisample SGIS_pixel_texture ARB_point_parameters EXT_point_parameters SGIS_point_parameters SGIS_sharpen_texture SGIS_texture4D SGIS_texture_filter4 SGIX_async SGIX_flush_raster SGIX_fragment_lighting SGIX_framezoom SGIX_igloo_interface SGIX_instruments SGIX_list_priority SGIX_pixel_texture SGIX_polynomial_ffd SGIX_reference_plane SGIX_sprite SGIX_tag_sample_buffer SGI_color_table ARB_multitexture ARB_multisample ARB_texture_compression ARB_transpose_matrix ARB_vertex_blend ARB_matrix_palette EXT_compiled_vertex_array EXT_cull_vertex EXT_index_func EXT_index_material EXT_draw_range_elements EXT_vertex_weighting INGR_blend_func_separate NV_evaluators NV_fence NV_occlusion_query NV_point_sprite NV_register_combiners NV_register_combiners2 NV_vertex_array_range NV_vertex_program NV_vertex_program1_1_dcc MESA_resize_buffers MESA_window_pos PGI_misc_hints EXT_fog_coord EXT_blend_func_separate EXT_color_subtable EXT_coordinate_frame EXT_light_texture EXT_multi_draw_arrays EXT_paletted_texture EXT_pixel_transform EXT_secondary_color EXT_texture_perturb_normal HP_image_transform IBM_multimode_draw_arrays IBM_vertex_array_lists INTEL_parallel_arrays SUNX_constant_data SUN_global_alpha SUN_mesh_array SUN_triangle_list SUN_vertex 3DFX_tbuffer EXT_multisample SGIS_fog_function SGIS_texture_color_mask ARB_window_pos EXT_stencil_two_side EXT_depth_bounds_test EXT_blend_equation_separate ARB_vertex_program ARB_fragment_program ARB_vertex_buffer_object ARB_occlusion_query ARB_shader_objects ARB_vertex_shader ARB_fragment_shader S3_s3tc ATI_draw_buffers ATI_texture_env_combine3 ATI_texture_float NV_float_buffer NV_fragment_program NV_half_float NV_pixel_data_range NV_primitive_restart NV_texture_expand_normal NV_texture_expand_normal NV_vertex_program2 APPLE_element_array APPLE_fence APPLE_vertex_array_object APPLE_vertex_array_range ATI_draw_buffers NV_fragment_program NV_half_float NV_pixel_data_range NV_primitive_restart ATI_map_object_buffer ATI_separate_stencil ATI_vertex_attrib_array_object ARB_draw_buffers ARB_texture_rectangle ARB_color_buffer_float EXT_framebuffer_object GREMEDY_string_marker EXT_stencil_clear_tag EXT_framebuffer_blit EXT_framebuffer_multisample MESAX_texture_stack EXT_timer_query EXT_gpu_program_parameters APPLE_flush_buffer_range NV_gpu_program4 NV_geometry_program4 EXT_geometry_shader4 NV_vertex_program4 EXT_gpu_shader4 EXT_draw_instanced EXT_texture_buffer_object NV_depth_buffer_float NV_framebuffer_multisample_coverage NV_parameter_buffer_object EXT_draw_buffers2 NV_transform_feedback EXT_bindable_uniform EXT_texture_integer GREMEDY_frame_terminator NV_conditional_render NV_present_video EXT_transform_feedback ARB_depth_buffer_float ARB_draw_instanced ARB_framebuffer_object ARB_framebuffer_sRGB ARB_geometry_shader4 ARB_half_float_vertex ARB_instanced_arrays ARB_map_buffer_range ARB_texture_buffer_object ARB_texture_compression_rgtc ARB_texture_rg ARB_vertex_array_object EXT_direct_state_access EXT_vertex_array_bgra EXT_texture_swizzle NV_explicit_multisample NV_transform_feedback2 ATI_meminfo AMD_performance_monitor AMD_vertex_shader_tesselator EXT_provoking_vertex ARB_uniform_buffer_object ARB_copy_buffer EXT_texture_snorm AMD_draw_buffers_blend APPLE_texture_range APPLE_float_pixels APPLE_vertex_program_evaluators APPLE_aux_depth_stencil APPLE_object_purgeable APPLE_row_bytes ARB_draw_elements_base_vertex ARB_provoking_vertex ARB_sync ARB_texture_multisample ARB_draw_buffers_blend ARB_sample_shading NV_video_capture NV_copy_image EXT_separate_shader_objects NV_parameter_buffer_object2 NV_shader_buffer_load NV_vertex_buffer_unified_memory NV_texture_barrier ARB_shading_language_include ARB_blend_func_extended ARB_sampler_objects ARB_timer_query ARB_vertex_type_2_10_10_10_rev ARB_draw_indirect ARB_gpu_shader_fp64 ARB_shader_subroutine ARB_tessellation_shader ARB_transform_feedback2 ARB_transform_feedback3 AMD_conservative_depth + +# Categories for extensions with no functions - need not be included now +# ARB_texture_env_add ARB_texture_cube_map ARB_texture_border_clamp +# ARB_shading_language_100 ARB_texture_non_power_of_two ARB_point_sprite +# ARB_half_float_pixel ARB_texture_float ARB_pixel_buffer_object EXT_abgr +# EXT_texture SGI_color_matrix SGI_texture_color_table EXT_cmyka +# EXT_packed_pixels SGIS_texture_lod EXT_rescale_normal EXT_misc_attribute +# SGIS_generate_mipmap SGIX_clipmap SGIX_shadow SGIS_texture_edge_clamp +# SGIS_texture_border_clamp EXT_blend_subtract EXT_blend_logic_op +# SGIX_async_histogram SGIX_async_pixel SGIX_interlace SGIX_pixel_tiles +# SGIX_texture_select SGIX_texture_multi_buffer SGIX_texture_scale_bias +# SGIX_depth_texture SGIX_fog_offset HP_convolution_border_modes +# SGIX_texture_add_env PGI_vertex_hints EXT_clip_volume_hint +# SGIX_ir_instrument1 SGIX_calligraphic_fragment SGIX_texture_lod_bias +# SGIX_shadow_ambient EXT_index_texture EXT_index_array_formats SGIX_ycrcb +# IBM_rasterpos_clip HP_texture_lighting WIN_phong_shading +# WIN_specular_fog SGIX_blend_alpha_minmax EXT_bgra HP_occlusion_test +# EXT_pixel_transform_color_table EXT_shared_texture_palette +# EXT_separate_specular_color EXT_texture_env REND_screen_coordinates +# EXT_texture_env_combine APPLE_specular_vector APPLE_transform_hint +# SGIX_fog_scale INGR_color_clamp INGR_interlace_read EXT_stencil_wrap +# EXT_422_pixels NV_texgen_reflection SUN_convolution_border_modes +# SUN_slice_accum EXT_texture_env_add EXT_texture_lod_bias +# EXT_texture_filter_anisotropic NV_light_max_exponent NV_fog_distance +# NV_texgen_emboss NV_blend_square NV_texture_env_combine4 +# NV_packed_depth_stencil NV_texture_compression_vtc NV_texture_rectangle +# NV_texture_shader NV_texture_shader2 NV_vertex_array_range2 +# IBM_cull_vertex SGIX_subsample SGIX_ycrcba SGIX_ycrcb_subsample +# SGIX_depth_pass_instrument 3DFX_texture_compression_FXT1 +# 3DFX_multisample SGIX_vertex_preclip SGIX_convolution_accuracy +# SGIX_resample SGIX_scalebias_hint SGIX_texture_coordinate_clamp +# EXT_shadow_funcs MESA_pack_invert MESA_ycbcr_texture EXT_packed_float +# EXT_texture_array EXT_texture_compression_latc +# EXT_texture_compression_rgtc EXT_texture_shared_exponent +# NV_fragment_program4 EXT_framebuffer_sRGB NV_geometry_shader4 +# EXT_vertex_array_bgra ARB_depth_clamp ARB_fragment_coord_conventions +# ARB_seamless_cube_map ARB_vertex_array_bgra ARB_texture_cube_map_array +# ARB_texture_gather ARB_texture_query_lod +# AMD_shader_stencil_export AMD_seamless_cubemap_per_texture + +# Core version in which a function was introduced, or against +# which an extension can be implemented +version: 1.0 1.1 1.2 1.3 1.4 1.5 2.0 2.1 3.0 3.1 3.2 3.3 4.0 +# Core version in which a function was removed +deprecated: 3.1 +# GLX Single, Rendering, or Vendor Private opcode +glxsingle: * +glxropcode: * +glxvendorpriv: * +# WGL implementation flags (incomplete) +wglflags: client-handcode server-handcode small-data batchable +# Drivers in which this is implemented (very incomplete) +extension: future not_implemented soft WINSOFT NV10 NV20 NV50 +# Function this aliases (indistinguishable to the GL) +alias: * +# Mesa dispatch table offset (incomplete) +offset: * +# These properties are picked up from NVIDIA .spec files, we don't use them +glfflags: * +beginend: * +glxvectorequiv: * +subcategory: * +glextmask: * + +############################################################################### +# +# glxsingle, glxropcode, and other GLX allocations to vendors +# are used here, but the master registry for GLX is in +# /ogl/trunk/doc/registry/extensions.reserved +# +# XFree86 dispatch offsets: 0-645 +# 578-641 NV_vertex_program +# GLS opcodes: 0x0030-0x0269 +# +############################################################################### + +############################################################################### +# +# things to remember when adding an extension command +# +# - append new ARB and non-ARB extensions to the appropriate portion of +# the spec file, in extension number order. +# - use tabs, not spaces +# - set glxflags to "ignore" until GLX is updated to support the new command +# - add new data types to typemaps/spec2wire.map +# - add extension name in alphabetical order to category list +# - add commands within an extension in spec order +# - use existing command entries as a model (where possible) +# - when reserving new glxropcodes, update +# gfx/lib/opengl/doc/glspec/extensions.reserved to indicate this +# +############################################################################### + +# New type declarations + +passthru: #include <stddef.h> + +passthru: #ifndef GL_VERSION_2_0 +passthru: /* GL type for program/shader text */ +passthru: typedef char GLchar; +passthru: #endif +passthru: +passthru: #ifndef GL_VERSION_1_5 +passthru: /* GL types for handling large vertex buffer objects */ +passthru: typedef ptrdiff_t GLintptr; +passthru: typedef ptrdiff_t GLsizeiptr; +passthru: #endif +passthru: +passthru: #ifndef GL_ARB_vertex_buffer_object +passthru: /* GL types for handling large vertex buffer objects */ +passthru: typedef ptrdiff_t GLintptrARB; +passthru: typedef ptrdiff_t GLsizeiptrARB; +passthru: #endif +passthru: +passthru: #ifndef GL_ARB_shader_objects +passthru: /* GL types for program/shader text and shader object handles */ +passthru: typedef char GLcharARB; +passthru: typedef unsigned int GLhandleARB; +passthru: #endif +passthru: +passthru: /* GL type for "half" precision (s10e5) float data in host memory */ +passthru: #ifndef GL_ARB_half_float_pixel +passthru: typedef unsigned short GLhalfARB; +passthru: #endif +passthru: +passthru: #ifndef GL_NV_half_float +passthru: typedef unsigned short GLhalfNV; +passthru: #endif +passthru: +passthru: #ifndef GLEXT_64_TYPES_DEFINED +passthru: /* This code block is duplicated in glxext.h, so must be protected */ +passthru: #define GLEXT_64_TYPES_DEFINED +passthru: /* Define int32_t, int64_t, and uint64_t types for UST/MSC */ +passthru: /* (as used in the GL_EXT_timer_query extension). */ +passthru: #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +passthru: #include <inttypes.h> +passthru: #elif defined(__sun__) || defined(__digital__) +passthru: #include <inttypes.h> +passthru: #if defined(__STDC__) +passthru: #if defined(__arch64__) || defined(_LP64) +passthru: typedef long int int64_t; +passthru: typedef unsigned long int uint64_t; +passthru: #else +passthru: typedef long long int int64_t; +passthru: typedef unsigned long long int uint64_t; +passthru: #endif /* __arch64__ */ +passthru: #endif /* __STDC__ */ +passthru: #elif defined( __VMS ) || defined(__sgi) +passthru: #include <inttypes.h> +passthru: #elif defined(__SCO__) || defined(__USLC__) +passthru: #include <stdint.h> +passthru: #elif defined(__UNIXOS2__) || defined(__SOL64__) +passthru: typedef long int int32_t; +passthru: typedef long long int int64_t; +passthru: typedef unsigned long long int uint64_t; +passthru: #elif defined(_WIN32) && defined(__GNUC__) +passthru: #include <stdint.h> +passthru: #elif defined(_WIN32) +passthru: typedef __int32 int32_t; +passthru: typedef __int64 int64_t; +passthru: typedef unsigned __int64 uint64_t; +passthru: #else +passthru: /* Fallback if nothing above works */ +passthru: #include <inttypes.h> +passthru: #endif +passthru: #endif +passthru: +passthru: #ifndef GL_EXT_timer_query +passthru: typedef int64_t GLint64EXT; +passthru: typedef uint64_t GLuint64EXT; +passthru: #endif +passthru: +passthru: #ifndef ARB_sync +passthru: typedef int64_t GLint64; +passthru: typedef uint64_t GLuint64; +passthru: typedef struct __GLsync *GLsync; +passthru: #endif +passthru: + +############################################################################### +############################################################################### +# +# OpenGL 1.0 commands +# +############################################################################### +############################################################################### + +############################################################################### +# +# drawing-control commands +# +############################################################################### + +CullFace(mode) + return void + param mode CullFaceMode in value + category VERSION_1_0 # old: drawing-control + version 1.0 + glxropcode 79 + offset 152 + +FrontFace(mode) + return void + param mode FrontFaceDirection in value + category VERSION_1_0 # old: drawing-control + version 1.0 + glxropcode 84 + offset 157 + +Hint(target, mode) + return void + param target HintTarget in value + param mode HintMode in value + category VERSION_1_0 # old: drawing-control + version 1.0 + glxropcode 85 + offset 158 + +LineWidth(width) + return void + param width CheckedFloat32 in value + category VERSION_1_0 # old: drawing-control + version 1.0 + glxropcode 95 + offset 168 + +PointSize(size) + return void + param size CheckedFloat32 in value + category VERSION_1_0 # old: drawing-control + version 1.0 + glxropcode 100 + offset 173 + +PolygonMode(face, mode) + return void + param face MaterialFace in value + param mode PolygonMode in value + category VERSION_1_0 # old: drawing-control + version 1.0 + glxropcode 101 + offset 174 + +Scissor(x, y, width, height) + return void + param x WinCoord in value + param y WinCoord in value + param width SizeI in value + param height SizeI in value + category VERSION_1_0 # old: drawing-control + version 1.0 + glxropcode 103 + offset 176 + +TexParameterf(target, pname, param) + return void + param target TextureTarget in value + param pname TextureParameterName in value + param param CheckedFloat32 in value + category VERSION_1_0 # old: drawing-control + version 1.0 + glxropcode 105 + wglflags small-data + offset 178 + +TexParameterfv(target, pname, params) + return void + param target TextureTarget in value + param pname TextureParameterName in value + param params CheckedFloat32 in array [COMPSIZE(pname)] + category VERSION_1_0 # old: drawing-control + version 1.0 + glxropcode 106 + wglflags small-data + offset 179 + +TexParameteri(target, pname, param) + return void + param target TextureTarget in value + param pname TextureParameterName in value + param param CheckedInt32 in value + category VERSION_1_0 # old: drawing-control + version 1.0 + glxropcode 107 + wglflags small-data + offset 180 + +TexParameteriv(target, pname, params) + return void + param target TextureTarget in value + param pname TextureParameterName in value + param params CheckedInt32 in array [COMPSIZE(pname)] + category VERSION_1_0 # old: drawing-control + version 1.0 + glxropcode 108 + wglflags small-data + offset 181 + +TexImage1D(target, level, internalformat, width, border, format, type, pixels) + return void + param target TextureTarget in value + param level CheckedInt32 in value + param internalformat TextureComponentCount in value + param width SizeI in value + param border CheckedInt32 in value + param format PixelFormat in value + param type PixelType in value + param pixels Void in array [COMPSIZE(format/type/width)] + category VERSION_1_0 # old: drawing-control + dlflags handcode + glxflags client-handcode server-handcode + version 1.0 + glxropcode 109 + wglflags client-handcode server-handcode + offset 182 + +TexImage2D(target, level, internalformat, width, height, border, format, type, pixels) + return void + param target TextureTarget in value + param level CheckedInt32 in value + param internalformat TextureComponentCount in value + param width SizeI in value + param height SizeI in value + param border CheckedInt32 in value + param format PixelFormat in value + param type PixelType in value + param pixels Void in array [COMPSIZE(format/type/width/height)] + category VERSION_1_0 # old: drawing-control + dlflags handcode + glxflags client-handcode server-handcode + version 1.0 + glxropcode 110 + wglflags client-handcode server-handcode + offset 183 + +############################################################################### +# +# framebuf commands +# +############################################################################### + +DrawBuffer(mode) + return void + param mode DrawBufferMode in value + category VERSION_1_0 # old: framebuf + version 1.0 + glxropcode 126 + offset 202 + +Clear(mask) + return void + param mask ClearBufferMask in value + category VERSION_1_0 # old: framebuf + version 1.0 + glxropcode 127 + offset 203 + +ClearColor(red, green, blue, alpha) + return void + param red ClampedColorF in value + param green ClampedColorF in value + param blue ClampedColorF in value + param alpha ClampedColorF in value + category VERSION_1_0 # old: framebuf + version 1.0 + glxropcode 130 + offset 206 + +ClearStencil(s) + return void + param s StencilValue in value + category VERSION_1_0 # old: framebuf + version 1.0 + glxropcode 131 + offset 207 + +ClearDepth(depth) + return void + param depth ClampedFloat64 in value + category VERSION_1_0 # old: framebuf + version 1.0 + glxropcode 132 + offset 208 + +StencilMask(mask) + return void + param mask MaskedStencilValue in value + category VERSION_1_0 # old: framebuf + version 1.0 + glxropcode 133 + offset 209 + +ColorMask(red, green, blue, alpha) + return void + param red Boolean in value + param green Boolean in value + param blue Boolean in value + param alpha Boolean in value + category VERSION_1_0 # old: framebuf + version 1.0 + glxropcode 134 + offset 210 + +DepthMask(flag) + return void + param flag Boolean in value + category VERSION_1_0 # old: framebuf + version 1.0 + glxropcode 135 + offset 211 + +############################################################################### +# +# misc commands +# +############################################################################### + +Disable(cap) + return void + param cap EnableCap in value + category VERSION_1_0 # old: misc + version 1.0 + dlflags handcode + glxflags client-handcode client-intercept + glxropcode 138 + offset 214 + +Enable(cap) + return void + param cap EnableCap in value + category VERSION_1_0 # old: misc + version 1.0 + dlflags handcode + glxflags client-handcode client-intercept + glxropcode 139 + offset 215 + +Finish() + return void + dlflags notlistable + glxflags client-handcode server-handcode + category VERSION_1_0 # old: misc + version 1.0 + glxsingle 108 + offset 216 + +Flush() + return void + dlflags notlistable + glxflags client-handcode client-intercept server-handcode + category VERSION_1_0 # old: misc + version 1.0 + glxsingle 142 + offset 217 + +############################################################################### +# +# pixel-op commands +# +############################################################################### + +BlendFunc(sfactor, dfactor) + return void + param sfactor BlendingFactorSrc in value + param dfactor BlendingFactorDest in value + category VERSION_1_0 # old: pixel-op + version 1.0 + glxropcode 160 + offset 241 + +LogicOp(opcode) + return void + param opcode LogicOp in value + category VERSION_1_0 # old: pixel-op + version 1.0 + glxropcode 161 + offset 242 + +StencilFunc(func, ref, mask) + return void + param func StencilFunction in value + param ref ClampedStencilValue in value + param mask MaskedStencilValue in value + category VERSION_1_0 # old: pixel-op + version 1.0 + glxropcode 162 + offset 243 + +StencilOp(fail, zfail, zpass) + return void + param fail StencilOp in value + param zfail StencilOp in value + param zpass StencilOp in value + category VERSION_1_0 # old: pixel-op + version 1.0 + glxropcode 163 + offset 244 + +DepthFunc(func) + return void + param func DepthFunction in value + category VERSION_1_0 # old: pixel-op + version 1.0 + glxropcode 164 + offset 245 + +############################################################################### +# +# pixel-rw commands +# +############################################################################### + +PixelStoref(pname, param) + return void + param pname PixelStoreParameter in value + param param CheckedFloat32 in value + dlflags notlistable + glxflags client-handcode + category VERSION_1_0 # old: pixel-rw + version 1.0 + glxsingle 109 + wglflags batchable + offset 249 + +PixelStorei(pname, param) + return void + param pname PixelStoreParameter in value + param param CheckedInt32 in value + dlflags notlistable + glxflags client-handcode + category VERSION_1_0 # old: pixel-rw + version 1.0 + glxsingle 110 + wglflags batchable + offset 250 + +ReadBuffer(mode) + return void + param mode ReadBufferMode in value + category VERSION_1_0 # old: pixel-rw + version 1.0 + glxropcode 171 + offset 254 + +ReadPixels(x, y, width, height, format, type, pixels) + return void + param x WinCoord in value + param y WinCoord in value + param width SizeI in value + param height SizeI in value + param format PixelFormat in value + param type PixelType in value + param pixels Void out array [COMPSIZE(format/type/width/height)] + category VERSION_1_0 # old: pixel-rw + dlflags notlistable + glxflags client-handcode server-handcode + version 1.0 + glxsingle 111 + wglflags client-handcode server-handcode + offset 256 + +############################################################################### +# +# state-req commands +# +############################################################################### + +GetBooleanv(pname, params) + return void + param pname GetPName in value + param params Boolean out array [COMPSIZE(pname)] + category VERSION_1_0 # old: state-req + dlflags notlistable + glxflags client-handcode + version 1.0 + glxsingle 112 + wglflags small-data + offset 258 + +GetDoublev(pname, params) + return void + param pname GetPName in value + param params Float64 out array [COMPSIZE(pname)] + category VERSION_1_0 # old: state-req + dlflags notlistable + glxflags client-handcode + version 1.0 + glxsingle 114 + wglflags small-data + offset 260 + +GetError() + return ErrorCode + category VERSION_1_0 # old: state-req + dlflags notlistable + glxflags client-handcode + version 1.0 + glxsingle 115 + offset 261 + +GetFloatv(pname, params) + return void + param pname GetPName in value + param params Float32 out array [COMPSIZE(pname)] + category VERSION_1_0 # old: state-req + dlflags notlistable + glxflags client-handcode + version 1.0 + glxsingle 116 + wglflags small-data + offset 262 + +GetIntegerv(pname, params) + return void + param pname GetPName in value + param params Int32 out array [COMPSIZE(pname)] + category VERSION_1_0 # old: state-req + dlflags notlistable + glxflags client-handcode + version 1.0 + glxsingle 117 + wglflags small-data + offset 263 + +GetString(name) + return String + param name StringName in value + category VERSION_1_0 # old: state-req + dlflags notlistable + glxflags client-handcode server-handcode + version 1.0 + glxsingle 129 + wglflags client-handcode server-handcode + offset 275 + +GetTexImage(target, level, format, type, pixels) + return void + param target TextureTarget in value + param level CheckedInt32 in value + param format PixelFormat in value + param type PixelType in value + param pixels Void out array [COMPSIZE(target/level/format/type)] + category VERSION_1_0 # old: state-req + dlflags notlistable + glxflags client-handcode server-handcode + version 1.0 + glxsingle 135 + wglflags client-handcode server-handcode + offset 281 + +GetTexParameterfv(target, pname, params) + return void + param target TextureTarget in value + param pname GetTextureParameter in value + param params Float32 out array [COMPSIZE(pname)] + category VERSION_1_0 # old: state-req + dlflags notlistable + version 1.0 + glxsingle 136 + wglflags small-data + offset 282 + +GetTexParameteriv(target, pname, params) + return void + param target TextureTarget in value + param pname GetTextureParameter in value + param params Int32 out array [COMPSIZE(pname)] + category VERSION_1_0 # old: state-req + dlflags notlistable + version 1.0 + glxsingle 137 + wglflags small-data + offset 283 + +GetTexLevelParameterfv(target, level, pname, params) + return void + param target TextureTarget in value + param level CheckedInt32 in value + param pname GetTextureParameter in value + param params Float32 out array [COMPSIZE(pname)] + category VERSION_1_0 # old: state-req + dlflags notlistable + version 1.0 + glxsingle 138 + wglflags small-data + offset 284 + +GetTexLevelParameteriv(target, level, pname, params) + return void + param target TextureTarget in value + param level CheckedInt32 in value + param pname GetTextureParameter in value + param params Int32 out array [COMPSIZE(pname)] + category VERSION_1_0 # old: state-req + dlflags notlistable + version 1.0 + glxsingle 139 + wglflags small-data + offset 285 + +IsEnabled(cap) + return Boolean + param cap EnableCap in value + category VERSION_1_0 # old: state-req + dlflags notlistable + version 1.0 + glxflags client-handcode client-intercept + glxsingle 140 + offset 286 + +############################################################################### +# +# xform commands +# +############################################################################### + +DepthRange(near, far) + return void + param near ClampedFloat64 in value + param far ClampedFloat64 in value + category VERSION_1_0 # old: xform + version 1.0 + glxropcode 174 + offset 288 + +Viewport(x, y, width, height) + return void + param x WinCoord in value + param y WinCoord in value + param width SizeI in value + param height SizeI in value + category VERSION_1_0 # old: xform + version 1.0 + glxropcode 191 + offset 305 + +############################################################################### +############################################################################### +# +# OpenGL 1.0 deprecated commands +# +############################################################################### +############################################################################### + +# display-list commands + +NewList(list, mode) + return void + param list List in value + param mode ListMode in value + dlflags notlistable + category VERSION_1_0_DEPRECATED # old: display-list + version 1.0 + deprecated 3.1 + glxsingle 101 + wglflags batchable + offset 0 + +EndList() + return void + dlflags notlistable + category VERSION_1_0_DEPRECATED # old: display-list + version 1.0 + deprecated 3.1 + glxsingle 102 + wglflags batchable + offset 1 + +CallList(list) + return void + param list List in value + category VERSION_1_0_DEPRECATED # old: display-list + version 1.0 + deprecated 3.1 + glxropcode 1 + offset 2 + +CallLists(n, type, lists) + return void + param n SizeI in value + param type ListNameType in value + param lists Void in array [COMPSIZE(n/type)] + category VERSION_1_0_DEPRECATED # old: display-list + glxflags client-handcode server-handcode + version 1.0 + deprecated 3.1 + glxropcode 2 + offset 3 + +DeleteLists(list, range) + return void + param list List in value + param range SizeI in value + dlflags notlistable + category VERSION_1_0_DEPRECATED # old: display-list + version 1.0 + deprecated 3.1 + glxsingle 103 + wglflags batchable + offset 4 + +GenLists(range) + return List + param range SizeI in value + dlflags notlistable + category VERSION_1_0_DEPRECATED # old: display-list + version 1.0 + deprecated 3.1 + glxsingle 104 + offset 5 + +ListBase(base) + return void + param base List in value + category VERSION_1_0_DEPRECATED # old: display-list + version 1.0 + deprecated 3.1 + glxropcode 3 + offset 6 + +# drawing commands + +Begin(mode) + return void + param mode BeginMode in value + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 4 + offset 7 + +Bitmap(width, height, xorig, yorig, xmove, ymove, bitmap) + return void + param width SizeI in value + param height SizeI in value + param xorig CoordF in value + param yorig CoordF in value + param xmove CoordF in value + param ymove CoordF in value + param bitmap UInt8 in array [COMPSIZE(width/height)] + category VERSION_1_0_DEPRECATED # old: drawing + dlflags handcode + glxflags client-handcode server-handcode + version 1.0 + deprecated 3.1 + glxropcode 5 + wglflags client-handcode server-handcode + offset 8 + +Color3b(red, green, blue) + return void + param red ColorB in value + param green ColorB in value + param blue ColorB in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv Color3bv + version 1.0 + deprecated 3.1 + offset 9 + +Color3bv(v) + return void + param v ColorB in array [3] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 6 + offset 10 + +Color3d(red, green, blue) + return void + param red ColorD in value + param green ColorD in value + param blue ColorD in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv Color3dv + version 1.0 + deprecated 3.1 + offset 11 + +Color3dv(v) + return void + param v ColorD in array [3] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 7 + offset 12 + +Color3f(red, green, blue) + return void + param red ColorF in value + param green ColorF in value + param blue ColorF in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv Color3fv + version 1.0 + deprecated 3.1 + offset 13 + +Color3fv(v) + return void + param v ColorF in array [3] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 8 + offset 14 + +Color3i(red, green, blue) + return void + param red ColorI in value + param green ColorI in value + param blue ColorI in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv Color3iv + version 1.0 + deprecated 3.1 + offset 15 + +Color3iv(v) + return void + param v ColorI in array [3] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 9 + offset 16 + +Color3s(red, green, blue) + return void + param red ColorS in value + param green ColorS in value + param blue ColorS in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv Color3sv + version 1.0 + deprecated 3.1 + offset 17 + +Color3sv(v) + return void + param v ColorS in array [3] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 10 + offset 18 + +Color3ub(red, green, blue) + return void + param red ColorUB in value + param green ColorUB in value + param blue ColorUB in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv Color3ubv + version 1.0 + deprecated 3.1 + offset 19 + +Color3ubv(v) + return void + param v ColorUB in array [3] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 11 + offset 20 + +Color3ui(red, green, blue) + return void + param red ColorUI in value + param green ColorUI in value + param blue ColorUI in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv Color3uiv + version 1.0 + deprecated 3.1 + offset 21 + +Color3uiv(v) + return void + param v ColorUI in array [3] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 12 + offset 22 + +Color3us(red, green, blue) + return void + param red ColorUS in value + param green ColorUS in value + param blue ColorUS in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv Color3usv + version 1.0 + deprecated 3.1 + offset 23 + +Color3usv(v) + return void + param v ColorUS in array [3] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 13 + offset 24 + +Color4b(red, green, blue, alpha) + return void + param red ColorB in value + param green ColorB in value + param blue ColorB in value + param alpha ColorB in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv Color4bv + version 1.0 + deprecated 3.1 + offset 25 + +Color4bv(v) + return void + param v ColorB in array [4] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 14 + offset 26 + +Color4d(red, green, blue, alpha) + return void + param red ColorD in value + param green ColorD in value + param blue ColorD in value + param alpha ColorD in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv Color4dv + version 1.0 + deprecated 3.1 + offset 27 + +Color4dv(v) + return void + param v ColorD in array [4] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 15 + offset 28 + +Color4f(red, green, blue, alpha) + return void + param red ColorF in value + param green ColorF in value + param blue ColorF in value + param alpha ColorF in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv Color4fv + version 1.0 + deprecated 3.1 + offset 29 + +Color4fv(v) + return void + param v ColorF in array [4] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 16 + offset 30 + +Color4i(red, green, blue, alpha) + return void + param red ColorI in value + param green ColorI in value + param blue ColorI in value + param alpha ColorI in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv Color4iv + version 1.0 + deprecated 3.1 + offset 31 + +Color4iv(v) + return void + param v ColorI in array [4] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 17 + offset 32 + +Color4s(red, green, blue, alpha) + return void + param red ColorS in value + param green ColorS in value + param blue ColorS in value + param alpha ColorS in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv Color4sv + version 1.0 + deprecated 3.1 + offset 33 + +Color4sv(v) + return void + param v ColorS in array [4] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 18 + offset 34 + +Color4ub(red, green, blue, alpha) + return void + param red ColorUB in value + param green ColorUB in value + param blue ColorUB in value + param alpha ColorUB in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv Color4ubv + version 1.0 + deprecated 3.1 + offset 35 + +Color4ubv(v) + return void + param v ColorUB in array [4] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 19 + offset 36 + +Color4ui(red, green, blue, alpha) + return void + param red ColorUI in value + param green ColorUI in value + param blue ColorUI in value + param alpha ColorUI in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv Color4uiv + version 1.0 + deprecated 3.1 + offset 37 + +Color4uiv(v) + return void + param v ColorUI in array [4] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 20 + offset 38 + +Color4us(red, green, blue, alpha) + return void + param red ColorUS in value + param green ColorUS in value + param blue ColorUS in value + param alpha ColorUS in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv Color4usv + version 1.0 + deprecated 3.1 + offset 39 + +Color4usv(v) + return void + param v ColorUS in array [4] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 21 + offset 40 + +EdgeFlag(flag) + return void + param flag Boolean in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv EdgeFlagv + version 1.0 + deprecated 3.1 + offset 41 + +EdgeFlagv(flag) + return void + param flag Boolean in array [1] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 22 + offset 42 + +End() + return void + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 23 + offset 43 + +Indexd(c) + return void + param c ColorIndexValueD in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv Indexdv + version 1.0 + deprecated 3.1 + offset 44 + +Indexdv(c) + return void + param c ColorIndexValueD in array [1] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 24 + offset 45 + +Indexf(c) + return void + param c ColorIndexValueF in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv Indexfv + version 1.0 + deprecated 3.1 + offset 46 + +Indexfv(c) + return void + param c ColorIndexValueF in array [1] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 25 + offset 47 + +Indexi(c) + return void + param c ColorIndexValueI in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv Indexiv + version 1.0 + deprecated 3.1 + offset 48 + +Indexiv(c) + return void + param c ColorIndexValueI in array [1] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 26 + offset 49 + +Indexs(c) + return void + param c ColorIndexValueS in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv Indexsv + version 1.0 + deprecated 3.1 + offset 50 + +Indexsv(c) + return void + param c ColorIndexValueS in array [1] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 27 + offset 51 + +Normal3b(nx, ny, nz) + return void + param nx Int8 in value + param ny Int8 in value + param nz Int8 in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv Normal3bv + version 1.0 + deprecated 3.1 + offset 52 + +Normal3bv(v) + return void + param v Int8 in array [3] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 28 + offset 53 + +Normal3d(nx, ny, nz) + return void + param nx CoordD in value + param ny CoordD in value + param nz CoordD in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv Normal3dv + version 1.0 + deprecated 3.1 + offset 54 + +Normal3dv(v) + return void + param v CoordD in array [3] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 29 + offset 55 + +Normal3f(nx, ny, nz) + return void + param nx CoordF in value + param ny CoordF in value + param nz CoordF in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv Normal3fv + version 1.0 + deprecated 3.1 + offset 56 + +Normal3fv(v) + return void + param v CoordF in array [3] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 30 + offset 57 + +Normal3i(nx, ny, nz) + return void + param nx Int32 in value + param ny Int32 in value + param nz Int32 in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv Normal3iv + version 1.0 + deprecated 3.1 + offset 58 + +Normal3iv(v) + return void + param v Int32 in array [3] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 31 + offset 59 + +Normal3s(nx, ny, nz) + return void + param nx Int16 in value + param ny Int16 in value + param nz Int16 in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv Normal3sv + version 1.0 + deprecated 3.1 + offset 60 + +Normal3sv(v) + return void + param v Int16 in array [3] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 32 + offset 61 + +RasterPos2d(x, y) + return void + param x CoordD in value + param y CoordD in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv RasterPos2dv + version 1.0 + deprecated 3.1 + offset 62 + +RasterPos2dv(v) + return void + param v CoordD in array [2] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 33 + offset 63 + +RasterPos2f(x, y) + return void + param x CoordF in value + param y CoordF in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv RasterPos2fv + version 1.0 + deprecated 3.1 + offset 64 + +RasterPos2fv(v) + return void + param v CoordF in array [2] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 34 + offset 65 + +RasterPos2i(x, y) + return void + param x CoordI in value + param y CoordI in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv RasterPos2iv + version 1.0 + deprecated 3.1 + offset 66 + +RasterPos2iv(v) + return void + param v CoordI in array [2] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 35 + offset 67 + +RasterPos2s(x, y) + return void + param x CoordS in value + param y CoordS in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv RasterPos2sv + version 1.0 + deprecated 3.1 + offset 68 + +RasterPos2sv(v) + return void + param v CoordS in array [2] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 36 + offset 69 + +RasterPos3d(x, y, z) + return void + param x CoordD in value + param y CoordD in value + param z CoordD in value + vectorequiv RasterPos3dv + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + offset 70 + +RasterPos3dv(v) + return void + param v CoordD in array [3] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 37 + offset 71 + +RasterPos3f(x, y, z) + return void + param x CoordF in value + param y CoordF in value + param z CoordF in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv RasterPos3fv + version 1.0 + deprecated 3.1 + offset 72 + +RasterPos3fv(v) + return void + param v CoordF in array [3] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 38 + offset 73 + +RasterPos3i(x, y, z) + return void + param x CoordI in value + param y CoordI in value + param z CoordI in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv RasterPos3iv + version 1.0 + deprecated 3.1 + offset 74 + +RasterPos3iv(v) + return void + param v CoordI in array [3] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 39 + offset 75 + +RasterPos3s(x, y, z) + return void + param x CoordS in value + param y CoordS in value + param z CoordS in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv RasterPos3sv + version 1.0 + deprecated 3.1 + offset 76 + +RasterPos3sv(v) + return void + param v CoordS in array [3] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 40 + offset 77 + +RasterPos4d(x, y, z, w) + return void + param x CoordD in value + param y CoordD in value + param z CoordD in value + param w CoordD in value + vectorequiv RasterPos4dv + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + offset 78 + +RasterPos4dv(v) + return void + param v CoordD in array [4] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 41 + offset 79 + +RasterPos4f(x, y, z, w) + return void + param x CoordF in value + param y CoordF in value + param z CoordF in value + param w CoordF in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv RasterPos4fv + version 1.0 + deprecated 3.1 + offset 80 + +RasterPos4fv(v) + return void + param v CoordF in array [4] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 42 + offset 81 + +RasterPos4i(x, y, z, w) + return void + param x CoordI in value + param y CoordI in value + param z CoordI in value + param w CoordI in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv RasterPos4iv + version 1.0 + deprecated 3.1 + offset 82 + +RasterPos4iv(v) + return void + param v CoordI in array [4] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 43 + offset 83 + +RasterPos4s(x, y, z, w) + return void + param x CoordS in value + param y CoordS in value + param z CoordS in value + param w CoordS in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv RasterPos4sv + version 1.0 + deprecated 3.1 + offset 84 + +RasterPos4sv(v) + return void + param v CoordS in array [4] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 44 + offset 85 + +Rectd(x1, y1, x2, y2) + return void + param x1 CoordD in value + param y1 CoordD in value + param x2 CoordD in value + param y2 CoordD in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv Rectdv + version 1.0 + deprecated 3.1 + offset 86 + +Rectdv(v1, v2) + return void + param v1 CoordD in array [2] + param v2 CoordD in array [2] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 45 + offset 87 + +Rectf(x1, y1, x2, y2) + return void + param x1 CoordF in value + param y1 CoordF in value + param x2 CoordF in value + param y2 CoordF in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv Rectfv + version 1.0 + deprecated 3.1 + offset 88 + +Rectfv(v1, v2) + return void + param v1 CoordF in array [2] + param v2 CoordF in array [2] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 46 + offset 89 + +Recti(x1, y1, x2, y2) + return void + param x1 CoordI in value + param y1 CoordI in value + param x2 CoordI in value + param y2 CoordI in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv Rectiv + version 1.0 + deprecated 3.1 + offset 90 + +Rectiv(v1, v2) + return void + param v1 CoordI in array [2] + param v2 CoordI in array [2] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 47 + offset 91 + +Rects(x1, y1, x2, y2) + return void + param x1 CoordS in value + param y1 CoordS in value + param x2 CoordS in value + param y2 CoordS in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv Rectsv + version 1.0 + deprecated 3.1 + offset 92 + +Rectsv(v1, v2) + return void + param v1 CoordS in array [2] + param v2 CoordS in array [2] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 48 + offset 93 + +TexCoord1d(s) + return void + param s CoordD in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv TexCoord1dv + version 1.0 + deprecated 3.1 + offset 94 + +TexCoord1dv(v) + return void + param v CoordD in array [1] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 49 + offset 95 + +TexCoord1f(s) + return void + param s CoordF in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv TexCoord1fv + version 1.0 + deprecated 3.1 + offset 96 + +TexCoord1fv(v) + return void + param v CoordF in array [1] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 50 + offset 97 + +TexCoord1i(s) + return void + param s CoordI in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv TexCoord1iv + version 1.0 + deprecated 3.1 + offset 98 + +TexCoord1iv(v) + return void + param v CoordI in array [1] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 51 + offset 99 + +TexCoord1s(s) + return void + param s CoordS in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv TexCoord1sv + version 1.0 + deprecated 3.1 + offset 100 + +TexCoord1sv(v) + return void + param v CoordS in array [1] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 52 + offset 101 + +TexCoord2d(s, t) + return void + param s CoordD in value + param t CoordD in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv TexCoord2dv + version 1.0 + deprecated 3.1 + offset 102 + +TexCoord2dv(v) + return void + param v CoordD in array [2] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 53 + offset 103 + +TexCoord2f(s, t) + return void + param s CoordF in value + param t CoordF in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv TexCoord2fv + version 1.0 + deprecated 3.1 + offset 104 + +TexCoord2fv(v) + return void + param v CoordF in array [2] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 54 + offset 105 + +TexCoord2i(s, t) + return void + param s CoordI in value + param t CoordI in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv TexCoord2iv + version 1.0 + deprecated 3.1 + offset 106 + +TexCoord2iv(v) + return void + param v CoordI in array [2] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 55 + offset 107 + +TexCoord2s(s, t) + return void + param s CoordS in value + param t CoordS in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv TexCoord2sv + version 1.0 + deprecated 3.1 + offset 108 + +TexCoord2sv(v) + return void + param v CoordS in array [2] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 56 + offset 109 + +TexCoord3d(s, t, r) + return void + param s CoordD in value + param t CoordD in value + param r CoordD in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv TexCoord3dv + version 1.0 + deprecated 3.1 + offset 110 + +TexCoord3dv(v) + return void + param v CoordD in array [3] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 57 + offset 111 + +TexCoord3f(s, t, r) + return void + param s CoordF in value + param t CoordF in value + param r CoordF in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv TexCoord3fv + version 1.0 + deprecated 3.1 + offset 112 + +TexCoord3fv(v) + return void + param v CoordF in array [3] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 58 + offset 113 + +TexCoord3i(s, t, r) + return void + param s CoordI in value + param t CoordI in value + param r CoordI in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv TexCoord3iv + version 1.0 + deprecated 3.1 + offset 114 + +TexCoord3iv(v) + return void + param v CoordI in array [3] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 59 + offset 115 + +TexCoord3s(s, t, r) + return void + param s CoordS in value + param t CoordS in value + param r CoordS in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv TexCoord3sv + version 1.0 + deprecated 3.1 + offset 116 + +TexCoord3sv(v) + return void + param v CoordS in array [3] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 60 + offset 117 + +TexCoord4d(s, t, r, q) + return void + param s CoordD in value + param t CoordD in value + param r CoordD in value + param q CoordD in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv TexCoord4dv + version 1.0 + deprecated 3.1 + offset 118 + +TexCoord4dv(v) + return void + param v CoordD in array [4] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 61 + offset 119 + +TexCoord4f(s, t, r, q) + return void + param s CoordF in value + param t CoordF in value + param r CoordF in value + param q CoordF in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv TexCoord4fv + version 1.0 + deprecated 3.1 + offset 120 + +TexCoord4fv(v) + return void + param v CoordF in array [4] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 62 + offset 121 + +TexCoord4i(s, t, r, q) + return void + param s CoordI in value + param t CoordI in value + param r CoordI in value + param q CoordI in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv TexCoord4iv + version 1.0 + deprecated 3.1 + offset 122 + +TexCoord4iv(v) + return void + param v CoordI in array [4] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 63 + offset 123 + +TexCoord4s(s, t, r, q) + return void + param s CoordS in value + param t CoordS in value + param r CoordS in value + param q CoordS in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv TexCoord4sv + version 1.0 + deprecated 3.1 + offset 124 + +TexCoord4sv(v) + return void + param v CoordS in array [4] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 64 + offset 125 + +Vertex2d(x, y) + return void + param x CoordD in value + param y CoordD in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv Vertex2dv + version 1.0 + deprecated 3.1 + offset 126 + +Vertex2dv(v) + return void + param v CoordD in array [2] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 65 + offset 127 + +Vertex2f(x, y) + return void + param x CoordF in value + param y CoordF in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv Vertex2fv + version 1.0 + deprecated 3.1 + offset 128 + +Vertex2fv(v) + return void + param v CoordF in array [2] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 66 + offset 129 + +Vertex2i(x, y) + return void + param x CoordI in value + param y CoordI in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv Vertex2iv + version 1.0 + deprecated 3.1 + offset 130 + +Vertex2iv(v) + return void + param v CoordI in array [2] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 67 + offset 131 + +Vertex2s(x, y) + return void + param x CoordS in value + param y CoordS in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv Vertex2sv + version 1.0 + deprecated 3.1 + offset 132 + +Vertex2sv(v) + return void + param v CoordS in array [2] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 68 + offset 133 + +Vertex3d(x, y, z) + return void + param x CoordD in value + param y CoordD in value + param z CoordD in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv Vertex3dv + version 1.0 + deprecated 3.1 + offset 134 + +Vertex3dv(v) + return void + param v CoordD in array [3] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 69 + offset 135 + +Vertex3f(x, y, z) + return void + param x CoordF in value + param y CoordF in value + param z CoordF in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv Vertex3fv + version 1.0 + deprecated 3.1 + offset 136 + +Vertex3fv(v) + return void + param v CoordF in array [3] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 70 + offset 137 + +Vertex3i(x, y, z) + return void + param x CoordI in value + param y CoordI in value + param z CoordI in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv Vertex3iv + version 1.0 + deprecated 3.1 + offset 138 + +Vertex3iv(v) + return void + param v CoordI in array [3] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 71 + offset 139 + +Vertex3s(x, y, z) + return void + param x CoordS in value + param y CoordS in value + param z CoordS in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv Vertex3sv + version 1.0 + deprecated 3.1 + offset 140 + +Vertex3sv(v) + return void + param v CoordS in array [3] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 72 + offset 141 + +Vertex4d(x, y, z, w) + return void + param x CoordD in value + param y CoordD in value + param z CoordD in value + param w CoordD in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv Vertex4dv + version 1.0 + deprecated 3.1 + offset 142 + +Vertex4dv(v) + return void + param v CoordD in array [4] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 73 + offset 143 + +Vertex4f(x, y, z, w) + return void + param x CoordF in value + param y CoordF in value + param z CoordF in value + param w CoordF in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv Vertex4fv + version 1.0 + deprecated 3.1 + offset 144 + +Vertex4fv(v) + return void + param v CoordF in array [4] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 74 + offset 145 + +Vertex4i(x, y, z, w) + return void + param x CoordI in value + param y CoordI in value + param z CoordI in value + param w CoordI in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv Vertex4iv + version 1.0 + deprecated 3.1 + offset 146 + +Vertex4iv(v) + return void + param v CoordI in array [4] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 75 + offset 147 + +Vertex4s(x, y, z, w) + return void + param x CoordS in value + param y CoordS in value + param z CoordS in value + param w CoordS in value + category VERSION_1_0_DEPRECATED # old: drawing + vectorequiv Vertex4sv + version 1.0 + deprecated 3.1 + offset 148 + +Vertex4sv(v) + return void + param v CoordS in array [4] + category VERSION_1_0_DEPRECATED # old: drawing + version 1.0 + deprecated 3.1 + glxropcode 76 + offset 149 + +ClipPlane(plane, equation) + return void + param plane ClipPlaneName in value + param equation Float64 in array [4] + category VERSION_1_0_DEPRECATED # old: drawing-control + version 1.0 + deprecated 3.1 + glxropcode 77 + offset 150 + +ColorMaterial(face, mode) + return void + param face MaterialFace in value + param mode ColorMaterialParameter in value + category VERSION_1_0_DEPRECATED # old: drawing-control + version 1.0 + deprecated 3.1 + glxropcode 78 + offset 151 + +Fogf(pname, param) + return void + param pname FogParameter in value + param param CheckedFloat32 in value + category VERSION_1_0_DEPRECATED # old: drawing-control + version 1.0 + deprecated 3.1 + glxropcode 80 + wglflags small-data + offset 153 + +Fogfv(pname, params) + return void + param pname FogParameter in value + param params CheckedFloat32 in array [COMPSIZE(pname)] + category VERSION_1_0_DEPRECATED # old: drawing-control + version 1.0 + deprecated 3.1 + glxropcode 81 + wglflags small-data + offset 154 + +Fogi(pname, param) + return void + param pname FogParameter in value + param param CheckedInt32 in value + category VERSION_1_0_DEPRECATED # old: drawing-control + version 1.0 + deprecated 3.1 + glxropcode 82 + wglflags small-data + offset 155 + +Fogiv(pname, params) + return void + param pname FogParameter in value + param params CheckedInt32 in array [COMPSIZE(pname)] + category VERSION_1_0_DEPRECATED # old: drawing-control + version 1.0 + deprecated 3.1 + glxropcode 83 + wglflags small-data + offset 156 + +Lightf(light, pname, param) + return void + param light LightName in value + param pname LightParameter in value + param param CheckedFloat32 in value + category VERSION_1_0_DEPRECATED # old: drawing-control + version 1.0 + deprecated 3.1 + glxropcode 86 + wglflags small-data + offset 159 + +Lightfv(light, pname, params) + return void + param light LightName in value + param pname LightParameter in value + param params CheckedFloat32 in array [COMPSIZE(pname)] + category VERSION_1_0_DEPRECATED # old: drawing-control + version 1.0 + deprecated 3.1 + glxropcode 87 + wglflags small-data + offset 160 + +Lighti(light, pname, param) + return void + param light LightName in value + param pname LightParameter in value + param param CheckedInt32 in value + category VERSION_1_0_DEPRECATED # old: drawing-control + version 1.0 + deprecated 3.1 + glxropcode 88 + wglflags small-data + offset 161 + +Lightiv(light, pname, params) + return void + param light LightName in value + param pname LightParameter in value + param params CheckedInt32 in array [COMPSIZE(pname)] + category VERSION_1_0_DEPRECATED # old: drawing-control + version 1.0 + deprecated 3.1 + glxropcode 89 + wglflags small-data + offset 162 + +LightModelf(pname, param) + return void + param pname LightModelParameter in value + param param Float32 in value + category VERSION_1_0_DEPRECATED # old: drawing-control + version 1.0 + deprecated 3.1 + glxropcode 90 + wglflags small-data + offset 163 + +LightModelfv(pname, params) + return void + param pname LightModelParameter in value + param params Float32 in array [COMPSIZE(pname)] + category VERSION_1_0_DEPRECATED # old: drawing-control + version 1.0 + deprecated 3.1 + glxropcode 91 + wglflags small-data + offset 164 + +LightModeli(pname, param) + return void + param pname LightModelParameter in value + param param Int32 in value + category VERSION_1_0_DEPRECATED # old: drawing-control + version 1.0 + deprecated 3.1 + glxropcode 92 + wglflags small-data + offset 165 + +LightModeliv(pname, params) + return void + param pname LightModelParameter in value + param params Int32 in array [COMPSIZE(pname)] + category VERSION_1_0_DEPRECATED # old: drawing-control + version 1.0 + deprecated 3.1 + glxropcode 93 + wglflags small-data + offset 166 + +LineStipple(factor, pattern) + return void + param factor CheckedInt32 in value + param pattern LineStipple in value + category VERSION_1_0_DEPRECATED # old: drawing-control + version 1.0 + deprecated 3.1 + glxropcode 94 + offset 167 + +Materialf(face, pname, param) + return void + param face MaterialFace in value + param pname MaterialParameter in value + param param CheckedFloat32 in value + category VERSION_1_0_DEPRECATED # old: drawing-control + version 1.0 + deprecated 3.1 + glxropcode 96 + wglflags small-data + offset 169 + +Materialfv(face, pname, params) + return void + param face MaterialFace in value + param pname MaterialParameter in value + param params CheckedFloat32 in array [COMPSIZE(pname)] + category VERSION_1_0_DEPRECATED # old: drawing-control + version 1.0 + deprecated 3.1 + glxropcode 97 + wglflags small-data + offset 170 + +Materiali(face, pname, param) + return void + param face MaterialFace in value + param pname MaterialParameter in value + param param CheckedInt32 in value + category VERSION_1_0_DEPRECATED # old: drawing-control + version 1.0 + deprecated 3.1 + glxropcode 98 + wglflags small-data + offset 171 + +Materialiv(face, pname, params) + return void + param face MaterialFace in value + param pname MaterialParameter in value + param params CheckedInt32 in array [COMPSIZE(pname)] + category VERSION_1_0_DEPRECATED # old: drawing-control + version 1.0 + deprecated 3.1 + glxropcode 99 + wglflags small-data + offset 172 + +PolygonStipple(mask) + return void + param mask UInt8 in array [COMPSIZE()] + category VERSION_1_0_DEPRECATED # old: drawing-control + dlflags handcode + glxflags client-handcode server-handcode + version 1.0 + deprecated 3.1 + glxropcode 102 + wglflags client-handcode server-handcode + offset 175 + +ShadeModel(mode) + return void + param mode ShadingModel in value + category VERSION_1_0_DEPRECATED # old: drawing-control + version 1.0 + deprecated 3.1 + glxropcode 104 + offset 177 + +TexEnvf(target, pname, param) + return void + param target TextureEnvTarget in value + param pname TextureEnvParameter in value + param param CheckedFloat32 in value + category VERSION_1_0_DEPRECATED # old: drawing-control + version 1.0 + deprecated 3.1 + glxropcode 111 + wglflags small-data + offset 184 + +TexEnvfv(target, pname, params) + return void + param target TextureEnvTarget in value + param pname TextureEnvParameter in value + param params CheckedFloat32 in array [COMPSIZE(pname)] + category VERSION_1_0_DEPRECATED # old: drawing-control + version 1.0 + deprecated 3.1 + glxropcode 112 + wglflags small-data + offset 185 + +TexEnvi(target, pname, param) + return void + param target TextureEnvTarget in value + param pname TextureEnvParameter in value + param param CheckedInt32 in value + category VERSION_1_0_DEPRECATED # old: drawing-control + version 1.0 + deprecated 3.1 + glxropcode 113 + wglflags small-data + offset 186 + +TexEnviv(target, pname, params) + return void + param target TextureEnvTarget in value + param pname TextureEnvParameter in value + param params CheckedInt32 in array [COMPSIZE(pname)] + category VERSION_1_0_DEPRECATED # old: drawing-control + version 1.0 + deprecated 3.1 + glxropcode 114 + wglflags small-data + offset 187 + +TexGend(coord, pname, param) + return void + param coord TextureCoordName in value + param pname TextureGenParameter in value + param param Float64 in value + category VERSION_1_0_DEPRECATED # old: drawing-control + version 1.0 + deprecated 3.1 + glxropcode 115 + wglflags small-data + offset 188 + +TexGendv(coord, pname, params) + return void + param coord TextureCoordName in value + param pname TextureGenParameter in value + param params Float64 in array [COMPSIZE(pname)] + category VERSION_1_0_DEPRECATED # old: drawing-control + version 1.0 + deprecated 3.1 + glxropcode 116 + wglflags small-data + offset 189 + +TexGenf(coord, pname, param) + return void + param coord TextureCoordName in value + param pname TextureGenParameter in value + param param CheckedFloat32 in value + category VERSION_1_0_DEPRECATED # old: drawing-control + version 1.0 + deprecated 3.1 + glxropcode 117 + wglflags small-data + offset 190 + +TexGenfv(coord, pname, params) + return void + param coord TextureCoordName in value + param pname TextureGenParameter in value + param params CheckedFloat32 in array [COMPSIZE(pname)] + category VERSION_1_0_DEPRECATED # old: drawing-control + version 1.0 + deprecated 3.1 + glxropcode 118 + wglflags small-data + offset 191 + +TexGeni(coord, pname, param) + return void + param coord TextureCoordName in value + param pname TextureGenParameter in value + param param CheckedInt32 in value + category VERSION_1_0_DEPRECATED # old: drawing-control + version 1.0 + deprecated 3.1 + glxropcode 119 + wglflags small-data + offset 192 + +TexGeniv(coord, pname, params) + return void + param coord TextureCoordName in value + param pname TextureGenParameter in value + param params CheckedInt32 in array [COMPSIZE(pname)] + category VERSION_1_0_DEPRECATED # old: drawing-control + version 1.0 + deprecated 3.1 + glxropcode 120 + wglflags small-data + offset 193 + +# feedback commands + +FeedbackBuffer(size, type, buffer) + return void + param size SizeI in value + param type FeedbackType in value + param buffer FeedbackElement out array [size] retained + dlflags notlistable + glxflags client-handcode server-handcode + category VERSION_1_0_DEPRECATED # old: feedback + version 1.0 + deprecated 3.1 + glxsingle 105 + wglflags client-handcode server-handcode batchable + offset 194 + +SelectBuffer(size, buffer) + return void + param size SizeI in value + param buffer SelectName out array [size] retained + dlflags notlistable + glxflags client-handcode server-handcode + category VERSION_1_0_DEPRECATED # old: feedback + version 1.0 + deprecated 3.1 + glxsingle 106 + wglflags client-handcode server-handcode batchable + offset 195 + +RenderMode(mode) + return Int32 + param mode RenderingMode in value + category VERSION_1_0_DEPRECATED # old: feedback + dlflags notlistable + glxflags client-handcode server-handcode + version 1.0 + deprecated 3.1 + glxsingle 107 + wglflags client-handcode server-handcode + offset 196 + +InitNames() + return void + category VERSION_1_0_DEPRECATED # old: feedback + version 1.0 + deprecated 3.1 + glxropcode 121 + offset 197 + +LoadName(name) + return void + param name SelectName in value + category VERSION_1_0_DEPRECATED # old: feedback + version 1.0 + deprecated 3.1 + glxropcode 122 + offset 198 + +PassThrough(token) + return void + param token FeedbackElement in value + category VERSION_1_0_DEPRECATED # old: feedback + version 1.0 + deprecated 3.1 + glxropcode 123 + offset 199 + +PopName() + return void + category VERSION_1_0_DEPRECATED # old: feedback + version 1.0 + deprecated 3.1 + glxropcode 124 + offset 200 + +PushName(name) + return void + param name SelectName in value + category VERSION_1_0_DEPRECATED # old: feedback + version 1.0 + deprecated 3.1 + glxropcode 125 + offset 201 + +ClearAccum(red, green, blue, alpha) + return void + param red Float32 in value + param green Float32 in value + param blue Float32 in value + param alpha Float32 in value + category VERSION_1_0_DEPRECATED # old: framebuf + version 1.0 + deprecated 3.1 + glxropcode 128 + offset 204 + +ClearIndex(c) + return void + param c MaskedColorIndexValueF in value + category VERSION_1_0_DEPRECATED # old: framebuf + version 1.0 + deprecated 3.1 + glxropcode 129 + offset 205 + +IndexMask(mask) + return void + param mask MaskedColorIndexValueI in value + category VERSION_1_0_DEPRECATED # old: framebuf + version 1.0 + deprecated 3.1 + glxropcode 136 + offset 212 + +Accum(op, value) + return void + param op AccumOp in value + param value CoordF in value + category VERSION_1_0_DEPRECATED # old: misc + version 1.0 + deprecated 3.1 + glxropcode 137 + offset 213 + +PopAttrib() + return void + category VERSION_1_0_DEPRECATED # old: misc + version 1.0 + deprecated 3.1 + glxropcode 141 + offset 218 + +PushAttrib(mask) + return void + param mask AttribMask in value + category VERSION_1_0_DEPRECATED # old: misc + version 1.0 + deprecated 3.1 + glxropcode 142 + offset 219 + +# modeling commands + +Map1d(target, u1, u2, stride, order, points) + return void + param target MapTarget in value + param u1 CoordD in value + param u2 CoordD in value + param stride Int32 in value + param order CheckedInt32 in value + param points CoordD in array [COMPSIZE(target/stride/order)] + category VERSION_1_0_DEPRECATED # old: modeling + dlflags handcode + glxflags client-handcode server-handcode + version 1.0 + deprecated 3.1 + glxropcode 143 + wglflags client-handcode server-handcode + offset 220 + +Map1f(target, u1, u2, stride, order, points) + return void + param target MapTarget in value + param u1 CoordF in value + param u2 CoordF in value + param stride Int32 in value + param order CheckedInt32 in value + param points CoordF in array [COMPSIZE(target/stride/order)] + category VERSION_1_0_DEPRECATED # old: modeling + dlflags handcode + glxflags client-handcode server-handcode + version 1.0 + deprecated 3.1 + glxropcode 144 + wglflags client-handcode server-handcode + offset 221 + +Map2d(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points) + return void + param target MapTarget in value + param u1 CoordD in value + param u2 CoordD in value + param ustride Int32 in value + param uorder CheckedInt32 in value + param v1 CoordD in value + param v2 CoordD in value + param vstride Int32 in value + param vorder CheckedInt32 in value + param points CoordD in array [COMPSIZE(target/ustride/uorder/vstride/vorder)] + category VERSION_1_0_DEPRECATED # old: modeling + dlflags handcode + glxflags client-handcode server-handcode + version 1.0 + deprecated 3.1 + glxropcode 145 + wglflags client-handcode server-handcode + offset 222 + +Map2f(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points) + return void + param target MapTarget in value + param u1 CoordF in value + param u2 CoordF in value + param ustride Int32 in value + param uorder CheckedInt32 in value + param v1 CoordF in value + param v2 CoordF in value + param vstride Int32 in value + param vorder CheckedInt32 in value + param points CoordF in array [COMPSIZE(target/ustride/uorder/vstride/vorder)] + category VERSION_1_0_DEPRECATED # old: modeling + dlflags handcode + glxflags client-handcode server-handcode + version 1.0 + deprecated 3.1 + glxropcode 146 + wglflags client-handcode server-handcode + offset 223 + +MapGrid1d(un, u1, u2) + return void + param un Int32 in value + param u1 CoordD in value + param u2 CoordD in value + category VERSION_1_0_DEPRECATED # old: modeling + version 1.0 + deprecated 3.1 + glxropcode 147 + offset 224 + +MapGrid1f(un, u1, u2) + return void + param un Int32 in value + param u1 CoordF in value + param u2 CoordF in value + category VERSION_1_0_DEPRECATED # old: modeling + version 1.0 + deprecated 3.1 + glxropcode 148 + offset 225 + +MapGrid2d(un, u1, u2, vn, v1, v2) + return void + param un Int32 in value + param u1 CoordD in value + param u2 CoordD in value + param vn Int32 in value + param v1 CoordD in value + param v2 CoordD in value + category VERSION_1_0_DEPRECATED # old: modeling + version 1.0 + deprecated 3.1 + glxropcode 149 + offset 226 + +MapGrid2f(un, u1, u2, vn, v1, v2) + return void + param un Int32 in value + param u1 CoordF in value + param u2 CoordF in value + param vn Int32 in value + param v1 CoordF in value + param v2 CoordF in value + category VERSION_1_0_DEPRECATED # old: modeling + version 1.0 + deprecated 3.1 + glxropcode 150 + offset 227 + +EvalCoord1d(u) + return void + param u CoordD in value + category VERSION_1_0_DEPRECATED # old: modeling + vectorequiv EvalCoord1dv + version 1.0 + deprecated 3.1 + offset 228 + +EvalCoord1dv(u) + return void + param u CoordD in array [1] + category VERSION_1_0_DEPRECATED # old: modeling + version 1.0 + deprecated 3.1 + glxropcode 151 + offset 229 + +EvalCoord1f(u) + return void + param u CoordF in value + category VERSION_1_0_DEPRECATED # old: modeling + vectorequiv EvalCoord1fv + version 1.0 + deprecated 3.1 + offset 230 + +EvalCoord1fv(u) + return void + param u CoordF in array [1] + category VERSION_1_0_DEPRECATED # old: modeling + version 1.0 + deprecated 3.1 + glxropcode 152 + offset 231 + +EvalCoord2d(u, v) + return void + param u CoordD in value + param v CoordD in value + category VERSION_1_0_DEPRECATED # old: modeling + vectorequiv EvalCoord2dv + version 1.0 + deprecated 3.1 + offset 232 + +EvalCoord2dv(u) + return void + param u CoordD in array [2] + category VERSION_1_0_DEPRECATED # old: modeling + version 1.0 + deprecated 3.1 + glxropcode 153 + offset 233 + +EvalCoord2f(u, v) + return void + param u CoordF in value + param v CoordF in value + category VERSION_1_0_DEPRECATED # old: modeling + vectorequiv EvalCoord2fv + version 1.0 + deprecated 3.1 + offset 234 + +EvalCoord2fv(u) + return void + param u CoordF in array [2] + category VERSION_1_0_DEPRECATED # old: modeling + version 1.0 + deprecated 3.1 + glxropcode 154 + offset 235 + +EvalMesh1(mode, i1, i2) + return void + param mode MeshMode1 in value + param i1 CheckedInt32 in value + param i2 CheckedInt32 in value + category VERSION_1_0_DEPRECATED # old: modeling + version 1.0 + deprecated 3.1 + glxropcode 155 + offset 236 + +EvalPoint1(i) + return void + param i Int32 in value + category VERSION_1_0_DEPRECATED # old: modeling + version 1.0 + deprecated 3.1 + glxropcode 156 + offset 237 + +EvalMesh2(mode, i1, i2, j1, j2) + return void + param mode MeshMode2 in value + param i1 CheckedInt32 in value + param i2 CheckedInt32 in value + param j1 CheckedInt32 in value + param j2 CheckedInt32 in value + category VERSION_1_0_DEPRECATED # old: modeling + version 1.0 + deprecated 3.1 + glxropcode 157 + offset 238 + +EvalPoint2(i, j) + return void + param i CheckedInt32 in value + param j CheckedInt32 in value + category VERSION_1_0_DEPRECATED # old: modeling + version 1.0 + deprecated 3.1 + glxropcode 158 + offset 239 + +AlphaFunc(func, ref) + return void + param func AlphaFunction in value + param ref ClampedFloat32 in value + category VERSION_1_0_DEPRECATED # old: pixel-op + version 1.0 + deprecated 3.1 + glxropcode 159 + offset 240 + +PixelZoom(xfactor, yfactor) + return void + param xfactor Float32 in value + param yfactor Float32 in value + category VERSION_1_0_DEPRECATED # old: pixel-rw + version 1.0 + deprecated 3.1 + glxropcode 165 + offset 246 + +PixelTransferf(pname, param) + return void + param pname PixelTransferParameter in value + param param CheckedFloat32 in value + category VERSION_1_0_DEPRECATED # old: pixel-rw + version 1.0 + deprecated 3.1 + glxropcode 166 + offset 247 + +PixelTransferi(pname, param) + return void + param pname PixelTransferParameter in value + param param CheckedInt32 in value + category VERSION_1_0_DEPRECATED # old: pixel-rw + version 1.0 + deprecated 3.1 + glxropcode 167 + offset 248 + +PixelMapfv(map, mapsize, values) + return void + param map PixelMap in value + param mapsize CheckedInt32 in value + param values Float32 in array [mapsize] + category VERSION_1_0_DEPRECATED # old: pixel-rw + glxflags client-handcode + version 1.0 + deprecated 3.1 + glxropcode 168 + offset 251 + +PixelMapuiv(map, mapsize, values) + return void + param map PixelMap in value + param mapsize CheckedInt32 in value + param values UInt32 in array [mapsize] + category VERSION_1_0_DEPRECATED # old: pixel-rw + glxflags client-handcode + version 1.0 + deprecated 3.1 + glxropcode 169 + offset 252 + +PixelMapusv(map, mapsize, values) + return void + param map PixelMap in value + param mapsize CheckedInt32 in value + param values UInt16 in array [mapsize] + category VERSION_1_0_DEPRECATED # old: pixel-rw + glxflags client-handcode + version 1.0 + deprecated 3.1 + glxropcode 170 + offset 253 + +CopyPixels(x, y, width, height, type) + return void + param x WinCoord in value + param y WinCoord in value + param width SizeI in value + param height SizeI in value + param type PixelCopyType in value + category VERSION_1_0_DEPRECATED # old: pixel-rw + version 1.0 + deprecated 3.1 + glxropcode 172 + offset 255 + +DrawPixels(width, height, format, type, pixels) + return void + param width SizeI in value + param height SizeI in value + param format PixelFormat in value + param type PixelType in value + param pixels Void in array [COMPSIZE(format/type/width/height)] + category VERSION_1_0_DEPRECATED # old: pixel-rw + dlflags handcode + glxflags client-handcode server-handcode + version 1.0 + deprecated 3.1 + glxropcode 173 + wglflags client-handcode server-handcode + offset 257 + +GetClipPlane(plane, equation) + return void + param plane ClipPlaneName in value + param equation Float64 out array [4] + category VERSION_1_0_DEPRECATED # old: state-req + dlflags notlistable + version 1.0 + deprecated 3.1 + glxsingle 113 + glxflags client-handcode server-handcode + offset 259 + +GetLightfv(light, pname, params) + return void + param light LightName in value + param pname LightParameter in value + param params Float32 out array [COMPSIZE(pname)] + category VERSION_1_0_DEPRECATED # old: state-req + dlflags notlistable + version 1.0 + deprecated 3.1 + glxsingle 118 + wglflags small-data + offset 264 + +GetLightiv(light, pname, params) + return void + param light LightName in value + param pname LightParameter in value + param params Int32 out array [COMPSIZE(pname)] + category VERSION_1_0_DEPRECATED # old: state-req + dlflags notlistable + version 1.0 + deprecated 3.1 + glxsingle 119 + wglflags small-data + offset 265 + +GetMapdv(target, query, v) + return void + param target MapTarget in value + param query GetMapQuery in value + param v Float64 out array [COMPSIZE(target/query)] + category VERSION_1_0_DEPRECATED # old: state-req + dlflags notlistable + version 1.0 + deprecated 3.1 + glxsingle 120 + offset 266 + +GetMapfv(target, query, v) + return void + param target MapTarget in value + param query GetMapQuery in value + param v Float32 out array [COMPSIZE(target/query)] + category VERSION_1_0_DEPRECATED # old: state-req + dlflags notlistable + version 1.0 + deprecated 3.1 + glxsingle 121 + offset 267 + +GetMapiv(target, query, v) + return void + param target MapTarget in value + param query GetMapQuery in value + param v Int32 out array [COMPSIZE(target/query)] + category VERSION_1_0_DEPRECATED # old: state-req + dlflags notlistable + version 1.0 + deprecated 3.1 + glxsingle 122 + offset 268 + +GetMaterialfv(face, pname, params) + return void + param face MaterialFace in value + param pname MaterialParameter in value + param params Float32 out array [COMPSIZE(pname)] + category VERSION_1_0_DEPRECATED # old: state-req + dlflags notlistable + version 1.0 + deprecated 3.1 + glxsingle 123 + wglflags small-data + offset 269 + +GetMaterialiv(face, pname, params) + return void + param face MaterialFace in value + param pname MaterialParameter in value + param params Int32 out array [COMPSIZE(pname)] + category VERSION_1_0_DEPRECATED # old: state-req + dlflags notlistable + version 1.0 + deprecated 3.1 + glxsingle 124 + wglflags small-data + offset 270 + +GetPixelMapfv(map, values) + return void + param map PixelMap in value + param values Float32 out array [COMPSIZE(map)] + category VERSION_1_0_DEPRECATED # old: state-req + dlflags notlistable + version 1.0 + deprecated 3.1 + glxsingle 125 + offset 271 + +GetPixelMapuiv(map, values) + return void + param map PixelMap in value + param values UInt32 out array [COMPSIZE(map)] + category VERSION_1_0_DEPRECATED # old: state-req + dlflags notlistable + version 1.0 + deprecated 3.1 + glxsingle 126 + offset 272 + +GetPixelMapusv(map, values) + return void + param map PixelMap in value + param values UInt16 out array [COMPSIZE(map)] + category VERSION_1_0_DEPRECATED # old: state-req + dlflags notlistable + version 1.0 + deprecated 3.1 + glxsingle 127 + offset 273 + +GetPolygonStipple(mask) + return void + param mask UInt8 out array [COMPSIZE()] + category VERSION_1_0_DEPRECATED # old: state-req + dlflags notlistable + glxflags client-handcode server-handcode + version 1.0 + deprecated 3.1 + glxsingle 128 + wglflags client-handcode server-handcode + offset 274 + +GetTexEnvfv(target, pname, params) + return void + param target TextureEnvTarget in value + param pname TextureEnvParameter in value + param params Float32 out array [COMPSIZE(pname)] + category VERSION_1_0_DEPRECATED # old: state-req + dlflags notlistable + version 1.0 + deprecated 3.1 + glxsingle 130 + wglflags small-data + offset 276 + +GetTexEnviv(target, pname, params) + return void + param target TextureEnvTarget in value + param pname TextureEnvParameter in value + param params Int32 out array [COMPSIZE(pname)] + category VERSION_1_0_DEPRECATED # old: state-req + dlflags notlistable + version 1.0 + deprecated 3.1 + glxsingle 131 + wglflags small-data + offset 277 + +GetTexGendv(coord, pname, params) + return void + param coord TextureCoordName in value + param pname TextureGenParameter in value + param params Float64 out array [COMPSIZE(pname)] + category VERSION_1_0_DEPRECATED # old: state-req + dlflags notlistable + version 1.0 + deprecated 3.1 + glxsingle 132 + wglflags small-data + offset 278 + +GetTexGenfv(coord, pname, params) + return void + param coord TextureCoordName in value + param pname TextureGenParameter in value + param params Float32 out array [COMPSIZE(pname)] + category VERSION_1_0_DEPRECATED # old: state-req + dlflags notlistable + version 1.0 + deprecated 3.1 + glxsingle 133 + wglflags small-data + offset 279 + +GetTexGeniv(coord, pname, params) + return void + param coord TextureCoordName in value + param pname TextureGenParameter in value + param params Int32 out array [COMPSIZE(pname)] + category VERSION_1_0_DEPRECATED # old: state-req + dlflags notlistable + version 1.0 + deprecated 3.1 + glxsingle 134 + wglflags small-data + offset 280 + +IsList(list) + return Boolean + param list List in value + category VERSION_1_0_DEPRECATED # old: state-req + dlflags notlistable + version 1.0 + deprecated 3.1 + glxsingle 141 + offset 287 + +Frustum(left, right, bottom, top, zNear, zFar) + return void + param left Float64 in value + param right Float64 in value + param bottom Float64 in value + param top Float64 in value + param zNear Float64 in value + param zFar Float64 in value + category VERSION_1_0_DEPRECATED # old: xform + version 1.0 + deprecated 3.1 + glxropcode 175 + offset 289 + +LoadIdentity() + return void + category VERSION_1_0_DEPRECATED # old: xform + version 1.0 + deprecated 3.1 + glxropcode 176 + offset 290 + +LoadMatrixf(m) + return void + param m Float32 in array [16] + category VERSION_1_0_DEPRECATED # old: xform + version 1.0 + deprecated 3.1 + glxropcode 177 + offset 291 + +LoadMatrixd(m) + return void + param m Float64 in array [16] + category VERSION_1_0_DEPRECATED # old: xform + version 1.0 + deprecated 3.1 + glxropcode 178 + offset 292 + +MatrixMode(mode) + return void + param mode MatrixMode in value + category VERSION_1_0_DEPRECATED # old: xform + version 1.0 + deprecated 3.1 + glxropcode 179 + offset 293 + +MultMatrixf(m) + return void + param m Float32 in array [16] + category VERSION_1_0_DEPRECATED # old: xform + version 1.0 + deprecated 3.1 + glxropcode 180 + offset 294 + +MultMatrixd(m) + return void + param m Float64 in array [16] + category VERSION_1_0_DEPRECATED # old: xform + version 1.0 + deprecated 3.1 + glxropcode 181 + offset 295 + +Ortho(left, right, bottom, top, zNear, zFar) + return void + param left Float64 in value + param right Float64 in value + param bottom Float64 in value + param top Float64 in value + param zNear Float64 in value + param zFar Float64 in value + category VERSION_1_0_DEPRECATED # old: xform + version 1.0 + deprecated 3.1 + glxropcode 182 + offset 296 + +PopMatrix() + return void + category VERSION_1_0_DEPRECATED # old: xform + version 1.0 + deprecated 3.1 + glxropcode 183 + offset 297 + +PushMatrix() + return void + category VERSION_1_0_DEPRECATED # old: xform + version 1.0 + deprecated 3.1 + glxropcode 184 + offset 298 + +Rotated(angle, x, y, z) + return void + param angle Float64 in value + param x Float64 in value + param y Float64 in value + param z Float64 in value + category VERSION_1_0_DEPRECATED # old: xform + version 1.0 + deprecated 3.1 + glxropcode 185 + offset 299 + +Rotatef(angle, x, y, z) + return void + param angle Float32 in value + param x Float32 in value + param y Float32 in value + param z Float32 in value + category VERSION_1_0_DEPRECATED # old: xform + version 1.0 + deprecated 3.1 + glxropcode 186 + offset 300 + +Scaled(x, y, z) + return void + param x Float64 in value + param y Float64 in value + param z Float64 in value + category VERSION_1_0_DEPRECATED # old: xform + version 1.0 + deprecated 3.1 + glxropcode 187 + offset 301 + +Scalef(x, y, z) + return void + param x Float32 in value + param y Float32 in value + param z Float32 in value + category VERSION_1_0_DEPRECATED # old: xform + version 1.0 + deprecated 3.1 + glxropcode 188 + offset 302 + +Translated(x, y, z) + return void + param x Float64 in value + param y Float64 in value + param z Float64 in value + category VERSION_1_0_DEPRECATED # old: xform + version 1.0 + deprecated 3.1 + glxropcode 189 + offset 303 + +Translatef(x, y, z) + return void + param x Float32 in value + param y Float32 in value + param z Float32 in value + category VERSION_1_0_DEPRECATED # old: xform + version 1.0 + deprecated 3.1 + glxropcode 190 + offset 304 + +############################################################################### +############################################################################### +# +# OpenGL 1.1 commands +# +############################################################################### +############################################################################### + +DrawArrays(mode, first, count) + return void + param mode BeginMode in value + param first Int32 in value + param count SizeI in value + category VERSION_1_1 + dlflags handcode + glxflags client-handcode client-intercept server-handcode + version 1.1 + glxropcode 193 + offset 310 + +DrawElements(mode, count, type, indices) + return void + param mode BeginMode in value + param count SizeI in value + param type DrawElementsType in value + param indices Void in array [COMPSIZE(count/type)] + category VERSION_1_1 + dlflags handcode + glxflags client-handcode client-intercept server-handcode + version 1.1 + offset 311 + +GetPointerv(pname, params) + return void + param pname GetPointervPName in value + param params VoidPointer out array [1] + category VERSION_1_1 + dlflags notlistable + glxflags client-handcode client-intercept server-handcode + version 1.1 + offset 329 + +PolygonOffset(factor, units) + return void + param factor Float32 in value + param units Float32 in value + category VERSION_1_1 + version 1.1 + glxropcode 192 + offset 319 + +# Arguably TexelInternalFormat, not PixelInternalFormat +CopyTexImage1D(target, level, internalformat, x, y, width, border) + return void + param target TextureTarget in value + param level CheckedInt32 in value + param internalformat PixelInternalFormat in value + param x WinCoord in value + param y WinCoord in value + param width SizeI in value + param border CheckedInt32 in value + category VERSION_1_1 + version 1.1 + glxropcode 4119 + glxflags EXT + offset 323 + +# Arguably TexelInternalFormat, not PixelInternalFormat +CopyTexImage2D(target, level, internalformat, x, y, width, height, border) + return void + param target TextureTarget in value + param level CheckedInt32 in value + param internalformat PixelInternalFormat in value + param x WinCoord in value + param y WinCoord in value + param width SizeI in value + param height SizeI in value + param border CheckedInt32 in value + category VERSION_1_1 + version 1.1 + glxropcode 4120 + glxflags EXT + offset 324 + +CopyTexSubImage1D(target, level, xoffset, x, y, width) + return void + param target TextureTarget in value + param level CheckedInt32 in value + param xoffset CheckedInt32 in value + param x WinCoord in value + param y WinCoord in value + param width SizeI in value + category VERSION_1_1 + version 1.1 + glxropcode 4121 + glxflags EXT + offset 325 + +CopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height) + return void + param target TextureTarget in value + param level CheckedInt32 in value + param xoffset CheckedInt32 in value + param yoffset CheckedInt32 in value + param x WinCoord in value + param y WinCoord in value + param width SizeI in value + param height SizeI in value + category VERSION_1_1 + version 1.1 + glxropcode 4122 + glxflags EXT + offset 326 + +TexSubImage1D(target, level, xoffset, width, format, type, pixels) + return void + param target TextureTarget in value + param level CheckedInt32 in value + param xoffset CheckedInt32 in value + param width SizeI in value + param format PixelFormat in value + param type PixelType in value + param pixels Void in array [COMPSIZE(format/type/width)] + category VERSION_1_1 + dlflags handcode + glxflags EXT client-handcode server-handcode + version 1.1 + glxropcode 4099 + offset 332 + +TexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels) + return void + param target TextureTarget in value + param level CheckedInt32 in value + param xoffset CheckedInt32 in value + param yoffset CheckedInt32 in value + param width SizeI in value + param height SizeI in value + param format PixelFormat in value + param type PixelType in value + param pixels Void in array [COMPSIZE(format/type/width/height)] + category VERSION_1_1 + dlflags handcode + glxflags EXT client-handcode server-handcode + version 1.1 + glxropcode 4100 + offset 333 + +BindTexture(target, texture) + return void + param target TextureTarget in value + param texture Texture in value + category VERSION_1_1 + version 1.1 + glxropcode 4117 + glxflags EXT + offset 307 + +DeleteTextures(n, textures) + return void + param n SizeI in value + param textures Texture in array [n] + category VERSION_1_1 + dlflags notlistable + version 1.1 + glxsingle 144 + offset 327 + +GenTextures(n, textures) + return void + param n SizeI in value + param textures Texture out array [n] + category VERSION_1_1 + dlflags notlistable + version 1.1 + glxsingle 145 + offset 328 + +IsTexture(texture) + return Boolean + param texture Texture in value + category VERSION_1_1 + dlflags notlistable + version 1.1 + glxsingle 146 + offset 330 + +############################################################################### +############################################################################### +# +# OpenGL 1.1 deprecated commands +# +############################################################################### +############################################################################### + +ArrayElement(i) + return void + param i Int32 in value + category VERSION_1_1_DEPRECATED + dlflags handcode + glxflags client-handcode client-intercept server-handcode + version 1.1 + deprecated 3.1 + offset 306 + +ColorPointer(size, type, stride, pointer) + return void + param size Int32 in value + param type ColorPointerType in value + param stride SizeI in value + param pointer Void in array [COMPSIZE(size/type/stride)] retained + category VERSION_1_1_DEPRECATED + dlflags notlistable + glxflags client-handcode client-intercept server-handcode + version 1.1 + deprecated 3.1 + offset 308 + +DisableClientState(array) + return void + param array EnableCap in value + category VERSION_1_1_DEPRECATED + version 1.1 + deprecated 3.1 + dlflags notlistable + glxflags client-handcode client-intercept server-handcode + offset 309 + +EdgeFlagPointer(stride, pointer) + return void + param stride SizeI in value + param pointer Void in array [COMPSIZE(stride)] retained + category VERSION_1_1_DEPRECATED + dlflags notlistable + glxflags client-handcode client-intercept server-handcode + version 1.1 + deprecated 3.1 + offset 312 + +EnableClientState(array) + return void + param array EnableCap in value + category VERSION_1_1_DEPRECATED + dlflags notlistable + glxflags client-handcode client-intercept server-handcode + version 1.1 + deprecated 3.1 + offset 313 + +IndexPointer(type, stride, pointer) + return void + param type IndexPointerType in value + param stride SizeI in value + param pointer Void in array [COMPSIZE(type/stride)] retained + category VERSION_1_1_DEPRECATED + dlflags notlistable + glxflags client-handcode client-intercept server-handcode + version 1.1 + deprecated 3.1 + offset 314 + +InterleavedArrays(format, stride, pointer) + return void + param format InterleavedArrayFormat in value + param stride SizeI in value + param pointer Void in array [COMPSIZE(format/stride)] retained + category VERSION_1_1_DEPRECATED + dlflags notlistable + glxflags client-handcode client-intercept server-handcode + version 1.1 + deprecated 3.1 + offset 317 + +NormalPointer(type, stride, pointer) + return void + param type NormalPointerType in value + param stride SizeI in value + param pointer Void in array [COMPSIZE(type/stride)] retained + category VERSION_1_1_DEPRECATED + dlflags notlistable + glxflags client-handcode client-intercept server-handcode + version 1.1 + deprecated 3.1 + offset 318 + +TexCoordPointer(size, type, stride, pointer) + return void + param size Int32 in value + param type TexCoordPointerType in value + param stride SizeI in value + param pointer Void in array [COMPSIZE(size/type/stride)] retained + category VERSION_1_1_DEPRECATED + dlflags notlistable + glxflags client-handcode client-intercept server-handcode + version 1.1 + deprecated 3.1 + offset 320 + +VertexPointer(size, type, stride, pointer) + return void + param size Int32 in value + param type VertexPointerType in value + param stride SizeI in value + param pointer Void in array [COMPSIZE(size/type/stride)] retained + category VERSION_1_1_DEPRECATED + dlflags notlistable + glxflags client-handcode client-intercept server-handcode + version 1.1 + deprecated 3.1 + offset 321 + +AreTexturesResident(n, textures, residences) + return Boolean + param n SizeI in value + param textures Texture in array [n] + param residences Boolean out array [n] + category VERSION_1_1_DEPRECATED + glxsingle 143 + dlflags notlistable + version 1.1 + deprecated 3.1 + offset 322 + +PrioritizeTextures(n, textures, priorities) + return void + param n SizeI in value + param textures Texture in array [n] + param priorities ClampedFloat32 in array [n] + category VERSION_1_1_DEPRECATED + version 1.1 + deprecated 3.1 + glxropcode 4118 + glxflags EXT + offset 331 + +Indexub(c) + return void + param c ColorIndexValueUB in value + category VERSION_1_1_DEPRECATED + vectorequiv Indexubv + version 1.1 + offset 315 + +Indexubv(c) + return void + param c ColorIndexValueUB in array [1] + category VERSION_1_1_DEPRECATED + version 1.1 + glxropcode 194 + offset 316 + +PopClientAttrib() + return void + category VERSION_1_1_DEPRECATED + version 1.1 + deprecated 3.1 + dlflags notlistable + glxflags client-handcode client-intercept server-handcode + offset 334 + +PushClientAttrib(mask) + return void + param mask ClientAttribMask in value + category VERSION_1_1_DEPRECATED + version 1.1 + deprecated 3.1 + dlflags notlistable + glxflags client-handcode client-intercept server-handcode + offset 335 + +############################################################################### +############################################################################### +# +# OpenGL 1.2 commands +# +############################################################################### +############################################################################### + +BlendColor(red, green, blue, alpha) + return void + param red ClampedColorF in value + param green ClampedColorF in value + param blue ClampedColorF in value + param alpha ClampedColorF in value + category VERSION_1_2 + glxflags EXT + version 1.2 + glxropcode 4096 + offset 336 + +BlendEquation(mode) + return void + param mode BlendEquationMode in value + category VERSION_1_2 + glxflags EXT + version 1.2 + glxropcode 4097 + offset 337 + +DrawRangeElements(mode, start, end, count, type, indices) + return void + param mode BeginMode in value + param start UInt32 in value + param end UInt32 in value + param count SizeI in value + param type DrawElementsType in value + param indices Void in array [COMPSIZE(count/type)] + category VERSION_1_2 + dlflags handcode + glxflags client-handcode client-intercept server-handcode + version 1.2 + offset 338 + +# OpenGL 1.2 (EXT_texture3D) commands + +# Arguably TexelInternalFormat, not PixelInternalFormat +TexImage3D(target, level, internalformat, width, height, depth, border, format, type, pixels) + return void + param target TextureTarget in value + param level CheckedInt32 in value + param internalformat TextureComponentCount in value + param width SizeI in value + param height SizeI in value + param depth SizeI in value + param border CheckedInt32 in value + param format PixelFormat in value + param type PixelType in value + param pixels Void in array [COMPSIZE(format/type/width/height/depth)] + category VERSION_1_2 + dlflags handcode + glxflags client-handcode server-handcode EXT + version 1.2 + deprecated 3.1 + glxropcode 4114 + offset 371 + +TexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels) + return void + param target TextureTarget in value + param level CheckedInt32 in value + param xoffset CheckedInt32 in value + param yoffset CheckedInt32 in value + param zoffset CheckedInt32 in value + param width SizeI in value + param height SizeI in value + param depth SizeI in value + param format PixelFormat in value + param type PixelType in value + param pixels Void in array [COMPSIZE(format/type/width/height/depth)] + category VERSION_1_2 + dlflags handcode + glxflags client-handcode server-handcode EXT + version 1.2 + glxropcode 4115 + offset 372 + +# OpenGL 1.2 (EXT_copy_texture) commands (specific to texture3D) + +CopyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, height) + return void + param target TextureTarget in value + param level CheckedInt32 in value + param xoffset CheckedInt32 in value + param yoffset CheckedInt32 in value + param zoffset CheckedInt32 in value + param x WinCoord in value + param y WinCoord in value + param width SizeI in value + param height SizeI in value + category VERSION_1_2 + glxflags EXT + version 1.2 + glxropcode 4123 + offset 373 + +############################################################################### +############################################################################### +# +# OpenGL 1.2 deprecated commands +# +############################################################################### +############################################################################### + +# OpenGL 1.2 (SGI_color_table) commands + +ColorTable(target, internalformat, width, format, type, table) + return void + param target ColorTableTarget in value + param internalformat PixelInternalFormat in value + param width SizeI in value + param format PixelFormat in value + param type PixelType in value + param table Void in array [COMPSIZE(format/type/width)] + category VERSION_1_2_DEPRECATED + dlflags handcode + glxflags client-handcode server-handcode EXT + version 1.2 + deprecated 3.1 + glxropcode 2053 + offset 339 + +ColorTableParameterfv(target, pname, params) + return void + param target ColorTableTarget in value + param pname ColorTableParameterPName in value + param params CheckedFloat32 in array [COMPSIZE(pname)] + category VERSION_1_2_DEPRECATED + glxflags EXT + version 1.2 + deprecated 3.1 + glxropcode 2054 + offset 340 + +ColorTableParameteriv(target, pname, params) + return void + param target ColorTableTarget in value + param pname ColorTableParameterPName in value + param params CheckedInt32 in array [COMPSIZE(pname)] + category VERSION_1_2_DEPRECATED + glxflags EXT + version 1.2 + deprecated 3.1 + glxropcode 2055 + offset 341 + +CopyColorTable(target, internalformat, x, y, width) + return void + param target ColorTableTarget in value + param internalformat PixelInternalFormat in value + param x WinCoord in value + param y WinCoord in value + param width SizeI in value + category VERSION_1_2_DEPRECATED + glxflags EXT + version 1.2 + deprecated 3.1 + glxropcode 2056 + offset 342 + +GetColorTable(target, format, type, table) + return void + param target ColorTableTarget in value + param format PixelFormat in value + param type PixelType in value + param table Void out array [COMPSIZE(target/format/type)] + category VERSION_1_2_DEPRECATED + dlflags notlistable + glxflags client-handcode server-handcode + version 1.2 + deprecated 3.1 + glxsingle 147 + offset 343 + +GetColorTableParameterfv(target, pname, params) + return void + param target ColorTableTarget in value + param pname GetColorTableParameterPName in value + param params Float32 out array [COMPSIZE(pname)] + category VERSION_1_2_DEPRECATED + dlflags notlistable + version 1.2 + deprecated 3.1 + glxsingle 148 + offset 344 + +GetColorTableParameteriv(target, pname, params) + return void + param target ColorTableTarget in value + param pname GetColorTableParameterPName in value + param params Int32 out array [COMPSIZE(pname)] + category VERSION_1_2_DEPRECATED + dlflags notlistable + version 1.2 + deprecated 3.1 + glxsingle 149 + offset 345 + +# OpenGL 1.2 (EXT_color_subtable) commands + +ColorSubTable(target, start, count, format, type, data) + return void + param target ColorTableTarget in value + param start SizeI in value + param count SizeI in value + param format PixelFormat in value + param type PixelType in value + param data Void in array [COMPSIZE(format/type/count)] + category VERSION_1_2_DEPRECATED + dlflags handcode + glxflags client-handcode server-handcode + version 1.2 + deprecated 3.1 + glxropcode 195 + offset 346 + +CopyColorSubTable(target, start, x, y, width) + return void + param target ColorTableTarget in value + param start SizeI in value + param x WinCoord in value + param y WinCoord in value + param width SizeI in value + category VERSION_1_2_DEPRECATED + version 1.2 + deprecated 3.1 + glxropcode 196 + offset 347 + +# OpenGL 1.2 (EXT_convolution) commands + +ConvolutionFilter1D(target, internalformat, width, format, type, image) + return void + param target ConvolutionTarget in value + param internalformat PixelInternalFormat in value + param width SizeI in value + param format PixelFormat in value + param type PixelType in value + param image Void in array [COMPSIZE(format/type/width)] + category VERSION_1_2_DEPRECATED + dlflags handcode + glxflags client-handcode server-handcode EXT + version 1.2 + deprecated 3.1 + glxropcode 4101 + offset 348 + +ConvolutionFilter2D(target, internalformat, width, height, format, type, image) + return void + param target ConvolutionTarget in value + param internalformat PixelInternalFormat in value + param width SizeI in value + param height SizeI in value + param format PixelFormat in value + param type PixelType in value + param image Void in array [COMPSIZE(format/type/width/height)] + category VERSION_1_2_DEPRECATED + dlflags handcode + glxflags client-handcode server-handcode EXT + version 1.2 + deprecated 3.1 + glxropcode 4102 + offset 349 + +ConvolutionParameterf(target, pname, params) + return void + param target ConvolutionTarget in value + param pname ConvolutionParameter in value + param params CheckedFloat32 in value + category VERSION_1_2_DEPRECATED + glxflags EXT + version 1.2 + deprecated 3.1 + glxropcode 4103 + offset 350 + +ConvolutionParameterfv(target, pname, params) + return void + param target ConvolutionTarget in value + param pname ConvolutionParameter in value + param params CheckedFloat32 in array [COMPSIZE(pname)] + category VERSION_1_2_DEPRECATED + glxflags EXT + version 1.2 + deprecated 3.1 + glxropcode 4104 + offset 351 + +ConvolutionParameteri(target, pname, params) + return void + param target ConvolutionTarget in value + param pname ConvolutionParameter in value + param params CheckedInt32 in value + category VERSION_1_2_DEPRECATED + glxflags EXT + version 1.2 + deprecated 3.1 + glxropcode 4105 + offset 352 + +ConvolutionParameteriv(target, pname, params) + return void + param target ConvolutionTarget in value + param pname ConvolutionParameter in value + param params CheckedInt32 in array [COMPSIZE(pname)] + category VERSION_1_2_DEPRECATED + glxflags EXT + version 1.2 + deprecated 3.1 + glxropcode 4106 + offset 353 + +CopyConvolutionFilter1D(target, internalformat, x, y, width) + return void + param target ConvolutionTarget in value + param internalformat PixelInternalFormat in value + param x WinCoord in value + param y WinCoord in value + param width SizeI in value + category VERSION_1_2_DEPRECATED + glxflags EXT + version 1.2 + deprecated 3.1 + glxropcode 4107 + offset 354 + +CopyConvolutionFilter2D(target, internalformat, x, y, width, height) + return void + param target ConvolutionTarget in value + param internalformat PixelInternalFormat in value + param x WinCoord in value + param y WinCoord in value + param width SizeI in value + param height SizeI in value + category VERSION_1_2_DEPRECATED + glxflags EXT + version 1.2 + deprecated 3.1 + glxropcode 4108 + offset 355 + +GetConvolutionFilter(target, format, type, image) + return void + param target ConvolutionTarget in value + param format PixelFormat in value + param type PixelType in value + param image Void out array [COMPSIZE(target/format/type)] + category VERSION_1_2_DEPRECATED + dlflags notlistable + glxflags client-handcode server-handcode + version 1.2 + deprecated 3.1 + glxsingle 150 + offset 356 + +GetConvolutionParameterfv(target, pname, params) + return void + param target ConvolutionTarget in value + param pname GetConvolutionParameterPName in value + param params Float32 out array [COMPSIZE(pname)] + category VERSION_1_2_DEPRECATED + dlflags notlistable + version 1.2 + deprecated 3.1 + glxsingle 151 + offset 357 + +GetConvolutionParameteriv(target, pname, params) + return void + param target ConvolutionTarget in value + param pname GetConvolutionParameterPName in value + param params Int32 out array [COMPSIZE(pname)] + category VERSION_1_2_DEPRECATED + dlflags notlistable + version 1.2 + deprecated 3.1 + glxsingle 152 + offset 358 + +GetSeparableFilter(target, format, type, row, column, span) + return void + param target SeparableTarget in value + param format PixelFormat in value + param type PixelType in value + param row Void out array [COMPSIZE(target/format/type)] + param column Void out array [COMPSIZE(target/format/type)] + param span Void out array [COMPSIZE(target/format/type)] + category VERSION_1_2_DEPRECATED + dlflags notlistable + glxflags client-handcode server-handcode + version 1.2 + deprecated 3.1 + glxsingle 153 + offset 359 + +SeparableFilter2D(target, internalformat, width, height, format, type, row, column) + return void + param target SeparableTarget in value + param internalformat PixelInternalFormat in value + param width SizeI in value + param height SizeI in value + param format PixelFormat in value + param type PixelType in value + param row Void in array [COMPSIZE(target/format/type/width)] + param column Void in array [COMPSIZE(target/format/type/height)] + category VERSION_1_2_DEPRECATED + dlflags handcode + glxflags client-handcode server-handcode EXT + version 1.2 + deprecated 3.1 + glxropcode 4109 + offset 360 + +# OpenGL 1.2 (EXT_histogram) commands + +GetHistogram(target, reset, format, type, values) + return void + param target HistogramTarget in value + param reset Boolean in value + param format PixelFormat in value + param type PixelType in value + param values Void out array [COMPSIZE(target/format/type)] + category VERSION_1_2_DEPRECATED + dlflags notlistable + glxflags client-handcode server-handcode + version 1.2 + deprecated 3.1 + glxsingle 154 + offset 361 + +GetHistogramParameterfv(target, pname, params) + return void + param target HistogramTarget in value + param pname GetHistogramParameterPName in value + param params Float32 out array [COMPSIZE(pname)] + category VERSION_1_2_DEPRECATED + dlflags notlistable + version 1.2 + deprecated 3.1 + glxsingle 155 + offset 362 + +GetHistogramParameteriv(target, pname, params) + return void + param target HistogramTarget in value + param pname GetHistogramParameterPName in value + param params Int32 out array [COMPSIZE(pname)] + category VERSION_1_2_DEPRECATED + dlflags notlistable + version 1.2 + deprecated 3.1 + glxsingle 156 + offset 363 + +GetMinmax(target, reset, format, type, values) + return void + param target MinmaxTarget in value + param reset Boolean in value + param format PixelFormat in value + param type PixelType in value + param values Void out array [COMPSIZE(target/format/type)] + category VERSION_1_2_DEPRECATED + dlflags notlistable + glxflags client-handcode server-handcode + version 1.2 + deprecated 3.1 + glxsingle 157 + offset 364 + +GetMinmaxParameterfv(target, pname, params) + return void + param target MinmaxTarget in value + param pname GetMinmaxParameterPName in value + param params Float32 out array [COMPSIZE(pname)] + category VERSION_1_2_DEPRECATED + dlflags notlistable + version 1.2 + deprecated 3.1 + glxsingle 158 + offset 365 + +GetMinmaxParameteriv(target, pname, params) + return void + param target MinmaxTarget in value + param pname GetMinmaxParameterPName in value + param params Int32 out array [COMPSIZE(pname)] + category VERSION_1_2_DEPRECATED + dlflags notlistable + version 1.2 + deprecated 3.1 + glxsingle 159 + offset 366 + +Histogram(target, width, internalformat, sink) + return void + param target HistogramTarget in value + param width SizeI in value + param internalformat PixelInternalFormat in value + param sink Boolean in value + category VERSION_1_2_DEPRECATED + dlflags handcode + glxflags EXT + version 1.2 + deprecated 3.1 + glxropcode 4110 + offset 367 + +Minmax(target, internalformat, sink) + return void + param target MinmaxTarget in value + param internalformat PixelInternalFormat in value + param sink Boolean in value + category VERSION_1_2_DEPRECATED + glxflags EXT + version 1.2 + deprecated 3.1 + glxropcode 4111 + offset 368 + +ResetHistogram(target) + return void + param target HistogramTarget in value + category VERSION_1_2_DEPRECATED + glxflags EXT + version 1.2 + deprecated 3.1 + glxropcode 4112 + offset 369 + +ResetMinmax(target) + return void + param target MinmaxTarget in value + category VERSION_1_2_DEPRECATED + glxflags EXT + version 1.2 + deprecated 3.1 + glxropcode 4113 + offset 370 + +############################################################################### +############################################################################### +# +# OpenGL 1.3 commands +# +############################################################################### +############################################################################### + +# OpenGL 1.3 (ARB_multitexture) commands + +ActiveTexture(texture) + return void + param texture TextureUnit in value + category VERSION_1_3 + glxflags ARB + version 1.3 + glxropcode 197 + offset 374 + +# OpenGL 1.3 (ARB_multisample) commands + +SampleCoverage(value, invert) + return void + param value ClampedFloat32 in value + param invert Boolean in value + category VERSION_1_3 + glxflags ARB + version 1.3 + glxropcode 229 + offset 412 + +# OpenGL 1.3 (ARB_texture_compression) commands + +# Arguably TexelInternalFormat, not PixelInternalFormat +CompressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, data) + return void + param target TextureTarget in value + param level CheckedInt32 in value + param internalformat PixelInternalFormat in value + param width SizeI in value + param height SizeI in value + param depth SizeI in value + param border CheckedInt32 in value + param imageSize SizeI in value + param data CompressedTextureARB in array [imageSize] + category VERSION_1_3 + dlflags handcode + glxflags ARB client-handcode server-handcode + version 1.3 + glxropcode 216 + wglflags client-handcode server-handcode + offset 554 + +# Arguably TexelInternalFormat, not PixelInternalFormat +CompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data) + return void + param target TextureTarget in value + param level CheckedInt32 in value + param internalformat PixelInternalFormat in value + param width SizeI in value + param height SizeI in value + param border CheckedInt32 in value + param imageSize SizeI in value + param data CompressedTextureARB in array [imageSize] + category VERSION_1_3 + dlflags handcode + glxflags ARB client-handcode server-handcode + version 1.3 + glxropcode 215 + wglflags client-handcode server-handcode + offset 555 + +# Arguably TexelInternalFormat, not PixelInternalFormat +CompressedTexImage1D(target, level, internalformat, width, border, imageSize, data) + return void + param target TextureTarget in value + param level CheckedInt32 in value + param internalformat PixelInternalFormat in value + param width SizeI in value + param border CheckedInt32 in value + param imageSize SizeI in value + param data CompressedTextureARB in array [imageSize] + category VERSION_1_3 + dlflags handcode + glxflags ARB client-handcode server-handcode + version 1.3 + glxropcode 214 + wglflags client-handcode server-handcode + offset 556 + +CompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data) + return void + param target TextureTarget in value + param level CheckedInt32 in value + param xoffset CheckedInt32 in value + param yoffset CheckedInt32 in value + param zoffset CheckedInt32 in value + param width SizeI in value + param height SizeI in value + param depth SizeI in value + param format PixelFormat in value + param imageSize SizeI in value + param data CompressedTextureARB in array [imageSize] + category VERSION_1_3 + dlflags handcode + glxflags ARB client-handcode server-handcode + version 1.3 + glxropcode 219 + wglflags client-handcode server-handcode + offset 557 + +CompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data) + return void + param target TextureTarget in value + param level CheckedInt32 in value + param xoffset CheckedInt32 in value + param yoffset CheckedInt32 in value + param width SizeI in value + param height SizeI in value + param format PixelFormat in value + param imageSize SizeI in value + param data CompressedTextureARB in array [imageSize] + category VERSION_1_3 + dlflags handcode + glxflags ARB client-handcode server-handcode + version 1.3 + glxropcode 218 + wglflags client-handcode server-handcode + offset 558 + +CompressedTexSubImage1D(target, level, xoffset, width, format, imageSize, data) + return void + param target TextureTarget in value + param level CheckedInt32 in value + param xoffset CheckedInt32 in value + param width SizeI in value + param format PixelFormat in value + param imageSize SizeI in value + param data CompressedTextureARB in array [imageSize] + category VERSION_1_3 + dlflags handcode + glxflags ARB client-handcode server-handcode + version 1.3 + glxropcode 217 + wglflags client-handcode server-handcode + offset 559 + +GetCompressedTexImage(target, level, img) + return void + param target TextureTarget in value + param level CheckedInt32 in value + param img CompressedTextureARB out array [COMPSIZE(target/level)] + category VERSION_1_3 + dlflags notlistable + glxflags ARB client-handcode server-handcode + version 1.3 + glxsingle 160 + wglflags client-handcode server-handcode + offset 560 + +############################################################################### +############################################################################### +# +# OpenGL 1.3 deprecated commands +# +############################################################################### +############################################################################### + +ClientActiveTexture(texture) + return void + param texture TextureUnit in value + category VERSION_1_3_DEPRECATED + dlflags notlistable + glxflags ARB client-handcode client-intercept server-handcode + version 1.3 + deprecated 3.1 + offset 375 + +MultiTexCoord1d(target, s) + return void + param target TextureUnit in value + param s CoordD in value + category VERSION_1_3_DEPRECATED + glxflags ARB + version 1.3 + deprecated 3.1 + vectorequiv MultiTexCoord1dv + offset 376 + +MultiTexCoord1dv(target, v) + return void + param target TextureUnit in value + param v CoordD in array [1] + category VERSION_1_3_DEPRECATED + glxflags ARB + version 1.3 + deprecated 3.1 + glxropcode 198 + offset 377 + +MultiTexCoord1f(target, s) + return void + param target TextureUnit in value + param s CoordF in value + category VERSION_1_3_DEPRECATED + glxflags ARB + version 1.3 + deprecated 3.1 + vectorequiv MultiTexCoord1fv + offset 378 + +MultiTexCoord1fv(target, v) + return void + param target TextureUnit in value + param v CoordF in array [1] + category VERSION_1_3_DEPRECATED + glxflags ARB + version 1.3 + deprecated 3.1 + glxropcode 199 + offset 379 + +MultiTexCoord1i(target, s) + return void + param target TextureUnit in value + param s CoordI in value + category VERSION_1_3_DEPRECATED + glxflags ARB + version 1.3 + deprecated 3.1 + vectorequiv MultiTexCoord1iv + offset 380 + +MultiTexCoord1iv(target, v) + return void + param target TextureUnit in value + param v CoordI in array [1] + category VERSION_1_3_DEPRECATED + glxflags ARB + version 1.3 + deprecated 3.1 + glxropcode 200 + offset 381 + +MultiTexCoord1s(target, s) + return void + param target TextureUnit in value + param s CoordS in value + category VERSION_1_3_DEPRECATED + glxflags ARB + version 1.3 + deprecated 3.1 + vectorequiv MultiTexCoord1sv + offset 382 + +MultiTexCoord1sv(target, v) + return void + param target TextureUnit in value + param v CoordS in array [1] + category VERSION_1_3_DEPRECATED + glxflags ARB + version 1.3 + deprecated 3.1 + glxropcode 201 + offset 383 + +MultiTexCoord2d(target, s, t) + return void + param target TextureUnit in value + param s CoordD in value + param t CoordD in value + category VERSION_1_3_DEPRECATED + glxflags ARB + version 1.3 + deprecated 3.1 + vectorequiv MultiTexCoord2dv + offset 384 + +MultiTexCoord2dv(target, v) + return void + param target TextureUnit in value + param v CoordD in array [2] + category VERSION_1_3_DEPRECATED + glxflags ARB + version 1.3 + deprecated 3.1 + glxropcode 202 + offset 385 + +MultiTexCoord2f(target, s, t) + return void + param target TextureUnit in value + param s CoordF in value + param t CoordF in value + category VERSION_1_3_DEPRECATED + glxflags ARB + version 1.3 + deprecated 3.1 + vectorequiv MultiTexCoord2fv + offset 386 + +MultiTexCoord2fv(target, v) + return void + param target TextureUnit in value + param v CoordF in array [2] + category VERSION_1_3_DEPRECATED + glxflags ARB + version 1.3 + deprecated 3.1 + glxropcode 203 + offset 387 + +MultiTexCoord2i(target, s, t) + return void + param target TextureUnit in value + param s CoordI in value + param t CoordI in value + category VERSION_1_3_DEPRECATED + glxflags ARB + version 1.3 + deprecated 3.1 + vectorequiv MultiTexCoord2iv + offset 388 + +MultiTexCoord2iv(target, v) + return void + param target TextureUnit in value + param v CoordI in array [2] + category VERSION_1_3_DEPRECATED + glxflags ARB + version 1.3 + deprecated 3.1 + glxropcode 204 + offset 389 + +MultiTexCoord2s(target, s, t) + return void + param target TextureUnit in value + param s CoordS in value + param t CoordS in value + category VERSION_1_3_DEPRECATED + glxflags ARB + version 1.3 + deprecated 3.1 + vectorequiv MultiTexCoord2sv + offset 390 + +MultiTexCoord2sv(target, v) + return void + param target TextureUnit in value + param v CoordS in array [2] + category VERSION_1_3_DEPRECATED + glxflags ARB + version 1.3 + deprecated 3.1 + glxropcode 205 + offset 391 + +MultiTexCoord3d(target, s, t, r) + return void + param target TextureUnit in value + param s CoordD in value + param t CoordD in value + param r CoordD in value + category VERSION_1_3_DEPRECATED + glxflags ARB + version 1.3 + deprecated 3.1 + vectorequiv MultiTexCoord3dv + offset 392 + +MultiTexCoord3dv(target, v) + return void + param target TextureUnit in value + param v CoordD in array [3] + category VERSION_1_3_DEPRECATED + glxflags ARB + version 1.3 + deprecated 3.1 + glxropcode 206 + offset 393 + +MultiTexCoord3f(target, s, t, r) + return void + param target TextureUnit in value + param s CoordF in value + param t CoordF in value + param r CoordF in value + category VERSION_1_3_DEPRECATED + glxflags ARB + version 1.3 + deprecated 3.1 + vectorequiv MultiTexCoord3fv + offset 394 + +MultiTexCoord3fv(target, v) + return void + param target TextureUnit in value + param v CoordF in array [3] + category VERSION_1_3_DEPRECATED + glxflags ARB + version 1.3 + deprecated 3.1 + glxropcode 207 + offset 395 + +MultiTexCoord3i(target, s, t, r) + return void + param target TextureUnit in value + param s CoordI in value + param t CoordI in value + param r CoordI in value + category VERSION_1_3_DEPRECATED + glxflags ARB + version 1.3 + deprecated 3.1 + vectorequiv MultiTexCoord3iv + offset 396 + +MultiTexCoord3iv(target, v) + return void + param target TextureUnit in value + param v CoordI in array [3] + category VERSION_1_3_DEPRECATED + glxflags ARB + version 1.3 + deprecated 3.1 + glxropcode 208 + offset 397 + +MultiTexCoord3s(target, s, t, r) + return void + param target TextureUnit in value + param s CoordS in value + param t CoordS in value + param r CoordS in value + category VERSION_1_3_DEPRECATED + glxflags ARB + version 1.3 + deprecated 3.1 + vectorequiv MultiTexCoord3sv + offset 398 + +MultiTexCoord3sv(target, v) + return void + param target TextureUnit in value + param v CoordS in array [3] + category VERSION_1_3_DEPRECATED + version 1.3 + deprecated 3.1 + glxflags ARB + glxropcode 209 + offset 399 + +MultiTexCoord4d(target, s, t, r, q) + return void + param target TextureUnit in value + param s CoordD in value + param t CoordD in value + param r CoordD in value + param q CoordD in value + category VERSION_1_3_DEPRECATED + glxflags ARB + version 1.3 + deprecated 3.1 + vectorequiv MultiTexCoord4dv + offset 400 + +MultiTexCoord4dv(target, v) + return void + param target TextureUnit in value + param v CoordD in array [4] + category VERSION_1_3_DEPRECATED + glxflags ARB + version 1.3 + deprecated 3.1 + glxropcode 210 + offset 401 + +MultiTexCoord4f(target, s, t, r, q) + return void + param target TextureUnit in value + param s CoordF in value + param t CoordF in value + param r CoordF in value + param q CoordF in value + category VERSION_1_3_DEPRECATED + glxflags ARB + version 1.3 + deprecated 3.1 + vectorequiv MultiTexCoord4fv + offset 402 + +MultiTexCoord4fv(target, v) + return void + param target TextureUnit in value + param v CoordF in array [4] + category VERSION_1_3_DEPRECATED + glxflags ARB + version 1.3 + deprecated 3.1 + glxropcode 211 + offset 403 + +MultiTexCoord4i(target, s, t, r, q) + return void + param target TextureUnit in value + param s CoordI in value + param t CoordI in value + param r CoordI in value + param q CoordI in value + category VERSION_1_3_DEPRECATED + glxflags ARB + version 1.3 + deprecated 3.1 + vectorequiv MultiTexCoord4iv + offset 404 + +MultiTexCoord4iv(target, v) + return void + param target TextureUnit in value + param v CoordI in array [4] + category VERSION_1_3_DEPRECATED + glxflags ARB + version 1.3 + deprecated 3.1 + glxropcode 212 + offset 405 + +MultiTexCoord4s(target, s, t, r, q) + return void + param target TextureUnit in value + param s CoordS in value + param t CoordS in value + param r CoordS in value + param q CoordS in value + category VERSION_1_3_DEPRECATED + glxflags ARB + version 1.3 + deprecated 3.1 + vectorequiv MultiTexCoord4sv + offset 406 + +MultiTexCoord4sv(target, v) + return void + param target TextureUnit in value + param v CoordS in array [4] + category VERSION_1_3_DEPRECATED + glxflags ARB + version 1.3 + deprecated 3.1 + glxropcode 213 + offset 407 + +# OpenGL 1.3 (ARB_transpose_matrix) commands + +LoadTransposeMatrixf(m) + return void + param m Float32 in array [16] + category VERSION_1_3_DEPRECATED + glxflags ARB client-handcode client-intercept server-handcode + version 1.3 + deprecated 3.1 + offset 408 + +LoadTransposeMatrixd(m) + return void + param m Float64 in array [16] + category VERSION_1_3_DEPRECATED + glxflags ARB client-handcode client-intercept server-handcode + version 1.3 + deprecated 3.1 + offset 409 + +MultTransposeMatrixf(m) + return void + param m Float32 in array [16] + category VERSION_1_3_DEPRECATED + glxflags ARB client-handcode client-intercept server-handcode + version 1.3 + deprecated 3.1 + offset 410 + +MultTransposeMatrixd(m) + return void + param m Float64 in array [16] + category VERSION_1_3_DEPRECATED + glxflags ARB client-handcode client-intercept server-handcode + version 1.3 + deprecated 3.1 + offset 411 + +############################################################################### +############################################################################### +# +# OpenGL 1.4 commands +# +############################################################################### +############################################################################### + +# OpenGL 1.4 (EXT_blend_func_separate) commands + +BlendFuncSeparate(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha) + return void + param sfactorRGB BlendFuncSeparateParameterEXT in value + param dfactorRGB BlendFuncSeparateParameterEXT in value + param sfactorAlpha BlendFuncSeparateParameterEXT in value + param dfactorAlpha BlendFuncSeparateParameterEXT in value + category VERSION_1_4 + glxropcode 4134 + version 1.4 + extension + offset 537 + +# OpenGL 1.4 (EXT_multi_draw_arrays) commands + +# first and count are really 'in' +MultiDrawArrays(mode, first, count, primcount) + return void + param mode BeginMode in value + param first Int32 out array [COMPSIZE(count)] + param count SizeI out array [COMPSIZE(primcount)] + param primcount SizeI in value + category VERSION_1_4 + version 1.4 + glxropcode ? + offset 644 + +MultiDrawElements(mode, count, type, indices, primcount) + return void + param mode BeginMode in value + param count SizeI in array [COMPSIZE(primcount)] + param type DrawElementsType in value + param indices VoidPointer in array [COMPSIZE(primcount)] + param primcount SizeI in value + category VERSION_1_4 + version 1.4 + glxropcode ? + offset 645 + +# OpenGL 1.4 (ARB_point_parameters, NV_point_sprite) commands + +PointParameterf(pname, param) + return void + param pname PointParameterNameARB in value + param param CheckedFloat32 in value + category VERSION_1_4 + version 1.4 + glxropcode 2065 + extension + offset 458 + +PointParameterfv(pname, params) + return void + param pname PointParameterNameARB in value + param params CheckedFloat32 in array [COMPSIZE(pname)] + category VERSION_1_4 + version 1.4 + glxropcode 2066 + extension + offset 459 + +PointParameteri(pname, param) + return void + param pname PointParameterNameARB in value + param param Int32 in value + category VERSION_1_4 + version 1.4 + extension soft WINSOFT NV20 + glxropcode 4221 + offset 642 + +PointParameteriv(pname, params) + return void + param pname PointParameterNameARB in value + param params Int32 in array [COMPSIZE(pname)] + category VERSION_1_4 + version 1.4 + extension soft WINSOFT NV20 + glxropcode 4222re + offset 643 + +############################################################################### +############################################################################### +# +# OpenGL 1.4 deprecated commands +# +############################################################################### +############################################################################### + +# OpenGL 1.4 (EXT_fog_coord) commands + +FogCoordf(coord) + return void + param coord CoordF in value + category VERSION_1_4_DEPRECATED + vectorequiv FogCoordfv + version 1.4 + deprecated 3.1 + offset 545 + +FogCoordfv(coord) + return void + param coord CoordF in array [1] + category VERSION_1_4_DEPRECATED + version 1.4 + deprecated 3.1 + glxropcode 4124 + offset 546 + +FogCoordd(coord) + return void + param coord CoordD in value + category VERSION_1_4_DEPRECATED + vectorequiv FogCoorddv + version 1.4 + deprecated 3.1 + offset 547 + +FogCoorddv(coord) + return void + param coord CoordD in array [1] + category VERSION_1_4_DEPRECATED + version 1.4 + deprecated 3.1 + glxropcode 4125 + offset 548 + +FogCoordPointer(type, stride, pointer) + return void + param type FogPointerTypeEXT in value + param stride SizeI in value + param pointer Void in array [COMPSIZE(type/stride)] retained + category VERSION_1_4_DEPRECATED + dlflags notlistable + version 1.4 + deprecated 3.1 + glxflags client-handcode server-handcode + offset 549 + +# OpenGL 1.4 (EXT_secondary_color) commands + +SecondaryColor3b(red, green, blue) + return void + param red ColorB in value + param green ColorB in value + param blue ColorB in value + category VERSION_1_4_DEPRECATED + vectorequiv SecondaryColor3bv + version 1.4 + deprecated 3.1 + offset 561 + +SecondaryColor3bv(v) + return void + param v ColorB in array [3] + category VERSION_1_4_DEPRECATED + version 1.4 + deprecated 3.1 + glxropcode 4126 + offset 562 + +SecondaryColor3d(red, green, blue) + return void + param red ColorD in value + param green ColorD in value + param blue ColorD in value + category VERSION_1_4_DEPRECATED + vectorequiv SecondaryColor3dv + version 1.4 + deprecated 3.1 + offset 563 + +SecondaryColor3dv(v) + return void + param v ColorD in array [3] + category VERSION_1_4_DEPRECATED + version 1.4 + deprecated 3.1 + glxropcode 4130 + offset 564 + +SecondaryColor3f(red, green, blue) + return void + param red ColorF in value + param green ColorF in value + param blue ColorF in value + category VERSION_1_4_DEPRECATED + vectorequiv SecondaryColor3fv + version 1.4 + deprecated 3.1 + offset 565 + +SecondaryColor3fv(v) + return void + param v ColorF in array [3] + category VERSION_1_4_DEPRECATED + version 1.4 + deprecated 3.1 + glxropcode 4129 + offset 566 + +SecondaryColor3i(red, green, blue) + return void + param red ColorI in value + param green ColorI in value + param blue ColorI in value + category VERSION_1_4_DEPRECATED + vectorequiv SecondaryColor3iv + version 1.4 + deprecated 3.1 + offset 567 + +SecondaryColor3iv(v) + return void + param v ColorI in array [3] + category VERSION_1_4_DEPRECATED + version 1.4 + deprecated 3.1 + glxropcode 4128 + offset 568 + +SecondaryColor3s(red, green, blue) + return void + param red ColorS in value + param green ColorS in value + param blue ColorS in value + category VERSION_1_4_DEPRECATED + vectorequiv SecondaryColor3sv + version 1.4 + deprecated 3.1 + offset 569 + +SecondaryColor3sv(v) + return void + param v ColorS in array [3] + category VERSION_1_4_DEPRECATED + version 1.4 + deprecated 3.1 + glxropcode 4127 + offset 570 + +SecondaryColor3ub(red, green, blue) + return void + param red ColorUB in value + param green ColorUB in value + param blue ColorUB in value + category VERSION_1_4_DEPRECATED + vectorequiv SecondaryColor3ubv + version 1.4 + deprecated 3.1 + offset 571 + +SecondaryColor3ubv(v) + return void + param v ColorUB in array [3] + category VERSION_1_4_DEPRECATED + version 1.4 + deprecated 3.1 + glxropcode 4131 + offset 572 + +SecondaryColor3ui(red, green, blue) + return void + param red ColorUI in value + param green ColorUI in value + param blue ColorUI in value + category VERSION_1_4_DEPRECATED + vectorequiv SecondaryColor3uiv + version 1.4 + deprecated 3.1 + offset 573 + +SecondaryColor3uiv(v) + return void + param v ColorUI in array [3] + category VERSION_1_4_DEPRECATED + version 1.4 + deprecated 3.1 + glxropcode 4133 + offset 574 + +SecondaryColor3us(red, green, blue) + return void + param red ColorUS in value + param green ColorUS in value + param blue ColorUS in value + category VERSION_1_4_DEPRECATED + vectorequiv SecondaryColor3usv + version 1.4 + deprecated 3.1 + offset 575 + +SecondaryColor3usv(v) + return void + param v ColorUS in array [3] + category VERSION_1_4_DEPRECATED + version 1.4 + deprecated 3.1 + glxropcode 4132 + offset 576 + +SecondaryColorPointer(size, type, stride, pointer) + return void + param size Int32 in value + param type ColorPointerType in value + param stride SizeI in value + param pointer Void in array [COMPSIZE(size/type/stride)] retained + category VERSION_1_4_DEPRECATED + dlflags notlistable + glxflags client-handcode server-handcode + version 1.4 + deprecated 3.1 + extension + offset 577 + +# OpenGL 1.4 (ARB_window_pos) commands +# Note: all WindowPos* entry points use glxropcode ropcode 230, with 3 float parameters + +WindowPos2d(x, y) + return void + param x CoordD in value + param y CoordD in value + category VERSION_1_4_DEPRECATED + vectorequiv WindowPos2dv + version 1.4 + deprecated 3.1 + offset 513 + +WindowPos2dv(v) + return void + param v CoordD in array [2] + category VERSION_1_4_DEPRECATED + version 1.4 + deprecated 3.1 + glxropcode 230 + glxflags client-handcode server-handcode + offset 514 + +WindowPos2f(x, y) + return void + param x CoordF in value + param y CoordF in value + category VERSION_1_4_DEPRECATED + vectorequiv WindowPos2fv + version 1.4 + deprecated 3.1 + offset 515 + +WindowPos2fv(v) + return void + param v CoordF in array [2] + category VERSION_1_4_DEPRECATED + version 1.4 + deprecated 3.1 + glxropcode 230 + glxflags client-handcode server-handcode + offset 516 + +WindowPos2i(x, y) + return void + param x CoordI in value + param y CoordI in value + category VERSION_1_4_DEPRECATED + vectorequiv WindowPos2iv + version 1.4 + deprecated 3.1 + offset 517 + +WindowPos2iv(v) + return void + param v CoordI in array [2] + category VERSION_1_4_DEPRECATED + version 1.4 + deprecated 3.1 + glxropcode 230 + glxflags client-handcode server-handcode + offset 518 + +WindowPos2s(x, y) + return void + param x CoordS in value + param y CoordS in value + category VERSION_1_4_DEPRECATED + vectorequiv WindowPos2sv + version 1.4 + deprecated 3.1 + offset 519 + +WindowPos2sv(v) + return void + param v CoordS in array [2] + category VERSION_1_4_DEPRECATED + version 1.4 + deprecated 3.1 + glxropcode 230 + glxflags client-handcode server-handcode + offset 520 + +WindowPos3d(x, y, z) + return void + param x CoordD in value + param y CoordD in value + param z CoordD in value + vectorequiv WindowPos3dv + category VERSION_1_4_DEPRECATED + version 1.4 + deprecated 3.1 + offset 521 + +WindowPos3dv(v) + return void + param v CoordD in array [3] + category VERSION_1_4_DEPRECATED + version 1.4 + deprecated 3.1 + glxropcode 230 + glxflags client-handcode server-handcode + offset 522 + +WindowPos3f(x, y, z) + return void + param x CoordF in value + param y CoordF in value + param z CoordF in value + category VERSION_1_4_DEPRECATED + vectorequiv WindowPos3fv + version 1.4 + deprecated 3.1 + offset 523 + +WindowPos3fv(v) + return void + param v CoordF in array [3] + category VERSION_1_4_DEPRECATED + version 1.4 + deprecated 3.1 + glxropcode 230 + glxflags client-handcode server-handcode + offset 524 + +WindowPos3i(x, y, z) + return void + param x CoordI in value + param y CoordI in value + param z CoordI in value + category VERSION_1_4_DEPRECATED + vectorequiv WindowPos3iv + version 1.4 + deprecated 3.1 + offset 525 + +WindowPos3iv(v) + return void + param v CoordI in array [3] + category VERSION_1_4_DEPRECATED + version 1.4 + deprecated 3.1 + glxropcode 230 + glxflags client-handcode server-handcode + offset 526 + +WindowPos3s(x, y, z) + return void + param x CoordS in value + param y CoordS in value + param z CoordS in value + category VERSION_1_4_DEPRECATED + vectorequiv WindowPos3sv + version 1.4 + deprecated 3.1 + offset 527 + +WindowPos3sv(v) + return void + param v CoordS in array [3] + category VERSION_1_4_DEPRECATED + version 1.4 + deprecated 3.1 + glxropcode 230 + glxflags client-handcode server-handcode + offset 528 + +############################################################################### +############################################################################### +# +# OpenGL 1.5 commands +# +############################################################################### +############################################################################### + +# OpenGL 1.5 (ARB_occlusion_query) commands + +GenQueries(n, ids) + return void + param n SizeI in value + param ids UInt32 out array [n] + category VERSION_1_5 + version 1.5 + extension + glxsingle 162 + glxflags ignore + offset 700 + +DeleteQueries(n, ids) + return void + param n SizeI in value + param ids UInt32 in array [n] + category VERSION_1_5 + version 1.5 + extension + glxsingle 161 + glxflags ignore + offset 701 + +IsQuery(id) + return Boolean + param id UInt32 in value + category VERSION_1_5 + version 1.5 + extension + glxsingle 163 + glxflags ignore + offset 702 + +BeginQuery(target, id) + return void + param target GLenum in value + param id UInt32 in value + category VERSION_1_5 + version 1.5 + extension + glxropcode 231 + glxflags ignore + offset 703 + +EndQuery(target) + return void + param target GLenum in value + category VERSION_1_5 + version 1.5 + extension + glxropcode 232 + glxflags ignore + offset 704 + +GetQueryiv(target, pname, params) + return void + param target GLenum in value + param pname GLenum in value + param params Int32 out array [pname] + category VERSION_1_5 + dlflags notlistable + version 1.5 + extension + glxsingle 164 + glxflags ignore + offset 705 + +GetQueryObjectiv(id, pname, params) + return void + param id UInt32 in value + param pname GLenum in value + param params Int32 out array [pname] + category VERSION_1_5 + dlflags notlistable + version 1.5 + extension + glxsingle 165 + glxflags ignore + offset 706 + +GetQueryObjectuiv(id, pname, params) + return void + param id UInt32 in value + param pname GLenum in value + param params UInt32 out array [pname] + category VERSION_1_5 + dlflags notlistable + version 1.5 + extension + glxsingle 166 + glxflags ignore + offset 707 + +# OpenGL 1.5 (ARB_vertex_buffer_object) commands + +BindBuffer(target, buffer) + return void + param target BufferTargetARB in value + param buffer UInt32 in value + category VERSION_1_5 + version 1.5 + extension + glxropcode ? + glxflags ignore + offset 688 + +DeleteBuffers(n, buffers) + return void + param n SizeI in value + param buffers ConstUInt32 in array [n] + category VERSION_1_5 + version 1.5 + extension + glxropcode ? + glxflags ignore + offset 691 + +GenBuffers(n, buffers) + return void + param n SizeI in value + param buffers UInt32 out array [n] + category VERSION_1_5 + version 1.5 + extension + glxropcode ? + glxflags ignore + offset 692 + +IsBuffer(buffer) + return Boolean + param buffer UInt32 in value + category VERSION_1_5 + version 1.5 + extension + glxropcode ? + glxflags ignore + offset 696 + +BufferData(target, size, data, usage) + return void + param target BufferTargetARB in value + param size BufferSize in value + param data ConstVoid in array [size] + param usage BufferUsageARB in value + category VERSION_1_5 + version 1.5 + extension + glxropcode ? + glxflags ignore + offset 689 + +BufferSubData(target, offset, size, data) + return void + param target BufferTargetARB in value + param offset BufferOffset in value + param size BufferSize in value + param data ConstVoid in array [size] + category VERSION_1_5 + version 1.5 + extension + glxropcode ? + glxflags ignore + offset 690 + +GetBufferSubData(target, offset, size, data) + return void + param target BufferTargetARB in value + param offset BufferOffset in value + param size BufferSize in value + param data Void out array [size] + category VERSION_1_5 + dlflags notlistable + version 1.5 + extension + glxsingle ? + glxflags ignore + offset 695 + +MapBuffer(target, access) + return VoidPointer + param target BufferTargetARB in value + param access BufferAccessARB in value + category VERSION_1_5 + version 1.5 + extension + glxropcode ? + glxflags ignore + offset 697 + +UnmapBuffer(target) + return Boolean + param target BufferTargetARB in value + category VERSION_1_5 + version 1.5 + extension + glxropcode ? + glxflags ignore + offset 698 + +GetBufferParameteriv(target, pname, params) + return void + param target BufferTargetARB in value + param pname BufferPNameARB in value + param params Int32 out array [COMPSIZE(pname)] + category VERSION_1_5 + dlflags notlistable + version 1.5 + extension + glxsingle ? + glxflags ignore + offset 693 + +GetBufferPointerv(target, pname, params) + return void + param target BufferTargetARB in value + param pname BufferPointerNameARB in value + param params VoidPointer out array [1] + category VERSION_1_5 + dlflags notlistable + version 1.5 + extension + glxsingle ? + glxflags ignore + offset 694 + +# OpenGL 1.5 (EXT_shadow_funcs) commands - none + + +############################################################################### +############################################################################### +# +# OpenGL 2.0 commands +# +############################################################################### +############################################################################### + +# OpenGL 2.0 (EXT_blend_equation_separate) commands + +BlendEquationSeparate(modeRGB, modeAlpha) + return void + param modeRGB BlendEquationModeEXT in value + param modeAlpha BlendEquationModeEXT in value + category VERSION_2_0 + version 2.0 + extension + glxropcode 4228 + +# OpenGL 2.0 (ARB_draw_buffers) commands + +DrawBuffers(n, bufs) + return void + param n SizeI in value + param bufs DrawBufferModeATI in array [n] + category VERSION_2_0 + version 2.0 + extension + glxropcode 233 + glxflags ignore + offset ? + +# OpenGL 2.0 (ARB_stencil_two_side) commands + +StencilOpSeparate(face, sfail, dpfail, dppass) + return void + param face StencilFaceDirection in value + param sfail StencilOp in value + param dpfail StencilOp in value + param dppass StencilOp in value + category VERSION_2_0 + version 2.0 + extension + glxropcode ? + glxflags ignore + offset ? + +StencilFuncSeparate(frontfunc, backfunc, ref, mask) + return void + param frontfunc StencilFunction in value + param backfunc StencilFunction in value + param ref ClampedStencilValue in value + param mask MaskedStencilValue in value + category VERSION_2_0 + version 2.0 + extension + glxropcode ? + glxflags ignore + offset ? + +StencilMaskSeparate(face, mask) + return void + param face StencilFaceDirection in value + param mask MaskedStencilValue in value + category VERSION_2_0 + version 2.0 + extension + glxropcode ? + glxflags ignore + offset ? + +# OpenGL 2.0 (ARB_shader_objects / ARB_vertex_shader / ARB_fragment_shader) commands + +AttachShader(program, shader) + return void + param program UInt32 in value + param shader UInt32 in value + category VERSION_2_0 + version 2.0 + extension + glxropcode ? + glxflags ignore + offset ? + +BindAttribLocation(program, index, name) + return void + param program UInt32 in value + param index UInt32 in value + param name Char in array [] + category VERSION_2_0 + version 2.0 + extension + glxropcode ? + glxflags ignore + offset ? + +CompileShader(shader) + return void + param shader UInt32 in value + category VERSION_2_0 + version 2.0 + extension + glxropcode ? + glxflags ignore + offset ? + +CreateProgram() + return UInt32 + category VERSION_2_0 + version 2.0 + extension + glxropcode ? + glxflags ignore + offset ? + +CreateShader(type) + return UInt32 + param type GLenum in value + category VERSION_2_0 + version 2.0 + extension + glxropcode ? + glxflags ignore + offset ? + +DeleteProgram(program) + return void + param program UInt32 in value + category VERSION_2_0 + version 2.0 + extension + glxropcode ? + glxflags ignore + offset ? + +DeleteShader(shader) + return void + param shader UInt32 in value + category VERSION_2_0 + version 2.0 + extension + glxropcode ? + glxflags ignore + offset ? + +DetachShader(program, shader) + return void + param program UInt32 in value + param shader UInt32 in value + category VERSION_2_0 + version 2.0 + extension + glxropcode ? + glxflags ignore + offset ? + +DisableVertexAttribArray(index) + return void + param index UInt32 in value + dlflags notlistable + category VERSION_2_0 + version 2.0 + extension soft WINSOFT NV10 + glxflags ignore + offset 666 + +EnableVertexAttribArray(index) + return void + param index UInt32 in value + dlflags notlistable + category VERSION_2_0 + version 2.0 + extension soft WINSOFT NV10 + glxflags ignore + offset 665 + +GetActiveAttrib(program, index, bufSize, length, size, type, name) + return void + param program UInt32 in value + param index UInt32 in value + param bufSize SizeI in value + param length SizeI out array [1] + param size Int32 out array [1] + param type GLenum out array [1] + param name Char out array [] + category VERSION_2_0 + dlflags notlistable + version 2.0 + extension + glxsingle ? + glxflags ignore + offset ? + +GetActiveUniform(program, index, bufSize, length, size, type, name) + return void + param program UInt32 in value + param index UInt32 in value + param bufSize SizeI in value + param length SizeI out array [1] + param size Int32 out array [1] + param type GLenum out array [1] + param name Char out array [] + category VERSION_2_0 + dlflags notlistable + version 2.0 + extension + glxsingle ? + glxflags ignore + offset ? + +GetAttachedShaders(program, maxCount, count, obj) + return void + param program UInt32 in value + param maxCount SizeI in value + param count SizeI out array [1] + param obj UInt32 out array [count] + category VERSION_2_0 + dlflags notlistable + version 2.0 + extension + glxsingle ? + glxflags ignore + offset ? + +GetAttribLocation(program, name) + return Int32 + param program UInt32 in value + param name Char in array [] + category VERSION_2_0 + dlflags notlistable + version 2.0 + extension + glxsingle ? + glxflags ignore + offset ? + +GetProgramiv(program, pname, params) + return void + param program UInt32 in value + param pname GLenum in value + param params Int32 out array [pname] + category VERSION_2_0 + dlflags notlistable + version 2.0 + extension + glxsingle ? + glxflags ignore + offset ? + +GetProgramInfoLog(program, bufSize, length, infoLog) + return void + param program UInt32 in value + param bufSize SizeI in value + param length SizeI out array [1] + param infoLog Char out array [length] + category VERSION_2_0 + dlflags notlistable + version 2.0 + extension + glxsingle ? + glxflags ignore + offset ? + +GetShaderiv(shader, pname, params) + return void + param shader UInt32 in value + param pname GLenum in value + param params Int32 out array [pname] + category VERSION_2_0 + dlflags notlistable + version 2.0 + extension + glxsingle ? + glxflags ignore + offset ? + +GetShaderInfoLog(shader, bufSize, length, infoLog) + return void + param shader UInt32 in value + param bufSize SizeI in value + param length SizeI out array [1] + param infoLog Char out array [length] + category VERSION_2_0 + dlflags notlistable + version 2.0 + extension + glxsingle ? + glxflags ignore + offset ? + +GetShaderSource(shader, bufSize, length, source) + return void + param shader UInt32 in value + param bufSize SizeI in value + param length SizeI out array [1] + param source Char out array [length] + category VERSION_2_0 + dlflags notlistable + version 2.0 + extension + glxsingle ? + glxflags ignore + offset ? + +GetUniformLocation(program, name) + return Int32 + param program UInt32 in value + param name Char in array [] + category VERSION_2_0 + dlflags notlistable + version 2.0 + extension + glxsingle ? + glxflags ignore + offset ? + +GetUniformfv(program, location, params) + return void + param program UInt32 in value + param location Int32 in value + param params Float32 out array [location] + category VERSION_2_0 + dlflags notlistable + version 2.0 + extension + glxsingle ? + glxflags ignore + offset ? + +GetUniformiv(program, location, params) + return void + param program UInt32 in value + param location Int32 in value + param params Int32 out array [location] + category VERSION_2_0 + dlflags notlistable + version 2.0 + extension + glxsingle ? + glxflags ignore + offset ? + +GetVertexAttribdv(index, pname, params) + return void + param index UInt32 in value + param pname VertexAttribPropertyARB in value + param params Float64 out array [4] + dlflags notlistable + category VERSION_2_0 + version 2.0 + extension soft WINSOFT NV10 + glxvendorpriv 1301 + offset 588 + +GetVertexAttribfv(index, pname, params) + return void + param index UInt32 in value + param pname VertexAttribPropertyARB in value + param params Float32 out array [4] + dlflags notlistable + category VERSION_2_0 + version 2.0 + extension soft WINSOFT NV10 + glxvendorpriv 1302 + offset 589 + +GetVertexAttribiv(index, pname, params) + return void + param index UInt32 in value + param pname VertexAttribPropertyARB in value + param params Int32 out array [4] + dlflags notlistable + category VERSION_2_0 + version 2.0 + extension soft WINSOFT NV10 + glxvendorpriv 1303 + offset 590 + +GetVertexAttribPointerv(index, pname, pointer) + return void + param index UInt32 in value + param pname VertexAttribPointerPropertyARB in value + param pointer VoidPointer out array [1] + dlflags notlistable + category VERSION_2_0 + version 2.0 + extension soft WINSOFT NV10 + glxflags ignore + offset 591 + +IsProgram(program) + return Boolean + param program UInt32 in value + dlflags notlistable + category VERSION_2_0 + version 2.0 + extension soft WINSOFT NV10 + glxvendorpriv 1304 + offset 592 + +IsShader(shader) + return Boolean + param shader UInt32 in value + dlflags notlistable + category VERSION_2_0 + version 2.0 + extension soft WINSOFT NV10 + glxvendorpriv ? + offset ? + +LinkProgram(program) + return void + param program UInt32 in value + category VERSION_2_0 + version 2.0 + extension + glxropcode ? + glxflags ignore + offset ? + +ShaderSource(shader, count, string, length) + return void + param shader UInt32 in value + param count SizeI in value + param string CharPointer in array [count] + param length Int32 in array [1] + category VERSION_2_0 + version 2.0 + extension + glxropcode ? + glxflags ignore + offset ? + +UseProgram(program) + return void + param program UInt32 in value + category VERSION_2_0 + version 2.0 + extension + glxropcode ? + glxflags ignore + offset ? + +Uniform1f(location, v0) + return void + param location Int32 in value + param v0 Float32 in value + category VERSION_2_0 + version 2.0 + extension + glxropcode ? + glxflags ignore + offset ? + +Uniform2f(location, v0, v1) + return void + param location Int32 in value + param v0 Float32 in value + param v1 Float32 in value + category VERSION_2_0 + version 2.0 + extension + glxropcode ? + glxflags ignore + offset ? + +Uniform3f(location, v0, v1, v2) + return void + param location Int32 in value + param v0 Float32 in value + param v1 Float32 in value + param v2 Float32 in value + category VERSION_2_0 + version 2.0 + extension + glxropcode ? + glxflags ignore + offset ? + +Uniform4f(location, v0, v1, v2, v3) + return void + param location Int32 in value + param v0 Float32 in value + param v1 Float32 in value + param v2 Float32 in value + param v3 Float32 in value + category VERSION_2_0 + version 2.0 + extension + glxropcode ? + glxflags ignore + offset ? + +Uniform1i(location, v0) + return void + param location Int32 in value + param v0 Int32 in value + category VERSION_2_0 + version 2.0 + extension + glxropcode ? + glxflags ignore + offset ? + +Uniform2i(location, v0, v1) + return void + param location Int32 in value + param v0 Int32 in value + param v1 Int32 in value + category VERSION_2_0 + version 2.0 + extension + glxropcode ? + glxflags ignore + offset ? + +Uniform3i(location, v0, v1, v2) + return void + param location Int32 in value + param v0 Int32 in value + param v1 Int32 in value + param v2 Int32 in value + category VERSION_2_0 + version 2.0 + extension + glxropcode ? + glxflags ignore + offset ? + +Uniform4i(location, v0, v1, v2, v3) + return void + param location Int32 in value + param v0 Int32 in value + param v1 Int32 in value + param v2 Int32 in value + param v3 Int32 in value + category VERSION_2_0 + version 2.0 + extension + glxropcode ? + glxflags ignore + offset ? + +Uniform1fv(location, count, value) + return void + param location Int32 in value + param count SizeI in value + param value Float32 in array [count] + category VERSION_2_0 + version 2.0 + extension + glxropcode ? + glxflags ignore + offset ? + +Uniform2fv(location, count, value) + return void + param location Int32 in value + param count SizeI in value + param value Float32 in array [count] + category VERSION_2_0 + version 2.0 + extension + glxropcode ? + glxflags ignore + offset ? + +Uniform3fv(location, count, value) + return void + param location Int32 in value + param count SizeI in value + param value Float32 in array [count] + category VERSION_2_0 + version 2.0 + extension + glxropcode ? + glxflags ignore + offset ? + +Uniform4fv(location, count, value) + return void + param location Int32 in value + param count SizeI in value + param value Float32 in array [count] + category VERSION_2_0 + version 2.0 + extension + glxropcode ? + glxflags ignore + offset ? + +Uniform1iv(location, count, value) + return void + param location Int32 in value + param count SizeI in value + param value Int32 in array [count] + category VERSION_2_0 + version 2.0 + extension + glxropcode ? + glxflags ignore + offset ? + +Uniform2iv(location, count, value) + return void + param location Int32 in value + param count SizeI in value + param value Int32 in array [count] + category VERSION_2_0 + version 2.0 + extension + glxropcode ? + glxflags ignore + offset ? + +Uniform3iv(location, count, value) + return void + param location Int32 in value + param count SizeI in value + param value Int32 in array [count] + category VERSION_2_0 + version 2.0 + extension + glxropcode ? + glxflags ignore + offset ? + +Uniform4iv(location, count, value) + return void + param location Int32 in value + param count SizeI in value + param value Int32 in array [count] + category VERSION_2_0 + version 2.0 + extension + glxropcode ? + glxflags ignore + offset ? + +UniformMatrix2fv(location, count, transpose, value) + return void + param location Int32 in value + param count SizeI in value + param transpose Boolean in value + param value Float32 in array [count] + category VERSION_2_0 + version 2.0 + extension + glxropcode ? + glxflags ignore + offset ? + +UniformMatrix3fv(location, count, transpose, value) + return void + param location Int32 in value + param count SizeI in value + param transpose Boolean in value + param value Float32 in array [count] + category VERSION_2_0 + version 2.0 + extension + glxropcode ? + glxflags ignore + offset ? + +UniformMatrix4fv(location, count, transpose, value) + return void + param location Int32 in value + param count SizeI in value + param transpose Boolean in value + param value Float32 in array [count] + category VERSION_2_0 + version 2.0 + extension + glxropcode ? + glxflags ignore + offset ? + +ValidateProgram(program) + return void + param program UInt32 in value + category VERSION_2_0 + version 2.0 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexAttrib1d(index, x) + return void + param index UInt32 in value + param x Float64 in value + category VERSION_2_0 + version 2.0 + deprecated 3.1 + vectorequiv VertexAttrib1dv + extension soft WINSOFT NV10 + glxflags ignore + offset 603 + +VertexAttrib1dv(index, v) + return void + param index UInt32 in value + param v Float64 in array [1] + category VERSION_2_0 + version 2.0 + deprecated 3.1 + extension soft WINSOFT NV10 + glxropcode 4197 + offset 604 + +VertexAttrib1f(index, x) + return void + param index UInt32 in value + param x Float32 in value + category VERSION_2_0 + version 2.0 + deprecated 3.1 + vectorequiv VertexAttrib1fv + extension soft WINSOFT NV10 + glxflags ignore + offset 605 + +VertexAttrib1fv(index, v) + return void + param index UInt32 in value + param v Float32 in array [1] + category VERSION_2_0 + version 2.0 + deprecated 3.1 + extension soft WINSOFT NV10 + glxropcode 4193 + offset 606 + +VertexAttrib1s(index, x) + return void + param index UInt32 in value + param x Int16 in value + category VERSION_2_0 + version 2.0 + deprecated 3.1 + vectorequiv VertexAttrib1sv + extension soft WINSOFT NV10 + glxflags ignore + offset 607 + +VertexAttrib1sv(index, v) + return void + param index UInt32 in value + param v Int16 in array [1] + category VERSION_2_0 + version 2.0 + deprecated 3.1 + extension soft WINSOFT NV10 + glxropcode 4189 + offset 608 + +VertexAttrib2d(index, x, y) + return void + param index UInt32 in value + param x Float64 in value + param y Float64 in value + category VERSION_2_0 + version 2.0 + deprecated 3.1 + vectorequiv VertexAttrib2dv + extension soft WINSOFT NV10 + glxflags ignore + offset 609 + +VertexAttrib2dv(index, v) + return void + param index UInt32 in value + param v Float64 in array [2] + category VERSION_2_0 + version 2.0 + deprecated 3.1 + extension soft WINSOFT NV10 + glxropcode 4198 + offset 610 + +VertexAttrib2f(index, x, y) + return void + param index UInt32 in value + param x Float32 in value + param y Float32 in value + category VERSION_2_0 + version 2.0 + deprecated 3.1 + vectorequiv VertexAttrib2fv + extension soft WINSOFT NV10 + glxflags ignore + offset 611 + +VertexAttrib2fv(index, v) + return void + param index UInt32 in value + param v Float32 in array [2] + category VERSION_2_0 + version 2.0 + deprecated 3.1 + extension soft WINSOFT NV10 + glxropcode 4194 + offset 612 + +VertexAttrib2s(index, x, y) + return void + param index UInt32 in value + param x Int16 in value + param y Int16 in value + category VERSION_2_0 + version 2.0 + deprecated 3.1 + vectorequiv VertexAttrib2sv + extension soft WINSOFT NV10 + glxflags ignore + offset 613 + +VertexAttrib2sv(index, v) + return void + param index UInt32 in value + param v Int16 in array [2] + category VERSION_2_0 + version 2.0 + deprecated 3.1 + extension soft WINSOFT NV10 + glxropcode 4190 + offset 614 + +VertexAttrib3d(index, x, y, z) + return void + param index UInt32 in value + param x Float64 in value + param y Float64 in value + param z Float64 in value + category VERSION_2_0 + version 2.0 + deprecated 3.1 + vectorequiv VertexAttrib3dv + extension soft WINSOFT NV10 + glxflags ignore + offset 615 + +VertexAttrib3dv(index, v) + return void + param index UInt32 in value + param v Float64 in array [3] + category VERSION_2_0 + version 2.0 + deprecated 3.1 + extension soft WINSOFT NV10 + glxropcode 4199 + offset 616 + +VertexAttrib3f(index, x, y, z) + return void + param index UInt32 in value + param x Float32 in value + param y Float32 in value + param z Float32 in value + category VERSION_2_0 + version 2.0 + deprecated 3.1 + vectorequiv VertexAttrib3fv + extension soft WINSOFT NV10 + glxflags ignore + offset 617 + +VertexAttrib3fv(index, v) + return void + param index UInt32 in value + param v Float32 in array [3] + category VERSION_2_0 + version 2.0 + deprecated 3.1 + extension soft WINSOFT NV10 + glxropcode 4195 + offset 618 + +VertexAttrib3s(index, x, y, z) + return void + param index UInt32 in value + param x Int16 in value + param y Int16 in value + param z Int16 in value + category VERSION_2_0 + version 2.0 + deprecated 3.1 + vectorequiv VertexAttrib3sv + extension soft WINSOFT NV10 + glxflags ignore + offset 619 + +VertexAttrib3sv(index, v) + return void + param index UInt32 in value + param v Int16 in array [3] + category VERSION_2_0 + version 2.0 + deprecated 3.1 + extension soft WINSOFT NV10 + glxropcode 4191 + offset 620 + +VertexAttrib4Nbv(index, v) + return void + param index UInt32 in value + param v Int8 in array [4] + category VERSION_2_0 + version 2.0 + deprecated 3.1 + extension soft WINSOFT NV10 + glxflags ignore + offset 659 + +VertexAttrib4Niv(index, v) + return void + param index UInt32 in value + param v Int32 in array [4] + category VERSION_2_0 + version 2.0 + deprecated 3.1 + extension soft WINSOFT NV10 + glxflags ignore + offset 661 + +VertexAttrib4Nsv(index, v) + return void + param index UInt32 in value + param v Int16 in array [4] + category VERSION_2_0 + version 2.0 + deprecated 3.1 + extension soft WINSOFT NV10 + glxflags ignore + offset 660 + +VertexAttrib4Nub(index, x, y, z, w) + return void + param index UInt32 in value + param x UInt8 in value + param y UInt8 in value + param z UInt8 in value + param w UInt8 in value + category VERSION_2_0 + version 2.0 + deprecated 3.1 + extension soft WINSOFT NV10 + glxflags ignore + offset 627 + +VertexAttrib4Nubv(index, v) + return void + param index UInt32 in value + param v UInt8 in array [4] + category VERSION_2_0 + version 2.0 + deprecated 3.1 + extension soft WINSOFT NV10 + glxflags ignore + glxropcode 4201 + offset 628 + +VertexAttrib4Nuiv(index, v) + return void + param index UInt32 in value + param v UInt32 in array [4] + category VERSION_2_0 + version 2.0 + deprecated 3.1 + extension soft WINSOFT NV10 + glxflags ignore + offset 663 + +VertexAttrib4Nusv(index, v) + return void + param index UInt32 in value + param v UInt16 in array [4] + category VERSION_2_0 + version 2.0 + deprecated 3.1 + extension soft WINSOFT NV10 + glxflags ignore + offset 662 + +VertexAttrib4bv(index, v) + return void + param index UInt32 in value + param v Int8 in array [4] + category VERSION_2_0 + version 2.0 + deprecated 3.1 + extension soft WINSOFT NV10 + glxflags ignore + offset 654 + +VertexAttrib4d(index, x, y, z, w) + return void + param index UInt32 in value + param x Float64 in value + param y Float64 in value + param z Float64 in value + param w Float64 in value + category VERSION_2_0 + version 2.0 + deprecated 3.1 + vectorequiv VertexAttrib4dv + extension soft WINSOFT NV10 + glxflags ignore + offset 621 + +VertexAttrib4dv(index, v) + return void + param index UInt32 in value + param v Float64 in array [4] + category VERSION_2_0 + version 2.0 + deprecated 3.1 + extension soft WINSOFT NV10 + glxropcode 4200 + offset 622 + +VertexAttrib4f(index, x, y, z, w) + return void + param index UInt32 in value + param x Float32 in value + param y Float32 in value + param z Float32 in value + param w Float32 in value + category VERSION_2_0 + version 2.0 + deprecated 3.1 + vectorequiv VertexAttrib4fv + extension soft WINSOFT NV10 + glxflags ignore + offset 623 + +VertexAttrib4fv(index, v) + return void + param index UInt32 in value + param v Float32 in array [4] + category VERSION_2_0 + version 2.0 + deprecated 3.1 + extension soft WINSOFT NV10 + glxropcode 4196 + offset 624 + +VertexAttrib4iv(index, v) + return void + param index UInt32 in value + param v Int32 in array [4] + category VERSION_2_0 + version 2.0 + deprecated 3.1 + extension soft WINSOFT NV10 + glxflags ignore + offset 655 + +VertexAttrib4s(index, x, y, z, w) + return void + param index UInt32 in value + param x Int16 in value + param y Int16 in value + param z Int16 in value + param w Int16 in value + category VERSION_2_0 + version 2.0 + deprecated 3.1 + vectorequiv VertexAttrib4sv + extension soft WINSOFT NV10 + glxflags ignore + offset 625 + +VertexAttrib4sv(index, v) + return void + param index UInt32 in value + param v Int16 in array [4] + category VERSION_2_0 + version 2.0 + deprecated 3.1 + extension soft WINSOFT NV10 + glxflags ignore + glxropcode 4192 + offset 626 + +VertexAttrib4ubv(index, v) + return void + param index UInt32 in value + param v UInt8 in array [4] + category VERSION_2_0 + version 2.0 + deprecated 3.1 + extension soft WINSOFT NV10 + glxflags ignore + offset 656 + +VertexAttrib4uiv(index, v) + return void + param index UInt32 in value + param v UInt32 in array [4] + category VERSION_2_0 + version 2.0 + deprecated 3.1 + extension soft WINSOFT NV10 + glxflags ignore + offset 658 + +VertexAttrib4usv(index, v) + return void + param index UInt32 in value + param v UInt16 in array [4] + category VERSION_2_0 + version 2.0 + deprecated 3.1 + extension soft WINSOFT NV10 + glxflags ignore + offset 657 + +VertexAttribPointer(index, size, type, normalized, stride, pointer) + return void + param index UInt32 in value + param size Int32 in value + param type VertexAttribPointerTypeARB in value + param normalized Boolean in value + param stride SizeI in value + param pointer Void in array [COMPSIZE(size/type/stride)] retained + dlflags notlistable + category VERSION_2_0 + version 2.0 + extension soft WINSOFT NV10 + glxflags ignore + offset 664 + + +############################################################################### +############################################################################### +# +# OpenGL 2.1 commands +# +############################################################################### +############################################################################### + +# OpenGL 2.1 (ARB_pixel_buffer_object) commands - none + +# OpenGL 2.1 (EXT_texture_sRGB) commands - none + +# New commands in OpenGL 2.1 + +UniformMatrix2x3fv(location, count, transpose, value) + return void + param location Int32 in value + param count SizeI in value + param transpose Boolean in value + param value Float32 in array [6] + category VERSION_2_1 + version 2.1 + extension + glxropcode ? + glxflags ignore + offset ? + +UniformMatrix3x2fv(location, count, transpose, value) + return void + param location Int32 in value + param count SizeI in value + param transpose Boolean in value + param value Float32 in array [6] + category VERSION_2_1 + version 2.1 + extension + glxropcode ? + glxflags ignore + offset ? + +UniformMatrix2x4fv(location, count, transpose, value) + return void + param location Int32 in value + param count SizeI in value + param transpose Boolean in value + param value Float32 in array [8] + category VERSION_2_1 + version 2.1 + extension + glxropcode ? + glxflags ignore + offset ? + +UniformMatrix4x2fv(location, count, transpose, value) + return void + param location Int32 in value + param count SizeI in value + param transpose Boolean in value + param value Float32 in array [8] + category VERSION_2_1 + version 2.1 + extension + glxropcode ? + glxflags ignore + offset ? + +UniformMatrix3x4fv(location, count, transpose, value) + return void + param location Int32 in value + param count SizeI in value + param transpose Boolean in value + param value Float32 in array [12] + category VERSION_2_1 + version 2.1 + extension + glxropcode ? + glxflags ignore + offset ? + +UniformMatrix4x3fv(location, count, transpose, value) + return void + param location Int32 in value + param count SizeI in value + param transpose Boolean in value + param value Float32 in array [12] + category VERSION_2_1 + version 2.1 + extension + glxropcode ? + glxflags ignore + offset ? + +############################################################################### +############################################################################### +# +# OpenGL 3.0 commands +# +############################################################################### +############################################################################### + +# OpenGL 3.0 (EXT_draw_buffers2) commands + +ColorMaski(index, r, g, b, a) + return void + param index UInt32 in value + param r Boolean in value + param g Boolean in value + param b Boolean in value + param a Boolean in value + category VERSION_3_0 + version 3.0 + extension + glxflags ignore + glfflags ignore + +GetBooleani_v(target, index, data) + return void + param target GLenum in value + param index UInt32 in value + param data Boolean out array [COMPSIZE(target)] + category VERSION_3_0 + version 3.0 + extension + dlflags notlistable + glxflags ignore + glfflags ignore + +GetIntegeri_v(target, index, data) + return void + param target GLenum in value + param index UInt32 in value + param data Int32 out array [COMPSIZE(target)] + category VERSION_3_0 + version 3.0 + extension + dlflags notlistable + glxflags ignore + glfflags ignore + +Enablei(target, index) + return void + param target GLenum in value + param index UInt32 in value + category VERSION_3_0 + version 3.0 + extension + glxflags ignore + glfflags ignore + +Disablei(target, index) + return void + param target GLenum in value + param index UInt32 in value + category VERSION_3_0 + version 3.0 + extension + glxflags ignore + glfflags ignore + +IsEnabledi(target, index) + return Boolean + param target GLenum in value + param index UInt32 in value + category VERSION_3_0 + version 3.0 + extension + dlflags notlistable + glxflags ignore + glfflags ignore + +# OpenGL 3.0 (EXT_transform_feedback) commands + +BeginTransformFeedback(primitiveMode) + return void + param primitiveMode GLenum in value + category VERSION_3_0 + version 3.0 + extension + dlflags notlistable + glxflags ignore + glfflags ignore + +EndTransformFeedback() + return void + category VERSION_3_0 + version 3.0 + extension + dlflags notlistable + glxflags ignore + glfflags ignore + +BindBufferRange(target, index, buffer, offset, size) + return void + param target GLenum in value + param index UInt32 in value + param buffer UInt32 in value + param offset BufferOffset in value + param size BufferSize in value + category VERSION_3_0 + version 3.0 + extension + dlflags notlistable + glxflags ignore + glfflags ignore + +BindBufferBase(target, index, buffer) + return void + param target GLenum in value + param index UInt32 in value + param buffer UInt32 in value + category VERSION_3_0 + version 3.0 + extension + dlflags notlistable + glxflags ignore + glfflags ignore + +TransformFeedbackVaryings(program, count, varyings, bufferMode) + return void + param program UInt32 in value + param count SizeI in value + param varyings CharPointer in array [count] + param bufferMode GLenum in value + category VERSION_3_0 + version 3.0 + extension + dlflags notlistable + glxflags ignore + glfflags ignore + +GetTransformFeedbackVarying(program, index, bufSize, length, size, type, name) + return void + param program UInt32 in value + param index UInt32 in value + param bufSize SizeI in value + param length SizeI out array [1] + param size SizeI out array [1] + param type GLenum out array [1] + param name Char out array [COMPSIZE(length)] + category VERSION_3_0 + dlflags notlistable + version 3.0 + extension + glfflags ignore + glxflags ignore + +ClampColor(target, clamp) + return void + param target ClampColorTargetARB in value + param clamp ClampColorModeARB in value + category VERSION_3_0 + version 3.0 + extension + glxropcode 234 + glxflags ignore + offset ? + +BeginConditionalRender(id, mode) + return void + param id UInt32 in value + param mode TypeEnum in value + category VERSION_3_0 + version 3.0 + glfflags ignore + glxflags ignore + +EndConditionalRender() + return void + category VERSION_3_0 + version 3.0 + glfflags ignore + glxflags ignore + +VertexAttribIPointer(index, size, type, stride, pointer) + return void + param index UInt32 in value + param size Int32 in value + param type VertexAttribEnum in value + param stride SizeI in value + param pointer Void in array [COMPSIZE(size/type/stride)] retained + category VERSION_3_0 + version 3.0 + dlflags notlistable + extension + glfflags ignore + glxflags ignore + +GetVertexAttribIiv(index, pname, params) + return void + param index UInt32 in value + param pname VertexAttribEnum in value + param params Int32 out array [1] + category VERSION_3_0 + version 3.0 + dlflags notlistable + extension + glfflags ignore + glxflags ignore + +GetVertexAttribIuiv(index, pname, params) + return void + param index UInt32 in value + param pname VertexAttribEnum in value + param params UInt32 out array [1] + category VERSION_3_0 + version 3.0 + dlflags notlistable + extension + glfflags ignore + glxflags ignore + +# OpenGL 3.0 (NV_vertex_program4) commands + +VertexAttribI1i(index, x) + return void + param index UInt32 in value + param x Int32 in value + category VERSION_3_0 + version 3.0 + deprecated 3.1 + beginend allow-inside + vectorequiv VertexAttribI1iv + glxvectorequiv VertexAttribI1iv + extension + glfflags ignore + glxflags ignore + +VertexAttribI2i(index, x, y) + return void + param index UInt32 in value + param x Int32 in value + param y Int32 in value + category VERSION_3_0 + version 3.0 + deprecated 3.1 + beginend allow-inside + vectorequiv VertexAttribI2iv + glxvectorequiv VertexAttribI2iv + extension + glfflags ignore + glxflags ignore + +VertexAttribI3i(index, x, y, z) + return void + param index UInt32 in value + param x Int32 in value + param y Int32 in value + param z Int32 in value + category VERSION_3_0 + version 3.0 + deprecated 3.1 + beginend allow-inside + vectorequiv VertexAttribI3iv + glxvectorequiv VertexAttribI3iv + extension + glfflags ignore + glxflags ignore + +VertexAttribI4i(index, x, y, z, w) + return void + param index UInt32 in value + param x Int32 in value + param y Int32 in value + param z Int32 in value + param w Int32 in value + category VERSION_3_0 + version 3.0 + deprecated 3.1 + beginend allow-inside + vectorequiv VertexAttribI4iv + glxvectorequiv VertexAttribI4iv + extension + glfflags ignore + glxflags ignore + +VertexAttribI1ui(index, x) + return void + param index UInt32 in value + param x UInt32 in value + category VERSION_3_0 + version 3.0 + deprecated 3.1 + beginend allow-inside + vectorequiv VertexAttribI1uiv + glxvectorequiv VertexAttribI1uiv + extension + glfflags ignore + glxflags ignore + +VertexAttribI2ui(index, x, y) + return void + param index UInt32 in value + param x UInt32 in value + param y UInt32 in value + category VERSION_3_0 + version 3.0 + deprecated 3.1 + beginend allow-inside + vectorequiv VertexAttribI2uiv + glxvectorequiv VertexAttribI2uiv + extension + glfflags ignore + glxflags ignore + +VertexAttribI3ui(index, x, y, z) + return void + param index UInt32 in value + param x UInt32 in value + param y UInt32 in value + param z UInt32 in value + category VERSION_3_0 + version 3.0 + deprecated 3.1 + beginend allow-inside + vectorequiv VertexAttribI3uiv + glxvectorequiv VertexAttribI3uiv + extension + glfflags ignore + glxflags ignore + +VertexAttribI4ui(index, x, y, z, w) + return void + param index UInt32 in value + param x UInt32 in value + param y UInt32 in value + param z UInt32 in value + param w UInt32 in value + category VERSION_3_0 + version 3.0 + deprecated 3.1 + beginend allow-inside + vectorequiv VertexAttribI4uiv + glxvectorequiv VertexAttribI4uiv + extension + glfflags ignore + glxflags ignore + +VertexAttribI1iv(index, v) + return void + param index UInt32 in value + param v Int32 in array [1] + category VERSION_3_0 + version 3.0 + deprecated 3.1 + beginend allow-inside + extension + glfflags ignore + glxflags ignore + +VertexAttribI2iv(index, v) + return void + param index UInt32 in value + param v Int32 in array [2] + category VERSION_3_0 + version 3.0 + deprecated 3.1 + beginend allow-inside + extension + glfflags ignore + glxflags ignore + +VertexAttribI3iv(index, v) + return void + param index UInt32 in value + param v Int32 in array [3] + category VERSION_3_0 + version 3.0 + deprecated 3.1 + beginend allow-inside + extension + glfflags ignore + glxflags ignore + +VertexAttribI4iv(index, v) + return void + param index UInt32 in value + param v Int32 in array [4] + category VERSION_3_0 + version 3.0 + deprecated 3.1 + beginend allow-inside + extension + glfflags ignore + glxflags ignore + +VertexAttribI1uiv(index, v) + return void + param index UInt32 in value + param v UInt32 in array [1] + category VERSION_3_0 + version 3.0 + deprecated 3.1 + beginend allow-inside + extension + glfflags ignore + glxflags ignore + +VertexAttribI2uiv(index, v) + return void + param index UInt32 in value + param v UInt32 in array [2] + category VERSION_3_0 + version 3.0 + deprecated 3.1 + beginend allow-inside + extension + glfflags ignore + glxflags ignore + +VertexAttribI3uiv(index, v) + return void + param index UInt32 in value + param v UInt32 in array [3] + category VERSION_3_0 + version 3.0 + deprecated 3.1 + beginend allow-inside + extension + glfflags ignore + glxflags ignore + +VertexAttribI4uiv(index, v) + return void + param index UInt32 in value + param v UInt32 in array [4] + category VERSION_3_0 + version 3.0 + deprecated 3.1 + beginend allow-inside + extension + glfflags ignore + glxflags ignore + +VertexAttribI4bv(index, v) + return void + param index UInt32 in value + param v Int8 in array [4] + category VERSION_3_0 + version 3.0 + deprecated 3.1 + beginend allow-inside + extension + glfflags ignore + glxflags ignore + +VertexAttribI4sv(index, v) + return void + param index UInt32 in value + param v Int16 in array [4] + category VERSION_3_0 + version 3.0 + deprecated 3.1 + beginend allow-inside + extension + glfflags ignore + glxflags ignore + +VertexAttribI4ubv(index, v) + return void + param index UInt32 in value + param v UInt8 in array [4] + category VERSION_3_0 + version 3.0 + deprecated 3.1 + beginend allow-inside + extension + glfflags ignore + glxflags ignore + +VertexAttribI4usv(index, v) + return void + param index UInt32 in value + param v UInt16 in array [4] + category VERSION_3_0 + version 3.0 + deprecated 3.1 + beginend allow-inside + extension + glfflags ignore + glxflags ignore + +# OpenGL 3.0 (EXT_gpu_shader4) commands + +GetUniformuiv(program, location, params) + return void + param program UInt32 in value + param location Int32 in value + param params UInt32 out array [COMPSIZE(program/location)] + category VERSION_3_0 + dlflags notlistable + version 3.0 + extension + glfflags ignore + glxflags ignore + +BindFragDataLocation(program, color, name) + return void + param program UInt32 in value + param color UInt32 in value + param name Char in array [COMPSIZE(name)] + category VERSION_3_0 + dlflags notlistable + version 3.0 + extension + glfflags ignore + glxflags ignore + +GetFragDataLocation(program, name) + return Int32 + param program UInt32 in value + param name Char in array [COMPSIZE(name)] + category VERSION_3_0 + dlflags notlistable + version 3.0 + extension + glfflags ignore + glxflags ignore + +Uniform1ui(location, v0) + return void + param location Int32 in value + param v0 UInt32 in value + category VERSION_3_0 + version 3.0 + extension + glfflags ignore + glxflags ignore + +Uniform2ui(location, v0, v1) + return void + param location Int32 in value + param v0 UInt32 in value + param v1 UInt32 in value + category VERSION_3_0 + version 3.0 + extension + glfflags ignore + glxflags ignore + +Uniform3ui(location, v0, v1, v2) + return void + param location Int32 in value + param v0 UInt32 in value + param v1 UInt32 in value + param v2 UInt32 in value + category VERSION_3_0 + version 3.0 + extension + glfflags ignore + glxflags ignore + +Uniform4ui(location, v0, v1, v2, v3) + return void + param location Int32 in value + param v0 UInt32 in value + param v1 UInt32 in value + param v2 UInt32 in value + param v3 UInt32 in value + category VERSION_3_0 + version 3.0 + extension + glfflags ignore + glxflags ignore + +Uniform1uiv(location, count, value) + return void + param location Int32 in value + param count SizeI in value + param value UInt32 in array [count] + category VERSION_3_0 + version 3.0 + extension + glfflags ignore + glxflags ignore + +Uniform2uiv(location, count, value) + return void + param location Int32 in value + param count SizeI in value + param value UInt32 in array [count*2] + category VERSION_3_0 + version 3.0 + extension + glfflags ignore + glxflags ignore + +Uniform3uiv(location, count, value) + return void + param location Int32 in value + param count SizeI in value + param value UInt32 in array [count*3] + category VERSION_3_0 + version 3.0 + extension + glfflags ignore + glxflags ignore + +Uniform4uiv(location, count, value) + return void + param location Int32 in value + param count SizeI in value + param value UInt32 in array [count*4] + category VERSION_3_0 + version 3.0 + extension + glfflags ignore + glxflags ignore + +# OpenGL 3.0 (EXT_texture_integer) commands + +TexParameterIiv(target, pname, params) + return void + param target TextureTarget in value + param pname TextureParameterName in value + param params Int32 in array [COMPSIZE(pname)] + category VERSION_3_0 + version 3.0 + extension + glfflags ignore + glxflags ignore + +TexParameterIuiv(target, pname, params) + return void + param target TextureTarget in value + param pname TextureParameterName in value + param params UInt32 in array [COMPSIZE(pname)] + category VERSION_3_0 + version 3.0 + extension + glfflags ignore + glxflags ignore + +GetTexParameterIiv(target, pname, params) + return void + param target TextureTarget in value + param pname GetTextureParameter in value + param params Int32 out array [COMPSIZE(pname)] + category VERSION_3_0 + dlflags notlistable + version 3.0 + extension + glfflags ignore + glxflags ignore + +GetTexParameterIuiv(target, pname, params) + return void + param target TextureTarget in value + param pname GetTextureParameter in value + param params UInt32 out array [COMPSIZE(pname)] + category VERSION_3_0 + dlflags notlistable + version 3.0 + extension + glfflags ignore + glxflags ignore + +# New commands in OpenGL 3.0 + +ClearBufferiv(buffer, drawbuffer, value) + return void + param buffer GLenum in value + param drawbuffer DrawBufferName in value + param value Int32 in array [COMPSIZE(buffer)] + category VERSION_3_0 + version 3.0 + extension + glfflags ignore + glxflags ignore + +ClearBufferuiv(buffer, drawbuffer, value) + return void + param buffer GLenum in value + param drawbuffer DrawBufferName in value + param value UInt32 in array [COMPSIZE(buffer)] + category VERSION_3_0 + version 3.0 + extension + glfflags ignore + glxflags ignore + +ClearBufferfv(buffer, drawbuffer, value) + return void + param buffer GLenum in value + param drawbuffer DrawBufferName in value + param value Float32 in array [COMPSIZE(buffer)] + category VERSION_3_0 + version 3.0 + extension + glfflags ignore + glxflags ignore + +ClearBufferfi(buffer, drawbuffer, depth, stencil) + return void + param buffer GLenum in value + param drawbuffer DrawBufferName in value + param depth Float32 in value + param stencil Int32 in value + category VERSION_3_0 + version 3.0 + extension + glfflags ignore + glxflags ignore + +GetStringi(name, index) + return String + param name GLenum in value + param index UInt32 in value + category VERSION_3_0 + version 3.0 + extension + dlflags notlistable + glxflags client-handcode server-handcode + glfflags ignore + glxsingle ? + +passthru: /* OpenGL 3.0 also reuses entry points from these extensions: */ +passthru: /* ARB_framebuffer_object */ +passthru: /* ARB_map_buffer_range */ +passthru: /* ARB_vertex_array_object */ + +############################################################################### +############################################################################### +# +# OpenGL 3.0 deprecated commands +# +############################################################################### +############################################################################### + +# (none - VertexAttribI* were moved back into non-deprecated) + + +############################################################################### +############################################################################### +# +# OpenGL 3.1 commands +# +############################################################################### +############################################################################### + +# New commands in OpenGL 3.1 - none + +# OpenGL 3.1 (ARB_draw_instanced) commands + +DrawArraysInstanced(mode, first, count, primcount) + return void + param mode BeginMode in value + param first Int32 in value + param count SizeI in value + param primcount SizeI in value + category VERSION_3_1 + version 3.1 + extension + dlflags notlistable + vectorequiv ArrayElement + glfflags ignore + glxflags ignore + +DrawElementsInstanced(mode, count, type, indices, primcount) + return void + param mode BeginMode in value + param count SizeI in value + param type DrawElementsType in value + param indices Void in array [COMPSIZE(count/type)] + param primcount SizeI in value + category VERSION_3_1 + version 3.1 + extension + dlflags notlistable + vectorequiv ArrayElement + glfflags ignore + glxflags ignore + +# OpenGL 3.1 (ARB_texture_buffer_object) commands + +TexBuffer(target, internalformat, buffer) + return void + param target TextureTarget in value + param internalformat GLenum in value + param buffer UInt32 in value + category VERSION_3_1 + version 3.1 + extension + glfflags ignore + glxflags ignore + +# OpenGL 3.1 (ARB_texture_rectangle) commands - none + +# OpenGL 3.1 (SNORM texture) commands - none + +# OpenGL 3.1 (NV_primitive_restart) commands +# This is *not* an alias of PrimitiveRestartIndexNV, since it sets +# server instead of client state. + +PrimitiveRestartIndex(index) + return void + param index UInt32 in value + category VERSION_3_1 + version 3.1 + extension + glxropcode ? + glxflags ignore + offset ? + +passthru: /* OpenGL 3.1 also reuses entry points from these extensions: */ +passthru: /* ARB_copy_buffer */ +passthru: /* ARB_uniform_buffer_object */ + + +############################################################################### +############################################################################### +# +# OpenGL 3.2 commands +# +############################################################################### +############################################################################### + +# New commands in OpenGL 3.2 + +GetInteger64i_v(target, index, data) + return void + param target GLenum in value + param index UInt32 in value + param data Int64 out array [COMPSIZE(target)] + category VERSION_3_2 + version 3.2 + extension + dlflags notlistable + glxflags ignore + glfflags ignore + + +GetBufferParameteri64v(target, pname, params) + return void + param target BufferTargetARB in value + param pname BufferPNameARB in value + param params Int64 out array [COMPSIZE(pname)] + category VERSION_3_2 + dlflags notlistable + version 3.2 + extension + glxsingle ? + glxflags ignore + +# OpenGL 3.2 (ARB_depth_clamp) commands - none +# OpenGL 3.2 (ARB_fragment_coord_conventions) commands - none + +# OpenGL 3.2 (ARB_geometry_shader4) commands + +ProgramParameteri(program, pname, value) + return void + param program UInt32 in value + param pname GLenum in value + param value Int32 in value + category VERSION_3_2 + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +FramebufferTexture(target, attachment, texture, level) + return void + param target GLenum in value + param attachment GLenum in value + param texture UInt32 in value + param level Int32 in value + category VERSION_3_2 + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +# FramebufferTextureLayer already declared in ARB_framebuffer_object +# FramebufferTextureLayer(target, attachment, texture, level, layer) + +# Not promoted to the core along with the rest +# FramebufferTextureFace(target, attachment, texture, level, face) + +# OpenGL 3.2 (ARB_seamless_cube_map) commands - none +# OpenGL 3.2 (ARB_vertex_array_bgra) commands - none + +passthru: /* OpenGL 3.2 also reuses entry points from these extensions: */ +passthru: /* ARB_draw_elements_base_vertex */ +passthru: /* ARB_provoking_vertex */ +passthru: /* ARB_sync */ +passthru: /* ARB_texture_multisample */ + + +############################################################################### +############################################################################### +# +# OpenGL 3.3 commands +# +############################################################################### +############################################################################### + +# New commands in OpenGL 3.3 - none +newcategory: VERSION_3_3 + +passthru: /* OpenGL 3.3 also reuses entry points from these extensions: */ +passthru: /* ARB_blend_func_extended */ +passthru: /* ARB_sampler_objects */ +passthru: /* ARB_explicit_attrib_location, but it has none */ +passthru: /* ARB_occlusion_query2 (no entry points) */ +passthru: /* ARB_shader_bit_encoding (no entry points) */ +passthru: /* ARB_texture_rgb10_a2ui (no entry points) */ +passthru: /* ARB_texture_swizzle (no entry points) */ +passthru: /* ARB_timer_query */ +passthru: /* ARB_vertex_type_2_10_10_10_rev */ + + +############################################################################### +############################################################################### +# +# OpenGL 4.0 commands +# +############################################################################### +############################################################################### + +# New commands in OpenGL 4.0 - none +newcategory: VERSION_4_0 + +passthru: /* OpenGL 4.0 also reuses entry points from these extensions: */ +passthru: /* ARB_gpu_shader5 (no entry points) */ +passthru: /* ARB_gpu_shader_fp64 */ +passthru: /* ARB_shader_subroutine */ +passthru: /* ARB_tessellation_shader */ +passthru: /* ARB_texture_buffer_object_rgb32 (no entry points) */ +passthru: /* ARB_transform_feedback2 */ +passthru: /* ARB_transform_feedback3 */ + + +############################################################################### +############################################################################### +# +# ARB extensions, in order by ARB extension number +# +############################################################################### +############################################################################### + +############################################################################### +# +# ARB Extension #1 +# ARB_multitexture commands +# +############################################################################### + +ActiveTextureARB(texture) + return void + param texture TextureUnit in value + category ARB_multitexture + glxflags ARB + version 1.2 + glxropcode 197 + alias ActiveTexture + +ClientActiveTextureARB(texture) + return void + param texture TextureUnit in value + category ARB_multitexture + dlflags notlistable + glxflags ARB client-handcode client-intercept server-handcode + version 1.2 + alias ClientActiveTexture + +MultiTexCoord1dARB(target, s) + return void + param target TextureUnit in value + param s CoordD in value + category ARB_multitexture + glxflags ARB + version 1.2 + vectorequiv MultiTexCoord1dv + +MultiTexCoord1dvARB(target, v) + return void + param target TextureUnit in value + param v CoordD in array [1] + category ARB_multitexture + glxflags ARB + version 1.2 + glxropcode 198 + alias MultiTexCoord1dv + +MultiTexCoord1fARB(target, s) + return void + param target TextureUnit in value + param s CoordF in value + category ARB_multitexture + glxflags ARB + version 1.2 + vectorequiv MultiTexCoord1fv + +MultiTexCoord1fvARB(target, v) + return void + param target TextureUnit in value + param v CoordF in array [1] + category ARB_multitexture + glxflags ARB + version 1.2 + glxropcode 199 + alias MultiTexCoord1fv + +MultiTexCoord1iARB(target, s) + return void + param target TextureUnit in value + param s CoordI in value + category ARB_multitexture + glxflags ARB + version 1.2 + vectorequiv MultiTexCoord1iv + +MultiTexCoord1ivARB(target, v) + return void + param target TextureUnit in value + param v CoordI in array [1] + category ARB_multitexture + glxflags ARB + version 1.2 + glxropcode 200 + alias MultiTexCoord1iv + +MultiTexCoord1sARB(target, s) + return void + param target TextureUnit in value + param s CoordS in value + category ARB_multitexture + glxflags ARB + version 1.2 + vectorequiv MultiTexCoord1sv + +MultiTexCoord1svARB(target, v) + return void + param target TextureUnit in value + param v CoordS in array [1] + category ARB_multitexture + glxflags ARB + version 1.2 + glxropcode 201 + alias MultiTexCoord1sv + +MultiTexCoord2dARB(target, s, t) + return void + param target TextureUnit in value + param s CoordD in value + param t CoordD in value + category ARB_multitexture + glxflags ARB + version 1.2 + vectorequiv MultiTexCoord2dv + +MultiTexCoord2dvARB(target, v) + return void + param target TextureUnit in value + param v CoordD in array [2] + category ARB_multitexture + glxflags ARB + version 1.2 + glxropcode 202 + alias MultiTexCoord2dv + +MultiTexCoord2fARB(target, s, t) + return void + param target TextureUnit in value + param s CoordF in value + param t CoordF in value + category ARB_multitexture + glxflags ARB + version 1.2 + vectorequiv MultiTexCoord2fv + +MultiTexCoord2fvARB(target, v) + return void + param target TextureUnit in value + param v CoordF in array [2] + category ARB_multitexture + glxflags ARB + version 1.2 + glxropcode 203 + alias MultiTexCoord2fv + +MultiTexCoord2iARB(target, s, t) + return void + param target TextureUnit in value + param s CoordI in value + param t CoordI in value + category ARB_multitexture + glxflags ARB + version 1.2 + vectorequiv MultiTexCoord2iv + +MultiTexCoord2ivARB(target, v) + return void + param target TextureUnit in value + param v CoordI in array [2] + category ARB_multitexture + glxflags ARB + version 1.2 + glxropcode 204 + alias MultiTexCoord2iv + +MultiTexCoord2sARB(target, s, t) + return void + param target TextureUnit in value + param s CoordS in value + param t CoordS in value + category ARB_multitexture + glxflags ARB + version 1.2 + vectorequiv MultiTexCoord2sv + +MultiTexCoord2svARB(target, v) + return void + param target TextureUnit in value + param v CoordS in array [2] + category ARB_multitexture + glxflags ARB + version 1.2 + glxropcode 205 + alias MultiTexCoord2sv + +MultiTexCoord3dARB(target, s, t, r) + return void + param target TextureUnit in value + param s CoordD in value + param t CoordD in value + param r CoordD in value + category ARB_multitexture + glxflags ARB + version 1.2 + vectorequiv MultiTexCoord3dv + +MultiTexCoord3dvARB(target, v) + return void + param target TextureUnit in value + param v CoordD in array [3] + category ARB_multitexture + glxflags ARB + version 1.2 + glxropcode 206 + alias MultiTexCoord3dv + +MultiTexCoord3fARB(target, s, t, r) + return void + param target TextureUnit in value + param s CoordF in value + param t CoordF in value + param r CoordF in value + category ARB_multitexture + glxflags ARB + version 1.2 + vectorequiv MultiTexCoord3fv + +MultiTexCoord3fvARB(target, v) + return void + param target TextureUnit in value + param v CoordF in array [3] + category ARB_multitexture + glxflags ARB + version 1.2 + glxropcode 207 + alias MultiTexCoord3fv + +MultiTexCoord3iARB(target, s, t, r) + return void + param target TextureUnit in value + param s CoordI in value + param t CoordI in value + param r CoordI in value + category ARB_multitexture + glxflags ARB + version 1.2 + vectorequiv MultiTexCoord3iv + +MultiTexCoord3ivARB(target, v) + return void + param target TextureUnit in value + param v CoordI in array [3] + category ARB_multitexture + glxflags ARB + version 1.2 + glxropcode 208 + alias MultiTexCoord3iv + +MultiTexCoord3sARB(target, s, t, r) + return void + param target TextureUnit in value + param s CoordS in value + param t CoordS in value + param r CoordS in value + category ARB_multitexture + glxflags ARB + version 1.2 + vectorequiv MultiTexCoord3sv + +MultiTexCoord3svARB(target, v) + return void + param target TextureUnit in value + param v CoordS in array [3] + category ARB_multitexture + version 1.2 + glxflags ARB + glxropcode 209 + alias MultiTexCoord3sv + +MultiTexCoord4dARB(target, s, t, r, q) + return void + param target TextureUnit in value + param s CoordD in value + param t CoordD in value + param r CoordD in value + param q CoordD in value + category ARB_multitexture + glxflags ARB + version 1.2 + vectorequiv MultiTexCoord4dv + +MultiTexCoord4dvARB(target, v) + return void + param target TextureUnit in value + param v CoordD in array [4] + category ARB_multitexture + glxflags ARB + version 1.2 + glxropcode 210 + alias MultiTexCoord4dv + +MultiTexCoord4fARB(target, s, t, r, q) + return void + param target TextureUnit in value + param s CoordF in value + param t CoordF in value + param r CoordF in value + param q CoordF in value + category ARB_multitexture + glxflags ARB + version 1.2 + vectorequiv MultiTexCoord4fv + +MultiTexCoord4fvARB(target, v) + return void + param target TextureUnit in value + param v CoordF in array [4] + category ARB_multitexture + glxflags ARB + version 1.2 + glxropcode 211 + alias MultiTexCoord4fv + +MultiTexCoord4iARB(target, s, t, r, q) + return void + param target TextureUnit in value + param s CoordI in value + param t CoordI in value + param r CoordI in value + param q CoordI in value + category ARB_multitexture + glxflags ARB + version 1.2 + vectorequiv MultiTexCoord4iv + +MultiTexCoord4ivARB(target, v) + return void + param target TextureUnit in value + param v CoordI in array [4] + category ARB_multitexture + glxflags ARB + version 1.2 + glxropcode 212 + alias MultiTexCoord4iv + +MultiTexCoord4sARB(target, s, t, r, q) + return void + param target TextureUnit in value + param s CoordS in value + param t CoordS in value + param r CoordS in value + param q CoordS in value + category ARB_multitexture + glxflags ARB + version 1.2 + vectorequiv MultiTexCoord4sv + +MultiTexCoord4svARB(target, v) + return void + param target TextureUnit in value + param v CoordS in array [4] + category ARB_multitexture + glxflags ARB + version 1.2 + glxropcode 213 + alias MultiTexCoord4sv + +################################################################################ +# +# ARB Extension #2 - GLX_ARB_get_proc_address +# +############################################################################### + +################################################################################ +# +# ARB Extension #3 +# ARB_transpose_matrix commands +# +############################################################################### + +LoadTransposeMatrixfARB(m) + return void + param m Float32 in array [16] + category ARB_transpose_matrix + glxflags ARB client-handcode client-intercept server-handcode + version 1.2 + alias LoadTransposeMatrixf + +LoadTransposeMatrixdARB(m) + return void + param m Float64 in array [16] + category ARB_transpose_matrix + glxflags ARB client-handcode client-intercept server-handcode + version 1.2 + alias LoadTransposeMatrixd + +MultTransposeMatrixfARB(m) + return void + param m Float32 in array [16] + category ARB_transpose_matrix + glxflags ARB client-handcode client-intercept server-handcode + version 1.2 + alias MultTransposeMatrixf + +MultTransposeMatrixdARB(m) + return void + param m Float64 in array [16] + category ARB_transpose_matrix + glxflags ARB client-handcode client-intercept server-handcode + version 1.2 + alias MultTransposeMatrixd + +################################################################################ +# +# ARB Extension #4 - WGL_ARB_buffer_region +# +############################################################################### + +################################################################################ +# +# ARB Extension #5 +# ARB_multisample commands +# +############################################################################### + +SampleCoverageARB(value, invert) + return void + param value ClampedFloat32 in value + param invert Boolean in value + category ARB_multisample + glxflags ARB + version 1.2 + alias SampleCoverage + +################################################################################ +# +# ARB Extension #6 +# ARB_texture_env_add commands +# +############################################################################### + +# (none) +newcategory: ARB_texture_env_add + +################################################################################ +# +# ARB Extension #7 +# ARB_texture_cube_map commands +# +############################################################################### + +# (none) +newcategory: ARB_texture_cube_map + +################################################################################ +# +# ARB Extension #8 - WGL_ARB_extensions_string +# ARB Extension #9 - WGL_ARB_pixel_format commands +# ARB Extension #10 - WGL_ARB_make_current_read commands +# ARB Extension #11 - WGL_ARB_pbuffer +# +############################################################################### + +################################################################################ +# +# ARB Extension #12 +# ARB_texture_compression commands +# +############################################################################### + +# Arguably TexelInternalFormat, not PixelInternalFormat +CompressedTexImage3DARB(target, level, internalformat, width, height, depth, border, imageSize, data) + return void + param target TextureTarget in value + param level CheckedInt32 in value + param internalformat PixelInternalFormat in value + param width SizeI in value + param height SizeI in value + param depth SizeI in value + param border CheckedInt32 in value + param imageSize SizeI in value + param data CompressedTextureARB in array [imageSize] + category ARB_texture_compression + dlflags handcode + glxflags ARB client-handcode server-handcode + version 1.2 + glxropcode 216 + alias CompressedTexImage3D + wglflags client-handcode server-handcode + +# Arguably TexelInternalFormat, not PixelInternalFormat +CompressedTexImage2DARB(target, level, internalformat, width, height, border, imageSize, data) + return void + param target TextureTarget in value + param level CheckedInt32 in value + param internalformat PixelInternalFormat in value + param width SizeI in value + param height SizeI in value + param border CheckedInt32 in value + param imageSize SizeI in value + param data CompressedTextureARB in array [imageSize] + category ARB_texture_compression + dlflags handcode + glxflags ARB client-handcode server-handcode + version 1.2 + glxropcode 215 + alias CompressedTexImage2D + wglflags client-handcode server-handcode + +# Arguably TexelInternalFormat, not PixelInternalFormat +CompressedTexImage1DARB(target, level, internalformat, width, border, imageSize, data) + return void + param target TextureTarget in value + param level CheckedInt32 in value + param internalformat PixelInternalFormat in value + param width SizeI in value + param border CheckedInt32 in value + param imageSize SizeI in value + param data CompressedTextureARB in array [imageSize] + category ARB_texture_compression + dlflags handcode + glxflags ARB client-handcode server-handcode + version 1.2 + glxropcode 214 + alias CompressedTexImage1D + wglflags client-handcode server-handcode + +CompressedTexSubImage3DARB(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data) + return void + param target TextureTarget in value + param level CheckedInt32 in value + param xoffset CheckedInt32 in value + param yoffset CheckedInt32 in value + param zoffset CheckedInt32 in value + param width SizeI in value + param height SizeI in value + param depth SizeI in value + param format PixelFormat in value + param imageSize SizeI in value + param data CompressedTextureARB in array [imageSize] + category ARB_texture_compression + dlflags handcode + glxflags ARB client-handcode server-handcode + version 1.2 + glxropcode 219 + alias CompressedTexSubImage3D + wglflags client-handcode server-handcode + +CompressedTexSubImage2DARB(target, level, xoffset, yoffset, width, height, format, imageSize, data) + return void + param target TextureTarget in value + param level CheckedInt32 in value + param xoffset CheckedInt32 in value + param yoffset CheckedInt32 in value + param width SizeI in value + param height SizeI in value + param format PixelFormat in value + param imageSize SizeI in value + param data CompressedTextureARB in array [imageSize] + category ARB_texture_compression + dlflags handcode + glxflags ARB client-handcode server-handcode + version 1.2 + glxropcode 218 + alias CompressedTexSubImage2D + wglflags client-handcode server-handcode + +CompressedTexSubImage1DARB(target, level, xoffset, width, format, imageSize, data) + return void + param target TextureTarget in value + param level CheckedInt32 in value + param xoffset CheckedInt32 in value + param width SizeI in value + param format PixelFormat in value + param imageSize SizeI in value + param data CompressedTextureARB in array [imageSize] + category ARB_texture_compression + dlflags handcode + glxflags ARB client-handcode server-handcode + version 1.2 + glxropcode 217 + alias CompressedTexSubImage1D + wglflags client-handcode server-handcode + +GetCompressedTexImageARB(target, level, img) + return void + param target TextureTarget in value + param level CheckedInt32 in value + param img CompressedTextureARB out array [COMPSIZE(target/level)] + category ARB_texture_compression + dlflags notlistable + glxflags ARB client-handcode server-handcode + version 1.2 + glxsingle 160 + alias GetCompressedTexImage + wglflags client-handcode server-handcode + +################################################################################ +# +# ARB Extension #13 +# ARB_texture_border_clamp commands +# +############################################################################### + +# (none) +newcategory: ARB_texture_border_clamp + +############################################################################### +# +# ARB Extension #14 +# ARB_point_parameters commands +# +############################################################################### + +PointParameterfARB(pname, param) + return void + param pname PointParameterNameARB in value + param param CheckedFloat32 in value + category ARB_point_parameters + version 1.0 + glxflags ARB + glxropcode 2065 + extension + alias PointParameterf + +PointParameterfvARB(pname, params) + return void + param pname PointParameterNameARB in value + param params CheckedFloat32 in array [COMPSIZE(pname)] + category ARB_point_parameters + version 1.0 + glxflags ARB + glxropcode 2066 + extension + alias PointParameterfv + +################################################################################ +# +# ARB Extension #15 +# ARB_vertex_blend commands +# +############################################################################### + +WeightbvARB(size, weights) + return void + param size Int32 in value + param weights Int8 in array [size] + category ARB_vertex_blend + version 1.1 + extension + glxropcode 220 + glxflags ignore + offset ? + +WeightsvARB(size, weights) + return void + param size Int32 in value + param weights Int16 in array [size] + category ARB_vertex_blend + version 1.1 + extension + glxropcode 222 + glxflags ignore + offset ? + +WeightivARB(size, weights) + return void + param size Int32 in value + param weights Int32 in array [size] + category ARB_vertex_blend + version 1.1 + extension + glxropcode 224 + glxflags ignore + offset ? + +WeightfvARB(size, weights) + return void + param size Int32 in value + param weights Float32 in array [size] + category ARB_vertex_blend + version 1.1 + extension + glxropcode 227 + glxflags ignore + offset ? + +WeightdvARB(size, weights) + return void + param size Int32 in value + param weights Float64 in array [size] + category ARB_vertex_blend + version 1.1 + extension + glxropcode 228 + glxflags ignore + offset ? + +WeightubvARB(size, weights) + return void + param size Int32 in value + param weights UInt8 in array [size] + category ARB_vertex_blend + version 1.1 + extension + glxropcode 221 + glxflags ignore + offset ? + +WeightusvARB(size, weights) + return void + param size Int32 in value + param weights UInt16 in array [size] + category ARB_vertex_blend + version 1.1 + extension + glxropcode 223 + glxflags ignore + offset ? + +WeightuivARB(size, weights) + return void + param size Int32 in value + param weights UInt32 in array [size] + category ARB_vertex_blend + version 1.1 + extension + glxropcode 225 + glxflags ignore + offset ? + +WeightPointerARB(size, type, stride, pointer) + return void + param size Int32 in value + param type WeightPointerTypeARB in value + param stride SizeI in value + param pointer Void in array [COMPSIZE(type/stride)] retained + category ARB_vertex_blend + version 1.1 + extension + dlflags notlistable + glxflags ignore + offset ? + +VertexBlendARB(count) + return void + param count Int32 in value + category ARB_vertex_blend + version 1.1 + extension + glxropcode 226 + glxflags ignore + offset ? + +################################################################################ +# +# ARB Extension #16 +# ARB_matrix_palette commands +# +############################################################################### + +CurrentPaletteMatrixARB(index) + return void + param index Int32 in value + category ARB_matrix_palette + version 1.1 + extension + glxropcode 4329 + glxflags ignore + offset ? + +MatrixIndexubvARB(size, indices) + return void + param size Int32 in value + param indices UInt8 in array [size] + category ARB_matrix_palette + version 1.1 + extension + glxropcode 4326 + glxflags ignore + offset ? + +MatrixIndexusvARB(size, indices) + return void + param size Int32 in value + param indices UInt16 in array [size] + category ARB_matrix_palette + version 1.1 + extension + glxropcode 4327 + glxflags ignore + offset ? + +MatrixIndexuivARB(size, indices) + return void + param size Int32 in value + param indices UInt32 in array [size] + category ARB_matrix_palette + version 1.1 + extension + glxropcode 4328 + glxflags ignore + offset ? + +MatrixIndexPointerARB(size, type, stride, pointer) + return void + param size Int32 in value + param type MatrixIndexPointerTypeARB in value + param stride SizeI in value + param pointer Void in array [COMPSIZE(type/stride)] retained + category ARB_matrix_palette + version 1.1 + extension + dlflags notlistable + glxflags ignore + offset ? + +################################################################################ +# +# ARB Extension #17 +# ARB_texture_env_combine commands +# +############################################################################### + +# (none) +newcategory: ARB_texture_env_combine + +################################################################################ +# +# ARB Extension #18 +# ARB_texture_env_crossbar commands +# +############################################################################### + +# (none) +newcategory: ARB_texture_env_crossbar + +################################################################################ +# +# ARB Extension #19 +# ARB_texture_env_dot3 commands +# +############################################################################### + +# (none) +newcategory: ARB_texture_env_dot3 + +############################################################################### +# +# ARB Extension #20 - WGL_ARB_render_texture +# +############################################################################### + +############################################################################### +# +# ARB Extension #21 +# ARB_texture_mirrored_repeat commands +# +############################################################################### + +# (none) +newcategory: ARB_texture_mirrored_repeat + +############################################################################### +# +# ARB Extension #22 +# ARB_depth_texture commands +# +############################################################################### + +# (none) +newcategory: ARB_depth_texture + +############################################################################### +# +# ARB Extension #23 +# ARB_shadow commands +# +############################################################################### + +# (none) +newcategory: ARB_shadow + +############################################################################### +# +# ARB Extension #24 +# ARB_shadow_ambient commands +# +############################################################################### + +# (none) +newcategory: ARB_shadow_ambient + +############################################################################### +# +# ARB Extension #25 +# ARB_window_pos commands +# Note: all entry points use glxropcode ropcode 230, with 3 float parameters +# +############################################################################### + +WindowPos2dARB(x, y) + return void + param x CoordD in value + param y CoordD in value + category ARB_window_pos + vectorequiv WindowPos2dvARB + version 1.0 + alias WindowPos2d + +WindowPos2dvARB(v) + return void + param v CoordD in array [2] + category ARB_window_pos + version 1.0 + glxropcode 230 + glxflags client-handcode server-handcode + alias WindowPos2dv + +WindowPos2fARB(x, y) + return void + param x CoordF in value + param y CoordF in value + category ARB_window_pos + vectorequiv WindowPos2fvARB + version 1.0 + alias WindowPos2f + +WindowPos2fvARB(v) + return void + param v CoordF in array [2] + category ARB_window_pos + version 1.0 + glxropcode 230 + glxflags client-handcode server-handcode + alias WindowPos2fv + +WindowPos2iARB(x, y) + return void + param x CoordI in value + param y CoordI in value + category ARB_window_pos + vectorequiv WindowPos2ivARB + version 1.0 + alias WindowPos2i + +WindowPos2ivARB(v) + return void + param v CoordI in array [2] + category ARB_window_pos + version 1.0 + glxropcode 230 + glxflags client-handcode server-handcode + alias WindowPos2iv + +WindowPos2sARB(x, y) + return void + param x CoordS in value + param y CoordS in value + category ARB_window_pos + vectorequiv WindowPos2svARB + version 1.0 + alias WindowPos2s + +WindowPos2svARB(v) + return void + param v CoordS in array [2] + category ARB_window_pos + version 1.0 + glxropcode 230 + glxflags client-handcode server-handcode + alias WindowPos2sv + +WindowPos3dARB(x, y, z) + return void + param x CoordD in value + param y CoordD in value + param z CoordD in value + vectorequiv WindowPos3dvARB + category ARB_window_pos + version 1.0 + alias WindowPos3d + +WindowPos3dvARB(v) + return void + param v CoordD in array [3] + category ARB_window_pos + version 1.0 + glxropcode 230 + glxflags client-handcode server-handcode + alias WindowPos3dv + +WindowPos3fARB(x, y, z) + return void + param x CoordF in value + param y CoordF in value + param z CoordF in value + category ARB_window_pos + vectorequiv WindowPos3fvARB + version 1.0 + alias WindowPos3f + +WindowPos3fvARB(v) + return void + param v CoordF in array [3] + category ARB_window_pos + version 1.0 + glxropcode 230 + glxflags client-handcode server-handcode + alias WindowPos3fv + +WindowPos3iARB(x, y, z) + return void + param x CoordI in value + param y CoordI in value + param z CoordI in value + category ARB_window_pos + vectorequiv WindowPos3ivARB + version 1.0 + alias WindowPos3i + +WindowPos3ivARB(v) + return void + param v CoordI in array [3] + category ARB_window_pos + version 1.0 + glxropcode 230 + glxflags client-handcode server-handcode + alias WindowPos3iv + +WindowPos3sARB(x, y, z) + return void + param x CoordS in value + param y CoordS in value + param z CoordS in value + category ARB_window_pos + vectorequiv WindowPos3svARB + version 1.0 + alias WindowPos3s + +WindowPos3svARB(v) + return void + param v CoordS in array [3] + category ARB_window_pos + version 1.0 + glxropcode 230 + glxflags client-handcode server-handcode + alias WindowPos3sv + +############################################################################### +# +# ARB Extension #26 +# ARB_vertex_program commands +# +############################################################################### + +VertexAttrib1dARB(index, x) + return void + param index UInt32 in value + param x Float64 in value + category ARB_vertex_program + version 1.3 + vectorequiv VertexAttrib1dvARB + extension soft WINSOFT NV10 + alias VertexAttrib1d + +VertexAttrib1dvARB(index, v) + return void + param index UInt32 in value + param v Float64 in array [1] + category ARB_vertex_program + version 1.3 + extension soft WINSOFT NV10 + glxropcode 4197 + alias VertexAttrib1dv + +VertexAttrib1fARB(index, x) + return void + param index UInt32 in value + param x Float32 in value + category ARB_vertex_program + version 1.3 + vectorequiv VertexAttrib1fvARB + extension soft WINSOFT NV10 + alias VertexAttrib1f + +VertexAttrib1fvARB(index, v) + return void + param index UInt32 in value + param v Float32 in array [1] + category ARB_vertex_program + version 1.3 + extension soft WINSOFT NV10 + glxropcode 4193 + alias VertexAttrib1fv + +VertexAttrib1sARB(index, x) + return void + param index UInt32 in value + param x Int16 in value + category ARB_vertex_program + version 1.3 + vectorequiv VertexAttrib1svARB + extension soft WINSOFT NV10 + alias VertexAttrib1s + +VertexAttrib1svARB(index, v) + return void + param index UInt32 in value + param v Int16 in array [1] + category ARB_vertex_program + version 1.3 + extension soft WINSOFT NV10 + glxropcode 4189 + alias VertexAttrib1sv + +VertexAttrib2dARB(index, x, y) + return void + param index UInt32 in value + param x Float64 in value + param y Float64 in value + category ARB_vertex_program + version 1.3 + vectorequiv VertexAttrib2dvARB + extension soft WINSOFT NV10 + alias VertexAttrib2d + +VertexAttrib2dvARB(index, v) + return void + param index UInt32 in value + param v Float64 in array [2] + category ARB_vertex_program + version 1.3 + extension soft WINSOFT NV10 + glxropcode 4198 + alias VertexAttrib2dv + +VertexAttrib2fARB(index, x, y) + return void + param index UInt32 in value + param x Float32 in value + param y Float32 in value + category ARB_vertex_program + version 1.3 + vectorequiv VertexAttrib2fvARB + extension soft WINSOFT NV10 + alias VertexAttrib2f + +VertexAttrib2fvARB(index, v) + return void + param index UInt32 in value + param v Float32 in array [2] + category ARB_vertex_program + version 1.3 + extension soft WINSOFT NV10 + glxropcode 4194 + alias VertexAttrib2fv + +VertexAttrib2sARB(index, x, y) + return void + param index UInt32 in value + param x Int16 in value + param y Int16 in value + category ARB_vertex_program + version 1.3 + vectorequiv VertexAttrib2svARB + extension soft WINSOFT NV10 + alias VertexAttrib2s + +VertexAttrib2svARB(index, v) + return void + param index UInt32 in value + param v Int16 in array [2] + category ARB_vertex_program + version 1.3 + extension soft WINSOFT NV10 + glxropcode 4190 + alias VertexAttrib2sv + +VertexAttrib3dARB(index, x, y, z) + return void + param index UInt32 in value + param x Float64 in value + param y Float64 in value + param z Float64 in value + category ARB_vertex_program + version 1.3 + vectorequiv VertexAttrib3dvARB + extension soft WINSOFT NV10 + alias VertexAttrib3d + +VertexAttrib3dvARB(index, v) + return void + param index UInt32 in value + param v Float64 in array [3] + category ARB_vertex_program + version 1.3 + extension soft WINSOFT NV10 + glxropcode 4199 + alias VertexAttrib3dv + +VertexAttrib3fARB(index, x, y, z) + return void + param index UInt32 in value + param x Float32 in value + param y Float32 in value + param z Float32 in value + category ARB_vertex_program + version 1.3 + vectorequiv VertexAttrib3fvARB + extension soft WINSOFT NV10 + alias VertexAttrib3f + +VertexAttrib3fvARB(index, v) + return void + param index UInt32 in value + param v Float32 in array [3] + category ARB_vertex_program + version 1.3 + extension soft WINSOFT NV10 + glxropcode 4195 + alias VertexAttrib3fv + +VertexAttrib3sARB(index, x, y, z) + return void + param index UInt32 in value + param x Int16 in value + param y Int16 in value + param z Int16 in value + category ARB_vertex_program + version 1.3 + vectorequiv VertexAttrib3svARB + extension soft WINSOFT NV10 + alias VertexAttrib3s + +VertexAttrib3svARB(index, v) + return void + param index UInt32 in value + param v Int16 in array [3] + category ARB_vertex_program + version 1.3 + extension soft WINSOFT NV10 + glxropcode 4191 + alias VertexAttrib3sv + +VertexAttrib4NbvARB(index, v) + return void + param index UInt32 in value + param v Int8 in array [4] + category ARB_vertex_program + version 1.3 + extension soft WINSOFT NV10 + alias VertexAttrib4Nbv + +VertexAttrib4NivARB(index, v) + return void + param index UInt32 in value + param v Int32 in array [4] + category ARB_vertex_program + version 1.3 + extension soft WINSOFT NV10 + alias VertexAttrib4Niv + +VertexAttrib4NsvARB(index, v) + return void + param index UInt32 in value + param v Int16 in array [4] + category ARB_vertex_program + version 1.3 + extension soft WINSOFT NV10 + alias VertexAttrib4Nsv + +VertexAttrib4NubARB(index, x, y, z, w) + return void + param index UInt32 in value + param x UInt8 in value + param y UInt8 in value + param z UInt8 in value + param w UInt8 in value + category ARB_vertex_program + version 1.3 + extension soft WINSOFT NV10 + alias VertexAttrib4Nub + +VertexAttrib4NubvARB(index, v) + return void + param index UInt32 in value + param v UInt8 in array [4] + category ARB_vertex_program + version 1.3 + extension soft WINSOFT NV10 + glxropcode 4201 + alias VertexAttrib4Nubv + +VertexAttrib4NuivARB(index, v) + return void + param index UInt32 in value + param v UInt32 in array [4] + category ARB_vertex_program + version 1.3 + extension soft WINSOFT NV10 + alias VertexAttrib4Nuiv + +VertexAttrib4NusvARB(index, v) + return void + param index UInt32 in value + param v UInt16 in array [4] + category ARB_vertex_program + version 1.3 + extension soft WINSOFT NV10 + alias VertexAttrib4Nusv + +VertexAttrib4bvARB(index, v) + return void + param index UInt32 in value + param v Int8 in array [4] + category ARB_vertex_program + version 1.3 + extension soft WINSOFT NV10 + alias VertexAttrib4bv + +VertexAttrib4dARB(index, x, y, z, w) + return void + param index UInt32 in value + param x Float64 in value + param y Float64 in value + param z Float64 in value + param w Float64 in value + category ARB_vertex_program + version 1.3 + vectorequiv VertexAttrib4dvARB + extension soft WINSOFT NV10 + alias VertexAttrib4d + +VertexAttrib4dvARB(index, v) + return void + param index UInt32 in value + param v Float64 in array [4] + category ARB_vertex_program + version 1.3 + extension soft WINSOFT NV10 + glxropcode 4200 + alias VertexAttrib4dv + +VertexAttrib4fARB(index, x, y, z, w) + return void + param index UInt32 in value + param x Float32 in value + param y Float32 in value + param z Float32 in value + param w Float32 in value + category ARB_vertex_program + version 1.3 + vectorequiv VertexAttrib4fvARB + extension soft WINSOFT NV10 + alias VertexAttrib4f + +VertexAttrib4fvARB(index, v) + return void + param index UInt32 in value + param v Float32 in array [4] + category ARB_vertex_program + version 1.3 + extension soft WINSOFT NV10 + glxropcode 4196 + alias VertexAttrib4fv + +VertexAttrib4ivARB(index, v) + return void + param index UInt32 in value + param v Int32 in array [4] + category ARB_vertex_program + version 1.3 + extension soft WINSOFT NV10 + alias VertexAttrib4iv + +VertexAttrib4sARB(index, x, y, z, w) + return void + param index UInt32 in value + param x Int16 in value + param y Int16 in value + param z Int16 in value + param w Int16 in value + category ARB_vertex_program + version 1.3 + vectorequiv VertexAttrib4svARB + extension soft WINSOFT NV10 + alias VertexAttrib4s + +VertexAttrib4svARB(index, v) + return void + param index UInt32 in value + param v Int16 in array [4] + category ARB_vertex_program + version 1.3 + extension soft WINSOFT NV10 + glxropcode 4192 + alias VertexAttrib4sv + +VertexAttrib4ubvARB(index, v) + return void + param index UInt32 in value + param v UInt8 in array [4] + category ARB_vertex_program + version 1.3 + extension soft WINSOFT NV10 + alias VertexAttrib4ubv + +VertexAttrib4uivARB(index, v) + return void + param index UInt32 in value + param v UInt32 in array [4] + category ARB_vertex_program + version 1.3 + extension soft WINSOFT NV10 + alias VertexAttrib4uiv + +VertexAttrib4usvARB(index, v) + return void + param index UInt32 in value + param v UInt16 in array [4] + category ARB_vertex_program + version 1.3 + extension soft WINSOFT NV10 + alias VertexAttrib4usv + +VertexAttribPointerARB(index, size, type, normalized, stride, pointer) + return void + param index UInt32 in value + param size Int32 in value + param type VertexAttribPointerTypeARB in value + param normalized Boolean in value + param stride SizeI in value + param pointer Void in array [COMPSIZE(size/type/stride)] retained + dlflags notlistable + category ARB_vertex_program + version 1.3 + extension soft WINSOFT NV10 + alias VertexAttribPointer + +EnableVertexAttribArrayARB(index) + return void + param index UInt32 in value + dlflags notlistable + category ARB_vertex_program + version 1.3 + extension soft WINSOFT NV10 + alias EnableVertexAttribArray + +DisableVertexAttribArrayARB(index) + return void + param index UInt32 in value + dlflags notlistable + category ARB_vertex_program + version 1.3 + extension soft WINSOFT NV10 + alias DisableVertexAttribArray + +ProgramStringARB(target, format, len, string) + return void + param target ProgramTargetARB in value + param format ProgramFormatARB in value + param len SizeI in value + param string Void in array [len] + category ARB_vertex_program + version 1.3 + extension soft WINSOFT NV10 + glxflags ignore + offset 667 + +BindProgramARB(target, program) + return void + param target ProgramTargetARB in value + param program UInt32 in value + category ARB_vertex_program + version 1.3 + extension soft WINSOFT NV10 + glxropcode 4180 + offset 579 + +DeleteProgramsARB(n, programs) + return void + param n SizeI in value + param programs UInt32 in array [n] + dlflags notlistable + category ARB_vertex_program + version 1.3 + extension soft WINSOFT NV10 + glxvendorpriv 1294 + offset 580 + +GenProgramsARB(n, programs) + return void + param n SizeI in value + param programs UInt32 out array [n] + dlflags notlistable + category ARB_vertex_program + version 1.3 + extension soft WINSOFT NV10 + glxvendorpriv 1295 + offset 582 + +ProgramEnvParameter4dARB(target, index, x, y, z, w) + return void + param target ProgramTargetARB in value + param index UInt32 in value + param x Float64 in value + param y Float64 in value + param z Float64 in value + param w Float64 in value + category ARB_vertex_program + version 1.3 + vectorequiv ProgramEnvParameter4dvARB + extension soft WINSOFT NV10 + glxflags ignore + offset 668 + +ProgramEnvParameter4dvARB(target, index, params) + return void + param target ProgramTargetARB in value + param index UInt32 in value + param params Float64 in array [4] + category ARB_vertex_program + version 1.3 + extension soft WINSOFT NV10 + glxflags ignore + offset 669 + +ProgramEnvParameter4fARB(target, index, x, y, z, w) + return void + param target ProgramTargetARB in value + param index UInt32 in value + param x Float32 in value + param y Float32 in value + param z Float32 in value + param w Float32 in value + category ARB_vertex_program + version 1.3 + vectorequiv ProgramEnvParameter4fvARB + extension soft WINSOFT NV10 + glxflags ignore + offset 670 + +ProgramEnvParameter4fvARB(target, index, params) + return void + param target ProgramTargetARB in value + param index UInt32 in value + param params Float32 in array [4] + category ARB_vertex_program + version 1.3 + extension soft WINSOFT NV10 + glxflags ignore + offset 671 + +ProgramLocalParameter4dARB(target, index, x, y, z, w) + return void + param target ProgramTargetARB in value + param index UInt32 in value + param x Float64 in value + param y Float64 in value + param z Float64 in value + param w Float64 in value + category ARB_vertex_program + version 1.3 + vectorequiv ProgramLocalParameter4dvARB + extension soft WINSOFT NV10 + glxflags ignore + offset 672 + +ProgramLocalParameter4dvARB(target, index, params) + return void + param target ProgramTargetARB in value + param index UInt32 in value + param params Float64 in array [4] + category ARB_vertex_program + version 1.3 + extension soft WINSOFT NV10 + glxflags ignore + offset 673 + +ProgramLocalParameter4fARB(target, index, x, y, z, w) + return void + param target ProgramTargetARB in value + param index UInt32 in value + param x Float32 in value + param y Float32 in value + param z Float32 in value + param w Float32 in value + category ARB_vertex_program + version 1.3 + vectorequiv ProgramLocalParameter4fvARB + extension soft WINSOFT NV10 + glxflags ignore + offset 674 + +ProgramLocalParameter4fvARB(target, index, params) + return void + param target ProgramTargetARB in value + param index UInt32 in value + param params Float32 in array [4] + category ARB_vertex_program + version 1.3 + extension soft WINSOFT NV10 + glxflags ignore + offset 675 + +GetProgramEnvParameterdvARB(target, index, params) + return void + param target ProgramTargetARB in value + param index UInt32 in value + param params Float64 out array [4] + dlflags notlistable + category ARB_vertex_program + version 1.3 + extension soft WINSOFT NV10 + glxflags ignore + offset 676 + +GetProgramEnvParameterfvARB(target, index, params) + return void + param target ProgramTargetARB in value + param index UInt32 in value + param params Float32 out array [4] + dlflags notlistable + category ARB_vertex_program + version 1.3 + extension soft WINSOFT NV10 + glxflags ignore + offset 677 + +GetProgramLocalParameterdvARB(target, index, params) + return void + param target ProgramTargetARB in value + param index UInt32 in value + param params Float64 out array [4] + dlflags notlistable + category ARB_vertex_program + version 1.3 + extension soft WINSOFT NV10 + glxflags ignore + offset 678 + +GetProgramLocalParameterfvARB(target, index, params) + return void + param target ProgramTargetARB in value + param index UInt32 in value + param params Float32 out array [4] + dlflags notlistable + category ARB_vertex_program + version 1.3 + extension soft WINSOFT NV10 + glxflags ignore + offset 679 + +GetProgramivARB(target, pname, params) + return void + param target ProgramTargetARB in value + param pname ProgramPropertyARB in value + param params Int32 out array [1] + dlflags notlistable + category ARB_vertex_program + version 1.3 + extension soft WINSOFT NV10 + glxflags ignore + offset 680 + +GetProgramStringARB(target, pname, string) + return void + param target ProgramTargetARB in value + param pname ProgramStringPropertyARB in value + param string Void out array [COMPSIZE(target,pname)] + dlflags notlistable + category ARB_vertex_program + version 1.3 + extension soft WINSOFT NV10 + glxflags ignore + offset 681 + +GetVertexAttribdvARB(index, pname, params) + return void + param index UInt32 in value + param pname VertexAttribPropertyARB in value + param params Float64 out array [4] + dlflags notlistable + category ARB_vertex_program + version 1.3 + extension soft WINSOFT NV10 + glxvendorpriv 1301 + alias GetVertexAttribdv + +GetVertexAttribfvARB(index, pname, params) + return void + param index UInt32 in value + param pname VertexAttribPropertyARB in value + param params Float32 out array [4] + dlflags notlistable + category ARB_vertex_program + version 1.3 + extension soft WINSOFT NV10 + glxvendorpriv 1302 + alias GetVertexAttribfv + +GetVertexAttribivARB(index, pname, params) + return void + param index UInt32 in value + param pname VertexAttribPropertyARB in value + param params Int32 out array [4] + dlflags notlistable + category ARB_vertex_program + version 1.3 + extension soft WINSOFT NV10 + glxvendorpriv 1303 + alias GetVertexAttribiv + +GetVertexAttribPointervARB(index, pname, pointer) + return void + param index UInt32 in value + param pname VertexAttribPointerPropertyARB in value + param pointer VoidPointer out array [1] + dlflags notlistable + category ARB_vertex_program + version 1.3 + extension soft WINSOFT NV10 + glxflags ignore + alias GetVertexAttribPointerv + +IsProgramARB(program) + return Boolean + param program UInt32 in value + dlflags notlistable + category ARB_vertex_program + version 1.3 + extension soft WINSOFT NV10 + glxvendorpriv 1304 + alias IsProgram + + +############################################################################### +# +# ARB Extension #27 +# ARB_fragment_program commands +# +############################################################################### + +# All ARB_fragment_program entry points are shared with ARB_vertex_program, +# and are only included in that #define block, for now. +newcategory: ARB_fragment_program +passthru: /* All ARB_fragment_program entry points are shared with ARB_vertex_program. */ + +############################################################################### +# +# ARB Extension #28 +# ARB_vertex_buffer_object commands +# +############################################################################### + +BindBufferARB(target, buffer) + return void + param target BufferTargetARB in value + param buffer UInt32 in value + category ARB_vertex_buffer_object + version 1.2 + extension + alias BindBuffer + +DeleteBuffersARB(n, buffers) + return void + param n SizeI in value + param buffers ConstUInt32 in array [n] + category ARB_vertex_buffer_object + version 1.2 + extension + alias DeleteBuffers + +GenBuffersARB(n, buffers) + return void + param n SizeI in value + param buffers UInt32 out array [n] + category ARB_vertex_buffer_object + version 1.2 + extension + alias GenBuffers + +IsBufferARB(buffer) + return Boolean + param buffer UInt32 in value + category ARB_vertex_buffer_object + version 1.2 + extension + alias IsBuffer + +BufferDataARB(target, size, data, usage) + return void + param target BufferTargetARB in value + param size BufferSizeARB in value + param data ConstVoid in array [size] + param usage BufferUsageARB in value + category ARB_vertex_buffer_object + version 1.2 + extension + alias BufferData + +BufferSubDataARB(target, offset, size, data) + return void + param target BufferTargetARB in value + param offset BufferOffsetARB in value + param size BufferSizeARB in value + param data ConstVoid in array [size] + category ARB_vertex_buffer_object + version 1.2 + extension + alias BufferSubData + +GetBufferSubDataARB(target, offset, size, data) + return void + param target BufferTargetARB in value + param offset BufferOffsetARB in value + param size BufferSizeARB in value + param data Void out array [size] + category ARB_vertex_buffer_object + dlflags notlistable + version 1.2 + extension + alias GetBufferSubData + +MapBufferARB(target, access) + return VoidPointer + param target BufferTargetARB in value + param access BufferAccessARB in value + category ARB_vertex_buffer_object + version 1.2 + extension + alias MapBuffer + +UnmapBufferARB(target) + return Boolean + param target BufferTargetARB in value + category ARB_vertex_buffer_object + version 1.2 + extension + alias UnmapBuffer + +GetBufferParameterivARB(target, pname, params) + return void + param target BufferTargetARB in value + param pname BufferPNameARB in value + param params Int32 out array [COMPSIZE(pname)] + category ARB_vertex_buffer_object + dlflags notlistable + version 1.2 + extension + alias GetBufferParameteriv + +GetBufferPointervARB(target, pname, params) + return void + param target BufferTargetARB in value + param pname BufferPointerNameARB in value + param params VoidPointer out array [1] + category ARB_vertex_buffer_object + dlflags notlistable + version 1.2 + extension + alias GetBufferPointerv + +############################################################################### +# +# ARB Extension #29 +# ARB_occlusion_query commands +# +############################################################################### + +GenQueriesARB(n, ids) + return void + param n SizeI in value + param ids UInt32 out array [n] + category ARB_occlusion_query + version 1.5 + extension + alias GenQueries + +DeleteQueriesARB(n, ids) + return void + param n SizeI in value + param ids UInt32 in array [n] + category ARB_occlusion_query + version 1.5 + extension + alias DeleteQueries + +IsQueryARB(id) + return Boolean + param id UInt32 in value + category ARB_occlusion_query + version 1.5 + extension + alias IsQuery + +BeginQueryARB(target, id) + return void + param target GLenum in value + param id UInt32 in value + category ARB_occlusion_query + version 1.5 + extension + alias BeginQuery + +EndQueryARB(target) + return void + param target GLenum in value + category ARB_occlusion_query + version 1.5 + extension + alias EndQuery + +GetQueryivARB(target, pname, params) + return void + param target GLenum in value + param pname GLenum in value + param params Int32 out array [pname] + category ARB_occlusion_query + dlflags notlistable + version 1.5 + extension + alias GetQueryiv + +GetQueryObjectivARB(id, pname, params) + return void + param id UInt32 in value + param pname GLenum in value + param params Int32 out array [pname] + category ARB_occlusion_query + dlflags notlistable + version 1.5 + extension + alias GetQueryObjectiv + +GetQueryObjectuivARB(id, pname, params) + return void + param id UInt32 in value + param pname GLenum in value + param params UInt32 out array [pname] + category ARB_occlusion_query + dlflags notlistable + version 1.5 + extension + alias GetQueryObjectuiv + +############################################################################### +# +# ARB Extension #30 +# ARB_shader_objects commands +# +############################################################################### + +DeleteObjectARB(obj) + return void + param obj handleARB in value + category ARB_shader_objects + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +GetHandleARB(pname) + return handleARB + param pname GLenum in value + category ARB_shader_objects + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +DetachObjectARB(containerObj, attachedObj) + return void + param containerObj handleARB in value + param attachedObj handleARB in value + category ARB_shader_objects + version 1.2 + extension + glxropcode ? + glxflags ignore + alias DetachShader + +CreateShaderObjectARB(shaderType) + return handleARB + param shaderType GLenum in value + category ARB_shader_objects + version 1.2 + extension + glxropcode ? + glxflags ignore + alias CreateShader + +ShaderSourceARB(shaderObj, count, string, length) + return void + param shaderObj handleARB in value + param count SizeI in value + param string charPointerARB in array [count] + param length Int32 in array [1] + category ARB_shader_objects + version 1.2 + extension + glxropcode ? + glxflags ignore + alias ShaderSource + +CompileShaderARB(shaderObj) + return void + param shaderObj handleARB in value + category ARB_shader_objects + version 1.2 + extension + glxropcode ? + glxflags ignore + alias CompileShader + +CreateProgramObjectARB() + return handleARB + category ARB_shader_objects + version 1.2 + extension + glxropcode ? + glxflags ignore + alias CreateProgram + +AttachObjectARB(containerObj, obj) + return void + param containerObj handleARB in value + param obj handleARB in value + category ARB_shader_objects + version 1.2 + extension + glxropcode ? + glxflags ignore + alias AttachShader + +LinkProgramARB(programObj) + return void + param programObj handleARB in value + category ARB_shader_objects + version 1.2 + extension + glxropcode ? + glxflags ignore + alias LinkProgram + +UseProgramObjectARB(programObj) + return void + param programObj handleARB in value + category ARB_shader_objects + version 1.2 + extension + glxropcode ? + glxflags ignore + alias UseProgram + +ValidateProgramARB(programObj) + return void + param programObj handleARB in value + category ARB_shader_objects + version 1.2 + extension + glxropcode ? + glxflags ignore + alias ValidateProgram + +Uniform1fARB(location, v0) + return void + param location Int32 in value + param v0 Float32 in value + category ARB_shader_objects + version 1.2 + extension + glxropcode ? + glxflags ignore + alias Uniform1f + +Uniform2fARB(location, v0, v1) + return void + param location Int32 in value + param v0 Float32 in value + param v1 Float32 in value + category ARB_shader_objects + version 1.2 + extension + glxropcode ? + glxflags ignore + alias Uniform2f + +Uniform3fARB(location, v0, v1, v2) + return void + param location Int32 in value + param v0 Float32 in value + param v1 Float32 in value + param v2 Float32 in value + category ARB_shader_objects + version 1.2 + extension + glxropcode ? + glxflags ignore + alias Uniform3f + +Uniform4fARB(location, v0, v1, v2, v3) + return void + param location Int32 in value + param v0 Float32 in value + param v1 Float32 in value + param v2 Float32 in value + param v3 Float32 in value + category ARB_shader_objects + version 1.2 + extension + glxropcode ? + glxflags ignore + alias Uniform4f + +Uniform1iARB(location, v0) + return void + param location Int32 in value + param v0 Int32 in value + category ARB_shader_objects + version 1.2 + extension + glxropcode ? + glxflags ignore + alias Uniform1i + +Uniform2iARB(location, v0, v1) + return void + param location Int32 in value + param v0 Int32 in value + param v1 Int32 in value + category ARB_shader_objects + version 1.2 + extension + glxropcode ? + glxflags ignore + alias Uniform2i + +Uniform3iARB(location, v0, v1, v2) + return void + param location Int32 in value + param v0 Int32 in value + param v1 Int32 in value + param v2 Int32 in value + category ARB_shader_objects + version 1.2 + extension + glxropcode ? + glxflags ignore + alias Uniform3i + +Uniform4iARB(location, v0, v1, v2, v3) + return void + param location Int32 in value + param v0 Int32 in value + param v1 Int32 in value + param v2 Int32 in value + param v3 Int32 in value + category ARB_shader_objects + version 1.2 + extension + glxropcode ? + glxflags ignore + alias Uniform4i + +Uniform1fvARB(location, count, value) + return void + param location Int32 in value + param count SizeI in value + param value Float32 in array [count] + category ARB_shader_objects + version 1.2 + extension + glxropcode ? + glxflags ignore + alias Uniform1fv + +Uniform2fvARB(location, count, value) + return void + param location Int32 in value + param count SizeI in value + param value Float32 in array [count] + category ARB_shader_objects + version 1.2 + extension + glxropcode ? + glxflags ignore + alias Uniform2fv + +Uniform3fvARB(location, count, value) + return void + param location Int32 in value + param count SizeI in value + param value Float32 in array [count] + category ARB_shader_objects + version 1.2 + extension + glxropcode ? + glxflags ignore + alias Uniform3fv + +Uniform4fvARB(location, count, value) + return void + param location Int32 in value + param count SizeI in value + param value Float32 in array [count] + category ARB_shader_objects + version 1.2 + extension + glxropcode ? + glxflags ignore + alias Uniform4fv + +Uniform1ivARB(location, count, value) + return void + param location Int32 in value + param count SizeI in value + param value Int32 in array [count] + category ARB_shader_objects + version 1.2 + extension + glxropcode ? + glxflags ignore + alias Uniform1iv + +Uniform2ivARB(location, count, value) + return void + param location Int32 in value + param count SizeI in value + param value Int32 in array [count] + category ARB_shader_objects + version 1.2 + extension + glxropcode ? + glxflags ignore + alias Uniform2iv + +Uniform3ivARB(location, count, value) + return void + param location Int32 in value + param count SizeI in value + param value Int32 in array [count] + category ARB_shader_objects + version 1.2 + extension + glxropcode ? + glxflags ignore + alias Uniform3iv + +Uniform4ivARB(location, count, value) + return void + param location Int32 in value + param count SizeI in value + param value Int32 in array [count] + category ARB_shader_objects + version 1.2 + extension + glxropcode ? + glxflags ignore + alias Uniform4iv + +UniformMatrix2fvARB(location, count, transpose, value) + return void + param location Int32 in value + param count SizeI in value + param transpose Boolean in value + param value Float32 in array [count] + category ARB_shader_objects + version 1.2 + extension + glxropcode ? + glxflags ignore + alias UniformMatrix2fv + +UniformMatrix3fvARB(location, count, transpose, value) + return void + param location Int32 in value + param count SizeI in value + param transpose Boolean in value + param value Float32 in array [count] + category ARB_shader_objects + version 1.2 + extension + glxropcode ? + glxflags ignore + alias UniformMatrix3fv + +UniformMatrix4fvARB(location, count, transpose, value) + return void + param location Int32 in value + param count SizeI in value + param transpose Boolean in value + param value Float32 in array [count] + category ARB_shader_objects + version 1.2 + extension + glxropcode ? + glxflags ignore + alias UniformMatrix4fv + +GetObjectParameterfvARB(obj, pname, params) + return void + param obj handleARB in value + param pname GLenum in value + param params Float32 out array [pname] + category ARB_shader_objects + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +GetObjectParameterivARB(obj, pname, params) + return void + param obj handleARB in value + param pname GLenum in value + param params Int32 out array [pname] + category ARB_shader_objects + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +GetInfoLogARB(obj, maxLength, length, infoLog) + return void + param obj handleARB in value + param maxLength SizeI in value + param length SizeI out array [1] + param infoLog charARB out array [length] + category ARB_shader_objects + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +GetAttachedObjectsARB(containerObj, maxCount, count, obj) + return void + param containerObj handleARB in value + param maxCount SizeI in value + param count SizeI out array [1] + param obj handleARB out array [count] + category ARB_shader_objects + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + alias GetAttachedShaders + +GetUniformLocationARB(programObj, name) + return Int32 + param programObj handleARB in value + param name charARB in array [] + category ARB_shader_objects + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + alias GetUniformLocation + +GetActiveUniformARB(programObj, index, maxLength, length, size, type, name) + return void + param programObj handleARB in value + param index UInt32 in value + param maxLength SizeI in value + param length SizeI out array [1] + param size Int32 out array [1] + param type GLenum out array [1] + param name charARB out array [] + category ARB_shader_objects + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + alias GetActiveUniform + +GetUniformfvARB(programObj, location, params) + return void + param programObj handleARB in value + param location Int32 in value + param params Float32 out array [location] + category ARB_shader_objects + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + alias GetUniformfv + +GetUniformivARB(programObj, location, params) + return void + param programObj handleARB in value + param location Int32 in value + param params Int32 out array [location] + category ARB_shader_objects + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + alias GetUniformiv + +GetShaderSourceARB(obj, maxLength, length, source) + return void + param obj handleARB in value + param maxLength SizeI in value + param length SizeI out array [1] + param source charARB out array [length] + category ARB_shader_objects + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + alias GetShaderSource + + +############################################################################### +# +# ARB Extension #31 +# ARB_vertex_shader commands +# +############################################################################### + +BindAttribLocationARB(programObj, index, name) + return void + param programObj handleARB in value + param index UInt32 in value + param name charARB in array [] + category ARB_vertex_shader + version 1.2 + extension + glxropcode ? + glxflags ignore + alias BindAttribLocation + +GetActiveAttribARB(programObj, index, maxLength, length, size, type, name) + return void + param programObj handleARB in value + param index UInt32 in value + param maxLength SizeI in value + param length SizeI out array [1] + param size Int32 out array [1] + param type GLenum out array [1] + param name charARB out array [] + category ARB_vertex_shader + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + alias GetActiveAttrib + +GetAttribLocationARB(programObj, name) + return Int32 + param programObj handleARB in value + param name charARB in array [] + category ARB_vertex_shader + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + alias GetAttribLocation + +############################################################################### +# +# ARB Extension #32 +# ARB_fragment_shader commands +# +############################################################################### + +# (none) +newcategory: ARB_fragment_shader + +############################################################################### +# +# ARB Extension #33 +# ARB_shading_language_100 commands +# +############################################################################### + +# (none) +newcategory: ARB_shading_language_100 + +############################################################################### +# +# ARB Extension #34 +# ARB_texture_non_power_of_two commands +# +############################################################################### + +# (none) +newcategory: ARB_texture_non_power_of_two + +############################################################################### +# +# ARB Extension #35 +# ARB_point_sprite commands +# +############################################################################### + +# (none) +newcategory: ARB_point_sprite + +############################################################################### +# +# ARB Extension #36 +# ARB_fragment_program_shadow commands +# +############################################################################### + +# (none) +newcategory: ARB_fragment_program_shadow + +############################################################################### +# +# ARB Extension #37 +# ARB_draw_buffers commands +# +############################################################################### + +DrawBuffersARB(n, bufs) + return void + param n SizeI in value + param bufs DrawBufferModeATI in array [n] + category ARB_draw_buffers + version 1.5 + extension + alias DrawBuffers + +############################################################################### +# +# ARB Extension #38 +# ARB_texture_rectangle commands +# +############################################################################### + +# (none) +newcategory: ARB_texture_rectangle + +############################################################################### +# +# ARB Extension #39 +# ARB_color_buffer_float commands +# +############################################################################### + +ClampColorARB(target, clamp) + return void + param target ClampColorTargetARB in value + param clamp ClampColorModeARB in value + category ARB_color_buffer_float + version 1.5 + extension + glxropcode 234 + glxflags ignore + alias ClampColor + +############################################################################### +# +# ARB Extension #40 +# ARB_half_float_pixel commands +# +############################################################################### + +# (none) +newcategory: ARB_half_float_pixel + +############################################################################### +# +# ARB Extension #41 +# ARB_texture_float commands +# +############################################################################### + +# (none) +newcategory: ARB_texture_float + +############################################################################### +# +# ARB Extension #42 +# ARB_pixel_buffer_object commands +# +############################################################################### + +# (none) +newcategory: ARB_pixel_buffer_object + +############################################################################### +# +# ARB Extension #43 +# ARB_depth_buffer_float commands (also OpenGL 3.0) +# +############################################################################### + +# (none) +newcategory: ARB_depth_buffer_float + +############################################################################### +# +# ARB Extension #44 +# ARB_draw_instanced commands +# +############################################################################### + +DrawArraysInstancedARB(mode, first, count, primcount) + return void + param mode BeginMode in value + param first Int32 in value + param count SizeI in value + param primcount SizeI in value + category ARB_draw_instanced + version 2.0 + extension soft WINSOFT + dlflags notlistable + vectorequiv ArrayElement + glfflags ignore + glxflags ignore + alias DrawArraysInstanced + +DrawElementsInstancedARB(mode, count, type, indices, primcount) + return void + param mode BeginMode in value + param count SizeI in value + param type DrawElementsType in value + param indices Void in array [COMPSIZE(count/type)] + param primcount SizeI in value + category ARB_draw_instanced + version 2.0 + extension soft WINSOFT + dlflags notlistable + vectorequiv ArrayElement + glfflags ignore + glxflags ignore + alias DrawElementsInstanced + +############################################################################### +# +# ARB Extension #45 +# ARB_framebuffer_object commands (also OpenGL 3.0) +# +############################################################################### + +# Promoted from EXT_framebuffer_object +IsRenderbuffer(renderbuffer) + return Boolean + param renderbuffer UInt32 in value + category ARB_framebuffer_object + version 3.0 + extension + glxvendorpriv 1422 + glxflags ignore + offset ? + +BindRenderbuffer(target, renderbuffer) + return void + param target RenderbufferTarget in value + param renderbuffer UInt32 in value + category ARB_framebuffer_object + version 3.0 + extension + glxropcode 4316 + glxflags ignore + offset ? + +DeleteRenderbuffers(n, renderbuffers) + return void + param n SizeI in value + param renderbuffers UInt32 in array [n] + category ARB_framebuffer_object + version 3.0 + extension + glxropcode 4317 + glxflags ignore + offset ? + +GenRenderbuffers(n, renderbuffers) + return void + param n SizeI in value + param renderbuffers UInt32 out array [n] + category ARB_framebuffer_object + version 3.0 + extension + glxvendorpriv 1423 + glxflags ignore + offset ? + +RenderbufferStorage(target, internalformat, width, height) + return void + param target RenderbufferTarget in value + param internalformat GLenum in value + param width SizeI in value + param height SizeI in value + category ARB_framebuffer_object + version 3.0 + extension + glxropcode 4318 + glxflags ignore + offset ? + +GetRenderbufferParameteriv(target, pname, params) + return void + param target RenderbufferTarget in value + param pname GLenum in value + param params Int32 out array [COMPSIZE(pname)] + category ARB_framebuffer_object + dlflags notlistable + version 3.0 + extension + glxvendorpriv 1424 + glxflags ignore + offset ? + +IsFramebuffer(framebuffer) + return Boolean + param framebuffer UInt32 in value + category ARB_framebuffer_object + version 3.0 + extension + glxvendorpriv 1425 + glxflags ignore + offset ? + +BindFramebuffer(target, framebuffer) + return void + param target FramebufferTarget in value + param framebuffer UInt32 in value + category ARB_framebuffer_object + version 3.0 + extension + glxropcode 4319 + glxflags ignore + offset ? + +DeleteFramebuffers(n, framebuffers) + return void + param n SizeI in value + param framebuffers UInt32 in array [n] + category ARB_framebuffer_object + version 3.0 + extension + glxropcode 4320 + glxflags ignore + offset ? + +GenFramebuffers(n, framebuffers) + return void + param n SizeI in value + param framebuffers UInt32 out array [n] + category ARB_framebuffer_object + version 3.0 + extension + glxvendorpriv 1426 + glxflags ignore + offset ? + +CheckFramebufferStatus(target) + return GLenum + param target FramebufferTarget in value + category ARB_framebuffer_object + version 3.0 + extension + glxvendorpriv 1427 + glxflags ignore + offset ? + +FramebufferTexture1D(target, attachment, textarget, texture, level) + return void + param target FramebufferTarget in value + param attachment FramebufferAttachment in value + param textarget GLenum in value + param texture UInt32 in value + param level Int32 in value + category ARB_framebuffer_object + version 3.0 + extension + glxropcode 4321 + glxflags ignore + offset ? + +FramebufferTexture2D(target, attachment, textarget, texture, level) + return void + param target FramebufferTarget in value + param attachment FramebufferAttachment in value + param textarget GLenum in value + param texture UInt32 in value + param level Int32 in value + category ARB_framebuffer_object + version 3.0 + extension + glxropcode 4322 + glxflags ignore + offset ? + +FramebufferTexture3D(target, attachment, textarget, texture, level, zoffset) + return void + param target FramebufferTarget in value + param attachment FramebufferAttachment in value + param textarget GLenum in value + param texture UInt32 in value + param level Int32 in value + param zoffset Int32 in value + category ARB_framebuffer_object + version 3.0 + extension + glxropcode 4323 + glxflags ignore + offset ? + +FramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer) + return void + param target FramebufferTarget in value + param attachment FramebufferAttachment in value + param renderbuffertarget RenderbufferTarget in value + param renderbuffer UInt32 in value + category ARB_framebuffer_object + version 3.0 + extension + glxropcode 4324 + glxflags ignore + offset ? + +GetFramebufferAttachmentParameteriv(target, attachment, pname, params) + return void + param target FramebufferTarget in value + param attachment FramebufferAttachment in value + param pname GLenum in value + param params Int32 out array [COMPSIZE(pname)] + category ARB_framebuffer_object + dlflags notlistable + version 3.0 + extension + glxvendorpriv 1428 + glxflags ignore + offset ? + +GenerateMipmap(target) + return void + param target GLenum in value + category ARB_framebuffer_object + version 3.0 + extension + glxropcode 4325 + glxflags ignore + offset ? + +# Promoted from EXT_framebuffer_blit +BlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter) + return void + param srcX0 Int32 in value + param srcY0 Int32 in value + param srcX1 Int32 in value + param srcY1 Int32 in value + param dstX0 Int32 in value + param dstY0 Int32 in value + param dstX1 Int32 in value + param dstY1 Int32 in value + param mask ClearBufferMask in value + param filter GLenum in value + category ARB_framebuffer_object + version 3.0 + glxropcode 4330 + offset ? + +# Promoted from EXT_framebuffer_multisample +RenderbufferStorageMultisample(target, samples, internalformat, width, height) + return void + param target GLenum in value + param samples SizeI in value + param internalformat GLenum in value + param width SizeI in value + param height SizeI in value + category ARB_framebuffer_object + version 3.0 + glxropcode 4331 + offset ? + +# Promoted from ARB_geometry_shader4 +FramebufferTextureLayer(target, attachment, texture, level, layer) + return void + param target FramebufferTarget in value + param attachment FramebufferAttachment in value + param texture Texture in value + param level CheckedInt32 in value + param layer CheckedInt32 in value + category ARB_framebuffer_object + version 3.0 + extension soft WINSOFT + dlflags notlistable + glfflags ignore + glxflags ignore + + +############################################################################### +# +# ARB Extension #46 +# ARB_framebuffer_sRGB commands (also OpenGL 3.0) +# +############################################################################### + +# (none) +newcategory: ARB_framebuffer_sRGB + +############################################################################### +# +# ARB Extension #47 +# ARB_geometry_shader4 commands +# +############################################################################### + +ProgramParameteriARB(program, pname, value) + return void + param program UInt32 in value + param pname ProgramParameterPName in value + param value Int32 in value + category ARB_geometry_shader4 + version 3.0 + extension soft WINSOFT + glfflags ignore + glxflags ignore + +FramebufferTextureARB(target, attachment, texture, level) + return void + param target FramebufferTarget in value + param attachment FramebufferAttachment in value + param texture Texture in value + param level CheckedInt32 in value + category ARB_geometry_shader4 + version 3.0 + extension soft WINSOFT + dlflags notlistable + glfflags ignore + glxflags ignore + +FramebufferTextureLayerARB(target, attachment, texture, level, layer) + return void + param target FramebufferTarget in value + param attachment FramebufferAttachment in value + param texture Texture in value + param level CheckedInt32 in value + param layer CheckedInt32 in value + category ARB_geometry_shader4 + version 3.0 + extension soft WINSOFT + dlflags notlistable + glfflags ignore + glxflags ignore + alias FramebufferTextureLayer + +FramebufferTextureFaceARB(target, attachment, texture, level, face) + return void + param target FramebufferTarget in value + param attachment FramebufferAttachment in value + param texture Texture in value + param level CheckedInt32 in value + param face TextureTarget in value + category ARB_geometry_shader4 + version 3.0 + extension soft WINSOFT + dlflags notlistable + glfflags ignore + glxflags ignore + +############################################################################### +# +# ARB Extension #48 +# ARB_half_float_vertex commands (also OpenGL 3.0) +# +############################################################################### + +# (none) +newcategory: ARB_half_float_vertex + +############################################################################### +# +# ARB Extension #49 +# ARB_instanced_arrays commands +# +############################################################################### + +VertexAttribDivisorARB(index, divisor) + return void + param index UInt32 in value + param divisor UInt32 in value + category ARB_instanced_arrays + version 2.0 + extension + glfflags ignore + glxflags ignore + +############################################################################### +# +# ARB Extension #50 +# ARB_map_buffer_range commands (also OpenGL 3.0) +# +############################################################################### + +MapBufferRange(target, offset, length, access) + return VoidPointer + param target BufferTargetARB in value + param offset BufferOffset in value + param length BufferSize in value + param access BufferAccessMask in value + category ARB_map_buffer_range + version 3.0 + extension + glxropcode ? + glxflags ignore + offset ? + +# Promoted from APPLE_flush_buffer_range +FlushMappedBufferRange(target, offset, length) + return void + param target BufferTargetARB in value + param offset BufferOffset in value + param length BufferSize in value + category ARB_map_buffer_range + version 3.0 + extension + glxropcode ? + glxflags ignore + offset ? + +############################################################################### +# +# ARB Extension #51 +# ARB_texture_buffer_object commands +# +############################################################################### + +TexBufferARB(target, internalformat, buffer) + return void + param target TextureTarget in value + param internalformat GLenum in value + param buffer UInt32 in value + category ARB_texture_buffer_object + version 3.0 + extension soft WINSOFT NV50 + glfflags ignore + alias TexBuffer + +############################################################################### +# +# ARB Extension #52 +# ARB_texture_compression_rgtc commands (also OpenGL 3.0) +# +############################################################################### + +# (none) +newcategory: ARB_texture_compression_rgtc + +############################################################################### +# +# ARB Extension #53 +# ARB_texture_rg commands (also OpenGL 3.0) +# +############################################################################### + +# (none) +newcategory: ARB_texture_rg + +############################################################################### +# +# ARB Extension #54 +# ARB_vertex_array_object commands (also OpenGL 3.0) +# +############################################################################### + +# Promoted from APPLE_vertex_array_object +BindVertexArray(array) + return void + param array UInt32 in value + category ARB_vertex_array_object + version 3.0 + extension + glxropcode ? + glxflags ignore + offset ? + +DeleteVertexArrays(n, arrays) + return void + param n SizeI in value + param arrays UInt32 in array [n] + category ARB_vertex_array_object + version 3.0 + extension + glxropcode ? + glxflags ignore + offset ? + +GenVertexArrays(n, arrays) + return void + param n SizeI in value + param arrays UInt32 out array [n] + category ARB_vertex_array_object + version 3.0 + extension + glxropcode ? + glxflags ignore + offset ? + +IsVertexArray(array) + return Boolean + param array UInt32 in value + category ARB_vertex_array_object + version 3.0 + extension + glxropcode ? + glxflags ignore + offset ? + +############################################################################### +# +# ARB Extension #55 - WGL_ARB_create_context +# ARB Extension #56 - GLX_ARB_create_context +# +############################################################################### + +############################################################################### +# +# ARB Extension #57 +# ARB_uniform_buffer_object commands +# +############################################################################### + +GetUniformIndices(program, uniformCount, uniformNames, uniformIndices) + return void + param program UInt32 in value + param uniformCount SizeI in value + param uniformNames CharPointer in array [COMPSIZE(uniformCount)] + param uniformIndices UInt32 out array [COMPSIZE(uniformCount)] + category ARB_uniform_buffer_object + dlflags notlistable + version 2.0 + extension + glxsingle ? + glxflags ignore + offset ? + +GetActiveUniformsiv(program, uniformCount, uniformIndices, pname, params) + return void + param program UInt32 in value + param uniformCount SizeI in value + param uniformIndices UInt32 in array [COMPSIZE(uniformCount)] + param pname GLenum in value + param params Int32 out array [COMPSIZE(pname)] + category ARB_uniform_buffer_object + dlflags notlistable + version 2.0 + extension + glxsingle ? + glxflags ignore + offset ? + +GetActiveUniformName(program, uniformIndex, bufSize, length, uniformName) + return void + param program UInt32 in value + param uniformIndex UInt32 in value + param bufSize SizeI in value + param length SizeI out array [1] + param uniformName Char out array [bufSize] + category ARB_uniform_buffer_object + dlflags notlistable + version 2.0 + extension + glxsingle ? + glxflags ignore + offset ? + +GetUniformBlockIndex(program, uniformBlockName) + return UInt32 + param program UInt32 in value + param uniformBlockName Char in array [COMPSIZE()] + category ARB_uniform_buffer_object + dlflags notlistable + version 2.0 + extension + glxsingle ? + glxflags ignore + offset ? + +GetActiveUniformBlockiv(program, uniformBlockIndex, pname, params) + return void + param program UInt32 in value + param uniformBlockIndex UInt32 in value + param pname GLenum in value + param params Int32 out array [COMPSIZE(pname)] + category ARB_uniform_buffer_object + dlflags notlistable + version 2.0 + extension + glxsingle ? + glxflags ignore + offset ? + +GetActiveUniformBlockName(program, uniformBlockIndex, bufSize, length, uniformBlockName) + return void + param program UInt32 in value + param uniformBlockIndex UInt32 in value + param bufSize SizeI in value + param length SizeI out array [1] + param uniformBlockName Char out array [bufSize] + category ARB_uniform_buffer_object + dlflags notlistable + version 2.0 + extension + glxsingle ? + glxflags ignore + offset ? + +UniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding) + return void + param program UInt32 in value + param uniformBlockIndex UInt32 in value + param uniformBlockBinding UInt32 in value + category ARB_uniform_buffer_object + version 2.0 + extension + glxropcode ? + glxflags ignore + offset ? + + +############################################################################### +# +# ARB Extension #58 +# ARB_compatibility commands +# +############################################################################### + +# (none) +newcategory: ARB_compatibility + +############################################################################### +# +# ARB Extension #59 +# ARB_copy_buffer commands +# +############################################################################### + +CopyBufferSubData(readTarget, writeTarget, readOffset, writeOffset, size) + return void + param readTarget GLenum in value + param writeTarget GLenum in value + param readOffset BufferOffset in value + param writeOffset BufferOffset in value + param size BufferSize in value + category ARB_copy_buffer + version 3.0 + extension + glxropcode ? + glxflags ignore + offset ? + +############################################################################### +# +# ARB Extension #60 +# ARB_shader_texture_lod commands +# +############################################################################### + +# (none) +newcategory: ARB_shader_texture_lod + +############################################################################### +# +# ARB Extension #61 +# ARB_depth_clamp commands +# +############################################################################### + +# (none) +newcategory: ARB_depth_clamp + +############################################################################### +# +# ARB Extension #62 +# ARB_draw_elements_base_vertex commands +# +############################################################################### + +DrawElementsBaseVertex(mode, count, type, indices, basevertex) + return void + param mode GLenum in value + param count SizeI in value + param type DrawElementsType in value + param indices Void in array [COMPSIZE(count/type)] + param basevertex Int32 in value + category ARB_draw_elements_base_vertex + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +DrawRangeElementsBaseVertex(mode, start, end, count, type, indices, basevertex) + return void + param mode GLenum in value + param start UInt32 in value + param end UInt32 in value + param count SizeI in value + param type DrawElementsType in value + param indices Void in array [COMPSIZE(count/type)] + param basevertex Int32 in value + category ARB_draw_elements_base_vertex + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +DrawElementsInstancedBaseVertex(mode, count, type, indices, primcount, basevertex) + return void + param mode GLenum in value + param count SizeI in value + param type DrawElementsType in value + param indices Void in array [COMPSIZE(count/type)] + param primcount SizeI in value + param basevertex Int32 in value + category ARB_draw_elements_base_vertex + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +MultiDrawElementsBaseVertex(mode, count, type, indices, primcount, basevertex) + return void + param mode GLenum in value + param count SizeI in array [COMPSIZE(primcount)] + param type DrawElementsType in value + param indices VoidPointer in array [COMPSIZE(primcount)] + param primcount SizeI in value + param basevertex Int32 in array [COMPSIZE(primcount)] + category ARB_draw_elements_base_vertex + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +############################################################################### +# +# ARB Extension #63 +# ARB_fragment_coord_conventions commands +# +############################################################################### + +# (none) +newcategory: ARB_fragment_coord_conventions + +############################################################################### +# +# ARB Extension #64 +# ARB_provoking_vertex commands +# +############################################################################### + +ProvokingVertex(mode) + return void + param mode GLenum in value + category ARB_provoking_vertex + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +############################################################################### +# +# ARB Extension #65 +# ARB_seamless_cube_map commands +# +############################################################################### + +# (none) +newcategory: ARB_seamless_cube_map + +############################################################################### +# +# ARB Extension #66 +# ARB_sync commands +# +############################################################################### + +FenceSync(condition, flags) + return sync + param condition GLenum in value + param flags GLbitfield in value + category ARB_sync + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +IsSync(sync) + return Boolean + param sync sync in value + category ARB_sync + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +DeleteSync(sync) + return void + param sync sync in value + category ARB_sync + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +ClientWaitSync(sync, flags, timeout) + return GLenum + param sync sync in value + param flags GLbitfield in value + param timeout UInt64 in value + category ARB_sync + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +WaitSync(sync, flags, timeout) + return void + param sync sync in value + param flags GLbitfield in value + param timeout UInt64 in value + category ARB_sync + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +GetInteger64v(pname, params) + return void + param pname GLenum in value + param params Int64 out array [COMPSIZE(pname)] + category ARB_sync + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +GetSynciv(sync, pname, bufSize, length, values) + return void + param sync sync in value + param pname GLenum in value + param bufSize SizeI in value + param length SizeI out array [1] + param values Int32 out array [length] + category ARB_sync + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +############################################################################### +# +# ARB Extension #67 +# ARB_texture_multisample commands +# +############################################################################### + +TexImage2DMultisample(target, samples, internalformat, width, height, fixedsamplelocations) + return void + param target GLenum in value + param samples SizeI in value + param internalformat Int32 in value + param width SizeI in value + param height SizeI in value + param fixedsamplelocations Boolean in value + category ARB_texture_multisample + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +TexImage3DMultisample(target, samples, internalformat, width, height, depth, fixedsamplelocations) + return void + param target GLenum in value + param samples SizeI in value + param internalformat Int32 in value + param width SizeI in value + param height SizeI in value + param depth SizeI in value + param fixedsamplelocations Boolean in value + category ARB_texture_multisample + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +GetMultisamplefv(pname, index, val) + return void + param pname GLenum in value + param index UInt32 in value + param val Float32 out array [COMPSIZE(pname)] + category ARB_texture_multisample + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +SampleMaski(index, mask) + return void + param index UInt32 in value + param mask GLbitfield in value + category ARB_texture_multisample + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +############################################################################### +# +# ARB Extension #68 +# ARB_vertex_array_bgra commands +# +############################################################################### + +# (none) +newcategory: ARB_vertex_array_bgra + +############################################################################### +# +# ARB Extension #69 +# ARB_draw_buffers_blend commands +# +############################################################################### + +@@@ Add ARB suffixes here & functions! +BlendEquationi(buf, mode) + return void + param buf UInt32 in value + param mode GLenum in value + category ARB_draw_buffers_blend + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +BlendEquationSeparatei(buf, modeRGB, modeAlpha) + return void + param buf UInt32 in value + param modeRGB GLenum in value + param modeAlpha GLenum in value + category ARB_draw_buffers_blend + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +BlendFunci(buf, src, dst) + return void + param buf UInt32 in value + param src GLenum in value + param dst GLenum in value + category ARB_draw_buffers_blend + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +BlendFuncSeparatei(buf, srcRGB, dstRGB, srcAlpha, dstAlpha) + return void + param buf UInt32 in value + param srcRGB GLenum in value + param dstRGB GLenum in value + param srcAlpha GLenum in value + param dstAlpha GLenum in value + category ARB_draw_buffers_blend + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +############################################################################### +# +# ARB Extension #70 +# ARB_sample_shading commands +# +############################################################################### + +@@@ Add ARB suffixes here & functions! +MinSampleShading(value) + return void + param value ClampedColorF in value + category ARB_sample_shading + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +############################################################################### +# +# ARB Extension #71 +# ARB_texture_cube_map_array commands +# +############################################################################### + +# (none) +newcategory: ARB_texture_cube_map_array + +############################################################################### +# +# ARB Extension #72 +# ARB_texture_gather commands +# +############################################################################### + +# (none) +newcategory: ARB_texture_gather + +############################################################################### +# +# ARB Extension #73 +# ARB_texture_query_lod commands +# +############################################################################### + +# (none) +newcategory: ARB_texture_query_lod + +############################################################################### +# +# ARB Extension #74 - WGL_ARB_create_context_profile +# ARB Extension #75 - GLX_ARB_create_context_profile +# +############################################################################### + +############################################################################### +# +# ARB Extension #76 +# ARB_shading_language_include commands +# +############################################################################### + +# ??? VERIFY DONE ??? + +NamedStringARB(type, namelen, name, stringlen, string) + return void + param type GLenum in value + param namelen Int32 in value + param name Char in array [namelen] + param stringlen Int32 in value + param string Char in array [stringlen] + category ARB_shading_language_include + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +DeleteNamedStringARB(namelen, name) + return void + param namelen Int32 in value + param name Char in array [namelen] + category ARB_shading_language_include + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +CompileShaderIncludeARB(shader, count, path, length) + return void + param shader UInt32 in value + param count SizeI in value + param path CharPointer in array [count] + param length Int32 in array [count] + category ARB_shading_language_include + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +IsNamedStringARB(namelen, name) + return Boolean + param namelen Int32 in value + param name Char in array [namelen] + category ARB_shading_language_include + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +GetNamedStringARB(namelen, name, bufSize, stringlen, string) + return void + param namelen Int32 in value + param name Char in array [namelen] + param bufSize SizeI in value + param stringlen Int32 out array [1] + param string Char out array [bufSize] + category ARB_shading_language_include + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +GetNamedStringivARB(namelen, name, pname, params) + return void + param namelen Int32 in value + param name Char in array [namelen] + param pname GLenum in value + param params Int32 out array [COMPSIZE(pname)] + category ARB_shading_language_include + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +############################################################################### +# +# ARB Extension #77 +# ARB_texture_compression_bptc commands +# +############################################################################### + +# ??? VERIFY DONE ??? + +############################################################################### +# +# ARB Extension #78 +# ARB_blend_func_extended commands +# +############################################################################### + +# ??? VERIFY DONE ??? + +BindFragDataLocationIndexed(program, colorNumber, index, name) + return void + param program UInt32 in value + param colorNumber UInt32 in value + param index UInt32 in value + param name Char in array [] + category ARB_blend_func_extended + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +GetFragDataIndex(program, name) + return Int32 + param program UInt32 in value + param name Char in array [] + category ARB_blend_func_extended + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +############################################################################### +# +# ARB Extension #79 +# ARB_explicit_attrib_location commands +# +############################################################################### + +# ??? VERIFY DONE ??? + +############################################################################### +# +# ARB Extension #80 +# ARB_occlusion_query2 commands +# +############################################################################### + +# ??? VERIFY DONE ??? + +############################################################################### +# +# ARB Extension #81 +# ARB_sampler_objects commands +# +############################################################################### + +# ??? VERIFY DONE ??? + +GenSamplers(count, samplers) + return void + param count SizeI in value + param samplers UInt32 out array [count] + category ARB_sampler_objects + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +DeleteSamplers(count, samplers) + return void + param count SizeI in value + param samplers UInt32 in array [count] + category ARB_sampler_objects + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +IsSampler(sampler) + return Boolean + param sampler UInt32 in value + category ARB_sampler_objects + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +BindSampler(unit, sampler) + return void + param unit GLenum in value + param sampler UInt32 in value + category ARB_sampler_objects + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +SamplerParameteri(sampler, pname, param) + return void + param sampler UInt32 in value + param pname GLenum in value + param param Int32 in value + category ARB_sampler_objects + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +SamplerParameteriv(sampler, pname, param) + return void + param sampler UInt32 in value + param pname GLenum in value + param param Int32 in array [COMPSIZE(pname)] + category ARB_sampler_objects + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +SamplerParameterf(sampler, pname, param) + return void + param sampler UInt32 in value + param pname GLenum in value + param param Float32 in value + category ARB_sampler_objects + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +SamplerParameterfv(sampler, pname, param) + return void + param sampler UInt32 in value + param pname GLenum in value + param param Float32 in array [COMPSIZE(pname)] + category ARB_sampler_objects + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +SamplerParameterIiv(sampler, pname, param) + return void + param sampler UInt32 in value + param pname GLenum in value + param param Int32 in array [COMPSIZE(pname)] + category ARB_sampler_objects + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +SamplerParameterIuiv(sampler, pname, param) + return void + param sampler UInt32 in value + param pname GLenum in value + param param UInt32 in array [COMPSIZE(pname)] + category ARB_sampler_objects + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +GetSamplerParameteriv(sampler, pname, params) + return void + param sampler UInt32 in value + param pname GLenum in value + param params Int32 out array [COMPSIZE(pname)] + category ARB_sampler_objects + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +GetSamplerParameterIiv(sampler, pname, params) + return void + param sampler UInt32 in value + param pname GLenum in value + param params Int32 out array [COMPSIZE(pname)] + category ARB_sampler_objects + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +GetSamplerParameterfv(sampler, pname, params) + return void + param sampler UInt32 in value + param pname GLenum in value + param params Float32 out array [COMPSIZE(pname)] + category ARB_sampler_objects + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +GetSamplerParameterIfv(sampler, pname, params) + return void + param sampler UInt32 in value + param pname GLenum in value + param params Float32 out array [COMPSIZE(pname)] + category ARB_sampler_objects + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +############################################################################### +# +# ARB Extension #82 +# ARB_shader_bit_encoding commands +# +############################################################################### + +# ??? VERIFY DONE ??? + +############################################################################### +# +# ARB Extension #83 +# ARB_texture_rgb10_a2ui commands +# +############################################################################### + +# ??? VERIFY DONE ??? + +############################################################################### +# +# ARB Extension #84 +# ARB_texture_swizzle commands +# +############################################################################### + +# ??? VERIFY DONE ??? + +############################################################################### +# +# ARB Extension #85 +# ARB_timer_query commands +# +############################################################################### + +# ??? VERIFY DONE ??? + +QueryCounter(id, target) + return void + param id UInt32 in value + param target GLenum in value + category ARB_timer_query + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +GetQueryObjecti64v(id, pname, params) + return void + param id UInt32 in value + param pname GLenum in value + param params Int64 out array [COMPSIZE(pname)] + category ARB_timer_query + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +GetQueryObjectui64v(id, pname, params) + return void + param id UInt32 in value + param pname GLenum in value + param params UInt64 out array [COMPSIZE(pname)] + category ARB_timer_query + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +############################################################################### +# +# ARB Extension #86 +# ARB_vertex_type_2_10_10_10_rev commands +# +############################################################################### + +# ??? VERIFY DONE ??? + +VertexP2ui(type, value) + return void + param type GLenum in value + param value UInt32 in value + category ARB_vertex_type_2_10_10_10_rev + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexP2uiv(type, value) + return void + param type GLenum in value + param value UInt32 in array [1] + category ARB_vertex_type_2_10_10_10_rev + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexP3ui(type, value) + return void + param type GLenum in value + param value UInt32 in value + category ARB_vertex_type_2_10_10_10_rev + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexP3uiv(type, value) + return void + param type GLenum in value + param value UInt32 in array [1] + category ARB_vertex_type_2_10_10_10_rev + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexP4ui(type, value) + return void + param type GLenum in value + param value UInt32 in value + category ARB_vertex_type_2_10_10_10_rev + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexP4uiv(type, value) + return void + param type GLenum in value + param value UInt32 in array [1] + category ARB_vertex_type_2_10_10_10_rev + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +TexCoordP1ui(type, coords) + return void + param type GLenum in value + param coords UInt32 in value + category ARB_vertex_type_2_10_10_10_rev + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +TexCoordP1uiv(type, coords) + return void + param type GLenum in value + param coords UInt32 in array [1] + category ARB_vertex_type_2_10_10_10_rev + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +TexCoordP2ui(type, coords) + return void + param type GLenum in value + param coords UInt32 in value + category ARB_vertex_type_2_10_10_10_rev + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +TexCoordP2uiv(type, coords) + return void + param type GLenum in value + param coords UInt32 in array [1] + category ARB_vertex_type_2_10_10_10_rev + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +TexCoordP3ui(type, coords) + return void + param type GLenum in value + param coords UInt32 in value + category ARB_vertex_type_2_10_10_10_rev + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +TexCoordP3uiv(type, coords) + return void + param type GLenum in value + param coords UInt32 in array [1] + category ARB_vertex_type_2_10_10_10_rev + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +TexCoordP4ui(type, coords) + return void + param type GLenum in value + param coords UInt32 in value + category ARB_vertex_type_2_10_10_10_rev + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +TexCoordP4uiv(type, coords) + return void + param type GLenum in value + param coords UInt32 in array [1] + category ARB_vertex_type_2_10_10_10_rev + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +MultiTexCoordP1ui(texture, type, coords) + return void + param texture GLenum in value + param type GLenum in value + param coords UInt32 in value + category ARB_vertex_type_2_10_10_10_rev + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +MultiTexCoordP1uiv(texture, type, coords) + return void + param texture GLenum in value + param type GLenum in value + param coords UInt32 in array [1] + category ARB_vertex_type_2_10_10_10_rev + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +MultiTexCoordP2ui(texture, type, coords) + return void + param texture GLenum in value + param type GLenum in value + param coords UInt32 in value + category ARB_vertex_type_2_10_10_10_rev + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +MultiTexCoordP2uiv(texture, type, coords) + return void + param texture GLenum in value + param type GLenum in value + param coords UInt32 in array [1] + category ARB_vertex_type_2_10_10_10_rev + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +MultiTexCoordP3ui(texture, type, coords) + return void + param texture GLenum in value + param type GLenum in value + param coords UInt32 in value + category ARB_vertex_type_2_10_10_10_rev + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +MultiTexCoordP3uiv(texture, type, coords) + return void + param texture GLenum in value + param type GLenum in value + param coords UInt32 in array [1] + category ARB_vertex_type_2_10_10_10_rev + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +MultiTexCoordP4ui(texture, type, coords) + return void + param texture GLenum in value + param type GLenum in value + param coords UInt32 in value + category ARB_vertex_type_2_10_10_10_rev + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +MultiTexCoordP4uiv(texture, type, coords) + return void + param texture GLenum in value + param type GLenum in value + param coords UInt32 in array [1] + category ARB_vertex_type_2_10_10_10_rev + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +NormalP3ui(type, coords) + return void + param type GLenum in value + param coords UInt32 in value + category ARB_vertex_type_2_10_10_10_rev + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +NormalP3uiv(type, coords) + return void + param type GLenum in value + param coords UInt32 in array [1] + category ARB_vertex_type_2_10_10_10_rev + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +ColorP3ui(type, color) + return void + param type GLenum in value + param color UInt32 in value + category ARB_vertex_type_2_10_10_10_rev + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +ColorP3uiv(type, color) + return void + param type GLenum in value + param color UInt32 in array [1] + category ARB_vertex_type_2_10_10_10_rev + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +ColorP4ui(type, color) + return void + param type GLenum in value + param color UInt32 in value + category ARB_vertex_type_2_10_10_10_rev + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +ColorP4uiv(type, color) + return void + param type GLenum in value + param color UInt32 in array [1] + category ARB_vertex_type_2_10_10_10_rev + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +SecondaryColorP3ui(type, color) + return void + param type GLenum in value + param color UInt32 in value + category ARB_vertex_type_2_10_10_10_rev + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +SecondaryColorP3uiv(type, color) + return void + param type GLenum in value + param color UInt32 in array [1] + category ARB_vertex_type_2_10_10_10_rev + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexAttribP1ui(index, type, normalized, value) + return void + param index UInt32 in value + param type GLenum in value + param normalized Boolean in value + param value UInt32 in value + category ARB_vertex_type_2_10_10_10_rev + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexAttribP1uiv(index, type, normalized, value) + return void + param index UInt32 in value + param type GLenum in value + param normalized Boolean in value + param value UInt32 in array [1] + category ARB_vertex_type_2_10_10_10_rev + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexAttribP2ui(index, type, normalized, value) + return void + param index UInt32 in value + param type GLenum in value + param normalized Boolean in value + param value UInt32 in value + category ARB_vertex_type_2_10_10_10_rev + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexAttribP2uiv(index, type, normalized, value) + return void + param index UInt32 in value + param type GLenum in value + param normalized Boolean in value + param value UInt32 in array [1] + category ARB_vertex_type_2_10_10_10_rev + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexAttribP3ui(index, type, normalized, value) + return void + param index UInt32 in value + param type GLenum in value + param normalized Boolean in value + param value UInt32 in value + category ARB_vertex_type_2_10_10_10_rev + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexAttribP3uiv(index, type, normalized, value) + return void + param index UInt32 in value + param type GLenum in value + param normalized Boolean in value + param value UInt32 in array [1] + category ARB_vertex_type_2_10_10_10_rev + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexAttribP4ui(index, type, normalized, value) + return void + param index UInt32 in value + param type GLenum in value + param normalized Boolean in value + param value UInt32 in value + category ARB_vertex_type_2_10_10_10_rev + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexAttribP4uiv(index, type, normalized, value) + return void + param index UInt32 in value + param type GLenum in value + param normalized Boolean in value + param value UInt32 in array [1] + category ARB_vertex_type_2_10_10_10_rev + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +############################################################################### +# +# ARB Extension #87 +# ARB_draw_indirect commands +# +############################################################################### + +# ??? VERIFY DONE ??? + +DrawArraysIndirect(mode, indirect) + return void + param mode GLenum in value + param indirect Void in array [] + category ARB_draw_indirect + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +DrawElementsIndirect(mode, type, indirect) + return void + param mode GLenum in value + param type GLenum in value + param indirect Void in array [] + category ARB_draw_indirect + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +############################################################################### +# +# ARB Extension #88 +# ARB_gpu_shader5 commands +# +############################################################################### + +# ??? VERIFY DONE ??? + +############################################################################### +# +# ARB Extension #89 +# ARB_gpu_shader_fp64 commands +# +############################################################################### + +# ??? VERIFY DONE ??? + +Uniform1d(location, x) + return void + param location Int32 in value + param x Float64 in value + category ARB_gpu_shader_fp64 + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +Uniform2d(location, x, y) + return void + param location Int32 in value + param x Float64 in value + param y Float64 in value + category ARB_gpu_shader_fp64 + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +Uniform3d(location, x, y, z) + return void + param location Int32 in value + param x Float64 in value + param y Float64 in value + param z Float64 in value + category ARB_gpu_shader_fp64 + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +Uniform4d(location, x, y, z, w) + return void + param location Int32 in value + param x Float64 in value + param y Float64 in value + param z Float64 in value + param w Float64 in value + category ARB_gpu_shader_fp64 + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +Uniform1dv(location, count, value) + return void + param location Int32 in value + param count SizeI in value + param value Float64 in array [count] + category ARB_gpu_shader_fp64 + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +Uniform2dv(location, count, value) + return void + param location Int32 in value + param count SizeI in value + param value Float64 in array [count] + category ARB_gpu_shader_fp64 + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +Uniform3dv(location, count, value) + return void + param location Int32 in value + param count SizeI in value + param value Float64 in array [count] + category ARB_gpu_shader_fp64 + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +Uniform4dv(location, count, value) + return void + param location Int32 in value + param count SizeI in value + param value Float64 in array [count] + category ARB_gpu_shader_fp64 + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +UniformMatrix2dv(location, count, transpose, value) + return void + param location Int32 in value + param count SizeI in value + param transpose Boolean in value + param value Float64 in array [count] + category ARB_gpu_shader_fp64 + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +UniformMatrix3dv(location, count, transpose, value) + return void + param location Int32 in value + param count SizeI in value + param transpose Boolean in value + param value Float64 in array [count] + category ARB_gpu_shader_fp64 + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +UniformMatrix4dv(location, count, transpose, value) + return void + param location Int32 in value + param count SizeI in value + param transpose Boolean in value + param value Float64 in array [count] + category ARB_gpu_shader_fp64 + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +UniformMatrix2x3dv(location, count, transpose, value) + return void + param location Int32 in value + param count SizeI in value + param transpose Boolean in value + param value Float64 in array [count] + category ARB_gpu_shader_fp64 + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +UniformMatrix2x4dv(location, count, transpose, value) + return void + param location Int32 in value + param count SizeI in value + param transpose Boolean in value + param value Float64 in array [count] + category ARB_gpu_shader_fp64 + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +UniformMatrix3x2dv(location, count, transpose, value) + return void + param location Int32 in value + param count SizeI in value + param transpose Boolean in value + param value Float64 in array [count] + category ARB_gpu_shader_fp64 + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +UniformMatrix3x4dv(location, count, transpose, value) + return void + param location Int32 in value + param count SizeI in value + param transpose Boolean in value + param value Float64 in array [count] + category ARB_gpu_shader_fp64 + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +UniformMatrix4x2dv(location, count, transpose, value) + return void + param location Int32 in value + param count SizeI in value + param transpose Boolean in value + param value Float64 in array [count] + category ARB_gpu_shader_fp64 + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +UniformMatrix4x3dv(location, count, transpose, value) + return void + param location Int32 in value + param count SizeI in value + param transpose Boolean in value + param value Float64 in array [count] + category ARB_gpu_shader_fp64 + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +GetUniformdv(program, location, params) + return void + param program UInt32 in value + param location Int32 in value + param params Float64 out array [location] + category ARB_gpu_shader_fp64 + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +ProgramUniform1dEXT(program, location, x) + return void + param program UInt32 in value + param location Int32 in value + param x Float64 in value + category ARB_gpu_shader_fp64 + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +ProgramUniform2dEXT(program, location, x, y) + return void + param program UInt32 in value + param location Int32 in value + param x Float64 in value + param y Float64 in value + category ARB_gpu_shader_fp64 + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +ProgramUniform3dEXT(program, location, x, y, z) + return void + param program UInt32 in value + param location Int32 in value + param x Float64 in value + param y Float64 in value + param z Float64 in value + category ARB_gpu_shader_fp64 + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +ProgramUniform4dEXT(program, location, x, y, z, w) + return void + param program UInt32 in value + param location Int32 in value + param x Float64 in value + param y Float64 in value + param z Float64 in value + param w Float64 in value + category ARB_gpu_shader_fp64 + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +ProgramUniform1dvEXT(program, location, count, value) + return void + param program UInt32 in value + param location Int32 in value + param count SizeI in value + param value Float64 in array [count] + category ARB_gpu_shader_fp64 + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +ProgramUniform2dvEXT(program, location, count, value) + return void + param program UInt32 in value + param location Int32 in value + param count SizeI in value + param value Float64 in array [count] + category ARB_gpu_shader_fp64 + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +ProgramUniform3dvEXT(program, location, count, value) + return void + param program UInt32 in value + param location Int32 in value + param count SizeI in value + param value Float64 in array [count] + category ARB_gpu_shader_fp64 + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +ProgramUniform4dvEXT(program, location, count, value) + return void + param program UInt32 in value + param location Int32 in value + param count SizeI in value + param value Float64 in array [count] + category ARB_gpu_shader_fp64 + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +ProgramUniformMatrix2dvEXT(program, location, count, transpose, value) + return void + param program UInt32 in value + param location Int32 in value + param count SizeI in value + param transpose Boolean in value + param value Float64 in array [count] + category ARB_gpu_shader_fp64 + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +ProgramUniformMatrix3dvEXT(program, location, count, transpose, value) + return void + param program UInt32 in value + param location Int32 in value + param count SizeI in value + param transpose Boolean in value + param value Float64 in array [count] + category ARB_gpu_shader_fp64 + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +ProgramUniformMatrix4dvEXT(program, location, count, transpose, value) + return void + param program UInt32 in value + param location Int32 in value + param count SizeI in value + param transpose Boolean in value + param value Float64 in array [count] + category ARB_gpu_shader_fp64 + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +ProgramUniformMatrix2x3dvEXT(program, location, count, transpose, value) + return void + param program UInt32 in value + param location Int32 in value + param count SizeI in value + param transpose Boolean in value + param value Float64 in array [count] + category ARB_gpu_shader_fp64 + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +ProgramUniformMatrix2x4dvEXT(program, location, count, transpose, value) + return void + param program UInt32 in value + param location Int32 in value + param count SizeI in value + param transpose Boolean in value + param value Float64 in array [count] + category ARB_gpu_shader_fp64 + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +ProgramUniformMatrix3x2dvEXT(program, location, count, transpose, value) + return void + param program UInt32 in value + param location Int32 in value + param count SizeI in value + param transpose Boolean in value + param value Float64 in array [count] + category ARB_gpu_shader_fp64 + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +ProgramUniformMatrix3x4dvEXT(program, location, count, transpose, value) + return void + param program UInt32 in value + param location Int32 in value + param count SizeI in value + param transpose Boolean in value + param value Float64 in array [count] + category ARB_gpu_shader_fp64 + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +ProgramUniformMatrix4x2dvEXT(program, location, count, transpose, value) + return void + param program UInt32 in value + param location Int32 in value + param count SizeI in value + param transpose Boolean in value + param value Float64 in array [count] + category ARB_gpu_shader_fp64 + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +ProgramUniformMatrix4x3dvEXT(program, location, count, transpose, value) + return void + param program UInt32 in value + param location Int32 in value + param count SizeI in value + param transpose Boolean in value + param value Float64 in array [count] + category ARB_gpu_shader_fp64 + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +############################################################################### +# +# ARB Extension #90 +# ARB_shader_subroutine commands +# +############################################################################### + +# ??? VERIFY DONE ??? + +GetSubroutineUniformLocation(program, shadertype, name) + return Int32 + param program UInt32 in value + param shadertype GLenum in value + param name Char in array [] + category ARB_shader_subroutine + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +GetSubroutineIndex(program, shadertype, name) + return UInt32 + param program UInt32 in value + param shadertype GLenum in value + param name Char in array [] + category ARB_shader_subroutine + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +GetActiveSubroutineUniformiv(program, shadertype, index, pname, values) + return void + param program UInt32 in value + param shadertype GLenum in value + param index UInt32 in value + param pname GLenum in value + param values Int32 out array [COMPSIZE(pname)] + category ARB_shader_subroutine + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +GetActiveSubroutineUniformName(program, shadertype, index, bufsize, length, name) + return void + param program UInt32 in value + param shadertype GLenum in value + param index UInt32 in value + param bufsize SizeI in value + param length SizeI out array [1] + param name Char out array [bufsize] + category ARB_shader_subroutine + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +GetActiveSubroutineName(program, shadertype, index, bufsize, length, name) + return void + param program UInt32 in value + param shadertype GLenum in value + param index UInt32 in value + param bufsize SizeI in value + param length SizeI out array [1] + param name Char out array [bufsize] + category ARB_shader_subroutine + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +UniformSubroutinesuiv(shadertype, count, indices) + return void + param shadertype GLenum in value + param count SizeI in value + param indices UInt32 in array [count] + category ARB_shader_subroutine + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +GetUniformSubroutineuiv(shadertype, location, params) + return void + param shadertype GLenum in value + param location Int32 in value + param params UInt32 out array [1] + category ARB_shader_subroutine + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +GetProgramStageiv(program, shadertype, pname, values) + return void + param program UInt32 in value + param shadertype GLenum in value + param pname GLenum in value + param values Int32 out array [1] + category ARB_shader_subroutine + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +############################################################################### +# +# ARB Extension #91 +# ARB_tessellation_shader commands +# +############################################################################### + +# ??? VERIFY DONE ??? + +PatchParameteri(pname, value) + return void + param pname GLenum in value + param value Int32 in value + category ARB_tessellation_shader + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +PatchParameterfv(pname, values) + return void + param pname GLenum in value + param values Float32 in array [COMPSIZE(pname)] + category ARB_tessellation_shader + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +############################################################################### +# +# ARB Extension #92 +# ARB_texture_buffer_object_rgb32 commands +# +############################################################################### + +# ??? VERIFY DONE ??? + +############################################################################### +# +# ARB Extension #93 +# ARB_transform_feedback2 commands +# +############################################################################### + +# ??? VERIFY DONE ??? + +BindTransformFeedback(target, id) + return void + param target GLenum in value + param id UInt32 in value + category ARB_transform_feedback2 + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +DeleteTransformFeedbacks(n, ids) + return void + param n SizeI in value + param ids UInt32 in array [n] + category ARB_transform_feedback2 + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +GenTransformFeedbacks(n, ids) + return void + param n SizeI in value + param ids UInt32 out array [n] + category ARB_transform_feedback2 + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +IsTransformFeedback(id) + return Boolean + param id UInt32 in value + category ARB_transform_feedback2 + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +PauseTransformFeedback() + return void + category ARB_transform_feedback2 + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +ResumeTransformFeedback() + return void + category ARB_transform_feedback2 + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +DrawTransformFeedback(mode, id) + return void + param mode GLenum in value + param id UInt32 in value + category ARB_transform_feedback2 + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +############################################################################### +# +# ARB Extension #94 +# ARB_transform_feedback3 commands +# +############################################################################### + +# ??? VERIFY DONE ??? + +DrawTransformFeedbackStream(mode, id, stream) + return void + param mode GLenum in value + param id UInt32 in value + param stream UInt32 in value + category ARB_transform_feedback3 + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +BeginQueryIndexed(target, index, id) + return void + param target GLenum in value + param index UInt32 in value + param id UInt32 in value + category ARB_transform_feedback3 + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +EndQueryIndexed(target, index) + return void + param target GLenum in value + param index UInt32 in value + category ARB_transform_feedback3 + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +GetQueryIndexediv(target, index, pname, params) + return void + param target GLenum in value + param index UInt32 in value + param pname GLenum in value + param params Int32 out array [COMPSIZE(pname)] + category ARB_transform_feedback3 + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + + +############################################################################### +############################################################################### +# +# Non-ARB extensions, in order by registry extension number +# +############################################################################### +############################################################################### + +############################################################################### +# +# Extension #1 +# EXT_abgr commands +# +############################################################################### + +# (none) +newcategory: EXT_abgr + +############################################################################### +# +# Extension #2 +# EXT_blend_color commands +# +############################################################################### + +BlendColorEXT(red, green, blue, alpha) + return void + param red ClampedColorF in value + param green ClampedColorF in value + param blue ClampedColorF in value + param alpha ClampedColorF in value + category EXT_blend_color + version 1.0 + glxropcode 4096 + glxflags EXT + extension soft + alias BlendColor + +############################################################################### +# +# Extension #3 +# EXT_polygon_offset commands +# +############################################################################### + +PolygonOffsetEXT(factor, bias) + return void + param factor Float32 in value + param bias Float32 in value + category EXT_polygon_offset + version 1.0 + glxropcode 4098 + glxflags EXT + extension soft + offset 414 + +############################################################################### +# +# Extension #4 +# EXT_texture commands +# +############################################################################### + +# (none) +newcategory: EXT_texture + +############################################################################### +# +# Extension #5 - skipped +# +############################################################################### + +############################################################################### +# +# Extension #6 +# EXT_texture3D commands +# +############################################################################### + +# Arguably TexelInternalFormat, not PixelInternalFormat +TexImage3DEXT(target, level, internalformat, width, height, depth, border, format, type, pixels) + return void + param target TextureTarget in value + param level CheckedInt32 in value + param internalformat PixelInternalFormat in value + param width SizeI in value + param height SizeI in value + param depth SizeI in value + param border CheckedInt32 in value + param format PixelFormat in value + param type PixelType in value + param pixels Void in array [COMPSIZE(format/type/width/height/depth)] + category EXT_texture3D + dlflags handcode + glxflags client-handcode server-handcode EXT + version 1.0 + glxropcode 4114 + extension + alias TexImage3D + +TexSubImage3DEXT(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels) + return void + param target TextureTarget in value + param level CheckedInt32 in value + param xoffset CheckedInt32 in value + param yoffset CheckedInt32 in value + param zoffset CheckedInt32 in value + param width SizeI in value + param height SizeI in value + param depth SizeI in value + param format PixelFormat in value + param type PixelType in value + param pixels Void in array [COMPSIZE(format/type/width/height/depth)] + category EXT_texture3D + dlflags handcode + glxflags client-handcode server-handcode EXT + version 1.0 + glxropcode 4115 + extension + alias TexSubImage3D + +############################################################################### +# +# Extension #7 +# SGIS_texture_filter4 commands +# +############################################################################### + +GetTexFilterFuncSGIS(target, filter, weights) + return void + param target TextureTarget in value + param filter TextureFilterSGIS in value + param weights Float32 out array [COMPSIZE(target/filter)] + category SGIS_texture_filter4 + dlflags notlistable + version 1.0 + glxflags SGI + glxvendorpriv 4101 + extension + offset 415 + +TexFilterFuncSGIS(target, filter, n, weights) + return void + param target TextureTarget in value + param filter TextureFilterSGIS in value + param n SizeI in value + param weights Float32 in array [n] + category SGIS_texture_filter4 + glxflags SGI + version 1.0 + glxropcode 2064 + extension + offset 416 + +############################################################################### +# +# Extension #8 - skipped +# +############################################################################### + +############################################################################### +# +# Extension #9 +# EXT_subtexture commands +# +############################################################################### + +TexSubImage1DEXT(target, level, xoffset, width, format, type, pixels) + return void + param target TextureTarget in value + param level CheckedInt32 in value + param xoffset CheckedInt32 in value + param width SizeI in value + param format PixelFormat in value + param type PixelType in value + param pixels Void in array [COMPSIZE(format/type/width)] + category EXT_subtexture + dlflags handcode + glxflags client-handcode server-handcode EXT + version 1.0 + glxropcode 4099 + extension + alias TexSubImage1D + +TexSubImage2DEXT(target, level, xoffset, yoffset, width, height, format, type, pixels) + return void + param target TextureTarget in value + param level CheckedInt32 in value + param xoffset CheckedInt32 in value + param yoffset CheckedInt32 in value + param width SizeI in value + param height SizeI in value + param format PixelFormat in value + param type PixelType in value + param pixels Void in array [COMPSIZE(format/type/width/height)] + category EXT_subtexture + dlflags handcode + glxflags client-handcode server-handcode EXT + version 1.0 + glxropcode 4100 + extension + alias TexSubImage2D + +############################################################################### +# +# Extension #10 +# EXT_copy_texture commands +# +############################################################################### + +# Arguably TexelInternalFormat, not PixelInternalFormat +CopyTexImage1DEXT(target, level, internalformat, x, y, width, border) + return void + param target TextureTarget in value + param level CheckedInt32 in value + param internalformat PixelInternalFormat in value + param x WinCoord in value + param y WinCoord in value + param width SizeI in value + param border CheckedInt32 in value + category EXT_copy_texture + version 1.0 + glxflags EXT + glxropcode 4119 + extension + alias CopyTexImage1D + +# Arguably TexelInternalFormat, not PixelInternalFormat +CopyTexImage2DEXT(target, level, internalformat, x, y, width, height, border) + return void + param target TextureTarget in value + param level CheckedInt32 in value + param internalformat PixelInternalFormat in value + param x WinCoord in value + param y WinCoord in value + param width SizeI in value + param height SizeI in value + param border CheckedInt32 in value + category EXT_copy_texture + version 1.0 + glxflags EXT + glxropcode 4120 + extension + alias CopyTexImage2D + +CopyTexSubImage1DEXT(target, level, xoffset, x, y, width) + return void + param target TextureTarget in value + param level CheckedInt32 in value + param xoffset CheckedInt32 in value + param x WinCoord in value + param y WinCoord in value + param width SizeI in value + category EXT_copy_texture + version 1.0 + glxflags EXT + glxropcode 4121 + extension + alias CopyTexSubImage1D + +CopyTexSubImage2DEXT(target, level, xoffset, yoffset, x, y, width, height) + return void + param target TextureTarget in value + param level CheckedInt32 in value + param xoffset CheckedInt32 in value + param yoffset CheckedInt32 in value + param x WinCoord in value + param y WinCoord in value + param width SizeI in value + param height SizeI in value + category EXT_copy_texture + version 1.0 + glxflags EXT + glxropcode 4122 + extension + alias CopyTexSubImage2D + +CopyTexSubImage3DEXT(target, level, xoffset, yoffset, zoffset, x, y, width, height) + return void + param target TextureTarget in value + param level CheckedInt32 in value + param xoffset CheckedInt32 in value + param yoffset CheckedInt32 in value + param zoffset CheckedInt32 in value + param x WinCoord in value + param y WinCoord in value + param width SizeI in value + param height SizeI in value + category EXT_copy_texture + version 1.0 + glxflags EXT + glxropcode 4123 + extension + alias CopyTexSubImage3D + +############################################################################### +# +# Extension #11 +# EXT_histogram commands +# +############################################################################### + +GetHistogramEXT(target, reset, format, type, values) + return void + param target HistogramTargetEXT in value + param reset Boolean in value + param format PixelFormat in value + param type PixelType in value + param values Void out array [COMPSIZE(target/format/type)] + category EXT_histogram + dlflags notlistable + glxflags client-handcode server-handcode EXT + version 1.0 + glxvendorpriv 5 + extension + offset 417 + +GetHistogramParameterfvEXT(target, pname, params) + return void + param target HistogramTargetEXT in value + param pname GetHistogramParameterPNameEXT in value + param params Float32 out array [COMPSIZE(pname)] + category EXT_histogram + dlflags notlistable + version 1.0 + glxvendorpriv 6 + glxflags EXT + extension + offset 418 + +GetHistogramParameterivEXT(target, pname, params) + return void + param target HistogramTargetEXT in value + param pname GetHistogramParameterPNameEXT in value + param params Int32 out array [COMPSIZE(pname)] + category EXT_histogram + dlflags notlistable + version 1.0 + glxvendorpriv 7 + glxflags EXT + extension + offset 419 + +GetMinmaxEXT(target, reset, format, type, values) + return void + param target MinmaxTargetEXT in value + param reset Boolean in value + param format PixelFormat in value + param type PixelType in value + param values Void out array [COMPSIZE(target/format/type)] + category EXT_histogram + dlflags notlistable + glxflags client-handcode server-handcode EXT + version 1.0 + glxvendorpriv 8 + extension + offset 420 + +GetMinmaxParameterfvEXT(target, pname, params) + return void + param target MinmaxTargetEXT in value + param pname GetMinmaxParameterPNameEXT in value + param params Float32 out array [COMPSIZE(pname)] + category EXT_histogram + dlflags notlistable + version 1.0 + glxvendorpriv 9 + glxflags EXT + extension + offset 421 + +GetMinmaxParameterivEXT(target, pname, params) + return void + param target MinmaxTargetEXT in value + param pname GetMinmaxParameterPNameEXT in value + param params Int32 out array [COMPSIZE(pname)] + category EXT_histogram + dlflags notlistable + version 1.0 + glxvendorpriv 10 + glxflags EXT + extension + offset 422 + +HistogramEXT(target, width, internalformat, sink) + return void + param target HistogramTargetEXT in value + param width SizeI in value + param internalformat PixelInternalFormat in value + param sink Boolean in value + category EXT_histogram + version 1.0 + glxropcode 4110 + glxflags EXT + extension + alias Histogram + +MinmaxEXT(target, internalformat, sink) + return void + param target MinmaxTargetEXT in value + param internalformat PixelInternalFormat in value + param sink Boolean in value + category EXT_histogram + version 1.0 + glxropcode 4111 + glxflags EXT + extension + alias Minmax + +ResetHistogramEXT(target) + return void + param target HistogramTargetEXT in value + category EXT_histogram + version 1.0 + glxropcode 4112 + glxflags EXT + extension + alias ResetHistogram + +ResetMinmaxEXT(target) + return void + param target MinmaxTargetEXT in value + category EXT_histogram + version 1.0 + glxropcode 4113 + glxflags EXT + extension + alias ResetMinmax + +############################################################################### +# +# Extension #12 +# EXT_convolution commands +# +############################################################################### + +ConvolutionFilter1DEXT(target, internalformat, width, format, type, image) + return void + param target ConvolutionTargetEXT in value + param internalformat PixelInternalFormat in value + param width SizeI in value + param format PixelFormat in value + param type PixelType in value + param image Void in array [COMPSIZE(format/type/width)] + category EXT_convolution + dlflags handcode + glxflags client-handcode server-handcode EXT + version 1.0 + glxropcode 4101 + extension + alias ConvolutionFilter1D + +ConvolutionFilter2DEXT(target, internalformat, width, height, format, type, image) + return void + param target ConvolutionTargetEXT in value + param internalformat PixelInternalFormat in value + param width SizeI in value + param height SizeI in value + param format PixelFormat in value + param type PixelType in value + param image Void in array [COMPSIZE(format/type/width/height)] + category EXT_convolution + dlflags handcode + glxflags client-handcode server-handcode EXT + version 1.0 + glxropcode 4102 + extension + alias ConvolutionFilter2D + +ConvolutionParameterfEXT(target, pname, params) + return void + param target ConvolutionTargetEXT in value + param pname ConvolutionParameterEXT in value + param params CheckedFloat32 in value + category EXT_convolution + version 1.0 + glxropcode 4103 + glxflags EXT + extension + alias ConvolutionParameterf + +ConvolutionParameterfvEXT(target, pname, params) + return void + param target ConvolutionTargetEXT in value + param pname ConvolutionParameterEXT in value + param params CheckedFloat32 in array [COMPSIZE(pname)] + category EXT_convolution + version 1.0 + glxropcode 4104 + glxflags EXT + extension + alias ConvolutionParameterfv + +ConvolutionParameteriEXT(target, pname, params) + return void + param target ConvolutionTargetEXT in value + param pname ConvolutionParameterEXT in value + param params CheckedInt32 in value + category EXT_convolution + version 1.0 + glxropcode 4105 + glxflags EXT + extension + alias ConvolutionParameteri + +ConvolutionParameterivEXT(target, pname, params) + return void + param target ConvolutionTargetEXT in value + param pname ConvolutionParameterEXT in value + param params CheckedInt32 in array [COMPSIZE(pname)] + category EXT_convolution + version 1.0 + glxropcode 4106 + glxflags EXT + extension + alias ConvolutionParameteriv + +CopyConvolutionFilter1DEXT(target, internalformat, x, y, width) + return void + param target ConvolutionTargetEXT in value + param internalformat PixelInternalFormat in value + param x WinCoord in value + param y WinCoord in value + param width SizeI in value + category EXT_convolution + version 1.0 + glxropcode 4107 + glxflags EXT + extension + alias CopyConvolutionFilter1D + +CopyConvolutionFilter2DEXT(target, internalformat, x, y, width, height) + return void + param target ConvolutionTargetEXT in value + param internalformat PixelInternalFormat in value + param x WinCoord in value + param y WinCoord in value + param width SizeI in value + param height SizeI in value + category EXT_convolution + version 1.0 + glxropcode 4108 + glxflags EXT + extension + alias CopyConvolutionFilter2D + +GetConvolutionFilterEXT(target, format, type, image) + return void + param target ConvolutionTargetEXT in value + param format PixelFormat in value + param type PixelType in value + param image Void out array [COMPSIZE(target/format/type)] + category EXT_convolution + dlflags notlistable + glxflags client-handcode server-handcode EXT + version 1.0 + glxvendorpriv 1 + extension + offset 423 + +GetConvolutionParameterfvEXT(target, pname, params) + return void + param target ConvolutionTargetEXT in value + param pname ConvolutionParameterEXT in value + param params Float32 out array [COMPSIZE(pname)] + category EXT_convolution + dlflags notlistable + version 1.0 + glxvendorpriv 2 + glxflags EXT + extension + offset 424 + +GetConvolutionParameterivEXT(target, pname, params) + return void + param target ConvolutionTargetEXT in value + param pname ConvolutionParameterEXT in value + param params Int32 out array [COMPSIZE(pname)] + category EXT_convolution + dlflags notlistable + version 1.0 + glxvendorpriv 3 + glxflags EXT + extension + offset 425 + +GetSeparableFilterEXT(target, format, type, row, column, span) + return void + param target SeparableTargetEXT in value + param format PixelFormat in value + param type PixelType in value + param row Void out array [COMPSIZE(target/format/type)] + param column Void out array [COMPSIZE(target/format/type)] + param span Void out array [COMPSIZE(target/format/type)] + category EXT_convolution + dlflags notlistable + glxflags client-handcode server-handcode EXT + version 1.0 + glxvendorpriv 4 + extension + offset 426 + +SeparableFilter2DEXT(target, internalformat, width, height, format, type, row, column) + return void + param target SeparableTargetEXT in value + param internalformat PixelInternalFormat in value + param width SizeI in value + param height SizeI in value + param format PixelFormat in value + param type PixelType in value + param row Void in array [COMPSIZE(target/format/type/width)] + param column Void in array [COMPSIZE(target/format/type/height)] + category EXT_convolution + dlflags handcode + glxflags client-handcode server-handcode EXT + version 1.0 + glxropcode 4109 + extension + alias SeparableFilter2D + +############################################################################### +# +# Extension #13 +# SGI_color_matrix commands +# +############################################################################### + +# (none) +newcategory: SGI_color_matrix + +############################################################################### +# +# Extension #14 +# SGI_color_table commands +# +############################################################################### + +ColorTableSGI(target, internalformat, width, format, type, table) + return void + param target ColorTableTargetSGI in value + param internalformat PixelInternalFormat in value + param width SizeI in value + param format PixelFormat in value + param type PixelType in value + param table Void in array [COMPSIZE(format/type/width)] + category SGI_color_table + dlflags handcode + glxflags client-handcode server-handcode SGI + version 1.0 + glxropcode 2053 + extension + alias ColorTable + +ColorTableParameterfvSGI(target, pname, params) + return void + param target ColorTableTargetSGI in value + param pname ColorTableParameterPNameSGI in value + param params CheckedFloat32 in array [COMPSIZE(pname)] + category SGI_color_table + version 1.0 + glxropcode 2054 + glxflags SGI + extension + alias ColorTableParameterfv + +ColorTableParameterivSGI(target, pname, params) + return void + param target ColorTableTargetSGI in value + param pname ColorTableParameterPNameSGI in value + param params CheckedInt32 in array [COMPSIZE(pname)] + category SGI_color_table + version 1.0 + glxropcode 2055 + glxflags SGI + extension + alias ColorTableParameteriv + +CopyColorTableSGI(target, internalformat, x, y, width) + return void + param target ColorTableTargetSGI in value + param internalformat PixelInternalFormat in value + param x WinCoord in value + param y WinCoord in value + param width SizeI in value + category SGI_color_table + version 1.0 + glxropcode 2056 + glxflags SGI + extension + alias CopyColorTable + +GetColorTableSGI(target, format, type, table) + return void + param target ColorTableTargetSGI in value + param format PixelFormat in value + param type PixelType in value + param table Void out array [COMPSIZE(target/format/type)] + category SGI_color_table + dlflags notlistable + glxflags client-handcode server-handcode SGI + version 1.0 + glxvendorpriv 4098 + extension + offset 427 + +GetColorTableParameterfvSGI(target, pname, params) + return void + param target ColorTableTargetSGI in value + param pname GetColorTableParameterPNameSGI in value + param params Float32 out array [COMPSIZE(pname)] + category SGI_color_table + dlflags notlistable + version 1.0 + glxflags SGI + glxvendorpriv 4099 + extension + offset 428 + +GetColorTableParameterivSGI(target, pname, params) + return void + param target ColorTableTargetSGI in value + param pname GetColorTableParameterPNameSGI in value + param params Int32 out array [COMPSIZE(pname)] + category SGI_color_table + dlflags notlistable + version 1.0 + glxflags SGI + glxvendorpriv 4100 + extension + offset 429 + +############################################################################### +# +# Extension #15 +# SGIX_pixel_texture commands +# +############################################################################### + +PixelTexGenSGIX(mode) + return void + param mode PixelTexGenModeSGIX in value + category SGIX_pixel_texture + version 1.0 + glxflags SGI + glxropcode 2059 + extension + offset 430 + +############################################################################### +# +# Extension #15 (variant) +# SGIS_pixel_texture commands +# Both SGIS and SGIX forms have extension #15! +# +############################################################################### + +PixelTexGenParameteriSGIS(pname, param) + return void + param pname PixelTexGenParameterNameSGIS in value + param param CheckedInt32 in value + category SGIS_pixel_texture + version 1.0 + extension + glxropcode ? + glxflags ignore + offset 431 + +PixelTexGenParameterivSGIS(pname, params) + return void + param pname PixelTexGenParameterNameSGIS in value + param params CheckedInt32 in array [COMPSIZE(pname)] + category SGIS_pixel_texture + version 1.0 + extension + glxropcode ? + glxflags ignore + offset 432 + +PixelTexGenParameterfSGIS(pname, param) + return void + param pname PixelTexGenParameterNameSGIS in value + param param CheckedFloat32 in value + category SGIS_pixel_texture + version 1.0 + extension + glxropcode ? + glxflags ignore + offset 433 + +PixelTexGenParameterfvSGIS(pname, params) + return void + param pname PixelTexGenParameterNameSGIS in value + param params CheckedFloat32 in array [COMPSIZE(pname)] + category SGIS_pixel_texture + version 1.0 + extension + glxropcode ? + glxflags ignore + offset 434 + +GetPixelTexGenParameterivSGIS(pname, params) + return void + param pname PixelTexGenParameterNameSGIS in value + param params CheckedInt32 out array [COMPSIZE(pname)] + dlflags notlistable + category SGIS_pixel_texture + version 1.0 + extension + glxvendorpriv ? + glxflags ignore + offset 435 + +GetPixelTexGenParameterfvSGIS(pname, params) + return void + param pname PixelTexGenParameterNameSGIS in value + param params CheckedFloat32 out array [COMPSIZE(pname)] + dlflags notlistable + category SGIS_pixel_texture + version 1.0 + extension + glxvendorpriv ? + glxflags ignore + offset 436 + +############################################################################### +# +# Extension #16 +# SGIS_texture4D commands +# +############################################################################### + +TexImage4DSGIS(target, level, internalformat, width, height, depth, size4d, border, format, type, pixels) + return void + param target TextureTarget in value + param level CheckedInt32 in value + param internalformat PixelInternalFormat in value + param width SizeI in value + param height SizeI in value + param depth SizeI in value + param size4d SizeI in value + param border CheckedInt32 in value + param format PixelFormat in value + param type PixelType in value + param pixels Void in array [COMPSIZE(format/type/width/height/depth/size4d)] + category SGIS_texture4D + dlflags handcode + glxflags client-handcode server-handcode SGI + version 1.0 + glxropcode 2057 + extension + offset 437 + +TexSubImage4DSGIS(target, level, xoffset, yoffset, zoffset, woffset, width, height, depth, size4d, format, type, pixels) + return void + param target TextureTarget in value + param level CheckedInt32 in value + param xoffset CheckedInt32 in value + param yoffset CheckedInt32 in value + param zoffset CheckedInt32 in value + param woffset CheckedInt32 in value + param width SizeI in value + param height SizeI in value + param depth SizeI in value + param size4d SizeI in value + param format PixelFormat in value + param type PixelType in value + param pixels Void in array [COMPSIZE(format/type/width/height/depth/size4d)] + category SGIS_texture4D + dlflags handcode + glxflags client-handcode server-handcode SGI + version 1.0 + glxropcode 2058 + extension + offset 438 + +############################################################################### +# +# Extension #17 +# SGI_texture_color_table commands +# +############################################################################### + +# (none) +newcategory: SGI_texture_color_table + +############################################################################### +# +# Extension #18 +# EXT_cmyka commands +# +############################################################################### + +# (none) +newcategory: EXT_cmyka + +############################################################################### +# +# Extension #19 - skipped +# +############################################################################### + +############################################################################### +# +# Extension #20 +# EXT_texture_object commands +# +############################################################################### + +AreTexturesResidentEXT(n, textures, residences) + return Boolean + param n SizeI in value + param textures Texture in array [n] + param residences Boolean out array [n] + category EXT_texture_object + glxflags EXT + glxvendorpriv 11 + dlflags notlistable + version 1.0 + extension + offset 439 + +BindTextureEXT(target, texture) + return void + param target TextureTarget in value + param texture Texture in value + category EXT_texture_object + version 1.0 + glxflags EXT + glxropcode 4117 + extension + alias BindTexture + +DeleteTexturesEXT(n, textures) + return void + param n SizeI in value + param textures Texture in array [n] + category EXT_texture_object + dlflags notlistable + version 1.0 + glxflags EXT + glxvendorpriv 12 + extension + offset 561 + +GenTexturesEXT(n, textures) + return void + param n SizeI in value + param textures Texture out array [n] + category EXT_texture_object + dlflags notlistable + version 1.0 + glxflags EXT + glxvendorpriv 13 + extension + offset 440 + +IsTextureEXT(texture) + return Boolean + param texture Texture in value + category EXT_texture_object + dlflags notlistable + version 1.0 + glxflags EXT + glxvendorpriv 14 + extension + offset 441 + +PrioritizeTexturesEXT(n, textures, priorities) + return void + param n SizeI in value + param textures Texture in array [n] + param priorities ClampedFloat32 in array [n] + category EXT_texture_object + glxflags EXT + version 1.0 + glxropcode 4118 + extension + alias PrioritizeTextures + +############################################################################### +# +# Extension #21 +# SGIS_detail_texture commands +# +############################################################################### + +DetailTexFuncSGIS(target, n, points) + return void + param target TextureTarget in value + param n SizeI in value + param points Float32 in array [n*2] + category SGIS_detail_texture + glxflags SGI + version 1.0 + glxropcode 2051 + extension + offset 442 + +GetDetailTexFuncSGIS(target, points) + return void + param target TextureTarget in value + param points Float32 out array [COMPSIZE(target)] + category SGIS_detail_texture + dlflags notlistable + version 1.0 + glxflags SGI + glxvendorpriv 4096 + extension + offset 443 + +############################################################################### +# +# Extension #22 +# SGIS_sharpen_texture commands +# +############################################################################### + +SharpenTexFuncSGIS(target, n, points) + return void + param target TextureTarget in value + param n SizeI in value + param points Float32 in array [n*2] + category SGIS_sharpen_texture + glxflags SGI + version 1.0 + glxropcode 2052 + extension + offset 444 + +GetSharpenTexFuncSGIS(target, points) + return void + param target TextureTarget in value + param points Float32 out array [COMPSIZE(target)] + category SGIS_sharpen_texture + dlflags notlistable + version 1.0 + glxflags SGI + glxvendorpriv 4097 + extension + offset 445 + +############################################################################### +# +# EXT_packed_pixels commands +# Extension #23 +# +############################################################################### + +# (none) +newcategory: EXT_packed_pixels + +############################################################################### +# +# Extension #24 +# SGIS_texture_lod commands +# +############################################################################### + +# (none) +newcategory: SGIS_texture_lod + +############################################################################### +# +# Extension #25 +# SGIS_multisample commands +# +############################################################################### + +SampleMaskSGIS(value, invert) + return void + param value ClampedFloat32 in value + param invert Boolean in value + category SGIS_multisample + version 1.1 + glxropcode 2048 + glxflags SGI + extension + alias SampleMaskEXT + +SamplePatternSGIS(pattern) + return void + param pattern SamplePatternSGIS in value + category SGIS_multisample + version 1.0 + glxropcode 2049 + glxflags SGI + extension + alias SamplePatternEXT + +############################################################################### +# +# Extension #26 - no specification? +# +############################################################################### + +############################################################################### +# +# Extension #27 +# EXT_rescale_normal commands +# +############################################################################### + +# (none) +newcategory: EXT_rescale_normal + +############################################################################### +# +# Extension #28 - GLX_EXT_visual_info +# Extension #29 - skipped +# +############################################################################### + +############################################################################### +# +# Extension #30 +# EXT_vertex_array commands +# +############################################################################### + +ArrayElementEXT(i) + return void + param i Int32 in value + category EXT_vertex_array + dlflags handcode + glxflags client-handcode server-handcode EXT + version 1.0 + extension + alias ArrayElement + +ColorPointerEXT(size, type, stride, count, pointer) + return void + param size Int32 in value + param type ColorPointerType in value + param stride SizeI in value + param count SizeI in value + param pointer Void in array [COMPSIZE(size/type/stride/count)] retained + category EXT_vertex_array + dlflags notlistable + glxflags client-handcode server-handcode EXT + version 1.0 + extension + offset 448 + +DrawArraysEXT(mode, first, count) + return void + param mode BeginMode in value + param first Int32 in value + param count SizeI in value + category EXT_vertex_array + dlflags handcode + glxflags client-handcode server-handcode EXT + version 1.0 + glxropcode 4116 + extension + alias DrawArrays + +EdgeFlagPointerEXT(stride, count, pointer) + return void + param stride SizeI in value + param count SizeI in value + param pointer Boolean in array [COMPSIZE(stride/count)] retained + category EXT_vertex_array + dlflags notlistable + glxflags client-handcode server-handcode EXT + version 1.0 + extension + offset 449 + +GetPointervEXT(pname, params) + return void + param pname GetPointervPName in value + param params VoidPointer out array [1] + category EXT_vertex_array + dlflags notlistable + glxflags client-handcode server-handcode EXT + version 1.0 + extension + alias GetPointerv + +IndexPointerEXT(type, stride, count, pointer) + return void + param type IndexPointerType in value + param stride SizeI in value + param count SizeI in value + param pointer Void in array [COMPSIZE(type/stride/count)] retained + category EXT_vertex_array + dlflags notlistable + glxflags client-handcode server-handcode EXT + version 1.0 + extension + offset 450 + +NormalPointerEXT(type, stride, count, pointer) + return void + param type NormalPointerType in value + param stride SizeI in value + param count SizeI in value + param pointer Void in array [COMPSIZE(type/stride/count)] retained + category EXT_vertex_array + dlflags notlistable + glxflags client-handcode server-handcode EXT + version 1.0 + extension + offset 451 + +TexCoordPointerEXT(size, type, stride, count, pointer) + return void + param size Int32 in value + param type TexCoordPointerType in value + param stride SizeI in value + param count SizeI in value + param pointer Void in array [COMPSIZE(size/type/stride/count)] retained + category EXT_vertex_array + dlflags notlistable + glxflags client-handcode server-handcode EXT + version 1.0 + extension + offset 452 + +VertexPointerEXT(size, type, stride, count, pointer) + return void + param size Int32 in value + param type VertexPointerType in value + param stride SizeI in value + param count SizeI in value + param pointer Void in array [COMPSIZE(size/type/stride/count)] retained + category EXT_vertex_array + dlflags notlistable + glxflags client-handcode server-handcode EXT + version 1.0 + extension + offset 453 + +############################################################################### +# +# Extension #31 +# EXT_misc_attribute commands +# +############################################################################### + +# (none) +newcategory: EXT_misc_attribute + +############################################################################### +# +# Extension #32 +# SGIS_generate_mipmap commands +# +############################################################################### + +# (none) +newcategory: SGIS_generate_mipmap + +############################################################################### +# +# Extension #33 +# SGIX_clipmap commands +# +############################################################################### + +# (none) +newcategory: SGIX_clipmap + +############################################################################### +# +# Extension #34 +# SGIX_shadow commands +# +############################################################################### + +# (none) +newcategory: SGIX_shadow + +############################################################################### +# +# Extension #35 +# SGIS_texture_edge_clamp commands +# +############################################################################### + +# (none) +newcategory: SGIS_texture_edge_clamp + +############################################################################### +# +# Extension #36 +# SGIS_texture_border_clamp commands +# +############################################################################### + +# (none) +newcategory: SGIS_texture_border_clamp + +############################################################################### +# +# Extension #37 +# EXT_blend_minmax commands +# +############################################################################### + +BlendEquationEXT(mode) + return void + param mode BlendEquationModeEXT in value + category EXT_blend_minmax + version 1.0 + glxropcode 4097 + glxflags EXT + extension soft + alias BlendEquation + +############################################################################### +# +# Extension #38 +# EXT_blend_subtract commands +# +############################################################################### + +# (none) +newcategory: EXT_blend_subtract + +############################################################################### +# +# Extension #39 +# EXT_blend_logic_op commands +# +############################################################################### + +# (none) +newcategory: EXT_blend_logic_op + +############################################################################### +# +# Extension #40 - GLX_SGI_swap_control +# Extension #41 - GLX_SGI_video_sync +# Extension #42 - GLX_SGI_make_current_read +# Extension #43 - GLX_SGIX_video_source +# Extension #44 - GLX_EXT_visual_rating +# +############################################################################### + +############################################################################### +# +# Extension #45 +# SGIX_interlace commands +# +############################################################################### + +# (none) +newcategory: SGIX_interlace + +############################################################################### +# +# Extension #46 +# SGIX_pixel_tiles commands +# +############################################################################### + +# (none) +newcategory: SGIX_pixel_tiles + +############################################################################### +# +# Extension #47 - GLX_EXT_import_context +# Extension #48 - skipped +# Extension #49 - GLX_SGIX_fbconfig +# Extension #50 - GLX_SGIX_pbuffer +# +############################################################################### + +############################################################################### +# +# Extension #51 +# SGIX_texture_select commands +# +############################################################################### + +# (none) +newcategory: SGIX_texture_select + +############################################################################### +# +# Extension #52 +# SGIX_sprite commands +# +############################################################################### + +SpriteParameterfSGIX(pname, param) + return void + param pname SpriteParameterNameSGIX in value + param param CheckedFloat32 in value + category SGIX_sprite + version 1.0 + glxflags SGI + glxropcode 2060 + extension + offset 454 + +SpriteParameterfvSGIX(pname, params) + return void + param pname SpriteParameterNameSGIX in value + param params CheckedFloat32 in array [COMPSIZE(pname)] + category SGIX_sprite + version 1.0 + glxflags SGI + glxropcode 2061 + extension + offset 455 + +SpriteParameteriSGIX(pname, param) + return void + param pname SpriteParameterNameSGIX in value + param param CheckedInt32 in value + category SGIX_sprite + version 1.0 + glxflags SGI + glxropcode 2062 + extension + offset 456 + +SpriteParameterivSGIX(pname, params) + return void + param pname SpriteParameterNameSGIX in value + param params CheckedInt32 in array [COMPSIZE(pname)] + category SGIX_sprite + version 1.0 + glxflags SGI + glxropcode 2063 + extension + offset 457 + +############################################################################### +# +# Extension #53 +# SGIX_texture_multi_buffer commands +# +############################################################################### + +# (none) +newcategory: SGIX_texture_multi_buffer + +############################################################################### +# +# Extension #54 +# EXT_point_parameters / SGIS_point_parameters commands +# +############################################################################### + +PointParameterfEXT(pname, param) + return void + param pname PointParameterNameARB in value + param param CheckedFloat32 in value + category EXT_point_parameters + version 1.0 + glxflags SGI + extension + alias PointParameterfARB + +PointParameterfvEXT(pname, params) + return void + param pname PointParameterNameARB in value + param params CheckedFloat32 in array [COMPSIZE(pname)] + category EXT_point_parameters + version 1.0 + glxflags SGI + extension + alias PointParameterfvARB + +PointParameterfSGIS(pname, param) + return void + param pname PointParameterNameARB in value + param param CheckedFloat32 in value + category SGIS_point_parameters + version 1.0 + glxflags SGI + extension + alias PointParameterfARB + +PointParameterfvSGIS(pname, params) + return void + param pname PointParameterNameARB in value + param params CheckedFloat32 in array [COMPSIZE(pname)] + category SGIS_point_parameters + version 1.0 + glxflags SGI + extension + alias PointParameterfvARB + +############################################################################### +# +# Extension #55 +# SGIX_instruments commands +# +############################################################################### + +GetInstrumentsSGIX() + return Int32 + dlflags notlistable + category SGIX_instruments + version 1.0 + glxflags SGI + glxvendorpriv 4102 + extension + offset 460 + +InstrumentsBufferSGIX(size, buffer) + return void + param size SizeI in value + param buffer Int32 out array [size] retained + dlflags notlistable + category SGIX_instruments + version 1.0 + glxflags SGI + glxvendorpriv 4103 + extension + offset 461 + +PollInstrumentsSGIX(marker_p) + return Int32 + param marker_p Int32 out array [1] + dlflags notlistable + category SGIX_instruments + version 1.0 + glxflags SGI + glxvendorpriv 4104 + extension + offset 462 + +ReadInstrumentsSGIX(marker) + return void + param marker Int32 in value + category SGIX_instruments + version 1.0 + glxflags SGI + glxropcode 2077 + extension + offset 463 + +StartInstrumentsSGIX() + return void + category SGIX_instruments + version 1.0 + glxflags SGI + glxropcode 2069 + extension + offset 464 + +StopInstrumentsSGIX(marker) + return void + param marker Int32 in value + category SGIX_instruments + version 1.0 + glxflags SGI + glxropcode 2070 + extension + offset 465 + +############################################################################### +# +# Extension #56 +# SGIX_texture_scale_bias commands +# +############################################################################### + +# (none) +newcategory: SGIX_texture_scale_bias + +############################################################################### +# +# Extension #57 +# SGIX_framezoom commands +# +############################################################################### + +FrameZoomSGIX(factor) + return void + param factor CheckedInt32 in value + category SGIX_framezoom + version 1.0 + glxflags SGI + glxropcode 2072 + extension + offset 466 + +############################################################################### +# +# Extension #58 +# SGIX_tag_sample_buffer commands +# +############################################################################### + +TagSampleBufferSGIX() + return void + category SGIX_tag_sample_buffer + version 1.0 + glxropcode 2050 + glxflags SGI + extension + offset 467 + +############################################################################### +# +# Extension #59 +# SGIX_polynomial_ffd commands +# +############################################################################### + +DeformationMap3dSGIX(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, w1, w2, wstride, worder, points) + return void + param target FfdTargetSGIX in value + param u1 CoordD in value + param u2 CoordD in value + param ustride Int32 in value + param uorder CheckedInt32 in value + param v1 CoordD in value + param v2 CoordD in value + param vstride Int32 in value + param vorder CheckedInt32 in value + param w1 CoordD in value + param w2 CoordD in value + param wstride Int32 in value + param worder CheckedInt32 in value + param points CoordD in array [COMPSIZE(target/ustride/uorder/vstride/vorder/wstride/worder)] + dlflags handcode + category SGIX_polynomial_ffd + version 1.0 + glxflags SGI ignore + glxropcode 2073 + extension + offset ? + +DeformationMap3fSGIX(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, w1, w2, wstride, worder, points) + return void + param target FfdTargetSGIX in value + param u1 CoordF in value + param u2 CoordF in value + param ustride Int32 in value + param uorder CheckedInt32 in value + param v1 CoordF in value + param v2 CoordF in value + param vstride Int32 in value + param vorder CheckedInt32 in value + param w1 CoordF in value + param w2 CoordF in value + param wstride Int32 in value + param worder CheckedInt32 in value + param points CoordF in array [COMPSIZE(target/ustride/uorder/vstride/vorder/wstride/worder)] + category SGIX_polynomial_ffd + dlflags handcode + version 1.0 + glxflags SGI ignore + glxropcode 2074 + extension + offset ? + +DeformSGIX(mask) + return void + param mask FfdMaskSGIX in value + category SGIX_polynomial_ffd + version 1.0 + glxflags SGI ignore + glxropcode 2075 + extension + offset ? + +LoadIdentityDeformationMapSGIX(mask) + return void + param mask FfdMaskSGIX in value + category SGIX_polynomial_ffd + version 1.0 + glxflags SGI ignore + glxropcode 2076 + extension + offset ? + +############################################################################### +# +# Extension #60 +# SGIX_reference_plane commands +# +############################################################################### + +ReferencePlaneSGIX(equation) + return void + param equation Float64 in array [4] + category SGIX_reference_plane + version 1.0 + glxflags SGI + glxropcode 2071 + extension + offset 468 + +############################################################################### +# +# Extension #61 +# SGIX_flush_raster commands +# +############################################################################### + +FlushRasterSGIX() + return void + category SGIX_flush_raster + version 1.0 + dlflags notlistable + glxflags SGI + glxvendorpriv 4105 + extension + offset 469 + +############################################################################### +# +# Extension #62 - GLX_SGIX_cushion +# +############################################################################### + +############################################################################### +# +# Extension #63 +# SGIX_depth_texture commands +# +############################################################################### + +# (none) +newcategory: SGIX_depth_texture + +############################################################################### +# +# Extension #64 +# SGIS_fog_function commands +# +############################################################################### + +FogFuncSGIS(n, points) + return void + param n SizeI in value + param points Float32 in array [n*2] + category SGIS_fog_function + version 1.1 + glxflags SGI + glxropcode 2067 + extension + offset + +# Need to insert GLX information +GetFogFuncSGIS(points) + return void + param points Float32 out array [COMPSIZE()] + category SGIS_fog_function + version 1.1 + dlflags notlistable + glxflags ignore + extension + offset + +############################################################################### +# +# Extension #65 +# SGIX_fog_offset commands +# +############################################################################### + +# (none) +newcategory: SGIX_fog_offset + +############################################################################### +# +# Extension #66 +# HP_image_transform commands +# +############################################################################### + +ImageTransformParameteriHP(target, pname, param) + return void + param target ImageTransformTargetHP in value + param pname ImageTransformPNameHP in value + param param Int32 in value + category HP_image_transform + version 1.1 + glxropcode ? + offset ? + +ImageTransformParameterfHP(target, pname, param) + return void + param target ImageTransformTargetHP in value + param pname ImageTransformPNameHP in value + param param Float32 in value + category HP_image_transform + version 1.1 + glxropcode ? + offset ? + +ImageTransformParameterivHP(target, pname, params) + return void + param target ImageTransformTargetHP in value + param pname ImageTransformPNameHP in value + param params Int32 in array [COMPSIZE(pname)] + category HP_image_transform + version 1.1 + glxropcode ? + offset ? + +ImageTransformParameterfvHP(target, pname, params) + return void + param target ImageTransformTargetHP in value + param pname ImageTransformPNameHP in value + param params Float32 in array [COMPSIZE(pname)] + category HP_image_transform + version 1.1 + glxropcode ? + offset ? + +GetImageTransformParameterivHP(target, pname, params) + return void + param target ImageTransformTargetHP in value + param pname ImageTransformPNameHP in value + param params Int32 out array [COMPSIZE(pname)] + dlflags notlistable + category HP_image_transform + version 1.1 + glxropcode ? + offset ? + +GetImageTransformParameterfvHP(target, pname, params) + return void + param target ImageTransformTargetHP in value + param pname ImageTransformPNameHP in value + param params Float32 out array [COMPSIZE(pname)] + category HP_image_transform + version 1.1 + glxropcode ? + offset ? + +############################################################################### +# +# Extension #67 +# HP_convolution_border_modes commands +# +############################################################################### + +# (none) +newcategory: HP_convolution_border_modes + +############################################################################### +# +# Extension #68 +# INGR_palette_buffer commands +# +############################################################################### + +#@ (Intergraph hasn't provided a spec) + +############################################################################### +# +# Extension #69 +# SGIX_texture_add_env commands +# +############################################################################### + +# (none) +newcategory: SGIX_texture_add_env + +############################################################################### +# +# Extension #70 - skipped +# Extension #71 - skipped +# Extension #72 - skipped +# Extension #73 - skipped +# +############################################################################### + +############################################################################### +# +# Extension #74 +# EXT_color_subtable commands +# +# This was probably never actually shipped as an EXT - just written up as a +# reference for OpenGL 1.2 ARB_imaging. +# +############################################################################### + +ColorSubTableEXT(target, start, count, format, type, data) + return void + param target ColorTableTarget in value + param start SizeI in value + param count SizeI in value + param format PixelFormat in value + param type PixelType in value + param data Void in array [COMPSIZE(format/type/count)] + category EXT_color_subtable + version 1.2 + alias ColorSubTable + +CopyColorSubTableEXT(target, start, x, y, width) + return void + param target ColorTableTarget in value + param start SizeI in value + param x WinCoord in value + param y WinCoord in value + param width SizeI in value + category EXT_color_subtable + version 1.2 + alias CopyColorSubTable + +############################################################################### +# +# Extension #75 - GLU_EXT_object_space_tess +# +############################################################################### + +############################################################################### +# +# Extension #76 +# PGI_vertex_hints commands +# +############################################################################### + +# (none) +newcategory: PGI_vertex_hints + +############################################################################### +# +# Extension #77 +# PGI_misc_hints commands +# +############################################################################### + +HintPGI(target, mode) + return void + param target HintTargetPGI in value + param mode Int32 in value + category PGI_misc_hints + version 1.1 + offset 544 + +############################################################################### +# +# Extension #78 +# EXT_paletted_texture commands +# +############################################################################### + +ColorTableEXT(target, internalFormat, width, format, type, table) + return void + param target ColorTableTarget in value + param internalFormat PixelInternalFormat in value + param width SizeI in value + param format PixelFormat in value + param type PixelType in value + param table Void in array [COMPSIZE(format/type/width)] + category EXT_paletted_texture + version 1.1 + alias ColorTable + +GetColorTableEXT(target, format, type, data) + return void + param target ColorTableTarget in value + param format PixelFormat in value + param type PixelType in value + param data Void out array [COMPSIZE(target/format/type)] + category EXT_paletted_texture + version 1.1 + offset 550 + +GetColorTableParameterivEXT(target, pname, params) + return void + param target ColorTableTarget in value + param pname GetColorTableParameterPName in value + param params Int32 out array [COMPSIZE(pname)] + category EXT_paletted_texture + version 1.1 + offset 551 + +GetColorTableParameterfvEXT(target, pname, params) + return void + param target ColorTableTarget in value + param pname GetColorTableParameterPName in value + param params Float32 out array [COMPSIZE(pname)] + category EXT_paletted_texture + version 1.1 + offset 552 + +############################################################################### +# +# Extension #79 +# EXT_clip_volume_hint commands +# +############################################################################### + +# (none) +newcategory: EXT_clip_volume_hint + +############################################################################### +# +# Extension #80 +# SGIX_list_priority commands +# +############################################################################### + +# @@@ Needs vendorpriv opcodes assigned +GetListParameterfvSGIX(list, pname, params) + return void + param list List in value + param pname ListParameterName in value + param params CheckedFloat32 out array [COMPSIZE(pname)] + dlflags notlistable + glxflags ignore + category SGIX_list_priority + version 1.0 + glxvendorpriv ? + extension + offset 470 + +# @@@ Needs vendorpriv opcodes assigned +GetListParameterivSGIX(list, pname, params) + return void + param list List in value + param pname ListParameterName in value + param params CheckedInt32 out array [COMPSIZE(pname)] + dlflags notlistable + glxflags ignore + category SGIX_list_priority + version 1.0 + glxvendorpriv ? + extension + offset 471 + +ListParameterfSGIX(list, pname, param) + return void + param list List in value + param pname ListParameterName in value + param param CheckedFloat32 in value + dlflags notlistable + glxflags ignore + category SGIX_list_priority + version 1.0 + glxropcode 2078 + extension + offset 472 + +ListParameterfvSGIX(list, pname, params) + return void + param list List in value + param pname ListParameterName in value + param params CheckedFloat32 in array [COMPSIZE(pname)] + dlflags notlistable + glxflags ignore + category SGIX_list_priority + version 1.0 + glxropcode 2079 + extension + offset 473 + +ListParameteriSGIX(list, pname, param) + return void + param list List in value + param pname ListParameterName in value + param param CheckedInt32 in value + dlflags notlistable + glxflags ignore + category SGIX_list_priority + version 1.0 + glxropcode 2080 + extension + offset 474 + +ListParameterivSGIX(list, pname, params) + return void + param list List in value + param pname ListParameterName in value + param params CheckedInt32 in array [COMPSIZE(pname)] + dlflags notlistable + glxflags ignore + category SGIX_list_priority + version 1.0 + glxropcode 2081 + extension + offset 475 + +############################################################################### +# +# Extension #81 +# SGIX_ir_instrument1 commands +# +############################################################################### + +# (none) +newcategory: SGIX_ir_instrument1 + +############################################################################### +# +# Extension #82 +# SGIX_calligraphic_fragment commands +# +############################################################################### + +# (none) +newcategory: SGIX_calligraphic_fragment + +############################################################################### +# +# Extension #83 - GLX_SGIX_video_resize +# +############################################################################### + +############################################################################### +# +# Extension #84 +# SGIX_texture_lod_bias commands +# +############################################################################### + +# (none) +newcategory: SGIX_texture_lod_bias + +############################################################################### +# +# Extension #85 - skipped +# Extension #86 - GLX_SGIX_dmbuffer +# Extension #87 - skipped +# Extension #88 - skipped +# Extension #89 - skipped +# +############################################################################### + +############################################################################### +# +# Extension #90 +# SGIX_shadow_ambient commands +# +############################################################################### + +# (none) +newcategory: SGIX_shadow_ambient + +############################################################################### +# +# Extension #91 - GLX_SGIX_swap_group +# Extension #92 - GLX_SGIX_swap_barrier +# +############################################################################### + +############################################################################### +# +# Extension #93 +# EXT_index_texture commands +# +############################################################################### + +# (none) +newcategory: EXT_index_texture + +############################################################################### +# +# Extension #94 +# EXT_index_material commands +# +############################################################################### + +IndexMaterialEXT(face, mode) + return void + param face MaterialFace in value + param mode IndexMaterialParameterEXT in value + category EXT_index_material + version 1.1 + extension soft + glxflags ignore + offset 538 + +############################################################################### +# +# Extension #95 +# EXT_index_func commands +# +############################################################################### + +IndexFuncEXT(func, ref) + return void + param func IndexFunctionEXT in value + param ref ClampedFloat32 in value + category EXT_index_func + version 1.1 + extension soft + glxflags ignore + offset 539 + +############################################################################### +# +# Extension #96 +# EXT_index_array_formats commands +# +############################################################################### + +# (none) +newcategory: EXT_index_array_formats + +############################################################################### +# +# Extension #97 +# EXT_compiled_vertex_array commands +# +############################################################################### + +LockArraysEXT(first, count) + return void + param first Int32 in value + param count SizeI in value + category EXT_compiled_vertex_array + version 1.1 + dlflags notlistable + extension soft + glxflags ignore + offset 540 + +UnlockArraysEXT() + return void + category EXT_compiled_vertex_array + version 1.1 + dlflags notlistable + extension soft + glxflags ignore + offset 541 + +############################################################################### +# +# Extension #98 +# EXT_cull_vertex commands +# +############################################################################### + +CullParameterdvEXT(pname, params) + return void + param pname CullParameterEXT in value + param params Float64 out array [4] + category EXT_cull_vertex + version 1.1 + dlflags notlistable + extension soft + glxflags ignore + offset 542 + +CullParameterfvEXT(pname, params) + return void + param pname CullParameterEXT in value + param params Float32 out array [4] + category EXT_cull_vertex + version 1.1 + dlflags notlistable + extension soft + glxflags ignore + offset 543 + +############################################################################### +# +# Extension #99 - skipped +# Extension #100 - GLU_EXT_nurbs_tessellator +# +############################################################################### + +############################################################################### +# +# Extension #101 +# SGIX_ycrcb commands +# +############################################################################### + +# (none) +newcategory: SGIX_ycrcb + +############################################################################### +# +# Extension #102 +# SGIX_fragment_lighting commands +# +############################################################################### + +FragmentColorMaterialSGIX(face, mode) + return void + param face MaterialFace in value + param mode MaterialParameter in value + category SGIX_fragment_lighting + glxflags ignore + version 1.0 + extension + offset 476 + +FragmentLightfSGIX(light, pname, param) + return void + param light FragmentLightNameSGIX in value + param pname FragmentLightParameterSGIX in value + param param CheckedFloat32 in value + category SGIX_fragment_lighting + glxflags ignore + version 1.0 + extension + offset 477 + +FragmentLightfvSGIX(light, pname, params) + return void + param light FragmentLightNameSGIX in value + param pname FragmentLightParameterSGIX in value + param params CheckedFloat32 in array [COMPSIZE(pname)] + category SGIX_fragment_lighting + glxflags ignore + version 1.0 + extension + offset 478 + +FragmentLightiSGIX(light, pname, param) + return void + param light FragmentLightNameSGIX in value + param pname FragmentLightParameterSGIX in value + param param CheckedInt32 in value + category SGIX_fragment_lighting + glxflags ignore + version 1.0 + extension + offset 479 + +FragmentLightivSGIX(light, pname, params) + return void + param light FragmentLightNameSGIX in value + param pname FragmentLightParameterSGIX in value + param params CheckedInt32 in array [COMPSIZE(pname)] + category SGIX_fragment_lighting + glxflags ignore + version 1.0 + extension + offset 480 + +FragmentLightModelfSGIX(pname, param) + return void + param pname FragmentLightModelParameterSGIX in value + param param CheckedFloat32 in value + category SGIX_fragment_lighting + glxflags ignore + version 1.0 + extension + offset 481 + +FragmentLightModelfvSGIX(pname, params) + return void + param pname FragmentLightModelParameterSGIX in value + param params CheckedFloat32 in array [COMPSIZE(pname)] + category SGIX_fragment_lighting + glxflags ignore + version 1.0 + extension + offset 482 + +FragmentLightModeliSGIX(pname, param) + return void + param pname FragmentLightModelParameterSGIX in value + param param CheckedInt32 in value + category SGIX_fragment_lighting + glxflags ignore + version 1.0 + extension + offset 483 + +FragmentLightModelivSGIX(pname, params) + return void + param pname FragmentLightModelParameterSGIX in value + param params CheckedInt32 in array [COMPSIZE(pname)] + category SGIX_fragment_lighting + glxflags ignore + version 1.0 + extension + offset 484 + +FragmentMaterialfSGIX(face, pname, param) + return void + param face MaterialFace in value + param pname MaterialParameter in value + param param CheckedFloat32 in value + category SGIX_fragment_lighting + glxflags ignore + version 1.0 + extension + offset 485 + +FragmentMaterialfvSGIX(face, pname, params) + return void + param face MaterialFace in value + param pname MaterialParameter in value + param params CheckedFloat32 in array [COMPSIZE(pname)] + category SGIX_fragment_lighting + glxflags ignore + version 1.0 + extension + offset 486 + +FragmentMaterialiSGIX(face, pname, param) + return void + param face MaterialFace in value + param pname MaterialParameter in value + param param CheckedInt32 in value + category SGIX_fragment_lighting + glxflags ignore + version 1.0 + extension + offset 487 + +FragmentMaterialivSGIX(face, pname, params) + return void + param face MaterialFace in value + param pname MaterialParameter in value + param params CheckedInt32 in array [COMPSIZE(pname)] + category SGIX_fragment_lighting + glxflags ignore + version 1.0 + extension + offset 488 + +GetFragmentLightfvSGIX(light, pname, params) + return void + param light FragmentLightNameSGIX in value + param pname FragmentLightParameterSGIX in value + param params Float32 out array [COMPSIZE(pname)] + category SGIX_fragment_lighting + dlflags notlistable + glxflags ignore + version 1.0 + extension + offset 489 + +GetFragmentLightivSGIX(light, pname, params) + return void + param light FragmentLightNameSGIX in value + param pname FragmentLightParameterSGIX in value + param params Int32 out array [COMPSIZE(pname)] + category SGIX_fragment_lighting + dlflags notlistable + glxflags ignore + version 1.0 + extension + offset 490 + +GetFragmentMaterialfvSGIX(face, pname, params) + return void + param face MaterialFace in value + param pname MaterialParameter in value + param params Float32 out array [COMPSIZE(pname)] + category SGIX_fragment_lighting + dlflags notlistable + glxflags ignore + version 1.0 + extension + offset 491 + +GetFragmentMaterialivSGIX(face, pname, params) + return void + param face MaterialFace in value + param pname MaterialParameter in value + param params Int32 out array [COMPSIZE(pname)] + category SGIX_fragment_lighting + dlflags notlistable + glxflags ignore + version 1.0 + extension + offset 492 + +LightEnviSGIX(pname, param) + return void + param pname LightEnvParameterSGIX in value + param param CheckedInt32 in value + category SGIX_fragment_lighting + glxflags ignore + version 1.0 + extension + offset 493 + +############################################################################### +# +# Extension #103 - skipped +# Extension #104 - skipped +# Extension #105 - skipped +# Extension #106 - skipped +# Extension #107 - skipped +# Extension #108 - skipped +# Extension #109 - skipped +# +############################################################################### + +############################################################################### +# +# Extension #110 +# IBM_rasterpos_clip commands +# +############################################################################### + +# (none) +newcategory: IBM_rasterpos_clip + +############################################################################### +# +# Extension #111 +# HP_texture_lighting commands +# +############################################################################### + +# (none) +newcategory: HP_texture_lighting + +############################################################################### +# +# Extension #112 +# EXT_draw_range_elements commands +# +############################################################################### + +# Spec entries to be written +DrawRangeElementsEXT(mode, start, end, count, type, indices) + return void + param mode BeginMode in value + param start UInt32 in value + param end UInt32 in value + param count SizeI in value + param type DrawElementsType in value + param indices Void in array [COMPSIZE(count/type)] + category EXT_draw_range_elements + dlflags handcode + glxflags client-handcode client-intercept server-handcode + version 1.1 + alias DrawRangeElements + +############################################################################### +# +# Extension #113 +# WIN_phong_shading commands +# +############################################################################### + +# (none) +newcategory: WIN_phong_shading + +############################################################################### +# +# Extension #114 +# WIN_specular_fog commands +# +############################################################################### + +# (none) +newcategory: WIN_specular_fog + +############################################################################### +# +# Extension #115 - skipped +# Extension #116 - skipped +# +############################################################################### + +############################################################################### +# +# Extension #117 +# EXT_light_texture commands +# +############################################################################### + +# Spec entries to be written +ApplyTextureEXT(mode) + return void + param mode LightTextureModeEXT in value + category EXT_light_texture + version 1.1 + glxropcode ? + offset ? + +TextureLightEXT(pname) + return void + param pname LightTexturePNameEXT in value + category EXT_light_texture + version 1.1 + glxropcode ? + offset ? + +TextureMaterialEXT(face, mode) + return void + param face MaterialFace in value + param mode MaterialParameter in value + category EXT_light_texture + version 1.1 + glxropcode ? + offset ? + +############################################################################### +# +# Extension #118 - skipped +# +############################################################################### + +############################################################################### +# +# Extension #119 +# SGIX_blend_alpha_minmax commands +# +############################################################################### + +# (none) +newcategory: SGIX_blend_alpha_minmax + +############################################################################### +# +# Extension #120 - skipped +# Extension #121 - skipped +# Extension #122 - skipped +# Extension #123 - skipped +# Extension #124 - skipped +# Extension #125 - skipped +# Extension #126 - skipped +# Extension #127 - skipped +# Extension #128 - skipped +# +############################################################################### + +############################################################################### +# +# Extension #129 +# EXT_bgra commands +# +############################################################################### + +# (none) +newcategory: EXT_bgra + +############################################################################### +# +# Extension #130 - skipped +# Extension #131 - skipped +# +############################################################################### + +############################################################################### +# +# Extension #132 +# SGIX_async commands +# +############################################################################### + +AsyncMarkerSGIX(marker) + return void + param marker UInt32 in value + category SGIX_async + version 1.0 + glxflags ignore + extension + offset ? + +FinishAsyncSGIX(markerp) + return Int32 + param markerp UInt32 out array [1] + category SGIX_async + version 1.0 + dlflags notlistable + glxflags ignore + extension + offset ? + +PollAsyncSGIX(markerp) + return Int32 + param markerp UInt32 out array [1] + category SGIX_async + version 1.0 + dlflags notlistable + glxflags ignore + extension + offset ? + +GenAsyncMarkersSGIX(range) + return UInt32 + param range SizeI in value + category SGIX_async + version 1.0 + dlflags notlistable + glxflags ignore + extension + offset ? + +DeleteAsyncMarkersSGIX(marker, range) + return void + param marker UInt32 in value + param range SizeI in value + category SGIX_async + version 1.0 + dlflags notlistable + glxflags ignore + extension + offset ? + +IsAsyncMarkerSGIX(marker) + return Boolean + param marker UInt32 in value + category SGIX_async + version 1.0 + dlflags notlistable + glxflags ignore + extension + offset ? + +############################################################################### +# +# Extension #133 +# SGIX_async_pixel commands +# +############################################################################### + +# (none) +newcategory: SGIX_async_pixel + +############################################################################### +# +# Extension #134 +# SGIX_async_histogram commands +# +############################################################################### + +# (none) +newcategory: SGIX_async_histogram + +############################################################################### +# +# Extension #135 - skipped (INTEL_texture_scissor was never implemented) +# +############################################################################### + +############################################################################### +# +# Extension #136 +# INTEL_parallel_arrays commands +# +############################################################################### + +VertexPointervINTEL(size, type, pointer) + return void + param size Int32 in value + param type VertexPointerType in value + param pointer VoidPointer in array [4] retained + category INTEL_parallel_arrays + dlflags notlistable + glxflags client-handcode server-handcode EXT + version 1.1 + offset ? + +NormalPointervINTEL(type, pointer) + return void + param type NormalPointerType in value + param pointer VoidPointer in array [4] retained + category INTEL_parallel_arrays + dlflags notlistable + glxflags client-handcode server-handcode EXT + version 1.1 + offset ? + +ColorPointervINTEL(size, type, pointer) + return void + param size Int32 in value + param type VertexPointerType in value + param pointer VoidPointer in array [4] retained + category INTEL_parallel_arrays + dlflags notlistable + glxflags client-handcode server-handcode EXT + version 1.1 + offset ? + +TexCoordPointervINTEL(size, type, pointer) + return void + param size Int32 in value + param type VertexPointerType in value + param pointer VoidPointer in array [4] retained + category INTEL_parallel_arrays + dlflags notlistable + glxflags client-handcode server-handcode EXT + version 1.1 + offset ? + + +############################################################################### +# +# Extension #137 +# HP_occlusion_test commands +# +############################################################################### + +# (none) +newcategory: HP_occlusion_test + +############################################################################### +# +# Extension #138 +# EXT_pixel_transform commands +# +############################################################################### + +PixelTransformParameteriEXT(target, pname, param) + return void + param target PixelTransformTargetEXT in value + param pname PixelTransformPNameEXT in value + param param Int32 in value + category EXT_pixel_transform + version 1.1 + glxropcode ? + offset ? + +PixelTransformParameterfEXT(target, pname, param) + return void + param target PixelTransformTargetEXT in value + param pname PixelTransformPNameEXT in value + param param Float32 in value + category EXT_pixel_transform + version 1.1 + glxropcode ? + offset ? + +PixelTransformParameterivEXT(target, pname, params) + return void + param target PixelTransformTargetEXT in value + param pname PixelTransformPNameEXT in value + param params Int32 in array [1] + category EXT_pixel_transform + version 1.1 + glxropcode ? + offset ? + +PixelTransformParameterfvEXT(target, pname, params) + return void + param target PixelTransformTargetEXT in value + param pname PixelTransformPNameEXT in value + param params Float32 in array [1] + category EXT_pixel_transform + version 1.1 + glxropcode ? + offset ? + +############################################################################### +# +# Extension #139 +# EXT_pixel_transform_color_table commands +# +############################################################################### + +# (none) +newcategory: EXT_pixel_transform_color_table + +############################################################################### +# +# Extension #140 - skipped +# +############################################################################### + +############################################################################### +# +# Extension #141 +# EXT_shared_texture_palette commands +# +############################################################################### + +# (none) +newcategory: EXT_shared_texture_palette + +############################################################################### +# +# Extension #142 - GLX_SGIS_blended_overlay +# Extension #143 - GLX_SGIS_shared_multisample +# +############################################################################### + +############################################################################### +# +# Extension #144 +# EXT_separate_specular_color commands +# +############################################################################### + +# (none) +newcategory: EXT_separate_specular_color + +############################################################################### +# +# Extension #145 +# EXT_secondary_color commands +# +############################################################################### + +SecondaryColor3bEXT(red, green, blue) + return void + param red ColorB in value + param green ColorB in value + param blue ColorB in value + category EXT_secondary_color + vectorequiv SecondaryColor3bvEXT + version 1.1 + alias SecondaryColor3b + +SecondaryColor3bvEXT(v) + return void + param v ColorB in array [3] + category EXT_secondary_color + version 1.1 + glxropcode 4126 + alias SecondaryColor3bv + +SecondaryColor3dEXT(red, green, blue) + return void + param red ColorD in value + param green ColorD in value + param blue ColorD in value + category EXT_secondary_color + vectorequiv SecondaryColor3dvEXT + version 1.1 + alias SecondaryColor3d + +SecondaryColor3dvEXT(v) + return void + param v ColorD in array [3] + category EXT_secondary_color + version 1.1 + glxropcode 4130 + alias SecondaryColor3dv + +SecondaryColor3fEXT(red, green, blue) + return void + param red ColorF in value + param green ColorF in value + param blue ColorF in value + category EXT_secondary_color + vectorequiv SecondaryColor3fvEXT + version 1.1 + alias SecondaryColor3f + +SecondaryColor3fvEXT(v) + return void + param v ColorF in array [3] + category EXT_secondary_color + version 1.1 + glxropcode 4129 + alias SecondaryColor3fv + +SecondaryColor3iEXT(red, green, blue) + return void + param red ColorI in value + param green ColorI in value + param blue ColorI in value + category EXT_secondary_color + vectorequiv SecondaryColor3ivEXT + version 1.1 + alias SecondaryColor3i + +SecondaryColor3ivEXT(v) + return void + param v ColorI in array [3] + category EXT_secondary_color + version 1.1 + glxropcode 4128 + offset 568 + alias SecondaryColor3iv + +SecondaryColor3sEXT(red, green, blue) + return void + param red ColorS in value + param green ColorS in value + param blue ColorS in value + category EXT_secondary_color + vectorequiv SecondaryColor3svEXT + version 1.1 + alias SecondaryColor3s + +SecondaryColor3svEXT(v) + return void + param v ColorS in array [3] + category EXT_secondary_color + version 1.1 + glxropcode 4127 + alias SecondaryColor3sv + +SecondaryColor3ubEXT(red, green, blue) + return void + param red ColorUB in value + param green ColorUB in value + param blue ColorUB in value + category EXT_secondary_color + vectorequiv SecondaryColor3ubvEXT + version 1.1 + alias SecondaryColor3ub + +SecondaryColor3ubvEXT(v) + return void + param v ColorUB in array [3] + category EXT_secondary_color + version 1.1 + glxropcode 4131 + alias SecondaryColor3ubv + +SecondaryColor3uiEXT(red, green, blue) + return void + param red ColorUI in value + param green ColorUI in value + param blue ColorUI in value + category EXT_secondary_color + vectorequiv SecondaryColor3uivEXT + version 1.1 + alias SecondaryColor3ui + +SecondaryColor3uivEXT(v) + return void + param v ColorUI in array [3] + category EXT_secondary_color + version 1.1 + glxropcode 4133 + alias SecondaryColor3uiv + +SecondaryColor3usEXT(red, green, blue) + return void + param red ColorUS in value + param green ColorUS in value + param blue ColorUS in value + category EXT_secondary_color + vectorequiv SecondaryColor3usvEXT + version 1.1 + alias SecondaryColor3us + +SecondaryColor3usvEXT(v) + return void + param v ColorUS in array [3] + category EXT_secondary_color + version 1.1 + glxropcode 4132 + alias SecondaryColor3usv + +SecondaryColorPointerEXT(size, type, stride, pointer) + return void + param size Int32 in value + param type ColorPointerType in value + param stride SizeI in value + param pointer Void in array [COMPSIZE(size/type/stride)] retained + category EXT_secondary_color + dlflags notlistable + glxflags client-handcode server-handcode EXT + version 1.1 + extension + alias SecondaryColorPointer + +############################################################################### +# +# Extension #146 +# EXT_texture_env commands +# +############################################################################### + +# Dead extension - never implemented (removed from registry!) +# (none) +# newcategory: EXT_texture_env + +############################################################################### +# +# Extension #147 +# EXT_texture_perturb_normal commands +# +############################################################################### + +TextureNormalEXT(mode) + return void + param mode TextureNormalModeEXT in value + category EXT_texture_perturb_normal + version 1.1 + glxropcode ? + offset ? + +############################################################################### +# +# Extension #148 +# EXT_multi_draw_arrays commands +# +############################################################################### + +# first and count are really 'in' +MultiDrawArraysEXT(mode, first, count, primcount) + return void + param mode BeginMode in value + param first Int32 out array [COMPSIZE(primcount)] + param count SizeI out array [COMPSIZE(primcount)] + param primcount SizeI in value + category EXT_multi_draw_arrays + version 1.1 + glxropcode ? + alias MultiDrawArrays + +MultiDrawElementsEXT(mode, count, type, indices, primcount) + return void + param mode BeginMode in value + param count SizeI in array [COMPSIZE(primcount)] + param type DrawElementsType in value + param indices VoidPointer in array [COMPSIZE(primcount)] + param primcount SizeI in value + category EXT_multi_draw_arrays + version 1.1 + glxropcode ? + alias MultiDrawElements + +############################################################################### +# +# Extension #149 +# EXT_fog_coord commands +# +############################################################################### + +FogCoordfEXT(coord) + return void + param coord CoordF in value + category EXT_fog_coord + vectorequiv FogCoordfvEXT + version 1.1 + alias FogCoordf + +FogCoordfvEXT(coord) + return void + param coord CoordF in array [1] + category EXT_fog_coord + version 1.1 + glxropcode 4124 + alias FogCoordfv + +FogCoorddEXT(coord) + return void + param coord CoordD in value + category EXT_fog_coord + vectorequiv FogCoorddvEXT + version 1.1 + alias FogCoordd + +FogCoorddvEXT(coord) + return void + param coord CoordD in array [1] + category EXT_fog_coord + version 1.1 + glxropcode 4125 + alias FogCoorddv + +FogCoordPointerEXT(type, stride, pointer) + return void + param type FogPointerTypeEXT in value + param stride SizeI in value + param pointer Void in array [COMPSIZE(type/stride)] retained + category EXT_fog_coord + dlflags notlistable + version 1.1 + glxflags client-handcode server-handcode EXT + alias FogCoordPointer + +############################################################################### +# +# Extension #150 - skipped +# Extension #151 - skipped +# Extension #152 - skipped +# Extension #153 - skipped +# Extension #154 - skipped +# +############################################################################### + +############################################################################### +# +# Extension #155 +# REND_screen_coordinates commands +# +############################################################################### + +# (none) +newcategory: REND_screen_coordinates + +############################################################################### +# +# Extension #156 +# EXT_coordinate_frame commands +# +############################################################################### + +Tangent3bEXT(tx, ty, tz) + return void + param tx Int8 in value + param ty Int8 in value + param tz Int8 in value + category EXT_coordinate_frame + vectorequiv Tangent3bvEXT + version 1.1 + offset ? + +Tangent3bvEXT(v) + return void + param v Int8 in array [3] + category EXT_coordinate_frame + version 1.1 + glxropcode ? + offset ? + +Tangent3dEXT(tx, ty, tz) + return void + param tx CoordD in value + param ty CoordD in value + param tz CoordD in value + category EXT_coordinate_frame + vectorequiv Tangent3dvEXT + version 1.1 + offset ? + +Tangent3dvEXT(v) + return void + param v CoordD in array [3] + category EXT_coordinate_frame + version 1.1 + glxropcode ? + offset ? + +Tangent3fEXT(tx, ty, tz) + return void + param tx CoordF in value + param ty CoordF in value + param tz CoordF in value + category EXT_coordinate_frame + vectorequiv Tangent3fvEXT + version 1.1 + offset ? + +Tangent3fvEXT(v) + return void + param v CoordF in array [3] + category EXT_coordinate_frame + version 1.1 + glxropcode ? + offset ? + +Tangent3iEXT(tx, ty, tz) + return void + param tx Int32 in value + param ty Int32 in value + param tz Int32 in value + category EXT_coordinate_frame + vectorequiv Tangent3ivEXT + version 1.1 + offset ? + +Tangent3ivEXT(v) + return void + param v Int32 in array [3] + category EXT_coordinate_frame + version 1.1 + glxropcode ? + offset ? + +Tangent3sEXT(tx, ty, tz) + return void + param tx Int16 in value + param ty Int16 in value + param tz Int16 in value + category EXT_coordinate_frame + vectorequiv Tangent3svEXT + version 1.1 + offset ? + +Tangent3svEXT(v) + return void + param v Int16 in array [3] + category EXT_coordinate_frame + version 1.1 + glxropcode ? + offset ? + +Binormal3bEXT(bx, by, bz) + return void + param bx Int8 in value + param by Int8 in value + param bz Int8 in value + category EXT_coordinate_frame + vectorequiv Binormal3bvEXT + version 1.1 + offset ? + +Binormal3bvEXT(v) + return void + param v Int8 in array [3] + category EXT_coordinate_frame + version 1.1 + glxropcode ? + offset ? + +Binormal3dEXT(bx, by, bz) + return void + param bx CoordD in value + param by CoordD in value + param bz CoordD in value + category EXT_coordinate_frame + vectorequiv Binormal3dvEXT + version 1.1 + offset ? + +Binormal3dvEXT(v) + return void + param v CoordD in array [3] + category EXT_coordinate_frame + version 1.1 + glxropcode ? + offset ? + +Binormal3fEXT(bx, by, bz) + return void + param bx CoordF in value + param by CoordF in value + param bz CoordF in value + category EXT_coordinate_frame + vectorequiv Binormal3fvEXT + version 1.1 + offset ? + +Binormal3fvEXT(v) + return void + param v CoordF in array [3] + category EXT_coordinate_frame + version 1.1 + glxropcode ? + offset ? + +Binormal3iEXT(bx, by, bz) + return void + param bx Int32 in value + param by Int32 in value + param bz Int32 in value + category EXT_coordinate_frame + vectorequiv Binormal3ivEXT + version 1.1 + offset ? + +Binormal3ivEXT(v) + return void + param v Int32 in array [3] + category EXT_coordinate_frame + version 1.1 + glxropcode ? + offset ? + +Binormal3sEXT(bx, by, bz) + return void + param bx Int16 in value + param by Int16 in value + param bz Int16 in value + category EXT_coordinate_frame + vectorequiv Binormal3svEXT + version 1.1 + offset ? + +Binormal3svEXT(v) + return void + param v Int16 in array [3] + category EXT_coordinate_frame + version 1.1 + glxropcode ? + offset ? + +TangentPointerEXT(type, stride, pointer) + return void + param type TangentPointerTypeEXT in value + param stride SizeI in value + param pointer Void in array [COMPSIZE(type/stride)] retained + category EXT_coordinate_frame + dlflags notlistable + glxflags client-handcode client-intercept server-handcode + version 1.1 + offset ? + +BinormalPointerEXT(type, stride, pointer) + return void + param type BinormalPointerTypeEXT in value + param stride SizeI in value + param pointer Void in array [COMPSIZE(type/stride)] retained + category EXT_coordinate_frame + dlflags notlistable + glxflags client-handcode client-intercept server-handcode + version 1.1 + offset ? + +############################################################################### +# +# Extension #157 - skipped +# +############################################################################### + +############################################################################### +# +# Extension #158 +# EXT_texture_env_combine commands +# +############################################################################### + +# (none) +newcategory: EXT_texture_env_combine + +############################################################################### +# +# Extension #159 +# APPLE_specular_vector commands +# +############################################################################### + +# (none) +newcategory: APPLE_specular_vector + +############################################################################### +# +# Extension #160 +# APPLE_transform_hint commands +# +############################################################################### + +# (none) +newcategory: APPLE_transform_hint + +############################################################################### +# +# Extension #161 +# SGIX_fog_scale commands +# +############################################################################### + +# (none) +newcategory: SGIX_fog_scale + +############################################################################### +# +# Extension #162 - skipped +# +############################################################################### + +############################################################################### +# +# Extension #163 +# SUNX_constant_data commands +# +############################################################################### + +FinishTextureSUNX() + return void + category SUNX_constant_data + version 1.1 + glxropcode ? + offset ? + +############################################################################### +# +# Extension #164 +# SUN_global_alpha commands +# +############################################################################### + +GlobalAlphaFactorbSUN(factor) + return void + param factor Int8 in value + category SUN_global_alpha + version 1.1 + glxropcode ? + offset ? + +GlobalAlphaFactorsSUN(factor) + return void + param factor Int16 in value + category SUN_global_alpha + version 1.1 + glxropcode ? + offset ? + +GlobalAlphaFactoriSUN(factor) + return void + param factor Int32 in value + category SUN_global_alpha + version 1.1 + glxropcode ? + offset ? + +GlobalAlphaFactorfSUN(factor) + return void + param factor Float32 in value + category SUN_global_alpha + version 1.1 + glxropcode ? + offset ? + +GlobalAlphaFactordSUN(factor) + return void + param factor Float64 in value + category SUN_global_alpha + version 1.1 + glxropcode ? + offset ? + +GlobalAlphaFactorubSUN(factor) + return void + param factor UInt8 in value + category SUN_global_alpha + version 1.1 + glxropcode ? + offset ? + +GlobalAlphaFactorusSUN(factor) + return void + param factor UInt16 in value + category SUN_global_alpha + version 1.1 + glxropcode ? + offset ? + +GlobalAlphaFactoruiSUN(factor) + return void + param factor UInt32 in value + category SUN_global_alpha + version 1.1 + glxropcode ? + offset ? + +############################################################################### +# +# Extension #165 +# SUN_triangle_list commands +# +############################################################################### + +ReplacementCodeuiSUN(code) + return void + param code UInt32 in value + category SUN_triangle_list + version 1.1 + glxropcode ? + offset ? + +ReplacementCodeusSUN(code) + return void + param code UInt16 in value + category SUN_triangle_list + version 1.1 + glxropcode ? + offset ? + +ReplacementCodeubSUN(code) + return void + param code UInt8 in value + category SUN_triangle_list + version 1.1 + glxropcode ? + offset ? + +ReplacementCodeuivSUN(code) + return void + param code UInt32 in array [COMPSIZE()] + category SUN_triangle_list + version 1.1 + glxropcode ? + offset ? + +ReplacementCodeusvSUN(code) + return void + param code UInt16 in array [COMPSIZE()] + category SUN_triangle_list + version 1.1 + glxropcode ? + offset ? + +ReplacementCodeubvSUN(code) + return void + param code UInt8 in array [COMPSIZE()] + category SUN_triangle_list + version 1.1 + glxropcode ? + offset ? + +ReplacementCodePointerSUN(type, stride, pointer) + return void + param type ReplacementCodeTypeSUN in value + param stride SizeI in value + param pointer VoidPointer in array [COMPSIZE(type/stride)] retained + category SUN_triangle_list + version 1.1 + glxropcode ? + offset ? + +############################################################################### +# +# Extension #166 +# SUN_vertex commands +# +############################################################################### + +Color4ubVertex2fSUN(r, g, b, a, x, y) + return void + param r UInt8 in value + param g UInt8 in value + param b UInt8 in value + param a UInt8 in value + param x Float32 in value + param y Float32 in value + category SUN_vertex + version 1.1 + glxropcode ? + offset ? + +Color4ubVertex2fvSUN(c, v) + return void + param c UInt8 in array [4] + param v Float32 in array [2] + category SUN_vertex + version 1.1 + glxropcode ? + offset ? + +Color4ubVertex3fSUN(r, g, b, a, x, y, z) + return void + param r UInt8 in value + param g UInt8 in value + param b UInt8 in value + param a UInt8 in value + param x Float32 in value + param y Float32 in value + param z Float32 in value + category SUN_vertex + version 1.1 + glxropcode ? + offset ? + +Color4ubVertex3fvSUN(c, v) + return void + param c UInt8 in array [4] + param v Float32 in array [3] + category SUN_vertex + version 1.1 + glxropcode ? + offset ? + +Color3fVertex3fSUN(r, g, b, x, y, z) + return void + param r Float32 in value + param g Float32 in value + param b Float32 in value + param x Float32 in value + param y Float32 in value + param z Float32 in value + category SUN_vertex + version 1.1 + glxropcode ? + offset ? + +Color3fVertex3fvSUN(c, v) + return void + param c Float32 in array [3] + param v Float32 in array [3] + category SUN_vertex + version 1.1 + glxropcode ? + offset ? + +Normal3fVertex3fSUN(nx, ny, nz, x, y, z) + return void + param nx Float32 in value + param ny Float32 in value + param nz Float32 in value + param x Float32 in value + param y Float32 in value + param z Float32 in value + category SUN_vertex + version 1.1 + glxropcode ? + offset ? + +Normal3fVertex3fvSUN(n, v) + return void + param n Float32 in array [3] + param v Float32 in array [3] + category SUN_vertex + version 1.1 + glxropcode ? + offset ? + +Color4fNormal3fVertex3fSUN(r, g, b, a, nx, ny, nz, x, y, z) + return void + param r Float32 in value + param g Float32 in value + param b Float32 in value + param a Float32 in value + param nx Float32 in value + param ny Float32 in value + param nz Float32 in value + param x Float32 in value + param y Float32 in value + param z Float32 in value + category SUN_vertex + version 1.1 + glxropcode ? + offset ? + +Color4fNormal3fVertex3fvSUN(c, n, v) + return void + param c Float32 in array [4] + param n Float32 in array [3] + param v Float32 in array [3] + category SUN_vertex + version 1.1 + glxropcode ? + offset ? + +TexCoord2fVertex3fSUN(s, t, x, y, z) + return void + param s Float32 in value + param t Float32 in value + param x Float32 in value + param y Float32 in value + param z Float32 in value + category SUN_vertex + version 1.1 + glxropcode ? + offset ? + +TexCoord2fVertex3fvSUN(tc, v) + return void + param tc Float32 in array [2] + param v Float32 in array [3] + category SUN_vertex + version 1.1 + glxropcode ? + offset ? + +TexCoord4fVertex4fSUN(s, t, p, q, x, y, z, w) + return void + param s Float32 in value + param t Float32 in value + param p Float32 in value + param q Float32 in value + param x Float32 in value + param y Float32 in value + param z Float32 in value + param w Float32 in value + category SUN_vertex + version 1.1 + glxropcode ? + offset ? + +TexCoord4fVertex4fvSUN(tc, v) + return void + param tc Float32 in array [4] + param v Float32 in array [4] + category SUN_vertex + version 1.1 + glxropcode ? + offset ? + +TexCoord2fColor4ubVertex3fSUN(s, t, r, g, b, a, x, y, z) + return void + param s Float32 in value + param t Float32 in value + param r UInt8 in value + param g UInt8 in value + param b UInt8 in value + param a UInt8 in value + param x Float32 in value + param y Float32 in value + param z Float32 in value + category SUN_vertex + version 1.1 + glxropcode ? + offset ? + +TexCoord2fColor4ubVertex3fvSUN(tc, c, v) + return void + param tc Float32 in array [2] + param c UInt8 in array [4] + param v Float32 in array [3] + category SUN_vertex + version 1.1 + glxropcode ? + offset ? + +TexCoord2fColor3fVertex3fSUN(s, t, r, g, b, x, y, z) + return void + param s Float32 in value + param t Float32 in value + param r Float32 in value + param g Float32 in value + param b Float32 in value + param x Float32 in value + param y Float32 in value + param z Float32 in value + category SUN_vertex + version 1.1 + glxropcode ? + offset ? + +TexCoord2fColor3fVertex3fvSUN(tc, c, v) + return void + param tc Float32 in array [2] + param c Float32 in array [3] + param v Float32 in array [3] + category SUN_vertex + version 1.1 + glxropcode ? + offset ? + +TexCoord2fNormal3fVertex3fSUN(s, t, nx, ny, nz, x, y, z) + return void + param s Float32 in value + param t Float32 in value + param nx Float32 in value + param ny Float32 in value + param nz Float32 in value + param x Float32 in value + param y Float32 in value + param z Float32 in value + category SUN_vertex + version 1.1 + glxropcode ? + offset ? + +TexCoord2fNormal3fVertex3fvSUN(tc, n, v) + return void + param tc Float32 in array [2] + param n Float32 in array [3] + param v Float32 in array [3] + category SUN_vertex + version 1.1 + glxropcode ? + offset ? + +TexCoord2fColor4fNormal3fVertex3fSUN(s, t, r, g, b, a, nx, ny, nz, x, y, z) + return void + param s Float32 in value + param t Float32 in value + param r Float32 in value + param g Float32 in value + param b Float32 in value + param a Float32 in value + param nx Float32 in value + param ny Float32 in value + param nz Float32 in value + param x Float32 in value + param y Float32 in value + param z Float32 in value + category SUN_vertex + version 1.1 + glxropcode ? + offset ? + +TexCoord2fColor4fNormal3fVertex3fvSUN(tc, c, n, v) + return void + param tc Float32 in array [2] + param c Float32 in array [4] + param n Float32 in array [3] + param v Float32 in array [3] + category SUN_vertex + version 1.1 + glxropcode ? + offset ? + +TexCoord4fColor4fNormal3fVertex4fSUN(s, t, p, q, r, g, b, a, nx, ny, nz, x, y, z, w) + return void + param s Float32 in value + param t Float32 in value + param p Float32 in value + param q Float32 in value + param r Float32 in value + param g Float32 in value + param b Float32 in value + param a Float32 in value + param nx Float32 in value + param ny Float32 in value + param nz Float32 in value + param x Float32 in value + param y Float32 in value + param z Float32 in value + param w Float32 in value + category SUN_vertex + version 1.1 + glxropcode ? + offset ? + +TexCoord4fColor4fNormal3fVertex4fvSUN(tc, c, n, v) + return void + param tc Float32 in array [4] + param c Float32 in array [4] + param n Float32 in array [3] + param v Float32 in array [4] + category SUN_vertex + version 1.1 + glxropcode ? + offset ? + +ReplacementCodeuiVertex3fSUN(rc, x, y, z) + return void + param rc ReplacementCodeSUN in value + param x Float32 in value + param y Float32 in value + param z Float32 in value + category SUN_vertex + version 1.1 + glxropcode ? + offset ? + +ReplacementCodeuiVertex3fvSUN(rc, v) + return void + param rc ReplacementCodeSUN in array [1] + param v Float32 in array [3] + category SUN_vertex + version 1.1 + glxropcode ? + offset ? + +ReplacementCodeuiColor4ubVertex3fSUN(rc, r, g, b, a, x, y, z) + return void + param rc ReplacementCodeSUN in value + param r UInt8 in value + param g UInt8 in value + param b UInt8 in value + param a UInt8 in value + param x Float32 in value + param y Float32 in value + param z Float32 in value + category SUN_vertex + version 1.1 + glxropcode ? + offset ? + +ReplacementCodeuiColor4ubVertex3fvSUN(rc, c, v) + return void + param rc ReplacementCodeSUN in array [1] + param c UInt8 in array [4] + param v Float32 in array [3] + category SUN_vertex + version 1.1 + glxropcode ? + offset ? + +ReplacementCodeuiColor3fVertex3fSUN(rc, r, g, b, x, y, z) + return void + param rc ReplacementCodeSUN in value + param r Float32 in value + param g Float32 in value + param b Float32 in value + param x Float32 in value + param y Float32 in value + param z Float32 in value + category SUN_vertex + version 1.1 + glxropcode ? + offset ? + +ReplacementCodeuiColor3fVertex3fvSUN(rc, c, v) + return void + param rc ReplacementCodeSUN in array [1] + param c Float32 in array [3] + param v Float32 in array [3] + category SUN_vertex + version 1.1 + glxropcode ? + offset ? + +ReplacementCodeuiNormal3fVertex3fSUN(rc, nx, ny, nz, x, y, z) + return void + param rc ReplacementCodeSUN in value + param nx Float32 in value + param ny Float32 in value + param nz Float32 in value + param x Float32 in value + param y Float32 in value + param z Float32 in value + category SUN_vertex + version 1.1 + glxropcode ? + offset ? + +ReplacementCodeuiNormal3fVertex3fvSUN(rc, n, v) + return void + param rc ReplacementCodeSUN in array [1] + param n Float32 in array [3] + param v Float32 in array [3] + category SUN_vertex + version 1.1 + glxropcode ? + offset ? + +ReplacementCodeuiColor4fNormal3fVertex3fSUN(rc, r, g, b, a, nx, ny, nz, x, y, z) + return void + param rc ReplacementCodeSUN in value + param r Float32 in value + param g Float32 in value + param b Float32 in value + param a Float32 in value + param nx Float32 in value + param ny Float32 in value + param nz Float32 in value + param x Float32 in value + param y Float32 in value + param z Float32 in value + category SUN_vertex + version 1.1 + glxropcode ? + offset ? + +ReplacementCodeuiColor4fNormal3fVertex3fvSUN(rc, c, n, v) + return void + param rc ReplacementCodeSUN in array [1] + param c Float32 in array [4] + param n Float32 in array [3] + param v Float32 in array [3] + category SUN_vertex + version 1.1 + glxropcode ? + offset ? + +ReplacementCodeuiTexCoord2fVertex3fSUN(rc, s, t, x, y, z) + return void + param rc ReplacementCodeSUN in value + param s Float32 in value + param t Float32 in value + param x Float32 in value + param y Float32 in value + param z Float32 in value + category SUN_vertex + version 1.1 + glxropcode ? + offset ? + +ReplacementCodeuiTexCoord2fVertex3fvSUN(rc, tc, v) + return void + param rc ReplacementCodeSUN in array [1] + param tc Float32 in array [2] + param v Float32 in array [3] + category SUN_vertex + version 1.1 + glxropcode ? + offset ? + +ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN(rc, s, t, nx, ny, nz, x, y, z) + return void + param rc ReplacementCodeSUN in value + param s Float32 in value + param t Float32 in value + param nx Float32 in value + param ny Float32 in value + param nz Float32 in value + param x Float32 in value + param y Float32 in value + param z Float32 in value + category SUN_vertex + version 1.1 + glxropcode ? + offset ? + +ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN(rc, tc, n, v) + return void + param rc ReplacementCodeSUN in array [1] + param tc Float32 in array [2] + param n Float32 in array [3] + param v Float32 in array [3] + category SUN_vertex + version 1.1 + glxropcode ? + offset ? + +ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN(rc, s, t, r, g, b, a, nx, ny, nz, x, y, z) + return void + param rc ReplacementCodeSUN in value + param s Float32 in value + param t Float32 in value + param r Float32 in value + param g Float32 in value + param b Float32 in value + param a Float32 in value + param nx Float32 in value + param ny Float32 in value + param nz Float32 in value + param x Float32 in value + param y Float32 in value + param z Float32 in value + category SUN_vertex + version 1.1 + glxropcode ? + offset ? + +ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN(rc, tc, c, n, v) + return void + param rc ReplacementCodeSUN in array [1] + param tc Float32 in array [2] + param c Float32 in array [4] + param n Float32 in array [3] + param v Float32 in array [3] + category SUN_vertex + version 1.1 + glxropcode ? + offset ? + +############################################################################### +# +# Extension #167 - WGL_EXT_display_color_table +# Extension #168 - WGL_EXT_extensions_string +# Extension #169 - WGL_EXT_make_current_read +# Extension #170 - WGL_EXT_pixel_format +# Extension #171 - WGL_EXT_pbuffer +# Extension #172 - WGL_EXT_swap_control +# +############################################################################### + +############################################################################### +# +# Extension #173 +# EXT_blend_func_separate commands (also INGR_blend_func_separate) +# +############################################################################### + +BlendFuncSeparateEXT(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha) + return void + param sfactorRGB BlendFuncSeparateParameterEXT in value + param dfactorRGB BlendFuncSeparateParameterEXT in value + param sfactorAlpha BlendFuncSeparateParameterEXT in value + param dfactorAlpha BlendFuncSeparateParameterEXT in value + category EXT_blend_func_separate + glxropcode 4134 + version 1.0 + extension + alias BlendFuncSeparate + +BlendFuncSeparateINGR(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha) + return void + param sfactorRGB BlendFuncSeparateParameterEXT in value + param dfactorRGB BlendFuncSeparateParameterEXT in value + param sfactorAlpha BlendFuncSeparateParameterEXT in value + param dfactorAlpha BlendFuncSeparateParameterEXT in value + category INGR_blend_func_separate + glxropcode 4134 + version 1.0 + extension + alias BlendFuncSeparateEXT + +############################################################################### +# +# Extension #174 +# INGR_color_clamp commands +# +############################################################################### + +# (none) +newcategory: INGR_color_clamp + +############################################################################### +# +# Extension #175 +# INGR_interlace_read commands +# +############################################################################### + +# (none) +newcategory: INGR_interlace_read + +############################################################################### +# +# Extension #176 +# EXT_stencil_wrap commands +# +############################################################################### + +# (none) +newcategory: EXT_stencil_wrap + +############################################################################### +# +# Extension #177 - skipped +# +############################################################################### + +############################################################################### +# +# Extension #178 +# EXT_422_pixels commands +# +############################################################################### + +# (none) +newcategory: EXT_422_pixels + +############################################################################### +# +# Extension #179 +# NV_texgen_reflection commands +# +############################################################################### + +# (none) +newcategory: NV_texgen_reflection + +############################################################################### +# +# Extension #??? +# @ EXT_texture_cube_map commands +# +############################################################################### + +# (none) + +############################################################################### +# +# Extension #180 - skipped +# Extension #181 - skipped +# +############################################################################### + +############################################################################### +# +# Extension #182 +# SUN_convolution_border_modes commands +# +############################################################################### + +# (none) +newcategory: SUN_convolution_border_modes + +############################################################################### +# +# Extension #183 - GLX_SUN_get_transparent_index +# Extension #184 - skipped +# +############################################################################### + +############################################################################### +# +# Extension #185 +# EXT_texture_env_add commands +# +############################################################################### + +# (none) +newcategory: EXT_texture_env_add + +############################################################################### +# +# Extension #186 +# EXT_texture_lod_bias commands +# +############################################################################### + +# (none) +newcategory: EXT_texture_lod_bias + +############################################################################### +# +# Extension #187 +# EXT_texture_filter_anisotropic commands +# +############################################################################### + +# (none) +newcategory: EXT_texture_filter_anisotropic + +############################################################################### +# +# Extension #188 +# EXT_vertex_weighting commands +# +############################################################################### + +# GLX stuff to be written +VertexWeightfEXT(weight) + return void + param weight Float32 in value + category EXT_vertex_weighting + vectorequiv VertexWeightfvEXT + version 1.1 + extension soft WINSOFT NV10 + glxflags ignore + offset 494 + +VertexWeightfvEXT(weight) + return void + param weight Float32 in array [1] + category EXT_vertex_weighting + version 1.1 + extension soft WINSOFT NV10 + glxropcode 4135 + glxflags ignore + offset 495 + +VertexWeightPointerEXT(size, type, stride, pointer) + return void + param size SizeI in value + param type VertexWeightPointerTypeEXT in value + param stride SizeI in value + param pointer Void in array [COMPSIZE(type/stride)] retained + category EXT_vertex_weighting + version 1.1 + extension soft WINSOFT NV10 + dlflags notlistable + glxflags ignore + offset 496 + +############################################################################### +# +# Extension #189 +# NV_light_max_exponent commands +# +############################################################################### + +# (none) +newcategory: NV_light_max_exponent + +############################################################################### +# +# Extension #190 +# NV_vertex_array_range commands +# +############################################################################### + +FlushVertexArrayRangeNV() + return void + category NV_vertex_array_range + version 1.1 + extension soft WINSOFT NV10 + dlflags notlistable + glxflags client-handcode server-handcode ignore + offset 497 + +VertexArrayRangeNV(length, pointer) + return void + param length SizeI in value + param pointer Void in array [COMPSIZE(length)] retained + category NV_vertex_array_range + version 1.1 + extension soft WINSOFT NV10 + dlflags notlistable + glxflags client-handcode server-handcode ignore + offset 498 + +############################################################################### +# +# Extension #191 +# NV_register_combiners commands +# +############################################################################### + +CombinerParameterfvNV(pname, params) + return void + param pname CombinerParameterNV in value + param params CheckedFloat32 in array [COMPSIZE(pname)] + category NV_register_combiners + version 1.1 + extension soft WINSOFT NV10 + glxropcode 4137 + glxflags ignore + offset 499 + +CombinerParameterfNV(pname, param) + return void + param pname CombinerParameterNV in value + param param Float32 in value + category NV_register_combiners + version 1.1 + extension soft WINSOFT NV10 + glxropcode 4136 + glxflags ignore + offset 500 + +CombinerParameterivNV(pname, params) + return void + param pname CombinerParameterNV in value + param params CheckedInt32 in array [COMPSIZE(pname)] + category NV_register_combiners + version 1.1 + extension soft WINSOFT NV10 + glxropcode 4139 + glxflags ignore + offset 501 + +CombinerParameteriNV(pname, param) + return void + param pname CombinerParameterNV in value + param param Int32 in value + category NV_register_combiners + version 1.1 + extension soft WINSOFT NV10 + glxropcode 4138 + glxflags ignore + offset 502 + +CombinerInputNV(stage, portion, variable, input, mapping, componentUsage) + return void + param stage CombinerStageNV in value + param portion CombinerPortionNV in value + param variable CombinerVariableNV in value + param input CombinerRegisterNV in value + param mapping CombinerMappingNV in value + param componentUsage CombinerComponentUsageNV in value + category NV_register_combiners + version 1.1 + extension soft WINSOFT NV10 + glxropcode 4140 + glxflags ignore + offset 503 + +CombinerOutputNV(stage, portion, abOutput, cdOutput, sumOutput, scale, bias, abDotProduct, cdDotProduct, muxSum) + return void + param stage CombinerStageNV in value + param portion CombinerPortionNV in value + param abOutput CombinerRegisterNV in value + param cdOutput CombinerRegisterNV in value + param sumOutput CombinerRegisterNV in value + param scale CombinerScaleNV in value + param bias CombinerBiasNV in value + param abDotProduct Boolean in value + param cdDotProduct Boolean in value + param muxSum Boolean in value + category NV_register_combiners + version 1.1 + extension soft WINSOFT NV10 + glxropcode 4141 + glxflags ignore + offset 504 + +FinalCombinerInputNV(variable, input, mapping, componentUsage) + return void + param variable CombinerVariableNV in value + param input CombinerRegisterNV in value + param mapping CombinerMappingNV in value + param componentUsage CombinerComponentUsageNV in value + category NV_register_combiners + version 1.1 + extension soft WINSOFT NV10 + glxropcode 4142 + glxflags ignore + offset 505 + +GetCombinerInputParameterfvNV(stage, portion, variable, pname, params) + return void + param stage CombinerStageNV in value + param portion CombinerPortionNV in value + param variable CombinerVariableNV in value + param pname CombinerParameterNV in value + param params Float32 out array [COMPSIZE(pname)] + dlflags notlistable + category NV_register_combiners + version 1.1 + extension soft WINSOFT NV10 + glxvendorpriv 1270 + glxflags ignore + offset 506 + +GetCombinerInputParameterivNV(stage, portion, variable, pname, params) + return void + param stage CombinerStageNV in value + param portion CombinerPortionNV in value + param variable CombinerVariableNV in value + param pname CombinerParameterNV in value + param params Int32 out array [COMPSIZE(pname)] + dlflags notlistable + category NV_register_combiners + version 1.1 + extension soft WINSOFT NV10 + glxvendorpriv 1271 + glxflags ignore + offset 507 + +GetCombinerOutputParameterfvNV(stage, portion, pname, params) + return void + param stage CombinerStageNV in value + param portion CombinerPortionNV in value + param pname CombinerParameterNV in value + param params Float32 out array [COMPSIZE(pname)] + dlflags notlistable + category NV_register_combiners + version 1.1 + extension soft WINSOFT NV10 + glxvendorpriv 1272 + glxflags ignore + offset 508 + +GetCombinerOutputParameterivNV(stage, portion, pname, params) + return void + param stage CombinerStageNV in value + param portion CombinerPortionNV in value + param pname CombinerParameterNV in value + param params Int32 out array [COMPSIZE(pname)] + dlflags notlistable + category NV_register_combiners + version 1.1 + extension soft WINSOFT NV10 + glxvendorpriv 1273 + glxflags ignore + offset 509 + +GetFinalCombinerInputParameterfvNV(variable, pname, params) + return void + param variable CombinerVariableNV in value + param pname CombinerParameterNV in value + param params Float32 out array [COMPSIZE(pname)] + dlflags notlistable + category NV_register_combiners + version 1.1 + extension soft WINSOFT NV10 + glxvendorpriv 1274 + glxflags ignore + offset 510 + +GetFinalCombinerInputParameterivNV(variable, pname, params) + return void + param variable CombinerVariableNV in value + param pname CombinerParameterNV in value + param params Int32 out array [COMPSIZE(pname)] + dlflags notlistable + category NV_register_combiners + version 1.1 + extension soft WINSOFT NV10 + glxvendorpriv 1275 + glxflags ignore + offset 511 + +############################################################################### +# +# Extension #192 +# NV_fog_distance commands +# +############################################################################### + +# (none) +newcategory: NV_fog_distance + +############################################################################### +# +# Extension #193 +# NV_texgen_emboss commands +# +############################################################################### + +# (none) +newcategory: NV_texgen_emboss + +############################################################################### +# +# Extension #194 +# NV_blend_square commands +# +############################################################################### + +# (none) +newcategory: NV_blend_square + +############################################################################### +# +# Extension #195 +# NV_texture_env_combine4 commands +# +############################################################################### + +# (none) +newcategory: NV_texture_env_combine4 + +############################################################################### +# +# Extension #196 +# MESA_resize_buffers commands +# +############################################################################### + +ResizeBuffersMESA() + return void + category MESA_resize_buffers + version 1.0 + glxropcode ? + offset 512 + +############################################################################### +# +# Extension #197 +# MESA_window_pos commands +# +# Note that the 2- and 3-component versions are now aliases of ARB +# entry points. +# +############################################################################### + +WindowPos2dMESA(x, y) + return void + param x CoordD in value + param y CoordD in value + category MESA_window_pos + vectorequiv WindowPos2dvMESA + version 1.0 + alias WindowPos2dARB + +WindowPos2dvMESA(v) + return void + param v CoordD in array [2] + category MESA_window_pos + version 1.0 + glxropcode ? + alias WindowPos2dvARB + +WindowPos2fMESA(x, y) + return void + param x CoordF in value + param y CoordF in value + category MESA_window_pos + vectorequiv WindowPos2fvMESA + version 1.0 + alias WindowPos2fARB + +WindowPos2fvMESA(v) + return void + param v CoordF in array [2] + category MESA_window_pos + version 1.0 + glxropcode ? + alias WindowPos2fvARB + +WindowPos2iMESA(x, y) + return void + param x CoordI in value + param y CoordI in value + category MESA_window_pos + vectorequiv WindowPos2ivMESA + version 1.0 + alias WindowPos2iARB + +WindowPos2ivMESA(v) + return void + param v CoordI in array [2] + category MESA_window_pos + version 1.0 + glxropcode ? + alias WindowPos2ivARB + +WindowPos2sMESA(x, y) + return void + param x CoordS in value + param y CoordS in value + category MESA_window_pos + vectorequiv WindowPos2svMESA + version 1.0 + alias WindowPos2sARB + +WindowPos2svMESA(v) + return void + param v CoordS in array [2] + category MESA_window_pos + version 1.0 + glxropcode ? + alias WindowPos2svARB + +WindowPos3dMESA(x, y, z) + return void + param x CoordD in value + param y CoordD in value + param z CoordD in value + vectorequiv WindowPos3dvMESA + category MESA_window_pos + version 1.0 + alias WindowPos3dARB + +WindowPos3dvMESA(v) + return void + param v CoordD in array [3] + category MESA_window_pos + version 1.0 + glxropcode ? + alias WindowPos3dvARB + +WindowPos3fMESA(x, y, z) + return void + param x CoordF in value + param y CoordF in value + param z CoordF in value + category MESA_window_pos + vectorequiv WindowPos3fvMESA + version 1.0 + alias WindowPos3fARB + +WindowPos3fvMESA(v) + return void + param v CoordF in array [3] + category MESA_window_pos + version 1.0 + glxropcode ? + alias WindowPos3fvARB + +WindowPos3iMESA(x, y, z) + return void + param x CoordI in value + param y CoordI in value + param z CoordI in value + category MESA_window_pos + vectorequiv WindowPos3ivMESA + version 1.0 + alias WindowPos3iARB + +WindowPos3ivMESA(v) + return void + param v CoordI in array [3] + category MESA_window_pos + version 1.0 + glxropcode ? + alias WindowPos3ivARB + +WindowPos3sMESA(x, y, z) + return void + param x CoordS in value + param y CoordS in value + param z CoordS in value + category MESA_window_pos + vectorequiv WindowPos3svMESA + version 1.0 + alias WindowPos3sARB + +WindowPos3svMESA(v) + return void + param v CoordS in array [3] + category MESA_window_pos + version 1.0 + glxropcode ? + alias WindowPos3svARB + +WindowPos4dMESA(x, y, z, w) + return void + param x CoordD in value + param y CoordD in value + param z CoordD in value + param w CoordD in value + vectorequiv WindowPos4dvMESA + category MESA_window_pos + version 1.0 + offset 529 + +WindowPos4dvMESA(v) + return void + param v CoordD in array [4] + category MESA_window_pos + version 1.0 + glxropcode ? + offset 530 + +WindowPos4fMESA(x, y, z, w) + return void + param x CoordF in value + param y CoordF in value + param z CoordF in value + param w CoordF in value + category MESA_window_pos + vectorequiv WindowPos4fvMESA + version 1.0 + offset 531 + +WindowPos4fvMESA(v) + return void + param v CoordF in array [4] + category MESA_window_pos + version 1.0 + glxropcode ? + offset 532 + +WindowPos4iMESA(x, y, z, w) + return void + param x CoordI in value + param y CoordI in value + param z CoordI in value + param w CoordI in value + category MESA_window_pos + vectorequiv WindowPos4ivMESA + version 1.0 + offset 533 + +WindowPos4ivMESA(v) + return void + param v CoordI in array [4] + category MESA_window_pos + version 1.0 + glxropcode ? + offset 534 + +WindowPos4sMESA(x, y, z, w) + return void + param x CoordS in value + param y CoordS in value + param z CoordS in value + param w CoordS in value + category MESA_window_pos + vectorequiv WindowPos4svMESA + version 1.0 + offset 535 + +WindowPos4svMESA(v) + return void + param v CoordS in array [4] + category MESA_window_pos + version 1.0 + glxropcode ? + offset 536 + +############################################################################### +# +# Extension #198 +# EXT_texture_compression_s3tc commands +# +############################################################################### + +#@@ (none yet) + +############################################################################### +# +# Extension #199 +# IBM_cull_vertex commands +# +############################################################################### + +# (none) +newcategory: IBM_cull_vertex + +############################################################################### +# +# Extension #200 +# IBM_multimode_draw_arrays commands +# +############################################################################### + +MultiModeDrawArraysIBM(mode, first, count, primcount, modestride) + return void + param mode BeginMode in array [COMPSIZE(primcount)] + param first Int32 in array [COMPSIZE(primcount)] + param count SizeI in array [COMPSIZE(primcount)] + param primcount SizeI in value + param modestride Int32 in value + category IBM_multimode_draw_arrays + version 1.1 + glxropcode ? + offset 708 + + +MultiModeDrawElementsIBM(mode, count, type, indices, primcount, modestride) + return void + param mode BeginMode in array [COMPSIZE(primcount)] + param count SizeI in array [COMPSIZE(primcount)] + param type DrawElementsType in value + param indices ConstVoidPointer in array [COMPSIZE(primcount)] + param primcount SizeI in value + param modestride Int32 in value + category IBM_multimode_draw_arrays + version 1.1 + glxropcode ? + offset 709 + +############################################################################### +# +# Extension #201 +# IBM_vertex_array_lists commands +# +############################################################################### + +ColorPointerListIBM(size, type, stride, pointer, ptrstride) + return void + param size Int32 in value + param type ColorPointerType in value + param stride Int32 in value + param pointer VoidPointer in array [COMPSIZE(size/type/stride)] retained + param ptrstride Int32 in value + category IBM_vertex_array_lists + version 1.1 + glxropcode ? + offset ? + +SecondaryColorPointerListIBM(size, type, stride, pointer, ptrstride) + return void + param size Int32 in value + param type SecondaryColorPointerTypeIBM in value + param stride Int32 in value + param pointer VoidPointer in array [COMPSIZE(size/type/stride)] retained + param ptrstride Int32 in value + category IBM_vertex_array_lists + version 1.1 + glxropcode ? + offset ? + +EdgeFlagPointerListIBM(stride, pointer, ptrstride) + return void + param stride Int32 in value + param pointer BooleanPointer in array [COMPSIZE(stride)] retained + param ptrstride Int32 in value + category IBM_vertex_array_lists + version 1.1 + glxropcode ? + offset ? + +FogCoordPointerListIBM(type, stride, pointer, ptrstride) + return void + param type FogPointerTypeIBM in value + param stride Int32 in value + param pointer VoidPointer in array [COMPSIZE(type/stride)] retained + param ptrstride Int32 in value + category IBM_vertex_array_lists + version 1.1 + glxropcode ? + offset ? + +IndexPointerListIBM(type, stride, pointer, ptrstride) + return void + param type IndexPointerType in value + param stride Int32 in value + param pointer VoidPointer in array [COMPSIZE(type/stride)] retained + param ptrstride Int32 in value + category IBM_vertex_array_lists + version 1.1 + glxropcode ? + offset ? + +NormalPointerListIBM(type, stride, pointer, ptrstride) + return void + param type NormalPointerType in value + param stride Int32 in value + param pointer VoidPointer in array [COMPSIZE(type/stride)] retained + param ptrstride Int32 in value + category IBM_vertex_array_lists + version 1.1 + glxropcode ? + offset ? + +TexCoordPointerListIBM(size, type, stride, pointer, ptrstride) + return void + param size Int32 in value + param type TexCoordPointerType in value + param stride Int32 in value + param pointer VoidPointer in array [COMPSIZE(size/type/stride)] retained + param ptrstride Int32 in value + category IBM_vertex_array_lists + version 1.1 + glxropcode ? + offset ? + +VertexPointerListIBM(size, type, stride, pointer, ptrstride) + return void + param size Int32 in value + param type VertexPointerType in value + param stride Int32 in value + param pointer VoidPointer in array [COMPSIZE(size/type/stride)] retained + param ptrstride Int32 in value + category IBM_vertex_array_lists + version 1.1 + glxropcode ? + offset ? + +############################################################################### +# +# Extension #202 +# SGIX_subsample commands +# +############################################################################### + +# (none) +newcategory: SGIX_subsample + +############################################################################### +# +# Extension #203 +# SGIX_ycrcba commands +# +############################################################################### + +# (none) +newcategory: SGIX_ycrcba + +############################################################################### +# +# Extension #204 +# SGIX_ycrcb_subsample commands +# +############################################################################### + +# (none) +newcategory: SGIX_ycrcb_subsample + +############################################################################### +# +# Extension #205 +# SGIX_depth_pass_instrument commands +# +############################################################################### + +# (none) +newcategory: SGIX_depth_pass_instrument + +############################################################################### +# +# Extension #206 +# 3DFX_texture_compression_FXT1 commands +# +############################################################################### + +# (none) +newcategory: 3DFX_texture_compression_FXT1 + +############################################################################### +# +# Extension #207 +# 3DFX_multisample commands +# +############################################################################### + +# (none) +newcategory: 3DFX_multisample + +############################################################################### +# +# Extension #208 +# 3DFX_tbuffer commands +# +############################################################################### + +TbufferMask3DFX(mask) + return void + param mask UInt32 in value + category 3DFX_tbuffer + version 1.2 + glxropcode ? + offset 553 + +############################################################################### +# +# Extension #209 +# EXT_multisample commands +# +############################################################################### + +SampleMaskEXT(value, invert) + return void + param value ClampedFloat32 in value + param invert Boolean in value + category EXT_multisample + version 1.0 + glxropcode ? + extension + offset 446 + +SamplePatternEXT(pattern) + return void + param pattern SamplePatternEXT in value + category EXT_multisample + version 1.0 + glxropcode ? + glxflags + extension + offset 447 + +############################################################################### +# +# Extension #210 +# SGIX_vertex_preclip commands +# +############################################################################### + +# (none) +newcategory: SGIX_vertex_preclip + +############################################################################### +# +# Extension #211 +# SGIX_convolution_accuracy commands +# +############################################################################### + +# (none) +newcategory: SGIX_convolution_accuracy + +############################################################################### +# +# Extension #212 +# SGIX_resample commands +# +############################################################################### + +# (none) +newcategory: SGIX_resample + +############################################################################### +# +# Extension #213 +# SGIS_point_line_texgen commands +# +############################################################################### + +# (none) +newcategory: SGIS_point_line_texgen + +############################################################################### +# +# Extension #214 +# SGIS_texture_color_mask commands +# +############################################################################### + +TextureColorMaskSGIS(red, green, blue, alpha) + return void + param red Boolean in value + param green Boolean in value + param blue Boolean in value + param alpha Boolean in value + category SGIS_texture_color_mask + version 1.1 + glxropcode 2082 + extension + offset ? + +############################################################################### +# +# Extension #215 - GLX_MESA_copy_sub_buffer +# Extension #216 - GLX_MESA_pixmap_colormap +# Extension #217 - GLX_MESA_release_buffers +# Extension #218 - GLX_MESA_set_3dfx_mode +# +############################################################################### + +############################################################################### +# +# Extension #219 +# SGIX_igloo_interface commands +# +############################################################################### + +IglooInterfaceSGIX(pname, params) + return void + dlflags notlistable + param pname IglooFunctionSelectSGIX in value + param params IglooParameterSGIX in array [COMPSIZE(pname)] + category SGIX_igloo_interface + version 1.0 + glxflags SGI ignore + extension + glxropcode 200 + offset ? + +############################################################################### +# +# Extension #220 +# EXT_texture_env_dot3 commands +# +############################################################################### + +# (none) +newcategory: EXT_texture_env_dot3 + +############################################################################### +# +# Extension #221 +# ATI_texture_mirror_once commands +# +############################################################################### +# (none) +newcategory: ATI_texture_mirror_once + +############################################################################### +# +# Extension #222 +# NV_fence commands +# +############################################################################### + +DeleteFencesNV(n, fences) + return void + param n SizeI in value + param fences FenceNV in array [n] + category NV_fence + dlflags notlistable + version 1.2 + extension soft WINSOFT NV10 + glxvendorpriv 1276 + glxflags ignore + offset 647 + +GenFencesNV(n, fences) + return void + param n SizeI in value + param fences FenceNV out array [n] + category NV_fence + dlflags notlistable + version 1.2 + extension soft WINSOFT NV10 + glxvendorpriv 1277 + glxflags ignore + offset 648 + +IsFenceNV(fence) + return Boolean + param fence FenceNV in value + category NV_fence + dlflags notlistable + version 1.2 + extension soft WINSOFT NV10 + glxvendorpriv 1278 + glxflags ignore + offset 649 + +TestFenceNV(fence) + return Boolean + param fence FenceNV in value + category NV_fence + dlflags notlistable + version 1.2 + extension soft WINSOFT NV10 + glxvendorpriv 1279 + glxflags ignore + offset 650 + +GetFenceivNV(fence, pname, params) + return void + param fence FenceNV in value + param pname FenceParameterNameNV in value + param params Int32 out array [COMPSIZE(pname)] + category NV_fence + dlflags notlistable + version 1.2 + extension soft WINSOFT NV10 + glxvendorpriv 1280 + glxflags ignore + offset 651 + +FinishFenceNV(fence) + return void + param fence FenceNV in value + category NV_fence + dlflags notlistable + version 1.2 + extension soft WINSOFT NV10 + glxvendorpriv 1312 + glxflags ignore + offset 652 + +SetFenceNV(fence, condition) + return void + param fence FenceNV in value + param condition FenceConditionNV in value + category NV_fence + version 1.2 + extension soft WINSOFT NV10 + glxflags ignore + offset 653 + +############################################################################### +# +# Extension #225 +# NV_evaluators commands +# +############################################################################### + +MapControlPointsNV(target, index, type, ustride, vstride, uorder, vorder, packed, points) + return void + param target EvalTargetNV in value + param index UInt32 in value + param type MapTypeNV in value + param ustride SizeI in value + param vstride SizeI in value + param uorder CheckedInt32 in value + param vorder CheckedInt32 in value + param packed Boolean in value + param points Void in array [COMPSIZE(target/uorder/vorder)] + category NV_evaluators + dlflags handcode + version 1.1 + extension soft WINSOFT NV10 + glxflags ignore + offset ? + +MapParameterivNV(target, pname, params) + return void + param target EvalTargetNV in value + param pname MapParameterNV in value + param params CheckedInt32 in array [COMPSIZE(target/pname)] + category NV_evaluators + version 1.1 + extension soft WINSOFT NV10 + glxflags ignore + offset ? + +MapParameterfvNV(target, pname, params) + return void + param target EvalTargetNV in value + param pname MapParameterNV in value + param params CheckedFloat32 in array [COMPSIZE(target/pname)] + category NV_evaluators + version 1.1 + extension soft WINSOFT NV10 + glxflags ignore + offset ? + +GetMapControlPointsNV(target, index, type, ustride, vstride, packed, points) + return void + param target EvalTargetNV in value + param index UInt32 in value + param type MapTypeNV in value + param ustride SizeI in value + param vstride SizeI in value + param packed Boolean in value + param points Void out array [COMPSIZE(target)] + category NV_evaluators + dlflags notlistable + version 1.1 + extension soft WINSOFT NV10 + glxflags ignore + offset ? + +GetMapParameterivNV(target, pname, params) + return void + param target EvalTargetNV in value + param pname MapParameterNV in value + param params Int32 out array [COMPSIZE(target/pname)] + category NV_evaluators + dlflags notlistable + version 1.1 + extension soft WINSOFT NV10 + glxflags ignore + offset ? + +GetMapParameterfvNV(target, pname, params) + return void + param target EvalTargetNV in value + param pname MapParameterNV in value + param params Float32 out array [COMPSIZE(target/pname)] + category NV_evaluators + dlflags notlistable + version 1.1 + extension soft WINSOFT NV10 + glxflags ignore + offset ? + +GetMapAttribParameterivNV(target, index, pname, params) + return void + param target EvalTargetNV in value + param index UInt32 in value + param pname MapAttribParameterNV in value + param params Int32 out array [COMPSIZE(pname)] + category NV_evaluators + dlflags notlistable + version 1.1 + extension soft WINSOFT NV10 + glxflags ignore + offset ? + +GetMapAttribParameterfvNV(target, index, pname, params) + return void + param target EvalTargetNV in value + param index UInt32 in value + param pname MapAttribParameterNV in value + param params Float32 out array [COMPSIZE(pname)] + category NV_evaluators + dlflags notlistable + version 1.1 + extension soft WINSOFT NV10 + glxflags ignore + offset ? + +EvalMapsNV(target, mode) + return void + param target EvalTargetNV in value + param mode EvalMapsModeNV in value + category NV_evaluators + version 1.1 + extension soft WINSOFT NV10 + glxflags ignore + offset ? + +############################################################################### +# +# Extension #226 +# NV_packed_depth_stencil commands +# +############################################################################### + +# (none) +newcategory: NV_packed_depth_stencil + +############################################################################### +# +# Extension #227 +# NV_register_combiners2 commands +# +############################################################################### + +CombinerStageParameterfvNV(stage, pname, params) + return void + param stage CombinerStageNV in value + param pname CombinerParameterNV in value + param params CheckedFloat32 in array [COMPSIZE(pname)] + category NV_register_combiners2 + version 1.1 + extension + glxflags ignore + offset ? + +GetCombinerStageParameterfvNV(stage, pname, params) + return void + param stage CombinerStageNV in value + param pname CombinerParameterNV in value + param params Float32 out array [COMPSIZE(pname)] + dlflags notlistable + category NV_register_combiners2 + version 1.1 + extension + glxflags ignore + offset ? + +############################################################################### +# +# Extension #228 +# NV_texture_compression_vtc commands +# +############################################################################### + +# (none) +newcategory: NV_texture_compression_vtc + +############################################################################### +# +# Extension #229 +# NV_texture_rectangle commands +# +############################################################################### + +# (none) +newcategory: NV_texture_rectangle + +############################################################################### +# +# Extension #230 +# NV_texture_shader commands +# +############################################################################### + +# (none) +newcategory: NV_texture_shader + +############################################################################### +# +# Extension #231 +# NV_texture_shader2 commands +# +############################################################################### + +# (none) +newcategory: NV_texture_shader2 + +############################################################################### +# +# Extension #232 +# NV_vertex_array_range2 commands +# +############################################################################### + +# (none) +newcategory: NV_vertex_array_range2 + +############################################################################### +# +# Extension #233 +# NV_vertex_program commands +# +############################################################################### + +AreProgramsResidentNV(n, programs, residences) + return Boolean + param n SizeI in value + param programs UInt32 in array [n] + param residences Boolean out array [n] + category NV_vertex_program + dlflags notlistable + version 1.2 + extension soft WINSOFT NV10 + glxflags ignore + glxvendorpriv 1293 + offset 578 + +BindProgramNV(target, id) + return void + param target VertexAttribEnumNV in value + param id UInt32 in value + category NV_vertex_program + version 1.2 + extension soft WINSOFT NV10 + glxropcode 4180 + alias BindProgramARB + +DeleteProgramsNV(n, programs) + return void + param n SizeI in value + param programs UInt32 in array [n] + category NV_vertex_program + dlflags notlistable + version 1.2 + extension soft WINSOFT NV10 + glxvendorpriv 1294 + alias DeleteProgramsARB + +ExecuteProgramNV(target, id, params) + return void + param target VertexAttribEnumNV in value + param id UInt32 in value + param params Float32 in array [4] + category NV_vertex_program + version 1.2 + extension soft WINSOFT NV10 + glxflags ignore + glxropcode 4181 + offset 581 + +GenProgramsNV(n, programs) + return void + param n SizeI in value + param programs UInt32 out array [n] + category NV_vertex_program + dlflags notlistable + version 1.2 + extension soft WINSOFT NV10 + glxvendorpriv 1295 + alias GenProgramsARB + +GetProgramParameterdvNV(target, index, pname, params) + return void + param target VertexAttribEnumNV in value + param index UInt32 in value + param pname VertexAttribEnumNV in value + param params Float64 out array [4] + category NV_vertex_program + dlflags notlistable + version 1.2 + extension soft WINSOFT NV10 + glxflags ignore + glxvendorpriv 1297 + offset 583 + +GetProgramParameterfvNV(target, index, pname, params) + return void + param target VertexAttribEnumNV in value + param index UInt32 in value + param pname VertexAttribEnumNV in value + param params Float32 out array [4] + category NV_vertex_program + dlflags notlistable + version 1.2 + extension soft WINSOFT NV10 + glxflags ignore + glxvendorpriv 1296 + offset 584 + +# GetProgramParameterSigneddvNV(target, index, pname, params) +# return void +# param target VertexAttribEnumNV in value +# param index Int32 in value +# param pname VertexAttribEnumNV in value +# param params Float64 out array [4] +# category NV_vertex_program1_1_dcc +# dlflags notlistable +# version 1.2 +# extension soft WINSOFT NV20 +# glxflags ignore +# offset ? +# +# GetProgramParameterSignedfvNV(target, index, pname, params) +# return void +# param target VertexAttribEnumNV in value +# param index Int32 in value +# param pname VertexAttribEnumNV in value +# param params Float32 out array [4] +# category NV_vertex_program1_1_dcc +# dlflags notlistable +# version 1.2 +# extension soft WINSOFT NV20 +# glxflags ignore +# offset ? + +GetProgramivNV(id, pname, params) + return void + param id UInt32 in value + param pname VertexAttribEnumNV in value + param params Int32 out array [4] + category NV_vertex_program + dlflags notlistable + version 1.2 + extension soft WINSOFT NV10 + glxflags ignore + glxvendorpriv 1298 + offset 585 + +GetProgramStringNV(id, pname, program) + return void + param id UInt32 in value + param pname VertexAttribEnumNV in value + param program ProgramCharacterNV out array [COMPSIZE(id/pname)] + category NV_vertex_program + dlflags notlistable + version 1.2 + extension soft WINSOFT NV10 + glxflags ignore + glxvendorpriv 1299 + offset 586 + +GetTrackMatrixivNV(target, address, pname, params) + return void + param target VertexAttribEnumNV in value + param address UInt32 in value + param pname VertexAttribEnumNV in value + param params Int32 out array [1] + category NV_vertex_program + dlflags notlistable + version 1.2 + extension soft WINSOFT NV10 + glxflags ignore + glxvendorpriv 1300 + offset 587 + +GetVertexAttribdvNV(index, pname, params) + return void + param index UInt32 in value + param pname VertexAttribEnumNV in value + param params Float64 out array [1] + category NV_vertex_program + dlflags notlistable + version 1.2 + extension soft WINSOFT NV10 + glxvendorpriv 1301 + alias GetVertexAttribdv + +GetVertexAttribfvNV(index, pname, params) + return void + param index UInt32 in value + param pname VertexAttribEnumNV in value + param params Float32 out array [1] + category NV_vertex_program + dlflags notlistable + version 1.2 + extension soft WINSOFT NV10 + glxvendorpriv 1302 + alias GetVertexAttribfv + +GetVertexAttribivNV(index, pname, params) + return void + param index UInt32 in value + param pname VertexAttribEnumNV in value + param params Int32 out array [1] + category NV_vertex_program + dlflags notlistable + version 1.2 + extension soft WINSOFT NV10 + glxvendorpriv 1303 + alias GetVertexAttribiv + +GetVertexAttribPointervNV(index, pname, pointer) + return void + param index UInt32 in value + param pname VertexAttribEnumNV in value + param pointer VoidPointer out array [1] + category NV_vertex_program + dlflags notlistable + version 1.2 + extension soft WINSOFT NV10 + glxflags ignore + alias GetVertexAttribPointerv + +IsProgramNV(id) + return Boolean + param id UInt32 in value + category NV_vertex_program + dlflags notlistable + version 1.2 + extension soft WINSOFT NV10 + glxvendorpriv 1304 + alias IsProgram + +LoadProgramNV(target, id, len, program) + return void + param target VertexAttribEnumNV in value + param id UInt32 in value + param len SizeI in value + param program UInt8 in array [len] + category NV_vertex_program + version 1.2 + extension soft WINSOFT NV10 + glxropcode 4183 + offset 593 + +ProgramParameter4dNV(target, index, x, y, z, w) + return void + param target VertexAttribEnumNV in value + param index UInt32 in value + param x Float64 in value + param y Float64 in value + param z Float64 in value + param w Float64 in value + category NV_vertex_program + version 1.2 + vectorequiv ProgramParameter4dvNV + extension soft WINSOFT NV10 + offset 594 + +ProgramParameter4dvNV(target, index, v) + return void + param target VertexAttribEnumNV in value + param index UInt32 in value + param v Float64 in array [4] + category NV_vertex_program + version 1.2 + extension soft WINSOFT NV10 + glxropcode 4185 + offset 595 + +ProgramParameter4fNV(target, index, x, y, z, w) + return void + param target VertexAttribEnumNV in value + param index UInt32 in value + param x Float32 in value + param y Float32 in value + param z Float32 in value + param w Float32 in value + category NV_vertex_program + version 1.2 + vectorequiv ProgramParameter4fvNV + extension soft WINSOFT NV10 + offset 596 + +ProgramParameter4fvNV(target, index, v) + return void + param target VertexAttribEnumNV in value + param index UInt32 in value + param v Float32 in array [4] + category NV_vertex_program + version 1.2 + extension soft WINSOFT NV10 + glxropcode 4184 + offset 597 + +#??? 'count' was SizeI in the latest NVIDIA gl.spec, but UInt32 in the +#??? extension specification in the registry. +ProgramParameters4dvNV(target, index, count, v) + return void + param target VertexAttribEnumNV in value + param index UInt32 in value + param count UInt32 in value + param v Float64 in array [count*4] + category NV_vertex_program + version 1.2 + extension soft WINSOFT NV10 + glxropcode 4187 + offset 598 + +#??? 'count' was SizeI in the latest NVIDIA gl.spec, but UInt32 in the +#??? extension specification in the registry. +ProgramParameters4fvNV(target, index, count, v) + return void + param target VertexAttribEnumNV in value + param index UInt32 in value + param count UInt32 in value + param v Float32 in array [count*4] + category NV_vertex_program + version 1.2 + extension soft WINSOFT NV10 + glxropcode 4186 + offset 599 + +# ProgramParameterSigned4dNV(target, index, x, y, z, w) +# return void +# param target VertexAttribEnumNV in value +# param index Int32 in value +# param x Float64 in value +# param y Float64 in value +# param z Float64 in value +# param w Float64 in value +# category NV_vertex_program1_1_dcc +# version 1.2 +# vectorequiv ProgramParameterSigned4dvNV +# extension soft WINSOFT NV20 +# offset ? +# +# ProgramParameterSigned4dvNV(target, index, v) +# return void +# param target VertexAttribEnumNV in value +# param index Int32 in value +# param v Float64 in array [4] +# category NV_vertex_program1_1_dcc +# version 1.2 +# extension soft WINSOFT NV20 +# glxflags ignore +# offset ? +# +# ProgramParameterSigned4fNV(target, index, x, y, z, w) +# return void +# param target VertexAttribEnumNV in value +# param index Int32 in value +# param x Float32 in value +# param y Float32 in value +# param z Float32 in value +# param w Float32 in value +# category NV_vertex_program1_1_dcc +# version 1.2 +# vectorequiv ProgramParameterSigned4fvNV +# extension soft WINSOFT NV20 +# offset ? +# +# ProgramParameterSigned4fvNV(target, index, v) +# return void +# param target VertexAttribEnumNV in value +# param index Int32 in value +# param v Float32 in array [4] +# category NV_vertex_program1_1_dcc +# version 1.2 +# extension soft WINSOFT NV20 +# glxflags ignore +# offset ? +# +# ProgramParametersSigned4dvNV(target, index, count, v) +# return void +# param target VertexAttribEnumNV in value +# param index Int32 in value +# param count SizeI in value +# param v Float64 in array [count*4] +# category NV_vertex_program1_1_dcc +# version 1.2 +# extension soft WINSOFT NV20 +# glxflags ignore +# offset ? +# +# ProgramParametersSigned4fvNV(target, index, count, v) +# return void +# param target VertexAttribEnumNV in value +# param index Int32 in value +# param count SizeI in value +# param v Float32 in array [count*4] +# category NV_vertex_program1_1_dcc +# version 1.2 +# extension soft WINSOFT NV20 +# glxflags ignore +# offset ? + +RequestResidentProgramsNV(n, programs) + return void + param n SizeI in value + param programs UInt32 in array [n] + category NV_vertex_program + version 1.2 + extension soft WINSOFT NV10 + glxropcode 4182 + offset 600 + +TrackMatrixNV(target, address, matrix, transform) + return void + param target VertexAttribEnumNV in value + param address UInt32 in value + param matrix VertexAttribEnumNV in value + param transform VertexAttribEnumNV in value + category NV_vertex_program + version 1.2 + extension soft WINSOFT NV10 + glxropcode 4188 + offset 601 + +VertexAttribPointerNV(index, fsize, type, stride, pointer) + return void + param index UInt32 in value + param fsize Int32 in value + param type VertexAttribEnumNV in value + param stride SizeI in value + param pointer Void in array [COMPSIZE(fsize/type/stride)] retained + category NV_vertex_program + dlflags notlistable + version 1.2 + extension soft WINSOFT NV10 + glxflags ignore + offset 602 + +VertexAttrib1dNV(index, x) + return void + param index UInt32 in value + param x Float64 in value + category NV_vertex_program + version 1.2 + vectorequiv VertexAttrib1dvNV + extension soft WINSOFT NV10 + alias VertexAttrib1d + +VertexAttrib1dvNV(index, v) + return void + param index UInt32 in value + param v Float64 in array [1] + category NV_vertex_program + version 1.2 + extension soft WINSOFT NV10 + glxropcode 4197 + alias VertexAttrib1dv + +VertexAttrib1fNV(index, x) + return void + param index UInt32 in value + param x Float32 in value + category NV_vertex_program + version 1.2 + vectorequiv VertexAttrib1fvNV + extension soft WINSOFT NV10 + alias VertexAttrib1f + +VertexAttrib1fvNV(index, v) + return void + param index UInt32 in value + param v Float32 in array [1] + category NV_vertex_program + version 1.2 + extension soft WINSOFT NV10 + glxropcode 4193 + alias VertexAttrib1fv + +VertexAttrib1sNV(index, x) + return void + param index UInt32 in value + param x Int16 in value + category NV_vertex_program + version 1.2 + vectorequiv VertexAttrib1svNV + extension soft WINSOFT NV10 + alias VertexAttrib1s + +VertexAttrib1svNV(index, v) + return void + param index UInt32 in value + param v Int16 in array [1] + category NV_vertex_program + version 1.2 + extension soft WINSOFT NV10 + glxropcode 4189 + alias VertexAttrib1sv + +VertexAttrib2dNV(index, x, y) + return void + param index UInt32 in value + param x Float64 in value + param y Float64 in value + category NV_vertex_program + version 1.2 + vectorequiv VertexAttrib2dvNV + extension soft WINSOFT NV10 + alias VertexAttrib2d + +VertexAttrib2dvNV(index, v) + return void + param index UInt32 in value + param v Float64 in array [2] + category NV_vertex_program + version 1.2 + extension soft WINSOFT NV10 + glxropcode 4198 + alias VertexAttrib2dv + +VertexAttrib2fNV(index, x, y) + return void + param index UInt32 in value + param x Float32 in value + param y Float32 in value + category NV_vertex_program + version 1.2 + vectorequiv VertexAttrib2fvNV + extension soft WINSOFT NV10 + alias VertexAttrib2f + +VertexAttrib2fvNV(index, v) + return void + param index UInt32 in value + param v Float32 in array [2] + category NV_vertex_program + version 1.2 + extension soft WINSOFT NV10 + glxropcode 4194 + alias VertexAttrib2fv + +VertexAttrib2sNV(index, x, y) + return void + param index UInt32 in value + param x Int16 in value + param y Int16 in value + category NV_vertex_program + version 1.2 + vectorequiv VertexAttrib2svNV + extension soft WINSOFT NV10 + alias VertexAttrib2s + +VertexAttrib2svNV(index, v) + return void + param index UInt32 in value + param v Int16 in array [2] + category NV_vertex_program + version 1.2 + extension soft WINSOFT NV10 + glxropcode 4190 + alias VertexAttrib2sv + +VertexAttrib3dNV(index, x, y, z) + return void + param index UInt32 in value + param x Float64 in value + param y Float64 in value + param z Float64 in value + category NV_vertex_program + version 1.2 + vectorequiv VertexAttrib3dvNV + extension soft WINSOFT NV10 + alias VertexAttrib3d + +VertexAttrib3dvNV(index, v) + return void + param index UInt32 in value + param v Float64 in array [3] + category NV_vertex_program + version 1.2 + extension soft WINSOFT NV10 + glxropcode 4199 + alias VertexAttrib3dv + +VertexAttrib3fNV(index, x, y, z) + return void + param index UInt32 in value + param x Float32 in value + param y Float32 in value + param z Float32 in value + category NV_vertex_program + version 1.2 + vectorequiv VertexAttrib3fvNV + extension soft WINSOFT NV10 + alias VertexAttrib3f + +VertexAttrib3fvNV(index, v) + return void + param index UInt32 in value + param v Float32 in array [3] + category NV_vertex_program + version 1.2 + extension soft WINSOFT NV10 + glxropcode 4195 + alias VertexAttrib3fv + +VertexAttrib3sNV(index, x, y, z) + return void + param index UInt32 in value + param x Int16 in value + param y Int16 in value + param z Int16 in value + category NV_vertex_program + version 1.2 + vectorequiv VertexAttrib3svNV + extension soft WINSOFT NV10 + alias VertexAttrib3s + +VertexAttrib3svNV(index, v) + return void + param index UInt32 in value + param v Int16 in array [3] + category NV_vertex_program + version 1.2 + extension soft WINSOFT NV10 + glxropcode 4191 + alias VertexAttrib3sv + +VertexAttrib4dNV(index, x, y, z, w) + return void + param index UInt32 in value + param x Float64 in value + param y Float64 in value + param z Float64 in value + param w Float64 in value + category NV_vertex_program + version 1.2 + vectorequiv VertexAttrib4dvNV + extension soft WINSOFT NV10 + alias VertexAttrib4d + +VertexAttrib4dvNV(index, v) + return void + param index UInt32 in value + param v Float64 in array [4] + category NV_vertex_program + version 1.2 + extension soft WINSOFT NV10 + glxropcode 4200 + alias VertexAttrib4dv + +VertexAttrib4fNV(index, x, y, z, w) + return void + param index UInt32 in value + param x Float32 in value + param y Float32 in value + param z Float32 in value + param w Float32 in value + category NV_vertex_program + version 1.2 + vectorequiv VertexAttrib4fvNV + extension soft WINSOFT NV10 + alias VertexAttrib4f + +VertexAttrib4fvNV(index, v) + return void + param index UInt32 in value + param v Float32 in array [4] + category NV_vertex_program + version 1.2 + extension soft WINSOFT NV10 + glxropcode 4196 + alias VertexAttrib4fv + +VertexAttrib4sNV(index, x, y, z, w) + return void + param index UInt32 in value + param x Int16 in value + param y Int16 in value + param z Int16 in value + param w Int16 in value + category NV_vertex_program + version 1.2 + vectorequiv VertexAttrib4svNV + extension soft WINSOFT NV10 + alias VertexAttrib4s + +VertexAttrib4svNV(index, v) + return void + param index UInt32 in value + param v Int16 in array [4] + category NV_vertex_program + version 1.2 + extension soft WINSOFT NV10 + glxropcode 4192 + alias VertexAttrib4sv + +VertexAttrib4ubNV(index, x, y, z, w) + return void + param index UInt32 in value + param x ColorUB in value + param y ColorUB in value + param z ColorUB in value + param w ColorUB in value + category NV_vertex_program + version 1.2 + extension soft WINSOFT NV10 + vectorequiv VertexAttrib4ubvNV + alias VertexAttrib4Nub + +VertexAttrib4ubvNV(index, v) + return void + param index UInt32 in value + param v ColorUB in array [4] + category NV_vertex_program + version 1.2 + extension soft WINSOFT NV10 + glxropcode 4201 + alias VertexAttrib4Nubv + +VertexAttribs1dvNV(index, count, v) + return void + param index UInt32 in value + param count SizeI in value + param v Float64 in array [count] + category NV_vertex_program + dlflags handcode + version 1.2 + extension soft WINSOFT NV10 + glxropcode 4210 + offset 629 + +VertexAttribs1fvNV(index, count, v) + return void + param index UInt32 in value + param count SizeI in value + param v Float32 in array [count] + category NV_vertex_program + dlflags handcode + version 1.2 + extension soft WINSOFT NV10 + glxropcode 4206 + offset 630 + +VertexAttribs1svNV(index, count, v) + return void + param index UInt32 in value + param count SizeI in value + param v Int16 in array [count] + category NV_vertex_program + dlflags handcode + version 1.2 + extension soft WINSOFT NV10 + glxropcode 4202 + offset 631 + +VertexAttribs2dvNV(index, count, v) + return void + param index UInt32 in value + param count SizeI in value + param v Float64 in array [count*2] + category NV_vertex_program + dlflags handcode + version 1.2 + extension soft WINSOFT NV10 + glxropcode 4211 + offset 632 + +VertexAttribs2fvNV(index, count, v) + return void + param index UInt32 in value + param count SizeI in value + param v Float32 in array [count*2] + category NV_vertex_program + dlflags handcode + version 1.2 + extension soft WINSOFT NV10 + glxropcode 4207 + offset 633 + +VertexAttribs2svNV(index, count, v) + return void + param index UInt32 in value + param count SizeI in value + param v Int16 in array [count*2] + category NV_vertex_program + dlflags handcode + version 1.2 + extension soft WINSOFT NV10 + glxropcode 4203 + offset 634 + +VertexAttribs3dvNV(index, count, v) + return void + param index UInt32 in value + param count SizeI in value + param v Float64 in array [count*3] + category NV_vertex_program + dlflags handcode + version 1.2 + extension soft WINSOFT NV10 + glxropcode 4212 + offset 635 + +VertexAttribs3fvNV(index, count, v) + return void + param index UInt32 in value + param count SizeI in value + param v Float32 in array [count*3] + category NV_vertex_program + dlflags handcode + version 1.2 + extension soft WINSOFT NV10 + glxropcode 4208 + offset 636 + +VertexAttribs3svNV(index, count, v) + return void + param index UInt32 in value + param count SizeI in value + param v Int16 in array [count*3] + category NV_vertex_program + dlflags handcode + version 1.2 + extension soft WINSOFT NV10 + glxropcode 4204 + offset 637 + +VertexAttribs4dvNV(index, count, v) + return void + param index UInt32 in value + param count SizeI in value + param v Float64 in array [count*4] + category NV_vertex_program + dlflags handcode + version 1.2 + extension soft WINSOFT NV10 + glxropcode 4213 + offset 638 + +VertexAttribs4fvNV(index, count, v) + return void + param index UInt32 in value + param count SizeI in value + param v Float32 in array [count*4] + category NV_vertex_program + dlflags handcode + version 1.2 + extension soft WINSOFT NV10 + glxropcode 4209 + offset 639 + +VertexAttribs4svNV(index, count, v) + return void + param index UInt32 in value + param count SizeI in value + param v Int16 in array [count*4] + category NV_vertex_program + dlflags handcode + version 1.2 + extension soft WINSOFT NV10 + glxropcode 4205 + offset 640 + +VertexAttribs4ubvNV(index, count, v) + return void + param index UInt32 in value + param count SizeI in value + param v ColorUB in array [count*4] + category NV_vertex_program + dlflags handcode + version 1.2 + extension soft WINSOFT NV10 + glxropcode 4214 + offset 641 + + +############################################################################### +# +# Extension #234 - GLX_SGIX_visual_select_group +# +############################################################################### + +############################################################################### +# +# Extension #235 +# SGIX_texture_coordinate_clamp commands +# +############################################################################### + +# (none) +newcategory: SGIX_texture_coordinate_clamp + +############################################################################### +# +# Extension #236 +# SGIX_scalebias_hint commands +# +############################################################################### + +# (none) +newcategory: SGIX_scalebias_hint + +############################################################################### +# +# Extension #237 - GLX_OML_swap_method commands +# Extension #238 - GLX_OML_sync_control commands +# +############################################################################### + +############################################################################### +# +# Extension #239 +# OML_interlace commands +# +############################################################################### + +# (none) +newcategory: OML_interlace + +############################################################################### +# +# Extension #240 +# OML_subsample commands +# +############################################################################### + +# (none) +newcategory: OML_subsample + +############################################################################### +# +# Extension #241 +# OML_resample commands +# +############################################################################### + +# (none) +newcategory: OML_resample + +############################################################################### +# +# Extension #242 - WGL_OML_sync_control commands +# +############################################################################### + +############################################################################### +# +# Extension #243 +# NV_copy_depth_to_color commands +# +############################################################################### + +# (none) +newcategory: NV_copy_depth_to_color + +############################################################################### +# +# Extension #244 +# ATI_envmap_bumpmap commands +# +############################################################################### + +TexBumpParameterivATI(pname, param) + return void + param pname TexBumpParameterATI in value + param param Int32 in array [COMPSIZE(pname)] + category ATI_envmap_bumpmap + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +TexBumpParameterfvATI(pname, param) + return void + param pname TexBumpParameterATI in value + param param Float32 in array [COMPSIZE(pname)] + category ATI_envmap_bumpmap + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +GetTexBumpParameterivATI(pname, param) + return void + param pname GetTexBumpParameterATI in value + param param Int32 out array [COMPSIZE(pname)] + category ATI_envmap_bumpmap + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +GetTexBumpParameterfvATI(pname, param) + return void + param pname GetTexBumpParameterATI in value + param param Float32 out array [COMPSIZE(pname)] + category ATI_envmap_bumpmap + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +############################################################################### +# +# Extension #245 +# ATI_fragment_shader commands +# +############################################################################### + +GenFragmentShadersATI(range) + return UInt32 + param range UInt32 in value + category ATI_fragment_shader + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +BindFragmentShaderATI(id) + return void + param id UInt32 in value + category ATI_fragment_shader + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +DeleteFragmentShaderATI(id) + return void + param id UInt32 in value + category ATI_fragment_shader + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +BeginFragmentShaderATI() + return void + category ATI_fragment_shader + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +EndFragmentShaderATI() + return void + category ATI_fragment_shader + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +PassTexCoordATI(dst, coord, swizzle) + return void + param dst UInt32 in value + param coord UInt32 in value + param swizzle SwizzleOpATI in value + category ATI_fragment_shader + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +SampleMapATI(dst, interp, swizzle) + return void + param dst UInt32 in value + param interp UInt32 in value + param swizzle SwizzleOpATI in value + category ATI_fragment_shader + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +ColorFragmentOp1ATI(op, dst, dstMask, dstMod, arg1, arg1Rep, arg1Mod) + return void + param op FragmentOpATI in value + param dst UInt32 in value + param dstMask UInt32 in value + param dstMod UInt32 in value + param arg1 UInt32 in value + param arg1Rep UInt32 in value + param arg1Mod UInt32 in value + category ATI_fragment_shader + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +ColorFragmentOp2ATI(op, dst, dstMask, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod) + return void + param op FragmentOpATI in value + param dst UInt32 in value + param dstMask UInt32 in value + param dstMod UInt32 in value + param arg1 UInt32 in value + param arg1Rep UInt32 in value + param arg1Mod UInt32 in value + param arg2 UInt32 in value + param arg2Rep UInt32 in value + param arg2Mod UInt32 in value + category ATI_fragment_shader + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +ColorFragmentOp3ATI(op, dst, dstMask, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod, arg3, arg3Rep, arg3Mod) + return void + param op FragmentOpATI in value + param dst UInt32 in value + param dstMask UInt32 in value + param dstMod UInt32 in value + param arg1 UInt32 in value + param arg1Rep UInt32 in value + param arg1Mod UInt32 in value + param arg2 UInt32 in value + param arg2Rep UInt32 in value + param arg2Mod UInt32 in value + param arg3 UInt32 in value + param arg3Rep UInt32 in value + param arg3Mod UInt32 in value + category ATI_fragment_shader + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +AlphaFragmentOp1ATI(op, dst, dstMod, arg1, arg1Rep, arg1Mod) + return void + param op FragmentOpATI in value + param dst UInt32 in value + param dstMod UInt32 in value + param arg1 UInt32 in value + param arg1Rep UInt32 in value + param arg1Mod UInt32 in value + category ATI_fragment_shader + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +AlphaFragmentOp2ATI(op, dst, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod) + return void + param op FragmentOpATI in value + param dst UInt32 in value + param dstMod UInt32 in value + param arg1 UInt32 in value + param arg1Rep UInt32 in value + param arg1Mod UInt32 in value + param arg2 UInt32 in value + param arg2Rep UInt32 in value + param arg2Mod UInt32 in value + category ATI_fragment_shader + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +AlphaFragmentOp3ATI(op, dst, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod, arg3, arg3Rep, arg3Mod) + return void + param op FragmentOpATI in value + param dst UInt32 in value + param dstMod UInt32 in value + param arg1 UInt32 in value + param arg1Rep UInt32 in value + param arg1Mod UInt32 in value + param arg2 UInt32 in value + param arg2Rep UInt32 in value + param arg2Mod UInt32 in value + param arg3 UInt32 in value + param arg3Rep UInt32 in value + param arg3Mod UInt32 in value + category ATI_fragment_shader + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +SetFragmentShaderConstantATI(dst, value) + return void + param dst UInt32 in value + param value ConstFloat32 in array [4] + category ATI_fragment_shader + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +############################################################################### +# +# Extension #246 +# ATI_pn_triangles commands +# +############################################################################### + +PNTrianglesiATI(pname, param) + return void + param pname PNTrianglesPNameATI in value + param param Int32 in value + category ATI_pn_triangles + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +PNTrianglesfATI(pname, param) + return void + param pname PNTrianglesPNameATI in value + param param Float32 in value + category ATI_pn_triangles + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +############################################################################### +# +# Extension #247 +# ATI_vertex_array_object commands +# +############################################################################### + +NewObjectBufferATI(size, pointer, usage) + return UInt32 + param size SizeI in value + param pointer ConstVoid in array [size] + param usage ArrayObjectUsageATI in value + category ATI_vertex_array_object + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +IsObjectBufferATI(buffer) + return Boolean + param buffer UInt32 in value + category ATI_vertex_array_object + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +UpdateObjectBufferATI(buffer, offset, size, pointer, preserve) + return void + param buffer UInt32 in value + param offset UInt32 in value + param size SizeI in value + param pointer ConstVoid in array [size] + param preserve PreserveModeATI in value + category ATI_vertex_array_object + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +GetObjectBufferfvATI(buffer, pname, params) + return void + param buffer UInt32 in value + param pname ArrayObjectPNameATI in value + param params Float32 out array [1] + category ATI_vertex_array_object + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +GetObjectBufferivATI(buffer, pname, params) + return void + param buffer UInt32 in value + param pname ArrayObjectPNameATI in value + param params Int32 out array [1] + category ATI_vertex_array_object + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +FreeObjectBufferATI(buffer) + return void + param buffer UInt32 in value + category ATI_vertex_array_object + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +ArrayObjectATI(array, size, type, stride, buffer, offset) + return void + param array EnableCap in value + param size Int32 in value + param type ScalarType in value + param stride SizeI in value + param buffer UInt32 in value + param offset UInt32 in value + category ATI_vertex_array_object + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +GetArrayObjectfvATI(array, pname, params) + return void + param array EnableCap in value + param pname ArrayObjectPNameATI in value + param params Float32 out array [1] + category ATI_vertex_array_object + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +GetArrayObjectivATI(array, pname, params) + return void + param array EnableCap in value + param pname ArrayObjectPNameATI in value + param params Int32 out array [1] + category ATI_vertex_array_object + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +VariantArrayObjectATI(id, type, stride, buffer, offset) + return void + param id UInt32 in value + param type ScalarType in value + param stride SizeI in value + param buffer UInt32 in value + param offset UInt32 in value + category ATI_vertex_array_object + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +GetVariantArrayObjectfvATI(id, pname, params) + return void + param id UInt32 in value + param pname ArrayObjectPNameATI in value + param params Float32 out array [1] + category ATI_vertex_array_object + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +GetVariantArrayObjectivATI(id, pname, params) + return void + param id UInt32 in value + param pname ArrayObjectPNameATI in value + param params Int32 out array [1] + category ATI_vertex_array_object + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +############################################################################### +# +# Extension #248 +# EXT_vertex_shader commands +# +############################################################################### + +BeginVertexShaderEXT() + return void + category EXT_vertex_shader + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +EndVertexShaderEXT() + return void + category EXT_vertex_shader + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +BindVertexShaderEXT(id) + return void + param id UInt32 in value + category EXT_vertex_shader + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +GenVertexShadersEXT(range) + return UInt32 + param range UInt32 in value + category EXT_vertex_shader + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +DeleteVertexShaderEXT(id) + return void + param id UInt32 in value + category EXT_vertex_shader + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +ShaderOp1EXT(op, res, arg1) + return void + param op VertexShaderOpEXT in value + param res UInt32 in value + param arg1 UInt32 in value + category EXT_vertex_shader + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +ShaderOp2EXT(op, res, arg1, arg2) + return void + param op VertexShaderOpEXT in value + param res UInt32 in value + param arg1 UInt32 in value + param arg2 UInt32 in value + category EXT_vertex_shader + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +ShaderOp3EXT(op, res, arg1, arg2, arg3) + return void + param op VertexShaderOpEXT in value + param res UInt32 in value + param arg1 UInt32 in value + param arg2 UInt32 in value + param arg3 UInt32 in value + category EXT_vertex_shader + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +SwizzleEXT(res, in, outX, outY, outZ, outW) + return void + param res UInt32 in value + param in UInt32 in value + param outX VertexShaderCoordOutEXT in value + param outY VertexShaderCoordOutEXT in value + param outZ VertexShaderCoordOutEXT in value + param outW VertexShaderCoordOutEXT in value + category EXT_vertex_shader + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +WriteMaskEXT(res, in, outX, outY, outZ, outW) + return void + param res UInt32 in value + param in UInt32 in value + param outX VertexShaderWriteMaskEXT in value + param outY VertexShaderWriteMaskEXT in value + param outZ VertexShaderWriteMaskEXT in value + param outW VertexShaderWriteMaskEXT in value + category EXT_vertex_shader + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +InsertComponentEXT(res, src, num) + return void + param res UInt32 in value + param src UInt32 in value + param num UInt32 in value + category EXT_vertex_shader + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +ExtractComponentEXT(res, src, num) + return void + param res UInt32 in value + param src UInt32 in value + param num UInt32 in value + category EXT_vertex_shader + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +GenSymbolsEXT(datatype, storagetype, range, components) + return UInt32 + param datatype DataTypeEXT in value + param storagetype VertexShaderStorageTypeEXT in value + param range ParameterRangeEXT in value + param components UInt32 in value + category EXT_vertex_shader + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +SetInvariantEXT(id, type, addr) + return void + param id UInt32 in value + param type ScalarType in value + param addr Void in array [COMPSIZE(id/type)] + category EXT_vertex_shader + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +SetLocalConstantEXT(id, type, addr) + return void + param id UInt32 in value + param type ScalarType in value + param addr Void in array [COMPSIZE(id/type)] + category EXT_vertex_shader + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VariantbvEXT(id, addr) + return void + param id UInt32 in value + param addr Int8 in array [COMPSIZE(id)] + category EXT_vertex_shader + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VariantsvEXT(id, addr) + return void + param id UInt32 in value + param addr Int16 in array [COMPSIZE(id)] + category EXT_vertex_shader + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VariantivEXT(id, addr) + return void + param id UInt32 in value + param addr Int32 in array [COMPSIZE(id)] + category EXT_vertex_shader + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VariantfvEXT(id, addr) + return void + param id UInt32 in value + param addr Float32 in array [COMPSIZE(id)] + category EXT_vertex_shader + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VariantdvEXT(id, addr) + return void + param id UInt32 in value + param addr Float64 in array [COMPSIZE(id)] + category EXT_vertex_shader + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VariantubvEXT(id, addr) + return void + param id UInt32 in value + param addr UInt8 in array [COMPSIZE(id)] + category EXT_vertex_shader + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VariantusvEXT(id, addr) + return void + param id UInt32 in value + param addr UInt16 in array [COMPSIZE(id)] + category EXT_vertex_shader + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VariantuivEXT(id, addr) + return void + param id UInt32 in value + param addr UInt32 in array [COMPSIZE(id)] + category EXT_vertex_shader + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VariantPointerEXT(id, type, stride, addr) + return void + param id UInt32 in value + param type ScalarType in value + param stride UInt32 in value + param addr Void in array [COMPSIZE(id/type/stride)] + category EXT_vertex_shader + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +EnableVariantClientStateEXT(id) + return void + param id UInt32 in value + category EXT_vertex_shader + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +DisableVariantClientStateEXT(id) + return void + param id UInt32 in value + category EXT_vertex_shader + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +BindLightParameterEXT(light, value) + return UInt32 + param light LightName in value + param value LightParameter in value + category EXT_vertex_shader + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +BindMaterialParameterEXT(face, value) + return UInt32 + param face MaterialFace in value + param value MaterialParameter in value + category EXT_vertex_shader + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +BindTexGenParameterEXT(unit, coord, value) + return UInt32 + param unit TextureUnit in value + param coord TextureCoordName in value + param value TextureGenParameter in value + category EXT_vertex_shader + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +BindTextureUnitParameterEXT(unit, value) + return UInt32 + param unit TextureUnit in value + param value VertexShaderTextureUnitParameter in value + category EXT_vertex_shader + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +BindParameterEXT(value) + return UInt32 + param value VertexShaderParameterEXT in value + category EXT_vertex_shader + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +IsVariantEnabledEXT(id, cap) + return Boolean + param id UInt32 in value + param cap VariantCapEXT in value + category EXT_vertex_shader + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +GetVariantBooleanvEXT(id, value, data) + return void + param id UInt32 in value + param value GetVariantValueEXT in value + param data Boolean out array [COMPSIZE(id)] + category EXT_vertex_shader + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +GetVariantIntegervEXT(id, value, data) + return void + param id UInt32 in value + param value GetVariantValueEXT in value + param data Int32 out array [COMPSIZE(id)] + category EXT_vertex_shader + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +GetVariantFloatvEXT(id, value, data) + return void + param id UInt32 in value + param value GetVariantValueEXT in value + param data Float32 out array [COMPSIZE(id)] + category EXT_vertex_shader + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +GetVariantPointervEXT(id, value, data) + return void + param id UInt32 in value + param value GetVariantValueEXT in value + param data VoidPointer out array [COMPSIZE(id)] + category EXT_vertex_shader + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +GetInvariantBooleanvEXT(id, value, data) + return void + param id UInt32 in value + param value GetVariantValueEXT in value + param data Boolean out array [COMPSIZE(id)] + category EXT_vertex_shader + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +GetInvariantIntegervEXT(id, value, data) + return void + param id UInt32 in value + param value GetVariantValueEXT in value + param data Int32 out array [COMPSIZE(id)] + category EXT_vertex_shader + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +GetInvariantFloatvEXT(id, value, data) + return void + param id UInt32 in value + param value GetVariantValueEXT in value + param data Float32 out array [COMPSIZE(id)] + category EXT_vertex_shader + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +GetLocalConstantBooleanvEXT(id, value, data) + return void + param id UInt32 in value + param value GetVariantValueEXT in value + param data Boolean out array [COMPSIZE(id)] + category EXT_vertex_shader + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +GetLocalConstantIntegervEXT(id, value, data) + return void + param id UInt32 in value + param value GetVariantValueEXT in value + param data Int32 out array [COMPSIZE(id)] + category EXT_vertex_shader + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +GetLocalConstantFloatvEXT(id, value, data) + return void + param id UInt32 in value + param value GetVariantValueEXT in value + param data Float32 out array [COMPSIZE(id)] + category EXT_vertex_shader + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +############################################################################### +# +# Extension #249 +# ATI_vertex_streams commands +# +############################################################################### + +VertexStream1sATI(stream, x) + return void + param stream VertexStreamATI in value + param x Int16 in value + category ATI_vertex_streams + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexStream1svATI(stream, coords) + return void + param stream VertexStreamATI in value + param coords Int16 in array [1] + category ATI_vertex_streams + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexStream1iATI(stream, x) + return void + param stream VertexStreamATI in value + param x Int32 in value + category ATI_vertex_streams + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexStream1ivATI(stream, coords) + return void + param stream VertexStreamATI in value + param coords Int32 in array [1] + category ATI_vertex_streams + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexStream1fATI(stream, x) + return void + param stream VertexStreamATI in value + param x Float32 in value + category ATI_vertex_streams + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexStream1fvATI(stream, coords) + return void + param stream VertexStreamATI in value + param coords Float32 in array [1] + category ATI_vertex_streams + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexStream1dATI(stream, x) + return void + param stream VertexStreamATI in value + param x Float64 in value + category ATI_vertex_streams + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexStream1dvATI(stream, coords) + return void + param stream VertexStreamATI in value + param coords Float64 in array [1] + category ATI_vertex_streams + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexStream2sATI(stream, x, y) + return void + param stream VertexStreamATI in value + param x Int16 in value + param y Int16 in value + category ATI_vertex_streams + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexStream2svATI(stream, coords) + return void + param stream VertexStreamATI in value + param coords Int16 in array [2] + category ATI_vertex_streams + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexStream2iATI(stream, x, y) + return void + param stream VertexStreamATI in value + param x Int32 in value + param y Int32 in value + category ATI_vertex_streams + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexStream2ivATI(stream, coords) + return void + param stream VertexStreamATI in value + param coords Int32 in array [2] + category ATI_vertex_streams + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexStream2fATI(stream, x, y) + return void + param stream VertexStreamATI in value + param x Float32 in value + param y Float32 in value + category ATI_vertex_streams + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexStream2fvATI(stream, coords) + return void + param stream VertexStreamATI in value + param coords Float32 in array [2] + category ATI_vertex_streams + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexStream2dATI(stream, x, y) + return void + param stream VertexStreamATI in value + param x Float64 in value + param y Float64 in value + category ATI_vertex_streams + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexStream2dvATI(stream, coords) + return void + param stream VertexStreamATI in value + param coords Float64 in array [2] + category ATI_vertex_streams + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexStream3sATI(stream, x, y, z) + return void + param stream VertexStreamATI in value + param x Int16 in value + param y Int16 in value + param z Int16 in value + category ATI_vertex_streams + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexStream3svATI(stream, coords) + return void + param stream VertexStreamATI in value + param coords Int16 in array [3] + category ATI_vertex_streams + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexStream3iATI(stream, x, y, z) + return void + param stream VertexStreamATI in value + param x Int32 in value + param y Int32 in value + param z Int32 in value + category ATI_vertex_streams + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexStream3ivATI(stream, coords) + return void + param stream VertexStreamATI in value + param coords Int32 in array [3] + category ATI_vertex_streams + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexStream3fATI(stream, x, y, z) + return void + param stream VertexStreamATI in value + param x Float32 in value + param y Float32 in value + param z Float32 in value + category ATI_vertex_streams + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexStream3fvATI(stream, coords) + return void + param stream VertexStreamATI in value + param coords Float32 in array [3] + category ATI_vertex_streams + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexStream3dATI(stream, x, y, z) + return void + param stream VertexStreamATI in value + param x Float64 in value + param y Float64 in value + param z Float64 in value + category ATI_vertex_streams + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexStream3dvATI(stream, coords) + return void + param stream VertexStreamATI in value + param coords Float64 in array [3] + category ATI_vertex_streams + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexStream4sATI(stream, x, y, z, w) + return void + param stream VertexStreamATI in value + param x Int16 in value + param y Int16 in value + param z Int16 in value + param w Int16 in value + category ATI_vertex_streams + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexStream4svATI(stream, coords) + return void + param stream VertexStreamATI in value + param coords Int16 in array [4] + category ATI_vertex_streams + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexStream4iATI(stream, x, y, z, w) + return void + param stream VertexStreamATI in value + param x Int32 in value + param y Int32 in value + param z Int32 in value + param w Int32 in value + category ATI_vertex_streams + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexStream4ivATI(stream, coords) + return void + param stream VertexStreamATI in value + param coords Int32 in array [4] + category ATI_vertex_streams + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexStream4fATI(stream, x, y, z, w) + return void + param stream VertexStreamATI in value + param x Float32 in value + param y Float32 in value + param z Float32 in value + param w Float32 in value + category ATI_vertex_streams + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexStream4fvATI(stream, coords) + return void + param stream VertexStreamATI in value + param coords Float32 in array [4] + category ATI_vertex_streams + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexStream4dATI(stream, x, y, z, w) + return void + param stream VertexStreamATI in value + param x Float64 in value + param y Float64 in value + param z Float64 in value + param w Float64 in value + category ATI_vertex_streams + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexStream4dvATI(stream, coords) + return void + param stream VertexStreamATI in value + param coords Float64 in array [4] + category ATI_vertex_streams + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +NormalStream3bATI(stream, nx, ny, nz) + return void + param stream VertexStreamATI in value + param nx Int8 in value + param ny Int8 in value + param nz Int8 in value + category ATI_vertex_streams + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +NormalStream3bvATI(stream, coords) + return void + param stream VertexStreamATI in value + param coords Int8 in array [3] + category ATI_vertex_streams + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +NormalStream3sATI(stream, nx, ny, nz) + return void + param stream VertexStreamATI in value + param nx Int16 in value + param ny Int16 in value + param nz Int16 in value + category ATI_vertex_streams + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +NormalStream3svATI(stream, coords) + return void + param stream VertexStreamATI in value + param coords Int16 in array [3] + category ATI_vertex_streams + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +NormalStream3iATI(stream, nx, ny, nz) + return void + param stream VertexStreamATI in value + param nx Int32 in value + param ny Int32 in value + param nz Int32 in value + category ATI_vertex_streams + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +NormalStream3ivATI(stream, coords) + return void + param stream VertexStreamATI in value + param coords Int32 in array [3] + category ATI_vertex_streams + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +NormalStream3fATI(stream, nx, ny, nz) + return void + param stream VertexStreamATI in value + param nx Float32 in value + param ny Float32 in value + param nz Float32 in value + category ATI_vertex_streams + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +NormalStream3fvATI(stream, coords) + return void + param stream VertexStreamATI in value + param coords Float32 in array [3] + category ATI_vertex_streams + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +NormalStream3dATI(stream, nx, ny, nz) + return void + param stream VertexStreamATI in value + param nx Float64 in value + param ny Float64 in value + param nz Float64 in value + category ATI_vertex_streams + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +NormalStream3dvATI(stream, coords) + return void + param stream VertexStreamATI in value + param coords Float64 in array [3] + category ATI_vertex_streams + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +ClientActiveVertexStreamATI(stream) + return void + param stream VertexStreamATI in value + category ATI_vertex_streams + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexBlendEnviATI(pname, param) + return void + param pname VertexStreamATI in value + param param Int32 in value + category ATI_vertex_streams + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexBlendEnvfATI(pname, param) + return void + param pname VertexStreamATI in value + param param Float32 in value + category ATI_vertex_streams + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +############################################################################### +# +# Extension #250 - WGL_I3D_digital_video_control +# Extension #251 - WGL_I3D_gamma +# Extension #252 - WGL_I3D_genlock +# Extension #253 - WGL_I3D_image_buffer +# Extension #254 - WGL_I3D_swap_frame_lock +# Extension #255 - WGL_I3D_swap_frame_usage +# +############################################################################### + +############################################################################### +# +# Extension #256 +# ATI_element_array commands +# +############################################################################### + +ElementPointerATI(type, pointer) + return void + param type ElementPointerTypeATI in value + param pointer Void in array [COMPSIZE(type)] retained + category ATI_element_array + dlflags notlistable + glxflags client-handcode client-intercept server-handcode + version 1.2 + offset ? + +DrawElementArrayATI(mode, count) + return void + param mode BeginMode in value + param count SizeI in value + category ATI_element_array + dlflags handcode + glxflags client-handcode client-intercept server-handcode + version 1.2 + offset ? + +DrawRangeElementArrayATI(mode, start, end, count) + return void + param mode BeginMode in value + param start UInt32 in value + param end UInt32 in value + param count SizeI in value + category ATI_element_array + dlflags handcode + glxflags client-handcode client-intercept server-handcode + version 1.2 + offset ? + +############################################################################### +# +# Extension #257 +# SUN_mesh_array commands +# +############################################################################### + +DrawMeshArraysSUN(mode, first, count, width) + return void + param mode BeginMode in value + param first Int32 in value + param count SizeI in value + param width SizeI in value + category SUN_mesh_array + dlflags handcode + glxflags client-handcode client-intercept server-handcode + version 1.1 + glxropcode ? + offset ? + +############################################################################### +# +# Extension #258 +# SUN_slice_accum commands +# +############################################################################### + +# (none) +newcategory: SUN_slice_accum + +############################################################################### +# +# Extension #259 +# NV_multisample_filter_hint commands +# +############################################################################### + +# (none) +newcategory: NV_multisample_filter_hint + +############################################################################### +# +# Extension #260 +# NV_depth_clamp commands +# +############################################################################### + +# (none) +newcategory: NV_depth_clamp + +############################################################################### +# +# Extension #261 +# NV_occlusion_query commands +# +############################################################################### + +GenOcclusionQueriesNV(n, ids) + return void + param n SizeI in value + param ids UInt32 out array [n] + dlflags notlistable + category NV_occlusion_query + version 1.2 + extension soft WINSOFT NV20 + glxflags ignore + +DeleteOcclusionQueriesNV(n, ids) + return void + param n SizeI in value + param ids UInt32 in array [n] + dlflags notlistable + category NV_occlusion_query + version 1.2 + extension soft WINSOFT NV20 + glxflags ignore + +IsOcclusionQueryNV(id) + return Boolean + param id UInt32 in value + dlflags notlistable + category NV_occlusion_query + version 1.2 + extension soft WINSOFT NV20 + glxflags ignore + +BeginOcclusionQueryNV(id) + return void + param id UInt32 in value + category NV_occlusion_query + version 1.2 + extension soft WINSOFT NV20 + glxflags ignore + +EndOcclusionQueryNV() + return void + category NV_occlusion_query + version 1.2 + extension soft WINSOFT NV20 + glxflags ignore + +GetOcclusionQueryivNV(id, pname, params) + return void + param id UInt32 in value + param pname OcclusionQueryParameterNameNV in value + param params Int32 out array [COMPSIZE(pname)] + dlflags notlistable + category NV_occlusion_query + version 1.2 + extension soft WINSOFT NV20 + glxflags ignore + +GetOcclusionQueryuivNV(id, pname, params) + return void + param id UInt32 in value + param pname OcclusionQueryParameterNameNV in value + param params UInt32 out array [COMPSIZE(pname)] + dlflags notlistable + category NV_occlusion_query + version 1.2 + extension soft WINSOFT NV20 + glxflags ignore + +############################################################################### +# +# Extension #262 +# NV_point_sprite commands +# +############################################################################### + +PointParameteriNV(pname, param) + return void + param pname PointParameterNameARB in value + param param Int32 in value + category NV_point_sprite + version 1.2 + extension soft WINSOFT NV20 + glxropcode 4221 + alias PointParameteri + +PointParameterivNV(pname, params) + return void + param pname PointParameterNameARB in value + param params Int32 in array [COMPSIZE(pname)] + category NV_point_sprite + version 1.2 + extension soft WINSOFT NV20 + glxropcode 4222 + alias PointParameteriv + +############################################################################### +# +# Extension #263 - WGL_NV_render_depth_texture +# Extension #264 - WGL_NV_render_texture_rectangle +# +############################################################################### + +############################################################################### +# +# Extension #265 +# NV_texture_shader3 commands +# +############################################################################### + +# (none) +newcategory: NV_texture_shader3 + +############################################################################### +# +# Extension #266 +# NV_vertex_program1_1 commands +# +############################################################################### + +# (none) +newcategory: NV_vertex_program1_1 + +############################################################################### +# +# Extension #267 +# EXT_shadow_funcs commands +# +############################################################################### + +# (none) +newcategory: EXT_shadow_funcs + +############################################################################### +# +# Extension #268 +# EXT_stencil_two_side commands +# +############################################################################### + +ActiveStencilFaceEXT(face) + return void + param face StencilFaceDirection in value + category EXT_stencil_two_side + version 1.3 + glxropcode 4220 + offset 646 + +############################################################################### +# +# Extension #269 +# ATI_text_fragment_shader commands +# +############################################################################### + +# Uses ARB_vertex_program entry points +newcategory: ATI_text_fragment_shader + +############################################################################### +# +# Extension #270 +# APPLE_client_storage commands +# +############################################################################### + +# (none) +newcategory: APPLE_client_storage + +############################################################################### +# +# Extension #271 +# APPLE_element_array commands +# +############################################################################### + +# @@ Need to verify/add GLX protocol + +# @@@ like #256 ATI_element_array +ElementPointerAPPLE(type, pointer) + return void + param type ElementPointerTypeATI in value + param pointer Void in array [type] + category APPLE_element_array + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +DrawElementArrayAPPLE(mode, first, count) + return void + param mode BeginMode in value + param first Int32 in value + param count SizeI in value + category APPLE_element_array + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +DrawRangeElementArrayAPPLE(mode, start, end, first, count) + return void + param mode BeginMode in value + param start UInt32 in value + param end UInt32 in value + param first Int32 in value + param count SizeI in value + category APPLE_element_array + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +MultiDrawElementArrayAPPLE(mode, first, count, primcount) + return void + param mode BeginMode in value + param first Int32 in array [primcount] + param count SizeI in array [primcount] + param primcount SizeI in value + category APPLE_element_array + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +MultiDrawRangeElementArrayAPPLE(mode, start, end, first, count, primcount) + return void + param mode BeginMode in value + param start UInt32 in value + param end UInt32 in value + param first Int32 in array [primcount] + param count SizeI in array [primcount] + param primcount SizeI in value + category APPLE_element_array + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +############################################################################### +# +# Extension #272 +# APPLE_fence commands +# +############################################################################### + +# @@ Need to verify/add GLX protocol + +# @@@ like #222 NV_fence +GenFencesAPPLE(n, fences) + return void + param n SizeI in value + param fences FenceNV out array [n] + category APPLE_fence + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +DeleteFencesAPPLE(n, fences) + return void + param n SizeI in value + param fences FenceNV in array [n] + category APPLE_fence + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +SetFenceAPPLE(fence) + return void + param fence FenceNV in value + category APPLE_fence + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +IsFenceAPPLE(fence) + return Boolean + param fence FenceNV in value + category APPLE_fence + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +TestFenceAPPLE(fence) + return Boolean + param fence FenceNV in value + category APPLE_fence + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +FinishFenceAPPLE(fence) + return void + param fence FenceNV in value + category APPLE_fence + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +TestObjectAPPLE(object, name) + return Boolean + param object ObjectTypeAPPLE in value + param name UInt32 in value + category APPLE_fence + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +FinishObjectAPPLE(object, name) + return void + param object ObjectTypeAPPLE in value + param name Int32 in value + category APPLE_fence + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +############################################################################### +# +# Extension #273 +# APPLE_vertex_array_object commands +# +############################################################################### + +BindVertexArrayAPPLE(array) + return void + param array UInt32 in value + category APPLE_vertex_array_object + version 1.2 + extension + glxropcode ? + glxflags ignore + alias BindVertexArray + +DeleteVertexArraysAPPLE(n, arrays) + return void + param n SizeI in value + param arrays UInt32 in array [n] + category APPLE_vertex_array_object + version 1.2 + extension + glxropcode ? + glxflags ignore + alias DeleteVertexArrays + +GenVertexArraysAPPLE(n, arrays) + return void + param n SizeI in value + param arrays UInt32 out array [n] + category APPLE_vertex_array_object + version 1.2 + extension + glxropcode ? + glxflags ignore + alias GenVertexArray + +IsVertexArrayAPPLE(array) + return Boolean + param array UInt32 in value + category APPLE_vertex_array_object + version 1.2 + extension + glxropcode ? + glxflags ignore + alias IsVertexArray + +############################################################################### +# +# Extension #274 +# APPLE_vertex_array_range commands +# +############################################################################### + +# @@ Need to verify/add GLX protocol + +# @@@ like #190 NV_vertex_array_range, +VertexArrayRangeAPPLE(length, pointer) + return void + param length SizeI in value + param pointer Void out array [length] + category APPLE_vertex_array_range + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +FlushVertexArrayRangeAPPLE(length, pointer) + return void + param length SizeI in value + param pointer Void out array [length] + category APPLE_vertex_array_range + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexArrayParameteriAPPLE(pname, param) + return void + param pname VertexArrayPNameAPPLE in value + param param Int32 in value + category APPLE_vertex_array_range + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +############################################################################### +# +# Extension #275 +# APPLE_ycbcr_422 commands +# +############################################################################### + +# (none) +newcategory: APPLE_ycbcr_422 + +############################################################################### +# +# Extension #276 +# S3_s3tc commands +# +############################################################################### + +# (none) +newcategory: S3_s3tc + +############################################################################### +# +# Extension #277 +# ATI_draw_buffers commands +# +############################################################################### + +DrawBuffersATI(n, bufs) + return void + param n SizeI in value + param bufs DrawBufferModeATI in array [n] + category ATI_draw_buffers + version 1.2 + extension + glxropcode 233 + alias DrawBuffers + +############################################################################### +# +# Extension #278 - WGL_ATI_pixel_format_float +# +############################################################################### +newcategory: ATI_pixel_format_float +passthru: /* This is really a WGL extension, but defines some associated GL enums. +passthru: * ATI does not export "GL_ATI_pixel_format_float" in the GL_EXTENSIONS string. +passthru: */ + +############################################################################### +# +# Extension #279 +# ATI_texture_env_combine3 commands +# +############################################################################### + +# (none) +newcategory: ATI_texture_env_combine3 + +############################################################################### +# +# Extension #280 +# ATI_texture_float commands +# +############################################################################### + +# (none) +newcategory: ATI_texture_float + +############################################################################### +# +# Extension #281 (also WGL_NV_float_buffer) +# NV_float_buffer commands +# +############################################################################### + +# (none) +newcategory: NV_float_buffer + +############################################################################### +# +# Extension #282 +# NV_fragment_program commands +# +############################################################################### + +# @@ Need to verify/add GLX protocol + +# Some NV_fragment_program entry points are shared with ARB_vertex_program, +# and are only included in that #define block, for now. +newcategory: NV_fragment_program +passthru: /* Some NV_fragment_program entry points are shared with ARB_vertex_program. */ + +ProgramNamedParameter4fNV(id, len, name, x, y, z, w) + return void + param id UInt32 in value + param len SizeI in value + param name UInt8 in array [1] + param x Float32 in value + param y Float32 in value + param z Float32 in value + param w Float32 in value + category NV_fragment_program + version 1.2 + extension + glxropcode ? + glxflags ignore + offset 682 + +ProgramNamedParameter4dNV(id, len, name, x, y, z, w) + return void + param id UInt32 in value + param len SizeI in value + param name UInt8 in array [1] + param x Float64 in value + param y Float64 in value + param z Float64 in value + param w Float64 in value + category NV_fragment_program + version 1.2 + extension + glxropcode ? + glxflags ignore + offset 683 + +ProgramNamedParameter4fvNV(id, len, name, v) + return void + param id UInt32 in value + param len SizeI in value + param name UInt8 in array [1] + param v Float32 in array [4] + category NV_fragment_program + version 1.2 + extension + glxropcode ? + glxflags ignore + offset 684 + +ProgramNamedParameter4dvNV(id, len, name, v) + return void + param id UInt32 in value + param len SizeI in value + param name UInt8 in array [1] + param v Float64 in array [4] + category NV_fragment_program + version 1.2 + extension + glxropcode ? + glxflags ignore + offset 685 + +GetProgramNamedParameterfvNV(id, len, name, params) + return void + param id UInt32 in value + param len SizeI in value + param name UInt8 in array [1] + param params Float32 out array [4] + category NV_fragment_program + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset 686 + +GetProgramNamedParameterdvNV(id, len, name, params) + return void + param id UInt32 in value + param len SizeI in value + param name UInt8 in array [1] + param params Float64 out array [4] + category NV_fragment_program + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset 687 + +############################################################################### +# +# Extension #283 +# NV_half_float commands +# +############################################################################### + +# @@ Need to verify/add GLX protocol + +Vertex2hNV(x, y) + return void + param x Half16NV in value + param y Half16NV in value + category NV_half_float + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +Vertex2hvNV(v) + return void + param v Half16NV in array [2] + category NV_half_float + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +Vertex3hNV(x, y, z) + return void + param x Half16NV in value + param y Half16NV in value + param z Half16NV in value + category NV_half_float + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +Vertex3hvNV(v) + return void + param v Half16NV in array [3] + category NV_half_float + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +Vertex4hNV(x, y, z, w) + return void + param x Half16NV in value + param y Half16NV in value + param z Half16NV in value + param w Half16NV in value + category NV_half_float + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +Vertex4hvNV(v) + return void + param v Half16NV in array [4] + category NV_half_float + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +Normal3hNV(nx, ny, nz) + return void + param nx Half16NV in value + param ny Half16NV in value + param nz Half16NV in value + category NV_half_float + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +Normal3hvNV(v) + return void + param v Half16NV in array [3] + category NV_half_float + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +Color3hNV(red, green, blue) + return void + param red Half16NV in value + param green Half16NV in value + param blue Half16NV in value + category NV_half_float + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +Color3hvNV(v) + return void + param v Half16NV in array [3] + category NV_half_float + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +Color4hNV(red, green, blue, alpha) + return void + param red Half16NV in value + param green Half16NV in value + param blue Half16NV in value + param alpha Half16NV in value + category NV_half_float + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +Color4hvNV(v) + return void + param v Half16NV in array [4] + category NV_half_float + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +TexCoord1hNV(s) + return void + param s Half16NV in value + category NV_half_float + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +TexCoord1hvNV(v) + return void + param v Half16NV in array [1] + category NV_half_float + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +TexCoord2hNV(s, t) + return void + param s Half16NV in value + param t Half16NV in value + category NV_half_float + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +TexCoord2hvNV(v) + return void + param v Half16NV in array [2] + category NV_half_float + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +TexCoord3hNV(s, t, r) + return void + param s Half16NV in value + param t Half16NV in value + param r Half16NV in value + category NV_half_float + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +TexCoord3hvNV(v) + return void + param v Half16NV in array [3] + category NV_half_float + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +TexCoord4hNV(s, t, r, q) + return void + param s Half16NV in value + param t Half16NV in value + param r Half16NV in value + param q Half16NV in value + category NV_half_float + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +TexCoord4hvNV(v) + return void + param v Half16NV in array [4] + category NV_half_float + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +MultiTexCoord1hNV(target, s) + return void + param target TextureUnit in value + param s Half16NV in value + category NV_half_float + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +MultiTexCoord1hvNV(target, v) + return void + param target TextureUnit in value + param v Half16NV in array [1] + category NV_half_float + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +MultiTexCoord2hNV(target, s, t) + return void + param target TextureUnit in value + param s Half16NV in value + param t Half16NV in value + category NV_half_float + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +MultiTexCoord2hvNV(target, v) + return void + param target TextureUnit in value + param v Half16NV in array [2] + category NV_half_float + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +MultiTexCoord3hNV(target, s, t, r) + return void + param target TextureUnit in value + param s Half16NV in value + param t Half16NV in value + param r Half16NV in value + category NV_half_float + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +MultiTexCoord3hvNV(target, v) + return void + param target TextureUnit in value + param v Half16NV in array [3] + category NV_half_float + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +MultiTexCoord4hNV(target, s, t, r, q) + return void + param target TextureUnit in value + param s Half16NV in value + param t Half16NV in value + param r Half16NV in value + param q Half16NV in value + category NV_half_float + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +MultiTexCoord4hvNV(target, v) + return void + param target TextureUnit in value + param v Half16NV in array [4] + category NV_half_float + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +FogCoordhNV(fog) + return void + param fog Half16NV in value + category NV_half_float + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +FogCoordhvNV(fog) + return void + param fog Half16NV in array [1] + category NV_half_float + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +SecondaryColor3hNV(red, green, blue) + return void + param red Half16NV in value + param green Half16NV in value + param blue Half16NV in value + category NV_half_float + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +SecondaryColor3hvNV(v) + return void + param v Half16NV in array [3] + category NV_half_float + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexWeighthNV(weight) + return void + param weight Half16NV in value + category NV_half_float + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexWeighthvNV(weight) + return void + param weight Half16NV in array [1] + category NV_half_float + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexAttrib1hNV(index, x) + return void + param index UInt32 in value + param x Half16NV in value + category NV_half_float + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexAttrib1hvNV(index, v) + return void + param index UInt32 in value + param v Half16NV in array [1] + category NV_half_float + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexAttrib2hNV(index, x, y) + return void + param index UInt32 in value + param x Half16NV in value + param y Half16NV in value + category NV_half_float + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexAttrib2hvNV(index, v) + return void + param index UInt32 in value + param v Half16NV in array [2] + category NV_half_float + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexAttrib3hNV(index, x, y, z) + return void + param index UInt32 in value + param x Half16NV in value + param y Half16NV in value + param z Half16NV in value + category NV_half_float + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexAttrib3hvNV(index, v) + return void + param index UInt32 in value + param v Half16NV in array [3] + category NV_half_float + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexAttrib4hNV(index, x, y, z, w) + return void + param index UInt32 in value + param x Half16NV in value + param y Half16NV in value + param z Half16NV in value + param w Half16NV in value + category NV_half_float + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexAttrib4hvNV(index, v) + return void + param index UInt32 in value + param v Half16NV in array [4] + category NV_half_float + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexAttribs1hvNV(index, n, v) + return void + param index UInt32 in value + param n SizeI in value + param v Half16NV in array [n] + category NV_half_float + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexAttribs2hvNV(index, n, v) + return void + param index UInt32 in value + param n SizeI in value + param v Half16NV in array [n] + category NV_half_float + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexAttribs3hvNV(index, n, v) + return void + param index UInt32 in value + param n SizeI in value + param v Half16NV in array [n] + category NV_half_float + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexAttribs4hvNV(index, n, v) + return void + param index UInt32 in value + param n SizeI in value + param v Half16NV in array [n] + category NV_half_float + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +############################################################################### +# +# Extension #284 +# NV_pixel_data_range commands +# +############################################################################### + +# @@ Need to verify/add GLX protocol + +PixelDataRangeNV(target, length, pointer) + return void + param target PixelDataRangeTargetNV in value + param length SizeI in value + param pointer Void out array [length] + category NV_pixel_data_range + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +FlushPixelDataRangeNV(target) + return void + param target PixelDataRangeTargetNV in value + category NV_pixel_data_range + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +############################################################################### +# +# Extension #285 +# NV_primitive_restart commands +# +############################################################################### + +# @@ Need to verify/add GLX protocol + +PrimitiveRestartNV() + return void + category NV_primitive_restart + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +PrimitiveRestartIndexNV(index) + return void + param index UInt32 in value + category NV_primitive_restart + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + + +############################################################################### +# +# Extension #286 +# NV_texture_expand_normal commands +# +############################################################################### + +# (none) +newcategory: NV_texture_expand_normal + +############################################################################### +# +# Extension #287 +# NV_vertex_program2 commands +# +############################################################################### + +# (none) +newcategory: NV_vertex_program2 + +############################################################################### +# +# Extension #288 +# ATI_map_object_buffer commands +# +############################################################################### + +# @@ Need to verify/add GLX protocol + +MapObjectBufferATI(buffer) + return VoidPointer + param buffer UInt32 in value + category ATI_map_object_buffer + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +UnmapObjectBufferATI(buffer) + return void + param buffer UInt32 in value + category ATI_map_object_buffer + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +############################################################################### +# +# Extension #289 +# ATI_separate_stencil commands +# +############################################################################### + +# @@ Need to verify/add GLX protocol + +StencilOpSeparateATI(face, sfail, dpfail, dppass) + return void + param face StencilFaceDirection in value + param sfail StencilOp in value + param dpfail StencilOp in value + param dppass StencilOp in value + category ATI_separate_stencil + version 1.2 + extension + glxropcode ? + glxflags ignore + alias StencilOpSeparate + +StencilFuncSeparateATI(frontfunc, backfunc, ref, mask) + return void + param frontfunc StencilFunction in value + param backfunc StencilFunction in value + param ref ClampedStencilValue in value + param mask MaskedStencilValue in value + category ATI_separate_stencil + version 1.2 + extension + glxropcode ? + glxflags ignore + alias StencilFuncSeparate + +############################################################################### +# +# Extension #290 +# ATI_vertex_attrib_array_object commands +# +############################################################################### + +# @@ Need to verify/add GLX protocol + +VertexAttribArrayObjectATI(index, size, type, normalized, stride, buffer, offset) + return void + param index UInt32 in value + param size Int32 in value + param type VertexAttribPointerTypeARB in value + param normalized Boolean in value + param stride SizeI in value + param buffer UInt32 in value + param offset UInt32 in value + category ATI_vertex_attrib_array_object + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +GetVertexAttribArrayObjectfvATI(index, pname, params) + return void + param index UInt32 in value + param pname ArrayObjectPNameATI in value + param params Float32 out array [pname] + category ATI_vertex_attrib_array_object + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +GetVertexAttribArrayObjectivATI(index, pname, params) + return void + param index UInt32 in value + param pname ArrayObjectPNameATI in value + param params Int32 out array [pname] + category ATI_vertex_attrib_array_object + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +############################################################################### +# +# Extension #291 - OpenGL ES only, not in glext.h +# OES_byte_coordinates commands +# +############################################################################### + +# void Vertex{234}bOES(T coords) +# void Vertex{234}bvOES(T *coords) +# void TexCoord{1234}bOES(T coords) +# void TexCoord{1234}bvOES(T *coords) +# void MultiTexCoord{1234}bOES(enum texture, T coords) +# void MultiTexCoord{1234}bvOES(enum texture, T *coords) +# All are handcode - mapped to non-byte GLX protocol on client side + +# newcategory: OES_byte_coordinates + +############################################################################### +# +# Extension #292 - OpenGL ES only, not in glext.h +# OES_fixed_point commands +# +############################################################################### + +# Too many to list in just a comment - see spec in the extension registry +# All are handcode - mapped to non-byte GLX protocol on client side + +# newcategory: OES_fixed_point + +############################################################################### +# +# Extension #293 - OpenGL ES only, not in glext.h +# OES_single_precision commands +# +############################################################################### + +# void DepthRangefOES(clampf n, clampf f) +# void FrustumfOES(float l, float r, float b, float t, float n, float f) +# void OrthofOES(float l, float r, float b, float t, float n, float f) +# void ClipPlanefOES(enum plane, const float* equation) +# void glClearDepthfOES(clampd depth) +# GLX ropcodes 4308-4312 (not respectively, see extension spec) +# void GetClipPlanefOES(enum plane, float* equation) +# GLX vendor private 1421 + +# newcategory: OES_single_precision + +############################################################################### +# +# Extension #294 - OpenGL ES only, not in glext.h +# OES_compressed_paletted_texture commands +# +############################################################################### + +# (none) +# newcategory: OES_compressed_paletted_texture + +############################################################################### +# +# Extension #295 - This is an OpenGL ES extension, but also implemented in Mesa +# OES_read_format commands +# +############################################################################### + +# (none) +newcategory: OES_read_format + +############################################################################### +# +# Extension #296 - OpenGL ES only, not in glext.h +# OES_query_matrix commands +# +############################################################################### + +# bitfield queryMatrixxOES(fixed mantissa[16], int exponent[16]) +# All are handcode - mapped to non-byte GLX protocol on client side + +# newcategory: OES_query_matrix + +############################################################################### +# +# Extension #297 +# EXT_depth_bounds_test commands +# +############################################################################### + +DepthBoundsEXT(zmin, zmax) + return void + param zmin ClampedFloat64 in value + param zmax ClampedFloat64 in value + category EXT_depth_bounds_test + version 1.2 + extension + glxropcode 4229 + offset 699 + +############################################################################### +# +# Extension #298 +# EXT_texture_mirror_clamp commands +# +############################################################################### + +# (none) +newcategory: EXT_texture_mirror_clamp + +############################################################################### +# +# Extension #299 +# EXT_blend_equation_separate commands +# +############################################################################### + +BlendEquationSeparateEXT(modeRGB, modeAlpha) + return void + param modeRGB BlendEquationModeEXT in value + param modeAlpha BlendEquationModeEXT in value + category EXT_blend_equation_separate + version 1.2 + extension + glxropcode 4228 + alias BlendEquationSeparate + +############################################################################### +# +# Extension #300 +# MESA_pack_invert commands +# +############################################################################### + +# (none) +newcategory: MESA_pack_invert + +############################################################################### +# +# Extension #301 +# MESA_ycbcr_texture commands +# +############################################################################### + +# (none) +newcategory: MESA_ycbcr_texture + +############################################################################### +# +# Extension #301 +# MESA_ycbcr_texture commands +# +############################################################################### + +# (none) +newcategory: MESA_ycbcr_texture + +############################################################################### +# +# Extension #302 +# EXT_pixel_buffer_object commands +# +############################################################################### + +# (none) +newcategory: EXT_pixel_buffer_object + +############################################################################### +# +# Extension #303 +# NV_fragment_program_option commands +# +############################################################################### + +# (none) +newcategory: NV_fragment_program_option + +############################################################################### +# +# Extension #304 +# NV_fragment_program2 commands +# +############################################################################### + +# (none) +newcategory: NV_fragment_program2 + +############################################################################### +# +# Extension #305 +# NV_vertex_program2_option commands +# +############################################################################### + +# (none) +newcategory: NV_vertex_program2_option + +############################################################################### +# +# Extension #306 +# NV_vertex_program3 commands +# +############################################################################### + +# (none) +newcategory: NV_vertex_program3 + +############################################################################### +# +# Extension #307 - GLX_SGIX_hyperpipe commands +# Extension #308 - GLX_MESA_agp_offset commands +# Extension #309 - GL_EXT_texture_compression_dxt1 (OpenGL ES only, subset of _st3c version) +# +############################################################################### + +# (none) +# newcategory: EXT_texture_compression_dxt1 + +############################################################################### +# +# Extension #310 +# EXT_framebuffer_object commands +# +############################################################################### + +IsRenderbufferEXT(renderbuffer) + return Boolean + param renderbuffer UInt32 in value + category EXT_framebuffer_object + version 1.2 + extension + glxvendorpriv 1422 + glxflags ignore + alias IsRenderbuffer + +BindRenderbufferEXT(target, renderbuffer) + return void + param target RenderbufferTarget in value + param renderbuffer UInt32 in value + category EXT_framebuffer_object + version 1.2 + extension + glxropcode 4316 + glxflags ignore + alias BindRenderbuffer + +DeleteRenderbuffersEXT(n, renderbuffers) + return void + param n SizeI in value + param renderbuffers UInt32 in array [n] + category EXT_framebuffer_object + version 1.2 + extension + glxropcode 4317 + glxflags ignore + alias DeleteRenderbuffers + +GenRenderbuffersEXT(n, renderbuffers) + return void + param n SizeI in value + param renderbuffers UInt32 out array [n] + category EXT_framebuffer_object + version 1.2 + extension + glxvendorpriv 1423 + glxflags ignore + alias GenRenderbuffers + +RenderbufferStorageEXT(target, internalformat, width, height) + return void + param target RenderbufferTarget in value + param internalformat GLenum in value + param width SizeI in value + param height SizeI in value + category EXT_framebuffer_object + version 1.2 + extension + glxropcode 4318 + glxflags ignore + alias RenderbufferStorage + +GetRenderbufferParameterivEXT(target, pname, params) + return void + param target RenderbufferTarget in value + param pname GLenum in value + param params Int32 out array [COMPSIZE(pname)] + category EXT_framebuffer_object + dlflags notlistable + version 1.2 + extension + glxvendorpriv 1424 + glxflags ignore + alias GetRenderbufferParameteriv + +IsFramebufferEXT(framebuffer) + return Boolean + param framebuffer UInt32 in value + category EXT_framebuffer_object + version 1.2 + extension + glxvendorpriv 1425 + glxflags ignore + alias IsFramebuffer + +BindFramebufferEXT(target, framebuffer) + return void + param target FramebufferTarget in value + param framebuffer UInt32 in value + category EXT_framebuffer_object + version 1.2 + extension + glxropcode 4319 + glxflags ignore + alias BindFramebuffer + +DeleteFramebuffersEXT(n, framebuffers) + return void + param n SizeI in value + param framebuffers UInt32 in array [n] + category EXT_framebuffer_object + version 1.2 + extension + glxropcode 4320 + glxflags ignore + alias DeleteFramebuffers + +GenFramebuffersEXT(n, framebuffers) + return void + param n SizeI in value + param framebuffers UInt32 out array [n] + category EXT_framebuffer_object + version 1.2 + extension + glxvendorpriv 1426 + glxflags ignore + alias GenFramebuffers + +CheckFramebufferStatusEXT(target) + return GLenum + param target FramebufferTarget in value + category EXT_framebuffer_object + version 1.2 + extension + glxvendorpriv 1427 + glxflags ignore + alias CheckFramebufferStatus + +FramebufferTexture1DEXT(target, attachment, textarget, texture, level) + return void + param target FramebufferTarget in value + param attachment FramebufferAttachment in value + param textarget GLenum in value + param texture UInt32 in value + param level Int32 in value + category EXT_framebuffer_object + version 1.2 + extension + glxropcode 4321 + glxflags ignore + alias FramebufferTexture1D + +FramebufferTexture2DEXT(target, attachment, textarget, texture, level) + return void + param target FramebufferTarget in value + param attachment FramebufferAttachment in value + param textarget GLenum in value + param texture UInt32 in value + param level Int32 in value + category EXT_framebuffer_object + version 1.2 + extension + glxropcode 4322 + glxflags ignore + alias FramebufferTexture2D + +FramebufferTexture3DEXT(target, attachment, textarget, texture, level, zoffset) + return void + param target FramebufferTarget in value + param attachment FramebufferAttachment in value + param textarget GLenum in value + param texture UInt32 in value + param level Int32 in value + param zoffset Int32 in value + category EXT_framebuffer_object + version 1.2 + extension + glxropcode 4323 + glxflags ignore + alias FramebufferTexture3D + +FramebufferRenderbufferEXT(target, attachment, renderbuffertarget, renderbuffer) + return void + param target FramebufferTarget in value + param attachment FramebufferAttachment in value + param renderbuffertarget RenderbufferTarget in value + param renderbuffer UInt32 in value + category EXT_framebuffer_object + version 1.2 + extension + glxropcode 4324 + glxflags ignore + alias FramebufferRenderbuffer + +GetFramebufferAttachmentParameterivEXT(target, attachment, pname, params) + return void + param target FramebufferTarget in value + param attachment FramebufferAttachment in value + param pname GLenum in value + param params Int32 out array [COMPSIZE(pname)] + category EXT_framebuffer_object + dlflags notlistable + version 1.2 + extension + glxvendorpriv 1428 + glxflags ignore + alias GetFramebufferAttachmentParameteriv + +GenerateMipmapEXT(target) + return void + param target GLenum in value + category EXT_framebuffer_object + version 1.2 + extension + glxropcode 4325 + glxflags ignore + alias GenerateMipmap + + +############################################################################### +# +# Extension #311 +# GREMEDY_string_marker commands +# +############################################################################### + +StringMarkerGREMEDY(len, string) + return void + param len SizeI in value + param string Void in array [len] + category GREMEDY_string_marker + version 1.0 + extension + glxflags ignore + offset ? + +############################################################################### +# +# Extension #312 +# EXT_packed_depth_stencil commands +# +############################################################################### + +# (none) +newcategory: EXT_packed_depth_stencil + +############################################################################### +# +# Extension #313 - WGL_3DL_stereo_control +# +############################################################################### + +############################################################################### +# +# Extension #314 +# EXT_stencil_clear_tag commands +# +############################################################################### + +StencilClearTagEXT(stencilTagBits, stencilClearTag) + return void + param stencilTagBits SizeI in value + param stencilClearTag UInt32 in value + category EXT_stencil_clear_tag + version 1.5 + extension + glxropcode 4223 + glxflags ignore + offset ? + +############################################################################### +# +# Extension #315 +# EXT_texture_sRGB commands +# +############################################################################### + +# (none) +newcategory: EXT_texture_sRGB + +############################################################################### +# +# Extension #316 +# EXT_framebuffer_blit commands +# +############################################################################### + +BlitFramebufferEXT(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter) + return void + param srcX0 Int32 in value + param srcY0 Int32 in value + param srcX1 Int32 in value + param srcY1 Int32 in value + param dstX0 Int32 in value + param dstY0 Int32 in value + param dstX1 Int32 in value + param dstY1 Int32 in value + param mask ClearBufferMask in value + param filter GLenum in value + category EXT_framebuffer_blit + version 1.5 + glxropcode 4330 + alias BlitFramebuffer + +############################################################################### +# +# Extension #317 +# EXT_framebuffer_multisample commands +# +############################################################################### + +RenderbufferStorageMultisampleEXT(target, samples, internalformat, width, height) + return void + param target GLenum in value + param samples SizeI in value + param internalformat GLenum in value + param width SizeI in value + param height SizeI in value + category EXT_framebuffer_multisample + version 1.5 + glxropcode 4331 + alias RenderbufferStorageMultisample + +############################################################################### +# +# Extension #318 +# MESAX_texture_stack commands +# +############################################################################### + +# (none) +newcategory: MESAX_texture_stack + +############################################################################### +# +# Extension #319 +# EXT_timer_query commands +# +############################################################################### + +GetQueryObjecti64vEXT(id, pname, params) + return void + param id UInt32 in value + param pname GLenum in value + param params Int64EXT out array [pname] + category EXT_timer_query + dlflags notlistable + version 1.5 + glxvendorpriv 1328 + glxflags ignore + offset ? + +GetQueryObjectui64vEXT(id, pname, params) + return void + param id UInt32 in value + param pname GLenum in value + param params UInt64EXT out array [pname] + category EXT_timer_query + dlflags notlistable + version 1.5 + glxvendorpriv 1329 + glxflags ignore + offset ? + +############################################################################### +# +# Extension #320 +# EXT_gpu_program_parameters commands +# +############################################################################### + +ProgramEnvParameters4fvEXT(target, index, count, params) + return void + param target ProgramTargetARB in value + param index UInt32 in value + param count SizeI in value + param params Float32 in array [count*4] + category EXT_gpu_program_parameters + version 1.2 + glxropcode 4281 + offset ? + +ProgramLocalParameters4fvEXT(target, index, count, params) + return void + param target ProgramTargetARB in value + param index UInt32 in value + param count SizeI in value + param params Float32 in array [count*4] + category EXT_gpu_program_parameters + version 1.2 + glxropcode 4282 + offset ? + +############################################################################### +# +# Extension #321 +# APPLE_flush_buffer_range commands +# +############################################################################### + +BufferParameteriAPPLE(target, pname, param) + return void + param target GLenum in value + param pname GLenum in value + param param Int32 in value + category APPLE_flush_buffer_range + version 1.5 + extension + glxropcode ? + glxflags ignore + offset ? + +FlushMappedBufferRangeAPPLE(target, offset, size) + return void + param target GLenum in value + param offset BufferOffset in value + param size BufferSize in value + category APPLE_flush_buffer_range + version 1.5 + extension + glxropcode ? + glxflags ignore + alias FlushMappedBufferRange + +############################################################################### +# +# Extension #322 +# NV_gpu_program4 commands +# +############################################################################### + +ProgramLocalParameterI4iNV(target, index, x, y, z, w) + return void + param target ProgramTarget in value + param index UInt32 in value + param x Int32 in value + param y Int32 in value + param z Int32 in value + param w Int32 in value + category NV_gpu_program4 + version 1.3 + vectorequiv ProgramLocalParameterI4ivNV + glxvectorequiv ProgramLocalParameterI4ivNV + extension soft WINSOFT NV50 + glfflags ignore + glxflags ignore + +ProgramLocalParameterI4ivNV(target, index, params) + return void + param target ProgramTarget in value + param index UInt32 in value + param params Int32 in array [4] + category NV_gpu_program4 + version 1.3 + extension soft WINSOFT NV50 + glfflags ignore + glxflags ignore + +ProgramLocalParametersI4ivNV(target, index, count, params) + return void + param target ProgramTarget in value + param index UInt32 in value + param count SizeI in value + param params Int32 in array [count*4] + category NV_gpu_program4 + version 1.3 + extension soft WINSOFT NV50 + glfflags ignore + glxflags ignore + +ProgramLocalParameterI4uiNV(target, index, x, y, z, w) + return void + param target ProgramTarget in value + param index UInt32 in value + param x UInt32 in value + param y UInt32 in value + param z UInt32 in value + param w UInt32 in value + category NV_gpu_program4 + version 1.3 + vectorequiv ProgramLocalParameterI4uivNV + glxvectorequiv ProgramLocalParameterI4uivNV + extension soft WINSOFT NV50 + glfflags ignore + glxflags ignore + +ProgramLocalParameterI4uivNV(target, index, params) + return void + param target ProgramTarget in value + param index UInt32 in value + param params UInt32 in array [4] + category NV_gpu_program4 + version 1.3 + extension soft WINSOFT NV50 + glfflags ignore + glxflags ignore + +ProgramLocalParametersI4uivNV(target, index, count, params) + return void + param target ProgramTarget in value + param index UInt32 in value + param count SizeI in value + param params UInt32 in array [count*4] + category NV_gpu_program4 + version 1.3 + extension soft WINSOFT NV50 + glfflags ignore + glxflags ignore + +ProgramEnvParameterI4iNV(target, index, x, y, z, w) + return void + param target ProgramTarget in value + param index UInt32 in value + param x Int32 in value + param y Int32 in value + param z Int32 in value + param w Int32 in value + category NV_gpu_program4 + version 1.3 + vectorequiv ProgramEnvParameterI4ivNV + glxvectorequiv ProgramEnvParameterI4ivNV + extension soft WINSOFT NV50 + glfflags ignore + glxflags ignore + +ProgramEnvParameterI4ivNV(target, index, params) + return void + param target ProgramTarget in value + param index UInt32 in value + param params Int32 in array [4] + category NV_gpu_program4 + version 1.3 + extension soft WINSOFT NV50 + glfflags ignore + glxflags ignore + +ProgramEnvParametersI4ivNV(target, index, count, params) + return void + param target ProgramTarget in value + param index UInt32 in value + param count SizeI in value + param params Int32 in array [count*4] + category NV_gpu_program4 + version 1.3 + extension soft WINSOFT NV50 + glfflags ignore + glxflags ignore + +ProgramEnvParameterI4uiNV(target, index, x, y, z, w) + return void + param target ProgramTarget in value + param index UInt32 in value + param x UInt32 in value + param y UInt32 in value + param z UInt32 in value + param w UInt32 in value + category NV_gpu_program4 + version 1.3 + vectorequiv ProgramEnvParameterI4uivNV + glxvectorequiv ProgramEnvParameterI4uivNV + extension soft WINSOFT NV50 + glfflags ignore + glxflags ignore + +ProgramEnvParameterI4uivNV(target, index, params) + return void + param target ProgramTarget in value + param index UInt32 in value + param params UInt32 in array [4] + category NV_gpu_program4 + version 1.3 + extension soft WINSOFT NV50 + glfflags ignore + glxflags ignore + +ProgramEnvParametersI4uivNV(target, index, count, params) + return void + param target ProgramTarget in value + param index UInt32 in value + param count SizeI in value + param params UInt32 in array [count*4] + category NV_gpu_program4 + version 1.3 + extension soft WINSOFT NV50 + glfflags ignore + glxflags ignore + +GetProgramLocalParameterIivNV(target, index, params) + return void + param target ProgramTarget in value + param index UInt32 in value + param params Int32 out array [4] + dlflags notlistable + category NV_gpu_program4 + version 1.3 + extension soft WINSOFT NV50 + glfflags ignore + glxflags ignore + +GetProgramLocalParameterIuivNV(target, index, params) + return void + param target ProgramTarget in value + param index UInt32 in value + param params UInt32 out array [4] + dlflags notlistable + category NV_gpu_program4 + version 1.3 + extension soft WINSOFT NV50 + glfflags ignore + glxflags ignore + +GetProgramEnvParameterIivNV(target, index, params) + return void + param target ProgramTarget in value + param index UInt32 in value + param params Int32 out array [4] + dlflags notlistable + category NV_gpu_program4 + version 1.3 + extension soft WINSOFT NV50 + glfflags ignore + glxflags ignore + +GetProgramEnvParameterIuivNV(target, index, params) + return void + param target ProgramTarget in value + param index UInt32 in value + param params UInt32 out array [4] + dlflags notlistable + category NV_gpu_program4 + version 1.3 + extension soft WINSOFT NV50 + glfflags ignore + glxflags ignore + +############################################################################### +# +# Extension #323 +# NV_geometry_program4 commands +# +############################################################################### + +ProgramVertexLimitNV(target, limit) + return void + param target ProgramTarget in value + param limit Int32 in value + category NV_geometry_program4 + version 2.0 + extension soft WINSOFT + glfflags ignore + glxflags ignore + +FramebufferTextureEXT(target, attachment, texture, level) + return void + param target FramebufferTarget in value + param attachment FramebufferAttachment in value + param texture Texture in value + param level CheckedInt32 in value + category NV_geometry_program4 + version 2.0 + extension soft WINSOFT + dlflags notlistable + glfflags ignore + glxflags ignore + alias FramebufferTextureARB + +FramebufferTextureLayerEXT(target, attachment, texture, level, layer) + return void + param target FramebufferTarget in value + param attachment FramebufferAttachment in value + param texture Texture in value + param level CheckedInt32 in value + param layer CheckedInt32 in value + category NV_geometry_program4 + version 2.0 + extension soft WINSOFT + dlflags notlistable + glfflags ignore + glxflags ignore + alias FramebufferTextureLayer + +FramebufferTextureFaceEXT(target, attachment, texture, level, face) + return void + param target FramebufferTarget in value + param attachment FramebufferAttachment in value + param texture Texture in value + param level CheckedInt32 in value + param face TextureTarget in value + category NV_geometry_program4 + version 2.0 + extension soft WINSOFT + dlflags notlistable + glfflags ignore + glxflags ignore + alias FramebufferTextureFaceARB + +############################################################################### +# +# Extension #324 +# EXT_geometry_shader4 commands +# +############################################################################### + +ProgramParameteriEXT(program, pname, value) + return void + param program UInt32 in value + param pname ProgramParameterPName in value + param value Int32 in value + category EXT_geometry_shader4 + version 2.0 + extension soft WINSOFT + glfflags ignore + glxflags ignore + alias ProgramParameteriARB + +############################################################################### +# +# Extension #325 +# NV_vertex_program4 commands +# +############################################################################### + +VertexAttribI1iEXT(index, x) + return void + param index UInt32 in value + param x Int32 in value + category NV_vertex_program4 + beginend allow-inside + vectorequiv VertexAttribI1ivEXT + glxvectorequiv VertexAttribI1ivEXT + extension soft WINSOFT NV10 + glfflags ignore + glxflags ignore + alias VertexAttribI1i + +VertexAttribI2iEXT(index, x, y) + return void + param index UInt32 in value + param x Int32 in value + param y Int32 in value + category NV_vertex_program4 + beginend allow-inside + vectorequiv VertexAttribI2ivEXT + glxvectorequiv VertexAttribI2ivEXT + extension soft WINSOFT NV10 + glfflags ignore + glxflags ignore + alias VertexAttribI2i + +VertexAttribI3iEXT(index, x, y, z) + return void + param index UInt32 in value + param x Int32 in value + param y Int32 in value + param z Int32 in value + category NV_vertex_program4 + beginend allow-inside + vectorequiv VertexAttribI3ivEXT + glxvectorequiv VertexAttribI3ivEXT + extension soft WINSOFT NV10 + glfflags ignore + glxflags ignore + alias VertexAttribI3i + +VertexAttribI4iEXT(index, x, y, z, w) + return void + param index UInt32 in value + param x Int32 in value + param y Int32 in value + param z Int32 in value + param w Int32 in value + category NV_vertex_program4 + beginend allow-inside + vectorequiv VertexAttribI4ivEXT + glxvectorequiv VertexAttribI4ivEXT + extension soft WINSOFT NV10 + glfflags ignore + glxflags ignore + alias VertexAttribI4i + +VertexAttribI1uiEXT(index, x) + return void + param index UInt32 in value + param x UInt32 in value + category NV_vertex_program4 + beginend allow-inside + vectorequiv VertexAttribI1uivEXT + glxvectorequiv VertexAttribI1uivEXT + extension soft WINSOFT NV10 + glfflags ignore + glxflags ignore + alias VertexAttribI1ui + +VertexAttribI2uiEXT(index, x, y) + return void + param index UInt32 in value + param x UInt32 in value + param y UInt32 in value + category NV_vertex_program4 + beginend allow-inside + vectorequiv VertexAttribI2uivEXT + glxvectorequiv VertexAttribI2uivEXT + extension soft WINSOFT NV10 + glfflags ignore + glxflags ignore + alias VertexAttribI2ui + +VertexAttribI3uiEXT(index, x, y, z) + return void + param index UInt32 in value + param x UInt32 in value + param y UInt32 in value + param z UInt32 in value + category NV_vertex_program4 + beginend allow-inside + vectorequiv VertexAttribI3uivEXT + glxvectorequiv VertexAttribI3uivEXT + extension soft WINSOFT NV10 + glfflags ignore + glxflags ignore + alias VertexAttribI3ui + +VertexAttribI4uiEXT(index, x, y, z, w) + return void + param index UInt32 in value + param x UInt32 in value + param y UInt32 in value + param z UInt32 in value + param w UInt32 in value + category NV_vertex_program4 + beginend allow-inside + vectorequiv VertexAttribI4uivEXT + glxvectorequiv VertexAttribI4uivEXT + extension soft WINSOFT NV10 + glfflags ignore + glxflags ignore + alias VertexAttribI4ui + +VertexAttribI1ivEXT(index, v) + return void + param index UInt32 in value + param v Int32 in array [1] + category NV_vertex_program4 + beginend allow-inside + extension soft WINSOFT NV10 + glfflags ignore + glxflags ignore + alias VertexAttribI1iv + +VertexAttribI2ivEXT(index, v) + return void + param index UInt32 in value + param v Int32 in array [2] + category NV_vertex_program4 + beginend allow-inside + extension soft WINSOFT NV10 + glfflags ignore + glxflags ignore + alias VertexAttribI2iv + +VertexAttribI3ivEXT(index, v) + return void + param index UInt32 in value + param v Int32 in array [3] + category NV_vertex_program4 + beginend allow-inside + extension soft WINSOFT NV10 + glfflags ignore + glxflags ignore + alias VertexAttribI3iv + +VertexAttribI4ivEXT(index, v) + return void + param index UInt32 in value + param v Int32 in array [4] + category NV_vertex_program4 + beginend allow-inside + extension soft WINSOFT NV10 + glfflags ignore + glxflags ignore + alias VertexAttribI4iv + +VertexAttribI1uivEXT(index, v) + return void + param index UInt32 in value + param v UInt32 in array [1] + category NV_vertex_program4 + beginend allow-inside + extension soft WINSOFT NV10 + glfflags ignore + glxflags ignore + alias VertexAttribI1uiv + +VertexAttribI2uivEXT(index, v) + return void + param index UInt32 in value + param v UInt32 in array [2] + category NV_vertex_program4 + beginend allow-inside + extension soft WINSOFT NV10 + glfflags ignore + glxflags ignore + alias VertexAttribI2uiv + +VertexAttribI3uivEXT(index, v) + return void + param index UInt32 in value + param v UInt32 in array [3] + category NV_vertex_program4 + beginend allow-inside + extension soft WINSOFT NV10 + glfflags ignore + glxflags ignore + alias VertexAttribI3uiv + +VertexAttribI4uivEXT(index, v) + return void + param index UInt32 in value + param v UInt32 in array [4] + category NV_vertex_program4 + beginend allow-inside + extension soft WINSOFT NV10 + glfflags ignore + glxflags ignore + alias VertexAttribI4uiv + +VertexAttribI4bvEXT(index, v) + return void + param index UInt32 in value + param v Int8 in array [4] + category NV_vertex_program4 + beginend allow-inside + extension soft WINSOFT NV10 + glfflags ignore + glxflags ignore + alias VertexAttribI4bv + +VertexAttribI4svEXT(index, v) + return void + param index UInt32 in value + param v Int16 in array [4] + category NV_vertex_program4 + beginend allow-inside + extension soft WINSOFT NV10 + glfflags ignore + glxflags ignore + alias VertexAttribI4sv + +VertexAttribI4ubvEXT(index, v) + return void + param index UInt32 in value + param v UInt8 in array [4] + category NV_vertex_program4 + beginend allow-inside + extension soft WINSOFT NV10 + glfflags ignore + glxflags ignore + alias VertexAttribI4ubv + +VertexAttribI4usvEXT(index, v) + return void + param index UInt32 in value + param v UInt16 in array [4] + category NV_vertex_program4 + beginend allow-inside + extension soft WINSOFT NV10 + glfflags ignore + glxflags ignore + alias VertexAttribI4usv + +VertexAttribIPointerEXT(index, size, type, stride, pointer) + return void + param index UInt32 in value + param size Int32 in value + param type VertexAttribEnum in value + param stride SizeI in value + param pointer Void in array [COMPSIZE(size/type/stride)] retained + category NV_vertex_program4 + dlflags notlistable + extension soft WINSOFT NV10 + glfflags ignore + glxflags ignore + alias VertexAttribIPointer + +GetVertexAttribIivEXT(index, pname, params) + return void + param index UInt32 in value + param pname VertexAttribEnum in value + param params Int32 out array [1] + category NV_vertex_program4 + dlflags notlistable + extension soft WINSOFT NV10 + glfflags ignore + glxflags ignore + alias GetVertexAttribIiv + +GetVertexAttribIuivEXT(index, pname, params) + return void + param index UInt32 in value + param pname VertexAttribEnum in value + param params UInt32 out array [1] + category NV_vertex_program4 + dlflags notlistable + extension soft WINSOFT NV10 + glfflags ignore + glxflags ignore + alias GetVertexAttribIuiv + +############################################################################### +# +# Extension #326 +# EXT_gpu_shader4 commands +# +############################################################################### + +GetUniformuivEXT(program, location, params) + return void + param program UInt32 in value + param location Int32 in value + param params UInt32 out array [COMPSIZE(program/location)] + category EXT_gpu_shader4 + dlflags notlistable + version 2.0 + extension soft WINSOFT + glfflags ignore + glxflags ignore + alias GetUniformuiv + +BindFragDataLocationEXT(program, color, name) + return void + param program UInt32 in value + param color UInt32 in value + param name Char in array [COMPSIZE(name)] + category EXT_gpu_shader4 + dlflags notlistable + version 2.0 + extension soft WINSOFT + glfflags ignore + glxflags ignore + alias BindFragDataLocation + +GetFragDataLocationEXT(program, name) + return Int32 + param program UInt32 in value + param name Char in array [COMPSIZE(name)] + category EXT_gpu_shader4 + dlflags notlistable + version 2.0 + extension soft WINSOFT + glfflags ignore + glxflags ignore + alias GetFragDataLocation + +Uniform1uiEXT(location, v0) + return void + param location Int32 in value + param v0 UInt32 in value + category EXT_gpu_shader4 + version 2.0 + extension soft WINSOFT + glfflags ignore + glxflags ignore + alias Uniform1ui + +Uniform2uiEXT(location, v0, v1) + return void + param location Int32 in value + param v0 UInt32 in value + param v1 UInt32 in value + category EXT_gpu_shader4 + version 2.0 + extension soft WINSOFT + glfflags ignore + glxflags ignore + alias Uniform2ui + +Uniform3uiEXT(location, v0, v1, v2) + return void + param location Int32 in value + param v0 UInt32 in value + param v1 UInt32 in value + param v2 UInt32 in value + category EXT_gpu_shader4 + version 2.0 + extension soft WINSOFT + glfflags ignore + glxflags ignore + alias Uniform3ui + +Uniform4uiEXT(location, v0, v1, v2, v3) + return void + param location Int32 in value + param v0 UInt32 in value + param v1 UInt32 in value + param v2 UInt32 in value + param v3 UInt32 in value + category EXT_gpu_shader4 + version 2.0 + extension soft WINSOFT + glfflags ignore + glxflags ignore + alias Uniform4ui + +Uniform1uivEXT(location, count, value) + return void + param location Int32 in value + param count SizeI in value + param value UInt32 in array [count] + category EXT_gpu_shader4 + version 2.0 + extension soft WINSOFT + glfflags ignore + glxflags ignore + alias Uniform1uiv + +Uniform2uivEXT(location, count, value) + return void + param location Int32 in value + param count SizeI in value + param value UInt32 in array [count*2] + category EXT_gpu_shader4 + version 2.0 + extension soft WINSOFT + glfflags ignore + glxflags ignore + alias Uniform2uiv + +Uniform3uivEXT(location, count, value) + return void + param location Int32 in value + param count SizeI in value + param value UInt32 in array [count*3] + category EXT_gpu_shader4 + version 2.0 + extension soft WINSOFT + glfflags ignore + glxflags ignore + alias Uniform3uiv + +Uniform4uivEXT(location, count, value) + return void + param location Int32 in value + param count SizeI in value + param value UInt32 in array [count*4] + category EXT_gpu_shader4 + version 2.0 + extension soft WINSOFT + glfflags ignore + glxflags ignore + alias Uniform4uiv + +############################################################################### +# +# Extension #327 +# EXT_draw_instanced commands +# +############################################################################### + +DrawArraysInstancedEXT(mode, start, count, primcount) + return void + param mode BeginMode in value + param start Int32 in value + param count SizeI in value + param primcount SizeI in value + category EXT_draw_instanced + version 2.0 + extension soft WINSOFT + dlflags notlistable + vectorequiv ArrayElement + glfflags ignore + glxflags ignore + alias DrawArraysInstancedARB + +DrawElementsInstancedEXT(mode, count, type, indices, primcount) + return void + param mode BeginMode in value + param count SizeI in value + param type DrawElementsType in value + param indices Void in array [COMPSIZE(count/type)] + param primcount SizeI in value + category EXT_draw_instanced + version 2.0 + extension soft WINSOFT + dlflags notlistable + vectorequiv ArrayElement + glfflags ignore + glxflags ignore + alias DrawElementsInstancedARB + +############################################################################### +# +# Extension #328 +# EXT_packed_float commands +# +############################################################################### + +# (none) +newcategory: EXT_packed_float + +############################################################################### +# +# Extension #329 +# EXT_texture_array commands +# +############################################################################### + +# (none) +newcategory: EXT_texture_array + +############################################################################### +# +# Extension #330 +# EXT_texture_buffer_object commands +# +############################################################################### + +TexBufferEXT(target, internalformat, buffer) + return void + param target TextureTarget in value + param internalformat GLenum in value + param buffer UInt32 in value + category EXT_texture_buffer_object + version 2.0 + extension soft WINSOFT NV50 + glfflags ignore + glxflags ignore + alias TexBufferARB + +############################################################################### +# +# Extension #331 +# EXT_texture_compression_latc commands +# +############################################################################### + +# (none) +newcategory: EXT_texture_compression_latc + +############################################################################### +# +# Extension #332 +# EXT_texture_compression_rgtc commands +# +############################################################################### + +# (none) +newcategory: EXT_texture_compression_rgtc + +############################################################################### +# +# Extension #333 +# EXT_texture_shared_exponent commands +# +############################################################################### + +# (none) +newcategory: EXT_texture_shared_exponent + +############################################################################### +# +# Extension #334 +# NV_depth_buffer_float commands +# +############################################################################### + +DepthRangedNV(zNear, zFar) + return void + param zNear Float64 in value + param zFar Float64 in value + category NV_depth_buffer_float + extension soft WINSOFT NV50 + version 2.0 + glfflags ignore + glxflags ignore + +ClearDepthdNV(depth) + return void + param depth Float64 in value + category NV_depth_buffer_float + extension soft WINSOFT NV50 + version 2.0 + glfflags ignore + glxflags ignore + +DepthBoundsdNV(zmin, zmax) + return void + param zmin Float64 in value + param zmax Float64 in value + category NV_depth_buffer_float + extension soft WINSOFT NV50 + version 2.0 + glfflags ignore + glxflags ignore + +############################################################################### +# +# Extension #335 +# NV_fragment_program4 commands +# +############################################################################### + +# (none) +newcategory: NV_fragment_program4 + +############################################################################### +# +# Extension #336 +# NV_framebuffer_multisample_coverage commands +# +############################################################################### + +RenderbufferStorageMultisampleCoverageNV(target, coverageSamples, colorSamples, internalformat, width, height) + return void + param target RenderbufferTarget in value + param coverageSamples SizeI in value + param colorSamples SizeI in value + param internalformat PixelInternalFormat in value + param width SizeI in value + param height SizeI in value + category NV_framebuffer_multisample_coverage + version 1.5 + extension soft WINSOFT + dlflags notlistable + glfflags ignore + glxflags ignore + +############################################################################### +# +# Extension #337 +# EXT_framebuffer_sRGB commands +# +############################################################################### + +# (none) +newcategory: EXT_framebuffer_sRGB + +############################################################################### +# +# Extension #338 +# NV_geometry_shader4 commands +# +############################################################################### + +# (none) +newcategory: NV_geometry_shader4 + +############################################################################### +# +# Extension #339 +# NV_parameter_buffer_object commands +# +############################################################################### + +ProgramBufferParametersfvNV(target, buffer, index, count, params) + return void + param target ProgramTarget in value + param buffer UInt32 in value + param index UInt32 in value + param count SizeI in value + param params Float32 in array [count] + category NV_parameter_buffer_object + version 1.2 + extension soft WINSOFT NV50 + glfflags ignore + glxflags ignore + +ProgramBufferParametersIivNV(target, buffer, index, count, params) + return void + param target ProgramTarget in value + param buffer UInt32 in value + param index UInt32 in value + param count SizeI in value + param params Int32 in array [count] + category NV_parameter_buffer_object + version 1.2 + extension soft WINSOFT NV50 + glfflags ignore + glxflags ignore + +ProgramBufferParametersIuivNV(target, buffer, index, count, params) + return void + param target ProgramTarget in value + param buffer UInt32 in value + param index UInt32 in value + param count SizeI in value + param params UInt32 in array [count] + category NV_parameter_buffer_object + version 1.2 + extension soft WINSOFT NV50 + glfflags ignore + glxflags ignore + +############################################################################### +# +# Extension #340 +# EXT_draw_buffers2 commands +# +############################################################################### + +ColorMaskIndexedEXT(index, r, g, b, a) + return void + param index UInt32 in value + param r Boolean in value + param g Boolean in value + param b Boolean in value + param a Boolean in value + category EXT_draw_buffers2 + version 2.0 + glxflags ignore + glfflags ignore + extension soft WINSOFT + alias ColorMaski + +GetBooleanIndexedvEXT(target, index, data) + return void + param target GLenum in value + param index UInt32 in value + param data Boolean out array [COMPSIZE(target)] + category EXT_draw_buffers2 + version 2.0 + dlflags notlistable + glxflags ignore + glfflags ignore + extension soft WINSOFT + alias GetBooleani_v + +GetIntegerIndexedvEXT(target, index, data) + return void + param target GLenum in value + param index UInt32 in value + param data Int32 out array [COMPSIZE(target)] + category EXT_draw_buffers2 + version 2.0 + dlflags notlistable + glxflags ignore + glfflags ignore + extension soft WINSOFT + alias GetIntegeri_v + +EnableIndexedEXT(target, index) + return void + param target GLenum in value + param index UInt32 in value + category EXT_draw_buffers2 + version 2.0 + glxflags ignore + glfflags ignore + extension soft WINSOFT + alias Enablei + +DisableIndexedEXT(target, index) + return void + param target GLenum in value + param index UInt32 in value + category EXT_draw_buffers2 + version 2.0 + glxflags ignore + glfflags ignore + extension soft WINSOFT + alias Disablei + +IsEnabledIndexedEXT(target, index) + return Boolean + param target GLenum in value + param index UInt32 in value + category EXT_draw_buffers2 + version 2.0 + dlflags notlistable + glxflags ignore + glfflags ignore + extension soft WINSOFT + alias IsEnabledi + +############################################################################### +# +# Extension #341 +# NV_transform_feedback commands +# +############################################################################### + +BeginTransformFeedbackNV(primitiveMode) + return void + param primitiveMode GLenum in value + category NV_transform_feedback + version 1.5 + dlflags notlistable + glxflags ignore + glfflags ignore + extension soft WINSOFT + alias BeginTransformFeedback + +EndTransformFeedbackNV() + return void + category NV_transform_feedback + version 1.5 + dlflags notlistable + glxflags ignore + glfflags ignore + extension soft WINSOFT + alias EndTransformFeedback + +TransformFeedbackAttribsNV(count, attribs, bufferMode) + return void + param count UInt32 in value + param attribs Int32 in array [COMPSIZE(count)] + param bufferMode GLenum in value + category NV_transform_feedback + version 1.5 + dlflags notlistable + glxflags ignore + glfflags ignore + extension soft WINSOFT + +BindBufferRangeNV(target, index, buffer, offset, size) + return void + param target GLenum in value + param index UInt32 in value + param buffer UInt32 in value + param offset BufferOffset in value + param size BufferSize in value + category NV_transform_feedback + version 1.5 + dlflags notlistable + glxflags ignore + glfflags ignore + extension soft WINSOFT + alias BindBufferRange + +BindBufferOffsetNV(target, index, buffer, offset) + return void + param target GLenum in value + param index UInt32 in value + param buffer UInt32 in value + param offset BufferOffset in value + category NV_transform_feedback + version 1.5 + dlflags notlistable + glxflags ignore + glfflags ignore + extension soft WINSOFT + alias BindBufferOffsetEXT + +BindBufferBaseNV(target, index, buffer) + return void + param target GLenum in value + param index UInt32 in value + param buffer UInt32 in value + category NV_transform_feedback + version 1.5 + dlflags notlistable + glxflags ignore + glfflags ignore + extension soft WINSOFT + alias BindBufferBase + +TransformFeedbackVaryingsNV(program, count, varyings, bufferMode) + return void + param program UInt32 in value + param count SizeI in value + param varyings CharPointer in array [count] + param bufferMode GLenum in value + category NV_transform_feedback + version 1.5 + dlflags notlistable + glxflags ignore + glfflags ignore + extension soft WINSOFT + alias TransformFeedbackVaryings + +ActiveVaryingNV(program, name) + return void + param program UInt32 in value + param name Char in array [COMPSIZE(name)] + category NV_transform_feedback + version 1.5 + dlflags notlistable + glxflags ignore + glfflags ignore + extension soft WINSOFT + +GetVaryingLocationNV(program, name) + return Int32 + param program UInt32 in value + param name Char in array [COMPSIZE(name)] + category NV_transform_feedback + dlflags notlistable + version 1.5 + glfflags ignore + glxflags ignore + extension soft WINSOFT + +GetActiveVaryingNV(program, index, bufSize, length, size, type, name) + return void + param program UInt32 in value + param index UInt32 in value + param bufSize SizeI in value + param length SizeI out array [1] + param size SizeI out array [1] + param type GLenum out array [1] + param name Char out array [COMPSIZE(program/index/bufSize)] + category NV_transform_feedback + dlflags notlistable + version 1.5 + extension soft WINSOFT + glfflags ignore + glxflags ignore + +GetTransformFeedbackVaryingNV(program, index, location) + return void + param program UInt32 in value + param index UInt32 in value + param location Int32 out array [1] + category NV_transform_feedback + dlflags notlistable + version 1.5 + extension soft WINSOFT + glfflags ignore + glxflags ignore + alias GetTransformFeedbackVarying + +############################################################################### +# +# Extension #342 +# EXT_bindable_uniform commands +# +############################################################################### + +UniformBufferEXT(program, location, buffer) + return void + param program UInt32 in value + param location Int32 in value + param buffer UInt32 in value + category EXT_bindable_uniform + version 2.0 + extension soft WINSOFT + glxflags ignore + glfflags ignore + +GetUniformBufferSizeEXT(program, location) + return Int32 + param program UInt32 in value + param location Int32 in value + category EXT_bindable_uniform + dlflags notlistable + version 2.0 + extension soft WINSOFT + glfflags ignore + glxflags ignore + +GetUniformOffsetEXT(program, location) + return BufferOffset + param program UInt32 in value + param location Int32 in value + category EXT_bindable_uniform + dlflags notlistable + version 2.0 + extension soft WINSOFT + glfflags ignore + glxflags ignore + +############################################################################### +# +# Extension #343 +# EXT_texture_integer extension commands +# +############################################################################### + +TexParameterIivEXT(target, pname, params) + return void + param target TextureTarget in value + param pname TextureParameterName in value + param params Int32 in array [COMPSIZE(pname)] + category EXT_texture_integer + version 2.0 + extension soft WINSOFT NV50 + glfflags ignore + glxflags ignore + alias TexParameterIiv + +TexParameterIuivEXT(target, pname, params) + return void + param target TextureTarget in value + param pname TextureParameterName in value + param params UInt32 in array [COMPSIZE(pname)] + category EXT_texture_integer + version 2.0 + extension soft WINSOFT NV50 + glfflags ignore + glxflags ignore + alias TexParameterIuiv + +GetTexParameterIivEXT(target, pname, params) + return void + param target TextureTarget in value + param pname GetTextureParameter in value + param params Int32 out array [COMPSIZE(pname)] + category EXT_texture_integer + dlflags notlistable + version 1.0 + version 2.0 + extension soft WINSOFT NV50 + glfflags ignore + glxflags ignore + alias GetTexParameterIiv + +GetTexParameterIuivEXT(target, pname, params) + return void + param target TextureTarget in value + param pname GetTextureParameter in value + param params UInt32 out array [COMPSIZE(pname)] + category EXT_texture_integer + dlflags notlistable + version 1.0 + version 2.0 + extension soft WINSOFT NV50 + glfflags ignore + glxflags ignore + alias GetTexParameterIuiv + +ClearColorIiEXT(red, green, blue, alpha) + return void + param red Int32 in value + param green Int32 in value + param blue Int32 in value + param alpha Int32 in value + category EXT_texture_integer + version 2.0 + extension soft WINSOFT NV50 + glfflags ignore + glxflags ignore + +ClearColorIuiEXT(red, green, blue, alpha) + return void + param red UInt32 in value + param green UInt32 in value + param blue UInt32 in value + param alpha UInt32 in value + category EXT_texture_integer + version 2.0 + extension soft WINSOFT NV50 + glfflags ignore + glxflags ignore + +############################################################################### +# +# Extension #344 - GLX_EXT_texture_from_pixmap +# +############################################################################### + +############################################################################### +# +# Extension #345 +# GREMEDY_frame_terminator commands +# +############################################################################### + +FrameTerminatorGREMEDY() + return void + category GREMEDY_frame_terminator + version 1.0 + extension + glxflags ignore + offset ? + +############################################################################### +# +# Extension #346 +# NV_conditional_render commands +# +############################################################################### + +BeginConditionalRenderNV(id, mode) + return void + param id UInt32 in value + param mode TypeEnum in value + category NV_conditional_render + glfflags ignore + glxflags ignore + alias BeginConditionalRender + +EndConditionalRenderNV() + return void + category NV_conditional_render + glfflags ignore + glxflags ignore + alias EndConditionalRender + +############################################################################### +# +# Extension #347 +# NV_present_video commands +# +############################################################################### + +# TBD +# void PresentFrameKeyedNV(uint video_slot, uint64EXT minPresentTime, +# uint beginPresentTimeId, uint +# presentDurationId, enum type, enum target0, +# uint fill0, uint key0, enum target1, uint +# fill1, uint key1); +# +# void PresentFrameDualFillNV(uint video_slot, uint64EXT +# minPresentTime, uint beginPresentTimeId, +# uint presentDurationId, enum type, enum +# target0, uint fill0, enum target1, uint +# fill1, enum target2, uint fill2, enum +# target3, uint fill3); +# +# void GetVideoivNV(uint video_slot, enum pname, int *params); +# void GetVideouivNV(uint video_slot, enum pname, uint *params); +# void GetVideoi64vNV(uint video_slot, enum pname, int64EXT *params); +# void GetVideoui64vNV(uint video_slot, enum pname, uint64EXT *params); +# void VideoParameterivNV(uint video_slot, enum pname, const int *params); + +PresentFrameKeyedNV(video_slot, minPresentTime, beginPresentTimeId, presentDurationId, type, target0, fill0, key0, target1, fill1, key1) + return void + param video_slot UInt32 in value + param minPresentTime UInt64EXT in value + param beginPresentTimeId UInt32 in value + param presentDurationId UInt32 in value + param type GLenum in value + param target0 GLenum in value + param fill0 UInt32 in value + param key0 UInt32 in value + param target1 GLenum in value + param fill1 UInt32 in value + param key1 UInt32 in value + category NV_present_video + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +PresentFrameDualFillNV(video_slot, minPresentTime, beginPresentTimeId, presentDurationId, type, target0, fill0, target1, fill1, target2, fill2, target3, fill3) + return void + param video_slot UInt32 in value + param minPresentTime UInt64EXT in value + param beginPresentTimeId UInt32 in value + param presentDurationId UInt32 in value + param type GLenum in value + param target0 GLenum in value + param fill0 UInt32 in value + param target1 GLenum in value + param fill1 UInt32 in value + param target2 GLenum in value + param fill2 UInt32 in value + param target3 GLenum in value + param fill3 UInt32 in value + category NV_present_video + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +GetVideoivNV(video_slot, pname, params) + return void + param video_slot UInt32 in value + param pname GLenum in value + param params Int32 out array [COMPSIZE(pname)] + category NV_present_video + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +GetVideouivNV(video_slot, pname, params) + return void + param video_slot UInt32 in value + param pname GLenum in value + param params UInt32 out array [COMPSIZE(pname)] + category NV_present_video + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +GetVideoi64vNV(video_slot, pname, params) + return void + param video_slot UInt32 in value + param pname GLenum in value + param params Int64EXT out array [COMPSIZE(pname)] + category NV_present_video + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +GetVideoui64vNV(video_slot, pname, params) + return void + param video_slot UInt32 in value + param pname GLenum in value + param params UInt64EXT out array [COMPSIZE(pname)] + category NV_present_video + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +############################################################################### +# +# Extension #348 - GLX_NV_video_out +# Extension #349 - WGL_NV_video_out +# Extension #350 - GLX_NV_swap_group +# Extension #351 - WGL_NV_swap_group +# +############################################################################### + +############################################################################### +# +# Extension #352 +# EXT_transform_feedback commands +# +############################################################################### + +# From EXT_draw_buffers2: GetBooleanIndexedvEXT / GetIntegerIndexedvEXT + +BeginTransformFeedbackEXT(primitiveMode) + return void + param primitiveMode GLenum in value + category EXT_transform_feedback + version 2.0 + dlflags notlistable + glxflags ignore + glfflags ignore + extension soft WINSOFT + alias BeginTransformFeedback + +EndTransformFeedbackEXT() + return void + category EXT_transform_feedback + version 2.0 + dlflags notlistable + glxflags ignore + glfflags ignore + extension soft WINSOFT + alias EndTransformFeedback + +BindBufferRangeEXT(target, index, buffer, offset, size) + return void + param target GLenum in value + param index UInt32 in value + param buffer UInt32 in value + param offset BufferOffset in value + param size BufferSize in value + category EXT_transform_feedback + version 2.0 + dlflags notlistable + glxflags ignore + glfflags ignore + extension soft WINSOFT + alias BindBufferRange + +# Not promoted to the OpenGL 3.0 core +BindBufferOffsetEXT(target, index, buffer, offset) + return void + param target GLenum in value + param index UInt32 in value + param buffer UInt32 in value + param offset BufferOffset in value + category EXT_transform_feedback + version 2.0 + dlflags notlistable + glxflags ignore + glfflags ignore + extension soft WINSOFT + +BindBufferBaseEXT(target, index, buffer) + return void + param target GLenum in value + param index UInt32 in value + param buffer UInt32 in value + category EXT_transform_feedback + version 2.0 + dlflags notlistable + glxflags ignore + glfflags ignore + extension soft WINSOFT + alias BindBufferBase + +TransformFeedbackVaryingsEXT(program, count, varyings, bufferMode) + return void + param program UInt32 in value + param count SizeI in value + param varyings CharPointer in array [count] + param bufferMode GLenum in value + category EXT_transform_feedback + version 2.0 + dlflags notlistable + glxflags ignore + glfflags ignore + extension soft WINSOFT + alias TransformFeedbackVaryings + +GetTransformFeedbackVaryingEXT(program, index, bufSize, length, size, type, name) + return void + param program UInt32 in value + param index UInt32 in value + param bufSize SizeI in value + param length SizeI out array [1] + param size SizeI out array [1] + param type GLenum out array [1] + param name Char out array [COMPSIZE(length)] + category EXT_transform_feedback + dlflags notlistable + version 2.0 + extension soft WINSOFT + glfflags ignore + glxflags ignore + alias GetTransformFeedbackVarying + +############################################################################### +# +# Extension #353 +# EXT_direct_state_access commands +# +############################################################################### + +# New 1.1 client commands + +ClientAttribDefaultEXT(mask) + return void + param mask ClientAttribMask in value + category EXT_direct_state_access + extension soft WINSOFT + dlflags notlistable + glxflags ignore ### client-handcode client-intercept server-handcode + +PushClientAttribDefaultEXT(mask) + return void + param mask ClientAttribMask in value + category EXT_direct_state_access + extension soft WINSOFT + dlflags notlistable + glxflags ignore ### client-handcode client-intercept server-handcode + +# New 1.0 matrix commands + +MatrixLoadfEXT(mode, m) + return void + param mode MatrixMode in value + param m Float32 in array [16] + category EXT_direct_state_access + extension soft WINSOFT + glxflags ignore + glfflags ignore + +MatrixLoaddEXT(mode, m) + return void + param mode MatrixMode in value + param m Float64 in array [16] + category EXT_direct_state_access + extension soft WINSOFT + glxflags ignore + glfflags ignore + +MatrixMultfEXT(mode, m) + return void + param mode MatrixMode in value + param m Float32 in array [16] + category EXT_direct_state_access + extension soft WINSOFT + glxflags ignore + glfflags ignore + +MatrixMultdEXT(mode, m) + return void + param mode MatrixMode in value + param m Float64 in array [16] + category EXT_direct_state_access + extension soft WINSOFT + glxflags ignore + glfflags ignore + +MatrixLoadIdentityEXT(mode) + return void + param mode MatrixMode in value + category EXT_direct_state_access + extension soft WINSOFT + glxflags ignore + glfflags ignore + +MatrixRotatefEXT(mode, angle, x, y, z) + return void + param mode MatrixMode in value + param angle Float32 in value + param x Float32 in value + param y Float32 in value + param z Float32 in value + category EXT_direct_state_access + extension soft WINSOFT + glxflags ignore + glfflags ignore + +MatrixRotatedEXT(mode, angle, x, y, z) + return void + param mode MatrixMode in value + param angle Float64 in value + param x Float64 in value + param y Float64 in value + param z Float64 in value + category EXT_direct_state_access + extension soft WINSOFT + glxflags ignore + glfflags ignore + +MatrixScalefEXT(mode, x, y, z) + return void + param mode MatrixMode in value + param x Float32 in value + param y Float32 in value + param z Float32 in value + category EXT_direct_state_access + extension soft WINSOFT + glxflags ignore + glfflags ignore + +MatrixScaledEXT(mode, x, y, z) + return void + param mode MatrixMode in value + param x Float64 in value + param y Float64 in value + param z Float64 in value + category EXT_direct_state_access + extension soft WINSOFT + glxflags ignore + glfflags ignore + +MatrixTranslatefEXT(mode, x, y, z) + return void + param mode MatrixMode in value + param x Float32 in value + param y Float32 in value + param z Float32 in value + category EXT_direct_state_access + extension soft WINSOFT + glxflags ignore + glfflags ignore + +MatrixTranslatedEXT(mode, x, y, z) + return void + param mode MatrixMode in value + param x Float64 in value + param y Float64 in value + param z Float64 in value + category EXT_direct_state_access + extension soft WINSOFT + glxflags ignore + glfflags ignore + +MatrixFrustumEXT(mode, left, right, bottom, top, zNear, zFar) + return void + param mode MatrixMode in value + param left Float64 in value + param right Float64 in value + param bottom Float64 in value + param top Float64 in value + param zNear Float64 in value + param zFar Float64 in value + category EXT_direct_state_access + extension soft WINSOFT + glxflags ignore + glfflags ignore + +MatrixOrthoEXT(mode, left, right, bottom, top, zNear, zFar) + return void + param mode MatrixMode in value + param left Float64 in value + param right Float64 in value + param bottom Float64 in value + param top Float64 in value + param zNear Float64 in value + param zFar Float64 in value + category EXT_direct_state_access + extension soft WINSOFT + glxflags ignore + glfflags ignore + +MatrixPopEXT(mode) + return void + param mode MatrixMode in value + category EXT_direct_state_access + extension soft WINSOFT + glxflags ignore + glfflags ignore + +MatrixPushEXT(mode) + return void + param mode MatrixMode in value + category EXT_direct_state_access + extension soft WINSOFT + glxflags ignore + glfflags ignore + +# New 1.3 matrix transpose commands + +MatrixLoadTransposefEXT(mode, m) + return void + param mode MatrixMode in value + param m Float32 in array [16] + category EXT_direct_state_access + extension soft WINSOFT + glxflags ignore + glfflags ignore + +MatrixLoadTransposedEXT(mode, m) + return void + param mode MatrixMode in value + param m Float64 in array [16] + category EXT_direct_state_access + extension soft WINSOFT + glxflags ignore + glfflags ignore + +MatrixMultTransposefEXT(mode, m) + return void + param mode MatrixMode in value + param m Float32 in array [16] + category EXT_direct_state_access + extension soft WINSOFT + glxflags ignore + glfflags ignore + +MatrixMultTransposedEXT(mode, m) + return void + param mode MatrixMode in value + param m Float64 in array [16] + category EXT_direct_state_access + extension soft WINSOFT + glxflags ignore + glfflags ignore + +# New 1.1 texture object commands + +TextureParameterfEXT(texture, target, pname, param) + return void + param texture Texture in value + param target TextureTarget in value + param pname TextureParameterName in value + param param CheckedFloat32 in value + category EXT_direct_state_access + extension soft WINSOFT + glxflags ignore + glfflags ignore + vectorequiv TextureParameterfvEXT + +TextureParameterfvEXT(texture, target, pname, params) + return void + param texture Texture in value + param target TextureTarget in value + param pname TextureParameterName in value + param params CheckedFloat32 in array [COMPSIZE(pname)] + category EXT_direct_state_access + extension soft WINSOFT + glxflags ignore + glfflags ignore + +TextureParameteriEXT(texture, target, pname, param) + return void + param texture Texture in value + param target TextureTarget in value + param pname TextureParameterName in value + param param CheckedInt32 in value + category EXT_direct_state_access + extension soft WINSOFT + glxflags ignore + glfflags ignore + vectorequiv TextureParameterivEXT + +TextureParameterivEXT(texture, target, pname, params) + return void + param texture Texture in value + param target TextureTarget in value + param pname TextureParameterName in value + param params CheckedInt32 in array [COMPSIZE(pname)] + category EXT_direct_state_access + extension soft WINSOFT + glxflags ignore + glfflags ignore + +TextureImage1DEXT(texture, target, level, internalformat, width, border, format, type, pixels) + return void + param texture Texture in value + param target TextureTarget in value + param level CheckedInt32 in value + param internalformat TextureInternalFormat in value + param width SizeI in value + param border CheckedInt32 in value + param format PixelFormat in value + param type PixelType in value + param pixels Void in array [COMPSIZE(format/type/width)] + category EXT_direct_state_access + dlflags handcode + glxflags ignore ### client-handcode server-handcode + extension soft WINSOFT + glfflags capture-handcode decode-handcode pixel-unpack + +TextureImage2DEXT(texture, target, level, internalformat, width, height, border, format, type, pixels) + return void + param texture Texture in value + param target TextureTarget in value + param level CheckedInt32 in value + param internalformat TextureInternalFormat in value + param width SizeI in value + param height SizeI in value + param border CheckedInt32 in value + param format PixelFormat in value + param type PixelType in value + param pixels Void in array [COMPSIZE(format/type/width/height)] + category EXT_direct_state_access + dlflags handcode + glxflags ignore ### client-handcode server-handcode + extension soft WINSOFT + glfflags capture-handcode decode-handcode pixel-unpack + +TextureSubImage1DEXT(texture, target, level, xoffset, width, format, type, pixels) + return void + param texture Texture in value + param target TextureTarget in value + param level CheckedInt32 in value + param xoffset CheckedInt32 in value + param width SizeI in value + param format PixelFormat in value + param type PixelType in value + param pixels Void in array [COMPSIZE(format/type/width)] + category EXT_direct_state_access + dlflags handcode + glxflags ignore ### EXT client-handcode server-handcode + glxflags ignore + extension soft WINSOFT + glfflags ignore + +TextureSubImage2DEXT(texture, target, level, xoffset, yoffset, width, height, format, type, pixels) + return void + param texture Texture in value + param target TextureTarget in value + param level CheckedInt32 in value + param xoffset CheckedInt32 in value + param yoffset CheckedInt32 in value + param width SizeI in value + param height SizeI in value + param format PixelFormat in value + param type PixelType in value + param pixels Void in array [COMPSIZE(format/type/width/height)] + category EXT_direct_state_access + dlflags handcode + glxflags ignore ### EXT client-handcode server-handcode + extension soft WINSOFT + glfflags ignore + +CopyTextureImage1DEXT(texture, target, level, internalformat, x, y, width, border) + return void + param texture Texture in value + param target TextureTarget in value + param level CheckedInt32 in value + param internalformat TextureInternalFormat in value + param x WinCoord in value + param y WinCoord in value + param width SizeI in value + param border CheckedInt32 in value + category EXT_direct_state_access + extension soft WINSOFT + glxflags ignore ### EXT + +CopyTextureImage2DEXT(texture, target, level, internalformat, x, y, width, height, border) + return void + param texture Texture in value + param target TextureTarget in value + param level CheckedInt32 in value + param internalformat TextureInternalFormat in value + param x WinCoord in value + param y WinCoord in value + param width SizeI in value + param height SizeI in value + param border CheckedInt32 in value + category EXT_direct_state_access + extension soft WINSOFT + glxflags ignore ### EXT + +CopyTextureSubImage1DEXT(texture, target, level, xoffset, x, y, width) + return void + param texture Texture in value + param target TextureTarget in value + param level CheckedInt32 in value + param xoffset CheckedInt32 in value + param x WinCoord in value + param y WinCoord in value + param width SizeI in value + category EXT_direct_state_access + extension soft WINSOFT + glxflags ignore ### EXT + +CopyTextureSubImage2DEXT(texture, target, level, xoffset, yoffset, x, y, width, height) + return void + param texture Texture in value + param target TextureTarget in value + param level CheckedInt32 in value + param xoffset CheckedInt32 in value + param yoffset CheckedInt32 in value + param x WinCoord in value + param y WinCoord in value + param width SizeI in value + param height SizeI in value + category EXT_direct_state_access + extension soft WINSOFT + glxflags ignore ### EXT + +# New 1.1 texture object queries + +GetTextureImageEXT(texture, target, level, format, type, pixels) + return void + param texture Texture in value + param target TextureTarget in value + param level CheckedInt32 in value + param format PixelFormat in value + param type PixelType in value + param pixels Void out array [COMPSIZE(target/level/format/type)] + category EXT_direct_state_access + dlflags notlistable + glxflags ignore ### client-handcode server-handcode + extension soft WINSOFT + glfflags capture-execute capture-handcode decode-handcode pixel-pack + +GetTextureParameterfvEXT(texture, target, pname, params) + return void + param texture Texture in value + param target TextureTarget in value + param pname GetTextureParameter in value + param params Float32 out array [COMPSIZE(pname)] + category EXT_direct_state_access + dlflags notlistable + extension soft WINSOFT + glxflags ignore + glfflags capture-execute gl-enum + +GetTextureParameterivEXT(texture, target, pname, params) + return void + param texture Texture in value + param target TextureTarget in value + param pname GetTextureParameter in value + param params Int32 out array [COMPSIZE(pname)] + category EXT_direct_state_access + dlflags notlistable + extension soft WINSOFT + glxflags ignore + glfflags capture-execute gl-enum + +GetTextureLevelParameterfvEXT(texture, target, level, pname, params) + return void + param texture Texture in value + param target TextureTarget in value + param level CheckedInt32 in value + param pname GetTextureParameter in value + param params Float32 out array [COMPSIZE(pname)] + category EXT_direct_state_access + dlflags notlistable + extension soft WINSOFT + glxflags ignore + glfflags capture-execute gl-enum + +GetTextureLevelParameterivEXT(texture, target, level, pname, params) + return void + param texture Texture in value + param target TextureTarget in value + param level CheckedInt32 in value + param pname GetTextureParameter in value + param params Int32 out array [COMPSIZE(pname)] + category EXT_direct_state_access + dlflags notlistable + extension soft WINSOFT + glxflags ignore + glfflags capture-execute gl-enum + +# New 1.2 3D texture object commands + +TextureImage3DEXT(texture, target, level, internalformat, width, height, depth, border, format, type, pixels) + return void + param texture Texture in value + param target TextureTarget in value + param level CheckedInt32 in value + param internalformat TextureInternalFormat in value + param width SizeI in value + param height SizeI in value + param depth SizeI in value + param border CheckedInt32 in value + param format PixelFormat in value + param type PixelType in value + param pixels Void in array [COMPSIZE(format/type/width/height/depth)] + category EXT_direct_state_access + dlflags handcode + glxflags ignore ### client-handcode server-handcode EXT + extension soft WINSOFT + glfflags ignore + +TextureSubImage3DEXT(texture, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels) + return void + param texture Texture in value + param target TextureTarget in value + param level CheckedInt32 in value + param xoffset CheckedInt32 in value + param yoffset CheckedInt32 in value + param zoffset CheckedInt32 in value + param width SizeI in value + param height SizeI in value + param depth SizeI in value + param format PixelFormat in value + param type PixelType in value + param pixels Void in array [COMPSIZE(format/type/width/height/depth)] + category EXT_direct_state_access + dlflags handcode + glxflags ignore ### client-handcode server-handcode EXT + extension soft WINSOFT + glfflags ignore + +CopyTextureSubImage3DEXT(texture, target, level, xoffset, yoffset, zoffset, x, y, width, height) + return void + param texture Texture in value + param target TextureTarget in value + param level CheckedInt32 in value + param xoffset CheckedInt32 in value + param yoffset CheckedInt32 in value + param zoffset CheckedInt32 in value + param x WinCoord in value + param y WinCoord in value + param width SizeI in value + param height SizeI in value + category EXT_direct_state_access + glxflags ignore ### EXT + extension soft WINSOFT + glfflags ignore + +# New 1.1 multitexture commands + +MultiTexParameterfEXT(texunit, target, pname, param) + return void + param texunit TextureUnit in value + param target TextureTarget in value + param pname TextureParameterName in value + param param CheckedFloat32 in value + category EXT_direct_state_access + extension soft WINSOFT + glxflags ignore + glfflags ignore + vectorequiv MultiTexParameterfvEXT + +MultiTexParameterfvEXT(texunit, target, pname, params) + return void + param texunit TextureUnit in value + param target TextureTarget in value + param pname TextureParameterName in value + param params CheckedFloat32 in array [COMPSIZE(pname)] + category EXT_direct_state_access + extension soft WINSOFT + glxflags ignore + glfflags ignore + +MultiTexParameteriEXT(texunit, target, pname, param) + return void + param texunit TextureUnit in value + param target TextureTarget in value + param pname TextureParameterName in value + param param CheckedInt32 in value + category EXT_direct_state_access + extension soft WINSOFT + glxflags ignore + glfflags ignore + vectorequiv MultiTexParameterivEXT + +MultiTexParameterivEXT(texunit, target, pname, params) + return void + param texunit TextureUnit in value + param target TextureTarget in value + param pname TextureParameterName in value + param params CheckedInt32 in array [COMPSIZE(pname)] + category EXT_direct_state_access + extension soft WINSOFT + glxflags ignore + glfflags ignore + +MultiTexImage1DEXT(texunit, target, level, internalformat, width, border, format, type, pixels) + return void + param texunit TextureUnit in value + param target TextureTarget in value + param level CheckedInt32 in value + param internalformat TextureInternalFormat in value + param width SizeI in value + param border CheckedInt32 in value + param format PixelFormat in value + param type PixelType in value + param pixels Void in array [COMPSIZE(format/type/width)] + category EXT_direct_state_access + dlflags handcode + glxflags ignore ### client-handcode server-handcode + extension soft WINSOFT + glfflags capture-handcode decode-handcode pixel-unpack + +MultiTexImage2DEXT(texunit, target, level, internalformat, width, height, border, format, type, pixels) + return void + param texunit TextureUnit in value + param target TextureTarget in value + param level CheckedInt32 in value + param internalformat TextureInternalFormat in value + param width SizeI in value + param height SizeI in value + param border CheckedInt32 in value + param format PixelFormat in value + param type PixelType in value + param pixels Void in array [COMPSIZE(format/type/width/height)] + category EXT_direct_state_access + dlflags handcode + glxflags ignore ### client-handcode server-handcode + extension soft WINSOFT + glfflags capture-handcode decode-handcode pixel-unpack + +MultiTexSubImage1DEXT(texunit, target, level, xoffset, width, format, type, pixels) + return void + param texunit TextureUnit in value + param target TextureTarget in value + param level CheckedInt32 in value + param xoffset CheckedInt32 in value + param width SizeI in value + param format PixelFormat in value + param type PixelType in value + param pixels Void in array [COMPSIZE(format/type/width)] + category EXT_direct_state_access + dlflags handcode + glxflags ignore ### EXT client-handcode server-handcode + extension soft WINSOFT + glfflags ignore + +MultiTexSubImage2DEXT(texunit, target, level, xoffset, yoffset, width, height, format, type, pixels) + return void + param texunit TextureUnit in value + param target TextureTarget in value + param level CheckedInt32 in value + param xoffset CheckedInt32 in value + param yoffset CheckedInt32 in value + param width SizeI in value + param height SizeI in value + param format PixelFormat in value + param type PixelType in value + param pixels Void in array [COMPSIZE(format/type/width/height)] + category EXT_direct_state_access + dlflags handcode + glxflags ignore ### EXT client-handcode server-handcode + extension soft WINSOFT + glfflags ignore + +CopyMultiTexImage1DEXT(texunit, target, level, internalformat, x, y, width, border) + return void + param texunit TextureUnit in value + param target TextureTarget in value + param level CheckedInt32 in value + param internalformat TextureInternalFormat in value + param x WinCoord in value + param y WinCoord in value + param width SizeI in value + param border CheckedInt32 in value + category EXT_direct_state_access + extension soft WINSOFT + glxflags ignore ### EXT + +CopyMultiTexImage2DEXT(texunit, target, level, internalformat, x, y, width, height, border) + return void + param texunit TextureUnit in value + param target TextureTarget in value + param level CheckedInt32 in value + param internalformat TextureInternalFormat in value + param x WinCoord in value + param y WinCoord in value + param width SizeI in value + param height SizeI in value + param border CheckedInt32 in value + category EXT_direct_state_access + extension soft WINSOFT + glxflags ignore ### EXT + +CopyMultiTexSubImage1DEXT(texunit, target, level, xoffset, x, y, width) + return void + param texunit TextureUnit in value + param target TextureTarget in value + param level CheckedInt32 in value + param xoffset CheckedInt32 in value + param x WinCoord in value + param y WinCoord in value + param width SizeI in value + category EXT_direct_state_access + extension soft WINSOFT + glxflags ignore ### EXT + +CopyMultiTexSubImage2DEXT(texunit, target, level, xoffset, yoffset, x, y, width, height) + return void + param texunit TextureUnit in value + param target TextureTarget in value + param level CheckedInt32 in value + param xoffset CheckedInt32 in value + param yoffset CheckedInt32 in value + param x WinCoord in value + param y WinCoord in value + param width SizeI in value + param height SizeI in value + category EXT_direct_state_access + extension soft WINSOFT + glxflags ignore ### EXT + +# New 1.1 multitexture queries + +GetMultiTexImageEXT(texunit, target, level, format, type, pixels) + return void + param texunit TextureUnit in value + param target TextureTarget in value + param level CheckedInt32 in value + param format PixelFormat in value + param type PixelType in value + param pixels Void out array [COMPSIZE(target/level/format/type)] + category EXT_direct_state_access + dlflags notlistable + glxflags ignore ### client-handcode server-handcode + extension soft WINSOFT + glfflags capture-execute capture-handcode decode-handcode pixel-pack + +GetMultiTexParameterfvEXT(texunit, target, pname, params) + return void + param texunit TextureUnit in value + param target TextureTarget in value + param pname GetTextureParameter in value + param params Float32 out array [COMPSIZE(pname)] + category EXT_direct_state_access + dlflags notlistable + extension soft WINSOFT + glxflags ignore + glfflags capture-execute gl-enum + +GetMultiTexParameterivEXT(texunit, target, pname, params) + return void + param texunit TextureUnit in value + param target TextureTarget in value + param pname GetTextureParameter in value + param params Int32 out array [COMPSIZE(pname)] + category EXT_direct_state_access + dlflags notlistable + extension soft WINSOFT + glxflags ignore + glfflags capture-execute gl-enum + +GetMultiTexLevelParameterfvEXT(texunit, target, level, pname, params) + return void + param texunit TextureUnit in value + param target TextureTarget in value + param level CheckedInt32 in value + param pname GetTextureParameter in value + param params Float32 out array [COMPSIZE(pname)] + category EXT_direct_state_access + dlflags notlistable + extension soft WINSOFT + glxflags ignore + glfflags capture-execute gl-enum + +GetMultiTexLevelParameterivEXT(texunit, target, level, pname, params) + return void + param texunit TextureUnit in value + param target TextureTarget in value + param level CheckedInt32 in value + param pname GetTextureParameter in value + param params Int32 out array [COMPSIZE(pname)] + category EXT_direct_state_access + dlflags notlistable + extension soft WINSOFT + glxflags ignore + glfflags capture-execute gl-enum + +# New 1.2 3D multitexture commands + +MultiTexImage3DEXT(texunit, target, level, internalformat, width, height, depth, border, format, type, pixels) + return void + param texunit TextureUnit in value + param target TextureTarget in value + param level CheckedInt32 in value + param internalformat TextureInternalFormat in value + param width SizeI in value + param height SizeI in value + param depth SizeI in value + param border CheckedInt32 in value + param format PixelFormat in value + param type PixelType in value + param pixels Void in array [COMPSIZE(format/type/width/height/depth)] + category EXT_direct_state_access + dlflags handcode + glxflags ignore ### client-handcode server-handcode EXT + extension soft WINSOFT + glfflags ignore + +MultiTexSubImage3DEXT(texunit, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels) + return void + param texunit TextureUnit in value + param target TextureTarget in value + param level CheckedInt32 in value + param xoffset CheckedInt32 in value + param yoffset CheckedInt32 in value + param zoffset CheckedInt32 in value + param width SizeI in value + param height SizeI in value + param depth SizeI in value + param format PixelFormat in value + param type PixelType in value + param pixels Void in array [COMPSIZE(format/type/width/height/depth)] + category EXT_direct_state_access + dlflags handcode + glxflags ignore ### client-handcode server-handcode EXT + extension soft WINSOFT + glfflags ignore + +CopyMultiTexSubImage3DEXT(texunit, target, level, xoffset, yoffset, zoffset, x, y, width, height) + return void + param texunit TextureUnit in value + param target TextureTarget in value + param level CheckedInt32 in value + param xoffset CheckedInt32 in value + param yoffset CheckedInt32 in value + param zoffset CheckedInt32 in value + param x WinCoord in value + param y WinCoord in value + param width SizeI in value + param height SizeI in value + category EXT_direct_state_access + glxflags ignore ### EXT + extension soft WINSOFT + glfflags ignore + +# New 1.2.1 multitexture texture commands + +BindMultiTextureEXT(texunit, target, texture) + return void + param texunit TextureUnit in value + param target TextureTarget in value + param texture Texture in value + category EXT_direct_state_access + extension soft WINSOFT + glxflags ignore ### EXT + +EnableClientStateIndexedEXT(array, index) + return void + param array EnableCap in value + param index UInt32 in value + category EXT_direct_state_access + dlflags notlistable + glxflags ignore ### client-handcode client-intercept server-handcode + extension soft WINSOFT + +DisableClientStateIndexedEXT(array, index) + return void + param array EnableCap in value + param index UInt32 in value + category EXT_direct_state_access + extension soft WINSOFT + dlflags notlistable + glxflags ignore ### client-handcode client-intercept server-handcode + +MultiTexCoordPointerEXT(texunit, size, type, stride, pointer) + return void + param texunit TextureUnit in value + param size Int32 in value + param type TexCoordPointerType in value + param stride SizeI in value + param pointer Void in array [COMPSIZE(size/type/stride)] retained + category EXT_direct_state_access + dlflags notlistable + glxflags ignore ### client-handcode client-intercept server-handcode + extension soft WINSOFT + glfflags ignore + +MultiTexEnvfEXT(texunit, target, pname, param) + return void + param texunit TextureUnit in value + param target TextureEnvTarget in value + param pname TextureEnvParameter in value + param param CheckedFloat32 in value + category EXT_direct_state_access + extension soft WINSOFT + vectorequiv MultiTexEnvfvEXT + glxflags ignore + glfflags gl-enum + +MultiTexEnvfvEXT(texunit, target, pname, params) + return void + param texunit TextureUnit in value + param target TextureEnvTarget in value + param pname TextureEnvParameter in value + param params CheckedFloat32 in array [COMPSIZE(pname)] + category EXT_direct_state_access + extension soft WINSOFT + glxflags ignore + glfflags gl-enum + +MultiTexEnviEXT(texunit, target, pname, param) + return void + param texunit TextureUnit in value + param target TextureEnvTarget in value + param pname TextureEnvParameter in value + param param CheckedInt32 in value + category EXT_direct_state_access + extension soft WINSOFT + vectorequiv MultiTexEnvivEXT + glxflags ignore + glfflags gl-enum + +MultiTexEnvivEXT(texunit, target, pname, params) + return void + param texunit TextureUnit in value + param target TextureEnvTarget in value + param pname TextureEnvParameter in value + param params CheckedInt32 in array [COMPSIZE(pname)] + category EXT_direct_state_access + extension soft WINSOFT + glxflags ignore + glfflags gl-enum + +MultiTexGendEXT(texunit, coord, pname, param) + return void + param texunit TextureUnit in value + param coord TextureCoordName in value + param pname TextureGenParameter in value + param param Float64 in value + category EXT_direct_state_access + extension soft WINSOFT + vectorequiv MultiTexGendvEXT + glxflags ignore + glfflags gl-enum + +MultiTexGendvEXT(texunit, coord, pname, params) + return void + param texunit TextureUnit in value + param coord TextureCoordName in value + param pname TextureGenParameter in value + param params Float64 in array [COMPSIZE(pname)] + category EXT_direct_state_access + extension soft WINSOFT + glxflags ignore + glfflags gl-enum + +MultiTexGenfEXT(texunit, coord, pname, param) + return void + param texunit TextureUnit in value + param coord TextureCoordName in value + param pname TextureGenParameter in value + param param CheckedFloat32 in value + category EXT_direct_state_access + extension soft WINSOFT + vectorequiv MultiTexGenfvEXT + glxflags ignore + glfflags gl-enum + +MultiTexGenfvEXT(texunit, coord, pname, params) + return void + param texunit TextureUnit in value + param coord TextureCoordName in value + param pname TextureGenParameter in value + param params CheckedFloat32 in array [COMPSIZE(pname)] + category EXT_direct_state_access + extension soft WINSOFT + glxflags ignore + glfflags gl-enum + +MultiTexGeniEXT(texunit, coord, pname, param) + return void + param texunit TextureUnit in value + param coord TextureCoordName in value + param pname TextureGenParameter in value + param param CheckedInt32 in value + category EXT_direct_state_access + extension soft WINSOFT + vectorequiv MultiTexGenivEXT + glxflags ignore + glfflags gl-enum + +MultiTexGenivEXT(texunit, coord, pname, params) + return void + param texunit TextureUnit in value + param coord TextureCoordName in value + param pname TextureGenParameter in value + param params CheckedInt32 in array [COMPSIZE(pname)] + category EXT_direct_state_access + extension soft WINSOFT + glxflags ignore + glfflags gl-enum + +# New 1.2.1 multitexture texture queries + +GetMultiTexEnvfvEXT(texunit, target, pname, params) + return void + param texunit TextureUnit in value + param target TextureEnvTarget in value + param pname TextureEnvParameter in value + param params Float32 out array [COMPSIZE(pname)] + category EXT_direct_state_access + dlflags notlistable + extension soft WINSOFT + glxflags ignore + glfflags capture-execute gl-enum + +GetMultiTexEnvivEXT(texunit, target, pname, params) + return void + param texunit TextureUnit in value + param target TextureEnvTarget in value + param pname TextureEnvParameter in value + param params Int32 out array [COMPSIZE(pname)] + category EXT_direct_state_access + dlflags notlistable + extension soft WINSOFT + glxflags ignore + glfflags capture-execute gl-enum + +GetMultiTexGendvEXT(texunit, coord, pname, params) + return void + param texunit TextureUnit in value + param coord TextureCoordName in value + param pname TextureGenParameter in value + param params Float64 out array [COMPSIZE(pname)] + category EXT_direct_state_access + dlflags notlistable + extension soft WINSOFT + glxflags ignore + glfflags capture-execute gl-enum + +GetMultiTexGenfvEXT(texunit, coord, pname, params) + return void + param texunit TextureUnit in value + param coord TextureCoordName in value + param pname TextureGenParameter in value + param params Float32 out array [COMPSIZE(pname)] + category EXT_direct_state_access + dlflags notlistable + extension soft WINSOFT + glxflags ignore + glfflags capture-execute gl-enum + +GetMultiTexGenivEXT(texunit, coord, pname, params) + return void + param texunit TextureUnit in value + param coord TextureCoordName in value + param pname TextureGenParameter in value + param params Int32 out array [COMPSIZE(pname)] + category EXT_direct_state_access + dlflags notlistable + extension soft WINSOFT + glxflags ignore + glfflags capture-execute gl-enum + +# From EXT_draw_buffers2 +# EnableIndexedEXT +# DisableIndexedEXT +# IsEnabledIndexedEXT + +GetFloatIndexedvEXT(target, index, data) + return void + param target TypeEnum in value + param index UInt32 in value + param data Float32 out array [COMPSIZE(target)] + category EXT_direct_state_access + dlflags notlistable + glxflags ignore + glfflags ignore + extension soft WINSOFT + +GetDoubleIndexedvEXT(target, index, data) + return void + param target TypeEnum in value + param index UInt32 in value + param data Float64 out array [COMPSIZE(target)] + category EXT_direct_state_access + dlflags notlistable + glxflags ignore + glfflags ignore + extension soft WINSOFT + +GetPointerIndexedvEXT(target, index, data) + return void + param target TypeEnum in value + param index UInt32 in value + param data VoidPointer out array [COMPSIZE(target)] + category EXT_direct_state_access + dlflags notlistable + glxflags ignore + glfflags ignore + extension soft WINSOFT + +# New compressed texture commands + +CompressedTextureImage3DEXT(texture, target, level, internalformat, width, height, depth, border, imageSize, bits) + return void + param texture Texture in value + param target TextureTarget in value + param level CheckedInt32 in value + param internalformat TextureInternalFormat in value + param width SizeI in value + param height SizeI in value + param depth SizeI in value + param border CheckedInt32 in value + param imageSize SizeI in value + param bits Void in array [imageSize] + category EXT_direct_state_access + dlflags handcode + glxflags ignore ### client-handcode server-handcode + glfflags ignore + extension soft WINSOFT + +CompressedTextureImage2DEXT(texture, target, level, internalformat, width, height, border, imageSize, bits) + return void + param texture Texture in value + param target TextureTarget in value + param level CheckedInt32 in value + param internalformat TextureInternalFormat in value + param width SizeI in value + param height SizeI in value + param border CheckedInt32 in value + param imageSize SizeI in value + param bits Void in array [imageSize] + category EXT_direct_state_access + dlflags handcode + glxflags ignore ### client-handcode server-handcode + glfflags ignore + extension soft WINSOFT + +CompressedTextureImage1DEXT(texture, target, level, internalformat, width, border, imageSize, bits) + return void + param texture Texture in value + param target TextureTarget in value + param level CheckedInt32 in value + param internalformat TextureInternalFormat in value + param width SizeI in value + param border CheckedInt32 in value + param imageSize SizeI in value + param bits Void in array [imageSize] + category EXT_direct_state_access + dlflags handcode + glxflags ignore ### client-handcode server-handcode + glfflags ignore + extension soft WINSOFT + +CompressedTextureSubImage3DEXT(texture, target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, bits) + return void + param texture Texture in value + param target TextureTarget in value + param level CheckedInt32 in value + param xoffset CheckedInt32 in value + param yoffset CheckedInt32 in value + param zoffset CheckedInt32 in value + param width SizeI in value + param height SizeI in value + param depth SizeI in value + param format PixelFormat in value + param imageSize SizeI in value + param bits Void in array [imageSize] + category EXT_direct_state_access + dlflags handcode + glxflags ignore ### client-handcode server-handcode + glfflags ignore + extension soft WINSOFT + +CompressedTextureSubImage2DEXT(texture, target, level, xoffset, yoffset, width, height, format, imageSize, bits) + return void + param texture Texture in value + param target TextureTarget in value + param level CheckedInt32 in value + param xoffset CheckedInt32 in value + param yoffset CheckedInt32 in value + param width SizeI in value + param height SizeI in value + param format PixelFormat in value + param imageSize SizeI in value + param bits Void in array [imageSize] + category EXT_direct_state_access + dlflags handcode + glxflags ignore ### client-handcode server-handcode + glfflags ignore + extension soft WINSOFT + +CompressedTextureSubImage1DEXT(texture, target, level, xoffset, width, format, imageSize, bits) + return void + param texture Texture in value + param target TextureTarget in value + param level CheckedInt32 in value + param xoffset CheckedInt32 in value + param width SizeI in value + param format PixelFormat in value + param imageSize SizeI in value + param bits Void in array [imageSize] + category EXT_direct_state_access + dlflags handcode + glxflags ignore ### client-handcode server-handcode + glfflags ignore + extension soft WINSOFT + +# New compressed texture query + +GetCompressedTextureImageEXT(texture, target, lod, img) + return void + param texture Texture in value + param target TextureTarget in value + param lod CheckedInt32 in value + param img Void out array [COMPSIZE(target/lod)] + category EXT_direct_state_access + dlflags notlistable + glxflags ignore ### server-handcode + extension soft WINSOFT + +# New compressed multitexture commands + +CompressedMultiTexImage3DEXT(texunit, target, level, internalformat, width, height, depth, border, imageSize, bits) + return void + param texunit TextureUnit in value + param target TextureTarget in value + param level CheckedInt32 in value + param internalformat TextureInternalFormat in value + param width SizeI in value + param height SizeI in value + param depth SizeI in value + param border CheckedInt32 in value + param imageSize SizeI in value + param bits Void in array [imageSize] + category EXT_direct_state_access + dlflags handcode + glxflags ignore ### client-handcode server-handcode + glfflags ignore + extension soft WINSOFT + +CompressedMultiTexImage2DEXT(texunit, target, level, internalformat, width, height, border, imageSize, bits) + return void + param texunit TextureUnit in value + param target TextureTarget in value + param level CheckedInt32 in value + param internalformat TextureInternalFormat in value + param width SizeI in value + param height SizeI in value + param border CheckedInt32 in value + param imageSize SizeI in value + param bits Void in array [imageSize] + category EXT_direct_state_access + dlflags handcode + glxflags ignore ### client-handcode server-handcode + glfflags ignore + extension soft WINSOFT + +CompressedMultiTexImage1DEXT(texunit, target, level, internalformat, width, border, imageSize, bits) + return void + param texunit TextureUnit in value + param target TextureTarget in value + param level CheckedInt32 in value + param internalformat TextureInternalFormat in value + param width SizeI in value + param border CheckedInt32 in value + param imageSize SizeI in value + param bits Void in array [imageSize] + category EXT_direct_state_access + dlflags handcode + glxflags ignore ### client-handcode server-handcode + glfflags ignore + extension soft WINSOFT + +CompressedMultiTexSubImage3DEXT(texunit, target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, bits) + return void + param texunit TextureUnit in value + param target TextureTarget in value + param level CheckedInt32 in value + param xoffset CheckedInt32 in value + param yoffset CheckedInt32 in value + param zoffset CheckedInt32 in value + param width SizeI in value + param height SizeI in value + param depth SizeI in value + param format PixelFormat in value + param imageSize SizeI in value + param bits Void in array [imageSize] + category EXT_direct_state_access + dlflags handcode + glxflags ignore ### client-handcode server-handcode + glfflags ignore + extension soft WINSOFT + +CompressedMultiTexSubImage2DEXT(texunit, target, level, xoffset, yoffset, width, height, format, imageSize, bits) + return void + param texunit TextureUnit in value + param target TextureTarget in value + param level CheckedInt32 in value + param xoffset CheckedInt32 in value + param yoffset CheckedInt32 in value + param width SizeI in value + param height SizeI in value + param format PixelFormat in value + param imageSize SizeI in value + param bits Void in array [imageSize] + category EXT_direct_state_access + dlflags handcode + glxflags ignore ### client-handcode server-handcode + glfflags ignore + extension soft WINSOFT + +CompressedMultiTexSubImage1DEXT(texunit, target, level, xoffset, width, format, imageSize, bits) + return void + param texunit TextureUnit in value + param target TextureTarget in value + param level CheckedInt32 in value + param xoffset CheckedInt32 in value + param width SizeI in value + param format PixelFormat in value + param imageSize SizeI in value + param bits Void in array [imageSize] + category EXT_direct_state_access + dlflags handcode + glxflags ignore ### client-handcode server-handcode + glfflags ignore + extension soft WINSOFT + +# New compressed multitexture query + +GetCompressedMultiTexImageEXT(texunit, target, lod, img) + return void + param texunit TextureUnit in value + param target TextureTarget in value + param lod CheckedInt32 in value + param img Void out array [COMPSIZE(target/lod)] + category EXT_direct_state_access + dlflags notlistable + glxflags ignore ### server-handcode + extension soft WINSOFT + +# New ARB assembly program named commands + +NamedProgramStringEXT(program, target, format, len, string) + return void + param program UInt32 in value + param target ProgramTarget in value + param format ProgramFormat in value + param len SizeI in value + param string Void in array [len] + category EXT_direct_state_access + subcategory ARB_vertex_program + extension soft WINSOFT + glfflags ignore + glxflags ignore ### client-handcode server-handcode EXT + glextmask GL_MASK_ARB_vertex_program|GL_MASK_ARB_fragment_program + +NamedProgramLocalParameter4dEXT(program, target, index, x, y, z, w) + return void + param program UInt32 in value + param target ProgramTarget in value + param index UInt32 in value + param x Float64 in value + param y Float64 in value + param z Float64 in value + param w Float64 in value + category EXT_direct_state_access + subcategory ARB_vertex_program + vectorequiv NamedProgramLocalParameter4dvEXT + glxvectorequiv NamedProgramLocalParameter4dvEXT + extension soft WINSOFT NV10 + glfflags ignore + glxflags ignore ### EXT + glextmask GL_MASK_ARB_vertex_program|GL_MASK_ARB_fragment_program + +NamedProgramLocalParameter4dvEXT(program, target, index, params) + return void + param program UInt32 in value + param target ProgramTarget in value + param index UInt32 in value + param params Float64 in array [4] + category EXT_direct_state_access + subcategory ARB_vertex_program + extension soft WINSOFT NV10 + glfflags ignore + glxflags ignore ### EXT + glextmask GL_MASK_ARB_vertex_program|GL_MASK_ARB_fragment_program + +NamedProgramLocalParameter4fEXT(program, target, index, x, y, z, w) + return void + param program UInt32 in value + param target ProgramTarget in value + param index UInt32 in value + param x Float32 in value + param y Float32 in value + param z Float32 in value + param w Float32 in value + category EXT_direct_state_access + subcategory ARB_vertex_program + vectorequiv NamedProgramLocalParameter4fvEXT + glxvectorequiv NamedProgramLocalParameter4fvEXT + extension soft WINSOFT NV10 + glfflags ignore + glxflags ignore ### EXT + glextmask GL_MASK_ARB_vertex_program|GL_MASK_ARB_fragment_program + +NamedProgramLocalParameter4fvEXT(program, target, index, params) + return void + param program UInt32 in value + param target ProgramTarget in value + param index UInt32 in value + param params Float32 in array [4] + category EXT_direct_state_access + subcategory ARB_vertex_program + extension soft WINSOFT NV10 + glfflags ignore + glxflags ignore ### EXT + glextmask GL_MASK_ARB_vertex_program|GL_MASK_ARB_fragment_program + +# New ARB assembly program named queries + +GetNamedProgramLocalParameterdvEXT(program, target, index, params) + return void + param program UInt32 in value + param target ProgramTarget in value + param index UInt32 in value + param params Float64 out array [4] + dlflags notlistable + category EXT_direct_state_access + subcategory ARB_vertex_program + extension soft WINSOFT NV10 + glfflags ignore + glxflags ignore ### client-handcode server-handcode EXT + glextmask GL_MASK_ARB_vertex_program|GL_MASK_ARB_fragment_program + +GetNamedProgramLocalParameterfvEXT(program, target, index, params) + return void + param program UInt32 in value + param target ProgramTarget in value + param index UInt32 in value + param params Float32 out array [4] + dlflags notlistable + category EXT_direct_state_access + subcategory ARB_vertex_program + extension soft WINSOFT NV10 + glfflags ignore + glxflags ignore ### client-handcode server-handcode EXT + glextmask GL_MASK_ARB_vertex_program|GL_MASK_ARB_fragment_program + +GetNamedProgramivEXT(program, target, pname, params) + return void + param program UInt32 in value + param target ProgramTarget in value + param pname ProgramProperty in value + param params Int32 out array [1] + dlflags notlistable + category EXT_direct_state_access + subcategory ARB_vertex_program + extension soft WINSOFT NV10 + glfflags ignore + glxflags ignore ### client-handcode server-handcode EXT + glextmask GL_MASK_ARB_vertex_program|GL_MASK_ARB_fragment_program + +GetNamedProgramStringEXT(program, target, pname, string) + return void + param program UInt32 in value + param target ProgramTarget in value + param pname ProgramStringProperty in value + param string Void out array [COMPSIZE(program,pname)] + dlflags notlistable + category EXT_direct_state_access + subcategory ARB_vertex_program + extension soft WINSOFT NV10 + glfflags ignore + glxflags ignore ### client-handcode server-handcode EXT + glextmask GL_MASK_ARB_vertex_program|GL_MASK_ARB_fragment_program + +# New EXT_gpu_program_parameters command + +NamedProgramLocalParameters4fvEXT(program, target, index, count, params) + return void + param program UInt32 in value + param target ProgramTarget in value + param index UInt32 in value + param count SizeI in value + param params Float32 in array [count*4] + category EXT_direct_state_access + subcategory EXT_gpu_program_parameters + extension soft WINSOFT NV10 + glfflags ignore + glxflags ignore + glextmask GL_MASK_EXT_gpu_program_parameters + +# New NV_gpu_program4 commands + +NamedProgramLocalParameterI4iEXT(program, target, index, x, y, z, w) + return void + param program UInt32 in value + param target ProgramTarget in value + param index UInt32 in value + param x Int32 in value + param y Int32 in value + param z Int32 in value + param w Int32 in value + category EXT_direct_state_access + subcategory NV_gpu_program4 + vectorequiv NamedProgramLocalParameterI4ivEXT + glxvectorequiv NamedProgramLocalParameterI4ivEXT + extension soft WINSOFT NV50 + glfflags ignore + glxflags ignore + glextmask GL_MASK_NV_gpu_program4 + +NamedProgramLocalParameterI4ivEXT(program, target, index, params) + return void + param program UInt32 in value + param target ProgramTarget in value + param index UInt32 in value + param params Int32 in array [4] + category EXT_direct_state_access + subcategory NV_gpu_program4 + extension soft WINSOFT NV50 + glfflags ignore + glxflags ignore + glextmask GL_MASK_NV_gpu_program4 + +NamedProgramLocalParametersI4ivEXT(program, target, index, count, params) + return void + param program UInt32 in value + param target ProgramTarget in value + param index UInt32 in value + param count SizeI in value + param params Int32 in array [count*4] + category EXT_direct_state_access + subcategory NV_gpu_program4 + extension soft WINSOFT NV50 + glfflags ignore + glxflags ignore + glextmask GL_MASK_NV_gpu_program4 + +NamedProgramLocalParameterI4uiEXT(program, target, index, x, y, z, w) + return void + param program UInt32 in value + param target ProgramTarget in value + param index UInt32 in value + param x UInt32 in value + param y UInt32 in value + param z UInt32 in value + param w UInt32 in value + category EXT_direct_state_access + subcategory NV_gpu_program4 + vectorequiv NamedProgramLocalParameterI4uivEXT + glxvectorequiv NamedProgramLocalParameterI4uivEXT + extension soft WINSOFT NV50 + glfflags ignore + glxflags ignore + glextmask GL_MASK_NV_gpu_program4 + +NamedProgramLocalParameterI4uivEXT(program, target, index, params) + return void + param program UInt32 in value + param target ProgramTarget in value + param index UInt32 in value + param params UInt32 in array [4] + category EXT_direct_state_access + subcategory NV_gpu_program4 + extension soft WINSOFT NV50 + glfflags ignore + glxflags ignore + glextmask GL_MASK_NV_gpu_program4 + +NamedProgramLocalParametersI4uivEXT(program, target, index, count, params) + return void + param program UInt32 in value + param target ProgramTarget in value + param index UInt32 in value + param count SizeI in value + param params UInt32 in array [count*4] + category EXT_direct_state_access + subcategory NV_gpu_program4 + extension soft WINSOFT NV50 + glfflags ignore + glxflags ignore + glextmask GL_MASK_NV_gpu_program4 + +GetNamedProgramLocalParameterIivEXT(program, target, index, params) + return void + param program UInt32 in value + param target ProgramTarget in value + param index UInt32 in value + param params Int32 out array [4] + dlflags notlistable + category EXT_direct_state_access + subcategory NV_gpu_program4 + extension soft WINSOFT NV50 + glfflags ignore + glxflags ignore + glextmask GL_MASK_NV_gpu_program4 + +GetNamedProgramLocalParameterIuivEXT(program, target, index, params) + return void + param program UInt32 in value + param target ProgramTarget in value + param index UInt32 in value + param params UInt32 out array [4] + dlflags notlistable + category EXT_direct_state_access + subcategory NV_gpu_program4 + extension soft WINSOFT NV50 + glfflags ignore + glxflags ignore + glextmask GL_MASK_NV_gpu_program4 + +# New EXT_texture_integer texture object commands + +TextureParameterIivEXT(texture, target, pname, params) + return void + param texture Texture in value + param target TextureTarget in value + param pname TextureParameterName in value + param params CheckedInt32 in array [COMPSIZE(pname)] + category EXT_direct_state_access + subcategory EXT_texture_integer + extension soft WINSOFT + glxflags ignore + glfflags ignore + glextmask GL_MASK_EXT_texture_integer + +TextureParameterIuivEXT(texture, target, pname, params) + return void + param texture Texture in value + param target TextureTarget in value + param pname TextureParameterName in value + param params UInt32 in array [COMPSIZE(pname)] + category EXT_direct_state_access + subcategory EXT_texture_integer + extension soft WINSOFT + glxflags ignore + glfflags ignore + glextmask GL_MASK_EXT_texture_integer + +# New EXT_texture_integer texture object queries + +GetTextureParameterIivEXT(texture, target, pname, params) + return void + param texture Texture in value + param target TextureTarget in value + param pname GetTextureParameter in value + param params Int32 out array [COMPSIZE(pname)] + category EXT_direct_state_access + subcategory EXT_texture_integer + dlflags notlistable + extension soft WINSOFT + glxflags ignore + glfflags capture-execute gl-enum + glextmask GL_MASK_EXT_texture_integer + +GetTextureParameterIuivEXT(texture, target, pname, params) + return void + param texture Texture in value + param target TextureTarget in value + param pname GetTextureParameter in value + param params UInt32 out array [COMPSIZE(pname)] + category EXT_direct_state_access + subcategory EXT_texture_integer + dlflags notlistable + extension soft WINSOFT + glxflags ignore + glfflags capture-execute gl-enum + glextmask GL_MASK_EXT_texture_integer + +# New EXT_texture_integer multitexture commands + +MultiTexParameterIivEXT(texunit, target, pname, params) + return void + param texunit TextureUnit in value + param target TextureTarget in value + param pname TextureParameterName in value + param params CheckedInt32 in array [COMPSIZE(pname)] + category EXT_direct_state_access + subcategory EXT_texture_integer + extension soft WINSOFT + glxflags ignore + glfflags ignore + glextmask GL_MASK_EXT_texture_integer + +MultiTexParameterIuivEXT(texunit, target, pname, params) + return void + param texunit TextureUnit in value + param target TextureTarget in value + param pname TextureParameterName in value + param params UInt32 in array [COMPSIZE(pname)] + category EXT_direct_state_access + subcategory EXT_texture_integer + extension soft WINSOFT + glxflags ignore + glfflags ignore + glextmask GL_MASK_EXT_texture_integer + +# New EXT_texture_integer multitexture queries + +GetMultiTexParameterIivEXT(texunit, target, pname, params) + return void + param texunit TextureUnit in value + param target TextureTarget in value + param pname GetTextureParameter in value + param params Int32 out array [COMPSIZE(pname)] + category EXT_direct_state_access + subcategory EXT_texture_integer + dlflags notlistable + extension soft WINSOFT + glfflags capture-execute gl-enum + glxflags ignore + glextmask GL_MASK_EXT_texture_integer + +GetMultiTexParameterIuivEXT(texunit, target, pname, params) + return void + param texunit TextureUnit in value + param target TextureTarget in value + param pname GetTextureParameter in value + param params UInt32 out array [COMPSIZE(pname)] + category EXT_direct_state_access + subcategory EXT_texture_integer + dlflags notlistable + extension soft WINSOFT + glfflags capture-execute gl-enum + glxflags ignore + glextmask GL_MASK_EXT_texture_integer + +# New GLSL 2.0 uniform commands + +ProgramUniform1fEXT(program, location, v0) + return void + param program UInt32 in value + param location Int32 in value + param v0 Float32 in value + category EXT_direct_state_access + subcategory VERSION_2_0 + glfflags ignore + glxflags ignore + extension soft WINSOFT + glextmask GL_MASK_OpenGL_2_0 + +ProgramUniform2fEXT(program, location, v0, v1) + return void + param program UInt32 in value + param location Int32 in value + param v0 Float32 in value + param v1 Float32 in value + category EXT_direct_state_access + subcategory VERSION_2_0 + glfflags ignore + glxflags ignore + extension soft WINSOFT + glextmask GL_MASK_OpenGL_2_0 + +ProgramUniform3fEXT(program, location, v0, v1, v2) + return void + param program UInt32 in value + param location Int32 in value + param v0 Float32 in value + param v1 Float32 in value + param v2 Float32 in value + category EXT_direct_state_access + subcategory VERSION_2_0 + glfflags ignore + glxflags ignore + extension soft WINSOFT + glextmask GL_MASK_OpenGL_2_0 + +ProgramUniform4fEXT(program, location, v0, v1, v2, v3) + return void + param program UInt32 in value + param location Int32 in value + param v0 Float32 in value + param v1 Float32 in value + param v2 Float32 in value + param v3 Float32 in value + category EXT_direct_state_access + subcategory VERSION_2_0 + glfflags ignore + glxflags ignore + extension soft WINSOFT + glextmask GL_MASK_OpenGL_2_0 + +ProgramUniform1iEXT(program, location, v0) + return void + param program UInt32 in value + param location Int32 in value + param v0 Int32 in value + category EXT_direct_state_access + subcategory VERSION_2_0 + glfflags ignore + glxflags ignore + extension soft WINSOFT + glextmask GL_MASK_OpenGL_2_0 + +ProgramUniform2iEXT(program, location, v0, v1) + return void + param program UInt32 in value + param location Int32 in value + param v0 Int32 in value + param v1 Int32 in value + category EXT_direct_state_access + subcategory VERSION_2_0 + glfflags ignore + glxflags ignore + extension soft WINSOFT + glextmask GL_MASK_OpenGL_2_0 + +ProgramUniform3iEXT(program, location, v0, v1, v2) + return void + param program UInt32 in value + param location Int32 in value + param v0 Int32 in value + param v1 Int32 in value + param v2 Int32 in value + category EXT_direct_state_access + subcategory VERSION_2_0 + glfflags ignore + glxflags ignore + extension soft WINSOFT + glextmask GL_MASK_OpenGL_2_0 + +ProgramUniform4iEXT(program, location, v0, v1, v2, v3) + return void + param program UInt32 in value + param location Int32 in value + param v0 Int32 in value + param v1 Int32 in value + param v2 Int32 in value + param v3 Int32 in value + category EXT_direct_state_access + subcategory VERSION_2_0 + glfflags ignore + glxflags ignore + extension soft WINSOFT + glextmask GL_MASK_OpenGL_2_0 + +ProgramUniform1fvEXT(program, location, count, value) + return void + param program UInt32 in value + param location Int32 in value + param count SizeI in value + param value Float32 in array [count] + category EXT_direct_state_access + subcategory VERSION_2_0 + glfflags ignore + glxflags ignore + extension soft WINSOFT + glextmask GL_MASK_OpenGL_2_0 + +ProgramUniform2fvEXT(program, location, count, value) + return void + param program UInt32 in value + param location Int32 in value + param count SizeI in value + param value Float32 in array [count*2] + category EXT_direct_state_access + subcategory VERSION_2_0 + glfflags ignore + glxflags ignore + extension soft WINSOFT + glextmask GL_MASK_OpenGL_2_0 + +ProgramUniform3fvEXT(program, location, count, value) + return void + param program UInt32 in value + param location Int32 in value + param count SizeI in value + param value Float32 in array [count*3] + category EXT_direct_state_access + subcategory VERSION_2_0 + glfflags ignore + glxflags ignore + extension soft WINSOFT + glextmask GL_MASK_OpenGL_2_0 + +ProgramUniform4fvEXT(program, location, count, value) + return void + param program UInt32 in value + param location Int32 in value + param count SizeI in value + param value Float32 in array [count*4] + category EXT_direct_state_access + subcategory VERSION_2_0 + glfflags ignore + glxflags ignore + extension soft WINSOFT + glextmask GL_MASK_OpenGL_2_0 + +ProgramUniform1ivEXT(program, location, count, value) + return void + param program UInt32 in value + param location Int32 in value + param count SizeI in value + param value Int32 in array [count] + category EXT_direct_state_access + subcategory VERSION_2_0 + glfflags ignore + glxflags ignore + extension soft WINSOFT + glextmask GL_MASK_OpenGL_2_0 + +ProgramUniform2ivEXT(program, location, count, value) + return void + param program UInt32 in value + param location Int32 in value + param count SizeI in value + param value Int32 in array [count*2] + category EXT_direct_state_access + subcategory VERSION_2_0 + glfflags ignore + glxflags ignore + extension soft WINSOFT + glextmask GL_MASK_OpenGL_2_0 + +ProgramUniform3ivEXT(program, location, count, value) + return void + param program UInt32 in value + param location Int32 in value + param count SizeI in value + param value Int32 in array [count*3] + category EXT_direct_state_access + subcategory VERSION_2_0 + glfflags ignore + glxflags ignore + extension soft WINSOFT + glextmask GL_MASK_OpenGL_2_0 + +ProgramUniform4ivEXT(program, location, count, value) + return void + param program UInt32 in value + param location Int32 in value + param count SizeI in value + param value Int32 in array [count*4] + category EXT_direct_state_access + subcategory VERSION_2_0 + glfflags ignore + glxflags ignore + extension soft WINSOFT + glextmask GL_MASK_OpenGL_2_0 + +ProgramUniformMatrix2fvEXT(program, location, count, transpose, value) + return void + param program UInt32 in value + param location Int32 in value + param count SizeI in value + param transpose Boolean in value + param value Float32 in array [count*4] + category EXT_direct_state_access + subcategory VERSION_2_0 + glfflags ignore + glxflags ignore + extension soft WINSOFT + glextmask GL_MASK_OpenGL_2_0 + +ProgramUniformMatrix3fvEXT(program, location, count, transpose, value) + return void + param program UInt32 in value + param location Int32 in value + param count SizeI in value + param transpose Boolean in value + param value Float32 in array [count*9] + category EXT_direct_state_access + subcategory VERSION_2_0 + glfflags ignore + glxflags ignore + extension soft WINSOFT + glextmask GL_MASK_OpenGL_2_0 + +ProgramUniformMatrix4fvEXT(program, location, count, transpose, value) + return void + param program UInt32 in value + param location Int32 in value + param count SizeI in value + param transpose Boolean in value + param value Float32 in array [count*16] + category EXT_direct_state_access + subcategory VERSION_2_0 + glfflags ignore + glxflags ignore + extension soft WINSOFT + glextmask GL_MASK_OpenGL_2_0 + +# New GLSL 2.1 uniform commands + +ProgramUniformMatrix2x3fvEXT(program, location, count, transpose, value) + return void + param program UInt32 in value + param location Int32 in value + param count SizeI in value + param transpose Boolean in value + param value Float32 in array [count*6] + category EXT_direct_state_access + subcategory VERSION_2_1 + glfflags ignore + glxflags ignore + extension soft WINSOFT + glextmask GL_MASK_OpenGL_2_0 + +ProgramUniformMatrix3x2fvEXT(program, location, count, transpose, value) + return void + param program UInt32 in value + param location Int32 in value + param count SizeI in value + param transpose Boolean in value + param value Float32 in array [count*6] + category EXT_direct_state_access + subcategory VERSION_2_1 + glfflags ignore + glxflags ignore + extension soft WINSOFT + glextmask GL_MASK_OpenGL_2_0 + +ProgramUniformMatrix2x4fvEXT(program, location, count, transpose, value) + return void + param program UInt32 in value + param location Int32 in value + param count SizeI in value + param transpose Boolean in value + param value Float32 in array [count*8] + category EXT_direct_state_access + subcategory VERSION_2_1 + glfflags ignore + glxflags ignore + extension soft WINSOFT + glextmask GL_MASK_OpenGL_2_0 + +ProgramUniformMatrix4x2fvEXT(program, location, count, transpose, value) + return void + param program UInt32 in value + param location Int32 in value + param count SizeI in value + param transpose Boolean in value + param value Float32 in array [count*8] + category EXT_direct_state_access + subcategory VERSION_2_1 + glfflags ignore + glxflags ignore + extension soft WINSOFT + glextmask GL_MASK_OpenGL_2_0 + +ProgramUniformMatrix3x4fvEXT(program, location, count, transpose, value) + return void + param program UInt32 in value + param location Int32 in value + param count SizeI in value + param transpose Boolean in value + param value Float32 in array [count*12] + category EXT_direct_state_access + subcategory VERSION_2_1 + glfflags ignore + glxflags ignore + extension soft WINSOFT + glextmask GL_MASK_OpenGL_2_0 + +ProgramUniformMatrix4x3fvEXT(program, location, count, transpose, value) + return void + param program UInt32 in value + param location Int32 in value + param count SizeI in value + param transpose Boolean in value + param value Float32 in array [count*12] + category EXT_direct_state_access + subcategory VERSION_2_1 + glfflags ignore + glxflags ignore + extension soft WINSOFT + glextmask GL_MASK_OpenGL_2_0 + +# New EXT_gpu_shader4 commands + +ProgramUniform1uiEXT(program, location, v0) + return void + param program UInt32 in value + param location Int32 in value + param v0 UInt32 in value + category EXT_direct_state_access + subcategory EXT_gpu_shader4 + glfflags ignore + glxflags ignore + extension soft WINSOFT + glextmask GL_MASK_OpenGL_2_0 + +ProgramUniform2uiEXT(program, location, v0, v1) + return void + param program UInt32 in value + param location Int32 in value + param v0 UInt32 in value + param v1 UInt32 in value + category EXT_direct_state_access + subcategory EXT_gpu_shader4 + glfflags ignore + glxflags ignore + extension soft WINSOFT + glextmask GL_MASK_OpenGL_2_0 + +ProgramUniform3uiEXT(program, location, v0, v1, v2) + return void + param program UInt32 in value + param location Int32 in value + param v0 UInt32 in value + param v1 UInt32 in value + param v2 UInt32 in value + category EXT_direct_state_access + subcategory EXT_gpu_shader4 + glfflags ignore + glxflags ignore + extension soft WINSOFT + glextmask GL_MASK_OpenGL_2_0 + +ProgramUniform4uiEXT(program, location, v0, v1, v2, v3) + return void + param program UInt32 in value + param location Int32 in value + param v0 UInt32 in value + param v1 UInt32 in value + param v2 UInt32 in value + param v3 UInt32 in value + category EXT_direct_state_access + subcategory EXT_gpu_shader4 + glfflags ignore + glxflags ignore + extension soft WINSOFT + glextmask GL_MASK_OpenGL_2_0 + +ProgramUniform1uivEXT(program, location, count, value) + return void + param program UInt32 in value + param location Int32 in value + param count SizeI in value + param value UInt32 in array [count] + category EXT_direct_state_access + subcategory EXT_gpu_shader4 + glfflags ignore + glxflags ignore + extension soft WINSOFT + glextmask GL_MASK_OpenGL_2_0 + +ProgramUniform2uivEXT(program, location, count, value) + return void + param program UInt32 in value + param location Int32 in value + param count SizeI in value + param value UInt32 in array [count*2] + category EXT_direct_state_access + subcategory EXT_gpu_shader4 + glfflags ignore + glxflags ignore + extension soft WINSOFT + glextmask GL_MASK_OpenGL_2_0 + +ProgramUniform3uivEXT(program, location, count, value) + return void + param program UInt32 in value + param location Int32 in value + param count SizeI in value + param value UInt32 in array [count*3] + category EXT_direct_state_access + subcategory EXT_gpu_shader4 + glfflags ignore + glxflags ignore + extension soft WINSOFT + glextmask GL_MASK_OpenGL_2_0 + +ProgramUniform4uivEXT(program, location, count, value) + return void + param program UInt32 in value + param location Int32 in value + param count SizeI in value + param value UInt32 in array [count*4] + category EXT_direct_state_access + subcategory EXT_gpu_shader4 + glfflags ignore + glxflags ignore + extension soft WINSOFT + glextmask GL_MASK_OpenGL_2_0 + +# New named buffer commands + +NamedBufferDataEXT(buffer, size, data, usage) + return void + param buffer UInt32 in value + param size Sizeiptr in value + param data Void in array [COMPSIZE(size)] + param usage VertexBufferObjectUsage in value + category EXT_direct_state_access + extension soft WINSOFT + dlflags notlistable + glxflags ignore + glfflags ignore + +NamedBufferSubDataEXT(buffer, offset, size, data) + return void + param buffer UInt32 in value + param offset Intptr in value + param size Sizeiptr in value + param data Void in array [COMPSIZE(size)] + category EXT_direct_state_access + extension soft WINSOFT + dlflags notlistable + glxflags ignore + glfflags ignore + +MapNamedBufferEXT(buffer, access) + return VoidPointer + param buffer UInt32 in value + param access VertexBufferObjectAccess in value + category EXT_direct_state_access + extension soft WINSOFT + dlflags notlistable + glxflags ignore + glfflags ignore + +UnmapNamedBufferEXT(buffer) + return Boolean + param buffer UInt32 in value + category EXT_direct_state_access + extension soft WINSOFT + dlflags notlistable + glxflags ignore + glfflags ignore + +# New named buffer queries + +GetNamedBufferParameterivEXT(buffer, pname, params) + return void + param buffer UInt32 in value + param pname VertexBufferObjectParameter in value + param params Int32 out array [COMPSIZE(pname)] + category EXT_direct_state_access + extension soft WINSOFT + dlflags notlistable + glxflags ignore + glfflags ignore + +GetNamedBufferPointervEXT(buffer, pname, params) + return void + param buffer UInt32 in value + param pname VertexBufferObjectParameter in value + param params VoidPointer out array [COMPSIZE(pname)] + category EXT_direct_state_access + extension soft WINSOFT + dlflags notlistable + glxflags ignore + glfflags ignore + +GetNamedBufferSubDataEXT(buffer, offset, size, data) + return void + param buffer UInt32 in value + param offset Intptr in value + param size Sizeiptr in value + param data Void out array [COMPSIZE(size)] + category EXT_direct_state_access + extension soft WINSOFT + dlflags notlistable + glxflags ignore + glfflags ignore + +# New named texture buffer texture object command + +TextureBufferEXT(texture, target, internalformat, buffer) + return void + param texture Texture in value + param target TextureTarget in value + param internalformat TypeEnum in value + param buffer UInt32 in value + category EXT_direct_state_access + subcategory EXT_texture_buffer_object + extension soft WINSOFT NV50 + glfflags ignore + glxflags ignore + glextmask GL_MASK_EXT_texture_buffer_object + dlflags notlistable + +# New named texture buffer multitexture command + +MultiTexBufferEXT(texunit, target, internalformat, buffer) + return void + param texunit TextureUnit in value + param target TextureTarget in value + param internalformat TypeEnum in value + param buffer UInt32 in value + category EXT_direct_state_access + subcategory EXT_texture_buffer_object + extension soft WINSOFT NV50 + glfflags ignore + glxflags ignore + glextmask GL_MASK_EXT_texture_buffer_object + dlflags notlistable + +# New named frame buffer object commands + +NamedRenderbufferStorageEXT(renderbuffer, internalformat, width, height) + return void + param renderbuffer Renderbuffer in value + param internalformat PixelInternalFormat in value + param width SizeI in value + param height SizeI in value + category EXT_direct_state_access + subcategory EXT_framebuffer_object + extension soft WINSOFT + dlflags notlistable + glfflags ignore + glxflags ignore + glextmask GL_MASK_EXT_framebuffer_object + +GetNamedRenderbufferParameterivEXT(renderbuffer, pname, params) + return void + param renderbuffer Renderbuffer in value + param pname RenderbufferParameterName in value + param params Int32 out array [COMPSIZE(pname)] + category EXT_direct_state_access + subcategory EXT_framebuffer_object + extension soft WINSOFT + dlflags notlistable + glfflags ignore + glxflags ignore + glextmask GL_MASK_EXT_framebuffer_object + +CheckNamedFramebufferStatusEXT(framebuffer, target) + return FramebufferStatus + param framebuffer Framebuffer in value + param target FramebufferTarget in value + category EXT_direct_state_access + subcategory EXT_framebuffer_object + extension soft WINSOFT + dlflags notlistable + glfflags ignore + glxflags ignore + glextmask GL_MASK_EXT_framebuffer_object + +NamedFramebufferTexture1DEXT(framebuffer, attachment, textarget, texture, level) + return void + param framebuffer Framebuffer in value + param attachment FramebufferAttachment in value + param textarget TextureTarget in value + param texture Texture in value + param level CheckedInt32 in value + category EXT_direct_state_access + subcategory EXT_framebuffer_object + extension soft WINSOFT + dlflags notlistable + glfflags ignore + glxflags ignore + glextmask GL_MASK_EXT_framebuffer_object + +NamedFramebufferTexture2DEXT(framebuffer, attachment, textarget, texture, level) + return void + param framebuffer Framebuffer in value + param attachment FramebufferAttachment in value + param textarget TextureTarget in value + param texture Texture in value + param level CheckedInt32 in value + category EXT_direct_state_access + subcategory EXT_framebuffer_object + extension soft WINSOFT + dlflags notlistable + glfflags ignore + glxflags ignore + glextmask GL_MASK_EXT_framebuffer_object + +NamedFramebufferTexture3DEXT(framebuffer, attachment, textarget, texture, level, zoffset) + return void + param framebuffer Framebuffer in value + param attachment FramebufferAttachment in value + param textarget TextureTarget in value + param texture Texture in value + param level CheckedInt32 in value + param zoffset CheckedInt32 in value + category EXT_direct_state_access + subcategory EXT_framebuffer_object + extension soft WINSOFT + dlflags notlistable + glfflags ignore + glxflags ignore + glextmask GL_MASK_EXT_framebuffer_object + +NamedFramebufferRenderbufferEXT(framebuffer, attachment, renderbuffertarget, renderbuffer) + return void + param framebuffer Framebuffer in value + param attachment FramebufferAttachment in value + param renderbuffertarget RenderbufferTarget in value + param renderbuffer Renderbuffer in value + category EXT_direct_state_access + subcategory EXT_framebuffer_object + extension soft WINSOFT + dlflags notlistable + glfflags ignore + glxflags ignore + glextmask GL_MASK_EXT_framebuffer_object + +GetNamedFramebufferAttachmentParameterivEXT(framebuffer, attachment, pname, params) + return void + param framebuffer Framebuffer in value + param attachment FramebufferAttachment in value + param pname FramebufferAttachmentParameterName in value + param params Int32 out array [COMPSIZE(pname)] + category EXT_direct_state_access + subcategory EXT_framebuffer_object + extension soft WINSOFT + dlflags notlistable + glfflags ignore + glxflags ignore + glextmask GL_MASK_EXT_framebuffer_object + +GenerateTextureMipmapEXT(texture, target) + return void + param texture Texture in value + param target TextureTarget in value + category EXT_direct_state_access + subcategory EXT_framebuffer_object + extension soft WINSOFT + dlflags notlistable + glfflags ignore + glxflags ignore + glextmask GL_MASK_EXT_framebuffer_object + +GenerateMultiTexMipmapEXT(texunit, target) + return void + param texunit TextureUnit in value + param target TextureTarget in value + category EXT_direct_state_access + subcategory EXT_framebuffer_object + extension soft WINSOFT + dlflags notlistable + glfflags ignore + glxflags ignore + glextmask GL_MASK_EXT_framebuffer_object + +FramebufferDrawBufferEXT(framebuffer, mode) + return void + param framebuffer Framebuffer in value + param mode DrawBufferMode in value + category EXT_direct_state_access + subcategory EXT_framebuffer_object + extension soft WINSOFT + glfflags ignore + glxflags ignore + glextmask GL_MASK_EXT_framebuffer_object + +FramebufferDrawBuffersEXT(framebuffer, n, bufs) + return void + param framebuffer Framebuffer in value + param n SizeI in value + param bufs DrawBufferMode in array [n] + category EXT_direct_state_access + subcategory EXT_framebuffer_object + extension soft WINSOFT + glfflags ignore + glxflags ignore + glextmask GL_MASK_EXT_framebuffer_object + +FramebufferReadBufferEXT(framebuffer, mode) + return void + param framebuffer Framebuffer in value + param mode ReadBufferMode in value + category EXT_direct_state_access + subcategory EXT_framebuffer_object + extension soft WINSOFT + glfflags ignore + glxflags ignore + glextmask GL_MASK_EXT_framebuffer_object + +GetFramebufferParameterivEXT(framebuffer, pname, params) + return void + param framebuffer Framebuffer in value + param pname GetFramebufferParameter in value + param params Int32 out array [COMPSIZE(pname)] + category EXT_direct_state_access + subcategory EXT_framebuffer_object + dlflags notlistable + extension soft WINSOFT + glxflags ignore + glfflags capture-execute gl-enum + +# New named framebuffer multisample object commands + +NamedRenderbufferStorageMultisampleEXT(renderbuffer, samples, internalformat, width, height) + return void + param renderbuffer Renderbuffer in value + param samples SizeI in value + param internalformat PixelInternalFormat in value + param width SizeI in value + param height SizeI in value + category EXT_direct_state_access + subcategory EXT_framebuffer_multisample + extension soft WINSOFT + dlflags notlistable + glfflags ignore + glxflags ignore + glextmask GL_MASK_EXT_framebuffer_multisample + +# New named framebuffer multisample coverage object commands + +NamedRenderbufferStorageMultisampleCoverageEXT(renderbuffer, coverageSamples, colorSamples, internalformat, width, height) + return void + param renderbuffer Renderbuffer in value + param coverageSamples SizeI in value + param colorSamples SizeI in value + param internalformat PixelInternalFormat in value + param width SizeI in value + param height SizeI in value + category EXT_direct_state_access + subcategory NV_framebuffer_multisample_coverage + extension soft WINSOFT + dlflags notlistable + glfflags ignore + glxflags ignore + glextmask GL_MASK_NV_framebuffer_multisample_coverage + +# New named geometry program/shader frame buffer object commands + +NamedFramebufferTextureEXT(framebuffer, attachment, texture, level) + return void + param framebuffer Framebuffer in value + param attachment FramebufferAttachment in value + param texture Texture in value + param level CheckedInt32 in value + category EXT_direct_state_access + subcategory NV_gpu_program4 + extension soft WINSOFT + dlflags notlistable + glfflags ignore + glxflags ignore + glextmask GL_MASK_NV_gpu_program4 + +NamedFramebufferTextureLayerEXT(framebuffer, attachment, texture, level, layer) + return void + param framebuffer Framebuffer in value + param attachment FramebufferAttachment in value + param texture Texture in value + param level CheckedInt32 in value + param layer CheckedInt32 in value + category EXT_direct_state_access + subcategory NV_gpu_program4 + extension soft WINSOFT + dlflags notlistable + glfflags ignore + glxflags ignore + glextmask GL_MASK_NV_gpu_program4 + +NamedFramebufferTextureFaceEXT(framebuffer, attachment, texture, level, face) + return void + param framebuffer Framebuffer in value + param attachment FramebufferAttachment in value + param texture Texture in value + param level CheckedInt32 in value + param face TextureTarget in value + category EXT_direct_state_access + subcategory NV_gpu_program4 + extension soft WINSOFT + dlflags notlistable + glfflags ignore + glxflags ignore + glextmask GL_MASK_NV_gpu_program4 + +# New explicit multisample query and commands + +TextureRenderbufferEXT(texture, target, renderbuffer) + return void + param texture Texture in value + param target TextureTarget in value + param renderbuffer UInt32 in value + category EXT_direct_state_access + subcategory NV_explicit_multisample + extension soft WINSOFT NV50 + dlflags notlistable + glfflags ignore + glxflags ignore + glextmask GL_MASK_NV_explicit_multisample + +MultiTexRenderbufferEXT(texunit, target, renderbuffer) + return void + param texunit TextureUnit in value + param target TextureTarget in value + param renderbuffer UInt32 in value + category EXT_direct_state_access + subcategory NV_explicit_multisample + extension soft WINSOFT NV50 + dlflags notlistable + glfflags ignore + glxflags ignore + glextmask GL_MASK_NV_explicit_multisample + +############################################################################### +# +# Extension #354 +# EXT_vertex_array_bgra commands +# +############################################################################### + +# (none) +newcategory: EXT_vertex_array_bgra + +############################################################################### +# +# Extension #355 - WGL_NV_gpu_affinity +# +############################################################################### + +############################################################################### +# +# Extension #356 +# EXT_texture_swizzle commands +# +############################################################################### + +# (none) +newcategory: EXT_texture_swizzle + +############################################################################### +# +# Extension #357 +# NV_explicit_multisample commands +# +############################################################################### + +# From EXT_draw_buffers2: GetBooleanIndexedvEXT / GetIntegerIndexedvEXT + +GetMultisamplefvNV(pname, index, val) + return void + param pname GetMultisamplePNameNV in value + param index UInt32 in value + param val Float32 out array [2] + category NV_explicit_multisample + dlflags notlistable + glfflags ignore + glxflags ignore + +SampleMaskIndexedNV(index, mask) + return void + param index UInt32 in value + param mask SampleMaskNV in value + category NV_explicit_multisample + glfflags ignore + glxflags ignore + +TexRenderbufferNV(target, renderbuffer) + return void + param target TextureTarget in value + param renderbuffer UInt32 in value + category NV_explicit_multisample + dlflags notlistable + glfflags ignore + glxflags ignore + +############################################################################### +# +# Extension #358 +# NV_transform_feedback2 commands +# +############################################################################### + +BindTransformFeedbackNV(target, id) + return void + param target BufferTargetARB in value + param id UInt32 in value + category NV_transform_feedback2 + glfflags ignore + glxflags ignore + +DeleteTransformFeedbacksNV(n, ids) + return void + param n SizeI in value + param ids UInt32 in array [n] + category NV_transform_feedback2 + dlflags notlistable + glfflags ignore + glxflags ignore + +GenTransformFeedbacksNV(n, ids) + return void + param n SizeI in value + param ids UInt32 out array [n] + category NV_transform_feedback2 + dlflags notlistable + glfflags ignore + glxflags ignore + +IsTransformFeedbackNV(id) + return Boolean + param id UInt32 in value + category NV_transform_feedback2 + dlflags notlistable + glfflags ignore + glxflags ignore + +PauseTransformFeedbackNV() + return void + category NV_transform_feedback2 + glfflags ignore + glxflags ignore + +ResumeTransformFeedbackNV() + return void + category NV_transform_feedback2 + glfflags ignore + glxflags ignore + +DrawTransformFeedbackNV(mode, id) + return void + param mode GLenum in value + param id UInt32 in value + category NV_transform_feedback2 + glfflags ignore + glxflags ignore + +############################################################################### +# +# Extension #359 +# ATI_meminfo commands +# +############################################################################### + +# (none) +newcategory: ATI_meminfo + +############################################################################### +# +# Extension #360 +# AMD_performance_monitor commands +# +############################################################################### + +GetPerfMonitorGroupsAMD(numGroups, groupsSize, groups) + return void + param numGroups Int32 out array [1] + param groupsSize SizeI in value + param groups UInt32 out array [groupsSize] + category AMD_performance_monitor + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +GetPerfMonitorCountersAMD(group, numCounters, maxActiveCounters, counterSize, counters) + return void + param group UInt32 in value + param numCounters Int32 out array [1] + param maxActiveCounters Int32 out array [1] + param counterSize SizeI in value + param counters UInt32 out array [counterSize] + category AMD_performance_monitor + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +GetPerfMonitorGroupStringAMD(group, bufSize, length, groupString) + return void + param group UInt32 in value + param bufSize SizeI in value + param length SizeI out array [1] + param groupString Char out array [bufSize] + category AMD_performance_monitor + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +GetPerfMonitorCounterStringAMD(group, counter, bufSize, length, counterString) + return void + param group UInt32 in value + param counter UInt32 in value + param bufSize SizeI in value + param length SizeI out array [1] + param counterString Char out array [bufSize] + category AMD_performance_monitor + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +GetPerfMonitorCounterInfoAMD(group, counter, pname, data) + return void + param group UInt32 in value + param counter UInt32 in value + param pname GLenum in value + param data void out array [COMPSIZE(pname)] + category AMD_performance_monitor + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +GenPerfMonitorsAMD(n, monitors) + return void + param n SizeI in value + param monitors UInt32 out array [n] + category AMD_performance_monitor + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +# 'monitors' is actually in, not out, but extension spec doesn't use const +DeletePerfMonitorsAMD(n, monitors) + return void + param n SizeI in value + param monitors UInt32 out array [n] + category AMD_performance_monitor + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +# 'counterList' is actually in, not out, but extension spec doesn't use const +SelectPerfMonitorCountersAMD(monitor, enable, group, numCounters, counterList) + return void + param monitor UInt32 in value + param enable Boolean in value + param group UInt32 in value + param numCounters Int32 in value + param counterList UInt32 out array [numCounters] + category AMD_performance_monitor + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +BeginPerfMonitorAMD(monitor) + return void + param monitor UInt32 in value + category AMD_performance_monitor + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +EndPerfMonitorAMD(monitor) + return void + param monitor UInt32 in value + category AMD_performance_monitor + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +GetPerfMonitorCounterDataAMD(monitor, pname, dataSize, data, bytesWritten) + return void + param monitor UInt32 in value + param pname GLenum in value + param dataSize SizeI in value + param data UInt32 out array [dataSize] + param bytesWritten Int32 out array [1] + category AMD_performance_monitor + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +############################################################################### +# +# Extension #361 - WGL_AMD_gpu_association +# +############################################################################### + +############################################################################### +# +# Extension #362 +# AMD_texture_texture4 commands +# +############################################################################### + +# (none) +newcategory: AMD_texture_texture4 + +############################################################################### +# +# Extension #363 +# AMD_vertex_shader_tesselator commands +# +############################################################################### + +TessellationFactorAMD(factor) + return void + param factor Float32 in value + category AMD_vertex_shader_tesselator + version 2.0 + glxsingle ? + glxflags ignore + offset ? + +TessellationModeAMD(mode) + return void + param mode GLenum in value + category AMD_vertex_shader_tesselator + version 2.0 + glxsingle ? + glxflags ignore + offset ? + +############################################################################### +# +# Extension #364 +# EXT_provoking_vertex commands +# +############################################################################### + +ProvokingVertexEXT(mode) + return void + param mode GLenum in value + category EXT_provoking_vertex + version 2.1 + glxsingle ? + glxflags ignore + offset ? + +############################################################################### +# +# Extension #365 +# EXT_texture_snorm commands +# +############################################################################### + +# (none) +newcategory: EXT_texture_snorm + +############################################################################### +# +# Extension #366 +# AMD_draw_buffers_blend commands +# +############################################################################### + +# void BlendFuncIndexedAMD(uint buf, enum src, enum dst) +# void BlendFuncSeparateIndexedAMD(uint buf, enum srcRGB, enum dstRGB, enum srcAlpha, enum dstAlpha) +# void BlendEquationIndexedAMD(uint buf, enum mode) +# void BlendEquationSeparateIndexedAMD(uint buf, enum modeRGB, enum modeAlpha) + +BlendFuncIndexedAMD(buf, src, dst) + return void + param buf UInt32 in value + param src GLenum in value + param dst GLenum in value + category AMD_draw_buffers_blend + version 2.0 + extension + glxropcode ? + glxflags ignore + offset ? + +BlendFuncSeparateIndexedAMD(buf, srcRGB, dstRGB, srcAlpha, dstAlpha) + return void + param buf UInt32 in value + param srcRGB GLenum in value + param dstRGB GLenum in value + param srcAlpha GLenum in value + param dstAlpha GLenum in value + category AMD_draw_buffers_blend + version 2.0 + extension + glxropcode ? + glxflags ignore + offset ? + +BlendEquationIndexedAMD(buf, mode) + return void + param buf UInt32 in value + param mode GLenum in value + category AMD_draw_buffers_blend + version 2.0 + extension + glxropcode ? + glxflags ignore + offset ? + +BlendEquationSeparateIndexedAMD(buf, modeRGB, modeAlpha) + return void + param buf UInt32 in value + param modeRGB GLenum in value + param modeAlpha GLenum in value + category AMD_draw_buffers_blend + version 2.0 + extension + glxropcode ? + glxflags ignore + offset ? + +############################################################################### +# +# Extension #367 +# APPLE_texture_range commands +# +############################################################################### + +TextureRangeAPPLE(target, length, pointer) + return void + param target GLenum in value + param length SizeI in value + param pointer Void in array [length] + category APPLE_texture_range + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +GetTexParameterPointervAPPLE(target, pname, params) + return void + param target GLenum in value + param pname GLenum in value + param params VoidPointer out array [1] + category APPLE_texture_range + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +############################################################################### +# +# Extension #368 +# APPLE_float_pixels commands +# +############################################################################### + +# (none) +newcategory: APPLE_float_pixels + +############################################################################### +# +# Extension #369 +# APPLE_vertex_program_evaluators commands +# +############################################################################### + +EnableVertexAttribAPPLE(index, pname) + return void + param index UInt32 in value + param pname GLenum in value + category APPLE_vertex_program_evaluators + version 1.5 + extension + glxropcode ? + glxflags ignore + offset ? + +DisableVertexAttribAPPLE(index, pname) + return void + param index UInt32 in value + param pname GLenum in value + category APPLE_vertex_program_evaluators + version 1.5 + extension + glxropcode ? + glxflags ignore + offset ? + +IsVertexAttribEnabledAPPLE(index, pname) + return Boolean + param index UInt32 in value + param pname GLenum in value + category APPLE_vertex_program_evaluators + version 1.5 + extension + glxropcode ? + glxflags ignore + offset ? + +MapVertexAttrib1dAPPLE(index, size, u1, u2, stride, order, points) + return void + param index UInt32 in value + param size UInt32 in value + param u1 CoordD in value + param u2 CoordD in value + param stride Int32 in value + param order CheckedInt32 in value + param points CoordD in array [COMPSIZE(size/stride/order)] + category APPLE_vertex_program_evaluators + version 1.5 + extension + glxropcode ? + glxflags ignore + offset ? + +MapVertexAttrib1fAPPLE(index, size, u1, u2, stride, order, points) + return void + param index UInt32 in value + param size UInt32 in value + param u1 CoordF in value + param u2 CoordF in value + param stride Int32 in value + param order CheckedInt32 in value + param points CoordF in array [COMPSIZE(size/stride/order)] + category APPLE_vertex_program_evaluators + version 1.5 + extension + glxropcode ? + glxflags ignore + offset ? + +MapVertexAttrib2dAPPLE(index, size, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points) + return void + param index UInt32 in value + param size UInt32 in value + param u1 CoordD in value + param u2 CoordD in value + param ustride Int32 in value + param uorder CheckedInt32 in value + param v1 CoordD in value + param v2 CoordD in value + param vstride Int32 in value + param vorder CheckedInt32 in value + param points CoordD in array [COMPSIZE(size/ustride/uorder/vstride/vorder)] + category APPLE_vertex_program_evaluators + version 1.5 + extension + glxropcode ? + glxflags ignore + offset ? + +MapVertexAttrib2fAPPLE(index, size, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points) + return void + param index UInt32 in value + param size UInt32 in value + param u1 CoordF in value + param u2 CoordF in value + param ustride Int32 in value + param uorder CheckedInt32 in value + param v1 CoordF in value + param v2 CoordF in value + param vstride Int32 in value + param vorder CheckedInt32 in value + param points CoordF in array [COMPSIZE(size/ustride/uorder/vstride/vorder)] + category APPLE_vertex_program_evaluators + version 1.5 + extension + glxropcode ? + glxflags ignore + offset ? + +############################################################################### +# +# Extension #370 +# APPLE_aux_depth_stencil commands +# +############################################################################### + +# (none) +newcategory: APPLE_aux_depth_stencil + +############################################################################### +# +# Extension #371 +# APPLE_object_purgeable commands +# +############################################################################### + +ObjectPurgeableAPPLE(objectType, name, option) + return GLenum + param objectType GLenum in value + param name UInt32 in value + param option GLenum in value + category APPLE_object_purgeable + version 1.5 + extension + glxropcode ? + glxflags ignore + offset ? + +ObjectUnpurgeableAPPLE(objectType, name, option) + return GLenum + param objectType GLenum in value + param name UInt32 in value + param option GLenum in value + category APPLE_object_purgeable + version 1.5 + extension + glxropcode ? + glxflags ignore + offset ? + +GetObjectParameterivAPPLE(objectType, name, pname, params) + return void + param objectType GLenum in value + param name UInt32 in value + param pname GLenum in value + param params Int32 out array [COMPSIZE(pname)] + category APPLE_object_purgeable + dlflags notlistable + version 1.5 + extension + glxsingle ? + glxflags ignore + offset ? + +############################################################################### +# +# Extension #372 +# APPLE_row_bytes commands +# +############################################################################### + +# (none) +newcategory: APPLE_row_bytes + +############################################################################### +# +# Extension #373 +# APPLE_rgb_422 commands +# +############################################################################### + +# (none) +newcategory: APPLE_rgb_422 + +############################################################################### +# +# Extension #374 +# NV_video_capture commands +# +############################################################################### + +BeginVideoCaptureNV(video_capture_slot) + return void + param video_capture_slot UInt32 in value + category NV_video_capture + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +BindVideoCaptureStreamBufferNV(video_capture_slot, stream, frame_region, offset) + return void + param video_capture_slot UInt32 in value + param stream UInt32 in value + param frame_region GLenum in value + param offset BufferOffsetARB in value + category NV_video_capture + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +BindVideoCaptureStreamTextureNV(video_capture_slot, stream, frame_region, target, texture) + return void + param video_capture_slot UInt32 in value + param stream UInt32 in value + param frame_region GLenum in value + param target GLenum in value + param texture UInt32 in value + category NV_video_capture + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +EndVideoCaptureNV(video_capture_slot) + return void + param video_capture_slot UInt32 in value + category NV_video_capture + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +GetVideoCaptureivNV(video_capture_slot, pname, params) + return void + param video_capture_slot UInt32 in value + param pname GLenum in value + param params Int32 out array [COMPSIZE(pname)] + category NV_video_capture + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +GetVideoCaptureStreamivNV(video_capture_slot, stream, pname, params) + return void + param video_capture_slot UInt32 in value + param stream UInt32 in value + param pname GLenum in value + param params Int32 out array [COMPSIZE(pname)] + category NV_video_capture + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +GetVideoCaptureStreamfvNV(video_capture_slot, stream, pname, params) + return void + param video_capture_slot UInt32 in value + param stream UInt32 in value + param pname GLenum in value + param params Float32 out array [COMPSIZE(pname)] + category NV_video_capture + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +GetVideoCaptureStreamdvNV(video_capture_slot, stream, pname, params) + return void + param video_capture_slot UInt32 in value + param stream UInt32 in value + param pname GLenum in value + param params Float64 out array [COMPSIZE(pname)] + category NV_video_capture + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +VideoCaptureNV(video_capture_slot, sequence_num, capture_time) + return GLenum + param video_capture_slot UInt32 in value + param sequence_num UInt32 out reference + param capture_time UInt64EXT out reference + category NV_video_capture + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VideoCaptureStreamParameterivNV(video_capture_slot, stream, pname, params) + return void + param video_capture_slot UInt32 in value + param stream UInt32 in value + param pname GLenum in value + param params Int32 in array [COMPSIZE(pname)] + category NV_video_capture + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VideoCaptureStreamParameterfvNV(video_capture_slot, stream, pname, params) + return void + param video_capture_slot UInt32 in value + param stream UInt32 in value + param pname GLenum in value + param params Float32 in array [COMPSIZE(pname)] + category NV_video_capture + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VideoCaptureStreamParameterdvNV(video_capture_slot, stream, pname, params) + return void + param video_capture_slot UInt32 in value + param stream UInt32 in value + param pname GLenum in value + param params Float64 in array [COMPSIZE(pname)] + category NV_video_capture + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +############################################################################### +# +# Extension #375 - GLX_EXT_swap_control +# +############################################################################### + +############################################################################### +# +# Extension #376 - also GLX_NV_copy_image, WGL_NV_copy_image +# NV_copy_image commands +# +############################################################################### + +CopyImageSubDataNV(srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, width, height, depth) + return void + param srcName UInt32 in value + param srcTarget GLenum in value + param srcLevel Int32 in value + param srcX Int32 in value + param srcY Int32 in value + param srcZ Int32 in value + param dstName UInt32 in value + param dstTarget GLenum in value + param dstLevel Int32 in value + param dstX Int32 in value + param dstY Int32 in value + param dstZ Int32 in value + param width SizeI in value + param height SizeI in value + param depth SizeI in value + category NV_copy_image + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +############################################################################### +# +# Extension #377 +# EXT_separate_shader_objects commands +# +############################################################################### + +UseShaderProgramEXT(type, program) + return void + param type GLenum in value + param program UInt32 in value + category EXT_separate_shader_objects + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +ActiveProgramEXT(program) + return void + param program UInt32 in value + category EXT_separate_shader_objects + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +CreateShaderProgramEXT(type, string) + return UInt32 + param type GLenum in value + param string Char in array [] + category EXT_separate_shader_objects + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +############################################################################### +# +# Extension #378 +# NV_parameter_buffer_object2 commands +# +############################################################################### + +newcategory: NV_parameter_buffer_object2 + +############################################################################### +# +# Extension #379 +# NV_shader_buffer_load commands +# +############################################################################### + +MakeBufferResidentNV(target, access) + return void + param target GLenum in value + param access GLenum in value + category NV_shader_buffer_load + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +MakeBufferNonResidentNV(target) + return void + param target GLenum in value + category NV_shader_buffer_load + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +IsBufferResidentNV(target) + return Boolean + param target GLenum in value + category NV_shader_buffer_load + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +MakeNamedBufferResidentNV(buffer, access) + return void + param buffer UInt32 in value + param access GLenum in value + category NV_shader_buffer_load + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +MakeNamedBufferNonResidentNV(buffer) + return void + param buffer UInt32 in value + category NV_shader_buffer_load + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +IsNamedBufferResidentNV(buffer) + return Boolean + param buffer UInt32 in value + category NV_shader_buffer_load + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +GetBufferParameterui64vNV(target, pname, params) + return void + param target GLenum in value + param pname GLenum in value + param params UInt64EXT out array [COMPSIZE(pname)] + category NV_shader_buffer_load + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +GetNamedBufferParameterui64vNV(buffer, pname, params) + return void + param buffer UInt32 in value + param pname GLenum in value + param params UInt64EXT out array [COMPSIZE(pname)] + category NV_shader_buffer_load + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +GetIntegerui64vNV(value, result) + return void + param value GLenum in value + param result UInt64EXT out array [COMPSIZE(value)] + category NV_shader_buffer_load + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +Uniformui64NV(location, value) + return void + param location Int32 in value + param value UInt64EXT in value + category NV_shader_buffer_load + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +Uniformui64vNV(location, count, value) + return void + param location Int32 in value + param count SizeI in value + param value UInt64EXT in array [count] + category NV_shader_buffer_load + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +GetUniformui64vNV(program, location, params) + return void + param program UInt32 in value + param location Int32 in value + param params UInt64EXT out array [COMPSIZE(program/location)] + category NV_shader_buffer_load + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +ProgramUniformui64NV(program, location, value) + return void + param program UInt32 in value + param location Int32 in value + param value UInt64EXT in value + category NV_shader_buffer_load + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +ProgramUniformui64vNV(program, location, count, value) + return void + param program UInt32 in value + param location Int32 in value + param count SizeI in value + param value UInt64EXT in array [count] + category NV_shader_buffer_load + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +############################################################################### +# +# Extension #380 +# NV_vertex_buffer_unified_memory commands +# +############################################################################### + +BufferAddressRangeNV(pname, index, address, length) + return void + param pname GLenum in value + param index UInt32 in value + param address UInt64EXT in value + param length BufferSize in value + category NV_vertex_buffer_unified_memory + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexFormatNV(size, type, stride) + return void + param size Int32 in value + param type GLenum in value + param stride SizeI in value + category NV_vertex_buffer_unified_memory + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +NormalFormatNV(type, stride) + return void + param type GLenum in value + param stride SizeI in value + category NV_vertex_buffer_unified_memory + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +ColorFormatNV(size, type, stride) + return void + param size Int32 in value + param type GLenum in value + param stride SizeI in value + category NV_vertex_buffer_unified_memory + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +IndexFormatNV(type, stride) + return void + param type GLenum in value + param stride SizeI in value + category NV_vertex_buffer_unified_memory + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +TexCoordFormatNV(size, type, stride) + return void + param size Int32 in value + param type GLenum in value + param stride SizeI in value + category NV_vertex_buffer_unified_memory + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +EdgeFlagFormatNV(stride) + return void + param stride SizeI in value + category NV_vertex_buffer_unified_memory + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +SecondaryColorFormatNV(size, type, stride) + return void + param size Int32 in value + param type GLenum in value + param stride SizeI in value + category NV_vertex_buffer_unified_memory + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +FogCoordFormatNV(type, stride) + return void + param type GLenum in value + param stride SizeI in value + category NV_vertex_buffer_unified_memory + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexAttribFormatNV(index, size, type, normalized, stride) + return void + param index UInt32 in value + param size Int32 in value + param type GLenum in value + param normalized Boolean in value + param stride SizeI in value + category NV_vertex_buffer_unified_memory + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +VertexAttribIFormatNV(index, size, type, stride) + return void + param index UInt32 in value + param size Int32 in value + param type GLenum in value + param stride SizeI in value + category NV_vertex_buffer_unified_memory + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +GetIntegerui64i_vNV(value, index, result) + return void + param value GLenum in value + param index UInt32 in value + param result UInt64EXT out array [COMPSIZE(value)] + category NV_vertex_buffer_unified_memory + dlflags notlistable + version 1.2 + extension + glxsingle ? + glxflags ignore + offset ? + +############################################################################### +# +# Extension #381 +# NV_texture_barrier commands +# +############################################################################### + +TextureBarrierNV() + return void + category NV_texture_barrier + version 1.2 + extension + glxropcode ? + glxflags ignore + offset ? + +############################################################################### +# +# Extension #382 +# AMD_shader_stencil_export commands +# +############################################################################### + +newcategory: AMD_shader_stencil_export + +############################################################################### +# +# Extension #383 +# AMD_seamless_cubemap_per_texture commands +# +############################################################################### + +newcategory: AMD_seamless_cubemap_per_texture + +############################################################################### +# +# Extension #384 - GLX_INTEL_swap_event +# +############################################################################### + +############################################################################### +# +# Extension #385 +# AMD_conservative_depth commands +# +############################################################################### + +newcategory: AMD_conservative_depth + diff --git a/src/glx/apple/specs/gl.tm b/src/glx/apple/specs/gl.tm new file mode 100644 index 00000000000..fb4f8515cdd --- /dev/null +++ b/src/glx/apple/specs/gl.tm @@ -0,0 +1,322 @@ +AccumOp,*,*, GLenum,*,* +AlphaFunction,*,*, GLenum,*,* +AttribMask,*,*, GLbitfield,*,* +BeginMode,*,*, GLenum,*,* +BinormalPointerTypeEXT,*,*, GLenum,*,* +BlendEquationMode,*,*, GLenum,*,* +BlendEquationModeEXT,*,*, GLenum,*,* +BlendFuncSeparateParameterEXT,*,*, GLenum,*,* +BlendingFactorDest,*,*, GLenum,*,* +BlendingFactorSrc,*,*, GLenum,*,* +Boolean,*,*, GLboolean,*,* +BooleanPointer,*,*, GLboolean*,*,* +Char,*,*, GLchar,*,* +CharPointer,*,*, GLchar*,*,* +CheckedFloat32,*,*, GLfloat,*,* +CheckedInt32,*,*, GLint,*,* +ClampColorTargetARB,*,*, GLenum,*,* +ClampColorModeARB,*,*, GLenum,*,* +ClampedColorF,*,*, GLclampf,*,* +ClampedFloat32,*,*, GLclampf,*,* +ClampedFloat64,*,*, GLclampd,*,* +ClampedStencilValue,*,*, GLint,*,* +ClearBufferMask,*,*, GLbitfield,*,* +ClientAttribMask,*,*, GLbitfield,*,* +ClipPlaneName,*,*, GLenum,*,* +ColorB,*,*, GLbyte,*,* +ColorD,*,*, GLdouble,*,* +ColorF,*,*, GLfloat,*,* +ColorI,*,*, GLint,*,* +ColorIndexValueD,*,*, GLdouble,*,* +ColorIndexValueF,*,*, GLfloat,*,* +ColorIndexValueI,*,*, GLint,*,* +ColorIndexValueS,*,*, GLshort,*,* +ColorIndexValueUB,*,*, GLubyte,*,* +ColorMaterialParameter,*,*, GLenum,*,* +ColorPointerType,*,*, GLenum,*,* +ColorS,*,*, GLshort,*,* +ColorTableParameterPName,*,*, GLenum,*,* +ColorTableParameterPNameSGI,*,*, GLenum,*,* +ColorTableTarget,*,*, GLenum,*,* +ColorTableTargetSGI,*,*, GLenum,*,* +ColorUB,*,*, GLubyte,*,* +ColorUI,*,*, GLuint,*,* +ColorUS,*,*, GLushort,*,* +CombinerBiasNV,*,*, GLenum,*,* +CombinerComponentUsageNV,*,*, GLenum,*,* +CombinerMappingNV,*,*, GLenum,*,* +CombinerParameterNV,*,*, GLenum,*,* +CombinerPortionNV,*,*, GLenum,*,* +CombinerRegisterNV,*,*, GLenum,*,* +CombinerScaleNV,*,*, GLenum,*,* +CombinerStageNV,*,*, GLenum,*,* +CombinerVariableNV,*,*, GLenum,*,* +CompressedTextureARB,*,*, GLvoid,*,* +ControlPointNV,*,*, GLvoid,*,* +ControlPointTypeNV,*,*, GLenum,*,* +ConvolutionParameter,*,*, GLenum,*,* +ConvolutionParameterEXT,*,*, GLenum,*,* +ConvolutionTarget,*,*, GLenum,*,* +ConvolutionTargetEXT,*,*, GLenum,*,* +CoordD,*,*, GLdouble,*,* +CoordF,*,*, GLfloat,*,* +CoordI,*,*, GLint,*,* +CoordS,*,*, GLshort,*,* +CullFaceMode,*,*, GLenum,*,* +CullParameterEXT,*,*, GLenum,*,* +DepthFunction,*,*, GLenum,*,* +DrawBufferMode,*,*, GLenum,*,* +DrawBufferName,*,*, GLint,*,* +DrawElementsType,*,*, GLenum,*,* +ElementPointerTypeATI,*,*, GLenum,*,* +EnableCap,*,*, GLenum,*,* +ErrorCode,*,*, GLenum,*,* +EvalMapsModeNV,*,*, GLenum,*,* +EvalTargetNV,*,*, GLenum,*,* +FeedbackElement,*,*, GLfloat,*,* +FeedbackType,*,*, GLenum,*,* +FenceNV,*,*, GLuint,*,* +FenceConditionNV,*,*, GLenum,*,* +FenceParameterNameNV,*,*, GLenum,*,* +FfdMaskSGIX,*,*, GLbitfield,*,* +FfdTargetSGIX,*,*, GLenum,*,* +Float32,*,*, GLfloat,*,* +Float32Pointer,*,*, GLfloat*,*,* +Float64,*,*, GLdouble,*,* +Float64Pointer,*,*, GLdouble*,*,* +FogParameter,*,*, GLenum,*,* +FogPointerTypeEXT,*,*, GLenum,*,* +FogPointerTypeIBM,*,*, GLenum,*,* +FragmentLightModelParameterSGIX,*,*,GLenum,*,* +FragmentLightNameSGIX,*,*, GLenum,*,* +FragmentLightParameterSGIX,*,*, GLenum,*,* +FramebufferAttachment,*,*, GLenum,*,* +FramebufferTarget,*,*, GLenum,*,* +FrontFaceDirection,*,*, GLenum,*,* +FunctionPointer,*,*, _GLfuncptr,*,* +GetColorTableParameterPName,*,*, GLenum,*,* +GetColorTableParameterPNameSGI,*,*, GLenum,*,* +GetConvolutionParameterPName,*,*, GLenum,*,* +GetHistogramParameterPName,*,*, GLenum,*,* +GetHistogramParameterPNameEXT,*,*, GLenum,*,* +GetMapQuery,*,*, GLenum,*,* +GetMinmaxParameterPName,*,*, GLenum,*,* +GetMinmaxParameterPNameEXT,*,*, GLenum,*,* +GetPName,*,*, GLenum,*,* +GetPointervPName,*,*, GLenum,*,* +GetTextureParameter,*,*, GLenum,*,* +HintMode,*,*, GLenum,*,* +HintTarget,*,*, GLenum,*,* +HintTargetPGI,*,*, GLenum,*,* +HistogramTarget,*,*, GLenum,*,* +HistogramTargetEXT,*,*, GLenum,*,* +IglooFunctionSelectSGIX,*,*, GLenum,*,* +IglooParameterSGIX,*,*, GLvoid,*,* +ImageTransformPNameHP,*,*, GLenum,*,* +ImageTransformTargetHP,*,*, GLenum,*,* +IndexFunctionEXT,*,*, GLenum,*,* +IndexMaterialParameterEXT,*,*, GLenum,*,* +IndexPointerType,*,*, GLenum,*,* +Int16,*,*, GLshort,*,* +Int32,*,*, GLint,*,* +Int8,*,*, GLbyte,*,* +InterleavedArrayFormat,*,*, GLenum,*,* +LightEnvParameterSGIX,*,*, GLenum,*,* +LightModelParameter,*,*, GLenum,*,* +LightName,*,*, GLenum,*,* +LightParameter,*,*, GLenum,*,* +LightTextureModeEXT,*,*, GLenum,*,* +LightTexturePNameEXT,*,*, GLenum,*,* +LineStipple,*,*, GLushort,*,* +List,*,*, GLuint,*,* +ListMode,*,*, GLenum,*,* +ListNameType,*,*, GLenum,*,* +ListParameterName,*,*, GLenum,*,* +LogicOp,*,*, GLenum,*,* +MapAttribParameterNV,*,*, GLenum,*,* +MapParameterNV,*,*, GLenum,*,* +MapTarget,*,*, GLenum,*,* +MapTargetNV,*,*, GLenum,*,* +MapTypeNV,*,*, GLenum,*,* +MaskedColorIndexValueF,*,*, GLfloat,*,* +MaskedColorIndexValueI,*,*, GLuint,*,* +MaskedStencilValue,*,*, GLuint,*,* +MaterialFace,*,*, GLenum,*,* +MaterialParameter,*,*, GLenum,*,* +MatrixIndexPointerTypeARB,*,*, GLenum,*,* +MatrixMode,*,*, GLenum,*,* +MatrixTransformNV,*,*, GLenum,*,* +MeshMode1,*,*, GLenum,*,* +MeshMode2,*,*, GLenum,*,* +MinmaxTarget,*,*, GLenum,*,* +MinmaxTargetEXT,*,*, GLenum,*,* +NormalPointerType,*,*, GLenum,*,* +NurbsCallback,*,*, GLenum,*,* +NurbsObj,*,*, GLUnurbs*,*,* +NurbsProperty,*,*, GLenum,*,* +NurbsTrim,*,*, GLenum,*,* +OcclusionQueryParameterNameNV,*,*, GLenum,*,* +PixelCopyType,*,*, GLenum,*,* +PixelFormat,*,*, GLenum,*,* +PixelInternalFormat,*,*, GLenum,*,* +PixelMap,*,*, GLenum,*,* +PixelStoreParameter,*,*, GLenum,*,* +PixelTexGenModeSGIX,*,*, GLenum,*,* +PixelTexGenParameterNameSGIS,*,*, GLenum,*,* +PixelTransferParameter,*,*, GLenum,*,* +PixelTransformPNameEXT,*,*, GLenum,*,* +PixelTransformTargetEXT,*,*, GLenum,*,* +PixelType,*,*, GLenum,*,* +PointParameterNameARB,*,*, GLenum,*,* +PolygonMode,*,*, GLenum,*,* +ProgramNV,*,*, GLuint,*,* +ProgramCharacterNV,*,*, GLubyte,*,* +ProgramParameterNV,*,*, GLenum,*,* +ProgramParameterPName,*,*, GLenum,*,* +QuadricCallback,*,*, GLenum,*,* +QuadricDrawStyle,*,*, GLenum,*,* +QuadricNormal,*,*, GLenum,*,* +QuadricObj,*,*, GLUquadric*,*,* +QuadricOrientation,*,*, GLenum,*,* +ReadBufferMode,*,*, GLenum,*,* +RenderbufferTarget,*,*, GLenum,*,* +RenderingMode,*,*, GLenum,*,* +ReplacementCodeSUN,*,*, GLuint,*,* +ReplacementCodeTypeSUN,*,*, GLenum,*,* +SamplePassARB,*,*, GLenum,*,* +SamplePatternEXT,*,*, GLenum,*,* +SamplePatternSGIS,*,*, GLenum,*,* +SecondaryColorPointerTypeIBM,*,*, GLenum,*,* +SelectName,*,*, GLuint,*,* +SeparableTarget,*,*, GLenum,*,* +SeparableTargetEXT,*,*, GLenum,*,* +ShadingModel,*,*, GLenum,*,* +SizeI,*,*, GLsizei,*,* +SpriteParameterNameSGIX,*,*, GLenum,*,* +StencilFunction,*,*, GLenum,*,* +StencilFaceDirection,*,*, GLenum,*,* +StencilOp,*,*, GLenum,*,* +StencilValue,*,*, GLint,*,* +String,*,*, const GLubyte *,*,* +StringName,*,*, GLenum,*,* +TangentPointerTypeEXT,*,*, GLenum,*,* +TessCallback,*,*, GLenum,*,* +TessContour,*,*, GLenum,*,* +TessProperty,*,*, GLenum,*,* +TesselatorObj,*,*, GLUtesselator*,*,* +TexCoordPointerType,*,*, GLenum,*,* +Texture,*,*, GLuint,*,* +TextureComponentCount,*,*, GLint,*,* +TextureCoordName,*,*, GLenum,*,* +TextureEnvParameter,*,*, GLenum,*,* +TextureEnvTarget,*,*, GLenum,*,* +TextureFilterSGIS,*,*, GLenum,*,* +TextureGenParameter,*,*, GLenum,*,* +TextureNormalModeEXT,*,*, GLenum,*,* +TextureParameterName,*,*, GLenum,*,* +TextureTarget,*,*, GLenum,*,* +TextureUnit,*,*, GLenum,*,* +UInt16,*,*, GLushort,*,* +UInt32,*,*, GLuint,*,* +UInt8,*,*, GLubyte,*,* +VertexAttribEnum,*,*, GLenum,*,* +VertexAttribEnumNV,*,*, GLenum,*,* +VertexAttribPointerTypeNV,*,*, GLenum,*,* +VertexPointerType,*,*, GLenum,*,* +VertexWeightPointerTypeEXT,*,*, GLenum,*,* +Void,*,*, GLvoid,*,* +VoidPointer,*,*, GLvoid*,*,* +ConstVoidPointer,*,*, GLvoid* const,*,* +WeightPointerTypeARB,*,*, GLenum,*,* +WinCoord,*,*, GLint,*,* +void,*,*, *,*,* +ArrayObjectPNameATI,*,*, GLenum,*,* +ArrayObjectUsageATI,*,*, GLenum,*,*, +ConstFloat32,*,*, GLfloat,*,* +ConstInt32,*,*, GLint,*,* +ConstUInt32,*,*, GLuint,*,* +ConstVoid,*,*, GLvoid,*,* +DataTypeEXT,*,*, GLenum,*,* +FragmentOpATI,*,*, GLenum,*,* +GetTexBumpParameterATI,*,*, GLenum,*,* +GetVariantValueEXT,*,*, GLenum,*,* +ParameterRangeEXT,*,*, GLenum,*,* +PreserveModeATI,*,*, GLenum,*,* +ProgramFormatARB,*,*, GLenum,*,* +ProgramTargetARB,*,*, GLenum,*,* +ProgramTarget,*,*, GLenum,*,* +ProgramPropertyARB,*,*, GLenum,*,* +ProgramStringPropertyARB,*,*, GLenum,*,* +ScalarType,*,*, GLenum,*,* +SwizzleOpATI,*,*, GLenum,*,* +TexBumpParameterATI,*,*, GLenum,*,* +VariantCapEXT,*,*, GLenum,*,* +VertexAttribPointerPropertyARB,*,*, GLenum,*,* +VertexAttribPointerTypeARB,*,*, GLenum,*,* +VertexAttribPropertyARB,*,*, GLenum,*,* +VertexShaderCoordOutEXT,*,*, GLenum,*,* +VertexShaderOpEXT,*,*, GLenum,*,* +VertexShaderParameterEXT,*,*, GLenum,*,* +VertexShaderStorageTypeEXT,*,*, GLenum,*,* +VertexShaderTextureUnitParameter,*,*, GLenum,*,* +VertexShaderWriteMaskEXT,*,*, GLenum,*,* +VertexStreamATI,*,*, GLenum,*,* +PNTrianglesPNameATI,*,*, GLenum,*,* +# ARB_vertex_buffer_object types and core equivalents for new types +BufferOffset,*,*, GLintptr,*,* +BufferSize,*,*, GLsizeiptr,*,* +BufferAccessARB,*,*, GLenum,*,* +BufferOffsetARB,*,*, GLintptrARB,*,* +BufferPNameARB,*,*, GLenum,*,* +BufferPointerNameARB,*,*, GLenum,*,* +BufferSizeARB,*,*, GLsizeiptrARB,*,* +BufferTargetARB,*,*, GLenum,*,* +BufferUsageARB,*,*, GLenum,*,* +# APPLE_fence +ObjectTypeAPPLE,*,*, GLenum,*,* +# APPLE_vertex_array_range +VertexArrayPNameAPPLE,*,*, GLenum,*,* +# ATI_draw_buffers +DrawBufferModeATI,*,*, GLenum,*,* +# NV_half +Half16NV,*,*, GLhalfNV,*,* +# NV_pixel_data_range +PixelDataRangeTargetNV,*,*, GLenum,*,* +# Generic types for as-yet-unspecified enums +TypeEnum,*,*, GLenum,*,* +GLbitfield,*,*, GLbitfield,*,* +GLenum,*,*, GLenum,*,* +Int64,*,*, GLint64,*,* +UInt64,*,*, GLuint64,*,* +# Object handle & data pointers +handleARB,*,*, GLhandleARB,*,* +charARB,*,*, GLcharARB,*,* +charPointerARB,*,*, GLcharARB*,*,* +sync,*,*, GLsync,*,*, +# EXT_timer_query +Int64EXT,*,*, GLint64EXT,*,* +UInt64EXT,*,*, GLuint64EXT,*,* +# EXT_direct_state_access +FramebufferAttachment,*,*, GLenum,*,* +FramebufferAttachmentParameterName,*,*, GLenum,*,* +Framebuffer,*,*, GLuint,*,* +FramebufferStatus,*,*, GLenum,*,* +FramebufferTarget,*,*, GLenum,*,* +GetFramebufferParameter,*,*, GLenum,*,* +Intptr,*,*, GLintptr,*,* +ProgramFormat,*,*, GLenum,*,* +ProgramProperty,*,*, GLenum,*,* +ProgramStringProperty,*,*, GLenum,*,* +ProgramTarget,*,*, GLenum,*,* +Renderbuffer,*,*, GLuint,*,* +RenderbufferParameterName,*,*, GLenum,*,* +Sizeiptr,*,*, GLsizeiptr,*,* +TextureInternalFormat,*,*, GLenum,*,* +VertexBufferObjectAccess,*,*, GLenum,*,* +VertexBufferObjectParameter,*,*, GLenum,*,* +VertexBufferObjectUsage,*,*, GLenum,*,* +# ARB_map_buffer_range +BufferAccessMask,*,*, GLbitfield,*,* +# NV_explicit_multisample +GetMultisamplePNameNV,*,*, GLenum,*,* +SampleMaskNV,*,*, GLbitfield,*,* diff --git a/src/glx/apple/specs/glx.spec b/src/glx/apple/specs/glx.spec new file mode 100644 index 00000000000..b8b8df296c7 --- /dev/null +++ b/src/glx/apple/specs/glx.spec @@ -0,0 +1,602 @@ +# Copyright (c) 1991-2005 Silicon Graphics, Inc. All Rights Reserved. +# Copyright (c) 2006-2010 The Khronos Group, Inc. +# +# This document is licensed under the SGI Free Software B License Version +# 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . +# +# $Revision: 10796 $ on $Date: 2010-03-19 17:31:10 -0700 (Fri, 19 Mar 2010) $ + +required-props: +param: retval retained +dlflags: notlistable handcode nop +glxflags: client-handcode server-handcode +glxvendorglx: * +vectorequiv: * +category: pixel-rw bgn-end display-list drawing drawing-control feedback framebuf misc modeling pixel-op pixel-rw state-req xform glx glxopcode +glxopcode: * + +############################################################################### +# +# GLX1.0 commands +# +############################################################################### +Render() + return void + category glx + dlflags notlistable + glxflags client-handcode server-handcode + glxopcode 1 + + +RenderLarge() + return void + category glx + dlflags notlistable + glxflags client-handcode server-handcode + glxopcode 2 + + +CreateContext(gc_id, screen, visual, share_list) + return void + param gc_id Int32 in value + param screen Int32 in value + param visual Int32 in value + param share_list Int32 in value + glxflags client-handcode server-handcode + category glx + dlflags notlistable + glxopcode 3 + + +DestroyContext(context) + return void + param context Int32 in value + glxflags client-handcode server-handcode + category glx + dlflags notlistable + glxopcode 4 + + +MakeCurrent(drawable, context) + return void + param drawable Int32 in value + param context Int32 in value + glxflags client-handcode server-handcode + category glx + dlflags notlistable + glxopcode 5 + + +IsDirect(dpy, context) + return void + param dpy Int32 in value + param context Int32 in value + glxflags client-handcode server-handcode + category glx + dlflags notlistable + glxopcode 6 + + +QueryVersion(major, minor) + return void + param major Int32 out reference + param minor Int32 out reference + category glx + dlflags notlistable + glxflags client-handcode server-handcode + glxopcode 7 + + +WaitGL(context) + return void + param context Int32 in value + category glx + dlflags notlistable + glxflags client-handcode server-handcode + glxopcode 8 + + +WaitX() + return void + category glx + dlflags notlistable + glxflags client-handcode server-handcode + glxopcode 9 + + +CopyContext(source, dest, mask) + return void + param source Int32 in value + param dest Int32 in value + param mask Int32 in value + category glx + dlflags notlistable + glxflags client-handcode server-handcode + glxopcode 10 + + +SwapBuffers(drawable) + return void + param drawable Int32 in value + category glx + dlflags notlistable + glxflags client-handcode server-handcode + glxopcode 11 + + +UseXFont(font, first, count, list_base) + return void + param font Int32 in value + param first Int32 in value + param count Int32 in value + param list_base Int32 in value + category glx + dlflags notlistable + glxflags client-handcode server-handcode + glxopcode 12 + + +CreateGLXPixmap(visual, pixmap, glxpixmap) + return void + param visual Int32 in value + param pixmap Int32 in value + param glxpixmap Int32 in value + category glx + dlflags notlistable + glxflags client-handcode server-handcode + glxopcode 13 + +GetVisualConfigs() + return void + category glx + dlflags notlistable + glxflags client-handcode server-handcode + glxopcode 14 + + +DestroyGLXPixmap(pixmap) + return void + param pixmap Int32 in value + glxflags client-handcode + category glx + dlflags notlistable + glxopcode 15 + + +VendorPrivate() + return void + glxflags client-handcode server-handcode + category glx + dlflags notlistable + glxopcode 16 + + +VendorPrivateWithReply() + return void + glxflags client-handcode server-handcode + category glx + dlflags notlistable + glxopcode 17 + +############################################################################### +# +# GLX1.1 commands +# +############################################################################### +QueryExtensionsString(screen) + return void + param screen Int32 in value + glxflags client-handcode server-handcode + category glx + dlflags notlistable + glxopcode 18 + +QueryServerString(screen, name) + return void + param screen Int32 in value + param name Int32 in value + glxflags client-handcode server-handcode + category glx + dlflags notlistable + glxopcode 19 + +ClientInfo() + return void + glxflags client-handcode server-handcode + category glx + dlflags notlistable + glxopcode 20 + +############################################################################### +# +# GLX1.3 commands +# +############################################################################### +GetFBConfigs() + return void + category glx + dlflags notlistable + glxflags client-handcode server-handcode + glxopcode 21 + +CreatePixmap(config, pixmap, glxpixmap) + return void + param config Int32 in value + param pixmap Int32 in value + param glxpixmap Int32 in value + dlflags notlistable + glxflags client-handcode server-handcode + category glx + glxopcode 22 + +DestroyPixmap(glxpixmap) + return void + param glxpixmap Int32 in value + dlflags notlistable + glxflags client-handcode server-handcode + category glx + glxopcode 23 + +CreateNewContext(config, render_type, share_list, direct) + return void + param config Int32 in value + param render_type Int32 in value + param share_list Int32 in value + param direct Int32 in value + dlflags notlistable + glxflags client-handcode server-handcode + category glx + glxopcode 24 + +QueryContext() + return void + dlflags notlistable + glxflags client-handcode server-handcode + category glx + glxopcode 25 + +MakeContextCurrent(drawable, readdrawable, context) + return void + param drawable Int32 in value + param readdrawable Int32 in value + param context Int32 in value + dlflags notlistable + glxflags client-handcode server-handcode + category glx + glxopcode 26 + +CreatePbuffer(config, pbuffer) + return void + param config Int32 in value + param pbuffer Int32 in value + dlflags notlistable + glxflags client-handcode server-handcode + category glx + glxopcode 27 + +DestroyPbuffer(pbuffer) + return void + param pbuffer Int32 in value + dlflags notlistable + glxflags client-handcode + category glx + glxopcode 28 + +GetDrawableAttributes(drawable) + return void + param drawable Int32 in value + dlflags notlistable + glxflags client-handcode server-handcode + category glx + glxopcode 29 + +ChangeDrawableAttributes(drawable) + return void + param drawable Int32 in value + dlflags notlistable + glxflags client-handcode server-handcode + category glx + glxopcode 30 + +CreateWindow(config, window, glxwindow) + return void + param config Int32 in value + param window Int32 in value + param glxwindow Int32 in value + dlflags notlistable + glxflags client-handcode server-handcode + category glx + glxopcode 31 + +DestroyWindow(glxwindow) + return void + param glxwindow Int32 in value + dlflags notlistable + glxflags client-handcode server-handcode + category glx + glxopcode 32 + +############################################################################### +# +# IRIX5.3 extension commands +# +############################################################################### + +############################################################################### +# +# SGI_swap_control extension commands +# +############################################################################### +SwapIntervalSGI() + return void + glxflags client-handcode server-handcode + category glx + dlflags notlistable + glxvendorglx 65536 + +############################################################################### +# +# IRIX5.3-PATCH154 extension commands +# +############################################################################### + +############################################################################### +# +# SGI_make_current_read extension commands +# +############################################################################### +MakeCurrentReadSGI(drawable, readdrawable, context) + return void + param drawable Int32 in value + param readdrawable Int32 in value + param context Int32 in value + glxflags client-handcode server-handcode + category glx + dlflags notlistable + glxvendorglx 65537 + +############################################################################### +# +# SGIX_video_source extension commands +# +############################################################################### +CreateGLXVideoSourceSGIX(dpy, screen, server, path, class, node) + return void + param dpy Int32 in value + param screen Int32 in value + param server Int32 in value + param path Int32 in value + param class Int32 in value + param node Int32 in value + glxflags client-handcode server-handcode + category glx + dlflags notlistable + glxvendorglx 65538 + +DestroyGLXVideoSourceSGIX(dpy, glxvideosource) + return void + param dpy Int32 in value + param glxvideosource Int32 in value + glxflags client-handcode server-handcode + category glx + dlflags notlistable + glxvendorglx 65539 + +############################################################################### +# +# IRIX6.2 extension commands +# +############################################################################### + +############################################################################### +# +# EXT_import_context extension commands +# +############################################################################### +QueryContextInfoEXT() + return void + category glx + dlflags notlistable + glxflags client-handcode server-handcode + glxvendorglx 1024 + +############################################################################### +# +# SGIX_fbconfig extension commands +# +############################################################################### +GetFBConfigsSGIX() + return void + category glx + dlflags notlistable + glxflags client-handcode server-handcode + glxvendorglx 65540 + +CreateContextWithConfigSGIX(gc_id, screen, config, share_list) + return void + param gc_id Int32 in value + param screen Int32 in value + param config Int32 in value + param share_list Int32 in value + glxflags client-handcode server-handcode + category glx + dlflags notlistable + glxvendorglx 65541 + +CreateGLXPixmapWithConfigSGIX(config, pixmap, glxpixmap) + return void + param config Int32 in value + param pixmap Int32 in value + param glxpixmap Int32 in value + category glx + dlflags notlistable + glxflags client-handcode server-handcode + glxvendorglx 65542 + +############################################################################### +# +# SGIX_pbuffer extension commands +# +############################################################################### + +CreateGLXPbufferSGIX(config, pbuffer) + return void + param config Int32 in value + param pbuffer Int32 in value + dlflags notlistable + glxflags client-handcode server-handcode + category glx + glxvendorglx 65543 + +DestroyGLXPbufferSGIX(pbuffer) + return void + param pbuffer Int32 in value + dlflags notlistable + glxflags client-handcode + category glx + glxvendorglx 65544 + +ChangeDrawableAttributesSGIX(drawable) + return void + param drawable Int32 in value + dlflags notlistable + glxflags client-handcode server-handcode + category glx + glxvendorglx 65545 + +GetDrawableAttributesSGIX(drawable) + return void + param drawable Int32 in value + dlflags notlistable + glxflags client-handcode server-handcode + category glx + glxvendorglx 65546 + +############################################################################### +# +# SGIX_swap_group extension commands +# +############################################################################### + +JoinSwapGroupSGIX(window,group) + return void + param window Int32 in value + param group Int32 in value + glxflags client-handcode server-handcode + category glx + dlflags notlistable + glxvendorglx 65547 + +############################################################################### +# +# SGIX_swap_barrier extension commands +# +############################################################################### + +BindSwapBarrierSGIX(window,barrier) + return void + param window Int32 in value + param barrier Int32 in value + glxflags client-handcode server-handcode + category glx + dlflags notlistable + glxvendorglx 65548 + +QueryMaxSwapBarriersSGIX() + return void + glxflags client-handcode server-handcode + category glx + dlflags notlistable + glxvendorglx 65549 + +############################################################################### +# +# SGIX_hyperpipe extension commands +# +############################################################################### + +QueryHyperpipeNetworkSGIX(dpy, npipes) + return GLXHyperpipeNetworkPointer + param dpy Display out reference + param npipes int out reference + glxflags client-handcode server-handcode + category glx + dlflags notlistable + glxvendorglx 65550 + +HyperpipeConfigSGIX(dpy, networkId, npipes, cfg, hpId) + return int + param dpy Display out reference + param networkId int in value + param npipes int in value + param cfg GLXHyperpipeConfig in array[npipes] + param hpId int out reference + glxflags client-handcode server-handcode + category glx + dlflags notlistable + glxvendorglx 65552 + +QueryHyperpipeConfigSGIX(dpy, hpId, npipes) + return GLXHyperpipeConfigPointer + param dpy Display out reference + param hpId int in value + param npipes int out reference + glxflags client-handcode server-handcode + category glx + dlflags notlistable + glxvendorglx 65551 + +DestroyHyperpipeConfigSGIX(dpy, hpId) + return int + param dpy Display out reference + param hpId int in value + glxflags client-handcode server-handcode + category glx + dlflags notlistable + glxvendorglx 65553 + +BindHyperpipeSGIX(dpy, hpId) + return int + param dpy Display out reference + param hpId int in value + glxflags client-handcode server-handcode + category glx + dlflags notlistable + glxvendorglx ??? + +QueryHyperpipeBestAttribSGIX(dpy, timeSlice, attrib, size, attribList, returnAttribList) + return int + param dpy Display out reference + param timeSlice int in value + param attrib int in value + param size int in value + param attribList Void in array[size] + param returnAttribList Void out array[size] + glxflags client-handcode server-handcode + category glx + dlflags notlistable + glxvendorglx ??? + +HyperpipeAttribSGIX(dpy, timeSlice, attrib, size, attribList) + return int + param dpy Display out reference + param timeSlice int in value + param attrib int in value + param size int in value + param attribList void in array[size] + glxflags client-handcode server-handcode + category glx + dlflags notlistable + glxvendorglx ??? + +QueryHyperpipeAttribSGIX(dpy, timeSlice, attrib, size, returnAttribList) + return int + param dpy Display out reference + param timeSlice int in value + param attrib int in value + param size int in value + param returnAttribList void in array[size] + glxflags client-handcode server-handcode + category glx + dlflags notlistable + glxvendorglx ??? diff --git a/src/glx/apple/specs/glxenum.spec b/src/glx/apple/specs/glxenum.spec new file mode 100644 index 00000000000..547f19e1c25 --- /dev/null +++ b/src/glx/apple/specs/glxenum.spec @@ -0,0 +1,420 @@ +# Copyright (c) 1991-2005 Silicon Graphics, Inc. All Rights Reserved. +# Copyright (c) 2006-2010 The Khronos Group, Inc. +# +# This document is licensed under the SGI Free Software B License Version +# 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . +# +# $Revision: 10796 $ on $Date: 2010-03-19 17:31:10 -0700 (Fri, 19 Mar 2010) $ + +# This is the GLX enumerant registry. +# +# It is an extremely important file. Do not mess with it unless +# you know what you're doing and have permission to do so. +# +# Rules for modification are the same as the rules for the OpenGL +# enumerant registry (gl.spec). Basically, don't modify this +# file unless you're the Khronos API Registrar. + +Extensions define: + VERSION_1_1 = 1 + VERSION_1_2 = 1 + VERSION_1_3 = 1 + VERSION_1_4 = 1 + SGIS_multisample = 1 + EXT_visual_info = 1 + SGI_swap_control = 1 + SGI_video_sync = 1 + SGI_make_current_read = 1 + SGIX_video_source = 1 + EXT_visual_rating = 1 + EXT_import_context = 1 + SGIX_fbconfig = 1 + SGIX_pbuffer = 1 + SGI_cushion = 1 + SGIX_video_resize = 1 + SGIX_dmbuffer = 1 + SGIX_swap_group = 1 + SGIX_swap_barrier = 1 + SGIS_blended_overlay = 1 + SGIS_shared_multisample = 1 + SUN_get_transparent_index = 1 + 3DFX_multisample = 1 + MESA_copy_sub_buffer = 1 + MESA_pixmap_colormap = 1 + MESA_release_buffers = 1 + MESA_set_3dfx_mode = 1 + SGIX_visual_select_group = 1 + SGIX_hyperpipe = 1 + +GLXStringName enum: + VENDOR = 0x1 + VERSION = 0x2 + EXTENSIONS = 0x3 + +GLXErrorCode enum: + BAD_SCREEN = 1 + BAD_ATTRIBUTE = 2 + NO_EXTENSION = 3 + BAD_VISUAL = 4 + BAD_CONTEXT = 5 + BAD_VALUE = 6 + BAD_ENUM = 7 + BAD_HYPERPIPE_CONFIG_SGIX = 91 # SGIX_hyperpipe + BAD_HYPERPIPE_SGIX = 92 # " + +# Reserved bits in bitfields of various purposes + +GLXDrawableTypeMask enum: + WINDOW_BIT = 0x00000001 # DRAWABLE_TYPE value + PIXMAP_BIT = 0x00000002 # " + PBUFFER_BIT = 0x00000004 # " + WINDOW_BIT_SGIX = 0x00000001 # DRAWABLE_TYPE_SGIX value + PIXMAP_BIT_SGIX = 0x00000002 # " + PBUFFER_BIT_SGIX = 0x00000004 # " + +GLXRenderTypeMask enum: + RGBA_BIT = 0x00000001 # RENDER_TYPE value + COLOR_INDEX_BIT = 0x00000002 # " + RGBA_BIT_SGIX = 0x00000001 # RENDER_TYPE_SGIX value + COLOR_INDEX_BIT_SGIX = 0x00000002 # " + RGBA_FLOAT_BIT_ARB = 0x00000004 # RENDER_TYPE value (from ARB_fbconfig_float) + RGBA_UNSIGNED_FLOAT_BIT_EXT = 0x00000008 # RENDER_TYPE value (from EXT_fbconfig_packed_float) + +GLXSyncType enum: + SYNC_FRAME_SGIX = 0x00000000 # ChannelRectSyncSGIX synctype + SYNC_SWAP_SGIX = 0x00000001 # " + +GLXEventMask enum: + PBUFFER_CLOBBER_MASK = 0x08000000 # SelectEvent mask + BUFFER_CLOBBER_MASK_SGIX = 0x08000000 # SelectEventSGIX mask + BUFFER_SWAP_COMPLETE_INTEL_MASK = 0x04000000 # SelectEvent mask (for GLX_INTEL_swap_event) + +GLXPbufferClobberMask enum: + FRONT_LEFT_BUFFER_BIT = 0x00000001 # PbufferClobberEvent mask + FRONT_RIGHT_BUFFER_BIT = 0x00000002 # " + BACK_LEFT_BUFFER_BIT = 0x00000004 # " + BACK_RIGHT_BUFFER_BIT = 0x00000008 # " + AUX_BUFFERS_BIT = 0x00000010 # " + DEPTH_BUFFER_BIT = 0x00000020 # " + STENCIL_BUFFER_BIT = 0x00000040 # " + ACCUM_BUFFER_BIT = 0x00000080 # " + FRONT_LEFT_BUFFER_BIT_SGIX = 0x00000001 # BufferClobberEventSGIX mask + FRONT_RIGHT_BUFFER_BIT_SGIX = 0x00000002 # " + BACK_LEFT_BUFFER_BIT_SGIX = 0x00000004 # " + BACK_RIGHT_BUFFER_BIT_SGIX = 0x00000008 # " + AUX_BUFFERS_BIT_SGIX = 0x00000010 # " + DEPTH_BUFFER_BIT_SGIX = 0x00000020 # " + STENCIL_BUFFER_BIT_SGIX = 0x00000040 # " + ACCUM_BUFFER_BIT_SGIX = 0x00000080 # " + SAMPLE_BUFFERS_BIT_SGIX = 0x00000100 # " + +GLXHyperpipeTypeMask enum: + HYPERPIPE_DISPLAY_PIPE_SGIX = 0x00000001 # SGIX_hyperpipe + HYPERPIPE_RENDER_PIPE_SGIX = 0x00000002 # " + +GLXHyperpipeAttrib enum: + PIPE_RECT_SGIX = 0x00000001 # SGIX_hyperpipe + PIPE_RECT_LIMITS_SGIX = 0x00000002 # " + HYPERPIPE_STEREO_SGIX = 0x00000003 # " + HYPERPIPE_PIXEL_AVERAGE_SGIX = 0x00000004 # " + +GLXHyperpipeMisc enum: + HYPERPIPE_PIPE_NAME_LENGTH_SGIX = 80 # SGIX_hyperpipe + +GLXBindToTextureTargetMask enum: + TEXTURE_1D_BIT_EXT = 0x00000001 # EXT_texture_from_pixmap + TEXTURE_2D_BIT_EXT = 0x00000002 + TEXTURE_RECTANGLE_BIT_EXT = 0x00000004 + +# CONTEXT_FLAGS_ARB bits +GLXContextFlags enum: + CONTEXT_DEBUG_BIT_ARB = 0x00000001 # ARB_create_context + CONTEXT_FORWARD_COMPATIBLE_BIT_ARB = 0x00000002 # ARB_create_context + +# CONTEXT_PROFILE_MASK_ARB bits +GLXContextProfileMask enum: + CONTEXT_CORE_PROFILE_BIT_ARB = 0x00000001 # ARB_create_context_profile + CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB = 0x00000002 # ARB_create_context_profile + +GLXAttribute enum: + USE_GL = 1 # Visual attributes + BUFFER_SIZE = 2 # " + LEVEL = 3 # " + RGBA = 4 # " + DOUBLEBUFFER = 5 # " + STEREO = 6 # " + AUX_BUFFERS = 7 # " + RED_SIZE = 8 # " + GREEN_SIZE = 9 # " + BLUE_SIZE = 10 # " + ALPHA_SIZE = 11 # " + DEPTH_SIZE = 12 # " + STENCIL_SIZE = 13 # " + ACCUM_RED_SIZE = 14 # " + ACCUM_GREEN_SIZE = 15 # " + ACCUM_BLUE_SIZE = 16 # " + ACCUM_ALPHA_SIZE = 17 # " + CONFIG_CAVEAT = 0x20 # " + X_VISUAL_TYPE = 0x22 # " + TRANSPARENT_TYPE = 0x23 # " + TRANSPARENT_INDEX_VALUE = 0x24 # " + TRANSPARENT_RED_VALUE = 0x25 # " + TRANSPARENT_GREEN_VALUE = 0x26 # " + TRANSPARENT_BLUE_VALUE = 0x27 # " + TRANSPARENT_ALPHA_VALUE = 0x28 # " + DONT_CARE = 0xFFFFFFFF # may be specified for ChooseFBConfig attributes + NONE = 0x8000 # several attribute values + SLOW_CONFIG = 0x8001 # CONFIG_CAVEAT attribute value + TRUE_COLOR = 0x8002 # X_VISUAL_TYPE attribute value + DIRECT_COLOR = 0x8003 # " + PSEUDO_COLOR = 0x8004 # " + STATIC_COLOR = 0x8005 # " + GRAY_SCALE = 0x8006 # " + STATIC_GRAY = 0x8007 # " + TRANSPARENT_RGB = 0x8008 # TRANSPARENT_TYPE attribute value + TRANSPARENT_INDEX = 0x8009 # " + VISUAL_ID = 0x800B # Context attribute + SCREEN = 0x800C # " + NON_CONFORMANT_CONFIG = 0x800D # CONFIG_CAVEAT attribute value + DRAWABLE_TYPE = 0x8010 # FBConfig attribute + RENDER_TYPE = 0x8011 # " + X_RENDERABLE = 0x8012 # " + FBCONFIG_ID = 0x8013 # " + RGBA_TYPE = 0x8014 # CreateNewContext render_type value + COLOR_INDEX_TYPE = 0x8015 # " + MAX_PBUFFER_WIDTH = 0x8016 # FBConfig attribute + MAX_PBUFFER_HEIGHT = 0x8017 # " + MAX_PBUFFER_PIXELS = 0x8018 # " + PRESERVED_CONTENTS = 0x801B # CreateGLXPbuffer attribute + LARGEST_PBUFFER = 0x801C # " + WIDTH = 0x801D # Drawable attribute + HEIGHT = 0x801E # " + EVENT_MASK = 0x801F # " + DAMAGED = 0x8020 # PbufferClobber event_type value + SAVED = 0x8021 # " + WINDOW = 0x8022 # PbufferClobber draw_type value + PBUFFER = 0x8023 # " + PBUFFER_HEIGHT = 0x8040 # CreateGLXPbuffer attribute + PBUFFER_WIDTH = 0x8041 # " + VISUAL_CAVEAT_EXT = 0x20 # Visual attribute + X_VISUAL_TYPE_EXT = 0x22 # " + TRANSPARENT_TYPE_EXT = 0x23 # " + TRANSPARENT_INDEX_VALUE_EXT = 0x24 # " + TRANSPARENT_RED_VALUE_EXT = 0x25 # " + TRANSPARENT_GREEN_VALUE_EXT = 0x26 # " + TRANSPARENT_BLUE_VALUE_EXT = 0x27 # " + TRANSPARENT_ALPHA_VALUE_EXT = 0x28 # " + NONE_EXT = 0x8000 # several EXT attribute values + SLOW_VISUAL_EXT = 0x8001 # VISUAL_CAVEAT_EXT attribute value + TRUE_COLOR_EXT = 0x8002 # X_VISUAL_TYPE_EXT attribute value + DIRECT_COLOR_EXT = 0x8003 # " + PSEUDO_COLOR_EXT = 0x8004 # " + STATIC_COLOR_EXT = 0x8005 # " + GRAY_SCALE_EXT = 0x8006 # " + STATIC_GRAY_EXT = 0x8007 # " + TRANSPARENT_RGB_EXT = 0x8008 # TRANSPARENT_TYPE_EXT attribute value + TRANSPARENT_INDEX_EXT = 0x8009 # " + SHARE_CONTEXT_EXT = 0x800A # QueryContextInfoEXT attribute + VISUAL_ID_EXT = 0x800B # " + SCREEN_EXT = 0x800C # " + NON_CONFORMANT_VISUAL_EXT = 0x800D # VISUAL_CAVEAT_EXT attribute value + DRAWABLE_TYPE_SGIX = 0x8010 # FBConfigSGIX attribute + RENDER_TYPE_SGIX = 0x8011 # " + X_RENDERABLE_SGIX = 0x8012 # " + FBCONFIG_ID_SGIX = 0x8013 # " + RGBA_TYPE_SGIX = 0x8014 # CreateContextWithConfigSGIX render_type value + COLOR_INDEX_TYPE_SGIX = 0x8015 # " + MAX_PBUFFER_WIDTH_SGIX = 0x8016 # FBConfigSGIX attribute + MAX_PBUFFER_HEIGHT_SGIX = 0x8017 # " + MAX_PBUFFER_PIXELS_SGIX = 0x8018 # " + OPTIMAL_PBUFFER_WIDTH_SGIX = 0x8019 # " + OPTIMAL_PBUFFER_HEIGHT_SGIX = 0x801A # " + PRESERVED_CONTENTS_SGIX = 0x801B # PbufferSGIX attribute + LARGEST_PBUFFER_SGIX = 0x801C # " + WIDTH_SGIX = 0x801D # " + HEIGHT_SGIX = 0x801E # " + EVENT_MASK_SGIX = 0x801F # " + DAMAGED_SGIX = 0x8020 # BufferClobberSGIX event_type value + SAVED_SGIX = 0x8021 # " + WINDOW_SGIX = 0x8022 # BufferClobberSGIX draw_type value + PBUFFER_SGIX = 0x8023 # " + DIGITAL_MEDIA_PBUFFER_SGIX = 0x8024 # PbufferSGIX attribute + BLENDED_RGBA_SGIS = 0x8025 # TRANSPARENT_TYPE_EXT attribute value + MULTISAMPLE_SUB_RECT_WIDTH_SGIS = 0x8026 # Visual attribute (shared_multisample) + MULTISAMPLE_SUB_RECT_HEIGHT_SGIS = 0x8027 # " + VISUAL_SELECT_GROUP_SGIX = 0x8028 # Visual attribute (visual_select_group) + HYPERPIPE_ID_SGIX = 0x8030 # Associated hyperpipe ID (SGIX_hyperpipe) + SAMPLE_BUFFERS_SGIS = 100000 # Visual attribute (SGIS_multisample) + SAMPLES_SGIS = 100001 # " + SAMPLE_BUFFERS_ARB = 100000 # Visual attribute (ARB_multisample - alias of SGIS_multisample) + SAMPLES_ARB = 100001 # " + SAMPLE_BUFFERS = 100000 # Visual attribute (GLX 1.4 core - alias of SGIS_multisample) + SAMPLES = 100001 # " + +############################################################################### + +# ARB: 0x2070-0x209F (shared with WGL) + +# Also includes a bitmask - see ContextFlags above +# ARB_create_context enum: + CONTEXT_MAJOR_VERSION_ARB = 0x2091 + CONTEXT_MINOR_VERSION_ARB = 0x2092 + CONTEXT_FLAGS_ARB = 0x2094 + +############################################################################### + +# NVIDIA: 0x20A0 - 0x219F (shared with WGL) + +# NV_float_buffer enum: + FLOAT_COMPONENTS_NV = 0x20B0 +# EXT_fbconfig_packed_float enum: + RGBA_UNSIGNED_FLOAT_TYPE_EXT = 0x20B1 +# EXT_framebuffer_sRGB enum: + FRAMEBUFFER_SRGB_CAPABLE_EXT = 0x20B2 + +# NV_future_use: 0x20B3-0x20B8 + +# ARB_fbconfig_float enum: + RGBA_FLOAT_TYPE_ARB = 0x20B9 + +# NV_future_use: 0x20BA-0x20C2 + +# NV_video_out enum: + VIDEO_OUT_COLOR_NV = 0x20C3 + VIDEO_OUT_ALPHA_NV = 0x20C4 + VIDEO_OUT_DEPTH_NV = 0x20C5 + VIDEO_OUT_COLOR_AND_ALPHA_NV = 0x20C6 + VIDEO_OUT_COLOR_AND_DEPTH_NV = 0x20C7 + VIDEO_OUT_FRAME_NV = 0x20C8 + VIDEO_OUT_FIELD_1_NV = 0x20C9 + VIDEO_OUT_FIELD_2_NV = 0x20CA + VIDEO_OUT_STACKED_FIELDS_1_2_NV = 0x20CB + VIDEO_OUT_STACKED_FIELDS_2_1_NV = 0x20CC + +# NV_video_capture enum: + DEVICE_ID_NV = 0x20CD + UNIQUE_ID_NV = 0x20CE + NUM_VIDEO_CAPTURE_SLOTS_NV = 0x20CF + +# EXT_texture_from_pixmap enum: + BIND_TO_TEXTURE_RGB_EXT = 0x20D0 + BIND_TO_TEXTURE_RGBA_EXT = 0x20D1 + BIND_TO_MIPMAP_TEXTURE_EXT = 0x20D2 + BIND_TO_TEXTURE_TARGETS_EXT = 0x20D3 + Y_INVERTED_EXT = 0x20D4 + TEXTURE_FORMAT_EXT = 0x20D5 + TEXTURE_TARGET_EXT = 0x20D6 + MIPMAP_TEXTURE_EXT = 0x20D7 + TEXTURE_FORMAT_NONE_EXT = 0x20D8 + TEXTURE_FORMAT_RGB_EXT = 0x20D9 + TEXTURE_FORMAT_RGBA_EXT = 0x20DA + TEXTURE_1D_EXT = 0x20DB + TEXTURE_2D_EXT = 0x20DC + TEXTURE_RECTANGLE_EXT = 0x20DD + FRONT_LEFT_EXT = 0x20DE + FRONT_RIGHT_EXT = 0x20DF + BACK_LEFT_EXT = 0x20E0 + BACK_RIGHT_EXT = 0x20E1 + FRONT_EXT = GLX_FRONT_LEFT_EXT + BACK_EXT = GLX_BACK_LEFT_EXT + AUX0_EXT = 0x20E2 + AUX1_EXT = 0x20E3 + AUX2_EXT = 0x20E4 + AUX3_EXT = 0x20E5 + AUX4_EXT = 0x20E6 + AUX5_EXT = 0x20E7 + AUX6_EXT = 0x20E8 + AUX7_EXT = 0x20E9 + AUX8_EXT = 0x20EA + AUX9_EXT = 0x20EB + +# NV_future_use: 0x20EC-0x20EF + +NV_present_video enum: + NUM_VIDEO_SLOTS_NV = 0x20F0 + +EXT_swap_control enum: + SWAP_INTERVAL_EXT = 0x20F1 + MAX_SWAP_INTERVAL_EXT = 0x20F2 + +# NV_future_use: 0x20F3-0x219F + +############################################################################### + +# MESA (not in a reserved block) + +# MESA_set_3dfx_mode enum: +# 3DFX_WINDOW_MODE_MESA = 0x1 +# 3DFX_FULLSCREEN_MODE_MESA = 0x2 + +############################################################################### + +# SGI_future_use: 0x8029-0x802F +# SGIX_hyperpipe adds attribute name HYPERPIPE_ID_SGIX = 0x8030 +# SGI_future_use: 0x8031-0x803F + +############################################################################### + +# ARB_future_use: 0x8042-0x804F + +############################################################################### + +# 3DFX: 0x8050-0x805F + +# 3DFX_multisample enum: +# SAMPLE_BUFFERS_3DFX = 0x8050 +# SAMPLES_3DFX = 0x8051 + +############################################################################### + +# OML: 0x8060-0x806F + +# OML_swap_method enum: +# SWAP_METHOD_OML = 0x8060 +# SWAP_EXCHANGE_OML = 0x8061 +# SWAP_COPY_OML = 0x8062 +# SWAP_UNDEFINED_OML = 0x8063 + +# OML_future_use: 0x8064-0x806F + +############################################################################### + +# NVIDIA: 0x8070 - 0x816F + +NVIDIA_future_use: 0x8070-0x816F + +############################################################################### + +# SUN: 0x8170 - 0x817F + +SUN_future_use: 0x8170-0x817F + +############################################################################### + +# INTEL: 0x8180 - 0x818F + +# INTEL_swap_event: 0x8180-0x8182 +# EXCHANGE_COMPLETE_INTEL = 0x8180 +# COPY_COMPLETE_INTEL = 0x8181 +# FLIP_COMPLETE_INTEL = 0x8182 + +INTEL_future_use: 0x8183-0x818F + +############################################################################### +### Please remember that new GLX enum allocations must be obtained by request +### to the Khronos API Registrar (see comments at the top of this file) +### File requests in the Khronos Bugzilla, OpenGL project, Registry component. +############################################################################### + +# Any_vendor_future_use: 0x8180-0x9125 + +# Also includes a bitmask - see ContextProfileMask above +# ARB_create_context_profile enum: (equivalent to corresponding GL token) + CONTEXT_PROFILE_MASK_ARB = 0x9126 + +# Any_vendor_future_use: 0x9127-0xFFFF +# +# This range must be the last range in the file. To generate a new +# range, allocate multiples of 16 from the beginning of the +# Any_vendor_future_use range and update glxenum.spec, glxenumext.spec, +# and extensions.reserved. diff --git a/src/glx/apple/specs/glxenumext.spec b/src/glx/apple/specs/glxenumext.spec new file mode 100644 index 00000000000..797e6970dd2 --- /dev/null +++ b/src/glx/apple/specs/glxenumext.spec @@ -0,0 +1,515 @@ +# Copyright (c) 1991-2005 Silicon Graphics, Inc. All Rights Reserved. +# Copyright (c) 2006-2010 The Khronos Group, Inc. +# +# This document is licensed under the SGI Free Software B License Version +# 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . +# +# $Revision: 10796 $ on $Date: 2010-03-19 17:31:10 -0700 (Fri, 19 Mar 2010) $ + +# List of GLX enumerants for glxext.h header +# +# This is NOT the master GLX enumerant registry (glxenum.spec). +# +# Unlike glxenum.spec, glxenumext.spec is +# (1) In order by extension number. +# (2) Includes only GLX extensions and GLX 1.3/1.4 core enumerants, +# since it's assumed all <glx.h> today support at least GLX 1.2. +# (3) Has no 'Extensions' section, since enums are always +# conditionally protected against multiple definition +# by glextenum.pl. +# (4) Is processed by glextenum.pl, which has evolved +# from enum.pl - should merge back into one script. + +# glxext.h version number - this should be automatically updated, +# when changing either enum or template spec files. + +passthru: +passthru: /* Header file version number, required by OpenGL ABI for Linux */ +passthru: /* glxext.h last updated 2010/02/10 */ +passthru: /* Current version at http://www.opengl.org/registry/ */ +passthru: #define GLX_GLXEXT_VERSION 27 + +############################################################################### +# +# GLX 1.3 enums +# +############################################################################### + +VERSION_1_3 enum: + WINDOW_BIT = 0x00000001 # DRAWABLE_TYPE value + PIXMAP_BIT = 0x00000002 # " + PBUFFER_BIT = 0x00000004 # " + RGBA_BIT = 0x00000001 # RENDER_TYPE value + COLOR_INDEX_BIT = 0x00000002 # " + PBUFFER_CLOBBER_MASK = 0x08000000 # SelectEvent mask + FRONT_LEFT_BUFFER_BIT = 0x00000001 # PbufferClobberEvent mask + FRONT_RIGHT_BUFFER_BIT = 0x00000002 # " + BACK_LEFT_BUFFER_BIT = 0x00000004 # " + BACK_RIGHT_BUFFER_BIT = 0x00000008 # " + AUX_BUFFERS_BIT = 0x00000010 # " + DEPTH_BUFFER_BIT = 0x00000020 # " + STENCIL_BUFFER_BIT = 0x00000040 # " + ACCUM_BUFFER_BIT = 0x00000080 # " + CONFIG_CAVEAT = 0x20 # " + X_VISUAL_TYPE = 0x22 # " + TRANSPARENT_TYPE = 0x23 # " + TRANSPARENT_INDEX_VALUE = 0x24 # " + TRANSPARENT_RED_VALUE = 0x25 # " + TRANSPARENT_GREEN_VALUE = 0x26 # " + TRANSPARENT_BLUE_VALUE = 0x27 # " + TRANSPARENT_ALPHA_VALUE = 0x28 # " + DONT_CARE = 0xFFFFFFFF # may be specified for ChooseFBConfig attributes + NONE = 0x8000 # several attribute values + SLOW_CONFIG = 0x8001 # CONFIG_CAVEAT attribute value + TRUE_COLOR = 0x8002 # X_VISUAL_TYPE attribute value + DIRECT_COLOR = 0x8003 # " + PSEUDO_COLOR = 0x8004 # " + STATIC_COLOR = 0x8005 # " + GRAY_SCALE = 0x8006 # " + STATIC_GRAY = 0x8007 # " + TRANSPARENT_RGB = 0x8008 # TRANSPARENT_TYPE attribute value + TRANSPARENT_INDEX = 0x8009 # " + VISUAL_ID = 0x800B # Context attribute + SCREEN = 0x800C # " + NON_CONFORMANT_CONFIG = 0x800D # CONFIG_CAVEAT attribute value + DRAWABLE_TYPE = 0x8010 # FBConfig attribute + RENDER_TYPE = 0x8011 # " + X_RENDERABLE = 0x8012 # " + FBCONFIG_ID = 0x8013 # " + RGBA_TYPE = 0x8014 # CreateNewContext render_type value + COLOR_INDEX_TYPE = 0x8015 # " + MAX_PBUFFER_WIDTH = 0x8016 # FBConfig attribute + MAX_PBUFFER_HEIGHT = 0x8017 # " + MAX_PBUFFER_PIXELS = 0x8018 # " + PRESERVED_CONTENTS = 0x801B # CreateGLXPbuffer attribute + LARGEST_PBUFFER = 0x801C # " + WIDTH = 0x801D # Drawable attribute + HEIGHT = 0x801E # " + EVENT_MASK = 0x801F # " + DAMAGED = 0x8020 # PbufferClobber event_type value + SAVED = 0x8021 # " + WINDOW = 0x8022 # PbufferClobber draw_type value + PBUFFER = 0x8023 # " + PBUFFER_HEIGHT = 0x8040 # CreateGLXPbuffer attribute + PBUFFER_WIDTH = 0x8041 # " + +############################################################################### +# +# GLX 1.4 enums +# +############################################################################### + +VERSION_1_4 enum: + SAMPLE_BUFFERS = 100000 + SAMPLES = 100001 + +############################################################################### +# +# ARB GLX extensions, in ARB extension order +# +############################################################################### + +############################################################################### + +# No new tokens +# ARB Extension #2 +ARB_get_proc_address enum: + +############################################################################### + +# ARB Extension #5 +ARB_multisample enum: + SAMPLE_BUFFERS_ARB = 100000 + SAMPLES_ARB = 100001 + +############################################################################### + +# ARB Extension #39 +ARB_fbconfig_float enum: + RGBA_FLOAT_TYPE_ARB = 0x20B9 + RGBA_FLOAT_BIT_ARB = 0x00000004 + +############################################################################### + +# ARB Extension #56 +ARB_create_context enum: + CONTEXT_DEBUG_BIT_ARB = 0x00000001 + CONTEXT_FORWARD_COMPATIBLE_BIT_ARB = 0x00000002 + CONTEXT_MAJOR_VERSION_ARB = 0x2091 + CONTEXT_MINOR_VERSION_ARB = 0x2092 + CONTEXT_FLAGS_ARB = 0x2094 + +############################################################################### + +# ARB Extension #75 +ARB_create_context_profile enum: + CONTEXT_CORE_PROFILE_BIT_ARB = 0x00000001 + CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB = 0x00000002 + CONTEXT_PROFILE_MASK_ARB = 0x9126 + + +############################################################################### +# +# non-ARB GLX extensions, in registry order +# +############################################################################### + +############################################################################### + +# Unfortunately, the SGIS_multisample specification and the IRIX +# implementation are inconsistent; the spec assigns enums as follows. +# ARB_multisample reuses these enums with ARB suffixes, and it can't +# be changed at this point. So in the interest of supporting both +# extensions on non-IRIX platforms, the SGIS enums will be defined +# here as originally specified. + +# Extension #25 +SGIS_multisample enum: + SAMPLE_BUFFERS_SGIS = 100000 + SAMPLES_SGIS = 100001 + +############################################################################### + +# Extension #28 +EXT_visual_info enum: + X_VISUAL_TYPE_EXT = 0x22 + TRANSPARENT_TYPE_EXT = 0x23 + TRANSPARENT_INDEX_VALUE_EXT = 0x24 + TRANSPARENT_RED_VALUE_EXT = 0x25 + TRANSPARENT_GREEN_VALUE_EXT = 0x26 + TRANSPARENT_BLUE_VALUE_EXT = 0x27 + TRANSPARENT_ALPHA_VALUE_EXT = 0x28 + NONE_EXT = 0x8000 + TRUE_COLOR_EXT = 0x8002 + DIRECT_COLOR_EXT = 0x8003 + PSEUDO_COLOR_EXT = 0x8004 + STATIC_COLOR_EXT = 0x8005 + GRAY_SCALE_EXT = 0x8006 + STATIC_GRAY_EXT = 0x8007 + TRANSPARENT_RGB_EXT = 0x8008 + TRANSPARENT_INDEX_EXT = 0x8009 + +############################################################################### + +# No new tokens +# Extension #40 +SGI_swap_control enum: + +############################################################################### + +# No new tokens +# Extension #41 +SGI_video_sync enum: + +############################################################################### + +# No new tokens +# Extension #42 +SGI_make_current_read enum: + +############################################################################### + +# No new tokens +# Extension #43 +SGIX_video_source enum: + +############################################################################### + +# Extension #44 +EXT_visual_rating enum: + VISUAL_CAVEAT_EXT = 0x20 + SLOW_VISUAL_EXT = 0x8001 + NON_CONFORMANT_VISUAL_EXT = 0x800D + use EXT_visual_info NONE_EXT + +############################################################################### + +# Extension #47 +EXT_import_context enum: + SHARE_CONTEXT_EXT = 0x800A + VISUAL_ID_EXT = 0x800B + SCREEN_EXT = 0x800C + +############################################################################### + +# Extension #49 +SGIX_fbconfig enum: + WINDOW_BIT_SGIX = 0x00000001 + PIXMAP_BIT_SGIX = 0x00000002 + RGBA_BIT_SGIX = 0x00000001 + COLOR_INDEX_BIT_SGIX = 0x00000002 + DRAWABLE_TYPE_SGIX = 0x8010 + RENDER_TYPE_SGIX = 0x8011 + X_RENDERABLE_SGIX = 0x8012 + FBCONFIG_ID_SGIX = 0x8013 + RGBA_TYPE_SGIX = 0x8014 + COLOR_INDEX_TYPE_SGIX = 0x8015 + use EXT_import_context SCREEN_EXT + +############################################################################### + +# Extension #50 +SGIX_pbuffer enum: + PBUFFER_BIT_SGIX = 0x00000004 + BUFFER_CLOBBER_MASK_SGIX = 0x08000000 + FRONT_LEFT_BUFFER_BIT_SGIX = 0x00000001 + FRONT_RIGHT_BUFFER_BIT_SGIX = 0x00000002 + BACK_LEFT_BUFFER_BIT_SGIX = 0x00000004 + BACK_RIGHT_BUFFER_BIT_SGIX = 0x00000008 + AUX_BUFFERS_BIT_SGIX = 0x00000010 + DEPTH_BUFFER_BIT_SGIX = 0x00000020 + STENCIL_BUFFER_BIT_SGIX = 0x00000040 + ACCUM_BUFFER_BIT_SGIX = 0x00000080 + SAMPLE_BUFFERS_BIT_SGIX = 0x00000100 + MAX_PBUFFER_WIDTH_SGIX = 0x8016 + MAX_PBUFFER_HEIGHT_SGIX = 0x8017 + MAX_PBUFFER_PIXELS_SGIX = 0x8018 + OPTIMAL_PBUFFER_WIDTH_SGIX = 0x8019 + OPTIMAL_PBUFFER_HEIGHT_SGIX = 0x801A + PRESERVED_CONTENTS_SGIX = 0x801B + LARGEST_PBUFFER_SGIX = 0x801C + WIDTH_SGIX = 0x801D + HEIGHT_SGIX = 0x801E + EVENT_MASK_SGIX = 0x801F + DAMAGED_SGIX = 0x8020 + SAVED_SGIX = 0x8021 + WINDOW_SGIX = 0x8022 + PBUFFER_SGIX = 0x8023 + +############################################################################### + +# Extension #62 +SGI_cushion enum: +# CUSHION_BUFFERS_SGI ???? + +############################################################################### + +# Extension #83 +SGIX_video_resize enum: + SYNC_FRAME_SGIX = 0x00000000 + SYNC_SWAP_SGIX = 0x00000001 + +############################################################################### + +# Extension #86 +SGIX_dmbuffer enum: + DIGITAL_MEDIA_PBUFFER_SGIX = 0x8024 + +############################################################################### + +# No new tokens +# Extension #91 +SGIX_swap_group enum: + +############################################################################### + +# No new tokens +# Extension #92 +SGIX_swap_barrier enum: + +############################################################################### + +# Extension #142 +SGIS_blended_overlay enum: + BLENDED_RGBA_SGIS = 0x8025 + +############################################################################### + +# Extension #143 +SGIS_shared_multisample enum: + MULTISAMPLE_SUB_RECT_WIDTH_SGIS = 0x8026 + MULTISAMPLE_SUB_RECT_HEIGHT_SGIS = 0x8027 + +############################################################################### + +# No new tokens +# Extension #183 +SUN_get_transparent_index enum: + +############################################################################### + +# Extension #207 +3DFX_multisample enum: + SAMPLE_BUFFERS_3DFX = 0x8050 + SAMPLES_3DFX = 0x8051 + +############################################################################### + +# No new tokens +# Extension #215 +MESA_copy_sub_buffer enum: + +############################################################################### + +# No new tokens +# Extension #216 +MESA_pixmap_colormap enum: + +############################################################################### + +# No new tokens +# Extension #217 +MESA_release_buffers enum: + +############################################################################### + +# Extension #218 +MESA_set_3dfx_mode enum: + 3DFX_WINDOW_MODE_MESA = 0x1 + 3DFX_FULLSCREEN_MODE_MESA = 0x2 + +############################################################################### + +# Extension #234 +SGIX_visual_select_group enum: + VISUAL_SELECT_GROUP_SGIX = 0x8028 + +############################################################################### + +# Extension #237 +OML_swap_method enum: + SWAP_METHOD_OML = 0x8060 + SWAP_EXCHANGE_OML = 0x8061 + SWAP_COPY_OML = 0x8062 + SWAP_UNDEFINED_OML = 0x8063 + +############################################################################### + +# No new tokens +# Extension #238 +OML_sync_control enum: + +############################################################################### + +# Extension #281 +NV_float_buffer enum: + FLOAT_COMPONENTS_NV = 0x20B0 + +############################################################################### + +# Extension #307 +SGIX_hyperpipe enum: + HYPERPIPE_PIPE_NAME_LENGTH_SGIX = 80 + BAD_HYPERPIPE_CONFIG_SGIX = 91 + BAD_HYPERPIPE_SGIX = 92 + HYPERPIPE_DISPLAY_PIPE_SGIX = 0x00000001 + HYPERPIPE_RENDER_PIPE_SGIX = 0x00000002 + PIPE_RECT_SGIX = 0x00000001 + PIPE_RECT_LIMITS_SGIX = 0x00000002 + HYPERPIPE_STEREO_SGIX = 0x00000003 + HYPERPIPE_PIXEL_AVERAGE_SGIX = 0x00000004 + HYPERPIPE_ID_SGIX = 0x8030 + +############################################################################### + +# No new tokens +# Extension #308 +MESA_agp_offset enum: + +############################################################################### + +# Extension #328 +EXT_fbconfig_packed_float enum: + RGBA_UNSIGNED_FLOAT_TYPE_EXT = 0x20B1 + RGBA_UNSIGNED_FLOAT_BIT_EXT = 0x00000008 + +############################################################################### + +# Extension #337 +EXT_framebuffer_sRGB enum: + FRAMEBUFFER_SRGB_CAPABLE_EXT = 0x20B2 + +############################################################################### + +# Extension #344 +EXT_texture_from_pixmap enum: + TEXTURE_1D_BIT_EXT = 0x00000001 + TEXTURE_2D_BIT_EXT = 0x00000002 + TEXTURE_RECTANGLE_BIT_EXT = 0x00000004 + BIND_TO_TEXTURE_RGB_EXT = 0x20D0 + BIND_TO_TEXTURE_RGBA_EXT = 0x20D1 + BIND_TO_MIPMAP_TEXTURE_EXT = 0x20D2 + BIND_TO_TEXTURE_TARGETS_EXT = 0x20D3 + Y_INVERTED_EXT = 0x20D4 + TEXTURE_FORMAT_EXT = 0x20D5 + TEXTURE_TARGET_EXT = 0x20D6 + MIPMAP_TEXTURE_EXT = 0x20D7 + TEXTURE_FORMAT_NONE_EXT = 0x20D8 + TEXTURE_FORMAT_RGB_EXT = 0x20D9 + TEXTURE_FORMAT_RGBA_EXT = 0x20DA + TEXTURE_1D_EXT = 0x20DB + TEXTURE_2D_EXT = 0x20DC + TEXTURE_RECTANGLE_EXT = 0x20DD + FRONT_LEFT_EXT = 0x20DE + FRONT_RIGHT_EXT = 0x20DF + BACK_LEFT_EXT = 0x20E0 + BACK_RIGHT_EXT = 0x20E1 + FRONT_EXT = GLX_FRONT_LEFT_EXT + BACK_EXT = GLX_BACK_LEFT_EXT + AUX0_EXT = 0x20E2 + AUX1_EXT = 0x20E3 + AUX2_EXT = 0x20E4 + AUX3_EXT = 0x20E5 + AUX4_EXT = 0x20E6 + AUX5_EXT = 0x20E7 + AUX6_EXT = 0x20E8 + AUX7_EXT = 0x20E9 + AUX8_EXT = 0x20EA + AUX9_EXT = 0x20EB + +############################################################################### + +# Extension #347 +NV_present_video enum: + NUM_VIDEO_SLOTS_NV = 0x20F0 + +############################################################################### + +# Extension #348 +NV_video_out enum: + VIDEO_OUT_COLOR_NV = 0x20C3 + VIDEO_OUT_ALPHA_NV = 0x20C4 + VIDEO_OUT_DEPTH_NV = 0x20C5 + VIDEO_OUT_COLOR_AND_ALPHA_NV = 0x20C6 + VIDEO_OUT_COLOR_AND_DEPTH_NV = 0x20C7 + VIDEO_OUT_FRAME_NV = 0x20C8 + VIDEO_OUT_FIELD_1_NV = 0x20C9 + VIDEO_OUT_FIELD_2_NV = 0x20CA + VIDEO_OUT_STACKED_FIELDS_1_2_NV = 0x20CB + VIDEO_OUT_STACKED_FIELDS_2_1_NV = 0x20CC + +############################################################################### + +# No new tokens +# Extension #350 +NV_swap_group enum: + +############################################################################### + +# Extension #374 +NV_video_capture enum: + DEVICE_ID_NV = 0x20CD + UNIQUE_ID_NV = 0x20CE + NUM_VIDEO_CAPTURE_SLOTS_NV = 0x20CF + +############################################################################### + +# Extension #375 +EXT_swap_control enum: + SWAP_INTERVAL_EXT = 0x20F1 + MAX_SWAP_INTERVAL_EXT = 0x20F2 + +############################################################################### + +# No new tokens +# Extension #376 +NV_copy_image enum: + +############################################################################### + +# Extension #384 +INTEL_swap_event enum: + BUFFER_SWAP_COMPLETE_INTEL_MASK = 0x04000000 + EXCHANGE_COMPLETE_INTEL = 0x8180 + COPY_COMPLETE_INTEL = 0x8181 + FLIP_COMPLETE_INTEL = 0x8182 diff --git a/src/glx/apple/specs/glxext.spec b/src/glx/apple/specs/glxext.spec new file mode 100644 index 00000000000..c25b7e6b38d --- /dev/null +++ b/src/glx/apple/specs/glxext.spec @@ -0,0 +1,1330 @@ +# glxext.spec file +# DON'T REMOVE PREVIOUS LINE!!! libspec depends on it! +# +# Copyright (c) 1991-2005 Silicon Graphics, Inc. All Rights Reserved. +# Copyright (c) 2006-2010 The Khronos Group, Inc. +# +# This document is licensed under the SGI Free Software B License Version +# 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . +# +# $Revision: 10796 $ on $Date: 2010-03-19 17:31:10 -0700 (Fri, 19 Mar 2010) $ + +required-props: +param: retval retained +glxflags: client-handcode client-intercept server-handcode +glxvendorglx: * +vectorequiv: * +category: VERSION_1_3 VERSION_1_4 ARB_get_proc_address ARB_multisample ARB_fbconfig_float EXT_import_context SGIX_dmbuffer SGIX_fbconfig SGIX_pbuffer SGIX_swap_barrier SGIX_swap_group SGIX_video_resize SGIX_video_source SGI_cushion SGI_make_current_read SGI_swap_control SGI_video_sync SUN_get_transparent_index MESA_agp_offset MESA_copy_sub_buffer MESA_pixmap_colormap MESA_release_buffers MESA_set_3dfx_mode SGIX_visual_select_group OML_sync_control SGIX_hyperpipe EXT_texture_from_pixmap NV_swap_group NV_video_output NV_present_video ARB_create_context NV_video_capture NV_copy_image EXT_swap_control +glxopcode: * + +# +# Boilerplate to define types used by some extensions. This is done +# up front, since it involves some complexities in protecting +# the declarations whether or not the -protect flag is given to +# the generator scripts. +# + +passthru: #ifndef GLX_ARB_get_proc_address +passthru: typedef void (*__GLXextFuncPtr)(void); +passthru: #endif +passthru: +passthru: #ifndef GLX_SGIX_video_source +passthru: typedef XID GLXVideoSourceSGIX; +passthru: #endif +passthru: +passthru: #ifndef GLX_SGIX_fbconfig +passthru: typedef XID GLXFBConfigIDSGIX; +passthru: typedef struct __GLXFBConfigRec *GLXFBConfigSGIX; +passthru: #endif +passthru: +passthru: #ifndef GLX_SGIX_pbuffer +passthru: typedef XID GLXPbufferSGIX; +passthru: typedef struct { +passthru: int type; +passthru: unsigned long serial; /* # of last request processed by server */ +passthru: Bool send_event; /* true if this came for SendEvent request */ +passthru: Display *display; /* display the event was read from */ +passthru: GLXDrawable drawable; /* i.d. of Drawable */ +passthru: int event_type; /* GLX_DAMAGED_SGIX or GLX_SAVED_SGIX */ +passthru: int draw_type; /* GLX_WINDOW_SGIX or GLX_PBUFFER_SGIX */ +passthru: unsigned int mask; /* mask indicating which buffers are affected*/ +passthru: int x, y; +passthru: int width, height; +passthru: int count; /* if nonzero, at least this many more */ +passthru: } GLXBufferClobberEventSGIX; +passthru: #endif +passthru: +passthru: #ifndef GLX_NV_video_output +passthru: typedef unsigned int GLXVideoDeviceNV; +passthru: #endif +passthru: +passthru: #ifndef GLX_NV_video_capture +passthru: typedef XID GLXVideoCaptureDeviceNV; +passthru: #endif +passthru: +passthru: #ifndef GLEXT_64_TYPES_DEFINED +passthru: /* This code block is duplicated in glext.h, so must be protected */ +passthru: #define GLEXT_64_TYPES_DEFINED +passthru: /* Define int32_t, int64_t, and uint64_t types for UST/MSC */ +passthru: /* (as used in the GLX_OML_sync_control extension). */ +passthru: #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +passthru: #include <inttypes.h> +passthru: #elif defined(__sun__) || defined(__digital__) +passthru: #include <inttypes.h> +passthru: #if defined(__STDC__) +passthru: #if defined(__arch64__) || defined(_LP64) +passthru: typedef long int int64_t; +passthru: typedef unsigned long int uint64_t; +passthru: #else +passthru: typedef long long int int64_t; +passthru: typedef unsigned long long int uint64_t; +passthru: #endif /* __arch64__ */ +passthru: #endif /* __STDC__ */ +passthru: #elif defined( __VMS ) || defined(__sgi) +passthru: #include <inttypes.h> +passthru: #elif defined(__SCO__) || defined(__USLC__) +passthru: #include <stdint.h> +passthru: #elif defined(__UNIXOS2__) || defined(__SOL64__) +passthru: typedef long int int32_t; +passthru: typedef long long int int64_t; +passthru: typedef unsigned long long int uint64_t; +passthru: #elif defined(_WIN32) && defined(__GNUC__) +passthru: #include <stdint.h> +passthru: #elif defined(_WIN32) +passthru: typedef __int32 int32_t; +passthru: typedef __int64 int64_t; +passthru: typedef unsigned __int64 uint64_t; +passthru: #else +passthru: #include <inttypes.h> /* Fallback option */ +passthru: #endif +passthru: #endif +passthru: + +############################################################################### +# +# GLX 1.3 commands +# +############################################################################### + +GetFBConfigs(dpy, screen, nelements) + return GLXFBConfigPointer + param dpy Display out reference + param screen int in value + param nelements int out reference + category VERSION_1_3 + glxflags client-handcode server-handcode + glxopcode 21 + +ChooseFBConfig(dpy, screen, attrib_list, nelements) + return GLXFBConfigPointer + param dpy Display out reference + param screen int in value + param attrib_list int in reference + param nelements int out reference + category VERSION_1_3 + glxflags client-handcode client-intercept server-handcode + +GetFBConfigAttrib(dpy, config, attribute, value) + return int + param dpy Display out reference + param config GLXFBConfig in value + param attribute int in value + param value int out reference + category VERSION_1_3 + glxflags client-handcode client-intercept server-handcode + +GetVisualFromFBConfig(dpy, config) + return XVisualInfoPointer + param dpy Display out reference + param config GLXFBConfig in value + category VERSION_1_3 + glxflags client-handcode client-intercept server-handcode + +CreateWindow(dpy, config, win, attrib_list) + return GLXWindow + param dpy Display out reference + param config GLXFBConfig in value + param win Window in value + param attrib_list int in reference + category VERSION_1_3 + glxflags client-handcode server-handcode + glxopcode 31 + +DestroyWindow(dpy, win) + return void + param dpy Display out reference + param win GLXWindow in value + category VERSION_1_3 + glxflags client-handcode server-handcode + glxopcode 32 + +CreatePixmap(dpy, config, pixmap, attrib_list) + return GLXPixmap + param dpy Display out reference + param config GLXFBConfig in value + param pixmap Pixmap in value + param attrib_list int in reference + category VERSION_1_3 + glxflags client-handcode server-handcode + glxopcode 22 + +DestroyPixmap(dpy, pixmap) + return void + param dpy Display out reference + param pixmap GLXPixmap in value + category VERSION_1_3 + glxflags client-handcode server-handcode + glxopcode 23 + +CreatePbuffer(dpy, config, attrib_list) + return GLXPbuffer + param dpy Display out reference + param config GLXFBConfig in value + param attrib_list int in reference + category VERSION_1_3 + glxflags client-handcode server-handcode + glxopcode 27 + +DestroyPbuffer(dpy, pbuf) + return void + param dpy Display out reference + param pbuf GLXPbuffer in value + category VERSION_1_3 + glxflags client-handcode server-handcode + glxopcode 28 + +# glXGetDrawableAttributes -> GLX opcode 29 +# glXChangeDrawableAttributes -> GLX opcode 30 + +# Uses glXGetDrawableAttributes protocol +QueryDrawable(dpy, draw, attribute, value) + return void + param dpy Display out reference + param draw GLXDrawable in value + param attribute int in value + param value uint out reference + category VERSION_1_3 + glxflags client-handcode client-intercept server-handcode + +CreateNewContext(dpy, config, render_type, share_list, direct) + return GLXContext + param dpy Display out reference + param config GLXFBConfig in value + param render_type int in value + param share_list GLXContext in value + param direct Bool in value + category VERSION_1_3 + glxflags client-handcode server-handcode + glxopcode 24 + +MakeContextCurrent(dpy, draw, read, ctx) + return Bool + param dpy Display out reference + param draw GLXDrawable in value + param read GLXDrawable in value + param ctx GLXContext in value + category VERSION_1_3 + glxflags client-handcode server-handcode + glxopcode 26 + +GetCurrentReadDrawable() + return GLXDrawable + category VERSION_1_3 + glxflags client-handcode client-intercept server-handcode + +GetCurrentDisplay() + return DisplayPointer + category VERSION_1_3 + glxflags client-handcode client-intercept server-handcode + +QueryContext(dpy, ctx, attribute, value) + return int + param dpy Display out reference + param ctx GLXContext in value + param attribute int in value + param value int out reference + category VERSION_1_3 + glxflags client-handcode server-handcode + glxopcode 25 + +# Uses glXChangeDrawableAttributes protocol +SelectEvent(dpy, draw, event_mask) + return void + param dpy Display out reference + param draw GLXDrawable in value + param event_mask ulong in value + category VERSION_1_3 + glxflags client-handcode server-handcode + +# Uses glXGetDrawableAttributes protocol +GetSelectedEvent(dpy, draw, event_mask) + return void + param dpy Display out reference + param draw GLXDrawable in value + param event_mask ulong out reference + category VERSION_1_3 + glxflags client-handcode client-intercept server-handcode + +############################################################################### +# +# GLX 1.4 commands +# +############################################################################### + +GetProcAddress(procName) + return FunctionPointer + param procName GLubyte in reference + category VERSION_1_4 + glxflags client-handcode client-intercept server-handcode + +############################################################################### +# +# ARB Extension #2 +# ARB_get_proc_address commands +# @promoted to core in GLX 1.4, but there's no provision for aliasing +# @in GLX spec files, yet +# +############################################################################### + +GetProcAddressARB(procName) + return FunctionPointer + param procName GLubyte in reference + category ARB_get_proc_address + glxflags client-handcode client-intercept server-handcode + +############################################################################### +# +# ARB Extension #5 +# ARB_multisample commands +# +############################################################################### + +# (none) +newcategory: ARB_multisample + +############################################################################### +# +# ARB Extension #39 +# ARB_fbconfig_float commands +# +############################################################################### + +# (none) +newcategory: ARB_fbconfig_float + +############################################################################### +# +# ARB Extension #56 +# ARB_create_context commands +# +############################################################################### + +CreateContextAttribsARB(dpy, config, share_context, direct, attrib_list) + return GLXContext + param dpy Display out reference + param config GLXFBConfig in value + param share_context GLXContext in value + param direct Bool in value + param attrib_list int in reference + category ARB_create_context + glxflags client-handcode client-intercept server-handcode + glxopcode 34 + +############################################################################### +# +# ARB Extension #75 +# ARB_create_context_profile commands +# +############################################################################### + +# (none) +newcategory: ARB_create_context_profile + + +############################################################################### +# +# Extension #25 +# SGIS_multisample commands +# +############################################################################### + +# (none) +newcategory: SGIS_multisample + +############################################################################### +# +# Extension #28 +# EXT_visual_info commands +# +############################################################################### + +# (none) +newcategory: EXT_visual_info + +############################################################################### +# +# Extension #40 +# SGI_swap_control commands +# +############################################################################### + +SwapIntervalSGI(interval) + return int + param interval int in value + category SGI_swap_control + glxflags client-handcode server-handcode + glxvendorglx 65536 + +############################################################################### +# +# Extension #41 +# SGI_video_sync commands +# +############################################################################### + +GetVideoSyncSGI(count) + return int + param count uint out reference + category SGI_video_sync + glxflags client-handcode client-intercept server-handcode + +WaitVideoSyncSGI(divisor, remainder, count) + return int + param divisor int in value + param remainder int in value + param count uint out reference + category SGI_video_sync + glxflags client-handcode client-intercept server-handcode + +############################################################################### +# +# Extension #42 +# SGI_make_current_read commands +# +############################################################################### + +MakeCurrentReadSGI(dpy, draw, read, ctx) + return Bool + param dpy Display out reference + param draw GLXDrawable in value + param read GLXDrawable in value + param ctx GLXContext in value + category SGI_make_current_read + glxflags client-handcode server-handcode + glxvendorglx 65537 + +GetCurrentReadDrawableSGI() + return GLXDrawable + category SGI_make_current_read + glxflags client-handcode client-intercept server-handcode + +############################################################################### +# +# Extension #43 +# SGIX_video_source commands +# +############################################################################### + +newcategory: SGIX_video_source +passthru: #ifdef _VL_H + +CreateGLXVideoSourceSGIX(display, screen, server, path, nodeClass, drainNode) + return GLXVideoSourceSGIX + param display Display out reference + param screen int in value + param server VLServer in value + param path VLPath in value + param nodeClass int in value + param drainNode VLNode in value + category SGIX_video_source + glxflags client-handcode server-handcode + glxvendorglx 65538 + +DestroyGLXVideoSourceSGIX(dpy, glxvideosource) + return void + param dpy Display out reference + param glxvideosource GLXVideoSourceSGIX in value + category SGIX_video_source + glxflags client-handcode server-handcode + glxvendorglx 65539 + +passend: #endif /* _VL_H */ +endcategory: + +############################################################################### +# +# Extension #44 +# EXT_visual_rating commands +# +############################################################################### + +# (none) +newcategory: EXT_visual_rating + +############################################################################### +# +# Extension #47 +# EXT_import_context commands +# +############################################################################### + +GetCurrentDisplayEXT() + return DisplayPointer + category EXT_import_context + glxflags client-handcode client-intercept server-handcode + +QueryContextInfoEXT(dpy, context, attribute, value) + return int + param dpy Display out reference + param context GLXContext in value + param attribute int in value + param value int out reference + category EXT_import_context + glxflags client-handcode server-handcode + glxvendorglx 1024 + +# 'constGLXContext' is a hack; the extension specification and glx.h +# should be fixed instead. +GetContextIDEXT(context) + return GLXContextID + param context constGLXContext in value + category EXT_import_context + glxflags client-handcode client-intercept server-handcode + +ImportContextEXT(dpy, contextID) + return GLXContext + param dpy Display out reference + param contextID GLXContextID in value + category EXT_import_context + glxflags client-handcode client-intercept server-handcode + +FreeContextEXT(dpy, context) + return void + param dpy Display out reference + param context GLXContext in value + category EXT_import_context + glxflags client-handcode client-intercept server-handcode + +############################################################################### +# +# Extension #49 +# SGIX_fbconfig commands +# +############################################################################### + +# GetFBConfigsSGIX protocol -> VendorPrivate opcode 65540 + +GetFBConfigAttribSGIX(dpy, config, attribute, value) + return int + param dpy Display out reference + param config GLXFBConfigSGIX in value + param attribute int in value + param value int out reference + category SGIX_fbconfig + glxflags client-handcode client-intercept server-handcode + +ChooseFBConfigSGIX(dpy, screen, attrib_list, nelements) + return GLXFBConfigSGIXPointer + param dpy Display out reference + param screen int in value + param attrib_list int out reference + param nelements int out reference + category SGIX_fbconfig + glxflags client-handcode client-intercept server-handcode + +CreateGLXPixmapWithConfigSGIX(dpy, config, pixmap) + return GLXPixmap + param dpy Display out reference + param config GLXFBConfigSGIX in value + param pixmap Pixmap in value + category SGIX_fbconfig + glxflags client-handcode server-handcode + glxvendorglx 65542 + +CreateContextWithConfigSGIX(dpy, config, render_type, share_list, direct) + return GLXContext + param dpy Display out reference + param config GLXFBConfigSGIX in value + param render_type int in value + param share_list GLXContext in value + param direct Bool in value + category SGIX_fbconfig + glxflags client-handcode server-handcode + glxvendorglx 65541 + +GetVisualFromFBConfigSGIX(dpy, config) + return XVisualInfoPointer + param dpy Display out reference + param config GLXFBConfigSGIX in value + category SGIX_fbconfig + glxflags client-handcode client-intercept server-handcode + +GetFBConfigFromVisualSGIX(dpy, vis) + return GLXFBConfigSGIX + param dpy Display out reference + param vis XVisualInfo out reference + category SGIX_fbconfig + glxflags client-handcode client-intercept server-handcode + +############################################################################### +# +# Extension #50 +# SGIX_pbuffer commands +# +############################################################################### + +# ChangeDrawableAttributesSGIX protocol -> VendorPrivate opcode 65545 +# GetDrawableAttributesSGIX protocol -> VendorPrivate opcode 65546 + +CreateGLXPbufferSGIX(dpy, config, width, height, attrib_list) + return GLXPbufferSGIX + param dpy Display out reference + param config GLXFBConfigSGIX in value + param width uint in value + param height uint in value + param attrib_list int out reference + category SGIX_pbuffer + glxflags client-handcode server-handcode + glxvendorglx 65543 + +DestroyGLXPbufferSGIX(dpy, pbuf) + return void + param dpy Display out reference + param pbuf GLXPbufferSGIX in value + category SGIX_pbuffer + glxflags client-handcode + glxvendorglx 65544 + +QueryGLXPbufferSGIX(dpy, pbuf, attribute, value) + return int + param dpy Display out reference + param pbuf GLXPbufferSGIX in value + param attribute int in value + param value uint out reference + category SGIX_pbuffer + +SelectEventSGIX(dpy, drawable, mask) + return void + param dpy Display out reference + param drawable GLXDrawable in value + param mask ulong in value + category SGIX_pbuffer + +GetSelectedEventSGIX(dpy, drawable, mask) + return void + param dpy Display out reference + param drawable GLXDrawable in value + param mask ulong out reference + category SGIX_pbuffer + +############################################################################### +# +# Extension #62 +# SGI_cushion commands +# +############################################################################### + +CushionSGI(dpy, window, cushion) + return void + param dpy Display out reference + param window Window in value + param cushion float in value + category SGI_cushion + +############################################################################### +# +# Extension #83 +# SGIX_video_resize commands +# +############################################################################### + +BindChannelToWindowSGIX(display, screen, channel, window) + return int + param display Display out reference + param screen int in value + param channel int in value + param window Window in value + category SGIX_video_resize + +ChannelRectSGIX(display, screen, channel, x, y, w, h) + return int + param display Display out reference + param screen int in value + param channel int in value + param x int in value + param y int in value + param w int in value + param h int in value + category SGIX_video_resize + +QueryChannelRectSGIX(display, screen, channel, dx, dy, dw, dh) + return int + param display Display out reference + param screen int in value + param channel int in value + param dx int out reference + param dy int out reference + param dw int out reference + param dh int out reference + category SGIX_video_resize + +QueryChannelDeltasSGIX(display, screen, channel, x, y, w, h) + return int + param display Display out reference + param screen int in value + param channel int in value + param x int out reference + param y int out reference + param w int out reference + param h int out reference + category SGIX_video_resize + +# @@@ Not in man page - this entry point may not be shipping? +ChannelRectSyncSGIX(display, screen, channel, synctype) + return int + param display Display out reference + param screen int in value + param channel int in value + param synctype GLenum in value + category SGIX_video_resize + +############################################################################### +# +# Extension #86 +# SGIX_dmbuffer commands +# +############################################################################### + +newcategory: SGIX_dmbuffer +passthru: #ifdef _DM_BUFFER_H_ + +AssociateDMPbufferSGIX(dpy, pbuffer, params, dmbuffer) + return Bool + param dpy Display out reference + param pbuffer GLXPbufferSGIX in value + param params DMparams out reference + param dmbuffer DMbuffer in value + category SGIX_dmbuffer + +passend: #endif /* _DM_BUFFER_H_ */ +endcategory: + +############################################################################### +# +# Extension #91 +# SGIX_swap_group commands +# +############################################################################### + +JoinSwapGroupSGIX(dpy, drawable, member) + return void + param dpy Display out reference + param drawable GLXDrawable in value + param member GLXDrawable in value + category SGIX_swap_group + glxflags client-handcode server-handcode + glxvendorglx 65547 + +############################################################################### +# +# Extension #92 +# SGIX_swap_barrier commands +# +############################################################################### + +BindSwapBarrierSGIX(dpy, drawable, barrier) + return void + param dpy Display out reference + param drawable GLXDrawable in value + param barrier int in value + category SGIX_swap_barrier + glxflags client-handcode server-handcode + glxvendorglx 65548 + +QueryMaxSwapBarriersSGIX(dpy, screen, max) + return Bool + param dpy Display out reference + param screen int in value + param max int out reference + category SGIX_swap_barrier + glxflags client-handcode server-handcode + glxvendorglx 65549 + +############################################################################### +# +# Extension #183 +# SUN_get_transparent_index commands +# +############################################################################### + +GetTransparentIndexSUN(dpy, overlay, underlay, pTransparentIndex) + return Status + param dpy Display out reference + param overlay Window in value + param underlay Window in value + param pTransparentIndex long out reference + category SUN_get_transparent_index + +############################################################################### +# +# Extension #215 +# MESA_copy_sub_buffer commands +# +############################################################################### + +CopySubBufferMESA(dpy, drawable, x, y, width, height) + return void + param dpy Display out reference + param drawable GLXDrawable in value + param x int in value + param y int in value + param width int in value + param height int in value + category MESA_copy_sub_buffer + glxflags client-handcode client-intercept server-handcode + +############################################################################### +# +# Extension #216 +# MESA_pixmap_colormap commands +# +############################################################################### + +CreateGLXPixmapMESA(dpy, visual, pixmap, cmap) + return GLXPixmap + param dpy Display out reference + param visual XVisualInfo out reference + param pixmap Pixmap in value + param cmap Colormap in value + category MESA_pixmap_colormap + glxflags client-handcode client-intercept server-handcode + +############################################################################### +# +# Extension #217 +# MESA_release_buffers commands +# +############################################################################### + +ReleaseBuffersMESA(dpy, drawable) + return Bool + param dpy Display out reference + param drawable GLXDrawable in value + category MESA_release_buffers + glxflags client-handcode client-intercept server-handcode + +############################################################################### +# +# Extension #218 +# MESA_set_3dfx_mode commands +# +############################################################################### + +# Brian's spec has this as returning 'GLboolean' and taking 'GLint mode' +Set3DfxModeMESA(mode) + return Bool + param mode int in value + category MESA_set_3dfx_mode + glxflags client-handcode client-intercept server-handcode + +############################################################################### +# +# Extension #234 +# SGIX_visual_select_group commands +# +############################################################################### + +# (none) +newcategory: SGIX_visual_select_group + +############################################################################### +# +# Extension #237 +# OML_swap_method commands +# +############################################################################### + +# (none) +newcategory: OML_swap_method + +############################################################################### +# +# Extension #238 +# OML_sync_control commands +# +############################################################################### + +GetSyncValuesOML(dpy, drawable, ust, msc, sbc) + return Bool + param dpy Display out reference + param drawable GLXDrawable in value + param ust int64_t out reference + param msc int64_t out reference + param sbc int64_t out reference + category OML_sync_control + glxflags client-handcode server-handcode + +GetMscRateOML(dpy, drawable, numerator, denominator) + return Bool + param dpy Display out reference + param drawable GLXDrawable in value + param numerator int32_t out reference + param denominator int32_t out reference + category OML_sync_control + glxflags client-handcode server-handcode + +SwapBuffersMscOML(dpy, drawable, target_msc, divisor, remainder) + return int64_t + param dpy Display out reference + param drawable GLXDrawable in value + param target_msc int64_t in value + param divisor int64_t in value + param remainder int64_t in value + category OML_sync_control + glxflags client-handcode server-handcode + +WaitForMscOML(dpy, drawable, target_msc, divisor, remainder, ust, msc, sbc) + return Bool + param dpy Display out reference + param drawable GLXDrawable in value + param target_msc int64_t in value + param divisor int64_t in value + param remainder int64_t in value + param ust int64_t out reference + param msc int64_t out reference + param sbc int64_t out reference + category OML_sync_control + glxflags client-handcode server-handcode + +WaitForSbcOML(dpy, drawable, target_sbc, ust, msc, sbc) + return Bool + param dpy Display out reference + param drawable GLXDrawable in value + param target_sbc int64_t in value + param ust int64_t out reference + param msc int64_t out reference + param sbc int64_t out reference + category OML_sync_control + glxflags client-handcode server-handcode + +############################################################################### +# +# Extension #281 +# NV_float_buffer commands +# +############################################################################### + +# (none) +newcategory: NV_float_buffer + +############################################################################### +# +# Extension #307 +# SGIX_hyperpipe commands +# +############################################################################### + +newcategory: SGIX_hyperpipe +passthru: +passthru: typedef struct { +passthru: char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; +passthru: int networkId; +passthru: } GLXHyperpipeNetworkSGIX; +passthru: +passthru: typedef struct { +passthru: char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; +passthru: int channel; +passthru: unsigned int +passthru: participationType; +passthru: int timeSlice; +passthru: } GLXHyperpipeConfigSGIX; +passthru: +passthru: typedef struct { +passthru: char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; +passthru: int srcXOrigin, srcYOrigin, srcWidth, srcHeight; +passthru: int destXOrigin, destYOrigin, destWidth, destHeight; +passthru: } GLXPipeRect; +passthru: +passthru: typedef struct { +passthru: char pipeName[GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; +passthru: int XOrigin, YOrigin, maxHeight, maxWidth; +passthru: } GLXPipeRectLimits; +passthru: + +QueryHyperpipeNetworkSGIX(dpy, npipes) + return GLXHyperpipeNetworkSGIXPointer + param dpy Display out reference + param npipes int out reference + glxflags client-handcode server-handcode + category SGIX_hyperpipe + glxvendorglx 65550 + +HyperpipeConfigSGIX(dpy, networkId, npipes, cfg, hpId) + return int + param dpy Display out reference + param networkId int in value + param npipes int in value + param cfg GLXHyperpipeConfigSGIX out array [COMPSIZE(npipes)] + param hpId int out reference + glxflags client-handcode server-handcode + category SGIX_hyperpipe + glxvendorglx 65552 + +QueryHyperpipeConfigSGIX(dpy, hpId, npipes) + return GLXHyperpipeConfigSGIXPointer + param dpy Display out reference + param hpId int in value + param npipes int out reference + glxflags client-handcode server-handcode + category SGIX_hyperpipe + glxvendorglx 65551 + +DestroyHyperpipeConfigSGIX(dpy, hpId) + return int + param dpy Display out reference + param hpId int in value + glxflags client-handcode server-handcode + category SGIX_hyperpipe + glxvendorglx 65553 + +BindHyperpipeSGIX(dpy, hpId) + return int + param dpy Display out reference + param hpId int in value + glxflags client-handcode server-handcode + category SGIX_hyperpipe + glxvendorglx ??? + +QueryHyperpipeBestAttribSGIX(dpy, timeSlice, attrib, size, attribList, returnAttribList) + return int + param dpy Display out reference + param timeSlice int in value + param attrib int in value + param size int in value + param attribList void out array [COMPSIZE(size)] + param returnAttribList void out array [COMPSIZE(size)] + glxflags client-handcode server-handcode + category SGIX_hyperpipe + glxvendorglx ??? + +HyperpipeAttribSGIX(dpy, timeSlice, attrib, size, attribList) + return int + param dpy Display out reference + param timeSlice int in value + param attrib int in value + param size int in value + param attribList void out array [COMPSIZE(size)] + glxflags client-handcode server-handcode + category SGIX_hyperpipe + glxvendorglx ??? + +QueryHyperpipeAttribSGIX(dpy, timeSlice, attrib, size, returnAttribList) + return int + param dpy Display out reference + param timeSlice int in value + param attrib int in value + param size int in value + param returnAttribList void out array [COMPSIZE(size)] + glxflags client-handcode server-handcode + category SGIX_hyperpipe + glxvendorglx ??? + +############################################################################### +# +# Extension #308 +# MESA_agp_offset commands +# +############################################################################### + +GetAGPOffsetMESA(pointer) + return uint + param pointer void in reference + glxflags client-handcode client-intercept server-handcode + category MESA_agp_offset + +############################################################################### +# +# Extension #328 +# EXT_fbconfig_packed_float commands +# +############################################################################### + +# (none) +newcategory: EXT_fbconfig_packed_float + +############################################################################### +# +# Extension #337 +# EXT_framebuffer_sRGB commands +# +############################################################################### + +# (none) +newcategory: EXT_framebuffer_sRGB + +############################################################################### +# +# Extension #344 +# EXT_texture_from_pixmap commands +# +############################################################################### + +BindTexImageEXT(dpy, drawable, buffer, attrib_list) + return void + param dpy Display out reference + param drawable GLXDrawable in value + param buffer int in value + param attrib_list int in reference + category EXT_texture_from_pixmap + glxflags client-handcode server-handcode + glxvendorglx 1330 + +ReleaseTexImageEXT(dpy, drawable, buffer) + return void + param dpy Display out reference + param drawable GLXDrawable in value + param buffer int in value + category EXT_texture_from_pixmap + glxflags client-handcode server-handcode + glxvendorglx 1331 + +############################################################################### +# +# Extension #347 +# NV_present_video commands +# +############################################################################### + +EnumerateVideoDevicesNV(dpy, screen, nelements) + return uintPointer + param dpy Display out reference + param screen int in value + param nelements int out reference + category NV_present_video + glxflags client-handcode server-handcode + +BindVideoDeviceNV(dpy, video_slot, video_device, attrib_list) + return int + param dpy Display out reference + param video_slot uint in value + param video_device uint in value + param attrib_list int in reference + category NV_present_video + glxflags client-handcode server-handcode + +############################################################################### +# +# Extension #348 +# NV_video_output commands +# +############################################################################### + +GetVideoDeviceNV(dpy, screen, numVideoDevices, pVideoDevice) + return int + param dpy Display out reference + param screen int in value + param numVideoDevices int in value + param pVideoDevice GLXVideoDeviceNV out array [COMPSIZE(numVideoDevices)] + category NV_video_output + glxflags client-handcode server-handcode + +ReleaseVideoDeviceNV(dpy, screen, VideoDevice) + return int + param dpy Display out reference + param screen int in value + param VideoDevice GLXVideoDeviceNV in value + category NV_video_output + glxflags client-handcode server-handcode + +BindVideoImageNV(dpy, VideoDevice, pbuf, iVideoBuffer) + return int + param dpy Display out reference + param VideoDevice GLXVideoDeviceNV in value + param pbuf GLXPbuffer in value + param iVideoBuffer int in value + category NV_video_output + glxflags client-handcode server-handcode + +ReleaseVideoImageNV(dpy, pbuf) + return int + param dpy Display out reference + param pbuf GLXPbuffer in value + category NV_video_output + glxflags client-handcode server-handcode + +SendPbufferToVideoNV(dpy, pbuf, iBufferType, pulCounterPbuffer, bBlock) + return int + param dpy Display out reference + param pbuf GLXPbuffer in value + param iBufferType int in value + param pulCounterPbuffer ulong out reference + param bBlock GLboolean in value + category NV_video_output + glxflags client-handcode server-handcode + +GetVideoInfoNV(dpy, screen, VideoDevice, pulCounterOutputPbuffer, pulCounterOutputVideo) + return int + param dpy Display out reference + param screen int in value + param VideoDevice GLXVideoDeviceNV in value + param pulCounterOutputPbuffer ulong out reference + param pulCounterOutputVideo ulong out reference + category NV_video_output + glxflags client-handcode server-handcode + +############################################################################### +# +# Extension #350 +# NV_swap_group commands +# +############################################################################### + +JoinSwapGroupNV(dpy, drawable, group) + return Bool + param dpy Display out reference + param drawable GLXDrawable in value + param group GLuint in value + category NV_swap_group + glxflags client-handcode server-handcode + +BindSwapBarrierNV(dpy, group, barrier) + return Bool + param dpy Display out reference + param group GLuint in value + param barrier GLuint in value + category NV_swap_group + glxflags client-handcode server-handcode + +QuerySwapGroupNV(dpy, drawable, group, barrier) + return Bool + param dpy Display out reference + param drawable GLXDrawable in value + param group GLuint out reference + param barrier GLuint out reference + category NV_swap_group + glxflags client-handcode server-handcode + +QueryMaxSwapGroupsNV(dpy, screen, maxGroups, maxBarriers) + return Bool + param dpy Display out reference + param screen int in value + param maxGroups GLuint out reference + param maxBarriers GLuint out reference + category NV_swap_group + glxflags client-handcode server-handcode + +QueryFrameCountNV(dpy, screen, count) + return Bool + param dpy Display out reference + param screen int in value + param count GLuint out reference + category NV_swap_group + glxflags client-handcode server-handcode + +ResetFrameCountNV(dpy, screen) + return Bool + param dpy Display out reference + param screen int in value + category NV_swap_group + glxflags client-handcode server-handcode + +############################################################################### +# +# Extension #374 +# NV_video_capture commands +# +############################################################################### + +BindVideoCaptureDeviceNV(dpy, video_capture_slot, device) + return int + param dpy Display out reference + param video_capture_slot uint in value + param device GLXVideoCaptureDeviceNV in value + category NV_video_capture + glxflags client-handcode server-handcode + +EnumerateVideoCaptureDevicesNV(dpy, screen, nelements) + return GLXVideoCaptureDeviceNVPointer + param dpy Display out reference + param screen int in value + param nelements int out reference + category NV_video_capture + glxflags client-handcode server-handcode + +LockVideoCaptureDeviceNV(dpy, device) + return void + param dpy Display out reference + param device GLXVideoCaptureDeviceNV in value + category NV_video_capture + glxflags client-handcode server-handcode + +QueryVideoCaptureDeviceNV(dpy, device, attribute, value) + return int + param dpy Display out reference + param device GLXVideoCaptureDeviceNV in value + param attribute int in value + param value int out array [COMPSIZE(attribute)] + category NV_video_capture + glxflags client-handcode server-handcode + +ReleaseVideoCaptureDeviceNV(dpy, device) + return void + param dpy Display out reference + param device GLXVideoCaptureDeviceNV in value + category NV_video_capture + glxflags client-handcode server-handcode + +############################################################################### +# +# Extension #375 +# EXT_swap_control commands +# +############################################################################### + +SwapIntervalEXT(dpy, drawable, interval) + return int + param dpy Display out reference + param drawable GLXDrawable in value + param interval int in value + category EXT_swap_control + glxflags client-handcode server-handcode + +############################################################################### +# +# Extension #376 +# NV_copy_image commands +# +############################################################################### + +CopyImageSubDataNV(dpy, srcCtx, srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstCtx, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, width, height, depth) + return void + param dpy Display out reference + param srcCtx GLXContext in value + param srcName GLuint in value + param srcTarget GLenum in value + param srcLevel GLint in value + param srcX GLint in value + param srcY GLint in value + param srcZ GLint in value + param dstCtx GLXContext in value + param dstName GLuint in value + param dstTarget GLenum in value + param dstLevel GLint in value + param dstX GLint in value + param dstY GLint in value + param dstZ GLint in value + param width GLsizei in value + param height GLsizei in value + param depth GLsizei in value + category NV_copy_image + glxflags client-handcode server-handcode + +############################################################################### +# +# Extension #384 +# INTEL_swap_event commands +# +############################################################################### + +# (none) +newcategory: INTEL_swap_event diff --git a/src/glx/apple/specs/update.sh b/src/glx/apple/specs/update.sh new file mode 100755 index 00000000000..f8c3158a539 --- /dev/null +++ b/src/glx/apple/specs/update.sh @@ -0,0 +1,4 @@ +for f in enum.spec enumext.spec gl.spec gl.tm glx.spec glxenum.spec glxenumext.spec glxext.spec ; do + curl -LO http://www.opengl.org/registry/api/$f +done + diff --git a/src/glx/clientattrib.c b/src/glx/clientattrib.c index a7dfb534860..b26c17938db 100644 --- a/src/glx/clientattrib.c +++ b/src/glx/clientattrib.c @@ -35,6 +35,7 @@ /*****************************************************************************/ +#ifndef GLX_USE_APPLEGL static void do_enable_disable(GLenum array, GLboolean val) { @@ -123,6 +124,7 @@ __indirect_glPopClientAttrib(void) return; } } +#endif void __glFreeAttributeState(__GLXcontext * gc) diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c index 3a53ce91b38..6058c721da7 100644 --- a/src/glx/dri2_glx.c +++ b/src/glx/dri2_glx.c @@ -30,7 +30,7 @@ * Kristian Høgsberg ([email protected]) */ -#ifdef GLX_DIRECT_RENDERING +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) #include <X11/Xlib.h> #include <X11/extensions/Xfixes.h> @@ -47,7 +47,12 @@ #include "xf86drm.h" #include "dri2.h" #include "dri_common.h" -#include "../../mesa/drivers/dri/common/dri_util.h" + +/* From xmlpool/options.h, user exposed so should be stable */ +#define DRI_CONF_VBLANK_NEVER 0 +#define DRI_CONF_VBLANK_DEF_INTERVAL_0 1 +#define DRI_CONF_VBLANK_DEF_INTERVAL_1 2 +#define DRI_CONF_VBLANK_ALWAYS_SYNC 3 #undef DRI2_MINOR #define DRI2_MINOR 1 @@ -177,6 +182,7 @@ dri2CreateDrawable(__GLXscreenConfigs * psc, __GLXDRIconfigPrivate *config = (__GLXDRIconfigPrivate *) modes; __GLXdisplayPrivate *dpyPriv; __GLXDRIdisplayPrivate *pdp; + GLint vblank_mode = DRI_CONF_VBLANK_DEF_INTERVAL_1; pdraw = Xmalloc(sizeof(*pdraw)); if (!pdraw) @@ -187,7 +193,23 @@ dri2CreateDrawable(__GLXscreenConfigs * psc, pdraw->base.drawable = drawable; pdraw->base.psc = psc; pdraw->bufferCount = 0; - pdraw->swap_interval = 1; + pdraw->swap_interval = 1; /* default may be overridden below */ + pdraw->have_back = 0; + + if (psc->config) + psc->config->configQueryi(psc->__driScreen, "vblank_mode", &vblank_mode); + + switch (vblank_mode) { + case DRI_CONF_VBLANK_NEVER: + case DRI_CONF_VBLANK_DEF_INTERVAL_0: + pdraw->swap_interval = 0; + break; + case DRI_CONF_VBLANK_DEF_INTERVAL_1: + case DRI_CONF_VBLANK_ALWAYS_SYNC: + default: + pdraw->swap_interval = 1; + break; + } DRI2CreateDrawable(psc->dpy, xDrawable); @@ -204,12 +226,14 @@ dri2CreateDrawable(__GLXscreenConfigs * psc, return NULL; } +#ifdef X_DRI2SwapInterval /* * Make sure server has the same swap interval we do for the new * drawable. */ if (pdp->swapAvailable) DRI2SwapInterval(psc->dpy, xDrawable, pdraw->swap_interval); +#endif return &pdraw->base; } @@ -474,7 +498,23 @@ dri2GetBuffersWithFormat(__DRIdrawable * driDrawable, static void dri2SetSwapInterval(__GLXDRIdrawable *pdraw, int interval) { + __GLXscreenConfigs *psc = pdraw->psc; __GLXDRIdrawablePrivate *priv = (__GLXDRIdrawablePrivate *) pdraw; + GLint vblank_mode = DRI_CONF_VBLANK_DEF_INTERVAL_1; + + if (psc->config) + psc->config->configQueryi(psc->__driScreen, "vblank_mode", &vblank_mode); + + switch (vblank_mode) { + case DRI_CONF_VBLANK_NEVER: + return; + case DRI_CONF_VBLANK_ALWAYS_SYNC: + if (interval <= 0) + return; + break; + default: + break; + } DRI2SwapInterval(priv->base.psc->dpy, pdraw->xDrawable, interval); priv->swap_interval = interval; diff --git a/src/glx/dri_common.c b/src/glx/dri_common.c index e4034161bb3..429fc6d8912 100644 --- a/src/glx/dri_common.c +++ b/src/glx/dri_common.c @@ -33,7 +33,7 @@ * Kristian Høgsberg ([email protected]) */ -#ifdef GLX_DIRECT_RENDERING +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) #include <unistd.h> #include <dlfcn.h> @@ -403,6 +403,11 @@ dri2BindExtensions(__GLXscreenConfigs *psc) /* internal driver extension, no GL extension exposed */ } #endif + +#ifdef __DRI2_CONFIG_QUERY + if ((strcmp(extensions[i]->name, __DRI2_CONFIG_QUERY) == 0)) + psc->config = (__DRI2configQueryExtension *) extensions[i]; +#endif } } diff --git a/src/glx/dri_glx.c b/src/glx/dri_glx.c index e47db82b70f..74afa60301d 100644 --- a/src/glx/dri_glx.c +++ b/src/glx/dri_glx.c @@ -32,7 +32,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ -#ifdef GLX_DIRECT_RENDERING +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) #include <X11/Xlib.h> #include <X11/extensions/Xfixes.h> diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c index 786faff81c1..cdb1d9f4dc3 100644 --- a/src/glx/drisw_glx.c +++ b/src/glx/drisw_glx.c @@ -21,7 +21,7 @@ * SOFTWARE. */ -#ifdef GLX_DIRECT_RENDERING +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) #include <X11/Xlib.h> #include "glxclient.h" diff --git a/src/glx/glcontextmodes.c b/src/glx/glcontextmodes.c index eb9037907fc..cdc16f8330a 100644 --- a/src/glx/glcontextmodes.c +++ b/src/glx/glcontextmodes.c @@ -237,9 +237,11 @@ _gl_get_context_mode_data(const __GLcontextModes * mode, int attribute, case GLX_LEVEL: *value_return = mode->level; return 0; +#ifndef GLX_USE_APPLEGL /* This isn't supported by CGL. */ case GLX_TRANSPARENT_TYPE_EXT: *value_return = mode->transparentPixel; return 0; +#endif case GLX_TRANSPARENT_RED_VALUE: *value_return = mode->transparentRed; return 0; @@ -285,6 +287,7 @@ _gl_get_context_mode_data(const __GLcontextModes * mode, int attribute, case GLX_MAX_PBUFFER_PIXELS: *value_return = mode->maxPbufferPixels; return 0; +#ifndef GLX_USE_APPLEGL /* These aren't supported by CGL. */ case GLX_OPTIMAL_PBUFFER_WIDTH_SGIX: *value_return = mode->optimalPbufferWidth; return 0; @@ -294,6 +297,7 @@ _gl_get_context_mode_data(const __GLcontextModes * mode, int attribute, case GLX_SWAP_METHOD_OML: *value_return = mode->swapMethod; return 0; +#endif case GLX_SAMPLE_BUFFERS_SGIS: *value_return = mode->sampleBuffers; return 0; diff --git a/src/glx/glx_pbuffer.c b/src/glx/glx_pbuffer.c index 2098cc6a52d..b8d0f21bf06 100644 --- a/src/glx/glx_pbuffer.c +++ b/src/glx/glx_pbuffer.c @@ -37,6 +37,12 @@ #include <string.h> #include "glxextensions.h" +#ifdef GLX_USE_APPLEGL +#include <pthread.h> +#include "apple_glx_drawable.h" +#include "glx_error.h" +#endif + #define WARN_ONCE_GLX_1_3(a, b) { \ static int warned=1; \ if(warned) { \ @@ -49,19 +55,19 @@ * Emit a warning when clients use GLX 1.3 functions on pre-1.3 systems. */ static void -warn_GLX_1_3(Display *dpy, const char *function_name) +warn_GLX_1_3(Display * dpy, const char *function_name) { __GLXdisplayPrivate *priv = __glXInitialize(dpy); if (priv->minorVersion < 3) { - fprintf(stderr, - "WARNING: Application calling GLX 1.3 function \"%s\" " - "when GLX 1.3 is not supported! This is an application bug!\n", - function_name); + fprintf(stderr, + "WARNING: Application calling GLX 1.3 function \"%s\" " + "when GLX 1.3 is not supported! This is an application bug!\n", + function_name); } } - +#ifndef GLX_USE_APPLEGL /** * Change a drawable's attribute. * @@ -320,7 +326,7 @@ GetDrawableAttribute(Display * dpy, GLXDrawable drawable, } } -#ifdef GLX_DIRECT_RENDERING +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) { __GLXDRIdrawable *pdraw = GetGLXDRIDrawable(dpy, drawable, NULL); @@ -586,6 +592,7 @@ glXCreateGLXPbufferSGIX(Display * dpy, GLXFBConfigSGIX config, attrib_list, GL_FALSE); } +#endif /* GLX_USE_APPLEGL */ /** * Create a new pbuffer. @@ -594,12 +601,57 @@ PUBLIC GLXPbuffer glXCreatePbuffer(Display * dpy, GLXFBConfig config, const int *attrib_list) { int i, width, height; +#ifdef GLX_USE_APPLEGL + GLXPbuffer result; + int errorcode; +#endif width = 0; height = 0; WARN_ONCE_GLX_1_3(dpy, __func__); +#ifdef GLX_USE_APPLEGL + for (i = 0; attrib_list[i]; ++i) { + switch (attrib_list[i]) { + case GLX_PBUFFER_WIDTH: + width = attrib_list[i + 1]; + ++i; + break; + + case GLX_PBUFFER_HEIGHT: + height = attrib_list[i + 1]; + ++i; + break; + + case GLX_LARGEST_PBUFFER: + /* This is a hint we should probably handle, but how? */ + ++i; + break; + + case GLX_PRESERVED_CONTENTS: + /* The contents are always preserved with AppleSGLX with CGL. */ + ++i; + break; + + default: + return None; + } + } + + if (apple_glx_pbuffer_create(dpy, config, width, height, &errorcode, + &result)) { + /* + * apple_glx_pbuffer_create only sets the errorcode to core X11 + * errors. + */ + __glXSendError(dpy, errorcode, 0, X_GLXCreatePbuffer, true); + + return None; + } + + return result; +#else for (i = 0; attrib_list[i * 2]; i++) { switch (attrib_list[i * 2]) { case GLX_PBUFFER_WIDTH: @@ -613,6 +665,7 @@ glXCreatePbuffer(Display * dpy, GLXFBConfig config, const int *attrib_list) return (GLXPbuffer) CreatePbuffer(dpy, (__GLcontextModes *) config, width, height, attrib_list, GL_TRUE); +#endif } @@ -622,7 +675,13 @@ glXCreatePbuffer(Display * dpy, GLXFBConfig config, const int *attrib_list) PUBLIC void glXDestroyPbuffer(Display * dpy, GLXPbuffer pbuf) { +#ifdef GLX_USE_APPLEGL + if (apple_glx_pbuffer_destroy(dpy, pbuf)) { + __glXSendError(dpy, GLXBadPbuffer, pbuf, X_GLXDestroyPbuffer, false); + } +#else DestroyPbuffer(dpy, pbuf); +#endif } @@ -634,10 +693,47 @@ glXQueryDrawable(Display * dpy, GLXDrawable drawable, int attribute, unsigned int *value) { WARN_ONCE_GLX_1_3(dpy, __func__); +#ifdef GLX_USE_APPLEGL + Window root; + int x, y; + unsigned int width, height, bd, depth; + + if (apple_glx_pixmap_query(drawable, attribute, value)) + return; /*done */ + + if (apple_glx_pbuffer_query(drawable, attribute, value)) + return; /*done */ + + /* + * The OpenGL spec states that we should report GLXBadDrawable if + * the drawable is invalid, however doing so would require that we + * use XSetErrorHandler(), which is known to not be thread safe. + * If we use a round-trip call to validate the drawable, there could + * be a race, so instead we just opt in favor of letting the + * XGetGeometry request fail with a GetGeometry request X error + * rather than GLXBadDrawable, in what is hoped to be a rare + * case of an invalid drawable. In practice most and possibly all + * X11 apps using GLX shouldn't notice a difference. + */ + if (XGetGeometry + (dpy, drawable, &root, &x, &y, &width, &height, &bd, &depth)) { + switch (attribute) { + case GLX_WIDTH: + *value = width; + break; + + case GLX_HEIGHT: + *value = height; + break; + } + } +#else GetDrawableAttribute(dpy, drawable, attribute, value); +#endif } +#ifndef GLX_USE_APPLEGL /** * Query an attribute of a pbuffer. */ @@ -647,7 +743,7 @@ glXQueryGLXPbufferSGIX(Display * dpy, GLXPbufferSGIX drawable, { return GetDrawableAttribute(dpy, drawable, attribute, value); } - +#endif /** * Select the event mask for a drawable. @@ -655,12 +751,30 @@ glXQueryGLXPbufferSGIX(Display * dpy, GLXPbufferSGIX drawable, PUBLIC void glXSelectEvent(Display * dpy, GLXDrawable drawable, unsigned long mask) { +#ifdef GLX_USE_APPLEGL + XWindowAttributes xwattr; + + if (apple_glx_pbuffer_set_event_mask(drawable, mask)) + return; /*done */ + + /* + * The spec allows a window, but currently there are no valid + * events for a window, so do nothing. + */ + if (XGetWindowAttributes(dpy, drawable, &xwattr)) + return; /*done */ + /* The drawable seems to be invalid. Report an error. */ + + __glXSendError(dpy, GLXBadDrawable, drawable, + X_GLXChangeDrawableAttributes, false); +#else CARD32 attribs[2]; attribs[0] = (CARD32) GLX_EVENT_MASK; attribs[1] = (CARD32) mask; ChangeDrawableAttribute(dpy, drawable, attribs, 1); +#endif } @@ -670,6 +784,26 @@ glXSelectEvent(Display * dpy, GLXDrawable drawable, unsigned long mask) PUBLIC void glXGetSelectedEvent(Display * dpy, GLXDrawable drawable, unsigned long *mask) { +#ifdef GLX_USE_APPLEGL + XWindowAttributes xwattr; + + if (apple_glx_pbuffer_get_event_mask(drawable, mask)) + return; /*done */ + + /* + * The spec allows a window, but currently there are no valid + * events for a window, so do nothing, but set the mask to 0. + */ + if (XGetWindowAttributes(dpy, drawable, &xwattr)) { + /* The window is valid, so set the mask to 0. */ + *mask = 0; + return; /*done */ + } + /* The drawable seems to be invalid. Report an error. */ + + __glXSendError(dpy, GLXBadDrawable, drawable, X_GLXGetDrawableAttributes, + true); +#else unsigned int value; @@ -680,6 +814,7 @@ glXGetSelectedEvent(Display * dpy, GLXDrawable drawable, unsigned long *mask) GetDrawableAttribute(dpy, drawable, GLX_EVENT_MASK_SGIX, &value); *mask = value; +#endif } @@ -689,8 +824,17 @@ glXCreatePixmap(Display * dpy, GLXFBConfig config, Pixmap pixmap, { WARN_ONCE_GLX_1_3(dpy, __func__); +#ifdef GLX_USE_APPLEGL + const __GLcontextModes *modes = (const __GLcontextModes *) config; + + if (apple_glx_pixmap_create(dpy, modes->screen, pixmap, modes)) + return None; + + return pixmap; +#else return CreateDrawable(dpy, (__GLcontextModes *) config, (Drawable) pixmap, attrib_list, X_GLXCreatePixmap); +#endif } @@ -699,9 +843,33 @@ glXCreateWindow(Display * dpy, GLXFBConfig config, Window win, const int *attrib_list) { WARN_ONCE_GLX_1_3(dpy, __func__); +#ifdef GLX_USE_APPLEGL + XWindowAttributes xwattr; + XVisualInfo *visinfo; + + (void) attrib_list; /*unused according to GLX 1.4 */ + + XGetWindowAttributes(dpy, win, &xwattr); + visinfo = glXGetVisualFromFBConfig(dpy, config); + + if (NULL == visinfo) { + __glXSendError(dpy, GLXBadFBConfig, 0, X_GLXCreateWindow, false); + return None; + } + + if (visinfo->visualid != XVisualIDFromVisual(xwattr.visual)) { + __glXSendError(dpy, BadMatch, 0, X_GLXCreateWindow, true); + return None; + } + + XFree(visinfo); + + return win; +#else return CreateDrawable(dpy, (__GLcontextModes *) config, (Drawable) win, attrib_list, X_GLXCreateWindow); +#endif } @@ -709,8 +877,12 @@ PUBLIC void glXDestroyPixmap(Display * dpy, GLXPixmap pixmap) { WARN_ONCE_GLX_1_3(dpy, __func__); - +#ifdef GLX_USE_APPLEGL + if (apple_glx_pixmap_destroy(dpy, pixmap)) + __glXSendError(dpy, GLXBadPixmap, pixmap, X_GLXDestroyPixmap, false); +#else DestroyDrawable(dpy, (GLXDrawable) pixmap, X_GLXDestroyPixmap); +#endif } @@ -718,11 +890,12 @@ PUBLIC void glXDestroyWindow(Display * dpy, GLXWindow win) { WARN_ONCE_GLX_1_3(dpy, __func__); - +#ifndef GLX_USE_APPLEGL DestroyDrawable(dpy, (GLXDrawable) win, X_GLXDestroyWindow); +#endif } - +#ifndef GLX_USE_APPLEGL PUBLIC GLX_ALIAS_VOID(glXDestroyGLXPbufferSGIX, (Display * dpy, GLXPbufferSGIX pbuf), @@ -738,4 +911,4 @@ GLX_ALIAS_VOID(glXGetSelectedEventSGIX, (Display * dpy, GLXDrawable drawable, unsigned long *mask), (dpy, drawable, mask), glXGetSelectedEvent) - +#endif diff --git a/src/glx/glxclient.h b/src/glx/glxclient.h index 8e5dc785dd9..57d254ea987 100644 --- a/src/glx/glxclient.h +++ b/src/glx/glxclient.h @@ -97,8 +97,13 @@ typedef struct _glapi_table __GLapi; #define containerOf(ptr, type, member) \ (type *)( (char *)ptr - offsetof(type,member) ) -#include <GL/internal/dri_interface.h> +extern void DRI_glXUseXFont(Font font, int first, int count, int listbase); + +#endif +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) + +#include <GL/internal/dri_interface.h> /** * Display dependent methods. This structure is initialized during the @@ -185,8 +190,6 @@ extern __GLXDRIdisplay *dri2CreateDisplay(Display * dpy); extern void dri2InvalidateBuffers(Display *dpy, XID drawable); -extern void DRI_glXUseXFont(Font font, int first, int count, int listbase); - /* ** Functions to obtain driver configuration information from a direct ** rendering client application @@ -405,9 +408,14 @@ struct __GLXcontextRec const __GLcontextModes *mode; #ifdef GLX_DIRECT_RENDERING +#ifdef GLX_USE_APPLEGL + void *driContext; + Bool do_destroy; +#else __GLXDRIcontext *driContext; __DRIcontext *__driContext; #endif +#endif /** * The current read-drawable for this context. Will be None if this @@ -503,7 +511,7 @@ struct __GLXscreenConfigsRec */ char *effectiveGLXexts; -#ifdef GLX_DIRECT_RENDERING +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) /** * Per screen direct rendering interface functions and data. */ @@ -549,6 +557,10 @@ struct __GLXscreenConfigsRec const __DRI2flushExtension *f; #endif +#ifdef __DRI2_CONFIG_QUERY + const __DRI2configQueryExtension *config; +#endif + #endif /** @@ -614,7 +626,7 @@ struct __GLXdisplayPrivateRec */ __GLXscreenConfigs *screenConfigs; -#ifdef GLX_DIRECT_RENDERING +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) /** * Per display direct rendering interface functions and data. */ @@ -792,7 +804,7 @@ extern GLboolean __glXGetMscRateOML(Display * dpy, GLXDrawable drawable, int32_t * numerator, int32_t * denominator); -#ifdef GLX_DIRECT_RENDERING +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) GLboolean __driGetMscRateOML(__DRIdrawable * draw, int32_t * numerator, int32_t * denominator, void *private); diff --git a/src/glx/glxcmds.c b/src/glx/glxcmds.c index e256a078f19..926be1014a8 100644 --- a/src/glx/glxcmds.c +++ b/src/glx/glxcmds.c @@ -39,10 +39,17 @@ #include "glcontextmodes.h" #ifdef GLX_DIRECT_RENDERING +#ifdef GLX_USE_APPLEGL +#include "apple_glx_context.h" +#include "apple_glx.h" +#include "glx_error.h" +#define GC_IS_DIRECT(gc) ((gc)->isDirect) +#else #include <sys/time.h> #include <X11/extensions/xf86vmode.h> #include "xf86dri.h" #define GC_IS_DIRECT(gc) ((gc)->driContext != NULL) +#endif #else #define GC_IS_DIRECT(gc) (0) #endif @@ -59,7 +66,7 @@ static const char __glXGLXClientVersion[] = "1.4"; /****************************************************************************/ -#ifdef GLX_DIRECT_RENDERING +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) static Bool windowExistsFlag; static int @@ -344,6 +351,12 @@ AllocateGLXContext(Display * dpy) bufSize = __GLX_MAX_RENDER_CMD_SIZE; } gc->maxSmallRenderCommandSize = bufSize; + +#ifdef GLX_USE_APPLEGL + gc->driContext = NULL; + gc->do_destroy = False; +#endif + return gc; } @@ -366,9 +379,14 @@ CreateContext(Display * dpy, int generic_id, { GLXContext gc; #ifdef GLX_DIRECT_RENDERING +#ifdef GLX_USE_APPLEGL + int errorcode; + bool x11error; +#else __GLXscreenConfigs *const psc = GetGLXScreenConfigs(dpy, screen); #endif - +#endif + if (dpy == NULL) return NULL; @@ -379,6 +397,7 @@ CreateContext(Display * dpy, int generic_id, if (!gc) return NULL; +#ifndef GLX_USE_APPLEGL /* TODO: darwin indirect */ #ifdef GLX_DIRECT_RENDERING if (allowDirect && psc->driScreen) { gc->driContext = psc->driScreen->createContext(psc, fbconfig, gc, @@ -455,10 +474,26 @@ CreateContext(Display * dpy, int generic_id, UnlockDisplay(dpy); SyncHandle(); +#endif gc->imported = GL_FALSE; gc->renderType = renderType; + /* TODO: darwin: Integrate with above to do indirect */ +#ifdef GLX_USE_APPLEGL + if(apple_glx_create_context(&gc->driContext, dpy, screen, fbconfig, + shareList ? shareList->driContext : NULL, + &errorcode, &x11error)) { + __glXSendError(dpy, errorcode, 0, X_GLXCreateContext, x11error); + __glXFreeContext(gc); + return NULL; + } + + gc->currentContextTag = -1; + gc->mode = fbconfig; + gc->isDirect = allowDirect; +#endif + return gc; } @@ -469,7 +504,7 @@ glXCreateContext(Display * dpy, XVisualInfo * vis, const __GLcontextModes *mode = NULL; int renderType = 0; -#ifdef GLX_DIRECT_RENDERING +#if defined(GLX_DIRECT_RENDERING) || defined(GLX_USE_APPLEGL) __GLXscreenConfigs *const psc = GetGLXScreenConfigs(dpy, vis->screen); mode = _gl_context_modes_find_visual(psc->visuals, vis->visualid); @@ -517,6 +552,7 @@ __glXFreeContext(__GLXcontext * gc) static void DestroyContext(Display * dpy, GLXContext gc) { +#ifndef GLX_USE_APPLEGL /* TODO: darwin: indirect */ xGLXDestroyContextReq *req; GLXContextID xid; CARD8 opcode; @@ -542,7 +578,7 @@ DestroyContext(Display * dpy, GLXContext gc) return; } -#ifdef GLX_DIRECT_RENDERING +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) /* Destroy the direct rendering context */ if (gc->driContext) { (*gc->driContext->destroyContext) (gc->driContext, gc->psc, dpy); @@ -552,17 +588,31 @@ DestroyContext(Display * dpy, GLXContext gc) #endif __glXFreeVertexArrayState(gc); +#else + __glXLock(); +#endif /* GLX_USE_APPLEGL */ if (gc->currentDpy) { +#ifdef GLX_USE_APPLEGL + /* + * Set the Bool that indicates that we should destroy this GLX context + * when the context is no longer current. + */ + gc->do_destroy = True; +#endif /* Have to free later cuz it's in use now */ __glXUnlock(); } else { /* Destroy the handle if not current to anybody */ __glXUnlock(); +#ifdef GLX_USE_APPLEGL + if(gc->driContext) + apple_glx_destroy_context(&gc->driContext, dpy); +#endif __glXFreeContext(gc); } - +#ifndef GLX_USE_APPLEGL if (!imported) { /* ** This dpy also created the server side part of the context. @@ -576,6 +626,7 @@ DestroyContext(Display * dpy, GLXContext gc) UnlockDisplay(dpy); SyncHandle(); } +#endif } PUBLIC void @@ -630,7 +681,9 @@ glXQueryExtension(Display * dpy, int *errorBase, int *eventBase) PUBLIC void glXWaitGL(void) { +#ifndef GLX_USE_APPLEGL xGLXWaitGLReq *req; +#endif GLXContext gc = __glXGetCurrentContext(); Display *dpy = gc->currentDpy; @@ -639,8 +692,10 @@ glXWaitGL(void) /* Flush any pending commands out */ __glXFlushRenderBuffer(gc, gc->pc); - -#ifdef GLX_DIRECT_RENDERING +#ifdef GLX_USE_APPLEGL + glFinish(); +#else +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) if (gc->driContext) { int screen; __GLXDRIdrawable *pdraw = @@ -664,6 +719,7 @@ glXWaitGL(void) req->contextTag = gc->currentContextTag; UnlockDisplay(dpy); SyncHandle(); +#endif /* GLX_USE_APPLEGL */ } /* @@ -673,7 +729,9 @@ glXWaitGL(void) PUBLIC void glXWaitX(void) { +#ifndef GLX_USE_APPLEGL xGLXWaitXReq *req; +#endif GLXContext gc = __glXGetCurrentContext(); Display *dpy = gc->currentDpy; @@ -683,7 +741,10 @@ glXWaitX(void) /* Flush any pending commands out */ __glXFlushRenderBuffer(gc, gc->pc); -#ifdef GLX_DIRECT_RENDERING +#ifdef GLX_USE_APPLEGL + apple_glx_waitx(dpy, gc->driContext); +#else +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) if (gc->driContext) { int screen; __GLXDRIdrawable *pdraw = @@ -710,12 +771,15 @@ glXWaitX(void) req->contextTag = gc->currentContextTag; UnlockDisplay(dpy); SyncHandle(); +#endif /* GLX_USE_APPLEGL */ } PUBLIC void glXUseXFont(Font font, int first, int count, int listBase) { +#ifndef GLX_USE_APPLEGL xGLXUseXFontReq *req; +#endif GLXContext gc = __glXGetCurrentContext(); Display *dpy = gc->currentDpy; @@ -724,8 +788,10 @@ glXUseXFont(Font font, int first, int count, int listBase) /* Flush any pending commands out */ (void) __glXFlushRenderBuffer(gc, gc->pc); - -#ifdef GLX_DIRECT_RENDERING +#ifdef GLX_USE_APPLEGL + DRI_glXUseXFont(font, first, count, listBase); +#else +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) if (gc->driContext) { DRI_glXUseXFont(font, first, count, listBase); return; @@ -744,6 +810,7 @@ glXUseXFont(Font font, int first, int count, int listBase) req->listBase = listBase; UnlockDisplay(dpy); SyncHandle(); +#endif /* GLX_USE_APPLEGL */ } /************************************************************************/ @@ -756,6 +823,17 @@ PUBLIC void glXCopyContext(Display * dpy, GLXContext source, GLXContext dest, unsigned long mask) { +#ifdef GLX_USE_APPLEGL + GLXContext gc = __glXGetCurrentContext(); + int errorcode; + bool x11error; + + if(apple_glx_copy_context(gc->driContext, source->driContext, dest->driContext, + mask, &errorcode, &x11error)) { + __glXSendError(dpy, errorcode, 0, X_GLXCopyContext, x11error); + } + +#else xGLXCopyContextReq *req; GLXContext gc = __glXGetCurrentContext(); GLXContextTag tag; @@ -766,7 +844,7 @@ glXCopyContext(Display * dpy, GLXContext source, return; } -#ifdef GLX_DIRECT_RENDERING +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) if (gc->driContext) { /* NOT_DONE: This does not work yet */ } @@ -794,6 +872,7 @@ glXCopyContext(Display * dpy, GLXContext source, req->contextTag = tag; UnlockDisplay(dpy); SyncHandle(); +#endif /* GLX_USE_APPLEGL */ } @@ -808,6 +887,9 @@ glXCopyContext(Display * dpy, GLXContext source, static Bool __glXIsDirect(Display * dpy, GLXContextID contextID) { +#ifdef GLX_USE_APPLEGL /* TODO: apple indirect */ + return GC_IS_DIRECT(gc); +#else #if !defined(USE_XCB) xGLXIsDirectReq *req; xGLXIsDirectReply reply; @@ -843,6 +925,7 @@ __glXIsDirect(Display * dpy, GLXContextID contextID) return reply.isDirect; #endif /* USE_XCB */ +#endif /* GLX_USE_APPLEGL */ } /** @@ -866,6 +949,18 @@ glXIsDirect(Display * dpy, GLXContext gc) PUBLIC GLXPixmap glXCreateGLXPixmap(Display * dpy, XVisualInfo * vis, Pixmap pixmap) { +#ifdef GLX_USE_APPLEGL + int screen = vis->screen; + __GLXscreenConfigs *const psc = GetGLXScreenConfigs(dpy, screen); + const __GLcontextModes *modes; + + modes = _gl_context_modes_find_visual(psc->visuals, vis->visualid); + + if(apple_glx_pixmap_create(dpy, vis->screen, pixmap, modes)) + return None; + + return pixmap; +#else xGLXCreateGLXPixmapReq *req; GLXPixmap xid; CARD8 opcode; @@ -887,7 +982,7 @@ glXCreateGLXPixmap(Display * dpy, XVisualInfo * vis, Pixmap pixmap) UnlockDisplay(dpy); SyncHandle(); -#ifdef GLX_DIRECT_RENDERING +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) do { /* FIXME: Maybe delay __DRIdrawable creation until the drawable * is actually bound to a context... */ @@ -915,6 +1010,7 @@ glXCreateGLXPixmap(Display * dpy, XVisualInfo * vis, Pixmap pixmap) #endif return xid; +#endif } /* @@ -923,6 +1019,10 @@ glXCreateGLXPixmap(Display * dpy, XVisualInfo * vis, Pixmap pixmap) PUBLIC void glXDestroyGLXPixmap(Display * dpy, GLXPixmap glxpixmap) { +#ifdef GLX_USE_APPLEGL + if(apple_glx_pixmap_destroy(dpy, glxpixmap)) + __glXSendError(dpy, GLXBadPixmap, glxpixmap, X_GLXDestroyPixmap, false); +#else xGLXDestroyGLXPixmapReq *req; CARD8 opcode; @@ -940,7 +1040,7 @@ glXDestroyGLXPixmap(Display * dpy, GLXPixmap glxpixmap) UnlockDisplay(dpy); SyncHandle(); -#ifdef GLX_DIRECT_RENDERING +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) { int screen; __GLXdisplayPrivate *const priv = __glXInitialize(dpy); @@ -953,11 +1053,20 @@ glXDestroyGLXPixmap(Display * dpy, GLXPixmap glxpixmap) } } #endif +#endif /* GLX_USE_APPLEGL */ } PUBLIC void glXSwapBuffers(Display * dpy, GLXDrawable drawable) { +#ifdef GLX_USE_APPLEGL + GLXContext gc = glXGetCurrentContext(); + if(gc && apple_glx_is_current_drawable(dpy, gc->driContext, drawable)) { + apple_glx_swap_buffers(gc->driContext); + } else { + __glXSendError(dpy, GLXBadCurrentWindow, 0, X_GLXSwapBuffers, false); + } +#else GLXContext gc; GLXContextTag tag; CARD8 opcode; @@ -967,7 +1076,7 @@ glXSwapBuffers(Display * dpy, GLXDrawable drawable) xGLXSwapBuffersReq *req; #endif -#ifdef GLX_DIRECT_RENDERING +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) __GLXDRIdrawable *pdraw = GetGLXDRIDrawable(dpy, drawable, NULL); if (pdraw != NULL) { @@ -1012,6 +1121,7 @@ glXSwapBuffers(Display * dpy, GLXDrawable drawable) SyncHandle(); XFlush(dpy); #endif /* USE_XCB */ +#endif /* GLX_USE_APPLEGL */ } @@ -1440,6 +1550,12 @@ glXChooseVisual(Display * dpy, int screen, int *attribList) } } +#ifdef GLX_USE_APPLEGL + if(visualList && getenv("LIBGL_DUMP_VISUALID")) { + printf("visualid 0x%lx\n", visualList[0].visualid); + } +#endif + return visualList; } @@ -1462,7 +1578,7 @@ glXQueryExtensionsString(Display * dpy, int screen) } __glXCalculateUsableExtensions(psc, -#ifdef GLX_DIRECT_RENDERING +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) (psc->driScreen != NULL), #else GL_FALSE, @@ -1573,6 +1689,7 @@ PUBLIC GLX_ALIAS(Display *, glXGetCurrentDisplayEXT, (void), (), glXGetCurrentDisplay) +#ifndef GLX_USE_APPLEGL /** * Used internally by libGL to send \c xGLXQueryContextinfoExtReq requests * to the X-server. @@ -1684,13 +1801,16 @@ static int __glXQueryContextInfo(Display * dpy, GLXContext ctx) return retval; } +#endif + PUBLIC int glXQueryContext(Display * dpy, GLXContext ctx, int attribute, int *value) { +#ifndef GLX_USE_APPLEGL int retVal; /* get the information from the server if we don't have it already */ -#ifdef GLX_DIRECT_RENDERING +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) if (!ctx->driContext && (ctx->mode == NULL)) { #else if (ctx->mode == NULL) { @@ -1699,13 +1819,17 @@ glXQueryContext(Display * dpy, GLXContext ctx, int attribute, int *value) if (Success != retVal) return retVal; } +#endif + switch (attribute) { - case GLX_SHARE_CONTEXT_EXT: +#ifndef GLX_USE_APPLEGL + case GLX_SHARE_CONTEXT_EXT: *value = (int) (ctx->share_xid); break; case GLX_VISUAL_ID_EXT: *value = ctx->mode ? ctx->mode->visualID : None; break; +#endif case GLX_SCREEN: *value = (int) (ctx->screen); break; @@ -1734,6 +1858,9 @@ PUBLIC GLXContextID glXGetContextIDEXT(const GLXContext ctx) PUBLIC GLXContext glXImportContextEXT(Display * dpy, GLXContextID contextID) { +#ifdef GLX_USE_APPLEGL + return NULL; +#else GLXContext ctx; if (contextID == None) { @@ -1754,6 +1881,7 @@ glXImportContextEXT(Display * dpy, GLXContextID contextID) } } return ctx; +#endif } PUBLIC void @@ -1881,7 +2009,7 @@ glXGetVisualFromFBConfig(Display * dpy, GLXFBConfig config) return XGetVisualInfo(dpy, VisualIDMask, &visualTemplate, &count); } - +#ifndef GLX_USE_APPLEGL /* ** GLX_SGI_swap_control */ @@ -2236,6 +2364,7 @@ __glXWaitVideoSyncSGI(int divisor, int remainder, unsigned int *count) return GLX_BAD_CONTEXT; } +#endif /* GLX_USE_APPLEGL */ /* ** GLX_SGIX_fbconfig @@ -2262,17 +2391,24 @@ glXCreateGLXPixmapWithConfigSGIX(Display * dpy, GLXFBConfigSGIX config, Pixmap pixmap) { +#ifndef GLX_USE_APPLEGL xGLXVendorPrivateWithReplyReq *vpreq; xGLXCreateGLXPixmapWithConfigSGIXReq *req; GLXPixmap xid = None; CARD8 opcode; - const __GLcontextModes *const fbconfig = (__GLcontextModes *) config; __GLXscreenConfigs *psc; +#endif + const __GLcontextModes *const fbconfig = (__GLcontextModes *) config; if ((dpy == NULL) || (config == NULL)) { return None; } +#ifdef GLX_USE_APPLEGL + if(apple_glx_pixmap_create(dpy, fbconfig->screen, pixmap, fbconfig)) + return None; + return pixmap; +#else psc = GetGLXScreenConfigs(dpy, fbconfig->screen); if ((psc != NULL) @@ -2300,6 +2436,7 @@ glXCreateGLXPixmapWithConfigSGIX(Display * dpy, } return xid; +#endif } PUBLIC GLXContext @@ -2345,7 +2482,7 @@ glXGetFBConfigFromVisualSGIX(Display * dpy, XVisualInfo * vis) return NULL; } - +#ifndef GLX_USE_APPLEGL /* ** GLX_SGIX_swap_group */ @@ -2420,7 +2557,7 @@ __glXGetSyncValuesOML(Display * dpy, GLXDrawable drawable, return False; } -#ifdef GLX_DIRECT_RENDERING +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) _X_HIDDEN GLboolean __driGetMscRateOML(__DRIdrawable * draw, int32_t * numerator, int32_t * denominator, void *private) @@ -2876,7 +3013,7 @@ __glXBindTexImageEXT(Display * dpy, i++; } -#ifdef GLX_DIRECT_RENDERING +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) if (gc->driContext) { __GLXDRIdrawable *pdraw = GetGLXDRIDrawable(dpy, drawable, NULL); @@ -2966,6 +3103,8 @@ __glXReleaseTexImageEXT(Display * dpy, GLXDrawable drawable, int buffer) /*@}*/ +#endif /* GLX_USE_APPLEGL */ + /** * \c strdup is actually not a standard ANSI C or POSIX routine. * Irix will not define it if ANSI mode is in effect. @@ -3043,6 +3182,7 @@ static const struct name_address_pair GLX_functions[] = { GLX_FUNCTION(glXQueryDrawable), GLX_FUNCTION(glXSelectEvent), +#ifndef GLX_USE_APPLEGL /*** GLX_SGI_swap_control ***/ GLX_FUNCTION2(glXSwapIntervalSGI, __glXSwapIntervalSGI), @@ -3060,6 +3200,7 @@ static const struct name_address_pair GLX_functions[] = { GLX_FUNCTION2(glXGetCurrentDisplayEXT, glXGetCurrentDisplay), GLX_FUNCTION(glXImportContextEXT), GLX_FUNCTION2(glXQueryContextInfoEXT, glXQueryContext), +#endif /*** GLX_SGIX_fbconfig ***/ GLX_FUNCTION2(glXGetFBConfigAttribSGIX, glXGetFBConfigAttrib), @@ -3069,6 +3210,7 @@ static const struct name_address_pair GLX_functions[] = { GLX_FUNCTION2(glXGetVisualFromFBConfigSGIX, glXGetVisualFromFBConfig), GLX_FUNCTION(glXGetFBConfigFromVisualSGIX), +#ifndef GLX_USE_APPLEGL /*** GLX_SGIX_pbuffer ***/ GLX_FUNCTION(glXCreateGLXPbufferSGIX), GLX_FUNCTION(glXDestroyGLXPbufferSGIX), @@ -3106,6 +3248,7 @@ static const struct name_address_pair GLX_functions[] = { GLX_FUNCTION2(glXEndFrameTrackingMESA, __glXEndFrameTrackingMESA), GLX_FUNCTION2(glXGetFrameUsageMESA, __glXGetFrameUsageMESA), GLX_FUNCTION2(glXQueryFrameTrackingMESA, __glXQueryFrameTrackingMESA), +#endif /*** GLX_ARB_get_proc_address ***/ GLX_FUNCTION(glXGetProcAddressARB), @@ -3113,6 +3256,7 @@ static const struct name_address_pair GLX_functions[] = { /*** GLX 1.4 ***/ GLX_FUNCTION2(glXGetProcAddress, glXGetProcAddressARB), +#ifndef GLX_USE_APPLEGL /*** GLX_OML_sync_control ***/ GLX_FUNCTION2(glXWaitForSbcOML, __glXWaitForSbcOML), GLX_FUNCTION2(glXWaitForMscOML, __glXWaitForMscOML), @@ -3123,8 +3267,9 @@ static const struct name_address_pair GLX_functions[] = { /*** GLX_EXT_texture_from_pixmap ***/ GLX_FUNCTION2(glXBindTexImageEXT, __glXBindTexImageEXT), GLX_FUNCTION2(glXReleaseTexImageEXT, __glXReleaseTexImageEXT), +#endif -#ifdef GLX_DIRECT_RENDERING +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) /*** DRI configuration ***/ GLX_FUNCTION(glXGetScreenDriver), GLX_FUNCTION(glXGetDriverConfig), @@ -3133,7 +3278,7 @@ static const struct name_address_pair GLX_functions[] = { {NULL, NULL} /* end of list */ }; - +#ifndef GLX_USE_APPLEGL static const GLvoid * get_glx_proc_address(const char *funcName) { @@ -3147,7 +3292,7 @@ get_glx_proc_address(const char *funcName) return NULL; } - +#endif /** * Get the address of a named GL function. This is the pre-GLX 1.4 name for @@ -3170,13 +3315,15 @@ PUBLIC void (*glXGetProcAddressARB(const GLubyte * procName)) (void) * DRI based drivers from searching the core GL function table for * internal API functions. */ - +#ifdef GLX_USE_APPLEGL + f = (gl_function) apple_glx_get_proc_address(procName); +#else f = (gl_function) get_glx_proc_address((const char *) procName); if ((f == NULL) && (procName[0] == 'g') && (procName[1] == 'l') && (procName[2] != 'X')) { f = (gl_function) _glapi_get_proc_address((const char *) procName); } - +#endif return f; } @@ -3199,7 +3346,7 @@ PUBLIC void (*glXGetProcAddress(const GLubyte * procName)) (void) #endif /* __GNUC__ */ -#ifdef GLX_DIRECT_RENDERING +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) /** * Get the unadjusted system time (UST). Currently, the UST is measured in * microseconds since Epoc. The actual resolution of the UST may vary from diff --git a/src/glx/glxcurrent.c b/src/glx/glxcurrent.c index c28360bdde9..691e8dfadf2 100644 --- a/src/glx/glxcurrent.c +++ b/src/glx/glxcurrent.c @@ -33,9 +33,20 @@ * Client-side GLX interface for current context management. */ +#ifdef PTHREADS +#include <pthread.h> +#endif + #include "glxclient.h" +#ifdef GLX_USE_APPLEGL +#include <stdlib.h> + +#include "apple_glx.h" +#include "apple_glx_context.h" +#else #include "glapi.h" #include "indirect_init.h" +#endif /* ** We setup some dummy structures here so that the API can be used @@ -59,11 +70,12 @@ static __GLXcontext dummyContext = { }; +#ifndef GLX_USE_APPLEGL /* ** All indirect rendering contexts will share the same indirect dispatch table. */ static __GLapi *IndirectAPI = NULL; - +#endif /* * Current context management and locking @@ -156,10 +168,12 @@ _X_HIDDEN void __glXSetCurrentContextNull(void) { __glXSetCurrentContext(&dummyContext); -#ifdef GLX_DIRECT_RENDERING +#ifndef GLX_USE_APPLEGL +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) _glapi_set_dispatch(NULL); /* no-op functions */ _glapi_set_context(NULL); #endif +#endif } @@ -186,6 +200,7 @@ glXGetCurrentDrawable(void) } +#ifndef GLX_USE_APPLEGL /************************************************************************/ /** @@ -269,7 +284,7 @@ SendMakeCurrentRequest(Display * dpy, CARD8 opcode, } -#ifdef GLX_DIRECT_RENDERING +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) static __GLXDRIdrawable * FetchDRIDrawable(Display * dpy, GLXDrawable glxDrawable, GLXContext gc) { @@ -313,6 +328,8 @@ __glXGenerateError(Display * dpy, GLXContext gc, XID resource, _XError(dpy, &error); } +#endif /* GLX_USE_APPLEGL */ + /** * Make a particular context current. * @@ -322,8 +339,17 @@ static Bool MakeContextCurrent(Display * dpy, GLXDrawable draw, GLXDrawable read, GLXContext gc) { - xGLXMakeCurrentReply reply; const GLXContext oldGC = __glXGetCurrentContext(); +#ifdef GLX_USE_APPLEGL + bool error = apple_glx_make_current_context(dpy, + (oldGC && oldGC != &dummyContext) ? oldGC->driContext : NULL, + gc ? gc->driContext : NULL, draw); + + apple_glx_diagnostic("%s: error %s\n", __func__, error ? "YES" : "NO"); + if(error) + return GL_FALSE; +#else + xGLXMakeCurrentReply reply; const CARD8 opcode = __glXSetupForCommand(dpy); const CARD8 oldOpcode = ((gc == oldGC) || (oldGC == &dummyContext)) ? opcode : __glXSetupForCommand(oldGC->currentDpy); @@ -360,7 +386,7 @@ MakeContextCurrent(Display * dpy, GLXDrawable draw, return False; } -#ifdef GLX_DIRECT_RENDERING +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) /* Bind the direct rendering context to the drawable */ if (gc && gc->driContext) { __GLXDRIdrawable *pdraw = FetchDRIDrawable(dpy, draw, gc); @@ -395,7 +421,7 @@ MakeContextCurrent(Display * dpy, GLXDrawable draw, return False; } -#ifdef GLX_DIRECT_RENDERING +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) if ((dpy != oldGC->currentDpy || (gc && gc->driContext)) && !oldGC->isDirect && oldGC != &dummyContext) { #else @@ -413,12 +439,13 @@ MakeContextCurrent(Display * dpy, GLXDrawable draw, oldGC->currentContextTag, None, None, &dummy_reply); } -#ifdef GLX_DIRECT_RENDERING +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) else if (oldGC->driContext && oldGC != gc) { oldGC->driContext->unbindContext(oldGC->driContext); } #endif +#endif /* GLX_USE_APPLEGL */ /* Update our notion of what is current */ __glXLock(); @@ -428,8 +455,10 @@ MakeContextCurrent(Display * dpy, GLXDrawable draw, * cannot be NULL, therefore if they are the same, gc is not * NULL and not the dummy. */ - gc->currentDrawable = draw; - gc->currentReadable = read; + if(gc) { + gc->currentDrawable = draw; + gc->currentReadable = read; + } } else { if (oldGC != &dummyContext) { @@ -439,13 +468,24 @@ MakeContextCurrent(Display * dpy, GLXDrawable draw, oldGC->currentReadable = None; oldGC->currentContextTag = 0; oldGC->thread_id = 0; - +#ifdef GLX_USE_APPLEGL + + /* + * At this point we should check if the context has been + * through glXDestroyContext, and redestroy it if so. + */ + if(oldGC->do_destroy) { + __glXUnlock(); + /* glXDestroyContext uses the same global lock. */ + glXDestroyContext(dpy, oldGC); + __glXLock(); +#else if (oldGC->xid == None) { /* We are switching away from a context that was * previously destroyed, so we need to free the memory * for the old handle. */ -#ifdef GLX_DIRECT_RENDERING +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) /* Destroy the old direct rendering context */ if (oldGC->driContext) { oldGC->driContext->destroyContext(oldGC->driContext, @@ -455,6 +495,7 @@ MakeContextCurrent(Display * dpy, GLXDrawable draw, } #endif __glXFreeContext(oldGC); +#endif /* GLX_USE_APPLEGL */ } } if (gc) { @@ -463,9 +504,10 @@ MakeContextCurrent(Display * dpy, GLXDrawable draw, gc->currentDpy = dpy; gc->currentDrawable = draw; gc->currentReadable = read; +#ifndef GLX_USE_APPLEGL gc->thread_id = _glthread_GetID(); -#ifdef GLX_DIRECT_RENDERING +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) if (!gc->driContext) { #endif if (!IndirectAPI) @@ -480,12 +522,13 @@ MakeContextCurrent(Display * dpy, GLXDrawable draw, (void) glGetString(GL_VERSION); __glXInitVertexArrayState(gc); } -#ifdef GLX_DIRECT_RENDERING +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) } else { gc->currentContextTag = -1; } #endif +#endif /* GLX_USE_APPLEGL */ } else { __glXSetCurrentContextNull(); diff --git a/src/glx/glxext.c b/src/glx/glxext.c index 5289354a521..82d3a56f37d 100644 --- a/src/glx/glxext.c +++ b/src/glx/glxext.c @@ -42,6 +42,10 @@ #include <X11/extensions/Xext.h> #include <X11/extensions/extutil.h> #include <X11/extensions/dri2proto.h> +#ifdef GLX_USE_APPLEGL +#include "apple_glx.h" +#include "apple_visual.h" +#endif #include "glxextensions.h" #include "glcontextmodes.h" @@ -65,7 +69,12 @@ _X_HIDDEN int __glXDebug = 0; /* Extension required boiler plate */ static char *__glXExtensionName = GLX_EXTENSION_NAME; +#ifdef GLX_USE_APPLEGL +static XExtensionInfo __glXExtensionInfo_data; +XExtensionInfo *__glXExtensionInfo = &__glXExtensionInfo_data; +#else XExtensionInfo *__glXExtensionInfo = NULL; +#endif static /* const */ char *error_list[] = { "GLXBadContext", @@ -98,6 +107,11 @@ __glXCloseDisplay(Display * dpy, XExtCodes * codes) } +#ifdef GLX_USE_APPLEGL +static char *__glXErrorString(Display *dpy, int code, XExtCodes *codes, + char *buf, int n); +#endif + static XEXT_GENERATE_ERROR_STRING(__glXErrorString, __glXExtensionName, __GLX_NUMBER_ERRORS, error_list) @@ -245,7 +259,7 @@ FreeScreenConfigs(__GLXdisplayPrivate * priv) } Xfree((char *) psc->serverGLXexts); -#ifdef GLX_DIRECT_RENDERING +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) if (psc->driver_configs) { unsigned int j; for (j = 0; psc->driver_configs[j]; j++) @@ -285,7 +299,7 @@ __glXFreeDisplayPrivate(XExtData * extension) priv->serverGLXversion = 0x0; /* to protect against double free's */ } -#ifdef GLX_DIRECT_RENDERING +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) /* Free the direct rendering per display data */ if (priv->driswDisplay) (*priv->driswDisplay->destroyDisplay) (priv->driswDisplay); @@ -358,7 +372,20 @@ QueryVersion(Display * dpy, int opcode, int *major, int *minor) #endif /* USE_XCB */ } +/* + * We don't want to enable this GLX_OML_swap_method in glxext.h, + * because we can't support it. The X server writes it out though, + * so we should handle it somehow, to avoid false warnings. + */ +enum { + IGNORE_GLX_SWAP_METHOD_OML = 0x8060 +}; + +/* + * getVisualConfigs uses the !tagged_only path. + * getFBConfigs uses the tagged_only path. + */ _X_HIDDEN void __glXInitializeVisualConfigFromTags(__GLcontextModes * config, int count, const INT32 * bp, Bool tagged_only, @@ -392,7 +419,14 @@ __glXInitializeVisualConfigFromTags(__GLcontextModes * config, int count, config->numAuxBuffers = *bp++; config->level = *bp++; +#ifdef GLX_USE_APPLEGL + /* AppleSGLX supports pixmap and pbuffers with all config. */ + config->drawableType = GLX_WINDOW_BIT | GLX_PIXMAP_BIT | GLX_PBUFFER_BIT; + /* Unfortunately this can create an ABI compatibility problem. */ + count -= 18; +#else count -= __GLX_MIN_CONFIG_PROPS; +#endif } /* @@ -405,7 +439,9 @@ __glXInitializeVisualConfigFromTags(__GLcontextModes * config, int count, config-> tag = ( fbconfig_style_tags ) ? *bp++ : 1 for (i = 0; i < count; i += 2) { - switch (*bp++) { + long int tag = *bp++; + + switch (tag) { case GLX_RGBA: FETCH_OR_SET(rgbMode); break; @@ -483,6 +519,10 @@ __glXInitializeVisualConfigFromTags(__GLcontextModes * config, int count, break; case GLX_DRAWABLE_TYPE: config->drawableType = *bp++; +#ifdef GLX_USE_APPLEGL + /* AppleSGLX supports pixmap and pbuffers with all config. */ + config->drawableType |= GLX_WINDOW_BIT | GLX_PIXMAP_BIT | GLX_PBUFFER_BIT; +#endif break; case GLX_RENDER_TYPE: config->renderType = *bp++; @@ -502,6 +542,7 @@ __glXInitializeVisualConfigFromTags(__GLcontextModes * config, int count, case GLX_MAX_PBUFFER_PIXELS: config->maxPbufferPixels = *bp++; break; +#ifndef GLX_USE_APPLEGL case GLX_OPTIMAL_PBUFFER_WIDTH_SGIX: config->optimalPbufferWidth = *bp++; break; @@ -514,12 +555,19 @@ __glXInitializeVisualConfigFromTags(__GLcontextModes * config, int count, case GLX_SWAP_METHOD_OML: config->swapMethod = *bp++; break; +#endif case GLX_SAMPLE_BUFFERS_SGIS: config->sampleBuffers = *bp++; break; case GLX_SAMPLES_SGIS: config->samples = *bp++; break; +#ifdef GLX_USE_APPLEGL + case IGNORE_GLX_SWAP_METHOD_OML: + /* We ignore this tag. See the comment above this function. */ + ++bp; + break; +#else case GLX_BIND_TO_TEXTURE_RGB_EXT: config->bindToTextureRgb = *bp++; break; @@ -535,11 +583,21 @@ __glXInitializeVisualConfigFromTags(__GLcontextModes * config, int count, case GLX_Y_INVERTED_EXT: config->yInverted = *bp++; break; +#endif case None: i = count; break; default: - break; + if(getenv("LIBGL_DIAGNOSTIC")) { + long int tagvalue = *bp++; + fprintf(stderr, "WARNING: unknown GLX tag from server: " + "tag 0x%lx value 0x%lx\n", tag, tagvalue); + } else { + /* Ignore the unrecognized tag's value */ + bp++; + break; + } + break; } } @@ -587,9 +645,18 @@ createConfigsFromProperties(Display * dpy, int nvisuals, int nprops, m = modes; for (i = 0; i < nvisuals; i++) { _XRead(dpy, (char *) props, prop_size); - /* Older X servers don't send this so we default it here. */ +#ifdef GLX_USE_APPLEGL + /* Older X servers don't send this so we default it here. */ m->drawableType = GLX_WINDOW_BIT; - __glXInitializeVisualConfigFromTags(m, nprops, props, +#else + /* + * The XQuartz 2.3.2.1 X server doesn't set this properly, so + * set the proper bits here. + * AppleSGLX supports windows, pixmaps, and pbuffers with all config. + */ + m->drawableType = GLX_WINDOW_BIT | GLX_PIXMAP_BIT | GLX_PBUFFER_BIT; +#endif + __glXInitializeVisualConfigFromTags(m, nprops, props, tagged_only, GL_TRUE); m->screen = screen; m = m->next; @@ -710,7 +777,7 @@ AllocAndFetchScreenConfigs(Display * dpy, __GLXdisplayPrivate * priv) getVisualConfigs(dpy, priv, i); getFBConfigs(dpy, priv, i); -#ifdef GLX_DIRECT_RENDERING +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) psc->scr = i; psc->dpy = dpy; psc->drawHash = __glxHashCreate(); @@ -750,7 +817,7 @@ __glXInitialize(Display * dpy) __GLXdisplayPrivate *dpyPriv; XEDataObject dataObj; int major, minor; -#ifdef GLX_DIRECT_RENDERING +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) Bool glx_direct, glx_accel; #endif @@ -807,7 +874,7 @@ __glXInitialize(Display * dpy) dpyPriv->serverGLXvendor = 0x0; dpyPriv->serverGLXversion = 0x0; -#ifdef GLX_DIRECT_RENDERING +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) glx_direct = (getenv("LIBGL_ALWAYS_INDIRECT") == NULL); glx_accel = (getenv("LIBGL_ALWAYS_SOFTWARE") == NULL); @@ -823,8 +890,11 @@ __glXInitialize(Display * dpy) if (glx_direct) dpyPriv->driswDisplay = driswCreateDisplay(dpy); #endif - +#ifdef GLX_USE_APPLEGL + if (apple_init_glx(dpy) || !AllocAndFetchScreenConfigs(dpy, dpyPriv)) { +#else if (!AllocAndFetchScreenConfigs(dpy, dpyPriv)) { +#endif __glXUnlock(); Xfree((char *) dpyPriv); Xfree((char *) private); diff --git a/src/glx/glxextensions.c b/src/glx/glxextensions.c index 56c69cbfcba..e58c296b309 100644 --- a/src/glx/glxextensions.c +++ b/src/glx/glxextensions.c @@ -75,34 +75,72 @@ static const struct extension_info known_glx_extensions[] = { { GLX(ARB_multisample), VER(1,4), Y, Y, N, N }, { GLX(ARB_render_texture), VER(0,0), N, N, N, N }, { GLX(ATI_pixel_format_float), VER(0,0), N, N, N, N }, +#ifdef GLX_USE_APPLEGL + { GLX(EXT_import_context), VER(0,0), N, N, N, N }, + { GLX(EXT_visual_info), VER(0,0), N, N, N, N }, +#else { GLX(EXT_import_context), VER(0,0), Y, Y, N, N }, { GLX(EXT_visual_info), VER(0,0), Y, Y, N, N }, +#endif { GLX(EXT_visual_rating), VER(0,0), Y, Y, N, N }, +#ifdef GLX_USE_APPLEGL + { GLX(MESA_agp_offset), VER(0,0), N, N, N, N }, /* Deprecated */ + { GLX(MESA_allocate_memory), VER(0,0), N, N, N, N }, + { GLX(MESA_copy_sub_buffer), VER(0,0), N, N, N, N }, +#else { GLX(MESA_agp_offset), VER(0,0), N, N, N, Y }, /* Deprecated */ { GLX(MESA_allocate_memory), VER(0,0), Y, N, N, Y }, { GLX(MESA_copy_sub_buffer), VER(0,0), Y, N, N, N }, +#endif { GLX(MESA_pixmap_colormap), VER(0,0), N, N, N, N }, /* Deprecated */ { GLX(MESA_release_buffers), VER(0,0), N, N, N, N }, /* Deprecated */ +#ifdef GLX_USE_APPLEGL + { GLX(MESA_swap_control), VER(0,0), N, N, N, N }, + { GLX(MESA_swap_frame_usage), VER(0,0), N, N, N, N }, +#else { GLX(MESA_swap_control), VER(0,0), Y, N, N, Y }, { GLX(MESA_swap_frame_usage), VER(0,0), Y, N, N, Y }, +#endif { GLX(NV_float_buffer), VER(0,0), N, N, N, N }, { GLX(NV_render_depth_texture), VER(0,0), N, N, N, N }, { GLX(NV_render_texture_rectangle), VER(0,0), N, N, N, N }, +#ifdef GLX_USE_APPLEGL + { GLX(NV_vertex_array_range), VER(0,0), N, N, N, N }, /* Deprecated */ + { GLX(OML_swap_method), VER(0,0), N, N, N, N }, + { GLX(OML_sync_control), VER(0,0), N, N, N, N }, + { GLX(SGI_make_current_read), VER(1,3), N, N, N, N }, + { GLX(SGI_swap_control), VER(0,0), N, N, N, N }, + { GLX(SGI_video_sync), VER(0,0), N, N, N, N }, +#else { GLX(NV_vertex_array_range), VER(0,0), N, N, N, Y }, /* Deprecated */ { GLX(OML_swap_method), VER(0,0), Y, Y, N, N }, { GLX(OML_sync_control), VER(0,0), Y, N, N, Y }, { GLX(SGI_make_current_read), VER(1,3), Y, N, N, N }, { GLX(SGI_swap_control), VER(0,0), Y, N, N, N }, { GLX(SGI_video_sync), VER(0,0), Y, N, N, Y }, +#endif { GLX(SGIS_blended_overlay), VER(0,0), N, N, N, N }, { GLX(SGIS_color_range), VER(0,0), N, N, N, N }, +#ifdef GLX_USE_APPLEGL + { GLX(SGIS_multisample), VER(0,0), N, N, N, N }, +#else { GLX(SGIS_multisample), VER(0,0), Y, Y, N, N }, +#endif { GLX(SGIX_fbconfig), VER(1,3), Y, Y, N, N }, +#ifdef GLX_USE_APPLEGL + { GLX(SGIX_pbuffer), VER(1,3), N, N, N, N }, +#else { GLX(SGIX_pbuffer), VER(1,3), Y, Y, N, N }, +#endif { GLX(SGIX_swap_barrier), VER(0,0), N, N, N, N }, { GLX(SGIX_swap_group), VER(0,0), N, N, N, N }, +#ifdef GLX_USE_APPLEGL + { GLX(SGIX_visual_select_group), VER(0,0), N, N, N, N }, + { GLX(EXT_texture_from_pixmap), VER(0,0), N, N, N, N }, +#else { GLX(SGIX_visual_select_group), VER(0,0), Y, Y, N, N }, { GLX(EXT_texture_from_pixmap), VER(0,0), Y, N, N, N }, +#endif { GLX(INTEL_swap_event), VER(1,4), Y, Y, N, N }, { NULL } }; diff --git a/src/glx/indirect.c b/src/glx/indirect.c index 42a225f6711..172727860e8 100644 --- a/src/glx/indirect.c +++ b/src/glx/indirect.c @@ -5198,7 +5198,7 @@ glDeleteTexturesEXT(GLsizei n, const GLuint * textures) { __GLXcontext *const gc = __glXGetCurrentContext(); -#ifdef GLX_DIRECT_RENDERING +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) if (gc->driContext) { CALL_DeleteTextures(GET_DISPATCH(), (n, textures)); } else @@ -5269,7 +5269,7 @@ glGenTexturesEXT(GLsizei n, GLuint * textures) { __GLXcontext *const gc = __glXGetCurrentContext(); -#ifdef GLX_DIRECT_RENDERING +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) if (gc->driContext) { CALL_GenTextures(GET_DISPATCH(), (n, textures)); } else @@ -5334,7 +5334,7 @@ glIsTextureEXT(GLuint texture) { __GLXcontext *const gc = __glXGetCurrentContext(); -#ifdef GLX_DIRECT_RENDERING +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) if (gc->driContext) { return CALL_IsTexture(GET_DISPATCH(), (texture)); } else @@ -5650,7 +5650,7 @@ glGetColorTableEXT(GLenum target, GLenum format, GLenum type, GLvoid * table) { __GLXcontext *const gc = __glXGetCurrentContext(); -#ifdef GLX_DIRECT_RENDERING +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) if (gc->driContext) { CALL_GetColorTable(GET_DISPATCH(), (target, format, type, table)); } else @@ -5726,7 +5726,7 @@ glGetColorTableParameterfvEXT(GLenum target, GLenum pname, GLfloat * params) { __GLXcontext *const gc = __glXGetCurrentContext(); -#ifdef GLX_DIRECT_RENDERING +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) if (gc->driContext) { CALL_GetColorTableParameterfv(GET_DISPATCH(), (target, pname, params)); @@ -5799,7 +5799,7 @@ glGetColorTableParameterivEXT(GLenum target, GLenum pname, GLint * params) { __GLXcontext *const gc = __glXGetCurrentContext(); -#ifdef GLX_DIRECT_RENDERING +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) if (gc->driContext) { CALL_GetColorTableParameteriv(GET_DISPATCH(), (target, pname, params)); @@ -6125,7 +6125,7 @@ gl_dispatch_stub_356(GLenum target, GLenum format, GLenum type, { __GLXcontext *const gc = __glXGetCurrentContext(); -#ifdef GLX_DIRECT_RENDERING +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) if (gc->driContext) { CALL_GetConvolutionFilter(GET_DISPATCH(), (target, format, type, image)); @@ -6203,7 +6203,7 @@ gl_dispatch_stub_357(GLenum target, GLenum pname, GLfloat * params) { __GLXcontext *const gc = __glXGetCurrentContext(); -#ifdef GLX_DIRECT_RENDERING +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) if (gc->driContext) { CALL_GetConvolutionParameterfv(GET_DISPATCH(), (target, pname, params)); @@ -6276,7 +6276,7 @@ gl_dispatch_stub_358(GLenum target, GLenum pname, GLint * params) { __GLXcontext *const gc = __glXGetCurrentContext(); -#ifdef GLX_DIRECT_RENDERING +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) if (gc->driContext) { CALL_GetConvolutionParameteriv(GET_DISPATCH(), (target, pname, params)); @@ -6356,7 +6356,7 @@ gl_dispatch_stub_361(GLenum target, GLboolean reset, GLenum format, { __GLXcontext *const gc = __glXGetCurrentContext(); -#ifdef GLX_DIRECT_RENDERING +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) if (gc->driContext) { CALL_GetHistogram(GET_DISPATCH(), (target, reset, format, type, values)); @@ -6433,7 +6433,7 @@ gl_dispatch_stub_362(GLenum target, GLenum pname, GLfloat * params) { __GLXcontext *const gc = __glXGetCurrentContext(); -#ifdef GLX_DIRECT_RENDERING +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) if (gc->driContext) { CALL_GetHistogramParameterfv(GET_DISPATCH(), (target, pname, params)); } else @@ -6504,7 +6504,7 @@ gl_dispatch_stub_363(GLenum target, GLenum pname, GLint * params) { __GLXcontext *const gc = __glXGetCurrentContext(); -#ifdef GLX_DIRECT_RENDERING +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) if (gc->driContext) { CALL_GetHistogramParameteriv(GET_DISPATCH(), (target, pname, params)); } else @@ -6579,7 +6579,7 @@ gl_dispatch_stub_364(GLenum target, GLboolean reset, GLenum format, { __GLXcontext *const gc = __glXGetCurrentContext(); -#ifdef GLX_DIRECT_RENDERING +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) if (gc->driContext) { CALL_GetMinmax(GET_DISPATCH(), (target, reset, format, type, values)); } else @@ -6653,7 +6653,7 @@ gl_dispatch_stub_365(GLenum target, GLenum pname, GLfloat * params) { __GLXcontext *const gc = __glXGetCurrentContext(); -#ifdef GLX_DIRECT_RENDERING +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) if (gc->driContext) { CALL_GetMinmaxParameterfv(GET_DISPATCH(), (target, pname, params)); } else @@ -6721,7 +6721,7 @@ gl_dispatch_stub_366(GLenum target, GLenum pname, GLint * params) { __GLXcontext *const gc = __glXGetCurrentContext(); -#ifdef GLX_DIRECT_RENDERING +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) if (gc->driContext) { CALL_GetMinmaxParameteriv(GET_DISPATCH(), (target, pname, params)); } else diff --git a/src/glx/indirect_size.c b/src/glx/indirect_size.c index 0c136d26cdd..411a0e42c55 100644 --- a/src/glx/indirect_size.c +++ b/src/glx/indirect_size.c @@ -48,7 +48,7 @@ # endif -#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__APPLE__) +#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(GLX_USE_APPLEGL) # undef HAVE_ALIAS #endif #ifdef HAVE_ALIAS diff --git a/src/glx/singlepix.c b/src/glx/singlepix.c index f5ebf4dfdbf..c4010d79bd0 100644 --- a/src/glx/singlepix.c +++ b/src/glx/singlepix.c @@ -119,7 +119,7 @@ void NAME(_gloffset_GetSeparableFilter) (GLenum target, GLenum format, { __GLXcontext *const gc = __glXGetCurrentContext(); -#ifdef GLX_DIRECT_RENDERING +#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) if (gc->driContext) { CALL_GetSeparableFilter(GET_DISPATCH(), (target, format, type, row, column, span)); diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index 84a2a5fcb3a..ea9e4173916 100644 --- a/src/mesa/drivers/common/meta.c +++ b/src/mesa/drivers/common/meta.c @@ -424,6 +424,7 @@ _mesa_meta_begin(GLcontext *ctx, GLbitfield state) if (state & META_SCISSOR) { save->Scissor = ctx->Scissor; /* struct copy */ + _mesa_set_enable(ctx, GL_SCISSOR_TEST, GL_FALSE); } if (state & META_SHADER) { @@ -1117,8 +1118,10 @@ blitframebuffer_texture(GLcontext *ctx, _mesa_BindTexture(target, texObj->Name); _mesa_TexParameteri(target, GL_TEXTURE_MIN_FILTER, filter); _mesa_TexParameteri(target, GL_TEXTURE_MAG_FILTER, filter); - _mesa_TexParameteri(target, GL_TEXTURE_BASE_LEVEL, srcLevel); - _mesa_TexParameteri(target, GL_TEXTURE_MAX_LEVEL, srcLevel); + if (target != GL_TEXTURE_RECTANGLE_ARB) { + _mesa_TexParameteri(target, GL_TEXTURE_BASE_LEVEL, srcLevel); + _mesa_TexParameteri(target, GL_TEXTURE_MAX_LEVEL, srcLevel); + } _mesa_TexParameteri(target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); _mesa_TexParameteri(target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); _mesa_TexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); @@ -1176,8 +1179,10 @@ blitframebuffer_texture(GLcontext *ctx, */ _mesa_TexParameteri(target, GL_TEXTURE_MIN_FILTER, minFilterSave); _mesa_TexParameteri(target, GL_TEXTURE_MAG_FILTER, magFilterSave); - _mesa_TexParameteri(target, GL_TEXTURE_BASE_LEVEL, baseLevelSave); - _mesa_TexParameteri(target, GL_TEXTURE_MAX_LEVEL, maxLevelSave); + if (target != GL_TEXTURE_RECTANGLE_ARB) { + _mesa_TexParameteri(target, GL_TEXTURE_BASE_LEVEL, baseLevelSave); + _mesa_TexParameteri(target, GL_TEXTURE_MAX_LEVEL, maxLevelSave); + } _mesa_TexParameteri(target, GL_TEXTURE_WRAP_S, wrapSSave); _mesa_TexParameteri(target, GL_TEXTURE_WRAP_T, wrapTSave); diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c index e08005f90b9..360c5247548 100644 --- a/src/mesa/drivers/dri/common/dri_util.c +++ b/src/mesa/drivers/dri/common/dri_util.c @@ -31,6 +31,16 @@ #include "dri_util.h" #include "drm_sarea.h" #include "utils.h" +#include "xmlpool.h" + +PUBLIC const char __dri2ConfigOptions[] = + DRI_CONF_BEGIN + DRI_CONF_SECTION_PERFORMANCE + DRI_CONF_VBLANK_MODE(DRI_CONF_VBLANK_DEF_INTERVAL_1) + DRI_CONF_SECTION_END + DRI_CONF_END; + +static const uint __dri2NConfigOptions = 1; #ifndef GLX_OML_sync_control typedef GLboolean ( * PFNGLXGETMSCRATEOMLPROC) (__DRIdrawable *drawable, int32_t *numerator, int32_t *denominator); @@ -143,19 +153,24 @@ static int driBindContext(__DRIcontext *pcp, { __DRIscreen *psp = NULL; - /* Bind the drawable to the context */ + /* + ** Assume error checking is done properly in glXMakeCurrent before + ** calling driUnbindContext. + */ - if (pcp) { - psp = pcp->driScreenPriv; - pcp->driDrawablePriv = pdp; - pcp->driReadablePriv = prp; - if (pdp) { - pdp->driContextPriv = pcp; - dri_get_drawable(pdp); - } - if ( prp && pdp != prp ) { - dri_get_drawable(prp); - } + if (!pcp) + return GL_FALSE; + + /* Bind the drawable to the context */ + psp = pcp->driScreenPriv; + pcp->driDrawablePriv = pdp; + pcp->driReadablePriv = prp; + if (pdp) { + pdp->driContextPriv = pcp; + dri_get_drawable(pdp); + } + if (prp && pdp != prp) { + dri_get_drawable(prp); } /* @@ -163,7 +178,6 @@ static int driBindContext(__DRIcontext *pcp, ** initialize the drawable information if has not been done before. */ - assert(psp); if (!psp->dri2.enabled) { if (pdp && !pdp->pStamp) { DRM_SPINLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID); @@ -178,7 +192,6 @@ static int driBindContext(__DRIcontext *pcp, } /* Call device-specific MakeCurrent */ - return (*psp->DriverAPI.MakeCurrent)(pcp, pdp, prp); } @@ -467,6 +480,41 @@ dri2CreateNewDrawable(__DRIscreen *screen, return pdraw; } +static int +dri2ConfigQueryb(__DRIscreen *screen, const char *var, GLboolean *val) +{ + if (!driCheckOption(&screen->optionCache, var, DRI_BOOL)) + return -1; + + *val = driQueryOptionb(&screen->optionCache, var); + + return 0; +} + +static int +dri2ConfigQueryi(__DRIscreen *screen, const char *var, GLint *val) +{ + if (!driCheckOption(&screen->optionCache, var, DRI_INT) && + !driCheckOption(&screen->optionCache, var, DRI_ENUM)) + return -1; + + *val = driQueryOptioni(&screen->optionCache, var); + + return 0; +} + +static int +dri2ConfigQueryf(__DRIscreen *screen, const char *var, GLfloat *val) +{ + if (!driCheckOption(&screen->optionCache, var, DRI_FLOAT)) + return -1; + + *val = driQueryOptionf(&screen->optionCache, var); + + return 0; +} + + static void dri_get_drawable(__DRIdrawable *pdp) { pdp->refcount++; @@ -788,6 +836,7 @@ dri2CreateNewScreen(int scrn, int fd, static const __DRIextension *emptyExtensionList[] = { NULL }; __DRIscreen *psp; drmVersionPtr version; + driOptionCache options; if (driDriverAPI.InitScreen2 == NULL) return NULL; @@ -821,6 +870,9 @@ dri2CreateNewScreen(int scrn, int fd, psp->DriverAPI = driDriverAPI; + driParseOptionInfo(&options, __dri2ConfigOptions, __dri2NConfigOptions); + driParseConfigFiles(&psp->optionCache, &options, psp->myNum, "dri2"); + return psp; } @@ -865,6 +917,13 @@ const __DRIdri2Extension driDRI2Extension = { dri2CreateNewContextForAPI }; +const __DRI2configQueryExtension dri2ConfigQueryExtension = { + { __DRI2_CONFIG_QUERY, __DRI2_CONFIG_QUERY_VERSION }, + dri2ConfigQueryb, + dri2ConfigQueryi, + dri2ConfigQueryf, +}; + static int driFrameTracking(__DRIdrawable *drawable, GLboolean enable) { diff --git a/src/mesa/drivers/dri/common/dri_util.h b/src/mesa/drivers/dri/common/dri_util.h index 4b7cd414b8f..ab6c6e57afc 100644 --- a/src/mesa/drivers/dri/common/dri_util.h +++ b/src/mesa/drivers/dri/common/dri_util.h @@ -51,6 +51,7 @@ #include <drm.h> #include <drm_sarea.h> #include <xf86drm.h> +#include "xmlconfig.h" #include "main/glheader.h" #include "main/mtypes.h" #include "GL/internal/glcore.h" @@ -71,6 +72,7 @@ extern const __DRIcopySubBufferExtension driCopySubBufferExtension; extern const __DRIswapControlExtension driSwapControlExtension; extern const __DRIframeTrackingExtension driFrameTrackingExtension; extern const __DRImediaStreamCounterExtension driMediaStreamCounterExtension; +extern const __DRI2configQueryExtension dri2ConfigQueryExtension; /** * Used by DRI_VALIDATE_DRAWABLE_INFO @@ -530,6 +532,7 @@ struct __DRIscreenRec { /* The lock actually in use, old sarea or DRI2 */ drmLock *lock; + driOptionCache optionCache; unsigned int api_mask; }; diff --git a/src/mesa/drivers/dri/i915/i915_fragprog.c b/src/mesa/drivers/dri/i915/i915_fragprog.c index 9f12e2c632e..e60157f3777 100644 --- a/src/mesa/drivers/dri/i915/i915_fragprog.c +++ b/src/mesa/drivers/dri/i915/i915_fragprog.c @@ -359,9 +359,10 @@ upload_program(struct i915_fragment_program *p) } if (program->Base.NumInstructions > I915_MAX_INSN) { - i915_program_error( p, "Exceeded max instructions" ); - return; - } + i915_program_error(p, "Exceeded max instructions (%d out of %d)", + program->Base.NumInstructions, I915_MAX_INSN); + return; + } /* Not always needed: */ @@ -1099,12 +1100,23 @@ translate_program(struct i915_fragment_program *p) { struct i915_context *i915 = I915_CONTEXT(p->ctx); + if (INTEL_DEBUG & DEBUG_WM) { + printf("fp:\n"); + _mesa_print_program(&p->ctx->FragmentProgram._Current->Base); + printf("\n"); + } + i915_init_program(i915, p); check_wpos(p); upload_program(p); fixup_depth_write(p); i915_fini_program(p); + if (INTEL_DEBUG & DEBUG_WM) { + printf("i915:\n"); + i915_disassemble_program(i915->state.Program, i915->state.ProgramSize); + } + p->translated = 1; } diff --git a/src/mesa/drivers/dri/i915/i915_program.c b/src/mesa/drivers/dri/i915/i915_program.c index 3902c690970..670c7137850 100644 --- a/src/mesa/drivers/dri/i915/i915_program.c +++ b/src/mesa/drivers/dri/i915/i915_program.c @@ -494,17 +494,25 @@ i915_fini_program(struct i915_fragment_program *p) GLuint program_size = p->csr - p->program; GLuint decl_size = p->decl - p->declarations; - if (p->nr_tex_indirect > I915_MAX_TEX_INDIRECT) - i915_program_error(p, "Exceeded max nr indirect texture lookups"); + if (p->nr_tex_indirect > I915_MAX_TEX_INDIRECT) { + i915_program_error(p, "Exceeded max nr indirect texture lookups " + "(%d out of %d)", + p->nr_tex_indirect, I915_MAX_TEX_INDIRECT); + } - if (p->nr_tex_insn > I915_MAX_TEX_INSN) - i915_program_error(p, "Exceeded max TEX instructions"); + if (p->nr_tex_insn > I915_MAX_TEX_INSN) { + i915_program_error(p, "Exceeded max TEX instructions (%d out of %d)", + p->nr_tex_insn, I915_MAX_TEX_INSN); + } if (p->nr_alu_insn > I915_MAX_ALU_INSN) - i915_program_error(p, "Exceeded max ALU instructions"); + i915_program_error(p, "Exceeded max ALU instructions (%d out of %d)", + p->nr_alu_insn, I915_MAX_ALU_INSN); - if (p->nr_decl_insn > I915_MAX_DECL_INSN) - i915_program_error(p, "Exceeded max DECL instructions"); + if (p->nr_decl_insn > I915_MAX_DECL_INSN) { + i915_program_error(p, "Exceeded max DECL instructions (%d out of %d)", + p->nr_decl_insn, I915_MAX_DECL_INSN); + } if (p->error) { p->FragProg.Base.NumNativeInstructions = 0; diff --git a/src/mesa/drivers/dri/i915/i915_tex_layout.c b/src/mesa/drivers/dri/i915/i915_tex_layout.c index af9c7ee9b6f..6e4512129cd 100644 --- a/src/mesa/drivers/dri/i915/i915_tex_layout.c +++ b/src/mesa/drivers/dri/i915/i915_tex_layout.c @@ -483,7 +483,7 @@ i945_miptree_layout(struct intel_context *intel, struct intel_mipmap_tree * mt, case GL_TEXTURE_1D: case GL_TEXTURE_2D: case GL_TEXTURE_RECTANGLE_ARB: - i945_miptree_layout_2d(intel, mt, tiling); + i945_miptree_layout_2d(intel, mt, tiling, 1); break; default: _mesa_problem(NULL, "Unexpected tex target in i945_miptree_layout()"); diff --git a/src/mesa/drivers/dri/i965/brw_program.c b/src/mesa/drivers/dri/i965/brw_program.c index 1fd957b3ad6..41a1f438df4 100644 --- a/src/mesa/drivers/dri/i965/brw_program.c +++ b/src/mesa/drivers/dri/i965/brw_program.c @@ -34,6 +34,7 @@ #include "shader/prog_parameter.h" #include "shader/program.h" #include "shader/programopt.h" +#include "shader/shader_api.h" #include "tnl/tnl.h" #include "brw_context.h" @@ -119,12 +120,28 @@ static GLboolean brwIsProgramNative( GLcontext *ctx, return GL_TRUE; } +static void +shader_error(GLcontext *ctx, struct gl_program *prog, const char *msg) +{ + struct gl_shader_program *shader; + + shader = _mesa_lookup_shader_program(ctx, prog->Id); + + if (shader) { + if (shader->InfoLog) { + free(shader->InfoLog); + } + shader->InfoLog = _mesa_strdup(msg); + shader->LinkStatus = GL_FALSE; + } +} static GLboolean brwProgramStringNotify( GLcontext *ctx, GLenum target, struct gl_program *prog ) { struct brw_context *brw = brw_context(ctx); + int i; if (target == GL_FRAGMENT_PROGRAM_ARB) { struct gl_fragment_program *fprog = (struct gl_fragment_program *) prog; @@ -160,7 +177,22 @@ static GLboolean brwProgramStringNotify( GLcontext *ctx, _tnl_program_string(ctx, target, prog); } - /* XXX check if program is legal, within limits */ + /* Reject programs with subroutines, which are totally broken at the moment + * (all program flows return when any program flow returns, and + * the VS also hangs if a function call calls a function. + * + * See piglit glsl-{vs,fs}-functions-[23] tests. + */ + for (i = 0; i < prog->NumInstructions; i++) { + if (prog->Instructions[i].Opcode == OPCODE_CAL) { + shader_error(ctx, prog, + "i965 driver doesn't yet support uninlined function " + "calls. Move to using a single return statement at " + "the end of the function to work around it."); + return GL_FALSE; + } + } + return GL_TRUE; } diff --git a/src/mesa/drivers/dri/i965/brw_sf_state.c b/src/mesa/drivers/dri/i965/brw_sf_state.c index 9712c31afea..1a6c8218fd1 100644 --- a/src/mesa/drivers/dri/i965/brw_sf_state.c +++ b/src/mesa/drivers/dri/i965/brw_sf_state.c @@ -76,7 +76,20 @@ static void upload_sf_vp(struct brw_context *brw) * Note that the hardware's coordinates are inclusive, while Mesa's min is * inclusive but max is exclusive. */ - if (render_to_fbo) { + + if (ctx->DrawBuffer->_Xmin == ctx->DrawBuffer->_Xmax || + ctx->DrawBuffer->_Ymin == ctx->DrawBuffer->_Ymax) { + /* If the scissor was out of bounds and got clamped to 0 + * width/height at the bounds, the subtraction of 1 from + * maximums could produce a negative number and thus not clip + * anything. Instead, just provide a min > max scissor inside + * the bounds, which produces the expected no rendering. + */ + sfv.scissor.xmin = 1; + sfv.scissor.xmax = 0; + sfv.scissor.ymin = 1; + sfv.scissor.ymax = 0; + } else if (render_to_fbo) { /* texmemory: Y=0=bottom */ sfv.scissor.xmin = ctx->DrawBuffer->_Xmin; sfv.scissor.xmax = ctx->DrawBuffer->_Xmax - 1; diff --git a/src/mesa/drivers/dri/i965/brw_tex_layout.c b/src/mesa/drivers/dri/i965/brw_tex_layout.c index 9a215ab8a4d..768ccfd79c4 100644 --- a/src/mesa/drivers/dri/i965/brw_tex_layout.c +++ b/src/mesa/drivers/dri/i965/brw_tex_layout.c @@ -49,74 +49,30 @@ GLboolean brw_miptree_layout(struct intel_context *intel, switch (mt->target) { case GL_TEXTURE_CUBE_MAP: if (intel->gen == 5) { - GLuint align_h = 2, align_w = 4; + GLuint align_h = 2; GLuint level; - GLuint x = 0; - GLuint y = 0; - GLuint width = mt->width0; - GLuint height = mt->height0; GLuint qpitch = 0; - GLuint y_pitch = 0; + int h0, h1, q; - mt->total_width = mt->width0; - intel_get_texture_alignment_unit(mt->internal_format, &align_w, &align_h); - y_pitch = ALIGN(height, align_h); + /* On Ironlake, cube maps are finally represented as just a series + * of MIPLAYOUT_BELOW 2D textures (like 2D texture arrays), separated + * by a pitch of qpitch rows, where qpitch is defined by the equation + * given in Volume 1 of the BSpec. + */ + h0 = ALIGN(mt->height0, align_h); + h1 = ALIGN(minify(h0), align_h); + qpitch = (h0 + h1 + 11 * align_h); + if (mt->compressed) + qpitch /= 4; - if (mt->compressed) { - mt->total_width = ALIGN(mt->width0, align_w); - } - - if (mt->first_level != mt->last_level) { - GLuint mip1_width; - - if (mt->compressed) { - mip1_width = ALIGN(minify(mt->width0), align_w) - + ALIGN(minify(minify(mt->width0)), align_w); - } else { - mip1_width = ALIGN(minify(mt->width0), align_w) - + minify(minify(mt->width0)); - } - - if (mip1_width > mt->total_width) { - mt->total_width = mip1_width; - } - } - - if (mt->compressed) { - qpitch = (y_pitch + ALIGN(minify(y_pitch), align_h) + 11 * align_h) / 4; - mt->total_height = (y_pitch + ALIGN(minify(y_pitch), align_h) + 11 * align_h) / 4 * 6; - } else { - qpitch = (y_pitch + ALIGN(minify(y_pitch), align_h) + 11 * align_h); - mt->total_height = (y_pitch + ALIGN(minify(y_pitch), align_h) + 11 * align_h) * 6; - } + i945_miptree_layout_2d(intel, mt, tiling, 6); for (level = mt->first_level; level <= mt->last_level; level++) { - GLuint img_height; - GLuint nr_images = 6; - GLuint q = 0; - - intel_miptree_set_level_info(mt, level, nr_images, x, y, width, - height, 1); - - for (q = 0; q < nr_images; q++) - intel_miptree_set_image_offset(mt, level, q, - x, y + q * qpitch); - - if (mt->compressed) - img_height = MAX2(1, height/4); - else - img_height = ALIGN(height, align_h); - - if (level == mt->first_level + 1) { - x += ALIGN(width, align_w); - } - else { - y += img_height; - } - - width = minify(width); - height = minify(height); + for (q = 0; q < 6; q++) { + intel_miptree_set_image_offset(mt, level, q, 0, q * qpitch); + } } + mt->total_height = qpitch * 6; break; } @@ -206,7 +162,7 @@ GLboolean brw_miptree_layout(struct intel_context *intel, } default: - i945_miptree_layout_2d(intel, mt, tiling); + i945_miptree_layout_2d(intel, mt, tiling, 1); break; } DBG("%s: %dx%dx%d\n", __FUNCTION__, diff --git a/src/mesa/drivers/dri/i965/brw_vs_emit.c b/src/mesa/drivers/dri/i965/brw_vs_emit.c index eeb3f366a41..dc6ab81c4ac 100644 --- a/src/mesa/drivers/dri/i965/brw_vs_emit.c +++ b/src/mesa/drivers/dri/i965/brw_vs_emit.c @@ -37,6 +37,43 @@ #include "brw_context.h" #include "brw_vs.h" +/* Return the SrcReg index of the channels that can be immediate float operands + * instead of usage of PROGRAM_CONSTANT values through push/pull. + */ +static GLboolean +brw_vs_arg_can_be_immediate(enum prog_opcode opcode, int arg) +{ + int opcode_array[] = { + [OPCODE_ADD] = 2, + [OPCODE_CMP] = 3, + [OPCODE_DP3] = 2, + [OPCODE_DP4] = 2, + [OPCODE_DPH] = 2, + [OPCODE_MAX] = 2, + [OPCODE_MIN] = 2, + [OPCODE_MUL] = 2, + [OPCODE_SEQ] = 2, + [OPCODE_SGE] = 2, + [OPCODE_SGT] = 2, + [OPCODE_SLE] = 2, + [OPCODE_SLT] = 2, + [OPCODE_SNE] = 2, + [OPCODE_XPD] = 2, + }; + + /* These opcodes get broken down in a way that allow two + * args to be immediates. + */ + if (opcode == OPCODE_MAD || opcode == OPCODE_LRP) { + if (arg == 1 || arg == 2) + return GL_TRUE; + } + + if (opcode > ARRAY_SIZE(opcode_array)) + return GL_FALSE; + + return arg == opcode_array[opcode] - 1; +} static struct brw_reg get_tmp( struct brw_vs_compile *c ) { @@ -453,8 +490,8 @@ static void emit_max( struct brw_compile *p, struct brw_reg arg0, struct brw_reg arg1 ) { - brw_CMP(p, brw_null_reg(), BRW_CONDITIONAL_L, arg0, arg1); - brw_SEL(p, dst, arg1, arg0); + brw_CMP(p, brw_null_reg(), BRW_CONDITIONAL_GE, arg0, arg1); + brw_SEL(p, dst, arg0, arg1); brw_set_predicate_control(p, BRW_PREDICATE_NONE); } @@ -983,6 +1020,55 @@ get_src_reg( struct brw_vs_compile *c, const GLint index = inst->SrcReg[argIndex].Index; const GLboolean relAddr = inst->SrcReg[argIndex].RelAddr; + if (brw_vs_arg_can_be_immediate(inst->Opcode, argIndex)) { + const struct prog_src_register *src = &inst->SrcReg[argIndex]; + + if (src->Swizzle == MAKE_SWIZZLE4(SWIZZLE_ZERO, + SWIZZLE_ZERO, + SWIZZLE_ZERO, + SWIZZLE_ZERO)) { + return brw_imm_f(0.0f); + } else if (src->Swizzle == MAKE_SWIZZLE4(SWIZZLE_ONE, + SWIZZLE_ONE, + SWIZZLE_ONE, + SWIZZLE_ONE)) { + if (src->Negate) + return brw_imm_f(-1.0F); + else + return brw_imm_f(1.0F); + } else if (src->File == PROGRAM_CONSTANT) { + const struct gl_program_parameter_list *params; + float f; + int component = -1; + + switch (src->Swizzle) { + case SWIZZLE_XXXX: + component = 0; + break; + case SWIZZLE_YYYY: + component = 1; + break; + case SWIZZLE_ZZZZ: + component = 2; + break; + case SWIZZLE_WWWW: + component = 3; + break; + } + + if (component >= 0) { + params = c->vp->program.Base.Parameters; + f = params->ParameterValues[src->Index][component]; + + if (src->Abs) + f = fabs(f); + if (src->Negate) + f = -f; + return brw_imm_f(f); + } + } + } + switch (file) { case PROGRAM_TEMPORARY: case PROGRAM_INPUT: diff --git a/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c b/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c index d7650af3d9d..1582ff1ab65 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c @@ -228,6 +228,8 @@ brw_wm_sampler_populate_key(struct brw_context *brw, { GLcontext *ctx = &brw->intel.ctx; int unit; + char *last_entry_end = ((char*)&key->sampler_count) + + sizeof(key->sampler_count); key->sampler_count = 0; @@ -240,7 +242,9 @@ brw_wm_sampler_populate_key(struct brw_context *brw, struct gl_texture_image *firstImage = texObj->Image[0][intelObj->firstLevel]; - memset(entry, 0, sizeof(*entry)); + memset(last_entry_end, 0, + (char*)entry - last_entry_end + sizeof(*entry)); + last_entry_end = ((char*)entry) + sizeof(*entry); entry->tex_target = texObj->Target; @@ -280,6 +284,8 @@ brw_wm_sampler_populate_key(struct brw_context *brw, key->sampler_count = unit + 1; } } + struct wm_sampler_entry *entry = &key->sampler[key->sampler_count]; + memset(last_entry_end, 0, (char*)entry - last_entry_end); } /* All samplers must be uploaded in a single contiguous array, which diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c index 6b9e5668862..e51a1a0e26a 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c @@ -588,7 +588,7 @@ brw_update_renderbuffer_surface(struct brw_context *brw, tile_base = ((key.draw_y / 32) * (32 * pitch)); tile_base += (key.draw_x - tile_x) / (128 / key.cpp) * 4096; } - assert(intel->is_g4x || (tile_x == 0 && tile_y == 0)); + assert(brw->has_surface_tile_offset || (tile_x == 0 && tile_y == 0)); assert(tile_x % 4 == 0); assert(tile_y % 2 == 0); /* Note that the low bits of these fields are missing, so diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c index 2b54cda66d1..3aed253e240 100644 --- a/src/mesa/drivers/dri/intel/intel_screen.c +++ b/src/mesa/drivers/dri/intel/intel_screen.c @@ -225,6 +225,7 @@ static const __DRIextension *intelScreenExtensions[] = { &intelTexBufferExtension.base, &intelFlushExtension.base, &intelImageExtension.base, + &dri2ConfigQueryExtension.base, NULL }; diff --git a/src/mesa/drivers/dri/intel/intel_tex_layout.c b/src/mesa/drivers/dri/intel/intel_tex_layout.c index d132e19e831..d39733b6c5a 100644 --- a/src/mesa/drivers/dri/intel/intel_tex_layout.c +++ b/src/mesa/drivers/dri/intel/intel_tex_layout.c @@ -63,9 +63,9 @@ void intel_get_texture_alignment_unit(GLenum internalFormat, GLuint *w, GLuint * } } -void i945_miptree_layout_2d( struct intel_context *intel, - struct intel_mipmap_tree *mt, - uint32_t tiling ) +void i945_miptree_layout_2d(struct intel_context *intel, + struct intel_mipmap_tree *mt, + uint32_t tiling, int nr_images) { GLuint align_h = 2, align_w = 4; GLuint level; @@ -107,7 +107,7 @@ void i945_miptree_layout_2d( struct intel_context *intel, for ( level = mt->first_level ; level <= mt->last_level ; level++ ) { GLuint img_height; - intel_miptree_set_level_info(mt, level, 1, x, y, width, + intel_miptree_set_level_info(mt, level, nr_images, x, y, width, height, 1); if (mt->compressed) diff --git a/src/mesa/drivers/dri/intel/intel_tex_layout.h b/src/mesa/drivers/dri/intel/intel_tex_layout.h index a9ac9e7eb48..1c8c53e5459 100644 --- a/src/mesa/drivers/dri/intel/intel_tex_layout.h +++ b/src/mesa/drivers/dri/intel/intel_tex_layout.h @@ -40,5 +40,5 @@ static INLINE GLuint minify( GLuint d ) extern void i945_miptree_layout_2d(struct intel_context *intel, struct intel_mipmap_tree *mt, - uint32_t tiling); + uint32_t tiling, int nr_images); extern void intel_get_texture_alignment_unit(GLenum, GLuint *, GLuint *); diff --git a/src/mesa/drivers/dri/nouveau/nouveau_screen.c b/src/mesa/drivers/dri/nouveau/nouveau_screen.c index 18db12f6261..78987f633cc 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_screen.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_screen.c @@ -236,6 +236,7 @@ static const struct __DRItexBufferExtensionRec nouveau_texbuffer_extension = { static const __DRIextension *nouveau_screen_extensions[] = { &nouveau_flush_extension.base, &nouveau_texbuffer_extension.base, + &dri2ConfigQueryExtension.base, NULL }; diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c index 02ba300eb02..fa33be49989 100644 --- a/src/mesa/drivers/dri/r300/r300_state.c +++ b/src/mesa/drivers/dri/r300/r300_state.c @@ -1658,20 +1658,21 @@ void r300VapCntl(r300ContextPtr rmesa, GLuint input_count, (5 << R300_PVS_NUM_CNTLRS_SHIFT) | (5 << R300_VF_MAX_VTX_NUM_SHIFT)); - if (rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV515) - rmesa->hw.vap_cntl.cmd[R300_VAP_CNTL_INSTR] |= (2 << R300_PVS_NUM_FPUS_SHIFT); - else if ((rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV530) || - (rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV560) || - (rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV570)) + if ((rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_R300) || + (rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_R350)) + rmesa->hw.vap_cntl.cmd[R300_VAP_CNTL_INSTR] |= (4 << R300_PVS_NUM_FPUS_SHIFT); + else if (rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV530) rmesa->hw.vap_cntl.cmd[R300_VAP_CNTL_INSTR] |= (5 << R300_PVS_NUM_FPUS_SHIFT); else if ((rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV410) || (rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_R420)) rmesa->hw.vap_cntl.cmd[R300_VAP_CNTL_INSTR] |= (6 << R300_PVS_NUM_FPUS_SHIFT); else if ((rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_R520) || - (rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_R580)) + (rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_R580) || + (rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV560) || + (rmesa->radeon.radeonScreen->chip_family == CHIP_FAMILY_RV570)) rmesa->hw.vap_cntl.cmd[R300_VAP_CNTL_INSTR] |= (8 << R300_PVS_NUM_FPUS_SHIFT); else - rmesa->hw.vap_cntl.cmd[R300_VAP_CNTL_INSTR] |= (4 << R300_PVS_NUM_FPUS_SHIFT); + rmesa->hw.vap_cntl.cmd[R300_VAP_CNTL_INSTR] |= (2 << R300_PVS_NUM_FPUS_SHIFT); } diff --git a/src/mesa/drivers/dri/r600/r600_blit.c b/src/mesa/drivers/dri/r600/r600_blit.c index 244fdc4ffbb..172f85eb264 100644 --- a/src/mesa/drivers/dri/r600/r600_blit.c +++ b/src/mesa/drivers/dri/r600/r600_blit.c @@ -344,6 +344,10 @@ set_render_target(context_t *context, struct radeon_bo *bo, gl_format mesa_forma return; } + /* must be 0 on r7xx */ + if (context->radeon.radeonScreen->chip_family >= CHIP_FAMILY_RV770) + CLEARbit(cb_color0_info, BLEND_FLOAT32_bit); + SETfield(cb_color0_info, format, CB_COLOR0_INFO__FORMAT_shift, CB_COLOR0_INFO__FORMAT_mask); SETfield(cb_color0_info, comp_swap, COMP_SWAP_shift, COMP_SWAP_mask); diff --git a/src/mesa/drivers/dri/r600/r600_context.c b/src/mesa/drivers/dri/r600/r600_context.c index 9f8923f09dc..f4aed4e87fd 100644 --- a/src/mesa/drivers/dri/r600/r600_context.c +++ b/src/mesa/drivers/dri/r600/r600_context.c @@ -239,7 +239,7 @@ static void r600_init_vtbl(radeonContextPtr radeon) radeon->vtbl.emit_query_finish = r600_emit_query_finish; radeon->vtbl.check_blit = r600_check_blit; radeon->vtbl.blit = r600_blit; - radeon->vtbl.is_format_renderable = radeonIsFormatRenderable; + radeon->vtbl.is_format_renderable = r600IsFormatRenderable; } static void r600InitConstValues(GLcontext *ctx, radeonScreenPtr screen) diff --git a/src/mesa/drivers/dri/r600/r600_tex.c b/src/mesa/drivers/dri/r600/r600_tex.c index 36a6e6e0a11..41419f84601 100644 --- a/src/mesa/drivers/dri/r600/r600_tex.c +++ b/src/mesa/drivers/dri/r600/r600_tex.c @@ -392,6 +392,54 @@ static struct gl_texture_object *r600NewTextureObject(GLcontext * ctx, return &t->base; } +unsigned r600IsFormatRenderable(gl_format mesa_format) +{ + switch (mesa_format) { + case MESA_FORMAT_RGBA8888: + case MESA_FORMAT_SIGNED_RGBA8888: + case MESA_FORMAT_RGBA8888_REV: + case MESA_FORMAT_SIGNED_RGBA8888_REV: + case MESA_FORMAT_ARGB8888: + case MESA_FORMAT_XRGB8888: + case MESA_FORMAT_ARGB8888_REV: + case MESA_FORMAT_XRGB8888_REV: + case MESA_FORMAT_RGB565: + case MESA_FORMAT_RGB565_REV: + case MESA_FORMAT_ARGB4444: + case MESA_FORMAT_ARGB4444_REV: + case MESA_FORMAT_ARGB1555: + case MESA_FORMAT_ARGB1555_REV: + case MESA_FORMAT_AL88: + case MESA_FORMAT_AL88_REV: + case MESA_FORMAT_RGB332: + case MESA_FORMAT_A8: + case MESA_FORMAT_I8: + case MESA_FORMAT_CI8: + case MESA_FORMAT_L8: + case MESA_FORMAT_RGBA_FLOAT32: + case MESA_FORMAT_RGBA_FLOAT16: + case MESA_FORMAT_ALPHA_FLOAT32: + case MESA_FORMAT_ALPHA_FLOAT16: + case MESA_FORMAT_LUMINANCE_FLOAT32: + case MESA_FORMAT_LUMINANCE_FLOAT16: + case MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32: + case MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16: + case MESA_FORMAT_INTENSITY_FLOAT32: /* X, X, X, X */ + case MESA_FORMAT_INTENSITY_FLOAT16: /* X, X, X, X */ + case MESA_FORMAT_X8_Z24: + case MESA_FORMAT_S8_Z24: + case MESA_FORMAT_Z24_S8: + case MESA_FORMAT_Z16: + case MESA_FORMAT_Z32: + case MESA_FORMAT_SRGBA8: + case MESA_FORMAT_SLA8: + case MESA_FORMAT_SL8: + return 1; + default: + return 0; + } +} + void r600InitTextureFuncs(radeonContextPtr radeon, struct dd_function_table *functions) { /* Note: we only plug in the functions we implement in the driver diff --git a/src/mesa/drivers/dri/r600/r600_tex.h b/src/mesa/drivers/dri/r600/r600_tex.h index 1d75a2ecd69..771affdfa60 100644 --- a/src/mesa/drivers/dri/r600/r600_tex.h +++ b/src/mesa/drivers/dri/r600/r600_tex.h @@ -60,4 +60,6 @@ extern GLboolean r600ValidateBuffers(GLcontext * ctx); extern void r600InitTextureFuncs(radeonContextPtr radeon, struct dd_function_table *functions); +unsigned r600IsFormatRenderable(gl_format mesa_format); + #endif /* __r600_TEX_H__ */ diff --git a/src/mesa/drivers/dri/r600/r700_assembler.c b/src/mesa/drivers/dri/r600/r700_assembler.c index 834bcc63e31..0677c54bea1 100644 --- a/src/mesa/drivers/dri/r600/r700_assembler.c +++ b/src/mesa/drivers/dri/r600/r700_assembler.c @@ -6511,13 +6511,30 @@ GLboolean Process_Vertex_Exports(r700_AssemblerBase *pR700AsmCode, { return GL_FALSE; } + export_starting_index++; + export_count--; + } + unBit = 1 << VERT_RESULT_PSIZ; + if(OutputsWritten & unBit) + { + if( GL_FALSE == Process_Export(pR700AsmCode, + SQ_EXPORT_POS, + export_starting_index, + 1, + pR700AsmCode->ucVP_OutputMap[VERT_RESULT_PSIZ], + GL_FALSE) ) + { + return GL_FALSE; + } export_count--; + } + + pR700AsmCode->cf_last_export_ptr->m_Word1.f.cf_inst = SQ_CF_INST_EXPORT_DONE; - pR700AsmCode->cf_last_export_ptr->m_Word1.f.cf_inst = SQ_CF_INST_EXPORT_DONE; - } pR700AsmCode->number_of_exports = export_count; + export_starting_index = 0; unBit = 1 << VERT_RESULT_COL0; if(OutputsWritten & unBit) diff --git a/src/mesa/drivers/dri/r600/r700_chip.c b/src/mesa/drivers/dri/r600/r700_chip.c index 63614b160cc..cefda3ac4ba 100644 --- a/src/mesa/drivers/dri/r600/r700_chip.c +++ b/src/mesa/drivers/dri/r600/r700_chip.c @@ -290,7 +290,7 @@ static void r700SendVTXState(GLcontext *ctx, struct radeon_state_atom *atom) static void r700SetRenderTarget(context_t *context, int id) { R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw); - + uint32_t format = COLOR_8_8_8_8, comp_swap = SWAP_ALT, number_type = NUMBER_UNORM; struct radeon_renderbuffer *rrb; unsigned int nPitchInPixel; @@ -312,22 +312,251 @@ static void r700SetRenderTarget(context_t *context, int id) SETfield(r700->render_target[id].CB_COLOR0_INFO.u32All, ENDIAN_NONE, ENDIAN_shift, ENDIAN_mask); SETfield(r700->render_target[id].CB_COLOR0_INFO.u32All, ARRAY_LINEAR_GENERAL, CB_COLOR0_INFO__ARRAY_MODE_shift, CB_COLOR0_INFO__ARRAY_MODE_mask); - if(4 == rrb->cpp) - { - SETfield(r700->render_target[id].CB_COLOR0_INFO.u32All, COLOR_8_8_8_8, - CB_COLOR0_INFO__FORMAT_shift, CB_COLOR0_INFO__FORMAT_mask); - SETfield(r700->render_target[id].CB_COLOR0_INFO.u32All, SWAP_ALT, COMP_SWAP_shift, COMP_SWAP_mask); - } - else - { - SETfield(r700->render_target[id].CB_COLOR0_INFO.u32All, COLOR_5_6_5, - CB_COLOR0_INFO__FORMAT_shift, CB_COLOR0_INFO__FORMAT_mask); - SETfield(r700->render_target[id].CB_COLOR0_INFO.u32All, SWAP_ALT_REV, - COMP_SWAP_shift, COMP_SWAP_mask); + + switch (rrb->base.Format) { + case MESA_FORMAT_RGBA8888: + format = COLOR_8_8_8_8; + comp_swap = SWAP_STD_REV; + number_type = NUMBER_UNORM; + SETbit(r700->render_target[id].CB_COLOR0_INFO.u32All, SOURCE_FORMAT_bit); + break; + case MESA_FORMAT_SIGNED_RGBA8888: + format = COLOR_8_8_8_8; + comp_swap = SWAP_STD_REV; + number_type = NUMBER_SNORM; + SETbit(r700->render_target[id].CB_COLOR0_INFO.u32All, SOURCE_FORMAT_bit); + break; + case MESA_FORMAT_RGBA8888_REV: + format = COLOR_8_8_8_8; + comp_swap = SWAP_STD; + number_type = NUMBER_UNORM; + SETbit(r700->render_target[id].CB_COLOR0_INFO.u32All, SOURCE_FORMAT_bit); + break; + case MESA_FORMAT_SIGNED_RGBA8888_REV: + format = COLOR_8_8_8_8; + comp_swap = SWAP_STD; + number_type = NUMBER_SNORM; + SETbit(r700->render_target[id].CB_COLOR0_INFO.u32All, SOURCE_FORMAT_bit); + break; + case MESA_FORMAT_ARGB8888: + case MESA_FORMAT_XRGB8888: + format = COLOR_8_8_8_8; + comp_swap = SWAP_ALT; + number_type = NUMBER_UNORM; + SETbit(r700->render_target[id].CB_COLOR0_INFO.u32All, SOURCE_FORMAT_bit); + break; + case MESA_FORMAT_ARGB8888_REV: + case MESA_FORMAT_XRGB8888_REV: + format = COLOR_8_8_8_8; + comp_swap = SWAP_ALT_REV; + number_type = NUMBER_UNORM; + SETbit(r700->render_target[id].CB_COLOR0_INFO.u32All, SOURCE_FORMAT_bit); + break; + case MESA_FORMAT_RGB565: + format = COLOR_5_6_5; + comp_swap = SWAP_STD_REV; + number_type = NUMBER_UNORM; + SETbit(r700->render_target[id].CB_COLOR0_INFO.u32All, SOURCE_FORMAT_bit); + break; + case MESA_FORMAT_RGB565_REV: + format = COLOR_5_6_5; + comp_swap = SWAP_STD; + number_type = NUMBER_UNORM; + SETbit(r700->render_target[id].CB_COLOR0_INFO.u32All, SOURCE_FORMAT_bit); + break; + case MESA_FORMAT_ARGB4444: + format = COLOR_4_4_4_4; + comp_swap = SWAP_ALT; + number_type = NUMBER_UNORM; + SETbit(r700->render_target[id].CB_COLOR0_INFO.u32All, SOURCE_FORMAT_bit); + break; + case MESA_FORMAT_ARGB4444_REV: + format = COLOR_4_4_4_4; + comp_swap = SWAP_ALT_REV; + number_type = NUMBER_UNORM; + SETbit(r700->render_target[id].CB_COLOR0_INFO.u32All, SOURCE_FORMAT_bit); + break; + case MESA_FORMAT_ARGB1555: + format = COLOR_1_5_5_5; + comp_swap = SWAP_ALT; + number_type = NUMBER_UNORM; + SETbit(r700->render_target[id].CB_COLOR0_INFO.u32All, SOURCE_FORMAT_bit); + break; + case MESA_FORMAT_ARGB1555_REV: + format = COLOR_1_5_5_5; + comp_swap = SWAP_ALT_REV; + number_type = NUMBER_UNORM; + SETbit(r700->render_target[id].CB_COLOR0_INFO.u32All, SOURCE_FORMAT_bit); + break; + case MESA_FORMAT_AL88: + format = COLOR_8_8; + comp_swap = SWAP_STD; + number_type = NUMBER_UNORM; + SETbit(r700->render_target[id].CB_COLOR0_INFO.u32All, SOURCE_FORMAT_bit); + break; + case MESA_FORMAT_AL88_REV: + format = COLOR_8_8; + comp_swap = SWAP_STD_REV; + number_type = NUMBER_UNORM; + SETbit(r700->render_target[id].CB_COLOR0_INFO.u32All, SOURCE_FORMAT_bit); + break; + case MESA_FORMAT_RGB332: + format = COLOR_3_3_2; + comp_swap = SWAP_STD_REV; + number_type = NUMBER_UNORM; + SETbit(r700->render_target[id].CB_COLOR0_INFO.u32All, SOURCE_FORMAT_bit); + break; + case MESA_FORMAT_A8: + format = COLOR_8; + comp_swap = SWAP_ALT_REV; + number_type = NUMBER_UNORM; + SETbit(r700->render_target[id].CB_COLOR0_INFO.u32All, SOURCE_FORMAT_bit); + break; + case MESA_FORMAT_I8: + case MESA_FORMAT_CI8: + format = COLOR_8; + comp_swap = SWAP_STD; + number_type = NUMBER_UNORM; + SETbit(r700->render_target[id].CB_COLOR0_INFO.u32All, SOURCE_FORMAT_bit); + break; + case MESA_FORMAT_L8: + format = COLOR_8; + comp_swap = SWAP_ALT; + number_type = NUMBER_UNORM; + SETbit(r700->render_target[id].CB_COLOR0_INFO.u32All, SOURCE_FORMAT_bit); + break; + case MESA_FORMAT_RGBA_FLOAT32: + format = COLOR_32_32_32_32_FLOAT; + comp_swap = SWAP_STD_REV; + number_type = NUMBER_FLOAT; + SETbit(r700->render_target[id].CB_COLOR0_INFO.u32All, BLEND_FLOAT32_bit); + CLEARbit(r700->render_target[id].CB_COLOR0_INFO.u32All, SOURCE_FORMAT_bit); + break; + case MESA_FORMAT_RGBA_FLOAT16: + format = COLOR_16_16_16_16_FLOAT; + comp_swap = SWAP_STD_REV; + number_type = NUMBER_FLOAT; + CLEARbit(r700->render_target[id].CB_COLOR0_INFO.u32All, SOURCE_FORMAT_bit); + break; + case MESA_FORMAT_ALPHA_FLOAT32: + format = COLOR_32_FLOAT; + comp_swap = SWAP_ALT_REV; + number_type = NUMBER_FLOAT; + SETbit(r700->render_target[id].CB_COLOR0_INFO.u32All, BLEND_FLOAT32_bit); + CLEARbit(r700->render_target[id].CB_COLOR0_INFO.u32All, SOURCE_FORMAT_bit); + break; + case MESA_FORMAT_ALPHA_FLOAT16: + format = COLOR_16_FLOAT; + comp_swap = SWAP_ALT_REV; + number_type = NUMBER_FLOAT; + CLEARbit(r700->render_target[id].CB_COLOR0_INFO.u32All, SOURCE_FORMAT_bit); + break; + case MESA_FORMAT_LUMINANCE_FLOAT32: + format = COLOR_32_FLOAT; + comp_swap = SWAP_ALT; + number_type = NUMBER_FLOAT; + SETbit(r700->render_target[id].CB_COLOR0_INFO.u32All, BLEND_FLOAT32_bit); + CLEARbit(r700->render_target[id].CB_COLOR0_INFO.u32All, SOURCE_FORMAT_bit); + break; + case MESA_FORMAT_LUMINANCE_FLOAT16: + format = COLOR_16_FLOAT; + comp_swap = SWAP_ALT; + number_type = NUMBER_FLOAT; + CLEARbit(r700->render_target[id].CB_COLOR0_INFO.u32All, SOURCE_FORMAT_bit); + break; + case MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32: + format = COLOR_32_32_FLOAT; + comp_swap = SWAP_ALT_REV; + number_type = NUMBER_FLOAT; + SETbit(r700->render_target[id].CB_COLOR0_INFO.u32All, BLEND_FLOAT32_bit); + CLEARbit(r700->render_target[id].CB_COLOR0_INFO.u32All, SOURCE_FORMAT_bit); + break; + case MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16: + format = COLOR_16_16_FLOAT; + comp_swap = SWAP_ALT_REV; + number_type = NUMBER_FLOAT; + CLEARbit(r700->render_target[id].CB_COLOR0_INFO.u32All, SOURCE_FORMAT_bit); + break; + case MESA_FORMAT_INTENSITY_FLOAT32: /* X, X, X, X */ + format = COLOR_32_FLOAT; + comp_swap = SWAP_STD; + number_type = NUMBER_FLOAT; + SETbit(r700->render_target[id].CB_COLOR0_INFO.u32All, BLEND_FLOAT32_bit); + CLEARbit(r700->render_target[id].CB_COLOR0_INFO.u32All, SOURCE_FORMAT_bit); + break; + case MESA_FORMAT_INTENSITY_FLOAT16: /* X, X, X, X */ + format = COLOR_16_FLOAT; + comp_swap = SWAP_STD; + number_type = NUMBER_UNORM; + CLEARbit(r700->render_target[id].CB_COLOR0_INFO.u32All, SOURCE_FORMAT_bit); + break; + case MESA_FORMAT_X8_Z24: + case MESA_FORMAT_S8_Z24: + format = COLOR_8_24; + comp_swap = SWAP_STD; + number_type = NUMBER_UNORM; + SETfield(r700->render_target[id].CB_COLOR0_INFO.u32All, ARRAY_1D_TILED_THIN1, + CB_COLOR0_INFO__ARRAY_MODE_shift, CB_COLOR0_INFO__ARRAY_MODE_mask); + CLEARbit(r700->render_target[id].CB_COLOR0_INFO.u32All, SOURCE_FORMAT_bit); + break; + case MESA_FORMAT_Z24_S8: + format = COLOR_24_8; + comp_swap = SWAP_STD; + number_type = NUMBER_UNORM; + SETfield(r700->render_target[id].CB_COLOR0_INFO.u32All, ARRAY_1D_TILED_THIN1, + CB_COLOR0_INFO__ARRAY_MODE_shift, CB_COLOR0_INFO__ARRAY_MODE_mask); + CLEARbit(r700->render_target[id].CB_COLOR0_INFO.u32All, SOURCE_FORMAT_bit); + break; + case MESA_FORMAT_Z16: + format = COLOR_16; + comp_swap = SWAP_STD; + number_type = NUMBER_UNORM; + SETfield(r700->render_target[id].CB_COLOR0_INFO.u32All, ARRAY_1D_TILED_THIN1, + CB_COLOR0_INFO__ARRAY_MODE_shift, CB_COLOR0_INFO__ARRAY_MODE_mask); + CLEARbit(r700->render_target[id].CB_COLOR0_INFO.u32All, SOURCE_FORMAT_bit); + break; + case MESA_FORMAT_Z32: + format = COLOR_32; + comp_swap = SWAP_STD; + number_type = NUMBER_UNORM; + SETfield(r700->render_target[id].CB_COLOR0_INFO.u32All, ARRAY_1D_TILED_THIN1, + CB_COLOR0_INFO__ARRAY_MODE_shift, CB_COLOR0_INFO__ARRAY_MODE_mask); + CLEARbit(r700->render_target[id].CB_COLOR0_INFO.u32All, SOURCE_FORMAT_bit); + break; + case MESA_FORMAT_SRGBA8: + format = COLOR_8_8_8_8; + comp_swap = SWAP_STD_REV; + number_type = NUMBER_SRGB; + SETbit(r700->render_target[id].CB_COLOR0_INFO.u32All, SOURCE_FORMAT_bit); + break; + case MESA_FORMAT_SLA8: + format = COLOR_8_8; + comp_swap = SWAP_ALT_REV; + number_type = NUMBER_SRGB; + SETbit(r700->render_target[id].CB_COLOR0_INFO.u32All, SOURCE_FORMAT_bit); + break; + case MESA_FORMAT_SL8: + format = COLOR_8; + comp_swap = SWAP_ALT_REV; + number_type = NUMBER_SRGB; + SETbit(r700->render_target[id].CB_COLOR0_INFO.u32All, SOURCE_FORMAT_bit); + break; + default: + _mesa_problem(context->radeon.glCtx, "unexpected format in r700SetRenderTarget()"); + break; } - SETbit(r700->render_target[id].CB_COLOR0_INFO.u32All, SOURCE_FORMAT_bit); + + /* must be 0 on r7xx */ + if (context->radeon.radeonScreen->chip_family >= CHIP_FAMILY_RV770) + CLEARbit(r700->render_target[id].CB_COLOR0_INFO.u32All, BLEND_FLOAT32_bit); + + SETfield(r700->render_target[id].CB_COLOR0_INFO.u32All, format, + CB_COLOR0_INFO__FORMAT_shift, CB_COLOR0_INFO__FORMAT_mask); + SETfield(r700->render_target[id].CB_COLOR0_INFO.u32All, comp_swap, + COMP_SWAP_shift, COMP_SWAP_mask); + SETfield(r700->render_target[id].CB_COLOR0_INFO.u32All, number_type, + NUMBER_TYPE_shift, NUMBER_TYPE_mask); SETbit(r700->render_target[id].CB_COLOR0_INFO.u32All, BLEND_CLAMP_bit); - SETfield(r700->render_target[id].CB_COLOR0_INFO.u32All, NUMBER_UNORM, NUMBER_TYPE_shift, NUMBER_TYPE_mask); r700->render_target[id].enabled = GL_TRUE; } diff --git a/src/mesa/drivers/dri/r600/r700_fragprog.c b/src/mesa/drivers/dri/r600/r700_fragprog.c index 84d51e66069..ee4d2828cff 100644 --- a/src/mesa/drivers/dri/r600/r700_fragprog.c +++ b/src/mesa/drivers/dri/r600/r700_fragprog.c @@ -560,21 +560,22 @@ GLboolean r700SetupFragmentProgram(GLcontext * ctx) CLEARbit(r700->SPI_PS_IN_CONTROL_1.u32All, FRONT_FACE_ENA_bit); } - /* see if we need any point_sprite replacements */ - for (i = VERT_RESULT_TEX0; i<= VERT_RESULT_TEX7; i++) + /* see if we need any point_sprite replacements, also increase num_interp + * as there's no vp output for them */ + for (i = FRAG_ATTRIB_TEX0; i<= FRAG_ATTRIB_TEX7; i++) { - if(ctx->Point.CoordReplace[i - VERT_RESULT_TEX0] == GL_TRUE) + if(ctx->Point.CoordReplace[i - FRAG_ATTRIB_TEX0] == GL_TRUE) { + ui++; point_sprite = GL_TRUE; + } } + if( mesa_fp->Base.InputsRead & (1 << FRAG_ATTRIB_PNTC)) + ui++; + if ((mesa_fp->Base.InputsRead & (1 << FRAG_ATTRIB_PNTC)) || point_sprite) { - /* for FRAG_ATTRIB_PNTC we need to increase num_interp */ - if(mesa_fp->Base.InputsRead & (1 << FRAG_ATTRIB_PNTC)) - { - ui++; - SETfield(r700->SPI_PS_IN_CONTROL_0.u32All, ui, NUM_INTERP_shift, NUM_INTERP_mask); - } + SETfield(r700->SPI_PS_IN_CONTROL_0.u32All, ui, NUM_INTERP_shift, NUM_INTERP_mask); SETbit(r700->SPI_INTERP_CONTROL_0.u32All, PNT_SPRITE_ENA_bit); SETfield(r700->SPI_INTERP_CONTROL_0.u32All, SPI_PNT_SPRITE_SEL_S, PNT_SPRITE_OVRD_X_shift, PNT_SPRITE_OVRD_X_mask); SETfield(r700->SPI_INTERP_CONTROL_0.u32All, SPI_PNT_SPRITE_SEL_T, PNT_SPRITE_OVRD_Y_shift, PNT_SPRITE_OVRD_Y_mask); @@ -669,7 +670,7 @@ GLboolean r700SetupFragmentProgram(GLcontext * ctx) for(i=0; i<8; i++) { unBit = 1 << (VERT_RESULT_TEX0 + i); - if(OutputsWritten & unBit) + if((OutputsWritten & unBit) || (ctx->Point.CoordReplace[i] == GL_TRUE)) { ui = pAsm->uiFP_AttributeMap[FRAG_ATTRIB_TEX0 + i]; SETbit(r700->SPI_PS_INPUT_CNTL[ui].u32All, SEL_CENTROID_bit); diff --git a/src/mesa/drivers/dri/r600/r700_state.c b/src/mesa/drivers/dri/r600/r700_state.c index 1da31e7b2b4..ac64bbf874f 100644 --- a/src/mesa/drivers/dri/r600/r700_state.c +++ b/src/mesa/drivers/dri/r600/r700_state.c @@ -253,12 +253,15 @@ void r700UpdateShaderStates(GLcontext * ctx) static void r700SetDepthState(GLcontext * ctx) { + struct radeon_renderbuffer *rrb; context_t *context = R700_CONTEXT(ctx); R700_CHIP_CONTEXT *r700 = (R700_CHIP_CONTEXT*)(&context->hw); R600_STATECHANGE(context, db); - if (ctx->Depth.Test) + rrb = radeon_get_depthbuffer(&context->radeon); + + if (ctx->Depth.Test && rrb && rrb->bo) { SETbit(r700->DB_DEPTH_CONTROL.u32All, Z_ENABLE_bit); if (ctx->Depth.Mask) diff --git a/src/mesa/drivers/dri/r600/r700_vertprog.c b/src/mesa/drivers/dri/r600/r700_vertprog.c index 05c65164d60..14dd2a5482c 100644 --- a/src/mesa/drivers/dri/r600/r700_vertprog.c +++ b/src/mesa/drivers/dri/r600/r700_vertprog.c @@ -628,6 +628,16 @@ GLboolean r700SetupVertexProgram(GLcontext * ctx) R600_STATECHANGE(context, spi); + if(vp->mesa_program->Base.OutputsWritten & (1 << VERT_RESULT_PSIZ)) { + R600_STATECHANGE(context, cl); + SETbit(r700->PA_CL_VS_OUT_CNTL.u32All, USE_VTX_POINT_SIZE_bit); + SETbit(r700->PA_CL_VS_OUT_CNTL.u32All, VS_OUT_MISC_VEC_ENA_bit); + } else if (r700->PA_CL_VS_OUT_CNTL.u32All != 0) { + R600_STATECHANGE(context, cl); + CLEARbit(r700->PA_CL_VS_OUT_CNTL.u32All, USE_VTX_POINT_SIZE_bit); + CLEARbit(r700->PA_CL_VS_OUT_CNTL.u32All, VS_OUT_MISC_VEC_ENA_bit); + } + SETfield(r700->SPI_VS_OUT_CONFIG.u32All, vp->r700Shader.nParamExports ? (vp->r700Shader.nParamExports - 1) : 0, VS_EXPORT_COUNT_shift, VS_EXPORT_COUNT_mask); diff --git a/src/mesa/drivers/dri/radeon/radeon_bo_legacy.c b/src/mesa/drivers/dri/radeon/radeon_bo_legacy.c index cf12664bacd..78f73bf99ce 100644 --- a/src/mesa/drivers/dri/radeon/radeon_bo_legacy.c +++ b/src/mesa/drivers/dri/radeon/radeon_bo_legacy.c @@ -618,8 +618,7 @@ static int bo_vram_validate(struct radeon_bo_int *bo, assert(bo_legacy->tobj->base.memBlock); - if (bo_legacy->tobj) - driUpdateTextureLRU(&bo_legacy->tobj->base); + driUpdateTextureLRU(&bo_legacy->tobj->base); if (bo_legacy->dirty || bo_legacy->tobj->base.dirty_images[0]) { if (IS_R600_CLASS(boml->screen)) { diff --git a/src/mesa/drivers/dri/radeon/radeon_queryobj.c b/src/mesa/drivers/dri/radeon/radeon_queryobj.c index 04ce12493e6..ab6d02e56b9 100644 --- a/src/mesa/drivers/dri/radeon/radeon_queryobj.c +++ b/src/mesa/drivers/dri/radeon/radeon_queryobj.c @@ -31,6 +31,8 @@ #include "main/imports.h" #include "main/simple_list.h" +#include <inttypes.h> + static void radeonQueryGetResult(GLcontext *ctx, struct gl_query_object *q) { radeonContextPtr radeon = RADEON_CONTEXT(ctx); @@ -65,7 +67,7 @@ static void radeonQueryGetResult(GLcontext *ctx, struct gl_query_object *q) } radeon_print(RADEON_STATE, RADEON_TRACE, - "%d start: %llx, end: %llx %lld\n", i, start, end, end - start); + "%d start: %" PRIu64 ", end: %" PRIu64 " %" PRIu64 "\n", i, start, end, end - start); } } else { for (i = 0; i < query->curr_offset/sizeof(uint32_t); ++i) { diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c index fca0f8173b9..4f59511a528 100644 --- a/src/mesa/drivers/dri/radeon/radeon_screen.c +++ b/src/mesa/drivers/dri/radeon/radeon_screen.c @@ -1137,6 +1137,7 @@ radeonCreateScreen( __DRIscreen *sPriv ) /* pipe overrides */ switch (dri_priv->deviceID) { case PCI_CHIP_R300_AD: /* 9500 with 1 quadpipe verified by: Reid Linnemann <[email protected]> */ + case PCI_CHIP_R350_AH: /* 9800 SE only have 1 quadpipe */ case PCI_CHIP_RV410_5E4C: /* RV410 SE only have 1 quadpipe */ case PCI_CHIP_RV410_5E4F: /* RV410 SE only have 1 quadpipe */ screen->num_gb_pipes = 1; @@ -1235,6 +1236,8 @@ radeonCreateScreen( __DRIscreen *sPriv ) screen->extensions[i++] = &r600texOffsetExtension.base; #endif + screen->extensions[i++] = &dri2ConfigQueryExtension.base; + screen->extensions[i++] = NULL; sPriv->extensions = screen->extensions; @@ -1344,6 +1347,7 @@ radeonCreateScreen2(__DRIscreen *sPriv) /* pipe overrides */ switch (device_id) { case PCI_CHIP_R300_AD: /* 9500 with 1 quadpipe verified by: Reid Linnemann <[email protected]> */ + case PCI_CHIP_R350_AH: /* 9800 SE only have 1 quadpipe */ case PCI_CHIP_RV410_5E4C: /* RV410 SE only have 1 quadpipe */ case PCI_CHIP_RV410_5E4F: /* RV410 SE only have 1 quadpipe */ screen->num_gb_pipes = 1; diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.h b/src/mesa/drivers/dri/radeon/radeon_screen.h index 5e6d432e11d..0d7e335fa3a 100644 --- a/src/mesa/drivers/dri/radeon/radeon_screen.h +++ b/src/mesa/drivers/dri/radeon/radeon_screen.h @@ -105,7 +105,7 @@ typedef struct radeon_screen { /* Configuration cache with default values for all contexts */ driOptionCache optionCache; - const __DRIextension *extensions[16]; + const __DRIextension *extensions[17]; int num_gb_pipes; int num_z_pipes; diff --git a/src/mesa/glapi/gen/ARB_seamless_cube_map.xml b/src/mesa/glapi/gen/ARB_seamless_cube_map.xml index 3cdc84d2b98..8dc827c5a89 100644 --- a/src/mesa/glapi/gen/ARB_seamless_cube_map.xml +++ b/src/mesa/glapi/gen/ARB_seamless_cube_map.xml @@ -3,7 +3,7 @@ <OpenGLAPI> -<category name="GL_ARB_seamless_cubemap" number="65"> +<category name="GL_ARB_seamless_cube_map" number="65"> <enum name="TEXTURE_CUBE_MAP_SEAMLESS" count="1" value="0x88F4"> <size name="Get" mode="get"/> </enum> diff --git a/src/mesa/glapi/glapi_getproc.c b/src/mesa/glapi/glapi_getproc.c index c73e8dd3b04..ec96ab36f0f 100644 --- a/src/mesa/glapi/glapi_getproc.c +++ b/src/mesa/glapi/glapi_getproc.c @@ -265,7 +265,8 @@ str_dup(const char *str) copy = (char*) malloc(strlen(str) + 1); if (!copy) return NULL; - strcpy(copy, str); + strncpy(copy, str, strlen(str)); + copy[strlen(str)] = '\0'; return copy; } diff --git a/src/mesa/glapi/glapi_nop.c b/src/mesa/glapi/glapi_nop.c index df9c5872842..4257b1fbce6 100644 --- a/src/mesa/glapi/glapi_nop.c +++ b/src/mesa/glapi/glapi_nop.c @@ -48,6 +48,26 @@ #include "glapi/glapi.h" + +/* + * These stubs are kept so that the old DRI drivers still load. + */ +PUBLIC void +_glapi_noop_enable_warnings(GLboolean enable); + +PUBLIC void +_glapi_set_warning_func(_glapi_proc func); + +void +_glapi_noop_enable_warnings(GLboolean enable) +{ +} + +void +_glapi_set_warning_func(_glapi_proc func) +{ +} + #ifdef DEBUG /** diff --git a/src/mesa/main/debug.c b/src/mesa/main/debug.c index 9bcfc1008a8..526145aeccf 100644 --- a/src/mesa/main/debug.c +++ b/src/mesa/main/debug.c @@ -315,7 +315,7 @@ write_texture_image(struct gl_texture_object *texObj, buffer, texObj, img); /* make filename */ - sprintf(s, "/tmp/tex%u.l%u.f%u.ppm", texObj->Name, level, face); + _mesa_snprintf(s, sizeof(s), "/tmp/tex%u.l%u.f%u.ppm", texObj->Name, level, face); printf(" Writing image level %u to %s\n", level, s); write_ppm(s, buffer, img->Width, img->Height, 4, 0, 1, 2, GL_FALSE); @@ -357,7 +357,7 @@ write_renderbuffer_image(const struct gl_renderbuffer *rb) format, type, &ctx->DefaultPacking, buffer); /* make filename */ - sprintf(s, "/tmp/renderbuffer%u.ppm", rb->Name); + _mesa_snprintf(s, sizeof(s), "/tmp/renderbuffer%u.ppm", rb->Name); printf(" Writing renderbuffer image to %s\n", s); write_ppm(s, buffer, rb->Width, rb->Height, 4, 0, 1, 2, GL_TRUE); diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c index 168c424ea1c..3f093cb6971 100644 --- a/src/mesa/main/dlist.c +++ b/src/mesa/main/dlist.c @@ -7725,7 +7725,7 @@ execute_list(GLcontext *ctx, GLuint list) default: { char msg[1000]; - sprintf(msg, "Error in execute_list: opcode=%d", + _mesa_snprintf(msg, sizeof(msg), "Error in execute_list: opcode=%d", (int) opcode); _mesa_problem(ctx, msg); } diff --git a/src/mesa/main/enums.c b/src/mesa/main/enums.c index 162a7b95267..13705b9f671 100644 --- a/src/mesa/main/enums.c +++ b/src/mesa/main/enums.c @@ -5581,7 +5581,7 @@ const char *_mesa_lookup_enum_by_nr( int nr ) } else { /* this is not re-entrant safe, no big deal here */ - sprintf(token_tmp, "0x%x", nr); + _mesa_snprintf(token_tmp, sizeof(token_tmp), "0x%x", nr); return token_tmp; } } diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c index d0c9c0028b2..b9796e4a423 100644 --- a/src/mesa/main/formats.c +++ b/src/mesa/main/formats.c @@ -637,6 +637,35 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] = 0, 0, 0, 0, 0, 1, 1, 2 }, + + /* Signed 8 bits / channel */ + { + MESA_FORMAT_SIGNED_R8, /* Name */ + "MESA_FORMAT_SIGNED_R8", /* StrName */ + GL_RGBA, /* BaseFormat */ + GL_SIGNED_NORMALIZED, /* DataType */ + 8, 0, 0, 0, /* Red/Green/Blue/AlphaBits */ + 0, 0, 0, 0, 0, /* Lum/Int/Index/Depth/StencilBits */ + 1, 1, 1 /* BlockWidth/Height,Bytes */ + }, + { + MESA_FORMAT_SIGNED_RG88, + "MESA_FORMAT_SIGNED_RG88", + GL_RGBA, + GL_SIGNED_NORMALIZED, + 8, 8, 0, 0, + 0, 0, 0, 0, 0, + 1, 1, 2 + }, + { + MESA_FORMAT_SIGNED_RGBX8888, + "MESA_FORMAT_SIGNED_RGBX8888", + GL_RGBA, + GL_SIGNED_NORMALIZED, + 8, 8, 8, 0, + 0, 0, 0, 0, 0, + 1, 1, 4 /* 4 bpp, but no alpha */ + }, { MESA_FORMAT_SIGNED_RGBA8888, "MESA_FORMAT_SIGNED_RGBA8888", @@ -655,6 +684,35 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] = 0, 0, 0, 0, 0, 1, 1, 4 }, + + /* Signed 16 bits / channel */ + { + MESA_FORMAT_SIGNED_R_16, + "MESA_FORMAT_SIGNED_R_16", + GL_RGBA, + GL_SIGNED_NORMALIZED, + 16, 0, 0, 0, + 0, 0, 0, 0, 0, + 1, 1, 2 + }, + { + MESA_FORMAT_SIGNED_RG_16, + "MESA_FORMAT_SIGNED_RG_16", + GL_RGBA, + GL_SIGNED_NORMALIZED, + 16, 16, 0, 0, + 0, 0, 0, 0, 0, + 1, 1, 4 + }, + { + MESA_FORMAT_SIGNED_RGB_16, + "MESA_FORMAT_SIGNED_RGB_16", + GL_RGBA, + GL_SIGNED_NORMALIZED, + 16, 16, 16, 0, + 0, 0, 0, 0, 0, + 1, 1, 6 + }, { MESA_FORMAT_SIGNED_RGBA_16, "MESA_FORMAT_SIGNED_RGBA_16", diff --git a/src/mesa/main/formats.h b/src/mesa/main/formats.h index 0eeeb8b2bac..97e1fc5df46 100644 --- a/src/mesa/main/formats.h +++ b/src/mesa/main/formats.h @@ -130,13 +130,21 @@ typedef enum MESA_FORMAT_INTENSITY_FLOAT16, /*@}*/ + /* msb <------ TEXEL BITS -----------> lsb */ + /* ---- ---- ---- ---- ---- ---- ---- ---- */ /** * \name Signed fixed point texture formats. */ /*@{*/ - MESA_FORMAT_DUDV8, - MESA_FORMAT_SIGNED_RGBA8888, - MESA_FORMAT_SIGNED_RGBA8888_REV, + MESA_FORMAT_DUDV8, /* DUDU DUDU DVDV DVDV */ + MESA_FORMAT_SIGNED_R8, /* RRRR RRRR */ + MESA_FORMAT_SIGNED_RG88, /* RRRR RRRR GGGG GGGG */ + MESA_FORMAT_SIGNED_RGBX8888, /* RRRR RRRR GGGG GGGG BBBB BBBB xxxx xxxx */ + MESA_FORMAT_SIGNED_RGBA8888, /* RRRR RRRR GGGG GGGG BBBB BBBB AAAA AAAA */ + MESA_FORMAT_SIGNED_RGBA8888_REV,/*AAAA AAAA BBBB BBBB GGGG GGGG RRRR RRRR */ + MESA_FORMAT_SIGNED_R_16, + MESA_FORMAT_SIGNED_RG_16, + MESA_FORMAT_SIGNED_RGB_16, MESA_FORMAT_SIGNED_RGBA_16, /*@}*/ diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c index 5a654e5c2a3..31689c8fe80 100644 --- a/src/mesa/main/framebuffer.c +++ b/src/mesa/main/framebuffer.c @@ -35,6 +35,7 @@ #include "buffers.h" #include "context.h" #include "depthstencil.h" +#include "enums.h" #include "formats.h" #include "macros.h" #include "mtypes.h" @@ -1019,3 +1020,43 @@ _mesa_get_color_read_type(GLcontext *ctx) return GL_UNSIGNED_BYTE; } } + + +/** + * Print framebuffer info to stderr, for debugging. + */ +void +_mesa_print_framebuffer(const struct gl_framebuffer *fb) +{ + GLuint i; + + fprintf(stderr, "Mesa Framebuffer %u at %p\n", fb->Name, (void *) fb); + fprintf(stderr, " Size: %u x %u Status: %s\n", fb->Width, fb->Height, + _mesa_lookup_enum_by_nr(fb->_Status)); + fprintf(stderr, " Attachments:\n"); + + for (i = 0; i < BUFFER_COUNT; i++) { + const struct gl_renderbuffer_attachment *att = &fb->Attachment[i]; + if (att->Type == GL_TEXTURE) { + const struct gl_texture_image *texImage; + fprintf(stderr, + " %2d: Texture %u, level %u, face %u, slice %u, complete %d\n", + i, att->Texture->Name, att->TextureLevel, att->CubeMapFace, + att->Zoffset, att->Complete); + texImage = att->Texture->Image[att->CubeMapFace][att->TextureLevel]; + fprintf(stderr, " Size: %u x %u x %u Format %s\n", + texImage->Width, texImage->Height, texImage->Depth, + _mesa_get_format_name(texImage->TexFormat)); + } + else if (att->Type == GL_RENDERBUFFER) { + fprintf(stderr, " %2d: Renderbuffer %u, complete %d\n", + i, att->Renderbuffer->Name, att->Complete); + fprintf(stderr, " Size: %u x %u Format %s\n", + att->Renderbuffer->Width, att->Renderbuffer->Height, + _mesa_get_format_name(att->Renderbuffer->Format)); + } + else { + fprintf(stderr, " %2d: none\n", i); + } + } +} diff --git a/src/mesa/main/framebuffer.h b/src/mesa/main/framebuffer.h index 960513812cf..1b6e3b1f0cb 100644 --- a/src/mesa/main/framebuffer.h +++ b/src/mesa/main/framebuffer.h @@ -91,4 +91,7 @@ _mesa_get_color_read_type(GLcontext *ctx); extern GLenum _mesa_get_color_read_format(GLcontext *ctx); +extern void +_mesa_print_framebuffer(const struct gl_framebuffer *fb); + #endif /* FRAMEBUFFER_H */ diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c index dc8d97728bf..93b01423dcf 100644 --- a/src/mesa/main/image.c +++ b/src/mesa/main/image.c @@ -734,6 +734,32 @@ _mesa_is_depthstencil_format(GLenum format) } } + +/** + * Test if the given image format is a depth or stencil format. + */ +GLboolean +_mesa_is_depth_or_stencil_format(GLenum format) +{ + switch (format) { + case GL_DEPTH_COMPONENT: + case GL_DEPTH_COMPONENT16: + case GL_DEPTH_COMPONENT24: + case GL_DEPTH_COMPONENT32: + case GL_STENCIL_INDEX: + case GL_STENCIL_INDEX1_EXT: + case GL_STENCIL_INDEX4_EXT: + case GL_STENCIL_INDEX8_EXT: + case GL_STENCIL_INDEX16_EXT: + case GL_DEPTH_STENCIL_EXT: + case GL_DEPTH24_STENCIL8_EXT: + return GL_TRUE; + default: + return GL_FALSE; + } +} + + /** * Test if the given image format is a dudv format. */ @@ -751,6 +777,40 @@ _mesa_is_dudv_format(GLenum format) /** + * Test if an image format is a supported compressed format. + * \param format the internal format token provided by the user. + * \return GL_TRUE if compressed, GL_FALSE if uncompressed + */ +GLboolean +_mesa_is_compressed_format(GLcontext *ctx, GLenum format) +{ + switch (format) { + case GL_COMPRESSED_RGB_S3TC_DXT1_EXT: + case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT: + case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT: + case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT: + return ctx->Extensions.EXT_texture_compression_s3tc; + case GL_RGB_S3TC: + case GL_RGB4_S3TC: + case GL_RGBA_S3TC: + case GL_RGBA4_S3TC: + return ctx->Extensions.S3_s3tc; + case GL_COMPRESSED_SRGB_S3TC_DXT1_EXT: + case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT: + case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT: + case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT: + return ctx->Extensions.EXT_texture_sRGB + && ctx->Extensions.EXT_texture_compression_s3tc; + case GL_COMPRESSED_RGB_FXT1_3DFX: + case GL_COMPRESSED_RGBA_FXT1_3DFX: + return ctx->Extensions.TDFX_texture_compression_FXT1; + default: + return GL_FALSE; + } +} + + +/** * Return the address of a specific pixel in an image (1D, 2D or 3D). * * Pixel unpacking/packing parameters are observed according to \p packing. diff --git a/src/mesa/main/image.h b/src/mesa/main/image.h index 9b34be0dfaa..48582eb3bbe 100644 --- a/src/mesa/main/image.h +++ b/src/mesa/main/image.h @@ -73,8 +73,13 @@ extern GLboolean _mesa_is_depthstencil_format(GLenum format); extern GLboolean +_mesa_is_depth_or_stencil_format(GLenum format); + +extern GLboolean _mesa_is_dudv_format(GLenum format); +extern GLboolean +_mesa_is_compressed_format(GLcontext *ctx, GLenum format); extern GLvoid * _mesa_image_address( GLuint dimensions, diff --git a/src/mesa/main/mipmap.c b/src/mesa/main/mipmap.c index 51f7edfab12..c0c29f78893 100644 --- a/src/mesa/main/mipmap.c +++ b/src/mesa/main/mipmap.c @@ -1581,7 +1581,7 @@ _mesa_generate_mipmap(GLcontext *ctx, GLenum target, struct gl_texture_image *dstImage; GLint srcWidth, srcHeight, srcDepth; GLint dstWidth, dstHeight, dstDepth; - GLint border, bytesPerTexel; + GLint border; GLboolean nextLevel; /* get src image parameters */ @@ -1623,33 +1623,24 @@ _mesa_generate_mipmap(GLcontext *ctx, GLenum target, dstImage->FetchTexelc = srcImage->FetchTexelc; dstImage->FetchTexelf = srcImage->FetchTexelf; - /* Alloc new teximage data buffer. - * Setup src and dest data pointers. - */ - if (_mesa_is_format_compressed(dstImage->TexFormat)) { - GLuint dstCompressedSize = - _mesa_format_image_size(dstImage->TexFormat, dstImage->Width, - dstImage->Height, dstImage->Depth); - ASSERT(dstCompressedSize > 0); - - dstImage->Data = _mesa_alloc_texmemory(dstCompressedSize); + /* Alloc new teximage data buffer */ + { + GLuint size = _mesa_format_image_size(dstImage->TexFormat, + dstWidth, dstHeight, dstDepth); + dstImage->Data = _mesa_alloc_texmemory(size); if (!dstImage->Data) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "generating mipmaps"); return; } + } + + /* Setup src and dest data pointers */ + if (_mesa_is_format_compressed(dstImage->TexFormat)) { /* srcData and dstData are already set */ ASSERT(srcData); ASSERT(dstData); } else { - bytesPerTexel = _mesa_get_format_bytes(dstImage->TexFormat); - ASSERT(dstWidth * dstHeight * dstDepth * bytesPerTexel > 0); - dstImage->Data = _mesa_alloc_texmemory(dstWidth * dstHeight - * dstDepth * bytesPerTexel); - if (!dstImage->Data) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "generating mipmaps"); - return; - } srcData = (const GLubyte *) srcImage->Data; dstData = (GLubyte *) dstImage->Data; } diff --git a/src/mesa/main/shaders.c b/src/mesa/main/shaders.c index f877320d699..863f878fea8 100644 --- a/src/mesa/main/shaders.c +++ b/src/mesa/main/shaders.c @@ -485,7 +485,7 @@ _mesa_ShaderSourceARB(GLhandleARB shaderObj, GLsizei count, checksum = _mesa_str_checksum(source); - sprintf(filename, "newshader_%d", checksum); + _mesa_snprintf(filename, sizeof(filename), "newshader_%d", checksum); newSource = _mesa_read_shader(filename); if (newSource) { diff --git a/src/mesa/main/texfetch.c b/src/mesa/main/texfetch.c index b37039429f4..48a22c19455 100644 --- a/src/mesa/main/texfetch.c +++ b/src/mesa/main/texfetch.c @@ -115,7 +115,7 @@ static void store_null_texel(struct gl_texture_image *texImage, * XXX this is somewhat temporary. */ static struct { - GLuint Name; + gl_format Name; FetchTexelFuncF Fetch1D; FetchTexelFuncF Fetch2D; FetchTexelFuncF Fetch3D; @@ -124,222 +124,13 @@ static struct { texfetch_funcs[MESA_FORMAT_COUNT] = { { - MESA_FORMAT_SRGB8, - fetch_texel_1d_srgb8, - fetch_texel_2d_srgb8, - fetch_texel_3d_srgb8, - store_texel_srgb8 - }, - { - MESA_FORMAT_SRGBA8, - fetch_texel_1d_srgba8, - fetch_texel_2d_srgba8, - fetch_texel_3d_srgba8, - store_texel_srgba8 - }, - { - MESA_FORMAT_SARGB8, - fetch_texel_1d_sargb8, - fetch_texel_2d_sargb8, - fetch_texel_3d_sargb8, - store_texel_sargb8 - }, - { - MESA_FORMAT_SL8, - fetch_texel_1d_sl8, - fetch_texel_2d_sl8, - fetch_texel_3d_sl8, - store_texel_sl8 - }, - { - MESA_FORMAT_SLA8, - fetch_texel_1d_sla8, - fetch_texel_2d_sla8, - fetch_texel_3d_sla8, - store_texel_sla8 - }, - { - MESA_FORMAT_RGB_FXT1, - NULL, - _mesa_fetch_texel_2d_f_rgb_fxt1, - NULL, - NULL - }, - { - MESA_FORMAT_RGBA_FXT1, - NULL, - _mesa_fetch_texel_2d_f_rgba_fxt1, - NULL, - NULL - }, - { - MESA_FORMAT_RGB_DXT1, - NULL, - _mesa_fetch_texel_2d_f_rgb_dxt1, - NULL, - NULL - }, - { - MESA_FORMAT_RGBA_DXT1, - NULL, - _mesa_fetch_texel_2d_f_rgba_dxt1, - NULL, - NULL - }, - { - MESA_FORMAT_RGBA_DXT3, - NULL, - _mesa_fetch_texel_2d_f_rgba_dxt3, - NULL, - NULL - }, - { - MESA_FORMAT_RGBA_DXT5, - NULL, - _mesa_fetch_texel_2d_f_rgba_dxt5, - NULL, - NULL - }, - { - MESA_FORMAT_SRGB_DXT1, - NULL, - _mesa_fetch_texel_2d_f_srgb_dxt1, - NULL, - NULL - }, - { - MESA_FORMAT_SRGBA_DXT1, - NULL, - _mesa_fetch_texel_2d_f_srgba_dxt1, - NULL, - NULL - }, - { - MESA_FORMAT_SRGBA_DXT3, - NULL, - _mesa_fetch_texel_2d_f_srgba_dxt3, - NULL, - NULL - }, - { - MESA_FORMAT_SRGBA_DXT5, - NULL, - _mesa_fetch_texel_2d_f_srgba_dxt5, - NULL, - NULL - }, - { - MESA_FORMAT_RGBA_FLOAT32, - fetch_texel_1d_f_rgba_f32, - fetch_texel_2d_f_rgba_f32, - fetch_texel_3d_f_rgba_f32, - store_texel_rgba_f32 - }, - { - MESA_FORMAT_RGBA_FLOAT16, - fetch_texel_1d_f_rgba_f16, - fetch_texel_2d_f_rgba_f16, - fetch_texel_3d_f_rgba_f16, - store_texel_rgba_f16 - }, - { - MESA_FORMAT_RGB_FLOAT32, - fetch_texel_1d_f_rgb_f32, - fetch_texel_2d_f_rgb_f32, - fetch_texel_3d_f_rgb_f32, - store_texel_rgb_f32 - }, - { - MESA_FORMAT_RGB_FLOAT16, - fetch_texel_1d_f_rgb_f16, - fetch_texel_2d_f_rgb_f16, - fetch_texel_3d_f_rgb_f16, - store_texel_rgb_f16 - }, - { - MESA_FORMAT_ALPHA_FLOAT32, - fetch_texel_1d_f_alpha_f32, - fetch_texel_2d_f_alpha_f32, - fetch_texel_3d_f_alpha_f32, - store_texel_alpha_f32 - }, - { - MESA_FORMAT_ALPHA_FLOAT16, - fetch_texel_1d_f_alpha_f16, - fetch_texel_2d_f_alpha_f16, - fetch_texel_3d_f_alpha_f16, - store_texel_alpha_f16 - }, - { - MESA_FORMAT_LUMINANCE_FLOAT32, - fetch_texel_1d_f_luminance_f32, - fetch_texel_2d_f_luminance_f32, - fetch_texel_3d_f_luminance_f32, - store_texel_luminance_f32 - }, - { - MESA_FORMAT_LUMINANCE_FLOAT16, - fetch_texel_1d_f_luminance_f16, - fetch_texel_2d_f_luminance_f16, - fetch_texel_3d_f_luminance_f16, - store_texel_luminance_f16 - }, - { - MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32, - fetch_texel_1d_f_luminance_alpha_f32, - fetch_texel_2d_f_luminance_alpha_f32, - fetch_texel_3d_f_luminance_alpha_f32, - store_texel_luminance_alpha_f32 - }, - { - MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16, - fetch_texel_1d_f_luminance_alpha_f16, - fetch_texel_2d_f_luminance_alpha_f16, - fetch_texel_3d_f_luminance_alpha_f16, - store_texel_luminance_alpha_f16 - }, - { - MESA_FORMAT_INTENSITY_FLOAT32, - fetch_texel_1d_f_intensity_f32, - fetch_texel_2d_f_intensity_f32, - fetch_texel_3d_f_intensity_f32, - store_texel_intensity_f32 - }, - { - MESA_FORMAT_INTENSITY_FLOAT16, - fetch_texel_1d_f_intensity_f16, - fetch_texel_2d_f_intensity_f16, - fetch_texel_3d_f_intensity_f16, - store_texel_intensity_f16 - }, - { - MESA_FORMAT_DUDV8, - fetch_texel_1d_dudv8, - fetch_texel_2d_dudv8, - fetch_texel_3d_dudv8, - NULL - }, - { - MESA_FORMAT_SIGNED_RGBA8888, - fetch_texel_1d_signed_rgba8888, - fetch_texel_2d_signed_rgba8888, - fetch_texel_3d_signed_rgba8888, - store_texel_signed_rgba8888 - }, - { - MESA_FORMAT_SIGNED_RGBA8888_REV, - fetch_texel_1d_signed_rgba8888_rev, - fetch_texel_2d_signed_rgba8888_rev, - fetch_texel_3d_signed_rgba8888_rev, - store_texel_signed_rgba8888_rev - }, - { - MESA_FORMAT_SIGNED_RGBA_16, - NULL, /* XXX to do */ - NULL, - NULL, - NULL + MESA_FORMAT_NONE, + fetch_null_texelf, + fetch_null_texelf, + fetch_null_texelf, + store_null_texel }, + { MESA_FORMAT_RGBA8888, fetch_texel_1d_f_rgba8888, @@ -563,56 +354,313 @@ texfetch_funcs[MESA_FORMAT_COUNT] = fetch_texel_2d_f_z32, fetch_texel_3d_f_z32, store_texel_z32 - } + }, + { + MESA_FORMAT_S8, + NULL, + NULL, + NULL, + NULL + }, + { + MESA_FORMAT_SRGB8, + fetch_texel_1d_srgb8, + fetch_texel_2d_srgb8, + fetch_texel_3d_srgb8, + store_texel_srgb8 + }, + { + MESA_FORMAT_SRGBA8, + fetch_texel_1d_srgba8, + fetch_texel_2d_srgba8, + fetch_texel_3d_srgba8, + store_texel_srgba8 + }, + { + MESA_FORMAT_SARGB8, + fetch_texel_1d_sargb8, + fetch_texel_2d_sargb8, + fetch_texel_3d_sargb8, + store_texel_sargb8 + }, + { + MESA_FORMAT_SL8, + fetch_texel_1d_sl8, + fetch_texel_2d_sl8, + fetch_texel_3d_sl8, + store_texel_sl8 + }, + { + MESA_FORMAT_SLA8, + fetch_texel_1d_sla8, + fetch_texel_2d_sla8, + fetch_texel_3d_sla8, + store_texel_sla8 + }, + { + MESA_FORMAT_SRGB_DXT1, + NULL, + _mesa_fetch_texel_2d_f_srgb_dxt1, + NULL, + NULL + }, + { + MESA_FORMAT_SRGBA_DXT1, + NULL, + _mesa_fetch_texel_2d_f_srgba_dxt1, + NULL, + NULL + }, + { + MESA_FORMAT_SRGBA_DXT3, + NULL, + _mesa_fetch_texel_2d_f_srgba_dxt3, + NULL, + NULL + }, + { + MESA_FORMAT_SRGBA_DXT5, + NULL, + _mesa_fetch_texel_2d_f_srgba_dxt5, + NULL, + NULL + }, + + { + MESA_FORMAT_RGB_FXT1, + NULL, + _mesa_fetch_texel_2d_f_rgb_fxt1, + NULL, + NULL + }, + { + MESA_FORMAT_RGBA_FXT1, + NULL, + _mesa_fetch_texel_2d_f_rgba_fxt1, + NULL, + NULL + }, + { + MESA_FORMAT_RGB_DXT1, + NULL, + _mesa_fetch_texel_2d_f_rgb_dxt1, + NULL, + NULL + }, + { + MESA_FORMAT_RGBA_DXT1, + NULL, + _mesa_fetch_texel_2d_f_rgba_dxt1, + NULL, + NULL + }, + { + MESA_FORMAT_RGBA_DXT3, + NULL, + _mesa_fetch_texel_2d_f_rgba_dxt3, + NULL, + NULL + }, + { + MESA_FORMAT_RGBA_DXT5, + NULL, + _mesa_fetch_texel_2d_f_rgba_dxt5, + NULL, + NULL + }, + { + MESA_FORMAT_RGBA_FLOAT32, + fetch_texel_1d_f_rgba_f32, + fetch_texel_2d_f_rgba_f32, + fetch_texel_3d_f_rgba_f32, + store_texel_rgba_f32 + }, + { + MESA_FORMAT_RGBA_FLOAT16, + fetch_texel_1d_f_rgba_f16, + fetch_texel_2d_f_rgba_f16, + fetch_texel_3d_f_rgba_f16, + store_texel_rgba_f16 + }, + { + MESA_FORMAT_RGB_FLOAT32, + fetch_texel_1d_f_rgb_f32, + fetch_texel_2d_f_rgb_f32, + fetch_texel_3d_f_rgb_f32, + store_texel_rgb_f32 + }, + { + MESA_FORMAT_RGB_FLOAT16, + fetch_texel_1d_f_rgb_f16, + fetch_texel_2d_f_rgb_f16, + fetch_texel_3d_f_rgb_f16, + store_texel_rgb_f16 + }, + { + MESA_FORMAT_ALPHA_FLOAT32, + fetch_texel_1d_f_alpha_f32, + fetch_texel_2d_f_alpha_f32, + fetch_texel_3d_f_alpha_f32, + store_texel_alpha_f32 + }, + { + MESA_FORMAT_ALPHA_FLOAT16, + fetch_texel_1d_f_alpha_f16, + fetch_texel_2d_f_alpha_f16, + fetch_texel_3d_f_alpha_f16, + store_texel_alpha_f16 + }, + { + MESA_FORMAT_LUMINANCE_FLOAT32, + fetch_texel_1d_f_luminance_f32, + fetch_texel_2d_f_luminance_f32, + fetch_texel_3d_f_luminance_f32, + store_texel_luminance_f32 + }, + { + MESA_FORMAT_LUMINANCE_FLOAT16, + fetch_texel_1d_f_luminance_f16, + fetch_texel_2d_f_luminance_f16, + fetch_texel_3d_f_luminance_f16, + store_texel_luminance_f16 + }, + { + MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32, + fetch_texel_1d_f_luminance_alpha_f32, + fetch_texel_2d_f_luminance_alpha_f32, + fetch_texel_3d_f_luminance_alpha_f32, + store_texel_luminance_alpha_f32 + }, + { + MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16, + fetch_texel_1d_f_luminance_alpha_f16, + fetch_texel_2d_f_luminance_alpha_f16, + fetch_texel_3d_f_luminance_alpha_f16, + store_texel_luminance_alpha_f16 + }, + { + MESA_FORMAT_INTENSITY_FLOAT32, + fetch_texel_1d_f_intensity_f32, + fetch_texel_2d_f_intensity_f32, + fetch_texel_3d_f_intensity_f32, + store_texel_intensity_f32 + }, + { + MESA_FORMAT_INTENSITY_FLOAT16, + fetch_texel_1d_f_intensity_f16, + fetch_texel_2d_f_intensity_f16, + fetch_texel_3d_f_intensity_f16, + store_texel_intensity_f16 + }, + { + MESA_FORMAT_DUDV8, + fetch_texel_1d_dudv8, + fetch_texel_2d_dudv8, + fetch_texel_3d_dudv8, + NULL + }, + { + MESA_FORMAT_SIGNED_R8, + fetch_texel_1d_signed_r8, + fetch_texel_2d_signed_r8, + fetch_texel_3d_signed_r8, + store_texel_signed_r8 + }, + { + MESA_FORMAT_SIGNED_RG88, + fetch_texel_1d_signed_rg88, + fetch_texel_2d_signed_rg88, + fetch_texel_3d_signed_rg88, + store_texel_signed_rg88 + }, + { + MESA_FORMAT_SIGNED_RGBX8888, + fetch_texel_1d_signed_rgbx8888, + fetch_texel_2d_signed_rgbx8888, + fetch_texel_3d_signed_rgbx8888, + store_texel_signed_rgbx8888 + }, + { + MESA_FORMAT_SIGNED_RGBA8888, + fetch_texel_1d_signed_rgba8888, + fetch_texel_2d_signed_rgba8888, + fetch_texel_3d_signed_rgba8888, + store_texel_signed_rgba8888 + }, + { + MESA_FORMAT_SIGNED_RGBA8888_REV, + fetch_texel_1d_signed_rgba8888_rev, + fetch_texel_2d_signed_rgba8888_rev, + fetch_texel_3d_signed_rgba8888_rev, + store_texel_signed_rgba8888_rev + }, + { + MESA_FORMAT_SIGNED_R_16, + fetch_texel_1d_signed_r_16, + fetch_texel_2d_signed_r_16, + fetch_texel_3d_signed_r_16, + store_texel_signed_r_16 + }, + { + MESA_FORMAT_SIGNED_RG_16, + fetch_texel_1d_signed_rg_16, + fetch_texel_2d_signed_rg_16, + fetch_texel_3d_signed_rg_16, + store_texel_signed_rg_16 + }, + { + MESA_FORMAT_SIGNED_RGB_16, + fetch_texel_1d_signed_rgb_16, + fetch_texel_2d_signed_rgb_16, + fetch_texel_3d_signed_rgb_16, + store_texel_signed_rgb_16 + }, + { + MESA_FORMAT_SIGNED_RGBA_16, + fetch_texel_1d_signed_rgba_16, + fetch_texel_2d_signed_rgba_16, + fetch_texel_3d_signed_rgba_16, + store_texel_signed_rgba_16 + }, }; static FetchTexelFuncF _mesa_get_texel_fetch_func(gl_format format, GLuint dims) { - FetchTexelFuncF f = NULL; - GLuint i; - /* XXX replace loop with direct table lookup */ - for (i = 0; i < MESA_FORMAT_COUNT; i++) { - if (texfetch_funcs[i].Name == format) { - switch (dims) { - case 1: - f = texfetch_funcs[i].Fetch1D; - break; - case 2: - f = texfetch_funcs[i].Fetch2D; - break; - case 3: - f = texfetch_funcs[i].Fetch3D; - break; - } - if (!f) - f = fetch_null_texelf; - return f; - } +#ifdef DEBUG + /* check that the table entries are sorted by format name */ + gl_format fmt; + for (fmt = 0; fmt < MESA_FORMAT_COUNT; fmt++) { + assert(texfetch_funcs[fmt].Name == fmt); + } +#endif + + assert(Elements(texfetch_funcs) == MESA_FORMAT_COUNT); + assert(format < MESA_FORMAT_COUNT); + + switch (dims) { + case 1: + return texfetch_funcs[format].Fetch1D; + case 2: + return texfetch_funcs[format].Fetch2D; + case 3: + return texfetch_funcs[format].Fetch3D; + default: + assert(0 && "bad dims in _mesa_get_texel_fetch_func"); + return NULL; } - return NULL; } StoreTexelFunc _mesa_get_texel_store_func(gl_format format) { - GLuint i; - /* XXX replace loop with direct table lookup */ - for (i = 0; i < MESA_FORMAT_COUNT; i++) { - if (texfetch_funcs[i].Name == format) { - if (texfetch_funcs[i].StoreTexel) - return texfetch_funcs[i].StoreTexel; - else - return store_null_texel; - } - } - return NULL; + assert(format < MESA_FORMAT_COUNT); + return texfetch_funcs[format].StoreTexel; } - /** * Adaptor for fetching a GLchan texel from a float-valued texture. */ diff --git a/src/mesa/main/texfetch_tmp.h b/src/mesa/main/texfetch_tmp.h index e6772c89f36..4df2b19181a 100644 --- a/src/mesa/main/texfetch_tmp.h +++ b/src/mesa/main/texfetch_tmp.h @@ -1209,16 +1209,86 @@ static void FETCH(dudv8)(const struct gl_texture_image *texImage, texel[ACOMP] = 0; } + +/* MESA_FORMAT_SIGNED_R8 ***********************************************/ + +static void FETCH(signed_r8)( const struct gl_texture_image *texImage, + GLint i, GLint j, GLint k, GLfloat *texel ) +{ + const GLbyte s = *TEXEL_ADDR(GLbyte, texImage, i, j, k, 1); + texel[RCOMP] = BYTE_TO_FLOAT_TEX( s ); + texel[GCOMP] = 0.0F; + texel[BCOMP] = 0.0F; + texel[ACOMP] = 1.0F; +} + +#if DIM == 3 +static void store_texel_signed_r8(struct gl_texture_image *texImage, + GLint i, GLint j, GLint k, const void *texel) +{ + const GLbyte *rgba = (const GLbyte *) texel; + GLbyte *dst = TEXEL_ADDR(GLbyte, texImage, i, j, k, 1); + *dst = rgba[RCOMP]; +} +#endif + + +/* MESA_FORMAT_SIGNED_RG88 ***********************************************/ + +static void FETCH(signed_rg88)( const struct gl_texture_image *texImage, + GLint i, GLint j, GLint k, GLfloat *texel ) +{ + const GLushort s = *TEXEL_ADDR(GLshort, texImage, i, j, k, 1); + texel[RCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s >> 8) ); + texel[GCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s & 0xff) ); + texel[BCOMP] = 0.0F; + texel[ACOMP] = 1.0F; +} + +#if DIM == 3 +static void store_texel_signed_rg88(struct gl_texture_image *texImage, + GLint i, GLint j, GLint k, const void *texel) +{ + const GLbyte *rg = (const GLbyte *) texel; + GLushort *dst = TEXEL_ADDR(GLushort, texImage, i, j, k, 2); + *dst = PACK_COLOR_88(rg[RCOMP], rg[GCOMP]); +} +#endif + + +/* MESA_FORMAT_SIGNED_RGBX8888 ***********************************************/ + +static void FETCH(signed_rgbx8888)( const struct gl_texture_image *texImage, + GLint i, GLint j, GLint k, GLfloat *texel ) +{ + const GLuint s = *TEXEL_ADDR(GLuint, texImage, i, j, k, 1); + texel[RCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s >> 24) ); + texel[GCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s >> 16) ); + texel[BCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s >> 8) ); + texel[ACOMP] = 1.0f; +} + +#if DIM == 3 +static void store_texel_signed_rgbx8888(struct gl_texture_image *texImage, + GLint i, GLint j, GLint k, const void *texel) +{ + const GLbyte *rgba = (const GLbyte *) texel; + GLuint *dst = TEXEL_ADDR(GLuint, texImage, i, j, k, 1); + *dst = PACK_COLOR_8888(rgba[RCOMP], rgba[GCOMP], rgba[BCOMP], 255); +} +#endif + + /* MESA_FORMAT_SIGNED_RGBA8888 ***********************************************/ static void FETCH(signed_rgba8888)( const struct gl_texture_image *texImage, GLint i, GLint j, GLint k, GLfloat *texel ) { const GLuint s = *TEXEL_ADDR(GLuint, texImage, i, j, k, 1); - texel[RCOMP] = BYTE_TO_FLOAT_TEX( (s >> 24) ); - texel[GCOMP] = BYTE_TO_FLOAT_TEX( (s >> 16) & 0xff ); - texel[BCOMP] = BYTE_TO_FLOAT_TEX( (s >> 8) & 0xff ); - texel[ACOMP] = BYTE_TO_FLOAT_TEX( (s ) & 0xff ); + texel[RCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s >> 24) ); + texel[GCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s >> 16) ); + texel[BCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s >> 8) ); + texel[ACOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s ) ); } #if DIM == 3 @@ -1235,10 +1305,10 @@ static void FETCH(signed_rgba8888_rev)( const struct gl_texture_image *texImage, GLint i, GLint j, GLint k, GLfloat *texel ) { const GLuint s = *TEXEL_ADDR(GLuint, texImage, i, j, k, 1); - texel[RCOMP] = BYTE_TO_FLOAT_TEX( (s ) & 0xff ); - texel[GCOMP] = BYTE_TO_FLOAT_TEX( (s >> 8) & 0xff ); - texel[BCOMP] = BYTE_TO_FLOAT_TEX( (s >> 16) & 0xff ); - texel[ACOMP] = BYTE_TO_FLOAT_TEX( (s >> 24) ); + texel[RCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s ) ); + texel[GCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s >> 8) ); + texel[BCOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s >> 16) ); + texel[ACOMP] = BYTE_TO_FLOAT_TEX( (GLbyte) (s >> 24) ); } #if DIM == 3 @@ -1253,6 +1323,113 @@ static void store_texel_signed_rgba8888_rev(struct gl_texture_image *texImage, +/* MESA_FORMAT_SIGNED_R_16 ***********************************************/ + +static void +FETCH(signed_r_16)(const struct gl_texture_image *texImage, + GLint i, GLint j, GLint k, GLfloat *texel) +{ + const GLshort s = *TEXEL_ADDR(GLshort, texImage, i, j, k, 1); + texel[RCOMP] = SHORT_TO_FLOAT_TEX( s ); + texel[GCOMP] = 0.0F; + texel[BCOMP] = 0.0F; + texel[ACOMP] = 1.0F; +} + +#if DIM == 3 +static void +store_texel_signed_r_16(struct gl_texture_image *texImage, + GLint i, GLint j, GLint k, const void *texel) +{ + const GLshort *rgba = (const GLshort *) texel; + GLshort *dst = TEXEL_ADDR(GLshort, texImage, i, j, k, 1); + *dst = rgba[0]; +} +#endif + + +/* MESA_FORMAT_SIGNED_RG_16 ***********************************************/ + +static void +FETCH(signed_rg_16)(const struct gl_texture_image *texImage, + GLint i, GLint j, GLint k, GLfloat *texel) +{ + const GLshort *s = TEXEL_ADDR(GLshort, texImage, i, j, k, 2); + texel[RCOMP] = SHORT_TO_FLOAT_TEX( s[0] ); + texel[GCOMP] = SHORT_TO_FLOAT_TEX( s[1] ); + texel[BCOMP] = 0.0F; + texel[ACOMP] = 1.0F; +} + +#if DIM == 3 +static void +store_texel_signed_rg_16(struct gl_texture_image *texImage, + GLint i, GLint j, GLint k, const void *texel) +{ + const GLshort *rgba = (const GLshort *) texel; + GLshort *dst = TEXEL_ADDR(GLshort, texImage, i, j, k, 2); + dst[0] = rgba[RCOMP]; + dst[1] = rgba[GCOMP]; +} +#endif + + +/* MESA_FORMAT_SIGNED_RGB_16 ***********************************************/ + +static void +FETCH(signed_rgb_16)(const struct gl_texture_image *texImage, + GLint i, GLint j, GLint k, GLfloat *texel) +{ + const GLshort *s = TEXEL_ADDR(GLshort, texImage, i, j, k, 3); + texel[RCOMP] = SHORT_TO_FLOAT_TEX( s[0] ); + texel[GCOMP] = SHORT_TO_FLOAT_TEX( s[1] ); + texel[BCOMP] = SHORT_TO_FLOAT_TEX( s[3] ); + texel[ACOMP] = 1.0F; +} + +#if DIM == 3 +static void +store_texel_signed_rgb_16(struct gl_texture_image *texImage, + GLint i, GLint j, GLint k, const void *texel) +{ + const GLshort *rgba = (const GLshort *) texel; + GLshort *dst = TEXEL_ADDR(GLshort, texImage, i, j, k, 3); + dst[0] = rgba[RCOMP]; + dst[1] = rgba[GCOMP]; + dst[2] = rgba[BCOMP]; +} +#endif + + +/* MESA_FORMAT_SIGNED_RGB_16 ***********************************************/ + +static void +FETCH(signed_rgba_16)(const struct gl_texture_image *texImage, + GLint i, GLint j, GLint k, GLfloat *texel) +{ + const GLshort *s = TEXEL_ADDR(GLshort, texImage, i, j, k, 4); + texel[RCOMP] = SHORT_TO_FLOAT_TEX( s[0] ); + texel[GCOMP] = SHORT_TO_FLOAT_TEX( s[1] ); + texel[BCOMP] = SHORT_TO_FLOAT_TEX( s[3] ); + texel[ACOMP] = SHORT_TO_FLOAT_TEX( s[4] ); +} + +#if DIM == 3 +static void +store_texel_signed_rgba_16(struct gl_texture_image *texImage, + GLint i, GLint j, GLint k, const void *texel) +{ + const GLshort *rgba = (const GLshort *) texel; + GLshort *dst = TEXEL_ADDR(GLshort, texImage, i, j, k, 4); + dst[0] = rgba[RCOMP]; + dst[1] = rgba[GCOMP]; + dst[2] = rgba[BCOMP]; + dst[3] = rgba[ACOMP]; +} +#endif + + + /* MESA_FORMAT_YCBCR *********************************************************/ /* Fetch texel from 1D, 2D or 3D ycbcr texture, return 4 GLfloats. diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c index 096945a6432..06e6fd92fca 100644 --- a/src/mesa/main/texformat.c +++ b/src/mesa/main/texformat.c @@ -294,6 +294,32 @@ _mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat, } } + if (ctx->VersionMajor * 10 + ctx->VersionMinor >= 31) { + switch (internalFormat) { + case GL_RED_SNORM: + case GL_R8_SNORM: + return MESA_FORMAT_SIGNED_R8; + case GL_RG_SNORM: + case GL_RG8_SNORM: + return MESA_FORMAT_SIGNED_RG88; + case GL_RGB_SNORM: + case GL_RGB8_SNORM: + return MESA_FORMAT_SIGNED_RGBX8888; + case GL_RGBA_SNORM: + case GL_RGBA8_SNORM: + return MESA_FORMAT_SIGNED_RGBA8888; + case GL_R16_SNORM: + return MESA_FORMAT_SIGNED_R_16; + case GL_RG16_SNORM: + return MESA_FORMAT_SIGNED_RG_16; + case GL_RGB16_SNORM: + return MESA_FORMAT_SIGNED_RGB_16; + case GL_RGBA16_SNORM: + return MESA_FORMAT_SIGNED_RGBA_16; + default: + ; /* fall-through */ + } + } #if FEATURE_EXT_texture_sRGB if (ctx->Extensions.EXT_texture_sRGB) { diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 0c583ed14d3..0b55097bd69 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -359,34 +359,6 @@ _mesa_base_tex_format( GLcontext *ctx, GLint internalFormat ) /** - * Test if it is a supported compressed format. - * - * \param internalFormat the internal format token provided by the user. - * - * \ret GL_TRUE if \p internalFormat is a supported compressed format, or - * GL_FALSE otherwise. - * - * Currently only GL_COMPRESSED_RGB_FXT1_3DFX and GL_COMPRESSED_RGBA_FXT1_3DFX - * are supported. - */ -static GLboolean -is_compressed_format(GLcontext *ctx, GLenum internalFormat) -{ - GLint supported[100]; /* 100 should be plenty */ - GLuint i, n; - - n = _mesa_get_compressed_formats(ctx, supported, GL_TRUE); - ASSERT(n < 100); - for (i = 0; i < n; i++) { - if ((GLint) internalFormat == supported[i]) { - return GL_TRUE; - } - } - return GL_FALSE; -} - - -/** * For cube map faces, return a face index in [0,5]. * For other targets return 0; */ @@ -1308,8 +1280,8 @@ texture_error_check( GLcontext *ctx, GLenum target, if (type != GL_UNSIGNED_SHORT_8_8_MESA && type != GL_UNSIGNED_SHORT_8_8_REV_MESA) { char message[100]; - sprintf(message, - "glTexImage%d(format/type YCBCR mismatch", dimensions); + _mesa_snprintf(message, sizeof(message), + "glTexImage%d(format/type YCBCR mismatch", dimensions); _mesa_error(ctx, GL_INVALID_ENUM, message); return GL_TRUE; /* error */ } @@ -1324,9 +1296,9 @@ texture_error_check( GLcontext *ctx, GLenum target, if (border != 0) { if (!isProxy) { char message[100]; - sprintf(message, - "glTexImage%d(format=GL_YCBCR_MESA and border=%d)", - dimensions, border); + _mesa_snprintf(message, sizeof(message), + "glTexImage%d(format=GL_YCBCR_MESA and border=%d)", + dimensions, border); _mesa_error(ctx, GL_INVALID_VALUE, message); } return GL_TRUE; @@ -1350,7 +1322,7 @@ texture_error_check( GLcontext *ctx, GLenum target, } /* additional checks for compressed textures */ - if (is_compressed_format(ctx, internalFormat)) { + if (_mesa_is_compressed_format(ctx, internalFormat)) { if (!target_can_be_compressed(ctx, target) && !isProxy) { _mesa_error(ctx, GL_INVALID_ENUM, "glTexImage%d(target)", dimensions); @@ -1716,7 +1688,7 @@ copytexture_error_check( GLcontext *ctx, GLuint dimensions, return GL_TRUE; } - if (is_compressed_format(ctx, internalFormat)) { + if (_mesa_is_compressed_format(ctx, internalFormat)) { if (!target_can_be_compressed(ctx, target)) { _mesa_error(ctx, GL_INVALID_ENUM, "glCopyTexImage%d(target)", dimensions); @@ -3114,7 +3086,7 @@ compressed_texture_error_check(GLcontext *ctx, GLint dimensions, maxTextureSize = 1 << (maxLevels - 1); /* This will detect any invalid internalFormat value */ - if (!is_compressed_format(ctx, internalFormat)) + if (!_mesa_is_compressed_format(ctx, internalFormat)) return GL_INVALID_ENUM; /* This should really never fail */ @@ -3219,7 +3191,7 @@ compressed_subtexture_error_check(GLcontext *ctx, GLint dimensions, maxTextureSize = 1 << (maxLevels - 1); /* this will catch any invalid compressed format token */ - if (!is_compressed_format(ctx, format)) + if (!_mesa_is_compressed_format(ctx, format)) return GL_INVALID_ENUM; if (width < 1 || width > maxTextureSize) diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c index 2753b55c36a..de37e340393 100644 --- a/src/mesa/main/texobj.c +++ b/src/mesa/main/texobj.c @@ -416,7 +416,7 @@ _mesa_test_texobj_completeness( const GLcontext *ctx, */ if ((baseLevel < 0) || (baseLevel >= MAX_TEXTURE_LEVELS)) { char s[100]; - sprintf(s, "base level = %d is invalid", baseLevel); + _mesa_snprintf(s, sizeof(s), "base level = %d is invalid", baseLevel); incomplete(t, s); t->_Complete = GL_FALSE; return; @@ -425,7 +425,7 @@ _mesa_test_texobj_completeness( const GLcontext *ctx, /* Always need the base level image */ if (!t->Image[0][baseLevel]) { char s[100]; - sprintf(s, "Image[baseLevel=%d] == NULL", baseLevel); + _mesa_snprintf(s, sizeof(s), "Image[baseLevel=%d] == NULL", baseLevel); incomplete(t, s); t->_Complete = GL_FALSE; return; diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c index 65e3fcaa953..94c0894de1f 100644 --- a/src/mesa/main/texstore.c +++ b/src/mesa/main/texstore.c @@ -2551,6 +2551,147 @@ _mesa_texstore_dudv8(TEXSTORE_PARAMS) return GL_TRUE; } + +/** + * Store a texture in MESA_FORMAT_SIGNED_R8 format. + */ +static GLboolean +_mesa_texstore_signed_r8(TEXSTORE_PARAMS) +{ + const GLuint texelBytes = _mesa_get_format_bytes(dstFormat); + const GLenum baseFormat = _mesa_get_format_base_format(dstFormat); + + ASSERT(dstFormat == MESA_FORMAT_SIGNED_R8); + ASSERT(texelBytes == 1); + + /* XXX look at adding optimized paths */ + { + /* general path */ + const GLfloat *tempImage = make_temp_float_image(ctx, dims, + baseInternalFormat, + baseFormat, + srcWidth, srcHeight, srcDepth, + srcFormat, srcType, srcAddr, + srcPacking); + const GLfloat *srcRow = tempImage; + GLint img, row, col; + if (!tempImage) + return GL_FALSE; + _mesa_adjust_image_for_convolution(ctx, dims, &srcWidth, &srcHeight); + for (img = 0; img < srcDepth; img++) { + GLubyte *dstRow = (GLubyte *) dstAddr + + dstImageOffsets[dstZoffset + img] * texelBytes + + dstYoffset * dstRowStride + + dstXoffset * texelBytes; + for (row = 0; row < srcHeight; row++) { + GLubyte *dstB = (GLubyte *) dstRow; + for (col = 0; col < srcWidth; col++) { + dstB[col] = FLOAT_TO_BYTE_TEX(srcRow[RCOMP]); + } + dstRow += dstRowStride; + } + } + free((void *) tempImage); + } + return GL_TRUE; +} + + +/** + * Store a texture in MESA_FORMAT_SIGNED_RG88 format. + */ +static GLboolean +_mesa_texstore_signed_rg88(TEXSTORE_PARAMS) +{ + const GLuint texelBytes = _mesa_get_format_bytes(dstFormat); + const GLenum baseFormat = _mesa_get_format_base_format(dstFormat); + + ASSERT(dstFormat == MESA_FORMAT_SIGNED_RG88); + ASSERT(texelBytes == 1); + + /* XXX look at adding optimized paths */ + { + /* general path */ + const GLfloat *tempImage = make_temp_float_image(ctx, dims, + baseInternalFormat, + baseFormat, + srcWidth, srcHeight, srcDepth, + srcFormat, srcType, srcAddr, + srcPacking); + const GLfloat *srcRow = tempImage; + GLint img, row, col; + if (!tempImage) + return GL_FALSE; + _mesa_adjust_image_for_convolution(ctx, dims, &srcWidth, &srcHeight); + for (img = 0; img < srcDepth; img++) { + GLubyte *dstRow = (GLubyte *) dstAddr + + dstImageOffsets[dstZoffset + img] * texelBytes + + dstYoffset * dstRowStride + + dstXoffset * texelBytes; + for (row = 0; row < srcHeight; row++) { + GLushort *dstUS = (GLushort *) dstRow; + for (col = 0; col < srcWidth; col++) { + dstUS[col] = PACK_COLOR_88(FLOAT_TO_BYTE_TEX(srcRow[RCOMP]), + FLOAT_TO_BYTE_TEX(srcRow[GCOMP])); + } + dstRow += dstRowStride; + } + } + free((void *) tempImage); + } + return GL_TRUE; +} + + +/** + * Store a texture in MESA_FORMAT_SIGNED_RGBX8888. + */ +static GLboolean +_mesa_texstore_signed_rgbx8888(TEXSTORE_PARAMS) +{ + const GLuint texelBytes = _mesa_get_format_bytes(dstFormat); + const GLenum baseFormat = _mesa_get_format_base_format(dstFormat); + + ASSERT(dstFormat == MESA_FORMAT_SIGNED_RGBX8888); + ASSERT(texelBytes == 4); + + { + /* general path */ + const GLfloat *tempImage = make_temp_float_image(ctx, dims, + baseInternalFormat, + baseFormat, + srcWidth, srcHeight, srcDepth, + srcFormat, srcType, srcAddr, + srcPacking); + const GLfloat *srcRow = tempImage; + GLint img, row, col; + if (!tempImage) + return GL_FALSE; + _mesa_adjust_image_for_convolution(ctx, dims, &srcWidth, &srcHeight); + for (img = 0; img < srcDepth; img++) { + GLubyte *dstRow = (GLubyte *) dstAddr + + dstImageOffsets[dstZoffset + img] * texelBytes + + dstYoffset * dstRowStride + + dstXoffset * texelBytes; + for (row = 0; row < srcHeight; row++) { + GLuint *dstUI = (GLuint *) dstRow; + for (col = 0; col < srcWidth; col++) { + dstUI[col] = PACK_COLOR_8888( FLOAT_TO_BYTE_TEX(srcRow[RCOMP]), + FLOAT_TO_BYTE_TEX(srcRow[GCOMP]), + FLOAT_TO_BYTE_TEX(srcRow[BCOMP]), + 0xff ); + srcRow += 4; + } + dstRow += dstRowStride; + } + } + free((void *) tempImage); + } + return GL_TRUE; +} + + + /** * Store a texture in MESA_FORMAT_SIGNED_RGBA8888 or MESA_FORMAT_SIGNED_RGBA8888_REV */ @@ -2672,6 +2813,7 @@ _mesa_texstore_signed_rgba8888(TEXSTORE_PARAMS) return GL_TRUE; } + /** * Store a combined depth/stencil texture image. */ @@ -3197,9 +3339,18 @@ texstore_funcs[MESA_FORMAT_COUNT] = { MESA_FORMAT_INTENSITY_FLOAT32, _mesa_texstore_rgba_float32 }, { MESA_FORMAT_INTENSITY_FLOAT16, _mesa_texstore_rgba_float16 }, { MESA_FORMAT_DUDV8, _mesa_texstore_dudv8 }, + + { MESA_FORMAT_SIGNED_R8, _mesa_texstore_signed_r8 }, + { MESA_FORMAT_SIGNED_RG88, _mesa_texstore_signed_rg88 }, + { MESA_FORMAT_SIGNED_RGBX8888, _mesa_texstore_signed_rgbx8888 }, + { MESA_FORMAT_SIGNED_RGBA8888, _mesa_texstore_signed_rgba8888 }, { MESA_FORMAT_SIGNED_RGBA8888_REV, _mesa_texstore_signed_rgba8888 }, - { MESA_FORMAT_SIGNED_RGBA_16, NULL }, + + { MESA_FORMAT_SIGNED_R_16, NULL/*_mesa_texstore_signed_r16*/ }, + { MESA_FORMAT_SIGNED_RG_16, NULL/*_mesa_texstore_signed_rg16*/ }, + { MESA_FORMAT_SIGNED_RGB_16, NULL/*_mesa_texstore_signed_rgb16*/ }, + { MESA_FORMAT_SIGNED_RGBA_16, NULL/*_mesa_texstore_signed_rgba16*/ }, }; diff --git a/src/mesa/shader/program_parse.tab.c b/src/mesa/shader/program_parse.tab.c index e5ef25ec38a..99c4b2baa5f 100644 --- a/src/mesa/shader/program_parse.tab.c +++ b/src/mesa/shader/program_parse.tab.c @@ -5557,7 +5557,6 @@ make_error_string(const char *fmt, ...) char *str; va_list args; - va_start(args, fmt); /* Call vsnprintf once to determine how large the final string is. Call it * again to do the actual formatting. from the vsnprintf manual page: @@ -5566,15 +5565,17 @@ make_error_string(const char *fmt, ...) * characters printed (not including the trailing '\0' used to end * output to strings). */ + va_start(args, fmt); length = 1 + vsnprintf(NULL, 0, fmt, args); + va_end(args); str = malloc(length); if (str) { + va_start(args, fmt); vsnprintf(str, length, fmt, args); + va_end(args); } - va_end(args); - return str; } diff --git a/src/mesa/shader/program_parse.y b/src/mesa/shader/program_parse.y index 299e2477e48..06c2db7a07e 100644 --- a/src/mesa/shader/program_parse.y +++ b/src/mesa/shader/program_parse.y @@ -2596,7 +2596,6 @@ make_error_string(const char *fmt, ...) char *str; va_list args; - va_start(args, fmt); /* Call vsnprintf once to determine how large the final string is. Call it * again to do the actual formatting. from the vsnprintf manual page: @@ -2605,15 +2604,17 @@ make_error_string(const char *fmt, ...) * characters printed (not including the trailing '\0' used to end * output to strings). */ + va_start(args, fmt); length = 1 + vsnprintf(NULL, 0, fmt, args); + va_end(args); str = malloc(length); if (str) { + va_start(args, fmt); vsnprintf(str, length, fmt, args); + va_end(args); } - va_end(args); - return str; } diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index fa79632c18b..27ac1da9ad8 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -1560,7 +1560,7 @@ _slang_gen_function_call(slang_assemble_ctx *A, slang_function *fun, char name[200]; prevFuncEndLabel = A->curFuncEndLabel; - sprintf(name, "__endOfFunc_%s_", (char *) fun->header.a_name); + _mesa_snprintf(name, sizeof(name), "__endOfFunc_%s_", (char *) fun->header.a_name); A->curFuncEndLabel = _slang_label_new(name); assert(A->curFuncEndLabel); diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c index 7c0ea0c1148..974c4a31315 100644 --- a/src/mesa/shader/slang/slang_emit.c +++ b/src/mesa/shader/slang/slang_emit.c @@ -652,30 +652,30 @@ storage_annotation(const slang_ir_node *n, const struct gl_program *prog) if (st->Index >= 0) { const GLfloat *val = prog->Parameters->ParameterValues[st->Index]; if (st->Swizzle == SWIZZLE_NOOP) - sprintf(s, "{%g, %g, %g, %g}", val[0], val[1], val[2], val[3]); + _mesa_snprintf(s, sizeof(s), "{%g, %g, %g, %g}", val[0], val[1], val[2], val[3]); else { - sprintf(s, "%g", val[GET_SWZ(st->Swizzle, 0)]); + _mesa_snprintf(s, sizeof(s), "%g", val[GET_SWZ(st->Swizzle, 0)]); } } break; case PROGRAM_TEMPORARY: if (n->Var) - sprintf(s, "%s", (char *) n->Var->a_name); + _mesa_snprintf(s, sizeof(s), "%s", (char *) n->Var->a_name); else - sprintf(s, "t[%d]", st->Index); + _mesa_snprintf(s, sizeof(s), "t[%d]", st->Index); break; case PROGRAM_STATE_VAR: case PROGRAM_UNIFORM: - sprintf(s, "%s", prog->Parameters->Parameters[st->Index].Name); + _mesa_snprintf(s, sizeof(s), "%s", prog->Parameters->Parameters[st->Index].Name); break; case PROGRAM_VARYING: - sprintf(s, "%s", prog->Varying->Parameters[st->Index].Name); + _mesa_snprintf(s, sizeof(s), "%s", prog->Varying->Parameters[st->Index].Name); break; case PROGRAM_INPUT: - sprintf(s, "input[%d]", st->Index); + _mesa_snprintf(s, sizeof(s), "input[%d]", st->Index); break; case PROGRAM_OUTPUT: - sprintf(s, "output[%d]", st->Index); + _mesa_snprintf(s, sizeof(s), "output[%d]", st->Index); break; default: s[0] = 0; @@ -752,9 +752,8 @@ instruction_annotation(gl_inst_opcode opcode, char *dstAnnot, } s = (char *) malloc(len); - sprintf(s, "%s = %s %s %s %s", dstAnnot, - srcAnnot0, operator, srcAnnot1, srcAnnot2); - assert(strlen(s) < len); + _mesa_snprintf(s, len, "%s = %s %s %s %s", dstAnnot, + srcAnnot0, operator, srcAnnot1, srcAnnot2); free(dstAnnot); free(srcAnnot0); @@ -2274,11 +2273,11 @@ emit_var_decl(slang_emit_info *emitInfo, slang_ir_node *n) if (emitInfo->EmitComments) { /* emit NOP with comment describing the variable's storage location */ char s[1000]; - sprintf(s, "TEMP[%d]%s = variable %s (size %d)", - n->Store->Index, - _mesa_swizzle_string(n->Store->Swizzle, 0, GL_FALSE), - (n->Var ? (char *) n->Var->a_name : "anonymous"), - n->Store->Size); + _mesa_snprintf(s, sizeof(s), "TEMP[%d]%s = variable %s (size %d)", + n->Store->Index, + _mesa_swizzle_string(n->Store->Swizzle, 0, GL_FALSE), + (n->Var ? (char *) n->Var->a_name : "anonymous"), + n->Store->Size); emit_comment(emitInfo, s); } return NULL; diff --git a/src/mesa/shader/slang/slang_ir.c b/src/mesa/shader/slang/slang_ir.c index 62603503dd9..c223004b22b 100644 --- a/src/mesa/shader/slang/slang_ir.c +++ b/src/mesa/shader/slang/slang_ir.c @@ -340,13 +340,13 @@ storage_string(const slang_ir_storage *st) assert(Elements(files) == PROGRAM_FILE_MAX); #if 0 if (st->Size == 1) - sprintf(s, "%s[%d]", files[st->File], st->Index); + _mesa_snprintf(s, "%s[%d]", files[st->File], st->Index); else - sprintf(s, "%s[%d..%d]", files[st->File], st->Index, - st->Index + st->Size - 1); + _mesa_snprintf(s, "%s[%d..%d]", files[st->File], st->Index, + st->Index + st->Size - 1); #endif assert(st->File < (GLint) (sizeof(files) / sizeof(files[0]))); - sprintf(s, "%s[%d]", files[st->File], st->Index); + _mesa_snprintf(s, sizeof(s), "%s[%d]", files[st->File], st->Index); return s; } diff --git a/src/mesa/shader/slang/slang_label.c b/src/mesa/shader/slang/slang_label.c index 225612a9369..8e3a8ebc1aa 100644 --- a/src/mesa/shader/slang/slang_label.c +++ b/src/mesa/shader/slang/slang_label.c @@ -37,7 +37,7 @@ _slang_label_new_unique(const char *name) free(l); return NULL; } - sprintf(l->Name, "%s_%d", name, id); + _mesa_snprintf(l->Name, strlen(name) + 10, "%s_%d", name, id); id++; l->Location = -1; } diff --git a/src/mesa/shader/slang/slang_link.c b/src/mesa/shader/slang/slang_link.c index f71fde1d727..b16778f8ad4 100644 --- a/src/mesa/shader/slang/slang_link.c +++ b/src/mesa/shader/slang/slang_link.c @@ -370,8 +370,9 @@ link_uniform_vars(GLcontext *ctx, GLuint newSampNum = *numSamplers; if (newSampNum >= ctx->Const.MaxTextureImageUnits) { char s[100]; - sprintf(s, "Too many texture samplers (%u, max is %u)", - newSampNum, ctx->Const.MaxTextureImageUnits); + _mesa_snprintf(s, sizeof(s), + "Too many texture samplers (%u, max is %u)", + newSampNum, ctx->Const.MaxTextureImageUnits); link_error(shProg, s); return GL_FALSE; } @@ -1028,7 +1029,10 @@ _slang_link(GLcontext *ctx, if (!vertNotify || !fragNotify) { /* driver rejected one/both of the vertex/fragment programs */ - link_error(shProg, "Vertex and/or fragment program rejected by driver\n"); + if (!shProg->InfoLog) { + link_error(shProg, + "Vertex and/or fragment program rejected by driver\n"); + } } else { shProg->LinkStatus = (shProg->VertexProgram || shProg->FragmentProgram); diff --git a/src/mesa/shader/slang/slang_print.c b/src/mesa/shader/slang/slang_print.c index 3c75523c42f..6b34f395fdf 100644 --- a/src/mesa/shader/slang/slang_print.c +++ b/src/mesa/shader/slang/slang_print.c @@ -813,7 +813,7 @@ static const char * slang_fq_type_string(const slang_fully_specified_type *t) { static char str[1000]; - sprintf(str, "%s %s", slang_type_qual_string(t->qualifier), + _mesa_snprintf(str, sizeof(str), "%s %s", slang_type_qual_string(t->qualifier), slang_type_string(t->specifier.type)); return str; } @@ -832,9 +832,9 @@ static char * slang_var_string(const slang_variable *v) { static char str[1000]; - sprintf(str, "%s : %s", - (char *) v->a_name, - slang_fq_type_string(&v->type)); + _mesa_snprintf(str, sizeof(str), "%s : %s", + (char *) v->a_name, + slang_fq_type_string(&v->type)); return str; } #endif diff --git a/src/mesa/shader/slang/slang_utility.c b/src/mesa/shader/slang/slang_utility.c index e77404f6928..c1d57409a43 100644 --- a/src/mesa/shader/slang/slang_utility.c +++ b/src/mesa/shader/slang/slang_utility.c @@ -120,7 +120,7 @@ slang_string_pushi (slang_string *self, GLint i) { char buffer[12]; - sprintf (buffer, "%d", i); + _mesa_snprintf (buffer, sizeof(buffer), "%d", i); slang_string_pushs (self, buffer, strlen (buffer)); } diff --git a/src/mesa/state_tracker/st_atom_framebuffer.c b/src/mesa/state_tracker/st_atom_framebuffer.c index 1cd55463379..52c507da3b3 100644 --- a/src/mesa/state_tracker/st_atom_framebuffer.c +++ b/src/mesa/state_tracker/st_atom_framebuffer.c @@ -153,6 +153,16 @@ update_framebuffer_state( struct st_context *st ) pipe_surface_reference(&framebuffer->zsbuf, NULL); } +#ifdef DEBUG + /* Make sure the resource binding flags were set properly */ + for (i = 0; i < framebuffer->nr_cbufs; i++) { + assert(framebuffer->cbufs[i]->texture->bind & PIPE_BIND_RENDER_TARGET); + } + if (framebuffer->zsbuf) { + assert(framebuffer->zsbuf->texture->bind & PIPE_BIND_DEPTH_STENCIL); + } +#endif + cso_set_framebuffer(st->cso_context, framebuffer); } diff --git a/src/mesa/state_tracker/st_atom_pixeltransfer.c b/src/mesa/state_tracker/st_atom_pixeltransfer.c index e8e67f80305..29c4d092bf0 100644 --- a/src/mesa/state_tracker/st_atom_pixeltransfer.c +++ b/src/mesa/state_tracker/st_atom_pixeltransfer.c @@ -115,7 +115,8 @@ make_state_key(GLcontext *ctx, struct state_key *key) static struct pipe_resource * create_color_map_texture(GLcontext *ctx) { - struct pipe_context *pipe = ctx->st->pipe; + struct st_context *st = st_context(ctx); + struct pipe_context *pipe = st->pipe; struct pipe_resource *pt; enum pipe_format format; const uint texSize = 256; /* simple, and usually perfect */ @@ -125,7 +126,7 @@ create_color_map_texture(GLcontext *ctx) PIPE_TEXTURE_2D, PIPE_BIND_SAMPLER_VIEW); /* create texture for color map/table */ - pt = st_texture_create(ctx->st, PIPE_TEXTURE_2D, format, 0, + pt = st_texture_create(st, PIPE_TEXTURE_2D, format, 0, texSize, texSize, 1, PIPE_BIND_SAMPLER_VIEW); return pt; } @@ -137,7 +138,8 @@ create_color_map_texture(GLcontext *ctx) static void load_color_map_texture(GLcontext *ctx, struct pipe_resource *pt) { - struct pipe_context *pipe = ctx->st->pipe; + struct st_context *st = st_context(ctx); + struct pipe_context *pipe = st->pipe; struct pipe_transfer *transfer; const GLuint rSize = ctx->PixelMaps.RtoR.Size; const GLuint gSize = ctx->PixelMaps.GtoG.Size; @@ -185,7 +187,7 @@ load_color_map_texture(GLcontext *ctx, struct pipe_resource *pt) static struct gl_fragment_program * get_pixel_transfer_program(GLcontext *ctx, const struct state_key *key) { - struct st_context *st = ctx->st; + struct st_context *st = st_context(ctx); struct prog_instruction inst[MAX_INST]; struct gl_program_parameter_list *params; struct gl_fragment_program *fp; @@ -256,8 +258,9 @@ get_pixel_transfer_program(GLcontext *ctx, const struct state_key *key) /* create the colormap/texture now if not already done */ if (!st->pixel_xfer.pixelmap_texture) { st->pixel_xfer.pixelmap_texture = create_color_map_texture(ctx); - st->pixel_xfer.pixelmap_sampler_view = st_create_texture_sampler_view(ctx->st->pipe, - st->pixel_xfer.pixelmap_texture); + st->pixel_xfer.pixelmap_sampler_view = + st_create_texture_sampler_view(st->pipe, + st->pixel_xfer.pixelmap_texture); } /* with a little effort, we can do four pixel map look-ups with diff --git a/src/mesa/state_tracker/st_atom_sampler.c b/src/mesa/state_tracker/st_atom_sampler.c index a8262a5e1aa..92fe72d4df6 100644 --- a/src/mesa/state_tracker/st_atom_sampler.c +++ b/src/mesa/state_tracker/st_atom_sampler.c @@ -194,9 +194,12 @@ update_samplers(struct st_context *st) sampler->normalized_coords = 1; sampler->lod_bias = st->ctx->Texture.Unit[su].LodBias; - sampler->min_lod = MAX2(0.0f, texobj->MinLod); - sampler->max_lod = MIN2(texobj->MaxLevel - texobj->BaseLevel, - texobj->MaxLod); + + sampler->min_lod = texobj->BaseLevel + texobj->MinLod; + if (sampler->min_lod < texobj->BaseLevel) + sampler->min_lod = texobj->BaseLevel; + + sampler->max_lod = MIN2((GLfloat) texobj->MaxLevel, texobj->MaxLod); if (sampler->max_lod < sampler->min_lod) { /* The GL spec doesn't seem to specify what to do in this case. * Swap the values. diff --git a/src/mesa/state_tracker/st_atom_texture.c b/src/mesa/state_tracker/st_atom_texture.c index f4294ac1e6f..2575adda8fc 100644 --- a/src/mesa/state_tracker/st_atom_texture.c +++ b/src/mesa/state_tracker/st_atom_texture.c @@ -138,7 +138,6 @@ finalize_textures(struct st_context *st) const GLuint texUnit = fprog->Base.SamplerUnits[su]; struct gl_texture_object *texObj = st->ctx->Texture.Unit[texUnit]._Current; - struct st_texture_object *stObj = st_texture_object(texObj); if (texObj) { GLboolean flush, retval; @@ -149,8 +148,6 @@ finalize_textures(struct st_context *st) st->missing_textures = GL_TRUE; continue; } - - stObj->teximage_realloc = TRUE; } } } diff --git a/src/mesa/state_tracker/st_cb_accum.c b/src/mesa/state_tracker/st_cb_accum.c index 2732969d956..0101837f999 100644 --- a/src/mesa/state_tracker/st_cb_accum.c +++ b/src/mesa/state_tracker/st_cb_accum.c @@ -223,7 +223,7 @@ accum_return(GLcontext *ctx, GLfloat value, struct st_renderbuffer *acc_strb, struct st_renderbuffer *color_strb) { - struct pipe_context *pipe = ctx->st->pipe; + struct pipe_context *pipe = st_context(ctx)->pipe; const GLubyte *colormask = ctx->Color.ColorMask[0]; enum pipe_transfer_usage usage; struct pipe_transfer *color_trans; @@ -287,7 +287,7 @@ accum_return(GLcontext *ctx, GLfloat value, static void st_Accum(GLcontext *ctx, GLenum op, GLfloat value) { - struct st_context *st = ctx->st; + struct st_context *st = st_context(ctx); struct st_renderbuffer *acc_strb = st_renderbuffer(ctx->DrawBuffer->Attachment[BUFFER_ACCUM].Renderbuffer); struct st_renderbuffer *color_strb diff --git a/src/mesa/state_tracker/st_cb_bitmap.c b/src/mesa/state_tracker/st_cb_bitmap.c index 12bba050a61..797c0ba7f55 100644 --- a/src/mesa/state_tracker/st_cb_bitmap.c +++ b/src/mesa/state_tracker/st_cb_bitmap.c @@ -114,6 +114,7 @@ struct bitmap_cache static struct st_fragment_program * make_bitmap_fragment_program(GLcontext *ctx, GLuint samplerIndex) { + struct st_context *st = st_context(ctx); struct st_fragment_program *stfp; struct gl_program *p; GLuint ic = 0; @@ -145,7 +146,7 @@ make_bitmap_fragment_program(GLcontext *ctx, GLuint samplerIndex) p->Instructions[ic].Opcode = OPCODE_KIL; p->Instructions[ic].SrcReg[0].File = PROGRAM_TEMPORARY; - if (ctx->st->bitmap.tex_format == PIPE_FORMAT_L8_UNORM) + if (st->bitmap.tex_format == PIPE_FORMAT_L8_UNORM) p->Instructions[ic].SrcReg[0].Swizzle = SWIZZLE_XXXX; p->Instructions[ic].SrcReg[0].Index = 0; @@ -187,7 +188,7 @@ find_free_bit(uint bitfield) static struct st_fragment_program * combined_bitmap_fragment_program(GLcontext *ctx) { - struct st_context *st = ctx->st; + struct st_context *st = st_context(ctx); struct st_fragment_program *stfp = st->fp; if (!stfp->bitmap_program) { @@ -258,7 +259,8 @@ make_bitmap_texture(GLcontext *ctx, GLsizei width, GLsizei height, const struct gl_pixelstore_attrib *unpack, const GLubyte *bitmap) { - struct pipe_context *pipe = ctx->st->pipe; + struct st_context *st = st_context(ctx); + struct pipe_context *pipe = st->pipe; struct pipe_transfer *transfer; ubyte *dest; struct pipe_resource *pt; @@ -272,7 +274,7 @@ make_bitmap_texture(GLcontext *ctx, GLsizei width, GLsizei height, /** * Create texture to hold bitmap pattern. */ - pt = st_texture_create(ctx->st, PIPE_TEXTURE_2D, ctx->st->bitmap.tex_format, + pt = st_texture_create(st, PIPE_TEXTURE_2D, st->bitmap.tex_format, 0, width, height, 1, PIPE_BIND_SAMPLER_VIEW); if (!pt) { @@ -280,7 +282,7 @@ make_bitmap_texture(GLcontext *ctx, GLsizei width, GLsizei height, return NULL; } - transfer = st_no_flush_get_tex_transfer(st_context(ctx), pt, 0, 0, 0, + transfer = st_no_flush_get_tex_transfer(st, pt, 0, 0, 0, PIPE_TRANSFER_WRITE, 0, 0, width, height); @@ -288,7 +290,7 @@ make_bitmap_texture(GLcontext *ctx, GLsizei width, GLsizei height, /* Put image into texture transfer */ memset(dest, 0xff, height * transfer->stride); - unpack_bitmap(ctx->st, 0, 0, width, height, unpack, bitmap, + unpack_bitmap(st, 0, 0, width, height, unpack, bitmap, dest, transfer->stride); _mesa_unmap_pbo_source(ctx, unpack); @@ -400,9 +402,9 @@ draw_bitmap_quad(GLcontext *ctx, GLint x, GLint y, GLfloat z, struct pipe_sampler_view *sv, const GLfloat *color) { - struct st_context *st = ctx->st; - struct pipe_context *pipe = ctx->st->pipe; - struct cso_context *cso = ctx->st->cso_context; + struct st_context *st = st_context(ctx); + struct pipe_context *pipe = st->pipe; + struct cso_context *cso = st->cso_context; struct st_fragment_program *stfp; GLuint maxSize; GLuint offset; @@ -732,7 +734,7 @@ static void st_Bitmap(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height, const struct gl_pixelstore_attrib *unpack, const GLubyte *bitmap ) { - struct st_context *st = ctx->st; + struct st_context *st = st_context(ctx); struct pipe_resource *pt; if (width == 0 || height == 0) diff --git a/src/mesa/state_tracker/st_cb_blit.c b/src/mesa/state_tracker/st_cb_blit.c index d6fdfaccd63..1c8dc0c07fb 100644 --- a/src/mesa/state_tracker/st_cb_blit.c +++ b/src/mesa/state_tracker/st_cb_blit.c @@ -68,7 +68,7 @@ st_BlitFramebuffer(GLcontext *ctx, { const GLbitfield depthStencil = (GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); - struct st_context *st = ctx->st; + struct st_context *st = st_context(ctx); struct pipe_context *pipe = st->pipe; const uint pFilter = ((filter == GL_NEAREST) ? PIPE_TEX_MIPFILTER_NEAREST diff --git a/src/mesa/state_tracker/st_cb_clear.c b/src/mesa/state_tracker/st_cb_clear.c index 2f77aff7a6c..736180ddc6c 100644 --- a/src/mesa/state_tracker/st_cb_clear.c +++ b/src/mesa/state_tracker/st_cb_clear.c @@ -109,11 +109,10 @@ st_destroy_clear(struct st_context *st) * Coords are clip coords with y=0=bottom. */ static void -draw_quad(GLcontext *ctx, +draw_quad(struct st_context *st, float x0, float y0, float x1, float y1, GLfloat z, const GLfloat color[4]) { - struct st_context *st = ctx->st; struct pipe_context *pipe = st->pipe; /* XXX: Need to improve buffer_write to allow NO_WAIT (as well as @@ -193,7 +192,7 @@ static void clear_with_quad(GLcontext *ctx, GLboolean color, GLboolean depth, GLboolean stencil) { - struct st_context *st = ctx->st; + struct st_context *st = st_context(ctx); const struct gl_framebuffer *fb = ctx->DrawBuffer; const GLfloat fb_width = (GLfloat) fb->Width; const GLfloat fb_height = (GLfloat) fb->Height; @@ -295,7 +294,7 @@ clear_with_quad(GLcontext *ctx, cso_set_vertex_shader_handle(st->cso_context, st->clear.vs); /* draw quad matching scissor rect (XXX verify coord round-off) */ - draw_quad(ctx, x0, y0, x1, y1, + draw_quad(st, x0, y0, x1, y1, (GLfloat) ctx->Depth.Clear, ctx->Color.ClearColor); /* Restore pipe state */ @@ -448,7 +447,7 @@ st_Clear(GLcontext *ctx, GLbitfield mask) { static const GLbitfield BUFFER_BITS_DS = (BUFFER_BIT_DEPTH | BUFFER_BIT_STENCIL); - struct st_context *st = ctx->st; + struct st_context *st = st_context(ctx); struct gl_renderbuffer *depthRb = ctx->DrawBuffer->Attachment[BUFFER_DEPTH].Renderbuffer; struct gl_renderbuffer *stencilRb @@ -530,8 +529,8 @@ st_Clear(GLcontext *ctx, GLbitfield mask) mask & BUFFER_BIT_DEPTH, mask & BUFFER_BIT_STENCIL); } else if (clear_buffers) - ctx->st->pipe->clear(ctx->st->pipe, clear_buffers, ctx->Color.ClearColor, - ctx->Depth.Clear, ctx->Stencil.Clear); + st->pipe->clear(st->pipe, clear_buffers, ctx->Color.ClearColor, + ctx->Depth.Clear, ctx->Stencil.Clear); if (mask & BUFFER_BIT_ACCUM) st_clear_accum_buffer(ctx, diff --git a/src/mesa/state_tracker/st_cb_condrender.c b/src/mesa/state_tracker/st_cb_condrender.c index 8483b93bd85..b509d43b7c6 100644 --- a/src/mesa/state_tracker/st_cb_condrender.c +++ b/src/mesa/state_tracker/st_cb_condrender.c @@ -51,7 +51,7 @@ st_BeginConditionalRender(GLcontext *ctx, struct gl_query_object *q, GLenum mode) { struct st_query_object *stq = st_query_object(q); - struct pipe_context *pipe = ctx->st->pipe; + struct pipe_context *pipe = st_context(ctx)->pipe; uint m; switch (mode) { @@ -82,7 +82,7 @@ st_BeginConditionalRender(GLcontext *ctx, struct gl_query_object *q, static void st_EndConditionalRender(GLcontext *ctx, struct gl_query_object *q) { - struct pipe_context *pipe = ctx->st->pipe; + struct pipe_context *pipe = st_context(ctx)->pipe; (void) q; pipe->render_condition(pipe, NULL, 0); } diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c index 2c18ded2abf..e059002f157 100644 --- a/src/mesa/state_tracker/st_cb_drawpixels.c +++ b/src/mesa/state_tracker/st_cb_drawpixels.c @@ -858,7 +858,7 @@ copy_stencil_pixels(GLcontext *ctx, GLint srcx, GLint srcy, GLint dstx, GLint dsty) { struct st_renderbuffer *rbDraw = st_renderbuffer(ctx->DrawBuffer->_StencilBuffer); - struct pipe_context *pipe = ctx->st->pipe; + struct pipe_context *pipe = st_context(ctx)->pipe; enum pipe_transfer_usage usage; struct pipe_transfer *ptDraw; ubyte *drawMap; diff --git a/src/mesa/state_tracker/st_cb_eglimage.c b/src/mesa/state_tracker/st_cb_eglimage.c index a924f872232..0fa1848e232 100644 --- a/src/mesa/state_tracker/st_cb_eglimage.c +++ b/src/mesa/state_tracker/st_cb_eglimage.c @@ -74,7 +74,7 @@ st_egl_image_target_renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb, GLeglImageOES image_handle) { - struct st_context *st = ctx->st; + struct st_context *st = st_context(ctx); struct st_renderbuffer *strb = st_renderbuffer(rb); struct pipe_surface *ps; unsigned usage; @@ -138,7 +138,7 @@ st_egl_image_target_texture_2d(GLcontext *ctx, GLenum target, struct gl_texture_image *texImage, GLeglImageOES image_handle) { - struct st_context *st = ctx->st; + struct st_context *st = st_context(ctx); struct pipe_surface *ps; unsigned usage; diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c index 1ba1fe1b972..c02121fbd1a 100644 --- a/src/mesa/state_tracker/st_cb_fbo.c +++ b/src/mesa/state_tracker/st_cb_fbo.c @@ -64,7 +64,8 @@ st_renderbuffer_alloc_storage(GLcontext * ctx, struct gl_renderbuffer *rb, GLenum internalFormat, GLuint width, GLuint height) { - struct pipe_screen *screen = ctx->st->pipe->screen; + struct st_context *st = st_context(ctx); + struct pipe_screen *screen = st->pipe->screen; struct st_renderbuffer *strb = st_renderbuffer(rb); enum pipe_format format; @@ -312,23 +313,21 @@ st_render_texture(GLcontext *ctx, struct gl_framebuffer *fb, struct gl_renderbuffer_attachment *att) { - struct st_context *st = ctx->st; + struct st_context *st = st_context(ctx); struct pipe_context *pipe = st->pipe; - struct pipe_screen *screen = ctx->st->pipe->screen; + struct pipe_screen *screen = pipe->screen; struct st_renderbuffer *strb; struct gl_renderbuffer *rb; struct pipe_resource *pt = st_get_texobj_resource(att->Texture); struct st_texture_object *stObj; const struct gl_texture_image *texImage; - GLint pt_level; /* When would this fail? Perhaps assert? */ if (!pt) return; - /* The first gallium texture level = Mesa BaseLevel */ - pt_level = MAX2(0, (GLint) att->TextureLevel - att->Texture->BaseLevel); - texImage = att->Texture->Image[att->CubeMapFace][pt_level]; + /* get pointer to texture image we're rendeing to */ + texImage = att->Texture->Image[att->CubeMapFace][att->TextureLevel]; /* create new renderbuffer which wraps the texture image */ rb = st_new_renderbuffer(ctx, 0); @@ -349,7 +348,7 @@ st_render_texture(GLcontext *ctx, /* point renderbuffer at texobject */ strb->rtt = stObj; - strb->rtt_level = pt_level; + strb->rtt_level = att->TextureLevel; strb->rtt_face = att->CubeMapFace; strb->rtt_slice = att->Zoffset; @@ -403,12 +402,13 @@ static void st_finish_render_texture(GLcontext *ctx, struct gl_renderbuffer_attachment *att) { + struct st_context *st = st_context(ctx); struct st_renderbuffer *strb = st_renderbuffer(att->Renderbuffer); if (!strb) return; - st_flush( ctx->st, PIPE_FLUSH_RENDER_CACHE, NULL ); + st_flush(st, PIPE_FLUSH_RENDER_CACHE, NULL); strb->rtt = NULL; @@ -422,23 +422,19 @@ st_finish_render_texture(GLcontext *ctx, /** - * Validate a renderbuffer attachment for a particular usage. + * Validate a renderbuffer attachment for a particular set of bindings. */ - static GLboolean st_validate_attachment(struct pipe_screen *screen, const struct gl_renderbuffer_attachment *att, - GLuint usage) + unsigned bindings) { - const struct st_texture_object *stObj = - st_texture_object(att->Texture); + const struct st_texture_object *stObj = st_texture_object(att->Texture); - /** - * Only validate texture attachments for now, since + /* Only validate texture attachments for now, since * st_renderbuffer_alloc_storage makes sure that * the format is supported. */ - if (att->Type != GL_TEXTURE) return GL_TRUE; @@ -446,10 +442,10 @@ st_validate_attachment(struct pipe_screen *screen, return GL_FALSE; return screen->is_format_supported(screen, stObj->pt->format, - PIPE_TEXTURE_2D, - usage, 0); + PIPE_TEXTURE_2D, bindings, 0); } + /** * Check that the framebuffer configuration is valid in terms of what * the driver can support. @@ -459,7 +455,8 @@ st_validate_attachment(struct pipe_screen *screen, static void st_validate_framebuffer(GLcontext *ctx, struct gl_framebuffer *fb) { - struct pipe_screen *screen = ctx->st->pipe->screen; + struct st_context *st = st_context(ctx); + struct pipe_screen *screen = st->pipe->screen; const struct gl_renderbuffer *depthRb = fb->Attachment[BUFFER_DEPTH].Renderbuffer; const struct gl_renderbuffer *stencilRb = @@ -500,6 +497,7 @@ st_validate_framebuffer(GLcontext *ctx, struct gl_framebuffer *fb) static void st_DrawBuffers(GLcontext *ctx, GLsizei count, const GLenum *buffers) { + struct st_context *st = st_context(ctx); GLframebuffer *fb = ctx->DrawBuffer; GLuint i; @@ -509,7 +507,7 @@ st_DrawBuffers(GLcontext *ctx, GLsizei count, const GLenum *buffers) /* add the renderbuffers on demand */ for (i = 0; i < fb->_NumColorDrawBuffers; i++) { gl_buffer_index idx = fb->_ColorDrawBufferIndexes[i]; - st_manager_add_color_renderbuffer(ctx->st, fb, idx); + st_manager_add_color_renderbuffer(st, fb, idx); } } @@ -520,12 +518,13 @@ st_DrawBuffers(GLcontext *ctx, GLsizei count, const GLenum *buffers) static void st_ReadBuffer(GLcontext *ctx, GLenum buffer) { + struct st_context *st = st_context(ctx); GLframebuffer *fb = ctx->ReadBuffer; (void) buffer; /* add the renderbuffer on demand */ - st_manager_add_color_renderbuffer(ctx->st, fb, fb->_ColorReadBufferIndex); + st_manager_add_color_renderbuffer(st, fb, fb->_ColorReadBufferIndex); } diff --git a/src/mesa/state_tracker/st_cb_feedback.c b/src/mesa/state_tracker/st_cb_feedback.c index 37b1fb55f4a..c85d3da84a2 100644 --- a/src/mesa/state_tracker/st_cb_feedback.c +++ b/src/mesa/state_tracker/st_cb_feedback.c @@ -80,7 +80,7 @@ static void feedback_vertex(GLcontext *ctx, const struct draw_context *draw, const struct vertex_header *v) { - const struct st_context *st = ctx->st; + const struct st_context *st = st_context(ctx); GLfloat win[4]; const GLfloat *color, *texcoord; GLuint slot; @@ -271,7 +271,7 @@ draw_glselect_stage(GLcontext *ctx, struct draw_context *draw) static void st_RenderMode(GLcontext *ctx, GLenum newMode ) { - struct st_context *st = ctx->st; + struct st_context *st = st_context(ctx); struct draw_context *draw = st->draw; if (newMode == GL_RENDER) { diff --git a/src/mesa/state_tracker/st_cb_flush.c b/src/mesa/state_tracker/st_cb_flush.c index 415e8f3d2a2..8c9959f9544 100644 --- a/src/mesa/state_tracker/st_cb_flush.c +++ b/src/mesa/state_tracker/st_cb_flush.c @@ -115,7 +115,7 @@ void st_finish( struct st_context *st ) */ static void st_glFlush(GLcontext *ctx) { - struct st_context *st = ctx->st; + struct st_context *st = st_context(ctx); /* Don't call st_finish() here. It is not the state tracker's * responsibilty to inject sleeps in the hope of avoiding buffer @@ -135,7 +135,7 @@ static void st_glFlush(GLcontext *ctx) */ static void st_glFinish(GLcontext *ctx) { - struct st_context *st = ctx->st; + struct st_context *st = st_context(ctx); st_finish(st); diff --git a/src/mesa/state_tracker/st_cb_queryobj.c b/src/mesa/state_tracker/st_cb_queryobj.c index c66729b1244..1896663932c 100644 --- a/src/mesa/state_tracker/st_cb_queryobj.c +++ b/src/mesa/state_tracker/st_cb_queryobj.c @@ -61,7 +61,7 @@ st_NewQueryObject(GLcontext *ctx, GLuint id) static void st_DeleteQuery(GLcontext *ctx, struct gl_query_object *q) { - struct pipe_context *pipe = ctx->st->pipe; + struct pipe_context *pipe = st_context(ctx)->pipe; struct st_query_object *stq = st_query_object(q); if (stq->pq) { @@ -76,7 +76,7 @@ st_DeleteQuery(GLcontext *ctx, struct gl_query_object *q) static void st_BeginQuery(GLcontext *ctx, struct gl_query_object *q) { - struct pipe_context *pipe = ctx->st->pipe; + struct pipe_context *pipe = st_context(ctx)->pipe; struct st_query_object *stq = st_query_object(q); switch (q->Target) { @@ -96,7 +96,7 @@ st_BeginQuery(GLcontext *ctx, struct gl_query_object *q) static void st_EndQuery(GLcontext *ctx, struct gl_query_object *q) { - struct pipe_context *pipe = ctx->st->pipe; + struct pipe_context *pipe = st_context(ctx)->pipe; struct st_query_object *stq = st_query_object(q); pipe->end_query(pipe, stq->pq); @@ -106,7 +106,7 @@ st_EndQuery(GLcontext *ctx, struct gl_query_object *q) static void st_WaitQuery(GLcontext *ctx, struct gl_query_object *q) { - struct pipe_context *pipe = ctx->st->pipe; + struct pipe_context *pipe = st_context(ctx)->pipe; struct st_query_object *stq = st_query_object(q); /* this function should only be called if we don't have a ready result */ @@ -128,7 +128,7 @@ st_WaitQuery(GLcontext *ctx, struct gl_query_object *q) static void st_CheckQuery(GLcontext *ctx, struct gl_query_object *q) { - struct pipe_context *pipe = ctx->st->pipe; + struct pipe_context *pipe = st_context(ctx)->pipe; struct st_query_object *stq = st_query_object(q); assert(!q->Ready); /* we should not get called if Ready is TRUE */ q->Ready = pipe->get_query_result(pipe, stq->pq, FALSE, &q->Result); diff --git a/src/mesa/state_tracker/st_cb_rasterpos.c b/src/mesa/state_tracker/st_cb_rasterpos.c index 752b411b5fc..843f3200278 100644 --- a/src/mesa/state_tracker/st_cb_rasterpos.c +++ b/src/mesa/state_tracker/st_cb_rasterpos.c @@ -133,7 +133,7 @@ rastpos_point(struct draw_stage *stage, struct prim_header *prim) { struct rastpos_stage *rs = rastpos_stage(stage); GLcontext *ctx = rs->ctx; - struct st_context *st = ctx->st; + struct st_context *st = st_context(ctx); const GLfloat height = (GLfloat) ctx->DrawBuffer->Height; const GLuint *outputMapping = st->vertex_result_to_slot; const GLfloat *pos; @@ -221,7 +221,7 @@ new_draw_rastpos_stage(GLcontext *ctx, struct draw_context *draw) static void st_RasterPos(GLcontext *ctx, const GLfloat v[4]) { - struct st_context *st = ctx->st; + struct st_context *st = st_context(ctx); struct draw_context *draw = st->draw; struct rastpos_stage *rs; @@ -239,7 +239,7 @@ st_RasterPos(GLcontext *ctx, const GLfloat v[4]) draw_set_rasterize_stage(st->draw, st->rastpos_stage); /* make sure everything's up to date */ - st_validate_state(ctx->st); + st_validate_state(st); /* This will get set only if rastpos_point(), above, gets called */ ctx->Current.RasterPosValid = GL_FALSE; diff --git a/src/mesa/state_tracker/st_cb_readpixels.c b/src/mesa/state_tracker/st_cb_readpixels.c index 67c3b9adbb9..69950ac44bb 100644 --- a/src/mesa/state_tracker/st_cb_readpixels.c +++ b/src/mesa/state_tracker/st_cb_readpixels.c @@ -63,7 +63,7 @@ st_read_stencil_pixels(GLcontext *ctx, GLint x, GLint y, GLvoid *pixels) { struct gl_framebuffer *fb = ctx->ReadBuffer; - struct pipe_context *pipe = ctx->st->pipe; + struct pipe_context *pipe = st_context(ctx)->pipe; struct st_renderbuffer *strb = st_renderbuffer(fb->_StencilBuffer); struct pipe_transfer *pt; ubyte *stmap; @@ -220,7 +220,7 @@ st_fast_readpixels(GLcontext *ctx, struct st_renderbuffer *strb, /*printf("st_fast_readpixels combo %d\n", (GLint) combo);*/ { - struct pipe_context *pipe = ctx->st->pipe; + struct pipe_context *pipe = st_context(ctx)->pipe; struct pipe_transfer *trans; const GLubyte *map; GLubyte *dst; @@ -322,7 +322,8 @@ st_readpixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height, const struct gl_pixelstore_attrib *pack, GLvoid *dest) { - struct pipe_context *pipe = ctx->st->pipe; + struct st_context *st = st_context(ctx); + struct pipe_context *pipe = st->pipe; GLfloat temp[MAX_WIDTH][4]; const GLbitfield transferOps = ctx->_ImageTransferState; GLsizei i, j; @@ -337,7 +338,7 @@ st_readpixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height, /* XXX convolution not done yet */ assert((transferOps & IMAGE_CONVOLUTION_BIT) == 0); - st_validate_state(ctx->st); + st_validate_state(st); /* Do all needed clipping here, so that we can forget about it later */ if (!_mesa_clip_readpixels(ctx, &x, &y, &width, &height, &clippedPacking)) { @@ -349,7 +350,7 @@ st_readpixels(GLcontext *ctx, GLint x, GLint y, GLsizei width, GLsizei height, if (!dest) return; - st_flush(ctx->st, PIPE_FLUSH_RENDER_CACHE, NULL); + st_flush(st, PIPE_FLUSH_RENDER_CACHE, NULL); if (format == GL_STENCIL_INDEX || format == GL_DEPTH_STENCIL) { diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index ed113b5dbc3..7e2e533881d 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -120,17 +120,18 @@ static void st_DeleteTextureObject(GLcontext *ctx, struct gl_texture_object *texObj) { + struct st_context *st = st_context(ctx); struct st_texture_object *stObj = st_texture_object(texObj); if (stObj->pt) pipe_resource_reference(&stObj->pt, NULL); if (stObj->sampler_view) { - if (stObj->sampler_view->context != ctx->st->pipe) { + if (stObj->sampler_view->context != st->pipe) { /* Take "ownership" of this texture sampler view by setting * its context pointer to this context. This avoids potential * crashes when the texture object is shared among contexts * and the original/owner context has already been destroyed. */ - stObj->sampler_view->context = ctx->st->pipe; + stObj->sampler_view->context = st->pipe; } pipe_sampler_view_reference(&stObj->sampler_view, NULL); } @@ -208,84 +209,108 @@ do_memcpy(void *dest, const void *src, size_t n) /** - * Return default texture usage bitmask for the given texture format. + * Return default texture resource binding bitmask for the given format. */ static GLuint -default_usage(enum pipe_format fmt) +default_bindings(struct st_context *st, enum pipe_format format) { - GLuint usage = PIPE_BIND_SAMPLER_VIEW; - if (util_format_is_depth_or_stencil(fmt)) - usage |= PIPE_BIND_DEPTH_STENCIL; + struct pipe_screen *screen = st->pipe->screen; + const unsigned target = PIPE_TEXTURE_2D; + const unsigned geom = 0x0; + unsigned bindings; + + if (util_format_is_depth_or_stencil(format)) + bindings = PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_DEPTH_STENCIL; + else + bindings = PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET; + + if (screen->is_format_supported(screen, format, target, bindings, geom)) + return bindings; else - usage |= PIPE_BIND_RENDER_TARGET; - return usage; + return PIPE_BIND_SAMPLER_VIEW; +} + + +/** Return number of image dimensions (1, 2 or 3) for a texture target. */ +static GLuint +get_texture_dims(GLenum target) +{ + switch (target) { + case GL_TEXTURE_1D: + case GL_TEXTURE_1D_ARRAY_EXT: + return 1; + case GL_TEXTURE_2D: + case GL_TEXTURE_CUBE_MAP_ARB: + case GL_TEXTURE_RECTANGLE_NV: + case GL_TEXTURE_2D_ARRAY_EXT: + return 2; + case GL_TEXTURE_3D: + return 3; + default: + assert(0 && "invalid texture target in get_texture_dims()"); + return 1; + } } /** - * Allocate a pipe_resource object for the given st_texture_object using - * the given st_texture_image to guess the mipmap size/levels. + * Try to allocate a pipe_resource object for the given st_texture_object. * - * [comments...] - * Otherwise, store it in memory if (Border != 0) or (any dimension == - * 1). - * - * Otherwise, if max_level >= level >= min_level, create texture with - * space for images from min_level down to max_level. + * We use the given st_texture_image as a clue to determine the size of the + * mipmap image at level=0. * - * Otherwise, create texture with space for images from (level 0)..(1x1). - * Consider pruning this texture at a validation if the saving is worth it. */ static void guess_and_alloc_texture(struct st_context *st, struct st_texture_object *stObj, const struct st_texture_image *stImage) { - GLuint firstLevel; - GLuint lastLevel; - GLuint width = stImage->base.Width2; /* size w/out border */ - GLuint height = stImage->base.Height2; - GLuint depth = stImage->base.Depth2; - GLuint i, usage; + const GLuint dims = get_texture_dims(stObj->base.Target); + GLuint level, lastLevel, width, height, depth; + GLuint bindings; enum pipe_format fmt; DBG("%s\n", __FUNCTION__); assert(!stObj->pt); - if (stObj->pt && - (GLint) stImage->level > stObj->base.BaseLevel && - (stImage->base.Width == 1 || - (stObj->base.Target != GL_TEXTURE_1D && - stImage->base.Height == 1) || - (stObj->base.Target == GL_TEXTURE_3D && - stImage->base.Depth == 1))) - return; - - /* If this image disrespects BaseLevel, allocate from level zero. - * Usually BaseLevel == 0, so it's unlikely to happen. - */ - if ((GLint) stImage->level < stObj->base.BaseLevel) - firstLevel = 0; - else - firstLevel = stObj->base.BaseLevel; + level = stImage->level; + width = stImage->base.Width2; /* size w/out border */ + height = stImage->base.Height2; + depth = stImage->base.Depth2; + assert(width > 0); + assert(height > 0); + assert(depth > 0); - /* Figure out image dimensions at start level. + /* Depending on the image's size, we can't always make a guess here. */ - for (i = stImage->level; i > firstLevel; i--) { + if (level > 0) { + if ( (dims >= 1 && width == 1) || + (dims >= 2 && height == 1) || + (dims >= 3 && depth == 1) ) { + /* we can't determine the image size at level=0 */ + stObj->width0 = stObj->height0 = stObj->depth0 = 0; + return; + } + } + + /* grow the image size until we hit level = 0 */ + while (level > 0) { if (width != 1) width <<= 1; if (height != 1) height <<= 1; if (depth != 1) depth <<= 1; - } + level--; + } - if (width == 0 || height == 0 || depth == 0) { - /* no texture needed */ - return; - } + assert(level == 0); + + /* At this point, (width x height x depth) is the expected size of + * the level=0 mipmap image. + */ /* Guess a reasonable value for lastLevel. This is probably going * to be wrong fairly often and might mean that we have to look at @@ -297,21 +322,26 @@ guess_and_alloc_texture(struct st_context *st, stImage->base._BaseFormat == GL_DEPTH_COMPONENT || stImage->base._BaseFormat == GL_DEPTH_STENCIL_EXT) && !stObj->base.GenerateMipmap && - stImage->level == firstLevel) { + stImage->level == 0) { /* only alloc space for a single mipmap level */ - lastLevel = firstLevel; + lastLevel = 0; } else { /* alloc space for a full mipmap */ GLuint l2width = util_logbase2(width); GLuint l2height = util_logbase2(height); GLuint l2depth = util_logbase2(depth); - lastLevel = firstLevel + MAX2(MAX2(l2width, l2height), l2depth); + lastLevel = MAX2(MAX2(l2width, l2height), l2depth); } + /* Save the level=0 dimensions */ + stObj->width0 = width; + stObj->height0 = height; + stObj->depth0 = depth; + fmt = st_mesa_format_to_pipe_format(stImage->base.TexFormat); - usage = default_usage(fmt); + bindings = default_bindings(st, fmt); stObj->pt = st_texture_create(st, gl_target_to_pipe(stObj->base.Target), @@ -320,7 +350,7 @@ guess_and_alloc_texture(struct st_context *st, width, height, depth, - usage); + bindings); DBG("%s - success\n", __FUNCTION__); } @@ -381,7 +411,8 @@ compress_with_blit(GLcontext * ctx, { const GLuint dstImageOffsets[1] = {0}; struct st_texture_image *stImage = st_texture_image(texImage); - struct pipe_context *pipe = ctx->st->pipe; + struct st_context *st = st_context(ctx); + struct pipe_context *pipe = st->pipe; struct pipe_screen *screen = pipe->screen; gl_format mesa_format; struct pipe_resource templ; @@ -458,7 +489,7 @@ compress_with_blit(GLcontext * ctx, /* copy / compress image */ - util_blit_pixels_tex(ctx->st->blit, + util_blit_pixels_tex(st->blit, src_view, /* sampler view (src) */ 0, 0, /* src x0, y0 */ width, height, /* src x1, y1 */ @@ -493,7 +524,8 @@ st_TexImage(GLcontext * ctx, struct gl_texture_image *texImage, GLsizei imageSize, GLboolean compressed_src) { - struct pipe_screen *screen = ctx->st->pipe->screen; + struct st_context *st = st_context(ctx); + struct pipe_screen *screen = st->pipe->screen; struct st_texture_object *stObj = st_texture_object(texObj); struct st_texture_image *stImage = st_texture_image(texImage); GLint postConvWidth, postConvHeight; @@ -570,15 +602,13 @@ st_TexImage(GLcontext * ctx, * mipmap. If so, free the old mipmap. */ if (stObj->pt) { - if (stObj->teximage_realloc || - level > (GLint) stObj->pt->last_level || + if (level > (GLint) stObj->pt->last_level || !st_texture_match_image(stObj->pt, &stImage->base, stImage->face, stImage->level)) { DBG("release it\n"); pipe_resource_reference(&stObj->pt, NULL); assert(!stObj->pt); pipe_sampler_view_reference(&stObj->sampler_view, NULL); - stObj->teximage_realloc = FALSE; } } @@ -588,13 +618,13 @@ st_TexImage(GLcontext * ctx, } if (!stObj->pt) { - guess_and_alloc_texture(ctx->st, stObj, stImage); + guess_and_alloc_texture(st, stObj, stImage); if (!stObj->pt) { /* Probably out of memory. * Try flushing any pending rendering, then retry. */ - st_finish(ctx->st); - guess_and_alloc_texture(ctx->st, stObj, stImage); + st_finish(st); + guess_and_alloc_texture(st, stObj, stImage); if (!stObj->pt) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage"); return; @@ -659,7 +689,7 @@ st_TexImage(GLcontext * ctx, else transfer_usage = PIPE_TRANSFER_WRITE; - texImage->Data = st_texture_image_map(ctx->st, stImage, 0, + texImage->Data = st_texture_image_map(st, stImage, 0, transfer_usage, 0, 0, stImage->base.Width, stImage->base.Height); @@ -740,9 +770,9 @@ st_TexImage(GLcontext * ctx, if (stImage->pt && i + 1 < depth) { /* unmap this slice */ - st_texture_image_unmap(ctx->st, stImage); + st_texture_image_unmap(st, stImage); /* map next slice of 3D texture */ - texImage->Data = st_texture_image_map(ctx->st, stImage, i + 1, + texImage->Data = st_texture_image_map(st, stImage, i + 1, transfer_usage, 0, 0, stImage->base.Width, stImage->base.Height); @@ -755,7 +785,7 @@ done: _mesa_unmap_teximage_pbo(ctx, unpack); if (stImage->pt && texImage->Data) { - st_texture_image_unmap(ctx->st, stImage); + st_texture_image_unmap(st, stImage); texImage->Data = NULL; } } @@ -832,7 +862,8 @@ decompress_with_blit(GLcontext * ctx, GLenum target, GLint level, struct gl_texture_object *texObj, struct gl_texture_image *texImage) { - struct pipe_context *pipe = ctx->st->pipe; + struct st_context *st = st_context(ctx); + struct pipe_context *pipe = st->pipe; struct pipe_screen *screen = pipe->screen; struct st_texture_image *stImage = st_texture_image(texImage); struct st_texture_object *stObj = st_texture_object(texObj); @@ -856,7 +887,7 @@ decompress_with_blit(GLcontext * ctx, GLenum target, GLint level, } /* blit/render/decompress */ - util_blit_pixels_tex(ctx->st->blit, + util_blit_pixels_tex(st->blit, src_view, /* pipe_resource (src) */ 0, 0, /* src x0, y0 */ width, height, /* src x1, y1 */ @@ -928,6 +959,7 @@ st_get_tex_image(GLcontext * ctx, GLenum target, GLint level, struct gl_texture_object *texObj, struct gl_texture_image *texImage, GLboolean compressed_dst) { + struct st_context *st = st_context(ctx); struct st_texture_image *stImage = st_texture_image(texImage); const GLuint dstImageStride = _mesa_image_image_stride(&ctx->Pack, texImage->Width, texImage->Height, @@ -954,14 +986,17 @@ st_get_tex_image(GLcontext * ctx, GLenum target, GLint level, */ unsigned face = _mesa_tex_target_to_face(target); - st_teximage_flush_before_map(ctx->st, stImage->pt, face, level, + st_teximage_flush_before_map(st, stImage->pt, face, level, PIPE_TRANSFER_READ); - texImage->Data = st_texture_image_map(ctx->st, stImage, 0, + texImage->Data = st_texture_image_map(st, stImage, 0, PIPE_TRANSFER_READ, 0, 0, stImage->base.Width, stImage->base.Height); - texImage->RowStride = stImage->transfer->stride / util_format_get_blocksize(stImage->pt->format); + /* compute stride in texels from stride in bytes */ + texImage->RowStride = stImage->transfer->stride + * util_format_get_blockwidth(stImage->pt->format) + / util_format_get_blocksize(stImage->pt->format); } else { /* Otherwise, the image should actually be stored in @@ -992,9 +1027,9 @@ st_get_tex_image(GLcontext * ctx, GLenum target, GLint level, if (stImage->pt && i + 1 < depth) { /* unmap this slice */ - st_texture_image_unmap(ctx->st, stImage); + st_texture_image_unmap(st, stImage); /* map next slice of 3D texture */ - texImage->Data = st_texture_image_map(ctx->st, stImage, i + 1, + texImage->Data = st_texture_image_map(st, stImage, i + 1, PIPE_TRANSFER_READ, 0, 0, stImage->base.Width, stImage->base.Height); @@ -1006,7 +1041,7 @@ st_get_tex_image(GLcontext * ctx, GLenum target, GLint level, /* Unmap */ if (stImage->pt) { - st_texture_image_unmap(ctx->st, stImage); + st_texture_image_unmap(st, stImage); texImage->Data = NULL; } } @@ -1044,7 +1079,8 @@ st_TexSubimage(GLcontext *ctx, GLint dims, GLenum target, GLint level, struct gl_texture_object *texObj, struct gl_texture_image *texImage) { - struct pipe_screen *screen = ctx->st->pipe->screen; + struct st_context *st = st_context(ctx); + struct pipe_screen *screen = st->pipe->screen; struct st_texture_image *stImage = st_texture_image(texImage); GLuint dstRowStride; const GLuint srcImageStride = @@ -1092,9 +1128,9 @@ st_TexSubimage(GLcontext *ctx, GLint dims, GLenum target, GLint level, else transfer_usage = PIPE_TRANSFER_WRITE; - st_teximage_flush_before_map(ctx->st, stImage->pt, face, level, + st_teximage_flush_before_map(st, stImage->pt, face, level, transfer_usage); - texImage->Data = st_texture_image_map(ctx->st, stImage, zoffset, + texImage->Data = st_texture_image_map(st, stImage, zoffset, transfer_usage, xoffset, yoffset, width, height); @@ -1122,9 +1158,9 @@ st_TexSubimage(GLcontext *ctx, GLint dims, GLenum target, GLint level, if (stImage->pt && i + 1 < depth) { /* unmap this slice */ - st_texture_image_unmap(ctx->st, stImage); + st_texture_image_unmap(st, stImage); /* map next slice of 3D texture */ - texImage->Data = st_texture_image_map(ctx->st, stImage, + texImage->Data = st_texture_image_map(st, stImage, zoffset + i + 1, transfer_usage, xoffset, yoffset, @@ -1137,7 +1173,7 @@ done: _mesa_unmap_teximage_pbo(ctx, packing); if (stImage->pt && texImage->Data) { - st_texture_image_unmap(ctx->st, stImage); + st_texture_image_unmap(st, stImage); texImage->Data = NULL; } } @@ -1208,6 +1244,7 @@ st_CompressedTexSubImage2D(GLcontext *ctx, GLenum target, GLint level, struct gl_texture_object *texObj, struct gl_texture_image *texImage) { + struct st_context *st = st_context(ctx); struct st_texture_image *stImage = st_texture_image(texImage); int srcBlockStride; int dstBlockStride; @@ -1218,9 +1255,9 @@ st_CompressedTexSubImage2D(GLcontext *ctx, GLenum target, GLint level, unsigned face = _mesa_tex_target_to_face(target); pformat = stImage->pt->format; - st_teximage_flush_before_map(ctx->st, stImage->pt, face, level, + st_teximage_flush_before_map(st, stImage->pt, face, level, PIPE_TRANSFER_WRITE); - texImage->Data = st_texture_image_map(ctx->st, stImage, 0, + texImage->Data = st_texture_image_map(st, stImage, 0, PIPE_TRANSFER_WRITE, xoffset, yoffset, width, height); @@ -1252,7 +1289,7 @@ st_CompressedTexSubImage2D(GLcontext *ctx, GLenum target, GLint level, } if (stImage->pt) { - st_texture_image_unmap(ctx->st, stImage); + st_texture_image_unmap(st, stImage); texImage->Data = NULL; } } @@ -1288,7 +1325,8 @@ fallback_copy_texsubimage(GLcontext *ctx, GLenum target, GLint level, GLint srcX, GLint srcY, GLsizei width, GLsizei height) { - struct pipe_context *pipe = ctx->st->pipe; + struct st_context *st = st_context(ctx); + struct pipe_context *pipe = st->pipe; struct pipe_transfer *src_trans; GLvoid *texDest; enum pipe_transfer_usage transfer_usage; @@ -1316,10 +1354,10 @@ fallback_copy_texsubimage(GLcontext *ctx, GLenum target, GLint level, else transfer_usage = PIPE_TRANSFER_WRITE; - st_teximage_flush_before_map(ctx->st, stImage->pt, 0, 0, + st_teximage_flush_before_map(st, stImage->pt, 0, 0, transfer_usage); - texDest = st_texture_image_map(ctx->st, stImage, 0, transfer_usage, + texDest = st_texture_image_map(st, stImage, 0, transfer_usage, destX, destY, width, height); if (baseFormat == GL_DEPTH_COMPONENT || @@ -1394,7 +1432,7 @@ fallback_copy_texsubimage(GLcontext *ctx, GLenum target, GLint level, free(tempSrc); } - st_texture_image_unmap(ctx->st, stImage); + st_texture_image_unmap(st, stImage); pipe->transfer_destroy(pipe, src_trans); } @@ -1490,7 +1528,8 @@ st_copy_texsubimage(GLcontext *ctx, const GLenum texBaseFormat = texImage->_BaseFormat; struct gl_framebuffer *fb = ctx->ReadBuffer; struct st_renderbuffer *strb; - struct pipe_context *pipe = ctx->st->pipe; + struct st_context *st = st_context(ctx); + struct pipe_context *pipe = st->pipe; struct pipe_screen *screen = pipe->screen; enum pipe_format dest_format, src_format; GLboolean use_fallback = GL_TRUE; @@ -1500,11 +1539,11 @@ st_copy_texsubimage(GLcontext *ctx, GLboolean do_flip = (st_fb_orientation(ctx->ReadBuffer) == Y_0_TOP); /* any rendering in progress must flushed before we grab the fb image */ - st_flush(ctx->st, PIPE_FLUSH_RENDER_CACHE, NULL); + st_flush(st, PIPE_FLUSH_RENDER_CACHE, NULL); /* make sure finalize_textures has been called? */ - if (0) st_validate_state(ctx->st); + if (0) st_validate_state(st); /* determine if copying depth or color data */ if (texBaseFormat == GL_DEPTH_COMPONENT || @@ -1621,7 +1660,7 @@ st_copy_texsubimage(GLcontext *ctx, srcY0 = srcY; srcY1 = srcY0 + height; } - util_blit_pixels_writemask(ctx->st->blit, + util_blit_pixels_writemask(st->blit, strb->surface, st_get_renderbuffer_sampler_view(strb, pipe), srcX, srcY0, @@ -1737,12 +1776,26 @@ st_CopyTexSubImage3D(GLcontext * ctx, GLenum target, GLint level, } +/** + * Copy image data from stImage into the texture object 'stObj' at level + * 'dstLevel'. + */ static void copy_image_data_to_texture(struct st_context *st, struct st_texture_object *stObj, GLuint dstLevel, struct st_texture_image *stImage) { + /* debug checks */ + { + const struct gl_texture_image *dstImage = + stObj->base.Image[stImage->face][stImage->level]; + assert(dstImage); + assert(dstImage->Width == stImage->base.Width); + assert(dstImage->Height == stImage->base.Height); + assert(dstImage->Depth == stImage->base.Depth); + } + if (stImage->pt) { /* Copy potentially with the blitter: */ @@ -1788,10 +1841,12 @@ st_finalize_texture(GLcontext *ctx, struct gl_texture_object *tObj, GLboolean *needFlush) { + struct st_context *st = st_context(ctx); struct st_texture_object *stObj = st_texture_object(tObj); const GLuint nr_faces = (stObj->base.Target == GL_TEXTURE_CUBE_MAP) ? 6 : 1; - GLuint blockSize, face; + GLuint face; struct st_texture_image *firstImage; + enum pipe_format firstImageFormat; *needFlush = GL_FALSE; @@ -1806,10 +1861,11 @@ st_finalize_texture(GLcontext *ctx, stObj->base.MinFilter == GL_NEAREST) stObj->lastLevel = stObj->base.BaseLevel; else - stObj->lastLevel = stObj->base._MaxLevel - stObj->base.BaseLevel; + stObj->lastLevel = stObj->base._MaxLevel; } firstImage = st_texture_image(stObj->base.Image[0][stObj->base.BaseLevel]); + assert(firstImage); /* If both firstImage and stObj point to a texture which can contain * all active images, favour firstImage. Note that because of the @@ -1823,43 +1879,42 @@ st_finalize_texture(GLcontext *ctx, pipe_sampler_view_reference(&stObj->sampler_view, NULL); } - /* bytes per pixel block (blocks are usually 1x1) */ - blockSize = _mesa_get_format_bytes(firstImage->base.TexFormat); + /* Find gallium format for the Mesa texture */ + firstImageFormat = st_mesa_format_to_pipe_format(firstImage->base.TexFormat); /* If we already have a gallium texture, check that it matches the texture * object's format, target, size, num_levels, etc. */ if (stObj->pt) { - const enum pipe_format fmt = - st_mesa_format_to_pipe_format(firstImage->base.TexFormat); if (stObj->pt->target != gl_target_to_pipe(stObj->base.Target) || - stObj->pt->format != fmt || - stObj->pt->last_level < stObj->lastLevel || - stObj->pt->width0 != firstImage->base.Width2 || - stObj->pt->height0 != firstImage->base.Height2 || - stObj->pt->depth0 != firstImage->base.Depth2) + stObj->pt->format != firstImageFormat || + stObj->pt->last_level != stObj->lastLevel || + stObj->pt->width0 != stObj->width0 || + stObj->pt->height0 != stObj->height0 || + stObj->pt->depth0 != stObj->depth0) { + /* The gallium texture does not match the Mesa texture so delete the + * gallium texture now. We'll make a new one below. + */ pipe_resource_reference(&stObj->pt, NULL); pipe_sampler_view_reference(&stObj->sampler_view, NULL); - ctx->st->dirty.st |= ST_NEW_FRAMEBUFFER; + st->dirty.st |= ST_NEW_FRAMEBUFFER; } } /* May need to create a new gallium texture: */ if (!stObj->pt) { - const enum pipe_format fmt = - st_mesa_format_to_pipe_format(firstImage->base.TexFormat); - GLuint usage = default_usage(fmt); + GLuint bindings = default_bindings(st, firstImageFormat); - stObj->pt = st_texture_create(ctx->st, + stObj->pt = st_texture_create(st, gl_target_to_pipe(stObj->base.Target), - fmt, + firstImageFormat, stObj->lastLevel, - firstImage->base.Width2, - firstImage->base.Height2, - firstImage->base.Depth2, - usage); + stObj->width0, + stObj->height0, + stObj->depth0, + bindings); if (!stObj->pt) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage"); @@ -1873,12 +1928,12 @@ st_finalize_texture(GLcontext *ctx, GLuint level; for (level = 0; level <= stObj->lastLevel; level++) { struct st_texture_image *stImage = - st_texture_image(stObj->base.Image[face][stObj->base.BaseLevel + level]); + st_texture_image(stObj->base.Image[face][level]); /* Need to import images in main memory or held in other textures. */ if (stImage && stObj->pt != stImage->pt) { - copy_image_data_to_texture(ctx->st, stObj, level, stImage); + copy_image_data_to_texture(st, stObj, level, stImage); *needFlush = GL_TRUE; } } diff --git a/src/mesa/state_tracker/st_context.h b/src/mesa/state_tracker/st_context.h index dfee490b54a..3637f6e75f0 100644 --- a/src/mesa/state_tracker/st_context.h +++ b/src/mesa/state_tracker/st_context.h @@ -201,7 +201,6 @@ struct st_framebuffer { GLframebuffer Base; void *Private; - GLuint InitWidth, InitHeight; struct st_framebuffer_iface *iface; enum st_attachment_type statts[ST_ATTACHMENT_COUNT]; diff --git a/src/mesa/state_tracker/st_debug.c b/src/mesa/state_tracker/st_debug.c index 5dbabfa5c2f..2da27fc4bd1 100644 --- a/src/mesa/state_tracker/st_debug.c +++ b/src/mesa/state_tracker/st_debug.c @@ -47,6 +47,7 @@ int ST_DEBUG = 0; static const struct debug_named_value st_debug_flags[] = { { "mesa", DEBUG_MESA }, { "tgsi", DEBUG_TGSI }, + { "constants",DEBUG_CONSTANTS }, { "pipe", DEBUG_PIPE }, { "tex", DEBUG_TEX }, { "fallback", DEBUG_FALLBACK }, @@ -75,7 +76,7 @@ void st_print_current(void) { GET_CURRENT_CONTEXT(ctx); - struct st_context *st = ctx->st; + struct st_context *st = st_context(ctx); #if 0 int i; diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c index a3620359dbf..4137596bd40 100644 --- a/src/mesa/state_tracker/st_draw.c +++ b/src/mesa/state_tracker/st_draw.c @@ -347,7 +347,8 @@ setup_interleaved_attribs(GLcontext *ctx, struct pipe_vertex_buffer *vbuffer, struct pipe_vertex_element velements[]) { - struct pipe_context *pipe = ctx->st->pipe; + struct st_context *st = st_context(ctx); + struct pipe_context *pipe = st->pipe; GLuint attr; const GLubyte *offset0 = NULL; @@ -412,7 +413,8 @@ setup_non_interleaved_attribs(GLcontext *ctx, struct pipe_vertex_buffer vbuffer[], struct pipe_vertex_element velements[]) { - struct pipe_context *pipe = ctx->st->pipe; + struct st_context *st = st_context(ctx); + struct pipe_context *pipe = st->pipe; GLuint attr; for (attr = 0; attr < vpv->num_inputs; attr++) { @@ -543,7 +545,8 @@ st_draw_vbo(GLcontext *ctx, GLuint min_index, GLuint max_index) { - struct pipe_context *pipe = ctx->st->pipe; + struct st_context *st = st_context(ctx); + struct pipe_context *pipe = st->pipe; const struct st_vertex_program *vp; const struct st_vp_varient *vpv; struct pipe_vertex_buffer vbuffer[PIPE_MAX_SHADER_INPUTS]; @@ -566,16 +569,16 @@ st_draw_vbo(GLcontext *ctx, vertDataEdgeFlags = arrays[VERT_ATTRIB_EDGEFLAG]->BufferObj && arrays[VERT_ATTRIB_EDGEFLAG]->BufferObj->Name; - if (vertDataEdgeFlags != ctx->st->vertdata_edgeflags) { - ctx->st->vertdata_edgeflags = vertDataEdgeFlags; - ctx->st->dirty.st |= ST_NEW_EDGEFLAGS_DATA; + if (vertDataEdgeFlags != st->vertdata_edgeflags) { + st->vertdata_edgeflags = vertDataEdgeFlags; + st->dirty.st |= ST_NEW_EDGEFLAGS_DATA; } - st_validate_state(ctx->st); + st_validate_state(st); /* must get these after state validation! */ - vp = ctx->st->vp; - vpv = ctx->st->vp_varient; + vp = st->vp; + vpv = st->vp_varient; #if 0 if (MESA_VERBOSE & VERBOSE_GLSL) { @@ -624,7 +627,7 @@ st_draw_vbo(GLcontext *ctx, #endif pipe->set_vertex_buffers(pipe, num_vbuffers, vbuffer); - cso_set_vertex_elements(ctx->st->cso_context, num_velements, velements); + cso_set_vertex_elements(st->cso_context, num_velements, velements); if (num_vbuffers == 0 || num_velements == 0) return; diff --git a/src/mesa/state_tracker/st_draw_feedback.c b/src/mesa/state_tracker/st_draw_feedback.c index 0889f1a522d..a1f70e86936 100644 --- a/src/mesa/state_tracker/st_draw_feedback.c +++ b/src/mesa/state_tracker/st_draw_feedback.c @@ -55,7 +55,7 @@ static void set_feedback_vertex_format(GLcontext *ctx) { #if 0 - struct st_context *st = ctx->st; + struct st_context *st = st_context(ctx); struct vertex_info vinfo; GLuint i; @@ -99,7 +99,7 @@ st_feedback_draw_vbo(GLcontext *ctx, GLuint min_index, GLuint max_index) { - struct st_context *st = ctx->st; + struct st_context *st = st_context(ctx); struct pipe_context *pipe = st->pipe; struct draw_context *draw = st->draw; const struct st_vertex_program *vp; @@ -115,13 +115,13 @@ st_feedback_draw_vbo(GLcontext *ctx, assert(draw); - st_validate_state(ctx->st); + st_validate_state(st); if (!index_bounds_valid) vbo_get_minmax_index(ctx, prims, ib, &min_index, &max_index); /* must get these after state validation! */ - vp = ctx->st->vp; + vp = st->vp; vs = &st->vp_varient->tgsi; if (!st->vp_varient->draw_shader) { diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c index 8a366d834e7..d7d2be6d454 100644 --- a/src/mesa/state_tracker/st_format.c +++ b/src/mesa/state_tracker/st_format.c @@ -36,6 +36,7 @@ #include "main/context.h" #include "main/texstore.h" #include "main/enums.h" +#include "main/image.h" #include "main/macros.h" #include "pipe/p_context.h" @@ -160,6 +161,10 @@ st_mesa_format_to_pipe_format(gl_format mesaFormat) return PIPE_FORMAT_S8_USCALED_Z24_UNORM; case MESA_FORMAT_S8_Z24: return PIPE_FORMAT_Z24_UNORM_S8_USCALED; + case MESA_FORMAT_Z24_X8: + return PIPE_FORMAT_X8Z24_UNORM; + case MESA_FORMAT_X8_Z24: + return PIPE_FORMAT_Z24X8_UNORM; case MESA_FORMAT_YCBCR: return PIPE_FORMAT_UYVY; #if FEATURE_texture_s3tc @@ -299,6 +304,28 @@ st_pipe_format_to_mesa_format(enum pipe_format format) /** + * Return first supported format from the given list. + */ +static enum pipe_format +find_supported_format(struct pipe_screen *screen, + const enum pipe_format formats[], + uint num_formats, + enum pipe_texture_target target, + unsigned tex_usage, + unsigned geom_flags) +{ + uint i; + for (i = 0; i < num_formats; i++) { + if (screen->is_format_supported(screen, formats[i], target, + tex_usage, geom_flags)) { + return formats[i]; + } + } + return PIPE_FORMAT_NONE; +} + + +/** * Find an RGBA format supported by the context/winsys. */ static enum pipe_format @@ -313,15 +340,11 @@ default_rgba_format(struct pipe_screen *screen, PIPE_FORMAT_A8B8G8R8_UNORM, PIPE_FORMAT_B5G6R5_UNORM }; - uint i; - for (i = 0; i < Elements(colorFormats); i++) { - if (screen->is_format_supported( screen, colorFormats[i], target, tex_usage, geom_flags )) { - return colorFormats[i]; - } - } - return PIPE_FORMAT_NONE; + return find_supported_format(screen, colorFormats, Elements(colorFormats), + target, tex_usage, geom_flags); } + /** * Find an RGB format supported by the context/winsys. */ @@ -340,13 +363,8 @@ default_rgb_format(struct pipe_screen *screen, PIPE_FORMAT_A8B8G8R8_UNORM, PIPE_FORMAT_B5G6R5_UNORM }; - uint i; - for (i = 0; i < Elements(colorFormats); i++) { - if (screen->is_format_supported( screen, colorFormats[i], target, tex_usage, geom_flags )) { - return colorFormats[i]; - } - } - return PIPE_FORMAT_NONE; + return find_supported_format(screen, colorFormats, Elements(colorFormats), + target, tex_usage, geom_flags); } /** @@ -363,115 +381,72 @@ default_srgba_format(struct pipe_screen *screen, PIPE_FORMAT_A8R8G8B8_SRGB, PIPE_FORMAT_A8B8G8R8_SRGB, }; - uint i; - for (i = 0; i < Elements(colorFormats); i++) { - if (screen->is_format_supported( screen, colorFormats[i], target, tex_usage, geom_flags )) { - return colorFormats[i]; - } - } - return PIPE_FORMAT_NONE; -} - -/** - * Search list of formats for first RGBA format with >8 bits/channel. - */ -static enum pipe_format -default_deep_rgba_format(struct pipe_screen *screen, - enum pipe_texture_target target, - unsigned tex_usage, - unsigned geom_flags) -{ - if (screen->is_format_supported(screen, PIPE_FORMAT_R16G16B16A16_SNORM, target, tex_usage, geom_flags)) { - return PIPE_FORMAT_R16G16B16A16_SNORM; - } - if (tex_usage & PIPE_BIND_RENDER_TARGET) - return default_rgba_format(screen, target, tex_usage, geom_flags); - else - return PIPE_FORMAT_NONE; -} - - -/** - * Find an Z format supported by the context/winsys. - */ -static enum pipe_format -default_depth_format(struct pipe_screen *screen, - enum pipe_texture_target target, - unsigned tex_usage, - unsigned geom_flags) -{ - static const enum pipe_format zFormats[] = { - PIPE_FORMAT_Z16_UNORM, - PIPE_FORMAT_Z32_UNORM, - PIPE_FORMAT_Z24_UNORM_S8_USCALED, - PIPE_FORMAT_S8_USCALED_Z24_UNORM - }; - uint i; - for (i = 0; i < Elements(zFormats); i++) { - if (screen->is_format_supported( screen, zFormats[i], target, tex_usage, geom_flags )) { - return zFormats[i]; - } - } - return PIPE_FORMAT_NONE; + return find_supported_format(screen, colorFormats, Elements(colorFormats), + target, tex_usage, geom_flags); } /** * Given an OpenGL internalFormat value for a texture or surface, return * the best matching PIPE_FORMAT_x, or PIPE_FORMAT_NONE if there's no match. + * This is called during glTexImage2D, for example. + * + * The bindings parameter typically has PIPE_BIND_SAMPLER_VIEW set, plus + * either PIPE_BINDING_RENDER_TARGET or PIPE_BINDING_DEPTH_STENCIL if + * we want render-to-texture ability. + * + * \param internalFormat the user value passed to glTexImage2D * \param target one of PIPE_TEXTURE_x - * \param tex_usage either PIPE_BIND_RENDER_TARGET - * or PIPE_BIND_SAMPLER_VIEW + * \param bindings bitmask of PIPE_BIND_x flags. */ enum pipe_format st_choose_format(struct pipe_screen *screen, GLenum internalFormat, - enum pipe_texture_target target, unsigned tex_usage) + enum pipe_texture_target target, unsigned bindings) { - unsigned geom_flags = 0; + unsigned geom_flags = 0; /* we don't care about POT vs. NPOT here, yet */ switch (internalFormat) { case 4: case GL_RGBA: - case GL_COMPRESSED_RGBA: case GL_RGBA8: case GL_RGB10_A2: case GL_RGBA12: - return default_rgba_format( screen, target, tex_usage, geom_flags ); + return default_rgba_format( screen, target, bindings, geom_flags ); case 3: case GL_RGB: - case GL_COMPRESSED_RGB: - return default_rgb_format( screen, target, tex_usage, geom_flags ); + return default_rgb_format( screen, target, bindings, geom_flags ); case GL_RGBA16: - if (tex_usage & PIPE_BIND_RENDER_TARGET) - return default_deep_rgba_format( screen, target, tex_usage, geom_flags ); - else - return default_rgba_format( screen, target, tex_usage, geom_flags ); + return default_rgba_format( screen, target, bindings, geom_flags ); case GL_RGBA4: case GL_RGBA2: - if (screen->is_format_supported( screen, PIPE_FORMAT_B4G4R4A4_UNORM, target, tex_usage, geom_flags )) + if (screen->is_format_supported( screen, PIPE_FORMAT_B4G4R4A4_UNORM, + target, bindings, geom_flags )) return PIPE_FORMAT_B4G4R4A4_UNORM; - return default_rgba_format( screen, target, tex_usage, geom_flags ); + return default_rgba_format( screen, target, bindings, geom_flags ); case GL_RGB5_A1: - if (screen->is_format_supported( screen, PIPE_FORMAT_B5G5R5A1_UNORM, target, tex_usage, geom_flags )) + if (screen->is_format_supported( screen, PIPE_FORMAT_B5G5R5A1_UNORM, + target, bindings, geom_flags )) return PIPE_FORMAT_B5G5R5A1_UNORM; - return default_rgba_format( screen, target, tex_usage, geom_flags ); + return default_rgba_format( screen, target, bindings, geom_flags ); case GL_RGB8: case GL_RGB10: case GL_RGB12: case GL_RGB16: - return default_rgb_format( screen, target, tex_usage, geom_flags ); + return default_rgb_format( screen, target, bindings, geom_flags ); case GL_RGB5: case GL_RGB4: case GL_R3_G3_B2: - if (screen->is_format_supported( screen, PIPE_FORMAT_B5G6R5_UNORM, target, tex_usage, geom_flags )) + if (screen->is_format_supported( screen, PIPE_FORMAT_B5G6R5_UNORM, + target, bindings, geom_flags )) return PIPE_FORMAT_B5G6R5_UNORM; - if (screen->is_format_supported( screen, PIPE_FORMAT_B5G5R5A1_UNORM, target, tex_usage, geom_flags )) + if (screen->is_format_supported( screen, PIPE_FORMAT_B5G5R5A1_UNORM, + target, bindings, geom_flags )) return PIPE_FORMAT_B5G5R5A1_UNORM; - return default_rgba_format( screen, target, tex_usage, geom_flags ); + return default_rgba_format( screen, target, bindings, geom_flags ); case GL_ALPHA: case GL_ALPHA4: @@ -479,9 +454,10 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat, case GL_ALPHA12: case GL_ALPHA16: case GL_COMPRESSED_ALPHA: - if (screen->is_format_supported( screen, PIPE_FORMAT_A8_UNORM, target, tex_usage, geom_flags )) + if (screen->is_format_supported( screen, PIPE_FORMAT_A8_UNORM, target, + bindings, geom_flags )) return PIPE_FORMAT_A8_UNORM; - return default_rgba_format( screen, target, tex_usage, geom_flags ); + return default_rgba_format( screen, target, bindings, geom_flags ); case 1: case GL_LUMINANCE: @@ -490,9 +466,10 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat, case GL_LUMINANCE12: case GL_LUMINANCE16: case GL_COMPRESSED_LUMINANCE: - if (screen->is_format_supported( screen, PIPE_FORMAT_L8_UNORM, target, tex_usage, geom_flags )) + if (screen->is_format_supported( screen, PIPE_FORMAT_L8_UNORM, target, + bindings, geom_flags )) return PIPE_FORMAT_L8_UNORM; - return default_rgba_format( screen, target, tex_usage, geom_flags ); + return default_rgba_format( screen, target, bindings, geom_flags ); case 2: case GL_LUMINANCE_ALPHA: @@ -503,9 +480,10 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat, case GL_LUMINANCE12_ALPHA12: case GL_LUMINANCE16_ALPHA16: case GL_COMPRESSED_LUMINANCE_ALPHA: - if (screen->is_format_supported( screen, PIPE_FORMAT_L8A8_UNORM, target, tex_usage, geom_flags )) + if (screen->is_format_supported( screen, PIPE_FORMAT_L8A8_UNORM, target, + bindings, geom_flags )) return PIPE_FORMAT_L8A8_UNORM; - return default_rgba_format( screen, target, tex_usage, geom_flags ); + return default_rgba_format( screen, target, bindings, geom_flags ); case GL_INTENSITY: case GL_INTENSITY4: @@ -513,36 +491,73 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat, case GL_INTENSITY12: case GL_INTENSITY16: case GL_COMPRESSED_INTENSITY: - if (screen->is_format_supported( screen, PIPE_FORMAT_I8_UNORM, target, tex_usage, geom_flags )) + if (screen->is_format_supported( screen, PIPE_FORMAT_I8_UNORM, target, + bindings, geom_flags )) return PIPE_FORMAT_I8_UNORM; - return default_rgba_format( screen, target, tex_usage, geom_flags ); + return default_rgba_format( screen, target, bindings, geom_flags ); case GL_YCBCR_MESA: if (screen->is_format_supported(screen, PIPE_FORMAT_UYVY, - target, tex_usage, geom_flags)) { + target, bindings, geom_flags)) { return PIPE_FORMAT_UYVY; } if (screen->is_format_supported(screen, PIPE_FORMAT_YUYV, - target, tex_usage, geom_flags)) { + target, bindings, geom_flags)) { return PIPE_FORMAT_YUYV; } return PIPE_FORMAT_NONE; + case GL_COMPRESSED_RGB: + /* can only sample from compressed formats */ + if (bindings & ~PIPE_BIND_SAMPLER_VIEW) + return PIPE_FORMAT_NONE; + else if (screen->is_format_supported(screen, PIPE_FORMAT_DXT1_RGB, + target, bindings, geom_flags)) + return PIPE_FORMAT_DXT1_RGB; + else + return default_rgb_format(screen, target, bindings, geom_flags); + + case GL_COMPRESSED_RGBA: + /* can only sample from compressed formats */ + if (bindings & ~PIPE_BIND_SAMPLER_VIEW) + return PIPE_FORMAT_NONE; + else if (screen->is_format_supported(screen, PIPE_FORMAT_DXT3_RGBA, + target, bindings, geom_flags)) + return PIPE_FORMAT_DXT3_RGBA; + else + return default_rgba_format(screen, target, bindings, geom_flags); + case GL_RGB_S3TC: case GL_RGB4_S3TC: case GL_COMPRESSED_RGB_S3TC_DXT1_EXT: - return PIPE_FORMAT_DXT1_RGB; + if (screen->is_format_supported(screen, PIPE_FORMAT_DXT1_RGB, + target, bindings, geom_flags)) + return PIPE_FORMAT_DXT1_RGB; + else + return PIPE_FORMAT_NONE; case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT: - return PIPE_FORMAT_DXT1_RGBA; + if (screen->is_format_supported(screen, PIPE_FORMAT_DXT1_RGBA, + target, bindings, geom_flags)) + return PIPE_FORMAT_DXT1_RGBA; + else + return PIPE_FORMAT_NONE; case GL_RGBA_S3TC: case GL_RGBA4_S3TC: case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT: - return PIPE_FORMAT_DXT3_RGBA; + if (screen->is_format_supported(screen, PIPE_FORMAT_DXT3_RGBA, + target, bindings, geom_flags)) + return PIPE_FORMAT_DXT3_RGBA; + else + return PIPE_FORMAT_NONE; case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT: - return PIPE_FORMAT_DXT5_RGBA; + if (screen->is_format_supported(screen, PIPE_FORMAT_DXT5_RGBA, + target, bindings, geom_flags)) + return PIPE_FORMAT_DXT5_RGBA; + else + return PIPE_FORMAT_NONE; #if 0 case GL_COMPRESSED_RGB_FXT1_3DFX: @@ -552,42 +567,60 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat, #endif case GL_DEPTH_COMPONENT16: - if (screen->is_format_supported( screen, PIPE_FORMAT_Z16_UNORM, target, tex_usage, geom_flags )) + if (screen->is_format_supported(screen, PIPE_FORMAT_Z16_UNORM, target, + bindings, geom_flags)) return PIPE_FORMAT_Z16_UNORM; /* fall-through */ case GL_DEPTH_COMPONENT24: - if (screen->is_format_supported( screen, PIPE_FORMAT_Z24_UNORM_S8_USCALED, target, tex_usage, geom_flags )) + if (screen->is_format_supported(screen, PIPE_FORMAT_Z24_UNORM_S8_USCALED, + target, bindings, geom_flags)) return PIPE_FORMAT_Z24_UNORM_S8_USCALED; - if (screen->is_format_supported( screen, PIPE_FORMAT_S8_USCALED_Z24_UNORM, target, tex_usage, geom_flags )) + if (screen->is_format_supported(screen, PIPE_FORMAT_S8_USCALED_Z24_UNORM, + target, bindings, geom_flags)) return PIPE_FORMAT_S8_USCALED_Z24_UNORM; /* fall-through */ case GL_DEPTH_COMPONENT32: - if (screen->is_format_supported( screen, PIPE_FORMAT_Z32_UNORM, target, tex_usage, geom_flags )) + if (screen->is_format_supported(screen, PIPE_FORMAT_Z32_UNORM, + target, bindings, geom_flags)) return PIPE_FORMAT_Z32_UNORM; /* fall-through */ case GL_DEPTH_COMPONENT: - return default_depth_format( screen, target, tex_usage, geom_flags ); + { + static const enum pipe_format formats[] = { + PIPE_FORMAT_Z16_UNORM, + PIPE_FORMAT_Z32_UNORM, + PIPE_FORMAT_Z24_UNORM_S8_USCALED, + PIPE_FORMAT_S8_USCALED_Z24_UNORM + }; + return find_supported_format(screen, formats, Elements(formats), + target, bindings, geom_flags); + } case GL_STENCIL_INDEX: case GL_STENCIL_INDEX1_EXT: case GL_STENCIL_INDEX4_EXT: case GL_STENCIL_INDEX8_EXT: case GL_STENCIL_INDEX16_EXT: - if (screen->is_format_supported( screen, PIPE_FORMAT_S8_USCALED, target, tex_usage, geom_flags )) - return PIPE_FORMAT_S8_USCALED; - if (screen->is_format_supported( screen, PIPE_FORMAT_Z24_UNORM_S8_USCALED, target, tex_usage, geom_flags )) - return PIPE_FORMAT_Z24_UNORM_S8_USCALED; - if (screen->is_format_supported( screen, PIPE_FORMAT_S8_USCALED_Z24_UNORM, target, tex_usage, geom_flags )) - return PIPE_FORMAT_S8_USCALED_Z24_UNORM; - return PIPE_FORMAT_NONE; + { + static const enum pipe_format formats[] = { + PIPE_FORMAT_S8_USCALED, + PIPE_FORMAT_Z24_UNORM_S8_USCALED, + PIPE_FORMAT_S8_USCALED_Z24_UNORM + }; + return find_supported_format(screen, formats, Elements(formats), + target, bindings, geom_flags); + } case GL_DEPTH_STENCIL_EXT: case GL_DEPTH24_STENCIL8_EXT: - if (screen->is_format_supported( screen, PIPE_FORMAT_Z24_UNORM_S8_USCALED, target, tex_usage, geom_flags )) - return PIPE_FORMAT_Z24_UNORM_S8_USCALED; - if (screen->is_format_supported( screen, PIPE_FORMAT_S8_USCALED_Z24_UNORM, target, tex_usage, geom_flags )) - return PIPE_FORMAT_S8_USCALED_Z24_UNORM; - return PIPE_FORMAT_NONE; + { + static const enum pipe_format formats[] = { + PIPE_FORMAT_Z24_UNORM_S8_USCALED, + PIPE_FORMAT_S8_USCALED_Z24_UNORM + }; + return find_supported_format(screen, formats, Elements(formats), + target, bindings, geom_flags); + } case GL_SRGB_EXT: case GL_SRGB8_EXT: @@ -595,7 +628,7 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat, case GL_COMPRESSED_SRGB_ALPHA_EXT: case GL_SRGB_ALPHA_EXT: case GL_SRGB8_ALPHA8_EXT: - return default_srgba_format( screen, target, tex_usage, geom_flags ); + return default_srgba_format( screen, target, bindings, geom_flags ); case GL_COMPRESSED_SRGB_S3TC_DXT1_EXT: return PIPE_FORMAT_DXT1_SRGB; case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT: @@ -609,15 +642,17 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat, case GL_SLUMINANCE8_ALPHA8_EXT: case GL_COMPRESSED_SLUMINANCE_EXT: case GL_COMPRESSED_SLUMINANCE_ALPHA_EXT: - if (screen->is_format_supported( screen, PIPE_FORMAT_L8A8_SRGB, target, tex_usage, geom_flags )) + if (screen->is_format_supported(screen, PIPE_FORMAT_L8A8_SRGB, + target, bindings, geom_flags)) return PIPE_FORMAT_L8A8_SRGB; - return default_srgba_format( screen, target, tex_usage, geom_flags ); + return default_srgba_format( screen, target, bindings, geom_flags ); case GL_SLUMINANCE_EXT: case GL_SLUMINANCE8_EXT: - if (screen->is_format_supported( screen, PIPE_FORMAT_L8_SRGB, target, tex_usage, geom_flags )) + if (screen->is_format_supported(screen, PIPE_FORMAT_L8_SRGB, + target, bindings, geom_flags)) return PIPE_FORMAT_L8_SRGB; - return default_srgba_format( screen, target, tex_usage, geom_flags ); + return default_srgba_format( screen, target, bindings, geom_flags ); default: return PIPE_FORMAT_NONE; @@ -625,27 +660,6 @@ st_choose_format(struct pipe_screen *screen, GLenum internalFormat, } -static GLboolean -is_depth_or_stencil_format(GLenum internalFormat) -{ - switch (internalFormat) { - case GL_DEPTH_COMPONENT: - case GL_DEPTH_COMPONENT16: - case GL_DEPTH_COMPONENT24: - case GL_DEPTH_COMPONENT32: - case GL_STENCIL_INDEX: - case GL_STENCIL_INDEX1_EXT: - case GL_STENCIL_INDEX4_EXT: - case GL_STENCIL_INDEX8_EXT: - case GL_STENCIL_INDEX16_EXT: - case GL_DEPTH_STENCIL_EXT: - case GL_DEPTH24_STENCIL8_EXT: - return GL_TRUE; - default: - return GL_FALSE; - } -} - /** * Called by FBO code to choose a PIPE_FORMAT_ for drawing surfaces. */ @@ -654,7 +668,7 @@ st_choose_renderbuffer_format(struct pipe_screen *screen, GLenum internalFormat) { uint usage; - if (is_depth_or_stencil_format(internalFormat)) + if (_mesa_is_depth_or_stencil_format(internalFormat)) usage = PIPE_BIND_DEPTH_STENCIL; else usage = PIPE_BIND_RENDER_TARGET; @@ -669,15 +683,35 @@ gl_format st_ChooseTextureFormat(GLcontext *ctx, GLint internalFormat, GLenum format, GLenum type) { + struct pipe_screen *screen = st_context(ctx)->pipe->screen; enum pipe_format pFormat; + uint bindings; (void) format; (void) type; - pFormat = st_choose_format(ctx->st->pipe->screen, internalFormat, - PIPE_TEXTURE_2D, PIPE_BIND_SAMPLER_VIEW); - if (pFormat == PIPE_FORMAT_NONE) + /* GL textures may wind up being render targets, but we don't know + * that in advance. Specify potential render target flags now. + */ + if (_mesa_is_depth_format(internalFormat) || + _mesa_is_depthstencil_format(internalFormat)) + bindings = PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_DEPTH_STENCIL; + else + bindings = PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET; + + pFormat = st_choose_format(screen, internalFormat, + PIPE_TEXTURE_2D, bindings); + + if (pFormat == PIPE_FORMAT_NONE) { + /* try choosing format again, this time without render target bindings */ + pFormat = st_choose_format(screen, internalFormat, + PIPE_TEXTURE_2D, PIPE_BIND_SAMPLER_VIEW); + } + + if (pFormat == PIPE_FORMAT_NONE) { + /* no luck at all */ return MESA_FORMAT_NONE; + } return st_pipe_format_to_mesa_format(pFormat); } diff --git a/src/mesa/state_tracker/st_gen_mipmap.c b/src/mesa/state_tracker/st_gen_mipmap.c index 5b7a9620379..a015c4bb587 100644 --- a/src/mesa/state_tracker/st_gen_mipmap.c +++ b/src/mesa/state_tracker/st_gen_mipmap.c @@ -27,27 +27,19 @@ #include "main/imports.h" -#include "main/macros.h" #include "main/mipmap.h" #include "main/teximage.h" #include "main/texformat.h" -#include "shader/prog_instruction.h" - #include "pipe/p_context.h" #include "pipe/p_defines.h" #include "util/u_inlines.h" #include "util/u_format.h" #include "util/u_gen_mipmap.h" -#include "util/u_math.h" - -#include "cso_cache/cso_cache.h" -#include "cso_cache/cso_context.h" #include "st_debug.h" #include "st_context.h" #include "st_gen_mipmap.h" -#include "st_texture.h" #include "st_cb_texture.h" #include "st_inlines.h" @@ -102,11 +94,48 @@ st_render_mipmap(struct st_context *st, } +/** + * Helper function to decompress an image. The result is a 32-bpp RGBA + * image with stride==width. + */ +static void +decompress_image(enum pipe_format format, + const uint8_t *src, uint8_t *dst, + unsigned width, unsigned height) +{ + const struct util_format_description *desc = util_format_description(format); + const uint dst_stride = 4 * width; + const uint src_stride = util_format_get_stride(format, width); + + desc->unpack_rgba_8unorm(dst, dst_stride, src, src_stride, width, height); +} + + +/** + * Helper function to compress an image. The source is a 32-bpp RGBA image + * with stride==width. + */ +static void +compress_image(enum pipe_format format, + const uint8_t *src, uint8_t *dst, + unsigned width, unsigned height) +{ + const struct util_format_description *desc = util_format_description(format); + const uint dst_stride = util_format_get_stride(format, width); + const uint src_stride = 4 * width; + + desc->pack_rgba_8unorm(dst, dst_stride, src, src_stride, width, height); +} + + +/** + * Software fallback for generate mipmap levels. + */ static void fallback_generate_mipmap(GLcontext *ctx, GLenum target, struct gl_texture_object *texObj) { - struct pipe_context *pipe = ctx->st->pipe; + struct pipe_context *pipe = st_context(ctx)->pipe; struct pipe_resource *pt = st_get_texobj_resource(texObj); const uint baseLevel = texObj->BaseLevel; const uint lastLevel = pt->last_level; @@ -114,17 +143,34 @@ fallback_generate_mipmap(GLcontext *ctx, GLenum target, uint dstLevel; GLenum datatype; GLuint comps; + GLboolean compressed; if (ST_DEBUG & DEBUG_FALLBACK) debug_printf("%s: fallback processing\n", __FUNCTION__); assert(target != GL_TEXTURE_3D); /* not done yet */ - _mesa_format_to_type_and_comps(texObj->Image[face][baseLevel]->TexFormat, - &datatype, &comps); + compressed = + _mesa_is_format_compressed(texObj->Image[face][baseLevel]->TexFormat); + + if (compressed) { + datatype = GL_UNSIGNED_BYTE; + comps = 4; + } + else { + _mesa_format_to_type_and_comps(texObj->Image[face][baseLevel]->TexFormat, + &datatype, &comps); + assert(comps > 0 && "bad texture format in fallback_generate_mipmap()"); + } for (dstLevel = baseLevel + 1; dstLevel <= lastLevel; dstLevel++) { const uint srcLevel = dstLevel - 1; + const uint srcWidth = u_minify(pt->width0, srcLevel); + const uint srcHeight = u_minify(pt->height0, srcLevel); + const uint srcDepth = u_minify(pt->depth0, srcLevel); + const uint dstWidth = u_minify(pt->width0, dstLevel); + const uint dstHeight = u_minify(pt->height0, dstLevel); + const uint dstDepth = u_minify(pt->depth0, dstLevel); struct pipe_transfer *srcTrans, *dstTrans; const ubyte *srcData; ubyte *dstData; @@ -133,14 +179,13 @@ fallback_generate_mipmap(GLcontext *ctx, GLenum target, srcTrans = st_cond_flush_get_tex_transfer(st_context(ctx), pt, face, srcLevel, zslice, PIPE_TRANSFER_READ, 0, 0, - u_minify(pt->width0, srcLevel), - u_minify(pt->height0, srcLevel)); + srcWidth, srcHeight); + dstTrans = st_cond_flush_get_tex_transfer(st_context(ctx), pt, face, dstLevel, zslice, PIPE_TRANSFER_WRITE, 0, 0, - u_minify(pt->width0, dstLevel), - u_minify(pt->height0, dstLevel)); + dstWidth, dstHeight); srcData = (ubyte *) pipe_transfer_map(pipe, srcTrans); dstData = (ubyte *) pipe_transfer_map(pipe, dstTrans); @@ -148,18 +193,49 @@ fallback_generate_mipmap(GLcontext *ctx, GLenum target, srcStride = srcTrans->stride / util_format_get_blocksize(srcTrans->resource->format); dstStride = dstTrans->stride / util_format_get_blocksize(dstTrans->resource->format); - _mesa_generate_mipmap_level(target, datatype, comps, - 0 /*border*/, - u_minify(pt->width0, srcLevel), - u_minify(pt->height0, srcLevel), - u_minify(pt->depth0, srcLevel), - srcData, - srcStride, /* stride in texels */ - u_minify(pt->width0, dstLevel), - u_minify(pt->height0, dstLevel), - u_minify(pt->depth0, dstLevel), - dstData, - dstStride); /* stride in texels */ + if (compressed) { + const enum pipe_format format = pt->format; + const uint bw = util_format_get_blockwidth(format); + const uint bh = util_format_get_blockheight(format); + const uint srcWidth2 = align(srcWidth, bw); + const uint srcHeight2 = align(srcHeight, bh); + const uint dstWidth2 = align(dstWidth, bw); + const uint dstHeight2 = align(dstHeight, bh); + uint8_t *srcTemp, *dstTemp; + + assert(comps == 4); + + srcTemp = malloc(srcWidth2 * srcHeight2 * comps + 000); + dstTemp = malloc(dstWidth2 * dstHeight2 * comps + 000); + + /* decompress the src image: srcData -> srcTemp */ + decompress_image(format, srcData, srcTemp, srcWidth, srcHeight); + + _mesa_generate_mipmap_level(target, datatype, comps, + 0 /*border*/, + srcWidth2, srcHeight2, srcDepth, + srcTemp, + srcWidth2, /* stride in texels */ + dstWidth2, dstHeight2, dstDepth, + dstTemp, + dstWidth2); /* stride in texels */ + + /* compress the new image: dstTemp -> dstData */ + compress_image(format, dstTemp, dstData, dstWidth2, dstHeight2); + + free(srcTemp); + free(dstTemp); + } + else { + _mesa_generate_mipmap_level(target, datatype, comps, + 0 /*border*/, + srcWidth, srcHeight, srcDepth, + srcData, + srcStride, /* stride in texels */ + dstWidth, dstHeight, dstDepth, + dstData, + dstStride); /* stride in texels */ + } pipe_transfer_unmap(pipe, srcTrans); pipe_transfer_unmap(pipe, dstTrans); @@ -174,7 +250,7 @@ fallback_generate_mipmap(GLcontext *ctx, GLenum target, * Compute the expected number of mipmap levels in the texture given * the width/height/depth of the base image and the GL_TEXTURE_BASE_LEVEL/ * GL_TEXTURE_MAX_LEVEL settings. This will tell us how many mipmap - * level should be generated. + * levels should be generated. */ static GLuint compute_num_levels(GLcontext *ctx, @@ -207,11 +283,14 @@ compute_num_levels(GLcontext *ctx, } +/** + * Called via ctx->Driver.GenerateMipmap(). + */ void st_generate_mipmap(GLcontext *ctx, GLenum target, struct gl_texture_object *texObj) { - struct st_context *st = ctx->st; + struct st_context *st = st_context(ctx); struct st_texture_object *stObj = st_texture_object(texObj); struct pipe_resource *pt = st_get_texobj_resource(texObj); const uint baseLevel = texObj->BaseLevel; @@ -263,10 +342,10 @@ st_generate_mipmap(GLcontext *ctx, GLenum target, assert(lastLevel <= pt->last_level); - /* Recall that the Mesa BaseLevel image is stored in the gallium - * texture's level[0] position. So pass baseLevel=0 here. + /* Try to generate the mipmap by rendering/texturing. If that fails, + * use the software fallback. */ - if (!st_render_mipmap(st, target, stObj, 0, lastLevel)) { + if (!st_render_mipmap(st, target, stObj, baseLevel, lastLevel)) { fallback_generate_mipmap(ctx, target, texObj); } @@ -298,7 +377,9 @@ st_generate_mipmap(GLcontext *ctx, GLenum target, dstImage->TexFormat = srcImage->TexFormat; - stImage = (struct st_texture_image *) dstImage; + stImage = st_texture_image(dstImage); + stImage->level = dstLevel; + pipe_resource_reference(&stImage->pt, pt); } } diff --git a/src/mesa/state_tracker/st_gl_api.h b/src/mesa/state_tracker/st_gl_api.h new file mode 100644 index 00000000000..52c3fa0b417 --- /dev/null +++ b/src/mesa/state_tracker/st_gl_api.h @@ -0,0 +1,9 @@ + +#ifndef ST_GL_API_H +#define ST_GL_API_H + +#include "state_tracker/st_api.h" + +struct st_api * st_gl_api_create(void); + +#endif diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c index 5cf17fe530a..44d59d44763 100644 --- a/src/mesa/state_tracker/st_manager.c +++ b/src/mesa/state_tracker/st_manager.c @@ -26,7 +26,7 @@ * Chia-I Wu <[email protected]> */ -#include "state_tracker/st_api.h" +#include "state_tracker/st_gl_api.h" #include "pipe/p_context.h" #include "pipe/p_screen.h" @@ -692,7 +692,6 @@ st_api_get_proc_address(struct st_api *stapi, const char *procname) static void st_api_destroy(struct st_api *stapi) { - FREE(stapi); } /** @@ -791,24 +790,22 @@ st_manager_add_color_renderbuffer(struct st_context *st, GLframebuffer *fb, return TRUE; } +struct st_api st_gl_api = { + st_api_destroy, + st_api_get_proc_address, + st_api_is_visual_supported, + st_api_create_context, + st_api_make_current, + st_api_get_current, +}; + /** - * Create an st_api to manage the state tracker. + * Return the st_api for this state tracker. This might either be GL, GLES1, + * GLES2 that mostly depends on the build and link options. But these + * functions remain the same either way. */ struct st_api * -st_manager_create_api(void) +st_gl_api_create(void) { - struct st_api *stapi; - - stapi = CALLOC_STRUCT(st_api); - if (stapi) { - stapi->destroy = st_api_destroy; - stapi->get_proc_address = st_api_get_proc_address; - stapi->is_visual_supported = st_api_is_visual_supported; - - stapi->create_context = st_api_create_context; - stapi->make_current = st_api_make_current; - stapi->get_current = st_api_get_current; - } - - return stapi; + return &st_gl_api; } diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c index 6e8c446f783..772a2ee17c9 100644 --- a/src/mesa/state_tracker/st_program.c +++ b/src/mesa/state_tracker/st_program.c @@ -217,6 +217,12 @@ st_translate_vertex_program(struct st_context *st, num_outputs++; } + if (ST_DEBUG & DEBUG_MESA) { + _mesa_print_program(&stvp->Base.Base); + _mesa_print_program_parameters(st->ctx, &stvp->Base.Base); + debug_printf("\n"); + } + error = st_translate_mesa_program(st->ctx, TGSI_PROCESSOR_VERTEX, @@ -246,11 +252,6 @@ st_translate_vertex_program(struct st_context *st, vpv->driver_shader = pipe->create_vs_state(pipe, &vpv->tgsi); - if ((ST_DEBUG & DEBUG_TGSI) && (ST_DEBUG & DEBUG_MESA)) { - _mesa_print_program(&stvp->Base.Base); - debug_printf("\n"); - } - if (ST_DEBUG & DEBUG_TGSI) { tgsi_dump( vpv->tgsi.tokens, 0 ); debug_printf("\n"); @@ -423,6 +424,11 @@ st_translate_fragment_program(struct st_context *st, if (ureg == NULL) return; + if (ST_DEBUG & DEBUG_MESA) { + _mesa_print_program(&stfp->Base.Base); + _mesa_print_program_parameters(st->ctx, &stfp->Base.Base); + debug_printf("\n"); + } error = st_translate_mesa_program(st->ctx, @@ -445,11 +451,6 @@ st_translate_fragment_program(struct st_context *st, ureg_destroy( ureg ); stfp->driver_shader = pipe->create_fs_state(pipe, &stfp->tgsi); - if ((ST_DEBUG & DEBUG_TGSI) && (ST_DEBUG & DEBUG_MESA)) { - _mesa_print_program(&stfp->Base.Base); - debug_printf("\n"); - } - if (ST_DEBUG & DEBUG_TGSI) { tgsi_dump( stfp->tgsi.tokens, 0/*TGSI_DUMP_VERBOSE*/ ); debug_printf("\n"); diff --git a/src/mesa/state_tracker/st_texture.c b/src/mesa/state_tracker/st_texture.c index 70ba239d07b..722f60e4252 100644 --- a/src/mesa/state_tracker/st_texture.c +++ b/src/mesa/state_tracker/st_texture.c @@ -142,42 +142,6 @@ st_texture_match_image(const struct pipe_resource *pt, } -#if 000 -/* Although we use the image_offset[] array to store relative offsets - * to cube faces, Mesa doesn't know anything about this and expects - * each cube face to be treated as a separate image. - * - * These functions present that view to mesa: - */ -const GLuint * -st_texture_depth_offsets(struct pipe_resource *pt, GLuint level) -{ - static const GLuint zero = 0; - - if (pt->target != PIPE_TEXTURE_3D || pt->level[level].nr_images == 1) - return &zero; - else - return pt->level[level].image_offset; -} - - -/** - * Return the offset to the given mipmap texture image within the - * texture memory buffer, in bytes. - */ -GLuint -st_texture_image_offset(const struct pipe_resource * pt, - GLuint face, GLuint level) -{ - if (pt->target == PIPE_TEXTURE_CUBE) - return (pt->level[level].level_offset + - pt->level[level].image_offset[face] * pt->cpp); - else - return pt->level[level].level_offset; -} -#endif - - /** * Map a teximage in a mipmap texture. * \param row_stride returns row stride in bytes @@ -305,6 +269,9 @@ st_texture_image_copy(struct pipe_context *pipe, struct pipe_surface *dst_surface; GLuint i; + assert(src->width0 == dst->width0); + assert(src->height0 == dst->height0); + for (i = 0; i < depth; i++) { GLuint srcLevel; diff --git a/src/mesa/state_tracker/st_texture.h b/src/mesa/state_tracker/st_texture.h index 416468478b1..447f091db1f 100644 --- a/src/mesa/state_tracker/st_texture.h +++ b/src/mesa/state_tracker/st_texture.h @@ -38,6 +38,9 @@ struct pipe_resource; +/** + * Subclass of gl_texure_image. + */ struct st_texture_image { struct gl_texture_image base; @@ -57,7 +60,9 @@ struct st_texture_image }; - +/** + * Subclass of gl_texure_object. + */ struct st_texture_object { struct gl_texture_object base; /* The "parent" object */ @@ -66,6 +71,9 @@ struct st_texture_object */ GLuint lastLevel; + /** The size of the level=0 mipmap image */ + GLuint width0, height0, depth0; + /* On validation any active images held in main memory or in other * textures will be copied to this texture and the old storage freed. */ @@ -76,8 +84,6 @@ struct st_texture_object */ struct pipe_sampler_view *sampler_view; - GLboolean teximage_realloc; - /* True if there is/was a surface bound to this texture object. It helps * track whether the texture object is surface based or not. */ @@ -185,18 +191,6 @@ extern const GLuint * st_texture_depth_offsets(struct pipe_resource *pt, GLuint level); -/* Return the linear offset of an image relative to the start of its region. - */ -extern GLuint -st_texture_image_offset(const struct pipe_resource *pt, - GLuint face, GLuint level); - -extern GLuint -st_texture_texel_offset(const struct pipe_resource * pt, - GLuint face, GLuint level, - GLuint col, GLuint row, GLuint img); - - /* Upload an image into a texture */ extern void diff --git a/src/mesa/x86-64/xform4.S b/src/mesa/x86-64/xform4.S index 805969127db..e52a6118c31 100644 --- a/src/mesa/x86-64/xform4.S +++ b/src/mesa/x86-64/xform4.S @@ -30,6 +30,7 @@ .align 16 .globl _mesa_x86_64_cpuid +.hidden _mesa_x86_64_cpuid _mesa_x86_64_cpuid: pushq %rbx movl (%rdi), %eax @@ -46,6 +47,7 @@ _mesa_x86_64_cpuid: .align 16 .globl _mesa_x86_64_transform_points4_general +.hidden _mesa_x86_64_transform_points4_general _mesa_x86_64_transform_points4_general: /* * rdi = dest @@ -121,6 +123,7 @@ p4_constants: .text .align 16 .globl _mesa_x86_64_transform_points4_3d +.hidden _mesa_x86_64_transform_points4_3d /* * this is slower than _mesa_x86_64_transform_points4_general * because it ensures that the last matrix row (or is it column?) is 0,0,0,1 @@ -192,6 +195,7 @@ p4_3d_done: .align 16 .globl _mesa_x86_64_transform_points4_identity +.hidden _mesa_x86_64_transform_points4_identity _mesa_x86_64_transform_points4_identity: movl V4F_COUNT(%rdx), %ecx /* count */ @@ -220,6 +224,7 @@ p4_identity_done: .align 16 .globl _mesa_3dnow_transform_points4_3d_no_rot +.hidden _mesa_3dnow_transform_points4_3d_no_rot _mesa_3dnow_transform_points4_3d_no_rot: movl V4F_COUNT(%rdx), %ecx /* count */ @@ -284,6 +289,7 @@ p4_3d_no_rot_done: .align 16 .globl _mesa_3dnow_transform_points4_perspective +.hidden _mesa_3dnow_transform_points4_perspective _mesa_3dnow_transform_points4_perspective: movl V4F_COUNT(%rdx), %ecx /* count */ @@ -350,6 +356,7 @@ p4_perspective_done: .align 16 .globl _mesa_3dnow_transform_points4_2d_no_rot +.hidden _mesa_3dnow_transform_points4_2d_no_rot _mesa_3dnow_transform_points4_2d_no_rot: movl V4F_COUNT(%rdx), %ecx /* count */ @@ -405,6 +412,7 @@ p4_2d_no_rot_done: .align 16 .globl _mesa_3dnow_transform_points4_2d +.hidden _mesa_3dnow_transform_points4_2d _mesa_3dnow_transform_points4_2d: movl V4F_COUNT(%rdx), %ecx /* count */ |