diff options
author | Ilia Mirkin <[email protected]> | 2016-06-12 18:56:43 -0400 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2016-07-23 13:48:04 -0400 |
commit | e483cb9a3add01dc552bd2a42763aff4be5808fc (patch) | |
tree | 2acfcf3ca3d2e39bb836a7fa66f3c343dc164548 /src/mesa/Android.libmesa_glsl_utils.mk | |
parent | 9253dcde585042242614c4b6677d8f2b13bd2237 (diff) |
glsl: reuse main extension table to appropriately restrict extensions
Previously we were only restricting based on ES/non-ES-ness and whether
the overall enable bit had been flipped on. However we have been adding
more fine-grained restrictions, such as based on compat profiles, as
well as specific ES versions. Most of the time this doesn't matter, but
it can create awkward situations and duplication of logic.
Here we separate the main extension table into a separate object file,
linked to the glsl compiler, which makes use of it with a custom
function which takes the ES-ness of the shader into account (thus
allowing desktop shaders to properly use ES extensions that would
otherwise have been disallowed.) We can also now use this logic to
generate #define's for all supported extensions automatically, removing
the duplicate (and often inaccurate) list in glcpp.
The effect of this change should be nil in most cases. However in some
situations, extensions like GL_ARB_gpu_shader5 which were formerly
available in compat contexts on the GLSL side of things will now become
inaccessible.
This regresses two ES CTS tests:
ES3-CTS.shaders.shader_integer_mix.define
ES31-CTS.shader_integer_mix.define
however that is due to them using #version 100 instead of 300 es. As the
extension is only defined for ES3, I believe this is the correct
behavior.
Signed-off-by: Ilia Mirkin <[email protected]>
Reviewed-by: Eric Engestrom <[email protected]> (v2)
v2 -> v3: integrate glcpp defines into the same mechanism
Diffstat (limited to 'src/mesa/Android.libmesa_glsl_utils.mk')
-rw-r--r-- | src/mesa/Android.libmesa_glsl_utils.mk | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/Android.libmesa_glsl_utils.mk b/src/mesa/Android.libmesa_glsl_utils.mk index 5a80f221c8f..dfea801b057 100644 --- a/src/mesa/Android.libmesa_glsl_utils.mk +++ b/src/mesa/Android.libmesa_glsl_utils.mk @@ -42,6 +42,7 @@ LOCAL_C_INCLUDES := \ $(MESA_TOP)/src/gallium/auxiliary LOCAL_SRC_FILES := \ + main/extensions_table.c \ main/imports.c \ program/prog_hash_table.c \ program/symbol_table.c \ @@ -67,6 +68,7 @@ LOCAL_C_INCLUDES := \ $(MESA_TOP)/src/gallium/auxiliary LOCAL_SRC_FILES := \ + main/extensions_table.c \ main/imports.c \ program/prog_hash_table.c \ program/symbol_table.c \ |