diff options
author | Anuj Phogat <[email protected]> | 2017-02-10 13:43:57 -0800 |
---|---|---|
committer | Anuj Phogat <[email protected]> | 2017-02-13 16:08:40 -0800 |
commit | 5e2909e732aaccfa2e26745dd6f32e9dc266dd5d (patch) | |
tree | a6e348acd6032001542a8a6459dbebdf5ca93373 /src/compiler | |
parent | b3b4114a0f57c78fc6b9b58f4a8249292adba382 (diff) |
mesa: Add EXT_frag_depth bits and enable it on all drivers
Passes the newly added piglit test for this extension on i965.
V2: Fix comments by Ilia.
Signed-off-by: Anuj Phogat <[email protected]>
Reviewed-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/glsl/builtin_variables.cpp | 3 | ||||
-rw-r--r-- | src/compiler/glsl/glsl_parser_extras.cpp | 1 | ||||
-rw-r--r-- | src/compiler/glsl/glsl_parser_extras.h | 2 |
3 files changed, 6 insertions, 0 deletions
diff --git a/src/compiler/glsl/builtin_variables.cpp b/src/compiler/glsl/builtin_variables.cpp index be593e9f433..db8418bbc7f 100644 --- a/src/compiler/glsl/builtin_variables.cpp +++ b/src/compiler/glsl/builtin_variables.cpp @@ -1193,6 +1193,9 @@ builtin_variable_generator::generate_fs_special_vars() if (state->is_version(110, 300)) add_output(FRAG_RESULT_DEPTH, float_t, "gl_FragDepth"); + if (state->EXT_frag_depth_enable) + add_output(FRAG_RESULT_DEPTH, float_t, "gl_FragDepthEXT"); + if (state->ARB_shader_stencil_export_enable) { ir_variable *const var = add_output(FRAG_RESULT_STENCIL, int_t, "gl_FragStencilRefARB"); diff --git a/src/compiler/glsl/glsl_parser_extras.cpp b/src/compiler/glsl/glsl_parser_extras.cpp index c4da79a32f8..f6a9c9a051d 100644 --- a/src/compiler/glsl/glsl_parser_extras.cpp +++ b/src/compiler/glsl/glsl_parser_extras.cpp @@ -684,6 +684,7 @@ static const _mesa_glsl_extension _mesa_glsl_supported_extensions[] = { EXT(AMD_vertex_shader_viewport_index), EXT(ANDROID_extension_pack_es31a), EXT(EXT_blend_func_extended), + EXT(EXT_frag_depth), EXT(EXT_draw_buffers), EXT(EXT_clip_cull_distance), EXT(EXT_geometry_point_size), diff --git a/src/compiler/glsl/glsl_parser_extras.h b/src/compiler/glsl/glsl_parser_extras.h index 66a954f880b..9f4a309ca21 100644 --- a/src/compiler/glsl/glsl_parser_extras.h +++ b/src/compiler/glsl/glsl_parser_extras.h @@ -741,6 +741,8 @@ struct _mesa_glsl_parse_state { bool EXT_clip_cull_distance_warn; bool EXT_draw_buffers_enable; bool EXT_draw_buffers_warn; + bool EXT_frag_depth_enable; + bool EXT_frag_depth_warn; bool EXT_geometry_point_size_enable; bool EXT_geometry_point_size_warn; bool EXT_geometry_shader_enable; |