aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/glsl_parser_extras.h
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-05-08 00:18:25 +0200
committermarha <marha@users.sourceforge.net>2014-05-08 00:18:25 +0200
commit683155917770af9e63a938bc450df25d1904d567 (patch)
tree5eb9d2d0bba27ed4e8afe58c195d1918282c343b /mesalib/src/glsl/glsl_parser_extras.h
parentea0cd87ecbe9fc3c5503ccad7f87a895a458d6d4 (diff)
downloadvcxsrv-683155917770af9e63a938bc450df25d1904d567.tar.gz
vcxsrv-683155917770af9e63a938bc450df25d1904d567.tar.bz2
vcxsrv-683155917770af9e63a938bc450df25d1904d567.zip
xserver xcb-proto mesa pixman xkeyboard-config git update 7 May 2014
xserver commit a5b9757142a2ab471ca26651dce9cc5f5e351f3d libxcb commit d978a4f69b30b630f28d07f1003cf290284d24d8 libxcb/xcb-proto commit 389889e2f95af19e7fc7ac89e7faeb2f28652415 xkeyboard-config commit 3e54f31b1f118f00c240f59d72d7ddb685c6db79 libX11 commit 8be4610939b833587954957f5963eb4191b43d19 libXdmcp commit 089081dca4ba3598c6f9bf401c029378943b5854 libXext commit 11aad96bd689d54156064d2e81213dc827a689d1 libfontenc commit 0037a42107b952c9d903719615747e760e4e7247 libXinerama commit edd95182b26eb5d576d4878c559e0f17dddaa909 libXau commit 1e4635be11154dd8262f37b379511bd627defa2a xkbcomp commit d4e02a09258063c6d024c3ccd42d6b22212e6e18 pixman commit 91f32ce961bc85f98b3372b95681ad8918d24b18 xextproto commit 66afec3f49e8eb0d4c2e9af7088fc3116d4bafd7 randrproto commit a4a6694c059d74247c16527eef4a0ec9f56bbef6 glproto commit f84853d97d5749308992412a215fa518b6536eb3 mkfontscale commit 399db42a151687f1181ae23d28a76d31125a2853 xwininfo commit ba0d1b0da21d2dbdd81098ed5778f3792b472e13 libXft commit 4acfdaf95adb0a05c2a25550bdde036c865902f4 libXmu commit 22d9c590901e121936f50dee97dc60c4f7defb63 libxtrans commit a57a7f62242e1ea972b81414741729bf3dbae0a4 fontconfig commit 81664fe54f117e4781fda5a30429b51858302e91 mesa commit 9ced3fc649ec04710a5f5c855bfb582b898cff83
Diffstat (limited to 'mesalib/src/glsl/glsl_parser_extras.h')
-rw-r--r--mesalib/src/glsl/glsl_parser_extras.h116
1 files changed, 71 insertions, 45 deletions
diff --git a/mesalib/src/glsl/glsl_parser_extras.h b/mesalib/src/glsl/glsl_parser_extras.h
index 3ad205c07..0416a9c72 100644
--- a/mesalib/src/glsl/glsl_parser_extras.h
+++ b/mesalib/src/glsl/glsl_parser_extras.h
@@ -140,8 +140,7 @@ struct _mesa_glsl_parse_state {
{
if (!this->has_separate_shader_objects()) {
const char *const requirement = this->es_shader
- ? "GL_EXT_separate_shader_objects (not supported by this "
- "implementation)"
+ ? "GL_EXT_separate_shader_objects extension"
: "GL_ARB_separate_shader_objects extension or GLSL 420";
_mesa_glsl_error(locp, this, "%s explicit location requires %s",
@@ -164,7 +163,8 @@ struct _mesa_glsl_parse_state {
bool has_separate_shader_objects() const
{
- return ARB_separate_shader_objects_enable || is_version(410, 0);
+ return ARB_separate_shader_objects_enable || is_version(410, 0)
+ || EXT_separate_shader_objects_enable;
}
void process_version_directive(YYLTYPE *locp, int version,
@@ -200,6 +200,18 @@ struct _mesa_glsl_parse_state {
struct ast_type_qualifier *default_uniform_qualifier;
/**
+ * Variables to track different cases if a fragment shader redeclares
+ * built-in variable gl_FragCoord.
+ *
+ * Note: These values are computed at ast_to_hir time rather than at parse
+ * time.
+ */
+ bool fs_redeclares_gl_fragcoord;
+ bool fs_origin_upper_left;
+ bool fs_pixel_center_integer;
+ bool fs_redeclares_gl_fragcoord_with_no_layout_qualifiers;
+
+ /**
* True if a geometry shader input primitive type was specified using a
* layout directive.
*
@@ -337,8 +349,14 @@ struct _mesa_glsl_parse_state {
* \name Enable bits for GLSL extensions
*/
/*@{*/
+ /* ARB extensions go here, sorted alphabetically.
+ */
bool ARB_arrays_of_arrays_enable;
bool ARB_arrays_of_arrays_warn;
+ bool ARB_compute_shader_enable;
+ bool ARB_compute_shader_warn;
+ bool ARB_conservative_depth_enable;
+ bool ARB_conservative_depth_warn;
bool ARB_draw_buffers_enable;
bool ARB_draw_buffers_warn;
bool ARB_draw_instanced_enable;
@@ -347,70 +365,78 @@ struct _mesa_glsl_parse_state {
bool ARB_explicit_attrib_location_warn;
bool ARB_fragment_coord_conventions_enable;
bool ARB_fragment_coord_conventions_warn;
- bool ARB_texture_rectangle_enable;
- bool ARB_texture_rectangle_warn;
- bool ARB_texture_gather_enable;
- bool ARB_texture_gather_warn;
- bool EXT_texture_array_enable;
- bool EXT_texture_array_warn;
+ bool ARB_gpu_shader5_enable;
+ bool ARB_gpu_shader5_warn;
+ bool ARB_sample_shading_enable;
+ bool ARB_sample_shading_warn;
bool ARB_separate_shader_objects_enable;
bool ARB_separate_shader_objects_warn;
- bool ARB_shader_texture_lod_enable;
- bool ARB_shader_texture_lod_warn;
- bool ARB_shader_stencil_export_enable;
- bool ARB_shader_stencil_export_warn;
- bool AMD_conservative_depth_enable;
- bool AMD_conservative_depth_warn;
- bool ARB_conservative_depth_enable;
- bool ARB_conservative_depth_warn;
- bool AMD_shader_stencil_export_enable;
- bool AMD_shader_stencil_export_warn;
- bool OES_texture_3D_enable;
- bool OES_texture_3D_warn;
- bool OES_EGL_image_external_enable;
- bool OES_EGL_image_external_warn;
+ bool ARB_shader_atomic_counters_enable;
+ bool ARB_shader_atomic_counters_warn;
bool ARB_shader_bit_encoding_enable;
bool ARB_shader_bit_encoding_warn;
- bool ARB_uniform_buffer_object_enable;
- bool ARB_uniform_buffer_object_warn;
- bool OES_standard_derivatives_enable;
- bool OES_standard_derivatives_warn;
- bool ARB_texture_cube_map_array_enable;
- bool ARB_texture_cube_map_array_warn;
+ bool ARB_shader_image_load_store_enable;
+ bool ARB_shader_image_load_store_warn;
+ bool ARB_shader_stencil_export_enable;
+ bool ARB_shader_stencil_export_warn;
+ bool ARB_shader_texture_lod_enable;
+ bool ARB_shader_texture_lod_warn;
+ bool ARB_shading_language_420pack_enable;
+ bool ARB_shading_language_420pack_warn;
bool ARB_shading_language_packing_enable;
bool ARB_shading_language_packing_warn;
+ bool ARB_texture_cube_map_array_enable;
+ bool ARB_texture_cube_map_array_warn;
+ bool ARB_texture_gather_enable;
+ bool ARB_texture_gather_warn;
bool ARB_texture_multisample_enable;
bool ARB_texture_multisample_warn;
bool ARB_texture_query_levels_enable;
bool ARB_texture_query_levels_warn;
bool ARB_texture_query_lod_enable;
bool ARB_texture_query_lod_warn;
- bool ARB_gpu_shader5_enable;
- bool ARB_gpu_shader5_warn;
+ bool ARB_texture_rectangle_enable;
+ bool ARB_texture_rectangle_warn;
+ bool ARB_uniform_buffer_object_enable;
+ bool ARB_uniform_buffer_object_warn;
+ bool ARB_viewport_array_enable;
+ bool ARB_viewport_array_warn;
+
+ /* KHR extensions go here, sorted alphabetically.
+ */
+
+ /* OES extensions go here, sorted alphabetically.
+ */
+ bool OES_EGL_image_external_enable;
+ bool OES_EGL_image_external_warn;
+ bool OES_standard_derivatives_enable;
+ bool OES_standard_derivatives_warn;
+ bool OES_texture_3D_enable;
+ bool OES_texture_3D_warn;
+
+ /* All other extensions go here, sorted alphabetically.
+ */
+ bool AMD_conservative_depth_enable;
+ bool AMD_conservative_depth_warn;
+ bool AMD_shader_stencil_export_enable;
+ bool AMD_shader_stencil_export_warn;
+ bool AMD_shader_trinary_minmax_enable;
+ bool AMD_shader_trinary_minmax_warn;
bool AMD_vertex_shader_layer_enable;
bool AMD_vertex_shader_layer_warn;
- bool ARB_shading_language_420pack_enable;
- bool ARB_shading_language_420pack_warn;
- bool ARB_sample_shading_enable;
- bool ARB_sample_shading_warn;
+ bool EXT_separate_shader_objects_enable;
+ bool EXT_separate_shader_objects_warn;
bool EXT_shader_integer_mix_enable;
bool EXT_shader_integer_mix_warn;
- bool ARB_shader_atomic_counters_enable;
- bool ARB_shader_atomic_counters_warn;
- bool AMD_shader_trinary_minmax_enable;
- bool AMD_shader_trinary_minmax_warn;
- bool ARB_viewport_array_enable;
- bool ARB_viewport_array_warn;
- bool ARB_compute_shader_enable;
- bool ARB_compute_shader_warn;
- bool ARB_shader_image_load_store_enable;
- bool ARB_shader_image_load_store_warn;
+ bool EXT_texture_array_enable;
+ bool EXT_texture_array_warn;
/*@}*/
/** Extensions supported by the OpenGL implementation. */
const struct gl_extensions *extensions;
bool uses_builtin_functions;
+ bool fs_uses_gl_fragcoord;
/**
* For geometry shaders, size of the most recently seen input declaration