diff options
author | zmo@chromium.org <zmo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-24 01:25:05 +0000 |
---|---|---|
committer | zmo@chromium.org <zmo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-24 01:25:05 +0000 |
commit | 6aedcdca2f9d71d3157ce803520f360dbf6a16dd (patch) | |
tree | dfcf4327dddb971257d49f0aac32e85892530630 /gpu | |
parent | 64e65b1626cdf08c8717ca1e7f37133a9077b204 (diff) | |
download | chromium_src-6aedcdca2f9d71d3157ce803520f360dbf6a16dd.zip chromium_src-6aedcdca2f9d71d3157ce803520f360dbf6a16dd.tar.gz chromium_src-6aedcdca2f9d71d3157ce803520f360dbf6a16dd.tar.bz2 |
Fix some bug in shader name hashing.
This is still behind a switch, but at least with this fix, we can turn it on using that switch --enable-shader-name-hashing.
BUG=160369
TEST=
Review URL: https://codereview.chromium.org/12049044
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@178459 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu')
-rw-r--r-- | gpu/command_buffer/service/gles2_cmd_decoder.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc index b89024e..331213a 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc @@ -2498,11 +2498,12 @@ bool GLES2DecoderImpl::InitializeShaderTranslator() { features().oes_egl_image_external ? 1 : 0; } - if (features().enable_shader_name_hashing) - resources.HashFunction = &CityHashForAngle; - ShShaderSpec shader_spec = force_webgl_glsl_validation_ || force_webgl_glsl_validation_ ? SH_WEBGL_SPEC : SH_GLES2_SPEC; + if (shader_spec == SH_WEBGL_SPEC && features().enable_shader_name_hashing) + resources.HashFunction = &CityHashForAngle; + else + resources.HashFunction = NULL; ShaderTranslatorInterface::GlslImplementationType implementation_type = gfx::GetGLImplementation() == gfx::kGLImplementationEGLGLES2 ? ShaderTranslatorInterface::kGlslES : ShaderTranslatorInterface::kGlsl; |