Commit 22d7f1f3 by Jamie Madill Committed by Commit Bot

Simplify uniform type table texture type.

We can use Python's "endswith" more easily than using the current checks. BUG=angleproject:1390 BUG=angleproject:2167 Change-Id: I5a35602c91b989270cff1d42a9d5ede542039fbd Reviewed-on: https://chromium-review.googlesource.com/717188Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent f6d242ed
......@@ -155,12 +155,9 @@ def get_component_type(uniform_type):
return "GL_INT"
def get_texture_type(uniform_type):
if "SAMPLER" in uniform_type:
index = uniform_type.find("SAMPLER") + len("SAMPLER") + 1
return "GL_TEXTURE_" + texture_types[uniform_type[index:]]
if "IMAGE" in uniform_type:
index = uniform_type.find("IMAGE") + len("IMAGE") + 1
return "GL_TEXTURE_" + texture_types[uniform_type[index:]]
for sampler_type, tex_type in texture_types.items():
if uniform_type.endswith(sampler_type):
return "GL_TEXTURE_" + tex_type
return "GL_NONE"
def get_transposed_type(uniform_type):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment