From f8cf79936b42405a8366613b80e3bde21aadaa02 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Sat, 24 Mar 2012 13:33:00 +0000 Subject: mesa: add support for ARB_blend_func_extended (v4) Add implementations of the two API functions, Add a new strings to uint mapping for index bindings Add the blending mode validation for SRC1 + SRC_ALPHA_SATURATE Add get for MAX_DUAL_SOURCE_DRAW_BUFFERS v2: Add check in valid_to_render to address case in spec ERRORS. v3: Add index to ir.h so this patch compiles on its own fixup comment v4: fixup Brian's comments The GLSL patch will setup the indices. Signed-off-by: Dave Airlie --- src/mesa/main/shaderobj.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/mesa/main/shaderobj.c') diff --git a/src/mesa/main/shaderobj.c b/src/mesa/main/shaderobj.c index 36f208d6c09..7eb6f0bdab0 100644 --- a/src/mesa/main/shaderobj.c +++ b/src/mesa/main/shaderobj.c @@ -242,6 +242,7 @@ _mesa_init_shader_program(struct gl_context *ctx, struct gl_shader_program *prog prog->AttributeBindings = string_to_uint_map_ctor(); prog->FragDataBindings = string_to_uint_map_ctor(); + prog->FragDataIndexBindings = string_to_uint_map_ctor(); #if FEATURE_ARB_geometry_shader4 prog->Geom.VerticesOut = 0; @@ -319,6 +320,11 @@ _mesa_free_shader_program_data(struct gl_context *ctx, shProg->FragDataBindings = NULL; } + if (shProg->FragDataIndexBindings) { + string_to_uint_map_dtor(shProg->FragDataIndexBindings); + shProg->FragDataIndexBindings = NULL; + } + /* detach shaders */ for (i = 0; i < shProg->NumShaders; i++) { _mesa_reference_shader(ctx, &shProg->Shaders[i], NULL); -- cgit v1.2.3