| Index: gpu/command_buffer/service/gles2_cmd_decoder.cc
|
| diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
|
| index 6e8c92cee9050b963c8cd3deaf8e8ee6fec6e88e..db91adffc8aeb47aa9fc43e733c8386914bd8bfa 100644
|
| --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
|
| +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
|
| @@ -3273,9 +3273,7 @@ bool GLES2DecoderImpl::InitializeShaderTranslator() {
|
| resources.HashFunction = &CityHash64;
|
| else
|
| resources.HashFunction = NULL;
|
| - ShaderTranslatorInterface::GlslImplementationType implementation_type =
|
| - gfx::GetGLImplementation() == gfx::kGLImplementationEGLGLES2 ?
|
| - ShaderTranslatorInterface::kGlslES : ShaderTranslatorInterface::kGlsl;
|
| +
|
| int driver_bug_workarounds = 0;
|
| if (workarounds().needs_glsl_built_in_function_emulation)
|
| driver_bug_workarounds |= SH_EMULATE_BUILT_IN_FUNCTIONS;
|
| @@ -3299,11 +3297,12 @@ bool GLES2DecoderImpl::InitializeShaderTranslator() {
|
| switches::kEmulateShaderPrecision))
|
| resources.WEBGL_debug_shader_precision = true;
|
|
|
| + ShShaderOutput shader_output_language =
|
| + ShaderTranslator::GetShaderOutputLanguageForContext(
|
| + feature_info_->gl_version_info());
|
| +
|
| vertex_translator_ = shader_translator_cache()->GetTranslator(
|
| - GL_VERTEX_SHADER,
|
| - shader_spec,
|
| - &resources,
|
| - implementation_type,
|
| + GL_VERTEX_SHADER, shader_spec, &resources, shader_output_language,
|
| static_cast<ShCompileOptions>(driver_bug_workarounds));
|
| if (!vertex_translator_.get()) {
|
| LOG(ERROR) << "Could not initialize vertex shader translator.";
|
| @@ -3312,10 +3311,7 @@ bool GLES2DecoderImpl::InitializeShaderTranslator() {
|
| }
|
|
|
| fragment_translator_ = shader_translator_cache()->GetTranslator(
|
| - GL_FRAGMENT_SHADER,
|
| - shader_spec,
|
| - &resources,
|
| - implementation_type,
|
| + GL_FRAGMENT_SHADER, shader_spec, &resources, shader_output_language,
|
| static_cast<ShCompileOptions>(driver_bug_workarounds));
|
| if (!fragment_translator_.get()) {
|
| LOG(ERROR) << "Could not initialize fragment shader translator.";
|
|
|