diff options
author | marha <marha@users.sourceforge.net> | 2013-07-04 13:44:39 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2013-07-04 13:44:39 +0200 |
commit | 2433c3693663c0ace48aee718c10a6b78207b7cf (patch) | |
tree | 8c569c4af28c0e365d64d432957b20c9aa0b4953 /mesalib/src/mesa/state_tracker | |
parent | fadba36545cbab5859bf346921bf416d0160a5b2 (diff) | |
parent | 2ecad38adbeaa652daaab8f2a6d112921b7e74eb (diff) | |
download | vcxsrv-2433c3693663c0ace48aee718c10a6b78207b7cf.tar.gz vcxsrv-2433c3693663c0ace48aee718c10a6b78207b7cf.tar.bz2 vcxsrv-2433c3693663c0ace48aee718c10a6b78207b7cf.zip |
Merge remote-tracking branch 'origin/released'
* origin/released:
fontconfig mesa libxcb git update 4 jul 2013
Diffstat (limited to 'mesalib/src/mesa/state_tracker')
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_context.c | 5 | ||||
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_extensions.c | 24 | ||||
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 10 |
3 files changed, 18 insertions, 21 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_context.c b/mesalib/src/mesa/state_tracker/st_context.c index 7d18c2521..80393cff7 100644 --- a/mesalib/src/mesa/state_tracker/st_context.c +++ b/mesalib/src/mesa/state_tracker/st_context.c @@ -221,11 +221,6 @@ struct st_context *st_create_context(gl_api api, struct pipe_context *pipe, struct gl_context *shareCtx = share ? share->ctx : NULL; struct dd_function_table funcs; - /* Sanity checks */ - STATIC_ASSERT(MESA_SHADER_VERTEX == PIPE_SHADER_VERTEX); - STATIC_ASSERT(MESA_SHADER_FRAGMENT == PIPE_SHADER_FRAGMENT); - STATIC_ASSERT(MESA_SHADER_GEOMETRY == PIPE_SHADER_GEOMETRY); - memset(&funcs, 0, sizeof(funcs)); st_init_driver_functions(&funcs); diff --git a/mesalib/src/mesa/state_tracker/st_extensions.c b/mesalib/src/mesa/state_tracker/st_extensions.c index 83e8e2e96..32348ef73 100644 --- a/mesalib/src/mesa/state_tracker/st_extensions.c +++ b/mesalib/src/mesa/state_tracker/st_extensions.c @@ -68,7 +68,7 @@ void st_init_limits(struct st_context *st) { struct pipe_screen *screen = st->pipe->screen; struct gl_constants *c = &st->ctx->Const; - gl_shader_type sh; + unsigned sh; boolean can_ubo = TRUE; c->MaxTextureLevels @@ -149,23 +149,25 @@ void st_init_limits(struct st_context *st) can_ubo = FALSE; } - for (sh = 0; sh < MESA_SHADER_TYPES; ++sh) { - struct gl_shader_compiler_options *options = - &st->ctx->ShaderCompilerOptions[sh]; + for (sh = 0; sh < PIPE_SHADER_TYPES; ++sh) { + struct gl_shader_compiler_options *options; struct gl_program_constants *pc; switch (sh) { case PIPE_SHADER_FRAGMENT: pc = &c->FragmentProgram; + options = &st->ctx->ShaderCompilerOptions[MESA_SHADER_FRAGMENT]; break; case PIPE_SHADER_VERTEX: pc = &c->VertexProgram; + options = &st->ctx->ShaderCompilerOptions[MESA_SHADER_VERTEX]; break; case PIPE_SHADER_GEOMETRY: pc = &c->GeometryProgram; + options = &st->ctx->ShaderCompilerOptions[MESA_SHADER_GEOMETRY]; break; default: - assert(0); + /* compute shader, etc. */ continue; } @@ -274,9 +276,6 @@ void st_init_limits(struct st_context *st) c->GLSLSkipStrictMaxUniformLimitCheck = screen->get_param(screen, PIPE_CAP_TGSI_CAN_COMPACT_CONSTANTS); - c->GLSLSkipStrictMaxVaryingLimitCheck = - screen->get_param(screen, PIPE_CAP_TGSI_CAN_COMPACT_VARYINGS); - if (can_ubo) { st->ctx->Extensions.ARB_uniform_buffer_object = GL_TRUE; c->UniformBufferOffsetAlignment = @@ -552,7 +551,14 @@ void st_init_extensions(struct st_context *st) ctx->Extensions.EXT_pixel_buffer_object = GL_TRUE; ctx->Extensions.EXT_point_parameters = GL_TRUE; ctx->Extensions.EXT_provoking_vertex = GL_TRUE; - ctx->Extensions.EXT_separate_shader_objects = GL_TRUE; + + /* IMPORTANT: + * Don't enable EXT_separate_shader_objects. It disallows a certain + * optimization in the GLSL compiler and therefore is considered + * harmful. + */ + ctx->Extensions.EXT_separate_shader_objects = GL_FALSE; + ctx->Extensions.EXT_texture_env_dot3 = GL_TRUE; ctx->Extensions.EXT_vertex_array_bgra = GL_TRUE; diff --git a/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index 32bc2b37b..64e0a8a46 100644 --- a/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -5271,15 +5271,11 @@ st_link_shader(struct gl_context *ctx, struct gl_shader_program *prog) linked_prog = get_mesa_program(ctx, prog, prog->_LinkedShaders[i]); if (linked_prog) { - static const GLenum targets[] = { - GL_VERTEX_PROGRAM_ARB, - GL_FRAGMENT_PROGRAM_ARB, - GL_GEOMETRY_PROGRAM_NV - }; - _mesa_reference_program(ctx, &prog->_LinkedShaders[i]->Program, linked_prog); - if (!ctx->Driver.ProgramStringNotify(ctx, targets[i], linked_prog)) { + if (!ctx->Driver.ProgramStringNotify(ctx, + _mesa_program_index_to_target(i), + linked_prog)) { _mesa_reference_program(ctx, &prog->_LinkedShaders[i]->Program, NULL); _mesa_reference_program(ctx, &linked_prog, NULL); |